Viewing file: class-2.php (7.87 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php session_start(); ?> `<?php include('session.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Question Paper </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css"> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> a { color:#5D5D9E; } a:visited { color:#5D5D9E; } a:active { color:#5C615E; } a:hover { color:#B2B3B4; } @media only screen and (max-width: 450px) { #container_f645165 { width:100% !important; } #container_5f0116bc { width:100% !important; } #container_4915d68c { width:100% !important; } } </style>
<script type='text/javascript'> $(document).ready(function(){ $("img.a").hover( function() { $(this).stop().animate({"opacity": "0"}, "slow"); }, function() { $(this).stop().animate({"opacity": "1"}, "slow"); });
}); </script> <style type="text/css"> table { border: 0px solid green; border-collapse: collapse; width:100%; }
table td { border: 0px solid green; }
table td.shrink { white-space:nowrap } table td.expand { width: 99% } </style> <style>
.table {
table-layout:fixed; width:500px;
border-collapse:collapse;
}
.header th {
font-family:Calibri; font-size:small; font-weight:lighter;
border-left:1px solid #000; background:#d0d0d0;
}
.body_panel {
display:inline-block; width:520px; height:300px; overflow-y:scroll;
}
.body tr {
border-bottom:1px solid #d0d0d0;
}
.body td {
border-left:1px solid #d0d0d0; padding-left:3px;
font-family:Calibri; font-size:small;
overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
} </style> </head> <center> <body class="w3-container"> <table > <tr> <td colspan="2"><table width="945" border="0"> <tr> <td colspan="3" bgcolor="#CCCCCC"> <?php include('menubar/menubar.php'); ?></td> </tr> <tr> <td colspan="3" bgcolor="#CCCCCC"> <?php include('sessionbar.php'); ?></td> </tr> <tr> </tr> </table></td> </tr> <tr> <td colspan="2" align="center"> <h3>CCC First Paper Set Contains-150 Question </h3> <?php include('divider/divider.php'); ?> <script> <!--
/* Count down then redirect script By JavaScript Kit (http://javascriptkit.com) Over 400+ free scripts here! */
//change below target URL to your own var targetURL="http://amitprabha.in/calcultor.php" //change the second to start counting down from var countdownfrom=3600
var currentsecond=document.redirect.redirect2.value=countdownfrom+1 function countredirect(){ if (currentsecond!=1){ currentsecond-=1 document.redirect.redirect2.value=currentsecond } else{ window.location=targetURL return } setTimeout("countredirect()",1000) }
countredirect() //--> </script> <?php include('connect.php'); ?> <form id="form1" name="form1" action="calcultor.php" method="post" enctype="multipart/form-datas"> <?php // Get the search variable from URL
$var = @$_GET['q'] ; $trimmed = trim($var); //trim whitespace from the stored variable
// rows to return $limit=150;
// check for an empty string and display a message.
//connect to your database ** EDIT REQUIRED HERE **
// Build SQL Query $query = "select * from ctet_physcology order by ID "; // EDIT HERE and specify your table and field names for the SQL query
$numresults=mysql_query($query); $numrows=mysql_num_rows($numresults);
// If we have no results, offer a google search as an alternative
if ($numrows == 0) { echo " Sorry, $trimmed this Number is not found";
}
// next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; }
// get results $query .= " limit $s,$limit"; $result = mysql_query($query) or die("Couldn't execute query"); $srno=0;
// begin to show results set
$count = 1 + $s ;
// now you can display the results returned while ($row= mysql_fetch_array($result)) { $answer=$row[correctanswer]; $srno=$srno+1; echo "<div style=\"text-align:left;\">\n"; echo " <div style=\"vertical-align: top; position:relative; display: inline-block; width:100%; min-height:150px; background-color:#C0C0C0; background: linear-gradient(to bottom, #CBCBFB, #C0C0C0); \" id=\"container_6530c995\">\n"; echo " <div style=\"margin: 10px; display: block; \" id=\"container_6530c995_padding\" >\n"; echo " <div style=\"text-align:left;\">\n"; echo " <div style=\"vertical-align: top; position:relative; display: inline-block; width:33%; min-height:150px; background:none; \" id=\"container_f645165\">\n"; echo " <div style=\"margin: 10px; display: block; \" id=\"container_f645165_padding\" >\n"; echo " <div style=\"text-align:left;\">\n"; echo " <span style=\"font-size:12pt; font-family:Arial, Helvetica, sans-serif; color:#000000; \"><font color='red'>$row[question]</font></span>\n"; echo " </div>\n"; echo " </div>\n"; echo " </div>\n"; echo " <div style=\"vertical-align: top; position:relative; display: inline-block; width:33%; min-height:150px; background:none; \" id=\"container_5f0116bc\">\n"; echo " <div style=\"margin: 10px; display: block; \" id=\"container_5f0116bc_padding\" >\n"; echo " <div style=\"text-align:left;\">\n"; echo " <span style=\"font-size:12pt; font-family:Arial, Helvetica, sans-serif; color:#000000; \">
<input type=\"radio\" name='radiocount[$srno]' id=\"radiocount[$srno]\" value='$row[wronganswer1]' /> $row[wronganswer1] <br>
<input type=\"radio\" name='radiocount[$srno]' id=\"radiocount[$srno]\" value='$row[wronganswer2]' /> $row[wronganswer2]<br>
<input type=\"radio\" name=\"radiocount[$srno]\" id=\"radiocount[$srno]\" value='$row[wronganswer3] ' /> $row[wronganswer3]<br>
<input type=\"radio\" name=\"radiocount[$srno]\" id=\"radiocount[$srno]\" value='$row[wronganswer4]' /> $row[wronganswer4] <input type=\"hidden\" name='cans[$srno]' id=\"cans\" value=\"$row[correctanswer]\" /> <input type=\"hidden\" name='countss' id=\"countss\" value='$srno' /> <input type=\"hidden\" name='rollnos' id=\"countss\" value='$rollnoss' /> </span>\n"; echo " </div>\n"; echo " </div>\n"; echo " </div>\n"; echo " <div style=\"vertical-align: top; position:relative; display: inline-block; width:33%; min-height:150px; background:none; \" id=\"container_4915d68c\">\n"; echo " <div style=\"margin: 10px; display: block; \" id=\"container_4915d68c_padding\" >\n"; echo " <div style=\"text-align:left;\">\n"; echo " <span style=\"font-size:12pt; font-family:Arial, Helvetica, sans-serif; color:#000000; \">commenti</span>\n"; echo " </div>\n"; echo " </div>\n"; echo " </div>\n"; echo " </div>\n"; echo " <div style=\"clear:both\"></div>\n"; echo " </div>\n"; echo " </div>\n"; echo " </div>\n"; echo "\n";
echo "<hr></hr>"; echo "<br>"; $count++ ; }
$currPage = (($s/$limit) + 1);
//break before paging echo "";
// next we need to do the links to other results if ($s>=1) { // bypass PREV link if s is 0 $prevs=($s-$limit); print "<a href=\"$PHP_SELF?s=$prevs&q=$var\"><< Prev 10</a> "; }
// calculate number of pages needing links $pages=intval($numrows/$limit);
// $pages now contains int of pages needed unless there is a remainder from division
?> <center> <input name="submi" type="submit"> </center> </form> </td> </tr> <tr> <td colspan="2" bgcolor="#CCCCCC"><?php include('footer/footer.php'); ?></td> </tr> </table>
</body></center> </html>
|