Change the topic image of homepage carousel (4. delete) --- light open e-commerce system (enterprise entry level B2C website), E-commerce system B2C

Source: Internet
Author: User

Change the topic image of homepage carousel (4. delete) --- light open e-commerce system (enterprise entry level B2C website), E-commerce system B2C

Connect (

Change the topic image for homepage carousel 1)

File: Form in site/links/img0.html (the last td in line 11th)

<Td> <if x = "@ {sys: canDo}"> <a href = "javascript: doDel ('@ {links: WE_ID }'); "x = true> [delete] </a> </if> </td>
And the js function (the parameter is reUrl and the image we_id) when lines 16 to 23 are deleted)
<Script> function doDel (rid) {if (! Confirm ('Are you sure you want to delete it? ') {Return;} var str =' @ {sys: face} site/links/im1__del.chtml? ReUrl = site/links/img0.html & WE_ID = '+ rid; location. href = str ;}</script>
Click "[delete]" and click OK to jump to the file. Site/links/im1__del.chtml(In Light open e-commerce system (enterprise entry level B2C website)Under the site/links/directory)
Determine Permissions(Security First)

<Chtml> <Bag id = sys> <we name = NodeID> a0.0 </we> </Bag> </chtml> <chtml file = "base/ac/checkAcl.htm "/> <! -- Introduce the permission check file --> <chtml> <if x = "@ {sys: canDo}" else = 1> <we x = true> ...... </we> <script> alert ("You do not have permission! "); Location. href = '@ {sys: face }@{ pPage: reUrl}' </script> </if> </chtml>
Query image URI

<esql module=base id=link>select IMG_URL from images_base where WE_ID='@{pPage:WE_ID}'</esql>
Delete Image
<if x="@{link:IMG_URL}" else=1><we/><file act=del>@{link:IMG_URL}</file></if>
Delete records in a table
<ESql module=base act=edit>Delete From images_base where WE_ID='@{pPage:WE_ID}'</ESql>
Prompt and return after success
<Script> alert ("deleted 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> <esql module = base id = link> select IMG_URL from images_base where WE_ID = '@ {pPage: WE_ID} '</esql> <! -- Delete an image --> <if x = "@ {link: IMG_URL}" else = 1> <we/> <file act = del >@{ link: IMG_URL }</file> </if> <! -- Delete record --> <ESql module = base act = edit> Delete From images_base where WE_ID = '@ {pPage: WE_ID} '</ESql> <script> alert ("deleted successfully! "); Location. href = '@ {sys: face} @ {pPage: reUrl}' </script> </we> <script> alert (" You do not have permission! "); Location. href = '@ {sys: face }@{ pPage: reUrl}' </script> </if> </chtml> (File: site/links/im1__del.chtml) in
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.