| Server IP : 172.67.187.206 / Your IP : 172.71.28.156 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : E:/Inetpub/www/myschool/triamudom/check/information/ |
Upload File : |
<?php
@session_start();
$path = "../";
include ($path.'include/config_db.php');
include ($path.'include/class_db.php');
include ($path.'include/class_display.php');
include ($path.'include/function.php');
//include ('barcode.php');
$CLASS['db'] = new db();
$CLASS['db']->connect();
$CLASS['disp'] = new display();
$db = $CLASS['db'];
$disp = $CLASS['disp'];
$tb_student_degree = $_REQUEST['tb_student_degree'];
$link_value = $_REQUEST['link_value'];
$link_value = "&tb_student_degree=".$tb_student_degree;
//--------------------ส่วนบนใช้สำหรับประกาศตัวแปรและ Config เท่านั้น----------------------------//
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>รายชื่อนักเรียนระดับชั้นมัธยมศึกษาปีที่ <?php if($tb_student_degree !=""){ print $disp->display_roomname($tb_student_degree);}else{ print "-";}?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- FAVICON-->
<!-- Css styles -->
<link href="css/main.css" rel="stylesheet">
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/jquery.scrollTo-1.4.2-min.js"></script>
<script src="js/jquery.localscroll-1.2.7-min.js"></script>
<script src="js/jquery.mobilemenu.js"></script>
<script src="js/custom.js"></script>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style type="text/css">
body,td,th {
font-family: TH SarabunPSK;
}
a:link {
color: #666666;
text-decoration: none;
}
body {
background-color: #FFF;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.style1 {
font-size: 24px;
font-weight: bold;
}
.style2 { font-size: 18px;
font-weight: bold;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr class="style2">
<td align="center"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100%" valign="top"><?php
//set the number of columns
$columns =2;
// $sql_limit_q = "limit 4";
$page_size = 10;
if ($PAGE =="" || $PAGE =="0" ) {
$PAGE=1;
}
$goto = ($PAGE-1)*$page_size;
$limit = "limit $goto , $page_size";
$sql_dis_pro="select * from tb_students where tb_student_degree='".$tb_student_degree."' order by tb_student_code asc ".$limit;
$sql_dis_pro_all="select * from tb_students where tb_student_degree='".$tb_student_degree."' order by tb_student_code asc ";
$query_dis_pro = $db->query($sql_dis_pro);
//we add this line because we need to know the number of rows
$num_dis_pro = $db->num_rows($query_dis_pro);
?>
<table width="100%" border="0" cellspacing="5" cellpadding="5">
<?
//changed this to a for loop so we can use the number of rows
for($i = 0; $i < $num_dis_pro; $i++) {
$fetch_dis_pro = $db->fetch_array($query_dis_pro);
if($i % $columns == 0) {
//if there is no remainder, we want to start a new row
echo "<TR>\n";
}
?>
<td><table width="300" border="0" align="center" cellpadding="0" cellspacing="0" background="card300.jpg">
<tr>
<td width="23%" align="center" valign="top" nowrap><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"> </td>
</tr>
<tr>
<td align="center"><span class="style1">ชื่อ <?php print display_nametype($fetch_dis_pro['tb_student_tname']);?><?php print $fetch_dis_pro['tb_student_name'];?> <?php print $fetch_dis_pro['tb_student_sname'];?></span></td>
</tr>
<tr>
<td align="center"><span class="style1">รหัสประจำตัว <?php print $fetch_dis_pro['tb_student_code'];?></span></td>
</tr>
<tr>
<td class="style1"> </td>
</tr>
<tr>
<td class="style1"><img src="barcode.php?text=<?php print $fetch_dis_pro['tb_student_code'];?>" /></td>
</tr>
</table></td>
</tr>
</table></td>
<? if(($i % $columns) == ($columns - 1) || ($i + 1) == $num_dis_pro) {
//if there is a remainder of 1, end the row
//or if there is nothing left in our result set, end the row
echo "</TR>\n";
}
}
?>
</table></td>
</tr>
</table></td>
</tr>
<tr class="style2">
<td width="112%" align="center">หน้า : <?php print $disp->ctrl_page_design_limit_show($sql_dis_pro_all ,10,$page_size,"red","blue"," / ",$link_value);?></td>
</tr>
</table>
</body>
</html>