Easily modify the name of the website---e-commerce system (Enterprise entry-level business website)

Source: Internet
Author: User

By modifying the site name can be customized to any user system, to meet the user's sense of possession, is very clever and useful small function.

The procedure is as follows:

Introduction of permissions Judgment (administrators have permission to modify site names)

<chtml><bag id=sys><we name=nodeid>a0</we></bag><!--Column node--></chtml> <chtml file= "base/ac/checkacl.htm"/><!--introduce permission check file--
Read the site name file

<file id=site act=read method=str name=title>site/res/site_name.txt</file>
Determine permissions, decide not to display the "Save" function

<if x= "@{sys:cando}" ><div align=right x=true><a href= "Javascript:dosubmit ()" title= "Save current changes! ">[Save]</a> </div></if>
submit a form for the site name
<form action= "site_edit.chtml" Method=post id=save name=save><tr height= "class=bg0><th width=" 80 " valign= "Middle" > Site name </td><td><input name= "title" Value= "@{site:title}" size= "@{int:@{length:@{ SITE:TITLE}}+12} "/></td></tr></form>
Commit time-space value check
Dosubmit = function () {var saves = document.forms[' save '];if (saves[' title '].value== ' ") {alert (" Name cannot be empty! "); return;} Saves.submit ();}
effect

Full Code

 (file: base/access/site_edit.html) in the Light Open e-commerce system (Enterprise entry-level business website) under the base/access/ directory

Save Site name after submission

<!--permission to judge--><if x= "@{sys:cando}" Else=1><we X=true>...</we><script>alert ("You don't have permission! "); History.back ();</script></if>
Save Site name
<file value= "@{ppage:title}" >site/res/site_name.txt</file>
return after saving
<to>@{sys:face}base/access/site_edit.html</to>

Full code

(file: base/access/site_edit.chtml) in the Light Open e-commerce system (Enterprise entry-level business website) under the base/access/directory


We can actually test it.

Easy to download resources for Internet development Platform

Development example: Light Open e-commerce website , free download: http://download.csdn.net/detail/tx18/8818883

Light open platform will be upgraded to provide you with more powerful and easy features, please pay attention to Download the latest version


Easily modify the name of the website---e-commerce system (Enterprise entry-level business website)

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.