Change the topic image for homepage carousel (3. Save and add) --- light open e-commerce system (enterprise entry level B2C website), E-commerce system B2C

Source: Internet
Author: User

Change the topic image for homepage carousel (3. Save and add) --- light open e-commerce system (enterprise entry level B2C website), E-commerce system B2C

Connect to a blog

File: Form (row 4th) in site/links/im1__add.html)

<Form id = save action = "@ {sys: face} site/links/im1__add_up1.chtml" onsubmit = "return false; "target = _ self method = post enctype =" multipart/form-data "> <input type = hidden name = reUrl value =" site/links/img0.html "> <tr> <td width = 88> <font class = actTitle> name </font> </td> <td width = 700> <INPUT size = 36 NAME = name> </td> </tr> <td> <font class = actTitle> LINK address </font> </td> <INPUT size = 40 name = LINK> </ td> </tr> <td> <font class = actTitle> IMAGE </font> </td> <INPUT name = IMAGE size = 32 type = file> (730x486) </td> </tr> </form>
Submit to file: site/links/im1__add_up1.chtml (in Light open e-commerce system (enterprise entry level B2C website)Under the site/links/directory)
Complete file names

<Bag id=pPage><we name=IMG_URL>site/links/upimgs/@{sys:only}@{pPage:IMAGE_extname}</we></Bag>
Insert the name, link address, and file URI into the database.

<ESql module=base act=edit>Insert Into images_base(NAME,LINK,IMG_URL)Values(@{pPage:NAME:string},@{pPage:LINK:string},@{pPage:IMG_URL:string})</ESql>
Save files
<file value="@{pPage:IMAGE}" islast>@{pPage:IMG_URL}</file>
If the operator does not have the permission, the system prompts and returns
<Script> alert ("You do not have permission! "); Location. href = '@ {sys: face }@{ pPage: reUrl}' </script>
Return after successful addition
<Script> alert ("added successfully! "); Location. href = '@ {sys: face} @ {pPage: reUrl}'; </script>
All code
<Html> <! -- Topic node --> <chtml> <Bag id = sys> <we name = NodeID> a0.0 </we> </Bag> </chtml> <chtml file = "base/ ac/checkAcl.htm "/> <! -- Import the permission check file --> <chtml> <if x = "@ {sys: canDo} "else = 1> <we x = true> <Bag id = pPage> <we name = IMG_URL> site/links/upimgs/@ {sys: only }@{ pPage: IMAGE_extname} </we> </Bag> <ESql module = base act = edit> Insert Into images_base (NAME, LINK, IMG_URL) values (@ {pPage: NAME: string}, @ {pPage: LINK: string}, @ {pPage: IMG_URL: string }) </ESql> <file value = "@ {pPage: IMAGE}" islast >@{ pPage: IMG_URL} </file> </we> <script> alert ("You do not have permission! "); Location. href = '@ {sys: face }@{ pPage: reUrl}' </script> </if> </chtml> <script> alert ("added successfully! "); Location. href = '@ {sys: face }@{ pPage: reUrl}'; </script> 

(File: site/links/im1__add_up1.chtml)Light open e-commerce system (enterprise entry level B2C website)Under the site/links/directory

Download Easy Do IT resources

Development Instance:Lightweight enterprise entry-level B2C e-commerce websites, Free download: http://download.csdn.net/detail/tx18/8818883

The light-Open Platform will occasionally upgrade to provide more powerful and Easy functions for you. Please note thatDownload the latest version


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.