moban.php

来自「仿榕树下文章系统春节版 1. 将makpass.php文件的root_pass修」· PHP 代码 · 共 150 行

PHP
150
字号
<?
include ("admin_log.php");
if ($act=="del") {
  $user_array=file("../data/xq.sty");
  $file_count=count($user_array)-1;
   $fp=fopen("../data/xq.sty", "w");
         flock($fp,3);
              fclose($fp);
  for ($i=0;$i<=$file_count;$i++) {
          $file_new_name=explode("|",$user_array [$i]);
    if ($file_new_name[0]!=$sty){
    $fp=fopen("../data/xq.sty", "a+");
         flock($fp,3);
         fwrite($fp,$user_array[$i]);
         fclose($fp);}
      }
         @unlink("../data/sty/$sty.sty");
         echo "ok";          }
if ($act=="add") {
  $user_array=file("../data/xq.sty");
  $file_count=count($user_array)-1;
  $yz=0;
    for ($counter=$file_count;$counter>=0;$counter--) {
          $file_new_name=explode("|",$user_array[$counter]);
                 if  ($file_new_name[0]==$mod_id)
                $yz=1; }
        if ($yz==0){
         $fp=fopen("../data/xq.sty", "a+");
         flock($fp,3);
         fwrite($fp,"$mod_id|$mod_name|\n");
         fclose($fp);
//////////////////////////////////////////////
$fp=fopen("../data/sty/$mod_id.sty","w");
fwrite($fp, "<?
\$biankuang_color=\"$mod_bk\";
\$main_color=\"$mod_main\";
\$fuse_color=\"$mod_fuse\";
?>");
 fclose($fp);
/////////////////////////////////////////

         echo"yes";
         }
        elseif ($yz==1){
         echo"no";
         exit;
        }

     }

?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<STYLE>
<!--
A:link {text-decoration:none}
A:visited {text-decoration:none}
A:hover {  text-decoration:underline;  color:brown;}
p,br,body,td,table,tr {color:black; font-size:9pt;}
-->
</STYLE>
<body bgcolor="EFEFEF">
<table width=100% cellpadding=6 cellspacing=0 border=0>
  <tr>
    <td bgcolor=#a6a7d9 colspan=2><font color=#FFFFFF> <b> 配色管理</b></font></td>
  </tr>
</table> <br>
<?
//////////////////将所有等待文章读入数组//////////////////////////////////
$user_array=file("../data/xq.sty");
$file_count=count($user_array)-1;

// 文章列表 ------------------------------
echo "&nbsp;<b>已经存在的配色</b><table border=0 width=98% bgcolor=c0c0c0 cellspacing=1 cellpadding=1>";
echo "<TR >";
echo "<TD align=middle width='34%' bgcolor=C0C0C0><b><font color='#800000'><span style=font:9pt>配色名称</span></font></b></TD>";
echo "<TD align=middle width=\"34%\" bgcolor=C0C0C0><b><font color=\"#800000\"><span style=font:9pt>文件名字</span></font></b></TD>";
echo "<TD align=middle width=\"33%\" bgcolor=C0C0C0><b><font color=\"#800000\"><span style=font:9pt></span></font></b></TD>";
echo "</TR>";
#分页显示用户
for ($counter=$file_count;$counter>=0;$counter--) {
  $user_info=explode("|",$user_array[$counter]);
  echo "<TR bgColor=#ffffff>";
  echo "<td bgcolor=efefef align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<IMG border=0 src='../images/dot1.gif'> <span style=font:9pt>$user_info[1]</span></td>";
  echo "<td align=center align=center><span style=font:9pt>$user_info[0].sty</span></td>";
  echo "<td align=center align=center><a href=moban?act=del&id=$counter&sty=$user_info[0]><span style=font:9pt>删除</span><a></td>";
  echo "</TR>";}
echo "</table>";

?>

<br>
 <table width="98%"  border=0 width=98% bgcolor=c0c0c0 cellspacing=1 cellpadding=1>
  <form  method="post" action="moban.php">
  <tr bgcolor="#FFFFFF">
      <td width="34%" bgcolor="C0C0C0">制作配色:</td>
      <td bgcolor=C0C0C0>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="34%" bgcolor="EFEFEF">&nbsp;&nbsp;&nbsp; &nbsp;配色名称:</td>
      <td >
        &nbsp;<input type="text" name="mod_name" size="30" value="">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="34%" bgcolor="EFEFEF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;配色id:</td>
      <td >
        &nbsp;<input type="text" name="mod_id" size="30" value="">*必须是英文字母
      </td>
    </tr>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="34%" bgcolor="EFEFEF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;主色:</td>
      <td>
        &nbsp;<input type="text" name="mod_main" size="30" value="">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="34%" bgcolor="EFEFEF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;附色:</td>
      <td>
        &nbsp;<input type="text" name="mod_fuse" size="30" value="">
      </td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="34%" bgcolor="EFEFEF">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;边框:</td>
      <td>
        &nbsp;<input type="text" name="mod_bk" size="30" value="">
        <input type='hidden' name='act' size='10' value='add' class='input'>

      </td>
    </tr>
       </tr>
    <tr bgcolor="EFEFEF">
      <td colspan="2" align="center">
        <input type="submit" name="Submit" value=" 确定 ">
        <input type=reset value=" 重填 ">
      </td>
    </tr>
  </form>
    </table><br><table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#000000">
    <br>
<table width=100% cellpadding=6 cellspacing=0 border=0>
  <td bgcolor="#a6a7d9"><font color=#FFFFFF><b>程式美化:魔力闪客~~Ten 发布网站:奇迹数码 </b></font>
</table>
    </body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?