A personal web page Automation Generation system (6)

Source: Internet
Author: User
Tags modify printf
Website administration, FileName: guanli.php
<title>untitled document</title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">

<body bgcolor= "#FFFFFF" background= "image/b-graingr2.jpg" >
<table width= "775" border= "0" >
<tr>
&LT;TD width= "height=" 463 "valign=" Top ">
<p></p>
<p></p>
<p><a href= "muban.php" ></a></p>
<p></p>
<p></p>
<p></p>
<p></p>
</td>
&LT;TD width= "663" height= "463" valign= "Top" >
<table width= "0" border= "align=" center "height=" 234 ">
<tr>
&LT;TD height= ">"
<div align= "center" ><b><font color= "#480000" size= "6" > Page management </font></b></div>
</td>
</tr>
&LT;TR valign= "Top" >
&LT;TD height= "267" >




<?php
Program start
$db = mysql_connect ("localhost", "root");

mysql_select_db ("study", $db);
Judge whether or not to modify the file
if ($submit) {





$sql = "UPDATE wenzhang SET timu= ' $timu ', zuozhe= ' $zuozhe ',
Laiyuan= ' $laiyuan ', textt= ' $textt ' WHERE id= $id ';



To issue SQL commands to the database

$result = mysql_query ($sql);
Article generation
$t = Date ("y-m-d h:i:s");
$muoban 1 = fopen ("Muoban1.txt", "R");
$muoban 2 = fopen ("Muoban2.txt", "R");
$muoban 3 = fopen ("Muoban3.txt", "R");
$qita = "<p><table width=" 75% "border=" 0 "align=" center ">
<tr>
&LT;TD class=p9>
<div align= "center" > Author: <font color= "#306800" > $zuozhe </font><td width= "154" height= "a" >
<input type= "text" name= "Zuozhe" value= "$zuozhe" size= ">"
</td>
&LT;TD width= "height=" > Source:</td>
&LT;TD width= "456" height= ">"
<input type= "text" name= "Laiyuan" value= "$laiyuan" size= ">"
</td>
</tr>
<tr>
&LT;TD width= ":</td>" > Body
&LT;TD colspan= "3" >
<textarea name= "Textt" cols= "rows=" > $textt </textarea>
</td>
</tr>
<tr>
&LT;TD width= "> </td>"
&LT;TD colspan= "3" >
<input type= "Submit" name= "submit" value= "Input Info" >
</td>
</tr>
</table>

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


If the status is not modified, the list of employees is displayed

$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 "> (Modify) </a><br></li>", $PATH _info, $myrow ["id"]);

}
printf ("</ul>"); }
End of program
?>

</td>
</tr>
<tr>
&LT;TD height= ">"
<div align= "right" ><a href= "input.php" ></a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.