| 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/saiyokmaneekan/modules/search/ |
Upload File : |
<?
CheckUser($_SESSION['user_user'], $_SESSION['user_pwd']);
?>
<TABLE width=100% border="0" align="left" cellpadding="0" cellspacing="0">
<TR>
<TD Valign="top" >
<?
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE username='".$_SESSION['user_user']."' ");
$arr[user] = $db->fetch($res[user]);
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
if($_GET[year]){
$SQLwhere = " year='".$_GET[year]."' ";
$SQLwhere2 = " WHERE year='".$_GET[year]."' ";
}
$res[tkk2] = $db->select_query("SELECT * FROM ".TB_TKK2." $SQLwhere2 ");
$arr[tkk2] = $db->fetch($res[tkk2]);
$res[category] = $db->select_query("SELECT * FROM ".TB_YEARS_CAT." WHERE name='".$arr[tkk2][year]."' ");
$arr[category] = $db->fetch($res[category]);
?>
<form name="form3" method="post" action="?name=search&file=tabainrubsema&year=<? echo $arr[category][name]; ?>">
<table width=100% border="0" align="left" cellpadding="0" cellspacing="0">
<tr class="unnamed1">
<td align="left" width="60%" class="unnamed2"><A HREF="?name=search&file=from"> <img src="images/back.png" align="absmiddle" ></A> <B>ทะเบียนรับหนังสือราชการ ปี <? echo $arr[category][name]; ?></B></td>
<td width="20%" class="unnamed2"><div align="right"><B>ระบุชื่อหนังสือที่ต้องการคันหา </B> </div></td>
<td align="right" width="15%"><input name="search" type="text" id="search" value="<?=$_GET["search"];?>"></td>
<td width="5%"><div align="right"><input type="submit" name="Submit2" value="ค้นหา"> </div></td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td Valign="top" >
<table width=100% height=500 border="0" align="left" cellpadding="0" cellspacing="0">
<tr >
<td Valign="top" >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#999999" bordercolordark="#FFFFFF">
<tr height=25 bgcolor="#336633">
<td width="5%"align="center"><font color="#FFFFFF"><B>เลขรับ</B></font></td>
<td width="10%"align="center"><font color="#FFFFFF"><B>เลขหนังสือ</B></font></td>
<td width="40%"align="center"><font color="#FFFFFF"><B>เรื่อง</B></font></td>
<td width="10%"align="center"><font color="#FFFFFF"><B>วัน-เดือน-ปี</B></font></td>
<td width="20%"align="center"><font color="#FFFFFF"><B>จาก</B></font></td>
<td width="10%"align="center"><font color="#FFFFFF"><B>ถึง</B></font></td>
<td width="5%"align="center"><font color="#FFFFFF"><B>อ่าน</B></font></td>
</tr>
<?
if($_GET[year]){
$SQLwhere = " year='".$_GET[year]."' ";
$SQLwhere2 = " WHERE year='".$_GET[year]."' ";
}
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$limit = 10 ;
$SUMPAGE = $db->num_rows(TB_TKK2,"id","$SQLwhere and topic like '%$search%' ");
$page=$_GET[page];
if (empty($page)){
$page=1;
}
$rt = $SUMPAGE%$limit ;
$totalpage = ($rt!=0) ? floor($SUMPAGE/$limit)+1 : floor($SUMPAGE/$limit);
$goto = ($page-1)*$limit ;
$res[tkk2] = $db->select_query("SELECT * FROM ".TB_TKK2." $SQLwhere2 and topic like '%$search%' ORDER BY id DESC LIMIT $goto, $limit ");
$count=0;
while($arr[tkk2] = $db->fetch($res[tkk2])){
$res[user] = $db->select_query("SELECT * FROM ".TB_user." WHERE id='".$arr[tkk2][category]."' ");
$arr[user] = $db->fetch($res[user]);
?>
<tr bgcolor="#FFFFFF">
<td align="left"valign="top"> <?echo thainumDigit($arr[tkk2][idtabain]); ?></td>
<td align="left"valign="top">
<?
if($arr[tkk2][tabain]){
?>
<?echo thainumDigit($arr[tkk2][tabain]); ?>
<? } else {echo " ";}?>
</td>
<td align="left"valign="top">
<?
if($arr[tkk2][topic]){
?>
<?echo thainumDigit($arr[tkk2][topic]); ?>
<? } else {echo " <font color=red>หนังสือค้างส่ง</font>";}?>
</td>
<td align="center"valign="top"> <?echo thainumDigit(thai_date_short($arr[tkk2][post_date],'',''));?></td>
<td align="left"valign="top"> <? echo thainumDigit($arr[tkk2][school]); ?></td>
<td align="left"valign="top"> <?=thainumDigit(WEB_AREA);?></td>
<td align="center"valign="top"><A HREF="popup.php?name=tkk2&file=readtkk2&id=<? echo $arr[tkk2][id]; ?> " onclick="return hs.htmlExpand(this, { contentId: 'highslide-html', objectType: 'iframe', objectWidth: 800, objectHeight: 600} )" class="highslide"><img src="images/read.png" width=20></td>
</tr>
<tr>
<td colspan="7" height="1" class="dotline"></td>
</tr>
<?
}
?>
</table>
<?
SplitPage($page,$totalpage,"?name=search&file=tabainrubsema&year=".$arr[category][name]."&search=$search");
echo $ShowSumPages ;
echo $ShowPages ;
?>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>