国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > PHP > 正文

一個個人網(wǎng)頁自動化生成系統(tǒng)(6)

2024-05-04 23:01:57
字體:
供稿:網(wǎng)友
網(wǎng)站管理,文件名:guanli.php
<html>
<head>
<title>untitled document</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#ffffff" background="image/b-graingr2.jpg">
<table width="775" border="0">
  <tr>  
    <td width="101" height="463" valign="top">  
      <p><img src="http://edu.cnzz.cn/newsinfo/upload/200902/piao.gif" width="103" height="60"></p>
      <p><img src="http://edu.cnzz.cn/newsinfo/upload/200902/a.gif" width="100" height="35"></p>
      <p><a href="muban.php"><img src="http://edu.cnzz.cn/newsinfo/upload/200902/b.gif" width="100" height="35"  border="0"></a></p>
      <p><img src="http://edu.cnzz.cn/newsinfo/upload/200902/c.gif" width="100" height="35"></p>
      <p><img src="http://edu.cnzz.cn/newsinfo/upload/200902/d.gif" width="100" height="35"></p>
      <p><img src="http://edu.cnzz.cn/newsinfo/upload/200902/e.gif" width="100" height="35"></p>
      <p><img src="http://edu.cnzz.cn/newsinfo/upload/200902/f.gif" width="100" height="35"></p>
    </td>
    <td width="663" height="463" valign="top">
      <table width="95%" border="0" align="center" height="234">
        <tr>  
          <td height="43">  
            <div align="center"><b><font color="#480000" size="6">頁面管理</font></b></div>
          </td>
        </tr>
        <tr valign="top">  
          <td height="267">
           
           
       

<?php
// 程序開始    
$db = mysql_connect("localhost", "root");

mysql_select_db("study",$db);
// 判斷是不是修改文件
if ($submit) {



  

    $sql = "update wenzhang set timu='$timu',zuozhe='$zuozhe',
    laiyuan='$laiyuan',textt='$textt' where id=$id";


   
  // 向數(shù)據(jù)庫發(fā)出sql命令

  $result = mysql_query($sql);
// 文章生成
$t = date("y-m-d h:i:s");
$muoban1 = fopen("muoban1.txt","r");
$muoban2 = fopen("muoban2.txt","r");  
$muoban3 = fopen("muoban3.txt","r");
$qita = "<p><table width="75%" border="0" align="center">
  <tr>  
    <td class=p9>  
      <div align="center">作者:<font color="#306800">$zuozhe</font> 來源:<font color="#306800">$laiyuan</font>  
        時間:<font color="#336600">$t</font> </div>
    </td>
  </tr>
</table></p>";
$muoban4=fread($muoban1,1000);
$muoban5=fread($muoban2,1000);
$muoban6=fread($muoban3,1000);
fclose($muoban1);
fclose($muoban2);
fclose($muoban3);
$main="$muoban4 $timu $qita $muoban5 $textt $muoban6";
// 文章生成
$ttt=".html";
$n=$id.$ttt;
$f = fopen($n,"w");
fwrite($f,$main);
fclose($f);
   
  echo "記錄修改成功!<p>";
   
   
   

}  

// 我們是否進(jìn)入編輯修改狀態(tài)
  if ($id) {


    // 我們是在編輯修改狀態(tài),因些選擇一條記錄

    $sql = "select * from wenzhang where id=$id";

    $result = mysql_query($sql);

    $myrow = mysql_fetch_array($result);

    $id = $myrow["id"];

    $timu = $myrow["timu"];

    $zuozhe = $myrow["zuozhe"];

    $laiyuan = $myrow["laiyuan"];

    $textt = $myrow["textt"];


    // 顯示id,供用戶編輯修改


$fom1="<form method="post" action="$path_info">
    <input type=hidden name="id" value="$id">

    

   


  <table width="97%" border="0" align="center">
    <tr>  
      <td width="53">標(biāo)題:</td>
      <td colspan="3">  
        <input type="text" name="timu" value=" $timu " size="50">
      </td>
    </tr>
    <tr>  
      <td width="53" height="28">作者:</td>
      <td width="154" height="28">  
        <input type="text" name="zuozhe" value=" $zuozhe " size="20">
      </td>
      <td width="59" height="28">來源:</td>
      <td width="456" height="28">  
        <input type="text" name="laiyuan" value=" $laiyuan " size="20">
      </td>
    </tr>
    <tr>  
      <td width="53">正文:</td>
      <td colspan="3">  
        <textarea name="textt" cols="60" rows="10">$textt</textarea>
      </td>
    </tr>
    <tr>
      <td width="53">&nbsp;</td>
      <td colspan="3">
         <input type="submit" name="submit" value="輸入信息">
      </td>
    </tr>
  </table>

  </form>";
echo $fom1;
}  
if (!$id) {

     
    // 如果不是修改狀態(tài),則顯示員工列表

    $result = mysql_query("select * from wenzhang",$db);
printf("<ul>");
    while ($myrow = mysql_fetch_array($result)) {

      printf("<li><a href="%s.html">%s</a> n",  
       $myrow["id"], $myrow["timu"]);

  printf("<a href="%s?id=%s">(修改)</a><br></li>", $path_info, $myrow["id"]);

    }
    printf("</ul>"); }
// 程序結(jié)束     
    ?>
     
     </td>
        </tr>
        <tr>  
          <td height="32">
            <div align="right"><a href="input.php"><img src="http://edu.cnzz.cn/newsinfo/upload/200902/add.gif" width="80" height="43" border="0"></a></div>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>  

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 沙雅县| 濮阳县| 平定县| 高阳县| 乡城县| 嘉禾县| 武川县| 吉林省| 襄垣县| 闵行区| 开江县| 芦山县| 衡山县| 绵阳市| 金寨县| 公安县| 米脂县| 镇远县| 梓潼县| 海兴县| 阿拉尔市| 桃园县| 昭平县| 五大连池市| 车险| 余姚市| 高唐县| 阿克苏市| 准格尔旗| 常德市| 泗洪县| 桐城市| 裕民县| 石阡县| 杭州市| 泌阳县| 绥德县| 囊谦县| 江城| 无极县| 交口县|