• ecos之widget


    weekbuy:
    widget.php
    <?php
    $setting['author']='zhang';
    $setting['name']='周末购';
    $setting['version']='v1.0';
    $setting['stime']='2014-07-28';
    $setting['order']='1';
    $setting['catalog']='v1.2场馆挂件';
    $setting['description']='本商品在前台周末显示的商品';
    $setting['usual']='1';
    $setting['template']=array('default.html'=>'默认');
    ?>
    ---------
    theme_widget_weekbuy.php
    <?php
    function theme_widget_weekbuy(&$setting,&$render){
    return $myData;
    }
    ?>
    ----------
    default.html
    <div>
    <div>
    <img src="<{$setting.first_big_img}>" width='<{$setting.first_big_img_width}>'
    height='<{$setting.first_big_img_height}>'>
    <ul>
    <li><span>五</span><em>FRIDAY</em></li>
    <li><span>六</span>
    <em>SATURDAY</em>
    </li>
    <li>
    <span>日</span><em>SUNDAY</em>
    </li>
    </ul>
    </div>

    <div>
    <div>
    <a href="<{$setting.url[0]}>"><img src="<{$setting.goods_img[0][0]}>" width="<{$setting.img_width}>"
    height="<{$setting.img_height}>"></a>
    <a href="<{$setting.url[1]}>"><img src="<{$setting.goods_img[0][1]}>" width="<{$setting.img_width}>"
    height="<{$setting.img_height}>"></a>
    </div>

    <div>
    <a href="<{$setting.url[2]}>"><img src="<{$setting.goods_img[0][0]}>" width="<{$setting.img_width}>"
    height="<{$setting.img_height}>"></a>
    <a href="<{$setting.url[3]}>"><img src="<{$setting.goods_img[0][1]}>" width="<{$setting.img_width}>"
    height="<{$setting.img_height}>"></a>
    </div>

    <div>
    <a href="<{$setting.url[4]}>"><img src="<{$setting.goods_img[0][0]}>" width="<{$setting.img_width}>"
    height="<{$setting.img_height}>"></a>
    <a href="<{$setting.url[5]}>"><img src="<{$setting.goods_img[0][1]}>" width="<{$setting.img_width}>"
    height="<{$setting.img_height}>"></a>
    </div>

    </div>
    </div>
    <script type="text/javascript">
    (function($){
    $(function(){
    new JqTab('j-tab01',{tabbtn:'tn1',tabitem:'t1-cont-item'});
    })
    });

    </script>
    -----------------------
    _config.html
    <div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="">
    第一个大图:
    <label>
    <input name="first_big_img" value="<{$setting.first_big_img}>">
    <input type="button" value="<{t app='b2c'}>上传图片<{/t}>">
    </label>
    </td>
    <td>
    宽度:<input value="<{$setting.first_big_img_width|default:202}>">
    </td>
    <td>
    高度:<input value="<{$setting.first_big_img_height|default:290}>">
    </td>
    </tr>
    </table>
    </td>
    </tr>

    <tr>
    <td>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td>
    宽度:<input name="img_width" value="<{$setting.img_width|default:499}>">
    高度:<input name="img_height" value="<{$setting.img_height|default:290}>">
    </td>
    </tr>

    <tr>

    </tr>
    </table>
    </td>
    </tr>
    </table>
    </div>
    <script type="text/javascript">
    var tag_type="label";
    $$("#goods_exshow_config.uploadbtn").addEvent('click',function(e){bindevent(this)});
    function bingevent(e1){
    var target=$(e1).getParent(tag_type).getElement('.imgsrc');
    var url='index.php?app=desktop&act=alertpages&goto'+encondeURIComponent("index.php?app=image
    &ctl=admin_manage&act=imgae_broswer&type=big
    ");
    return new imgDialog(url,{onCallback:function(image_id,image_src){
    target.value=image_src;
    }});
    }

    </script>>

  • 相关阅读:
    Vue模板
    一个人的旅行
    o2o家庭助手demo
    学习html5 app项目开发
    我最近的一段时间技术总结
    我最近的工作、生活状态
    swift学习初步(四)-- 函数
    swift学习初步(三)--控制流操作
    swift学习(二)--基本运算符、字符串、集合操作
    Swift学习初步(一)
  • 原文地址:https://www.cnblogs.com/smartyman/p/3897792.html
Copyright © 2020-2023  润新知