?? index.php
字號:
<?php
////////////////////////////////////////////////////////////
//
// LDV個人相冊系統
//
// 阿維設計編寫
//
// 本程序采用文本儲存數據,不需要mysql數據庫支持
//
// 本程序屬于免費程序,可以任意使用、拷貝、傳播,
//
// 版權歸阿維所有
//
// 如果需要修改程序,請事先征得作者同意。
//
// 請務必保留相冊頁面中的作者主頁的鏈接!謝謝!!
//
/////////////////////////////////////////////////////////////
if(!empty($_GET['l'])&&$_GET['l']=="logout")
setcookie("LDValbum","0",time());
include_once"cfg.php";
if(!isset($_GET['adminlog'])||$_GET['adminlog']!=1)
{
if(file_exists($cachefile))
$cache=file($cachefile);
else
{
$fp=fopen($cachefile,"w");
fwrite($fp,"0\n");fwrite($fp,"0\n");fwrite($fp,"0\n");
fclose($fp);
}
if(!file_exists($namefile))
{
$fp=fopen($namefile,"w");
fwrite($fp," ");
fclose($fp);
}
$cache=getcache();
$guestnum=getguestnum();
head();
phpcode();
$rows=ceil($cache[0]/4);
while($rows)
{
echo"<tr height=\"160\">";
$r=4;
if($cache[0]<4)
$r=$cache[0];
for($i=0;$i<$r;$i++)
{
$albumnames=file($namefile);
$n=trim($albumnames[$cache[0]-$i-1]);
$ao=getinfo($n);
$ao[1]=trim($ao[1]);
echo<<<ldv
<td class=inner>
<table width="120" height="140">
<tr>
<td height="110">
<a href="album.php?name=$n"><img src="$ao[3]" width="100" height="90" border="1" color="#F9F9F9" alt="最后更新:$ao[2]圖片總數:$ao[1]"></a>
</td>
</tr>
<tr>
<td>$ao[0]</td>
</tr>
</table>
</td>
ldv;
}
if($rows==1)
if($i%3!=0)
for(;;$i++)
{
echo"<td class=inner> </td>";
if($i%3==0)
break;
}
echo"</tr>";
$rows-=1;
$cache[0]-=4;
}
echo<<<ldv
</table>
</td>
</tr>
<tr>
<td height="25" bgcolor="#F2F4F2" colspan="2">歡迎您,來自IP: $guestnum 的朋友!</td>
</tr>
</table>
ldv;
}
else
{
head();
echo<<<ldv
<center>
<table width="400"><form method=post action="admin.php">
<tr>
<td height="23">相冊管理員登陸</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" height="60">
用戶名:<input type="text" name="un" size="12">
密碼:<input type="password" name="pw" size="12">
</td>
</tr>
<tr>
<td height="23"><input type="submit" value="登陸后臺"> <input type="button" onclick="javascript:window.location='index.php'" value="返回首頁"></td>
</tr></form>
</table>
ldv;
}
PHP_pages();
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -