|
|
|
ผมต้องการแบ่งจำนวนหน้าต้องเขียนเพิ่มตรงไหนครับ ขอตัวอย่างเลยนะครับ |
|
|
|
|
|
|
|
Code (PHP)
<?
session_start();
include('connectdb.php');
include('config.php');
include('function.php');
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title><?=$web_title;?></title>
<style type="text/css">
<!--
.style4 {font-size: 16px}
.style5 {font-size: 13px}
.style8 {font-size: 17px; }
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
</head>
<body>
<div align="center" style="height:1320px;">
<table border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" align="center" width="900px">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="center" valign="top"> <span class="style8"><span class="style8"><font size="5" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">
<?
$sql = "select distinct av_subject,av_detail,av_datestart from activities where av_id='".$cat."'";
$qry = mysql_query($sql);
$rs = mysql_fetch_object($qry);
$av_subject = $rs -> av_subject;
$av_detail = $rs-> av_detail;
$av_datestart = $rs-> av_datestart;
?>
บัญชีลงเวลา <font size="5" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">
<?=$av_subject; ?>
</font></font><br>
<font size="5" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">
<?=$av_detail;?></font>
<br><font size="5" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">
</font><font size="5" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">
<?
if($av_datestart==$av_dateend){
echo dbtothaidate($av_datestart);
} else {
$d1 = substr($av_datestart,8,2);
$d2 = substr($av_dateend,8,2);
$m1 = substr($av_datestart,5,2);
$m2 = substr($av_dateend,5,2);
$y1 = substr($av_datestart,0,4);
$y2 = substr($av_dateend,0,4);
if($m1==$m2 && $y1==$y2){
echo "วันที่ ". ($d1+0)." ". $thaimonth[$m1-1]. " พ.ศ. ". ($y1+543);
} else {
echo "วันที่ ".($d1+0)." ".$thaimonth[$m1-1]. " พ.ศ. ". ($y1+543);
}
}
?>
</font></font></span></span></td>
</tr>
</table>
<table width="100%" border="1" align="left" cellpadding="8" cellspacing="0" bordercolor="#999999">
<tr>
<td align="center" bgcolor="#FFCC99" width="20" ><span class="style4" ><font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">ที่</font></span></td>
<td align="center" bgcolor="#FFCC99" width="170"><span class="style4"><font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">ชื่อ-สกุล</font></span></td>
<td width="199" align="center" bgcolor="#FFCC99"><span class="style4"><font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">โรงเรียน</font></span></td>
<td width="64" align="center" bgcolor="#FFCC99"><span class="style4"><font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">เวลามา</font></span></td>
<td align="center" bgcolor="#FFCC99" width="69"><span class="style4"><font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">ลายมือชื่อ</font></span></td>
<td align="center" bgcolor="#FFCC99" width="63"><span class="style4"><font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">เวลากลับ</font></span></td>
<td align="center" bgcolor="#FFCC99" width="77"><span class="style4"><font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">ลายมือชื่อ</font></span></td>
<td align="center" bgcolor="#FFCC99" width="92"><span class="style4"><font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC">หมายเหตุ</font></span></td>
</tr>
<?
$schoolsSQL = "select * from students,schools where sch_id=t_schid and t_avid='".$cat."'";
$schoolsQRY = mysql_db_query($dbname, $schoolsSQL);
$s=0;
while($schoolsRS = mysql_fetch_object($schoolsQRY)){
$sch_name = $schoolsRS -> sch_name;
$t_name = $schoolsRS -> t_name;
$s++;
?>
<?
} ?>
</table></td>
</tr>
<tr>
<td>
<table width="100%" border="1" align="left" cellpadding="8" cellspacing="0" bordercolor="#999999">
<?
$schoolsSQL = "select * from students,schools where sch_id=t_schid and t_avid='".$cat."'";
$schoolsQRY = mysql_db_query($dbname, $schoolsSQL);
$s=0;
while($schoolsRS = mysql_fetch_object($schoolsQRY)){
$sch_name = $schoolsRS -> sch_name;
$t_name = $schoolsRS -> t_name;
$s++;
?>
<tr valign="top" bgcolor="#FFFFFF" onMouseOver="this.bgColor = '#FFE1FF'" onMouseOut="this.bgColor = '#FFFFFF'">
<td width="20" align=center valign="top"><span class="style5">
<font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC"><?=$s; ?></font>
</span></td>
<td width="170" align="left" valign="top" ><span class="style5">
<font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC"> <?=$t_name; ?></font>
</span> </td>
<td width="199" align="left" valign="top">
<span class="style5">
<font size="4" face="AngsanaUPC, BrowalliaUPC, CordiaUPC"><?=$sch_name; ?></font>
</span></td>
<td width="64" align="left" valign="bottom"><span class="style5"></span></td>
<td valign="bottom" width="69"><span class="style5"><? echo "<hr size=0>"; ?></span></td>
<td valign="bottom" width="63"><span class="style5"></span></td>
<td valign="bottom" width="77"><span class="style5"><? echo "<hr size=0>"; ?></span></td>
<td valign="bottom" width="92"> </td>
</tr>
<?
} ?>
</table>
</td></tr>
</table>
</div>
</body>
</html>
Tag : PHP, Action Script, Ajax, jQuery, CakePHP
|
ประวัติการแก้ไข 2014-09-13 16:55:08
|
|
|
|
|
Date :
2014-09-13 16:53:45 |
By :
phuttawat |
View :
660 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|