>  기사  >  백엔드 개발  >  shopnc 二次开发 每日签到积分领取,shopnc二次开发_PHP教程

shopnc 二次开发 每日签到积分领取,shopnc二次开发_PHP教程

WBOY
WBOY원래의
2016-07-12 09:06:38841검색

shopnc 二次开发 每日签到积分领取,shopnc二次开发

/*

开始shopnc!!!!!

*/

Mode :points.model.php

                                  方法: savePointsLog 添加: 

            <span>case</span> 'day':
                <span>if</span>(!<span>$insertarr</span>['pl_desc'<span>]){
                    </span><span>$insertarr</span>['pl_desc'] = Language::get('pointsdaydesc'<span>);
                }
                </span><span>break</span>;

Language :common.php

            添加"pointsdaydesc"

<span>$lang</span>['pointsdaydesc']            =    '会员每日登录';

control :index.php

          添加 "userjfOp"

    <span>public</span> <span>function</span><span> userjfOp(){
        </span><span>$model</span> = Model('member'<span>);
        </span><span>$user</span> =<span>array</span><span>(); 
        </span><span>$user</span>['member_points'] = <span>$model</span>->getMemberInfo(<span>array</span>('member_id'=><span>$_SESSION</span>['member_id']),'member_points'<span>);
        </span><span>if</span>(<span>$user</span>['member_points'] == '0' ) { <span>$model</span>-><span>checkloginMember();}
        </span><span>$userpoints</span> = <span>rand</span>(0,10<span>);
        </span><span>if</span>(<span>$userpoints</span> =='0' ){ <span>$userpoints</span> = <span>rand</span>(0,10<span>);}
        </span><span>//</span><span>$userpoints ='0.'.$userpoints;</span>
        <span>$model_points</span> =Model('points'<span>);
        </span><span>$arr_points</span> = <span>array</span><span>();
        </span><span>$pix</span> = <span>$model_points</span>->getPointsInfo(<span>array</span>('pl_memberid'=><span>$_SESSION</span>['member_id'<span>]));
        </span><span>$model_points</span>->savePointsLog('day',<span>array</span>('pl_memberid'=><span>$_SESSION</span>['member_id'],'pl_membername'=><span>$_SESSION</span>['member_name'],'pl_points'=><span>$userpoints</span><span>));
        
    }</span>

 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1064527.htmlTechArticleshopnc 二次开发 每日签到积分领取,shopnc二次开发 /* 开始shopnc!!!!! */ Mode :points.model.php 方法:savePointsLog 添加: case 'day': if (! $insertarr ['pl_de...
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.