Home  >  Article  >  Backend Development  >  shopnc secondary development, daily sign-in points collection, shopnc secondary development_PHP tutorial

shopnc secondary development, daily sign-in points collection, shopnc secondary development_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 09:06:38848browse

shopnc secondary development. Get points for daily sign-in, shopnc secondary development

/*

Start shopnc!!!!!

*/

Mode:points.model.php

                                                                                                                              Method: savePointsLog Add:

            <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

Add "pointsdaydesc"

<span>$lang</span>['pointsdaydesc']            =    '会员每日登录';
control :index.php

Add "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>

http://www.bkjia.com/PHPjc/1064527.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1064527.htmlTechArticleshopnc secondary development Daily sign-in points are received, shopnc secondary development/* Start shopnc!!!!! * / Mode :points.model.php Method: savePointsLog Add: case 'day': if (! $insertarr ['pl_de...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn