0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.191.223.30


Current Path : /proc/thread-self/root/var/www/html/demo/qptran/admin/
Upload File :
Current File : //proc/thread-self/root/var/www/html/demo/qptran/admin/archive.php

<?php require_once('auth.php'); ?>
<? include("header.php"); ?>
<style type="text/css">
<!--
.style2 {color: #FFFFFF; font-weight: bold; font-size: 14px; }
-->
</style>

<script language = "Javascript">

<!-- 

/**

 * DHTML check all/clear all links script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)

 */



var form='form1' //Give the form name here



function SetChecked(val,chkName) {

dml=document.forms[form];

len = dml.elements.length;

var i=0;

for( i=0 ; i<len ; i++) {

if (dml.elements[i].name==chkName) {

dml.elements[i].checked=val;

}

}

}



function ValidateForm(dml,chkName){

len = dml.elements.length;

var i=0;

for( i=0 ; i<len ; i++) {

if ((dml.elements[i].name==chkName) && (dml.elements[i].checked==1)) return true

}

alert("Please select at least one record to be deleted")

return false;

}

// -->

</script>
<div class="cont">
<p>&nbsp;</p>
<div style="width:800px; height:30px; text-align:center; margin:0 auto; padding-top:10px;">
  <h3>ARCHIVE QUESTION PAPERS</h3>
  <p>&nbsp;</p></div>
<!--- Header Over -->
<?
$a_id=$_SESSION['SESS_MEMBER_ID'];
?>

  <table width="800" border="0" align="center" cellpadding="4" cellspacing="1">
    <tr>
	  <td width="684"></td>
      <td width="44" height="36" style="padding-left:5px;"><a href="adminfunction.php">Back</a></td>
       <td width="44" height="36"  style="padding-left:5px;"><a href="logout.php">Logout</a></td>
	</tr>
</table>


<?  
include('link.php');
$page_name="archive.php"; 
$start=$_GET['start'];
if(strlen($start) > 0 and !is_numeric($start)){
echo "Data Error";
exit;
}
$eu = ($start - 0); 
$limit = 300; // No of records to be shown per page.
$this1 = $eu + $limit;
$back = $eu - $limit;
$next = $eu + $limit;

$query2="SELECT * FROM qptable ORDER BY qdate DESC";
$result2=mysql_query($query2);
echo mysql_error();
$nume=mysql_num_rows($result2);

//$query=" SELECT * FROM news_articles  ORDER BY art_date DESC limit $eu, $limit ";
$query="SELECT * FROM qptable ORDER BY qdate DESC limit $eu, $limit ";
$result=mysql_query($query);
echo mysql_error();
?>
<form name="form1" action="<?= $_SERVER['PHP_SELF'] ?>" method="POST">	  
  <table width="800" border="0" align="center" cellpadding="4" cellspacing="1" bordercolor="#999999" bgcolor="#999999">
    <tr>
 	  <td  height="36" bgcolor="000080"  style="padding-left:5px;"><div align="center" class="style2"><font style="padding-left:5px;">Check</font></div></td>
      <td  height="36" bgcolor="000080"  style="padding-left:5px;"><div align="center" class="style2"><font style="padding-left:5px;">Date</font></div></td>
	  <td  height="36" bgcolor="000080"  style="padding-left:5px;"><div align="center" class="style2"><font style="padding-left:5px;">Session</font></div></td>
 	  <td  height="36" bgcolor="000080"  style="padding-left:5px;"><div align="center" class="style2"><font style="padding-left:5px;">Question Paper Bundle</font></div></td>
    </tr>  
<?php
while($noticia = mysql_fetch_array($result))
{
?>	  
<tr>
 <td width="53" height="36" bgcolor="#f4f2f3"  style="padding-left:5px;"><div align="center">
 <font size="2" style="padding-left:5px;">
 <input name="checkbox[]" type="checkbox" id="checkbox[]" value="<?=$noticia{'id'}; ?>">
 </font></div></td>
 <td width="168" height="36" bgcolor="#f4f2f3"  style="padding-left:5px;"><div align="left"><font size="2" style="padding-left:5px;"><?=$noticia{'qdate'}; ?></font></div></td>
 <td width="108" height="36" bgcolor="#f4f2f3"  style="padding-left:5px;"><div align="left"><font size="2" style="padding-left:5px;"><?=$noticia{'qsession'}; ?></font></div></td>
 <td width="434" height="36" bgcolor="#f4f2f3"  style="padding-left:5px;"><div align="left"><font size="2" style="padding-left:5px;"><?=$noticia{'qpaper'}; ?></font></div></td>

</tr> 

<?php
}
?>
<tr>
 <td colspan="2" height="49" bgcolor="#f4f2f3"  style="padding-left:5px;"><div align="left">
  <a href="javascript:SetChecked(1,'archive[]')">Check All</a>&nbsp;&nbsp;
   <a href="javascript:SetChecked(0,'archive[]')">Clear All</a>
 </div></td>
<td colspan="2" align="left" bgcolor="#f4f2f3"  style="padding-left:5px;">
<input name="delete" type="submit" id="delete" value="Delete">
</td>
 </tr>
</table>
</form>
<?
if($nume > $limit ){ // Let us display bottom links if sufficient records are there for paging
?>
<table width="800" border="0" align="center" cellpadding="4" cellspacing="1" bordercolor="#999999" bgcolor="#CCCCCC">
 <tr>
  <td width="300"  height="36" bgcolor="CCCCCC"  style="padding-left:5px;">
<div align="left">
  <?
if($back >=0) { 
print "<a href='$page_name?start=$back' class='next_previous'>PREV</font></a>"; 
} 
?>
</div></td>
<td width="200"  height="36" bgcolor="CCCCCC"  style="padding-left:5px;">
<div align="center">
  <?
$i=0;
$l=1;
for($i=0;$i < $nume;$i=$i+$limit){
if($i <> $eu){
echo " <a href='$page_name?start=$i' class='next_previous'>$l</font></a> ";
}
else { echo "<span class='next_previous'>$l</span>";}        /// Current page is not displayed as link and given font color red
$l=$l+1;
}
?>
</div></td>
<td width="300"  height="36" bgcolor="CCCCCC"  style="padding-right:5px;">
<div align="right">
<?
if($this1 < $nume) { 
print "<a href='$page_name?start=$next' class='next_previous'>NEXT</a>";} 

?>
</div></td>
<?
 }
?> 

</tr>
</table>



<?
if($delete){
for($i=0;$i<$count;$i++){
$del_id = $checkbox[$i];
echo"ID :".$del_id;
include("link.php");
$query1="DELETE FROM qptable WHERE id='$del_id'";
$result1=mysql_query($query1) or die("Query 1 Failed".mysql_error());
?>
<table width="600" height="300" border="0" align="center" cellpadding="2" cellspacing="1">
<tbody>
<tr>
<td class="Display_msg">
  <div align="center">QUESTION PAPERS ARCHIVED SUCCESSFULLY.</div></td>
 </tr>
</tbody>
</table>
<meta http-equiv="refresh" content="3; url=archive.php">
<?
//$sql = "DELETE FROM $tbl_name WHERE id='$del_id'";
//$result = mysql_query($sql);
}
}
?>



</form>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<? include("footer.php"); ?>