zoukankan      html  css  js  c++  java
  • ecshop笔记

    ***ecshop在线入门手册***:http://book.ecmoban.com/

    解决ecshop与jquery冲突问题
    1、修改文件:/js/transport.js
    在文件最底部增加代码:

    if (Object.prototype.toJSONString){ var oldToJSONString = Object.toJSONString; Object.prototype.toJSONString = function(){ if (arguments.length > 0){ return false; }else{ return oldToJSONString.apply(this, arguments); } } }

    2、修改文件:/js/compare.js
    查找代码:

    this.timer = window.setInterval(this.relocation.bind(this), 50);

    修改为:

    this.timer = window.setInterval(this.bind(this.relocation,this), 50);

    查找代码:

    lastScrollY : 0

    在代码上面一行增加代码:

    bind : function(obj1,obj2) { return function() { obj1.apply(obj2, arguments); } },

    3、在以下模板文件中,找到嵌入global.js文件的代码,删除嵌入global.js
    brand.dwt
    brand_list.dwt
    category.dwt
    exchange_list.dwt
    search.dwt
    4、下载最新版的jquery库文件到模板目录中,如:
    /themes/temlatename/images/js/jquery.1.5.2.js
    如果你的模板中没有对应目录,则新建目录拷入jquery文件即可
    5、修改文件:/themes/temlatename/library/page_header.lbi
    在顶部加入代码:

    <script src="images/js/jquery.1.5.2.min.js" type="text/javascript"></script>

    <script type="text/javascript">var $$=jQuery.noConflict();</script>




    jQuery.noConflict():jq的实现

    //$data['goods_sn']='2134234';
    //$data['goods_name']='好!';
    //insert去掉表示插入
    $GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('goods'), $data,'insert');die;
    引入所用模板css样式:{$ecs_css_path}
    调用系统参数:$_CFG['名字'];
    发送模板导航及其他:assign_template();
    引入js以及文件:{insert_scripts files="文件一,文件二"}

    ecshop邮箱登陆E:wuecshopincludesmodulesintegrates
    if(is_email($username))
            {
                $sql = "select ".$this->field_name." from ".$this->table($this->user_table)." where ".$this->field_email."='".$username."'";
                $username = $this->db->getOne($sql);
                if(!$username) return false;
            }

    images:图片screenshot.png
    library库文件 .lbi
    <!--滚动开始-->

    页面滚动事件
    $(function(){
        //求按钮到顶部的距离
        var h=$("#h_top").offset().top;
        //alert(h);
        //滚轮滚动事件
        $(window).scroll(function(){
           //当前滚动距离    
           var wt=$(this).scrollTop();
            if(wt>=h){
            //设置滚动
                $("#h_top").offset({'top':wt})
            }else{
                $("#h_top").offset({'top':h})
            }
        })
    })
    <!--end滚动-->z-index:1   调节层级
    date_default_timezone_set('Aisa/Shanghai');设置时区
    ajax.abort();销毁ajax
    sleep(1);延迟
    serialize($arr);序列化
    unserialize(str);反序列化
    对称加密
    base64_encode();
    base64_decode();


    //锁表
    lock tables 表名 锁表类型(write,read)
    //解锁
    unlock tables;
    //锁行(innodb)
    1、关闭自动提交 set autocommit=0;
    2、开启事务 begin work;
    3、(一)排它锁 select * from 表名 where id=1 for update;
       (二)共享锁 select * from 表名 where id=1 lock in share mode;
    4、当事物提交后结束 commit;


    新浪链接:http://1.18203938105.applinzi.com     
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • 相关阅读:
    最长上升子序列(矩形嵌套)
    中国剩余定理模板poj1006
    POJ 2891 扩展欧几里德
    2015多校联赛第三场(部分题解)
    树链剖分
    深度理解链式前向星
    POJ 1228 Grandpa's Estate(凸包)
    旋转卡壳(一)
    最小圆覆盖 hdu 3007
    半平面求交 模板
  • 原文地址:https://www.cnblogs.com/lpyan/p/5607814.html
Copyright © 2011-2022 走看看