📄 install.php
字号:
<?php
/*
* ===========================================
小月(网名)
QQ:117115
email:xyh@51hl.com
http://xyh.28k.net
本程序免费,你可以做出相应修改,但请保留小月字样,及连接,本程序作者冰雨盟QQ:199117
* ===========================================
*/
if(file_exists("config.php")){echo"小月图片程式已经安装完成,<br>若要重新安装,请用FTP删除本目录下的config.php配置文件后再运行install.php<br>若有问题,请联系小月,QQ:117115";exit;}
function readfromfile($file_name) {
global $readno;
$readno++;
$filenum=@fopen($file_name,"r");
flock($filenum,LOCK_SH);
$file_data=fread($filenum,filesize($file_name));
fclose($filenum);
return $file_data;
}
function writetofile($file_name,$data,$method="w") {
global $writeno;
$writeno++;
$filenum=@fopen($file_name,$method);
flock($filenum,LOCK_EX);
$file_data=fwrite($filenum,$data);
fclose($filenum);
return $file_data;
}
$correct='<font color=blue>OK</font>';
$incorrect='<font color=red>不行,检测不通过</font>';
$check=1;
if(empty($step)) $step=0;
if($step==0){
$body="欢迎小月图片管理程序<br><br><br><br>小月(网名)<br>QQ:117115<br>email:xyh@51hl.com<br>http://xyh.28k.net<br><br><br><br>";
$step_="<a href=install.php?step=1>点此进入下一步</a>";
}
elseif($step==1){
$body="检查程序组件完整<br><br><br>";
$filestocheck=array(
'index.php','global.php','display.php','readpic.php','search.php','smallpic.php','test.php','admin.php');
$count=count($filestocheck);
for ($i=0; $i<$count; $i++) {
$body.= "$filestocheck[$i] ....... ";
if (file_exists($filestocheck[$i])) $body.= $correct;
else { $body.= $incorrect; $check=0; }
$body.= "<br>";
}
$body.= "<br><br>";
if($check==1)$step_="<a href=install.php?step=2>点此进入下一步</a>";else $step_="请检查程序的完整性";
}
elseif($step==2){
$body="检查程序根目录是否可写入<br><br>";
$body.= "程序根目录 ....... ";
if ($fp=fopen('test.test',"w")) {$body.= $correct; fclose($fp);}
else { echo $incorrect; $check=0; }
$body.= "<br>TMP目录 ....... ";
if(is_writable("tmp")){$body.= $correct; }
else { echo $incorrect; $check=0; }
$body.= "<br>";
unlink('test.test');
if($check==1)$step_="<a href=install.php?step=3>点此进入下一步</a>";else $step_="请检查根目录属性,设为0777";
}
elseif($step==3){
$body="输入相关配置参数<br><br>
<FORM action=install.php method=post>
<TABLE borderColor=#c0c0c0 cellSpacing=5 cellPadding=0 width=\"100%\" border=0>
<TBODY>
<TR>
<TD width=\"30%\">站点名称:</TD>
<TD width=\"70%\"><INPUT value=\"小月的图片\" name=set[3]></TD></TR>
<TR>
<TD width=\"30%\">上传的图象路径:</TD>
<TD width=\"70%\"><INPUT value=\"images/\" name=set[4]>记得最后加上/</TD></TR>
<TR>
<TD width=\"30%\">允许上传最大文件:</TD>
<TD width=\"70%\"><INPUT value=\"400\" name=set[10] size=6>K</TD></TR>
<TR>
<TD width=\"30%\">模块路径:</TD>
<TD width=\"70%\"><INPUT value=\"bym\" name=set[12]>最后不要加/</TD></TR>
<TR>
<TD width=\"30%\">多长时间为在线:</TD>
<TD width=\"70%\"><INPUT value=\"1800\" name=set[6]>(时间单位为:秒) </TD></TR>
<TR>
<TD width=\"30%\">每页的分类个数:</TD>
<TD width=\"70%\"><INPUT value=\"4\" name=set[7]></TD></TR>
<TR>
<TD width=\"30%\">每页的图片个数:</TD>
<TD width=\"70%\"><INPUT value=\"4\" name=set[8]></TD></TR>
<TR>
<TD width=\"30%\">预防恶意刷新时间 </TD>
<TD width=\"70%\"><INPUT value=\"2\" name=set[5]>(时间单位为:秒)</TD></TR>
<TR>
<TD width=\"30%\">显示最热图片数 </TD>
<TD width=\"70%\"><INPUT value=\"30\" name=set[11]></TD></TR><TR>
<TD width=\"30%\"> </TD>
<TD width=\"70%\"></TD></TR>
<TR>
<TD width=\"100%\" colSpan=2><A href=\"test.php\" target=_blank>点击这里测试你的GD环境</A>,如果显示“OK”字样,您可以启用以下功能。</TD></TR>
<TR>
<TD width=\"100%\" colSpan=2>
<TR>
<TD width=\"30%\">启用GD库支持:</TD>
<TD width=\"70%\"><INPUT value=\"enable\" name=set[9]> [enable/disable]</TD></TR>
<TR>
<TD width=\"30%\"> </TD>
<TD width=\"70%\"></TD></TR>
<TR>
<TD width=\"30%\"><font color=red>管理员名称 </font></TD>
<TD width=\"70%\"><INPUT value=\"admin\" name=set[1]></TD></TR>
<TR>
<TD width=\"30%\"><font color=red>管理员密码 </font></TD>
<TD width=\"70%\"><INPUT value=\"\" name=set[2]><br>密码用MD5加密的,请记住你的密码</TD></TR>
</TBODY></TABLE>
<P><INPUT type=hidden value=4 name=step><INPUT type=hidden value=option name=action> <INPUT type=submit value=点此进入下一步> </FORM></P><BR>";
}
elseif($step==4){
if(!$set[1]) {echo"请填写完整";exit;}
if(!$set[2]) {echo"请填写完整";exit;}
if(!$set[3]) {echo"请填写完整";exit;}
if(!$set[4]) {echo"请填写完整";exit;}
if(!$set[5]) {echo"请填写完整";exit;}
if(!$set[6]) {echo"请填写完整";exit;}
if(!$set[7]) {echo"请填写完整";exit;}
if(!$set[8]) {echo"请填写完整";exit;}
if(!$set[9]) {echo"请填写完整";exit;}
if(!$set[10]) {echo"请填写完整";exit;}
if(!$set[11]) {echo"请填写完整";exit;}
if(!$set[12]) {echo"请填写完整";exit;}
if(!file_exists("style/".$set[12])) {echo"模块不存在";exit;}
$set[2]=md5($set[2]);
$filecontent="<?
\$adminidL='$set[1]';
\$adminpwdL='$set[2]';
\$title='$set[3]';
\$picpath='$set[4]';
\$refresh_allowed=$set[5];
\$online_limit=$set[6];
\$perpage1=$set[7];
\$perpage2=$set[8];
\$negdsupport='$set[9]';
\$max_upload_size=$set[10];
\$hot_view_no=$set[11];
\$style='$set[12]';
";
writetofile("config.php",$filecontent);
if(!mkdir("$set[4]", 0777)) {$body="建立目录不成功,请自己建立$set[4],并设为0777<br><br>";
}
if (!is_writable($set[4])) $body.="目录{$set[4]}不能写入,请设置属性0777<br><br>";
$body.="参数设置完成<br><br>";
$step_="<a href=admin.php>安装完成,点此进入管理中心</a>";
}
$color[0]='blue';
$color[1]='blue';
$color[2]='blue';
$color[3]='blue';
$color[4]='blue';
$color[$step]='red';
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>小月图片,安装程式</title>
<style>
<!--
body { font-size: 9pt; color: #000000 }
table { font-size: 9pt; color: #000000 }
a { color: #000000; text-decoration: none }
-->
</style>
<style fprolloverstyle>A:hover {color: #FF0000}
</style>
</head>
<!--<BODY oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onmouseover="window.status='www.28k.net'; return true" scroll=yes topmargin="0" leftmargin="0" bgcolor="#F7F7F7">
<NOSCRIPT><IFRAME SRC=*.html></IFRAME></NOSCRIPT>-->
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="768" id="AutoNumber1">
<tr>
<td width="100%"><img border="0" src="img/banner.gif" width="768" height="40"></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="768" id="AutoNumber2" background="img/spacer1.gif" height="1">
<tr>
<td width="100%"><spacer type=block width=1></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="768" id="AutoNumber3" height="5" bgcolor="#C0C0C0">
<tr>
<td width="100%"><spacer type=block width=1></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="768" id="AutoNumber4" height="1" background="img/spacer1.gif">
<tr>
<td width="100%"><spacer type=block width=1></td>
</tr>
</table>
</center>
</div>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="768" id="AutoNumber5" align="center">
<tr>
<td width="1" background="img/spacer2.gif"> </td>
<td width="226" valign="top">
<p align="center"><br><br>
<table width="90%" border="0" cellspacing="1" cellpadding="0" align=center bgcolor="#868f98" >
<tr >
<td height="22" width="100%" align=left><font color=#292929> 小月图片程序</font>
</td>
</tr>
<tr><td valign="top" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr bgcolor=#ffffff>
<td valign="top" height="422">
<br><br>安装进程:
<br><br><br><p>
<font color=<?=$color[0]?>>第一步:欢迎语</font></p><p>
<font color=<?=$color[1]?>>第二步:检查程序组件完整</font></p><p>
<font color=<?=$color[2]?>>第三步:检查根目录是否可写</font></p><p>
<font color=<?=$color[3]?>>第四步:输入相关配置参数</font></p><p>
<font color=<?=$color[4]?>>第五步:安装完成</font></p>
</td></tr>
</table>
</td></tr></table>
</p>
</td>
<td width="1" background="img/spacer2.gif"></td>
<td width="10"> </td>
<td width="513" valign="top"><p><br>
小月图片程序,安装程式
<hr color="#C0C0C0" align="left" width="96%" size="1">
<?=$body?>
<hr color="#C0C0C0" align="left" width="96%" size="1">
<p align="right"><?=$step_?><span lang="zh-cn"> </span>
</p>
</p>
</p>
</td>
<td width="1" background="img/spacer2.gif"> </td>
</tr>
</table>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="768" id="AutoNumber6" background="img/spacer1.gif" height="1">
<tr>
<td width="100%"><spacer type=block width=1></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="768" id="AutoNumber7" bgcolor="#C0C0C0" height="5">
<tr>
<td width="100%"><spacer type=block width=1></td>
</tr>
</table>
</center>
</div>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="768" id="AutoNumber8" align="center">
<tr>
<td width="100%" background="img/spacer1.gif" height="1"><spacer type=block width=1></td>
</tr>
<tr>
<td width="100%"><img border="0" src="img/footer.gif" width="768" height="20"></td>
</tr>
<tr>
<td width="100%" bgcolor="#FFFFFF" height="1"><spacer type=block width=1></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="768" id="AutoNumber9" bgcolor="#000000" height="1" align="center">
<tr>
<td width="100%"><spacer type=block width=1></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -