Пример #1
0
 function update()
 {
     $uid = MEMBER_ID;
     if ($this->Config['is_qmd'] && $uid > 0) {
         $sql = "select `uid`,`qmd_img` from `" . TABLE_PREFIX . "members` where `uid`='{$uid}'";
         $query = $this->DatabaseHandler->Query($sql);
         $row = $query->GetRow();
         $qmd_bg_path = $row['qmd_img'] ? $row['qmd_img'] : $this->Post['qmd_bg_path'];
         Load::logic('other');
         $OtherLogic = new OtherLogic();
         $qmd_return = $OtherLogic->qmd_list($uid, $qmd_bg_path);
     }
 }
Пример #2
0
 function getSignTag()
 {
     if (MEMBER_ID < 1) {
         exit;
     }
     $is_tag = 1;
     load::logic('other');
     $OtherLogic = new OtherLogic();
     $tag_arr = $OtherLogic->getSignTag();
     include template('admin/resultList');
 }
Пример #3
0
 function CheckMedal()
 {
     $medalid = (int) $this->Get['medal_id'];
     Load::logic('other');
     $otherLogic = new OtherLogic();
     $result = $otherLogic->autoCheckMedal($medalid);
     if ($result == '1') {
         $this->Messager("成功点亮", 'index.php?mod=other&code=medal');
     } else {
         if ($return == '3') {
             $this->Messager("你已获得此勋章了哦", -1);
         } else {
             $this->Messager("未达成获取勋章的条件", -1);
         }
     }
 }
Пример #4
0
 function DoLogin()
 {
     if ($this->Config['seccode_enable'] == 1 && $this->Config['seccode_login']) {
         if (!ckseccode(@$_POST['seccode'])) {
             $this->Messager("验证码输入错误", -1);
         }
     } elseif ($this->Config['seccode_enable'] > 1 && $this->Config['seccode_login'] && $this->yxm_title && $this->Config['seccode_pub_key'] && $this->Config['seccode_pri_key']) {
         $YinXiangMa_response = jlogic('seccode')->CheckYXM(@$_POST['YinXiangMa_challenge'], @$_POST['YXM_level'][0], @$_POST['YXM_input_result']);
         if ($YinXiangMa_response != "true") {
             $this->Messager("验证码输入错误", -1);
         }
     }
     if ($this->Username == "" || $this->Password == "") {
         $this->Messager("无法登录,用户名或密码不能为空", -1);
     }
     $username = $this->Username;
     $password = $this->Password;
     $referer = jget('referer');
     if (!$referer) {
         $referer = jsg_getcookie('referer');
     }
     $rets = jsg_member_login($username, $password);
     $uid = (int) $rets['uid'];
     if ($uid < 1) {
         $this->Messager($rets['error'], null);
     }
     $member = jsg_member_info(MEMBER_ID);
     $this->Config['reg_email_verify'] == 1 && $member['email_checked'] == 0 && ($referer = 'index.php?mod=member&code=setverify&ids=' . $uid);
     $this->Config['email_must_be_true'] == 2 && $member['email_checked'] == 0 && ($referer = 'index.php?mod=member&code=setverify&ids=' . $uid);
     if ($this->Config['extcredits_enable'] && $uid > 0) {
         update_credits_by_action('login', $uid);
     }
     Load::logic('other');
     $otherLogic = new OtherLogic();
     $sql = "SELECT m.id as medal_id,m.medal_img,m.medal_name,m.medal_depict,m.conditions,u.dateline,y.apply_id\r\n\t\t\t\tFROM " . TABLE_PREFIX . "medal m\r\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "user_medal u ON (u.medalid = m.id AND u.uid = '{$uid}')\r\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "medal_apply y ON (y.medal_id = m.id AND y.uid = '{$uid}')\r\n\t\t\t\tWHERE m.is_open = 1\r\n\t\t\t\tORDER BY u.dateline DESC,m.id";
     $query = $this->DatabaseHandler->Query($sql);
     while (false != ($rs = $query->GetRow())) {
         $rs['conditions'] = unserialize($rs['conditions']);
         if (in_array($rs['conditions']['type'], array('topic', 'reply', 'tag', 'invite', 'fans', 'sign')) && !$rs['dateline']) {
             $result .= $otherLogic->autoCheckMedal($rs['medal_id'], $uid);
         }
     }
     $redirecto = $referer ? $referer : referer();
     $redirecto = str_replace('#', '', $redirecto);
     if ($this->Post['loginType'] == 'share') {
         $redirecto = $this->Post['return_url'];
         $this->Messager(null, $redirecto, 0);
     }
     if ($this->Post['loginType'] == 'show_login') {
         $this->Messager(NULL, $redirecto, 0);
     }
     if ($rets['uc_syn_html']) {
         $this->Messager("登录成功{$rets['uc_syn_html']}", $redirecto, 3);
     } else {
         $this->Messager(null, $redirecto);
     }
 }
