Viewing file: bonddetailsrd.php (6.05 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css"> body { font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 11px; margin: 0px; background-color: #E7D2B8; color: #863F2B; } img.headerImg { width: 100%; } .menu-strip { float: left; width: 20%; } .main-content { float: left; width: 80%; } .clear { clear: both; } ul.menu { margin: 0px; margin-left: 10px; padding: 0px; list-style: none; } ul.menu li { margin: 0px; padding: 0px; padding-top: 10px; padding-bottom: 10px; } div.footer { width: 60%; margin-left: 20%; } ul.footer-links { list-style: none; } ul.footer-links li { float: left; padding: 20px; } ul.footer-links li:last { clear: right; } table { width: 100%; border-collapse: collapse; } td { vertical-align: top; }</style> </head> <center> <body>
<form action="records.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <table width="1176" border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC"> <tr> <td colspan="4" align="center"><?php include('header.php'); ?></td> </tr> <tr> <td colspan="4" bgcolor="#FFFF00"><?php include('menubar.php'); ?></td> </tr> <tr> <td width="975" bgcolor="#6699CC">Welcome: Mr.<?php echo $user ?></td> <td width="185" bgcolor="#6699CC"><a href="logout.php">Logout</a></td> <td width="17" bgcolor="#6699CC"><?php echo "Today is " . date("d/m/y") . "<br>";?></td> </tr> <tr> <td colspan="4" bgcolor="#FFFF00"></td> </tr> <tr> <td colspan="4" align="left" valign="top"> <div id="print2"> <?php
// Get the search variable from URL
$var = @$_GET['q'] ; $trimmed = trim($var); //trim whitespace from the stored variable
// rows to return $limit=100;
// check for an empty string and display a message.
//connect to your database ** EDIT REQUIRED HERE **
mysql_connect("localhost","sarkmicr_user","rb!sar838"); //(host, username, password)
//specify database ** EDIT REQUIRED HERE ** mysql_select_db("sarkmicr_data") or die("Unable to select database"); //select which database we're using
// Build SQL Query $query = "select * from fdbond where planno like 'MIS' "; // 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");
// begin to show results set
$count = 1 + $s ; echo "<table width='960px' border='1' cellspacing='0' cellpadding='0' bgcolor='#FF6600' style='table-layout:fixed' >\n";
echo " <col width='90px'/>"; echo"<col width='90px'/>"; echo"<col width='90px'/>"; echo " <col width='90px'/>"; echo"<col width='90px'/>"; echo"<col width='90px'/>"; echo " <col width='90px'/>"; echo"<col width='90px'/>"; echo"<col width='90px'/>"; echo " <col width='90px'/>"; echo " <col width='90px'/>"; echo " <col width='90px'/>"; echo " <col width='90px'/>";
echo " <tr bgcolor='#00CCFF' font size='-1'>\n"; echo " <td>Ledger No</td>\n"; echo " <td>Account No</td>\n"; echo " <td >Client Name</td>\n"; echo " <td >Address</td>\n"; echo " <td >Plan</td>\n";
echo " <td >Nominee</td>\n"; echo " <td >Member</td>\n"; echo " <td >Mathurity Date</td>\n"; echo " <td >Mathurity Amount</td>\n"; echo " <td >Rate</td>\n"; echo " <td ></td>\n"; echo " \n"; echo " \n"; echo " </tr>\n"; echo "</table>\n"; // now you can display the results returned while ($row= mysql_fetch_array($result)) { $title = $row['certificate_no']." ".$row['serail_no']. "".$row['roll_no']. " " . $row['student_name']. " " .$row['date_of_birth']. " " .$row['issue_date']." ". $row['course_name'];
echo "\n"; echo "\n"; echo "<table width='960px' border='1' cellspacing='0' cellpadding='0' bgcolor='#FF6600' style='table-layout:fixed'>\n";
echo " <col width='90px'/>"; echo"<col width='90px'/>"; echo"<col width='90px'/>"; echo " <col width='90px'/>"; echo"<col width='90px'/>"; echo"<col width='90px'/>"; echo " <col width='90px'/>"; echo"<col width='90px'/>"; echo"<col width='90px'/>"; echo " <col width='90px'/>"; echo " <col width='90px'/>"; echo " <col width='90px'/>"; echo " <col width='90px'/>";
echo " <tr bgcolor='#99CCCC' >\n"; echo " <td >$row[l_no]</td>\n"; echo " <td>$row[acc_no]</td>\n"; echo " <td >$row[clientname]</td>\n"; echo " <td >$row[address]</td>\n"; echo " <td >$row[planno]</td>\n"; echo " <td >$row[nomineename]</td>\n"; echo " <td >$row[mcode]</td>\n"; echo " <td >$row[mathruitydate]</td>\n"; echo " <td >$row[mantourityamount]</td>\n"; echo " <td >$row[rate]</td>\n"; echo " <td ><a href='delete_regupdate.php?ID=" .$row[ID]. "'>Delete</a></td>\n";
echo " </tr>\n";
echo "</table>\n"; $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
?>
</td> </tr> <tr> <td><?php include('footer.php'); ?></td> </tr> </table>
</body></center> </html> <form action=""> <input type="button" name="printbutton" value="Print List" onClick="return print1('print2')"/> </form>
|