@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux adweb87 2.6.32-754.el6.x86_64 #1 SMP Tue Jun 19 21:26:04 UTC 2018 x86_64
Current Path :
/
home
/
sanchung
/
public_html
/
admin
/
_lib
/
Path :
Upload File :
New :
File
Dir
/home/sanchung/public_html/admin/_lib/my_view.php
<? include"../_setup.php"; if(!$_GET[table]){ if(!eregi("adw.co.kr/admin/", $_SERVER[HTTP_REFERER])){ echo"<div style='width:100%; height:100; padding-top:50px; font-size:12px' align='center'>Á¤»óÀûÀÎ Á¢¼ÓÀÌ ¾Æ´Õ´Ï´Ù.</div>"; exit; } } echo" <html> <head> <style> a{color:#333333; text-decoration:none} body {margin:0; padding:0} body, div, table, tr, td {font-size:12px} #top_div {width:1000px; border:5 solid buttonface; text-align:left; padding:8px; line-height:150%; font-weight:bold} #body_div {width:1000px; height:600px; border:5 solid buttonface; text-align:left; padding:0px; overflow:auto} </style> </head> <body> <div align='center'> <div id='top_div'>"; $sql = "show tables"; $res = mysql_query($sql); while($row = mysql_fetch_row($res)){ echo "<a href='?table=$row[0]' "; if($row[0] == $table) echo"style='color:#FF0000'"; echo">$row[0]</a> "; } echo" </div>"; if($table){ echo"<br> <div style='width:1000px; text-align:left'><b>[$table]</b></div> <div id='body_div'> <table cellpadding='3' cellspacing='2' bgcolor='#FFFFFF' border='0'> <tr bgcolor='#EEEEEE' height='28' align='center'>"; $sql = "desc $table"; $res = mysql_query($sql); $tdnum = 0; while($row = mysql_fetch_array($res)){ echo" <td style='padding-left:5px; padding-right:5px'><b>$row[0]</b></td>"; $tdnum++; } echo" </tr>"; $sql = "select count(*) from $table "; $row = mysql_fetch_row(mysql_query($sql)); $total = $row[0]; $item = 25; $pageitem = 10; if(!$page) $page = 1; $start = ($page - 1) * $item; $totalpage = ceil($total / $item); $pnum = $total - (($page-1) * $item); $sql = "select * from $table limit $start, $item"; $res = mysql_query($sql); while($row = mysql_fetch_row($res)){ echo" <tr bgcolor='#F6F6F6' valign='top' height='28'>"; while(list($key, $val) = each($row)){ echo" <td>$val</td>"; } echo" </tr>"; } if(!$total){ echo" <tr bgcolor='#F6F6F6' height='28'> <td colspan='$tdnum'>µî·ÏµÈ ÀÚ·á°¡ ¾ø½À´Ï´Ù</td> <tr>"; } echo" <tr> <td colspan='$tdnum' align='center'>"; $query = "table=$table"; psk_pagelink($totalpage, $pageitem, $page, "", "", $query); echo" </td> </tr> </table> </div>"; } echo" </div> </body> </html>"; function psk_pagelink($totalpage, $pageitem, $page, $left, $right, $query){ Global $PHP_SELF; if($left) $leftb = "<img src='$left' border='0' align='absmiddle'>"; else $leftb = "[PREV]"; if($right) $rightb = "<img src='$right' border='0' align='absmiddle'>"; else $rightb = "[NEXT]"; $linknum = ceil($totalpage / $pageitem); echo"<table cellpadding='0' cellspacing='0' border='0' style='font-size:9pt'><tr>"; $start = (ceil($page / $pageitem) * $pageitem) - ($pageitem - 1); if($start > 1){ $pg = $start - 1; echo "<td width='60' align='center'><a href='$PHP_SELF?page=$pg&$query'>$leftb</a></td>"; } else echo "<td width='60' align='center'>$leftb</td>"; for($i=$start; $i<$start + $pageitem; $i++){ if($i > $totalpage) break; if($i > $start) echo"<td align='center' > / </td>"; if($page == $i) echo"<td style='font-size:9pt; padding:1 5 0 0; color:#FF0000'>$i</td>"; else echo"<td style='font-size:9pt; padding:1 5 0 0;'><a href='$PHP_SELF?page=$i&$query'>$i</a></td>"; } if($i - 1 < $totalpage){ echo "<td width='60' align='center'><a href='$PHP_SELF?page=$i&$query'>$rightb</a></td>"; } else echo "<td width='60' align='center'>$rightb</td>"; echo"</tr></table>"; } ?>