Automated generation system for individual webpages (6)

Source: Internet
Author: User
Website Management, File name: guanli. php & lt; html & gt; & lt; head & gt; & lt; title & gt; UntitledDocument & lt; title & gt; & lt; metahttp-equiv & quot; content-Type & quot; content & quot; texthtml; charsetgb23 website management, file name: guanli. php


Untitled Document









          
 
   


   


   


   


   


   


   


  

   









                                                      
 
      

Page management


     

     
     
   

// Start the program
$ Db = MySQL_connect ("localhost", "root ");

Mysql_select_db ("study", $ db );
// Determine whether the file is modified
If ($ submit ){



 

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


 
// Issue SQL commands to the database

$ Result = mysql_query ($ SQL );
// Document generation
$ T = date ("Y-m-d h: I: s ");
$ Muoban1 = fopen ("muoban1.txt", "r ");
$ Muoban2 = fopen ("muoban2.txt", "r ");
$ Muoban3 = fopen ("muoban3.txt", "r ");
$ Qita ="





       
 
   

Author: $ zuozhe Source: $ laiyuan
Time: $ t


  

";
$ 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 ";
// Document generation
$ Ttt = ". html ";
$ N = $ id. $ ttt;
$ F = fopen ($ n, "w ");
Fwrite ($ f, $ main );
Fclose ($ f );
 
Echo "record modified successfully!

";
 
 
 

}

// Do we enter the editing and modification status?
If ($ id ){


// We are editing the modification status. for some reasons, select a record.

$ 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"];


// Display the id for editing and modification.


$ Fom1 = "";
Echo $ fom1;
}
If (! $ Id ){

  
// If the status is not modified, the employee list is displayed.

$ Result = mysql_query ("SELECT * FROM wenzhang", $ db );
PRintf ("

    ");
    While ($ myrow = mysql_fetch_array ($ result )){

    Printf ("
  • % S n ",
    $ Myrow ["id"], $ myrow ["timu"]);

    Printf ("(Modify)
  • ", $ PATH_INFO, $ myrow [" id "]);

    }
    Printf ("
");}
// End the program
?>
  
  

      


     

  


 

[This article is copyrighted by the author time2 and Osso. if you need to reprint it, please indicate the author and its source]

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.