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