| 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/myoffice/2565/modules_22222/usersch/ |
Upload File : |
<?
CheckUsersch($_SESSION['usersch_user'], $_SESSION['usersch_pwd']);
?>
<link href="style_web.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<?
class Paginator{
var $items_per_page;
var $items_total;
var $current_page;
var $num_pages;
var $mid_range;
var $low;
var $high;
var $limit;
var $return;
var $default_ipp;
var $querystring;
var $url_next;
function Paginator()
{
$this->current_page = 1;
$this->mid_range = 7;
$this->items_per_page = $this->default_ipp;
$this->url_next = $this->url_next;
}
function paginate()
{
if(!is_numeric($this->items_per_page) OR $this->items_per_page <= 0) $this->items_per_page = $this->default_ipp;
$this->num_pages = ceil($this->items_total/$this->items_per_page);
if($this->current_page < 1 Or !is_numeric($this->current_page)) $this->current_page = 1;
if($this->current_page > $this->num_pages) $this->current_page = $this->num_pages;
$prev_page = $this->current_page-1;
$next_page = $this->current_page+1;
if($this->num_pages > 10)
{
$this->return = ($this->current_page != 1 And $this->items_total >= 10) ? "<a class=\"paginate\" href=\"".$this->url_next.$this->$prev_page."\">« ย้อนกลับ</a> ":"<span class=\"inactive\" href=\"#\">« ย้อนกลับ</span> ";
$this->start_range = $this->current_page - floor($this->mid_range/2);
$this->end_range = $this->current_page + floor($this->mid_range/2);
if($this->start_range <= 0)
{
$this->end_range += abs($this->start_range)+1;
$this->start_range = 1;
}
if($this->end_range > $this->num_pages)
{
$this->start_range -= $this->end_range-$this->num_pages;
$this->end_range = $this->num_pages;
}
$this->range = range($this->start_range,$this->end_range);
for($i=1;$i<=$this->num_pages;$i++)
{
if($this->range[0] > 2 And $i == $this->range[0]) $this->return .= " ... ";
if($i==1 Or $i==$this->num_pages Or in_array($i,$this->range))
{
$this->return .= ($i == $this->current_page And $_GET['Page'] != 'All') ? "<a title=\"Go to page $i of $this->num_pages\" class=\"current\" href=\"#\">$i</a> ":"<a class=\"paginate\" title=\"Go to page $i of $this->num_pages\" href=\"".$this->url_next.$i."\">$i</a> ";
}
if($this->range[$this->mid_range-1] < $this->num_pages-1 And $i == $this->range[$this->mid_range-1]) $this->return .= " ... ";
}
$this->return .= (($this->current_page != $this->num_pages And $this->items_total >= 10) And ($_GET['Page'] != 'All')) ? "<a class=\"paginate\" href=\"".$this->url_next.$next_page."\">ถัดไป »</a>\n":"<span class=\"inactive\" href=\"#\">» ถัดไป</span>\n";
}
else
{
for($i=1;$i<=$this->num_pages;$i++)
{
$this->return .= ($i == $this->current_page) ? "<a class=\"current\" href=\"#\">$i</a> ":"<a class=\"paginate\" href=\"".$this->url_next.$i."\">$i</a> ";
}
}
$this->low = ($this->current_page-1) * $this->items_per_page;
$this->high = ($_GET['ipp'] == 'All') ? $this->items_total:($this->current_page * $this->items_per_page)-1;
$this->limit = ($_GET['ipp'] == 'All') ? "":" LIMIT $this->low,$this->items_per_page";
}
function display_pages()
{
return $this->return;
}
}
?>
<html>
<head>
</head>
<body>
<link href="style_web.css" rel="stylesheet" type="text/css">
<TABLE cellSpacing=0 cellPadding=0 width=100% height=400 align="center"border=0>
<TBODY>
<TR>
<TD align="center" vAlign=top></a> <FONT COLOR=blue><b>จัดการผู้อำนวยการโรงเรียน<?=$arr[usersch][name];?> </FONT>
<BR><div align="left">
<!---
<a href="?name=usersch&file=usersch_school&op=user_add&sangkad=<?=$arr[usersch][id];?>"><img src="images/admin/user.gif" border="0" align="absmiddle" /> เพิ่มผู้ใช้ใหม่</a>
<a href="?name=approvalkru&file=adeet&sangkad=<?=$arr[usersch][id];?>"><img src="images/admin/user.gif" border="0" align="absmiddle" /> จัดการบุคลากรในอดีต</a></div></b>
--->
<table width="100%" cellspacing="2" cellpadding="1" >
<tr bgcolor="#99ccff" height="25">
<td align="center">แก้ไข</font></div></td>
<td align="center"><b>ที่</b></td>
<td align="center">ชื่อผู้ใข้</td>
<td align="center">ชื่อ - นามสกุล</td>
<td align="center">ตำแหน่ง</td>
<td align="center">ลายเซ็น</td>
<td align="center">จัดการลายเซ็น</font></div></td>
<td align="center">การใช้</font></div></td>
</tr>
<?
// CheckUser($_SESSION['user_user']);
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$res[usersch] = $db->select_query("SELECT * FROM ".TB_usersch." WHERE username='".$_SESSION['usersch_user']."' ");
$arr[usersch] = $db->fetch($res[usersch]);
//แสดงบทความ
if($_GET[sangkad]){
$SQLwhere = " sangkad='".$_GET[sangkad]."' ";
$SQLwhere2 = " WHERE sangkad='".$_GET[sangkad]."' ";
}
$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD);
$limit = 10 ;
$SUMPAGE = $db->num_rows(TB_user,"id","$SQLwhere");
$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[user] = $db->select_query("SELECT * FROM ".TB_user." $SQLwhere2 AND status between 4 and 5 ORDER BY level ASC LIMIT $goto, $limit ");
$count=0;
$i=1;
while($arr[user] = $db->fetch($res[user]))
{
$res[usersch] = $db->select_query("SELECT * FROM ".TB_usersch." WHERE id='".$arr[user][sangkad]."' ");
$arr[usersch] = $db->fetch($res[usersch]);
if ($i%2==0)
{
?><tr bgcolor="#C9FBC8" class="unnamed1"><?
} else {
?><tr bgcolor="#E6FE99" class="unnamed2"><?
} ?>
<td width="50" align="center">
<a href="?name=usersch&file=usersch_school&op=minepass_edit&id=<? echo $arr[user][id];?>"><font color="#FF0000"><img src="images/edits.png" border="0" alt="แก้ไข" /></font></a> </td>
<td width="50" align="center"><? echo"".$i?></td>
<td width="100" ><?echo $arr[user][username];?></td>
<td width="200" ><?echo $arr[user][category_name];?></td>
<td width="250" align="center"><?echo $arr[user][posit];?><?echo $arr[user][school];?></td>
<td width="200" align="center"><img src="laysen/<? echo $arr[user][id];?>.jpg" alt="Not Found!" border="0"></td>
<td width="100" align="center">
<a href="javascript:NewWindow('popup2.php?name=usersch&file=signature2&showedit=<? echo $arr[user][id];?>','acepopup','500','400','center','front');"><font color="#FF0000">เพิ่มแก้ไข</font></a> </td>
<td width="60" align="center">
<?
if(($arr[user][status]==4)OR($arr[user][status]==5)){
?>
<img src="images/icon/check.gif">
<? } ?>
</td>
</tr>
<?
$count++;
$i++;
if (($count%1) == 0) { echo ""; $count=0; }
}
$db->closedb ();
//จบการแสดงข่าวสาร
?>
</table>
</form>
</TD>
</TR>
</TABLE>
<BR>
<table border="0" cellpadding="0" cellspacing="1" width="100%" align=center>
<tr>
<td>
<?
SplitPage($page,$totalpage,"?name=usersch&file=editschool&sangkad=".$_GET[sangkad]."");
echo $ShowSumPages ;
echo $ShowPages ;
?>
</TD>
</TR>
</TABLE>
<!-- Admin -->
</TD>
</TR>
</TBODY>
</TABLE>