コード例 #1
0
ファイル: page_adminm.php プロジェクト: whedro/vpsadmin
             $xtpl->form_out_raw();
             break;
     }
     break;
 case "request_process":
     if (!$_SESSION["is_admin"]) {
         break;
     }
     if (isset($_POST["approve"]) || $_GET["rule"] == "approve") {
         request_approve();
     } elseif (isset($_POST["deny"]) || $_GET["rule"] == "deny") {
         request_deny();
     } elseif (isset($_POST["invalidate"]) || $_GET["rule"] == "invalidate") {
         request_invalidate();
     } elseif (isset($_POST["ignore"]) || $_GET["rule"] == "ignore") {
         request_ignore();
     }
     break;
 case 'show_deleted':
     if (!$_SESSION["is_admin"]) {
         break;
     }
     $xtpl->table_add_category('ID');
     $xtpl->table_add_category(_("NICKNAME"));
     $xtpl->table_add_category(_("VPS"));
     $xtpl->table_add_category(_("FULL NAME"));
     $xtpl->table_add_category(_("DELETED"));
     $xtpl->table_add_category('');
     $xtpl->table_add_category('');
     $rs = $db->query("SELECT m_id FROM members WHERE m_state = 'deleted'");
     while ($row = $db->fetch_array($rs)) {
コード例 #2
0
ファイル: cp_friend.php プロジェクト: NaturalWill/UCQA
            if ($fstatus == 1) {
                //取消双向好友关系
                friend_update($_SGLOBAL['supe_uid'], $_SGLOBAL['supe_username'], $uid, '', 'ignore');
            } elseif ($fstatus == 0) {
                request_ignore($uid);
            }
            showmessage('do_success', 'cp.php?ac=friend&op=request', 0);
        }
    } elseif ($_GET['key'] == $space['key']) {
        //批量忽略好友请求
        $query = $_SGLOBAL['db']->query("SELECT uid FROM " . tname('friend') . " WHERE fuid='{$space['uid']}' AND status='0' LIMIT 0,1");
        if ($value = $_SGLOBAL['db']->fetch_array($query)) {
            //删除
            $uid = $value['uid'];
            $username = getcount('space', array('uid' => $uid), 'username');
            request_ignore($uid);
            showmessage('friend_ignore_next', 'cp.php?ac=friend&op=ignore&confirm=1&key=' . $space['key'], 1, array($username));
        } else {
            showmessage('do_success', 'cp.php?ac=friend&op=request', 0);
        }
    }
} elseif ($op == 'addconfirm') {
    if ($_GET['key'] == $space['key']) {
        //检查数目
        $maxfriendnum = checkperm('maxfriendnum');
        if ($maxfriendnum && $space['friendnum'] >= $maxfriendnum + $space['addfriend']) {
            if ($_SGLOBAL['magic']['friendnum']) {
                showmessage('enough_of_the_number_of_friends_with_magic');
            } else {
                showmessage('enough_of_the_number_of_friends');
            }
コード例 #3
0
ファイル: do_cpfriend.php プロジェクト: shiyake/php-ihome
                 feed_add($fs['icon'], $fs['title_template'], $fs['title_data'], $fs['body_template'], $fs['body_data'], $fs['body_general']);
             }
             //我的好友申请数进行变化
             $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET addfriendnum=addfriendnum-1 WHERE uid={$userid} AND addfriendnum>0");
             //通知
             notification_add($tousesrid, 'friend', cplang('note_friend_add'));
             $result = array('flag' => 'added');
         }
     }
 } elseif ($type == 'ignore') {
     if ($rfstatus == 1) {
         //取消双向好友关系
         friend_update($userid, $space['username'], $touserid, '', 'ignore');
         $result = array('flag' => 'ignored');
     } elseif ($rfstatus == 0) {
         request_ignore($touserid);
         $result = array('flag' => 'ignored');
     } else {
         $result = array('flag' => 'notfriends');
     }
 } else {
     /*$friends = explode(',',$space['friend']);
     			if(in_array($touserid, $friends)){
     				$result = array('flag'=>'isfriend');
     			}else{
     				$result = array('flag'=>'notfriends');
     
     			}*/
     if ($fstatus == 1) {
         $result = array('flag' => 'isfriend');
     } else {