• 换主页轮播的主题图片(1)---轻开电子商务系统(企业入门级B2C网站)


    一共4个文件:

    1. 列表显示文件:site/links/img0.html

    2. 添加图片文件:site/links/img0_add.html

    3. 添加保存图片文件:site/links/img0_add_up1.chtml

    4. 删除图片文件:site/links/img0_del.chtml

    轻开电子商务系统(企业入门级B2C网站)的site/links/目录下

    轻松实现图片替换

    1、列表显示文件代码介绍

    查询最新的主题图片

    [html] view plaincopyprint?

    1. <esql module=base id=links>Select we_id,img_url,link,name From images_base where catalog=0 order by created desc limit 10esql>  

    循环显示主题图片列表

    [html] view plaincopyprint?

    1. <for objects=links end="@{links:getLength}">

    2.     <tr align=center><td><img src="@{sys:path}@{links:IMG_URL}" width="@{double:730/3}" height="@{double:486/3}" border=style="cursor:pointer" onclick="window.open('@{sys:path}@{links:IMG_URL}','','width=730,height=486')" alt="全图">td><td align=left><href="@{links:LINK}" target=_blank title="@{links:LINK}">@{links:NAME}a>td><td><if x="@{sys:canDo}"><href="javascript:doDel('@{links:WE_ID}');" x=true>[删除]a>if>td>tr>  

    3. for>  

    列表效果

    点开单张效果

    权限判断

    [html] view plaincopyprint?

    1. <chtml><Bag id=sys><we name=NodeID>a0.0we>Bag>chtml>  

    2. <chtml file="base/ac/checkAcl.htm"/>

    3. ...  

    4. <if x="@{sys:canDo}"><href="javascript:doDel('@{links:WE_ID}');" x=true>[删除]a>if>  

    5. ....  

    6. <center><if x="@{sys:canDo}"><href="@{sys:face}site/links/img0_add.html" x=true>[添加]a>if>center>  

    删除提示js函数

    [javascript] view plaincopyprint?

    1. function doDel(rid)  

    2. {  

    3.     if(!confirm('真的要删除吗?')){return;}  

    4.     var str = '@{sys:face}site/links/img0_del.chtml?reUrl=site/links/img0.html&WE_ID=' rid;  

    5.         location.href= str;  

    6. }  

    全部代码

    [html] view plaincopyprint?

    1. <link href="@{sys:path}site/links/a.css" rel="stylesheet" type="text/css" />

    2. <chtml><Bag id=sys><we name=NodeID>a0.0we>Bag>chtml>  

    3. <chtml file="base/ac/checkAcl.htm"/>

    4. <chtml>

    5. <table width=90% align=center border=cellpadding="3" cellspacing="0" style="border-collapse:collapse;font-size:12px">

    6. <tr><th colspan=3>.<font class=listTitle>主题图片font>.th>tr>  

    7.    <tr align=center bgcolor=#ECECEC>

    8.      <th>图片th><th>名称和链接th><th width=40>操作th>tr>                 

    9.     <esql module=base id=links>Select we_id,img_url,link,name From images_base where catalog=0 order by created desc limit 10esql>  

    10.     <for objects=links end="@{links:getLength}">

    11.         <tr align=center><td><img src="@{sys:path}@{links:IMG_URL}" width="@{double:730/3}" height="@{double:486/3}" border=style="cursor:pointer" onclick="window.open('@{sys:path}@{links:IMG_URL}','','width=730,height=486')" alt="全图">td><td align=left><href="@{links:LINK}" target=_blank title="@{links:LINK}">@{links:NAME}a>td><td><if x="@{sys:canDo}"><href="javascript:doDel('@{links:WE_ID}');" x=true>[删除]a>if>td>tr>  

    12.     for>  

    13. table><br>  

    14. <center><if x="@{sys:canDo}"><href="@{sys:face}site/links/img0_add.html" x=true>[添加]a>if>center>  

    15. chtml>  

    16. <script>

    17. function doDel(rid)  

    18. {  

    19.     if(!confirm('真的要删除吗?')){return;}  

    20.     var str = '@{sys:face}site/links/img0_del.chtml?reUrl=site/links/img0.html&WE_ID=' rid;  

    21.         location.href= str;  

    22. }  

    23. script>  

    (文件:site/links/img0.html)在轻开电子商务系统(企业入门级B2C网站)的site/links/目录下

    轻松互联网开发平台(Easy Do IT)资源下载

    开发实例:轻开企业入门级B2C电子商务网站,免费下载:http://download.csdn.net/detail/tx18/8818883轻开平台会不定期升级为大家提供更多强大而Easy的功能,请留意下载最新的版本

    【小萌库】相关精品书籍推荐
    互联网赚钱的核心秘密.pdf
    互联网创业成功之道.pdf

    【转帖来自于】 http://coding.hongjuzi.net/share?id=900
    【转帖来自于】http://blog.csdn.net/tx18/article/details/46571799

  • 相关阅读:
    《剑指offer》第十二题(矩阵中的路径)
    《剑指offer》第十五题(二进制中1的个数)
    《剑指offer》第十题(斐波那契数列)
    《剑指offer》第十一题(旋转数组的最小数字)
    原始的生成对抗网络GAN
    《剑指offer》第九题(用两个栈实现队列)
    (转)c++一些知识点
    贪心算法
    动态规划——最长公共子串
    动态规划——主元素算法
  • 原文地址:https://www.cnblogs.com/luodao1991/p/4593553.html
Copyright © 2020-2023  润新知