Пример #5
0
 function doAct()
 {
     $uids = array();
     $ids = get_param('ids');
     $uids = $ids;
     $act = get_param('act');
     $msg = jpost('msg', 'txt');
     $medal_id = get_param('medal_id');
     if ($act == 'sendmsg') {
         if ($msg == '') {
             $this->Messager("请输入私信的内容", -1);
         }
         $admin_nickname = DB::result_first("select `nickname` from `" . TABLE_PREFIX . "members` where uid = 1 ");
         load::logic("pm");
         $PmLogic = new PmLogic();
         if ($uids) {
             $query = $this->DatabaseHandler->Query("select `nickname` from `" . TABLE_PREFIX . "members` where uid in (" . jimplode($uids) . ")");
             $nickname_arr = array();
             while (false != ($rs = $query->GetRow())) {
                 $nickname_arr[] = $rs['nickname'];
             }
         }
         if ($nickname_arr) {
             $post['to_user'] = implode(",", $nickname_arr);
             $post['message'] = $msg;
             $adminInfo = DB::fetch_first("select `username`,`nickname` from `" . TABLE_PREFIX . "members` where `uid` = '1'");
             $PmLogic->pmSend($post);
         }
     } elseif ($act == 'setmedal') {
         if ($medal_id == '') {
             $this->Messager("请选择要发放的勋章", -1);
         }
         load::logic('other');
         $OtherLogic = new OtherLogic();
         foreach ($uids as $val) {
             $sql = " select * from `" . TABLE_PREFIX . "members` Where  `uid` = '" . $val . "' ";
             $query = $this->DatabaseHandler->Query($sql);
             $members = $query->GetRow();
             $OtherLogic->giveUserMedal($medal_id, $members);
         }
     } elseif ($act == 'deluser') {
         $this->DoDelete($uids);
     } else {
         $this->Messager("请选择要执行的操作", -1);
     }
     $this->Messager("操作成功");
 }
Пример #6
0
 function Login2()
 {
     $username = trim(jget('username'));
     $password = jget('password');
     if ($username == "" || $password == "") {
         json_error("无法登录,用户名或密码不能为空");
     }
     if ($GLOBALS['_J']['plugins']['func']['login']) {
         hookscript('login', 'funcs', array('param' => $this->Post, 'step' => 'check'), 'login');
     }
     $referer = jget('referer');
     if (!$referer) {
         $referer = jsg_getcookie('referer');
     }
     $rets = jsg_member_login($username, $password);
     $uid = (int) $rets['uid'];
     if ($uid < 1) {
         json_error($rets['error']);
     }
     $member = jsg_member_info($uid);
     $this->Config['email_must_be_true'] == 2 && $member['email_checked'] == 0 && ($referer = 'index.php?mod=member&code=setverify&ids=' . $uid);
     if ($this->Config['extcredits_enable'] && $uid > 0) {
         update_credits_by_action('login', $uid);
     }
     Load::logic('other');
     $otherLogic = new OtherLogic();
     $sql = "SELECT m.id as medal_id,m.medal_img,m.medal_name,m.medal_depict,m.conditions,u.dateline,y.apply_id\r\n\t\t\t\tFROM " . TABLE_PREFIX . "medal m\r\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "user_medal u ON (u.medalid = m.id AND u.uid = '{$uid}')\r\n\t\t\t\tLEFT JOIN " . TABLE_PREFIX . "medal_apply y ON (y.medal_id = m.id AND y.uid = '{$uid}')\r\n\t\t\t\tWHERE m.is_open = 1\r\n\t\t\t\tORDER BY u.dateline DESC,m.id";
     $query = $this->DatabaseHandler->Query($sql);
     while (false != ($rs = $query->GetRow())) {
         $rs['conditions'] = unserialize($rs['conditions']);
         if (in_array($rs['conditions']['type'], array('topic', 'reply', 'tag', 'invite', 'fans')) && !$rs['dateline']) {
             $result .= $otherLogic->autoCheckMedal($rs['medal_id'], $uid);
         }
     }
     header("location:mobile/index.php");
 }