login.php
==
<!-------------------------------------------
Admin-panel for Chevereto [NB 1.91] (
http://www.chevereto.com)
Version: 1.2
Creative Commons (CC) 2010 by SunLord
Web:
http://sunlord.ru
Email: lapenkoff@gmail.com
ICQ: 2643333
Skype: sunlord.ru
modded by Bonkaz
Web:
www.gigabitcomputers.com.au
Email: mr5_litre@hotmail.com
------------------------------------------->
<?php
include("func.php");
$errno = 0;
$file = "install.php";
$page .="<html><head>
<meta http-equiv='Content-type' content='text/html; charset=windows-1251'>
<link href='./style.css' rel='stylesheet' type='text/css' />
<link href='../estilo.css' rel='stylesheet' type='text/css' />
<title>Administration</title>
</head>
<body bgcolor=#ffffff text=#555555>
<div id='top'>
<center><a href='index.php'><img src='../site-img/logo.png' alt=APP_NAME /></a></center>
</div>";
$errno = file_check($file);
if ($errno != 0)
{
$page .="<table cellpadding=10 cellspacing=0 border=0 align=center>
<tr>
<td align=center>".errchk($errno)."</td>
</tr>
</table>";
}
$page .="<form name=form1 action=dologin.php method=post>
<table cellpadding=10 cellspacing=0 border=0 align=center>
<tr>
<td colspan=2 align=center>管理員登入介面</td>
</tr>
<tr>
<td>使用者名稱:</td>
<td><input type=text name='uname'></td>
</tr>
<tr>
<td>密碼:</td>
<td><input type=password name='upass'></td>
</tr>
<tr>
<td></td>
<td>
<input type=submit value=' 登入 ' class=i name=login>
</td>
</tr>
</table>
</form>
</body>";
render($page);
?>
===
browse.php
===
<center><p><a href="./?op=browse"><?echo NEWS;?></a>
| <a href="./?op=browse&sortby=lastviewed&dir=desc"><?echo LAST_VIEWS;?></a>
| <a href="./?op=browse&sortby=views&dir=desc"><?echo TOP;?></a>
| <a href="./?op=browse&sortby=views&dir=asc"><?echo ANTI_TOP;?></a>
| <a href="./?op=browse&sortby=size&dir=asc"><?echo LIGHT;?></a>
| <a href="./?op=browse&sortby=size&dir=desc"><?echo HEAVY;?></a>
</p>
</center>
<?
$sortby=$_GET["sortby"];
$dir=$_GET["dir"];
$sqlorder="created";
$sqlsort="desc";
switch($sortby) {
case "lastviewed": $sqlorder="lastviewed"; break;
case "views": $sqlorder="views"; break;
case "size": $sqlorder="picfsize"; break;
default: break;
}
switch($dir) {
case "desc": $sqlsort="desc"; break;
case "asc": $sqlsort="asc"; break;
default: break;
}
$onpage=20;
$pg=$_GET["pg"];
if(!is_numeric($pg)) $pg=0;
$start=$pg*$onpage;
$req=mysql_query("select count(*) from pics");
$r=mysql_fetch_row($req);
$total=$r[0];
$req=mysql_query("select * from pics
order by $sqlorder $sqlsort
limit $start,$onpage");
//make a page navigator
$pages=$total/$onpage;
$nav="";
if($pages>=1) {
for($i=0; $i<$pages; $i++) {
$c=$i+1;
if($pg==$i) {
$nav.="<span class=thispage>$c</span> ";
} else {
$nav.="<span class=page><a href='./?op=browse&pg=$i&sortby=$sortby&dir=$dir'>$c</a></span> ";
}
}
}
if($nav) $nav="<center><p><?echo PAGES;?>: $nav</p></center>";
//------------------------------------------
if(mysql_num_rows($req)==0) die(NO_IMAGES);
echo $nav;
$bounce=0;
while($r=mysql_fetch_assoc($req)) {
$r['title']=htmlspecialchars($r['title'],ENT_QUOTES);
$created=date("d-m-Y H:i",$r['created']);
$lastv=$r['lastviewed']?date("d-m-Y H:i",$r['lastviewed']):"N/A";
$size=round($r['picfsize']/1024);
$ip=$r['submitip'];
?>
<table width=100% border=0 cellpadding=10 cellspacing=0>
<tr<?=$bounce?"":" bgcolor=#eeeeee";?>>
<td nowrap class=sm>
<a href="<?=$conf["site_url"]?>/?v=<?=$r['uniqid']?>" target=_blank><img src="<?=$conf["site_url"]."/thumbs";?>/<?=$r['uniqid']?>" border=0 width="<?=$conf["thumb_width"]?>" height="<?=$conf["thumb_height"]?>"></a><br>
<a href="./?op=delpic&id=<?=$r['uid']?>" style="color:red"> [X] 刪除 </a>
</td><td width=100% valign=top class=sm>
<b><?=$r['uniqid']?></b><br/><br/>
<?=$r['pic_width']?>x<?=$r['pic_height']?> <?=$size?>K<br/>
<?echo UPLOAD_DATE;?>: <?=$created?> / IP: <?=$ip?><br>
<?echo LAST_VIEW;?>: <?=$lastv?><br>
<?echo VIEWS;?>: <?=$r['views']?><br>
</td></tr></table>
<?
$bounce ^=1;
}
echo $nav;
?>