📄 index.php
字号:
<?php
////////////////////////////////////////////////////////////
//
// LDV个人相册系统
//
// 阿维设计编写
//
// 本程序采用文本储存数据,不需要mysql数据库支持
//
// 本程序属于免费程序,可以任意使用、拷贝、传播,
//
// 版权归阿维所有
//
// 如果需要修改程序,请事先征得作者同意。
//
// 请务必保留相册页面中的作者主页的链接!谢谢!!
//
/////////////////////////////////////////////////////////////
include_once"cfg.php";
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();
if($_GET['l']=="logout")
setcookie("LDValbum","0",time());
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);
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;
}
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;
PHP_pages();
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -