load_model("user"); $this->load_model("msg"); $this->load_model("customer"); } function home_c() { $this->__construct(); } function index_f() { $myRecommendUID=$this->trans_lib->safe("ruid"); if(!$myRecommendUID) { $myRecommendUID=0; }else if($myRecommendUID>0){ $_SESSION["Recommend_UID"]=$myRecommendUID; } /*print_r(strlen("中").$this->sys_config[CommissionPercentage1] ); if($this->STCModel->Appid){ print_r("SysTemSiteConfig".$this->STCModel->Appid); }else{ print_r("on"); }*/ if($_SESSION["user_id"]){ $urs = $this->user_m->user_from_id($_SESSION["user_id"]); if($urs){ if($_SESSION["oauthuser_info"]) { $urs["picture"]=$_SESSION["oauthuser_info"]->headimgurl; } $this->tpl->assign("urs",$urs); } } $rslist = $this->user_m->get_toplist(); $this->tpl->assign("rslist",$rslist); $rs = $this->msg_m->get_one(3); $id = $rs["id"]; $this->tpl->assign("id",$id); $this->tpl->assign("rs",$rs); $this->tpl->display("home.".$this->tpl->ext); //$myRecommendName=""; //print_r($_SESSION["Recommend_UID"]); } function updategroup_f() { if(!$_SESSION["user_id"]) { echo "分享成功"; exit; }else{ $uid = $_SESSION["user_id"]; $this->user_m->update_group($uid); echo "分享成功,你已经升级为金牌合伙人"; exit; } } } ?>