Viii. Publishing Blog

Source: Internet
Author: User
PHP Classic Project Case-(a) blog management system 5

The implementation of this blog post.

Viii. Publishing Blog

(1), Interface realization file.php

 
 

When editing an article, each option uses the JS implementation: Ubbcode.js

Helpstat = False;basic = False;function AddText (newcode) {document.all ("file"). Value+=newcode}function showsize (size) {if (helpstat) {alert ("Text size tag \ n" Sets the text size. \ n Variable range 1-6.\n 1 is the minimum of 6 for maximum. \ n Usage:
 
  This is "+size+" text");} else if (Basic) {addtxt= ""; AddText (addtxt);} else {txt=prompt ("size" +size, "text"); if (txt!=null) {addtxt= "" +txt; AddText (Addtxt); Addtxt= "";        AddText (addtxt);} }}function Bold () {if (Helpstat) {alert ("bold mark \ n makes text bold. \ n Usage:
  It's a bold text.");} else if (Basic) {addtxt= "
  "; AddText (addtxt);} else {txt=prompt ("The text will be thicker.", "Please enter the text to be bold here!")     "); if (txt!=null) {addtxt= "
  "+txt; AddText (Addtxt); Addtxt= "";       AddText (addtxt);} }}function italicize () {if (Helpstat) {alert ("italic tag \ n makes the text font italic. \ n Usage:
  This is the italic word .");} else if (Basic) {addtxt= "
  "; AddText (addtxt);} else {txt=prompt ("text will be italic", "Please enter the text you want to tilt here!")     "); if (txt!=null) {addtxt= "
  "+txt; AddText (Addtxt); Addtxt= "";        AddText (addtxt);}  }}function Showcolor (color) {if (Helpstat) {alert ("colour tag \ n" Sets the text color.) Any color names can be used. \ n Usage:
  
   The 
   
    color to be changed to "+color+");} else if (Basic) {addtxt= ""; AddText (addtxt);} else {txt=prompt ("The Color chosen is:" +color, "Enter the text you want to change the color here! "); if (txt!=null) {addtxt=" "+txt;        AddText (Addtxt); Addtxt= ""; AddText (addtxt);} }}function Showfont (font) {if (Helpstat) {alert ("font tag \ \ \ \ \ \ \ \ \ \ \ n"): Change the text font to "+font+");} else if (Basic) {addtxt= ""; AddText (addtxt);} else {txt=prompt ("text to set font" +font, "Enter the text you want to change the font here! "); if (txt!=null) {addtxt=" "+txt; AddText (Addtxt); Addtxt= "";        AddText (addtxt);}
 }}function underline () {if (Helpstat) {alert ("underline mark \ n underlines the text. \ n Usage: 
    to underline the text ");} else if (Basic) {addtxt= " 
    "; AddText (addtxt);}     else {txt=prompt ("underlined text.", "text"); if (txt!=null) {addtxt= " 
    " "+txt; AddText (Addtxt); addtxt= "";        AddText (addtxt);} }}

   
  
 


(2) Add background to database implementation check_file.php

 
  EXECUTE_DML ($sql);        if ($res ==1) {        echo "";        echo "";    } else{        echo "";        echo "";    }? >


  • 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.