|  | 
 
插件版本
| OURPHP版本: | 需V1.7.0或以上版本 |  
| 描述: | 已更新 |  
| v1.9.2已废弃,不需要在用了 
 会员邀请列表,让你轻松知道您邀请了哪些朋友
 
 第一步,把cn_userinvitation.html模板文件,放到/templates/user/目录中。(最下面 可以下载 cn_userinvitation.html)
 第二步,把
 
 复制代码<li><a href="[.$webpath.]client/user/?[.$ip.lang.]-userinvitation.html"><span class="ion-clipboard"></span>邀请会员</a></li>
 
 代码插入到 cn_leftnav.html 模板文件里。
 第三步,打开 /client/user/ourphp_userview.class.php
 找到:$smarty->assign('mail',ourphp_usermail());  在它上面插入 如下代码:
 
 找到:$smarty->assign('integrallist',ourphp_userintegral()); 在它下面插入如下代码复制代码function ourphp_userinvitation(){
        global $db,$smarty;
        
        $listpage = 25;
        if (intval(isset($_GET['page'])) == 0){
                $listpagesum = 1;
                        }else{
                $listpagesum = intval($_GET['page']);
        }
        $start=($listpagesum-1)*$listpage;
        $ourphptotal = $db -> listgo("count(id) as tiaoshu","`ourphp_user`","where `OP_Usersource` = '".$_SESSION['username']."'");
        
        $ourphptotal = $db -> whilego($ourphptotal);
        $query = $db-> listgo("`id`,`OP_Useremail`,`OP_Username`,`time`","`ourphp_user`","where `OP_Usersource` = '".$_SESSION['username']."' order by time desc LIMIT ".$start.",".$listpage);
        $rows = array();
        while($ourphp_rs = $db -> whilego($query)){
                $rows[] = array(
                                                        'id' => $ourphp_rs[0],
                                                        'email' => $ourphp_rs[1],
                                                        'name' => $ourphp_rs[2],
                                                        'time' => $ourphp_rs[3],
                );
        }
        $_page = new Page($ourphptotal['tiaoshu'],$listpage);
        $smarty->assign('ourphppage',$_page->showpage());
        return $rows;
}
 完成。复制代码$smarty->assign('invitation',ourphp_userinvitation());
  cn_userinvitation.html
(2.15 KB, 下载次数: 0) | 
 |