| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- class index_c extends Control
- {
- function __construct()
- {
- parent::Control();
- $this->load_model("user");
- }
- function index_c()
- {
- $this->__construct();
- }
- function index_f()
- { if(!$_SESSION["user_id"])
- {
- error('',$this->url('login'));
- exit;
- }
- $oauthuser_info=false;
-
- $urs = $this->user_m->user_from_id($_SESSION["user_id"]);
-
- if($_SESSION["oauthuser_info"])
- {
- $urs["picture"]=$_SESSION["oauthuser_info"]->headimgurl;
- }
- $this->tpl->assign("urs",$urs);
- $total = $this->user_m->get_count($_SESSION["user_id"]);
- $money = $this->user_m->get_money($_SESSION["user_id"]);
- if(!$money){
- $money ='0';
- }
- $this->tpl->assign("total",$total);
- $this->tpl->assign("money",sprintf("%.2f", $money));
- $this->tpl->display("index.".$this->tpl->ext);
- }
- //网站关闭说明
- function close_f()
- {
- $this->tpl->display("close.".$this->tpl->ext);
- }
- function updategroup_f()
- {
- if(!$_SESSION["user_id"])
- {
- echo "分享成功";
- exit;
- }else{
- $uid = $_SESSION["user_id"];
- $this->user_m->update_group($uid);
- echo "分享成功,你已经升级为金牌合伙人";
- exit;
- }
- }
- }
- ?>
|