Example #1
0
function search_add_recommend()
{
    global $timestamp;
    include './include/crontab_config.php';
    $uid = MooGetGPC('uid', 'integer', 'G');
    $index_userlist = MooGetGPC('index_userlist', 'string', 'G');
    $index_userlist_array = explode(',', $index_userlist);
    if (in_array($uid, $index_userlist_array)) {
        echo 'exists';
        exit;
    }
    $province = MooGetGPC('province', 'integer', 'G') > 0 ? MooGetGPC('province', 'integer', 'G') : '0';
    $city = MooGetGPC('city', 'integer', 'G') > 0 ? MooGetGPC('city', 'integer', 'G') : '0';
    if (in_array($province, array(10101201, 10101002))) {
        //note 修正广东省深圳和广州的区域查询
        $city = $province;
        $province = 10101000;
    }
    $sql = "SELECT * FROM {$GLOBALS['dbTablePre']}members_search WHERE uid='{$uid}' and is_lock = 1";
    $members_list = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    if (!$members_list) {
        echo 'error';
        exit;
    }
    //判断是否已有
    $sql = "select uid from {$GLOBALS['dbTablePre']}members_recommend where uid='{$uid}' and city='{$city}' and province='{$province}'";
    $result = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    if ($result) {
        echo 'repeat';
        exit;
    }
    //判断是否已满
    $result = $GLOBALS['_MooClass']['MooMySQL']->getOne("select count(uid) as count from {$GLOBALS['dbTablePre']}members_recommend where city='{$city}' and province='{$province}'");
    if ($result['count'] >= 25) {
        echo 'full';
        exit;
    }
    $sql = "insert into {$GLOBALS['dbTablePre']}members_recommend(uid, province, city, dateline) values('{$uid}', '{$province}', '{$city}', '{$timeStamp}')";
    $GLOBALS['_MooClass']['MooMySQL']->query($sql);
    $age = date("Y") - $members_list['birthyear'];
    $marrage = $members_list['marriage'] == 1 ? '未婚' : '离异';
    $member_level = $members_list['city_star'] > 0 ? '城市之星' : $GLOBALS['member_level'][$members_list['s_cid']];
    $img = MooGetphotoAdmin($members_list['uid'], 'small');
    $dateline = date('Y-m-d H:i:s', $timestamp);
    $td_bgcolor = "style='background-color:#cfeefe'";
    echo "\n\t\t<tr id='uid_{$members_list['uid']}'>\n\t\t    <td align='center' class='first-cell' {$td_bgcolor}>{$members_list['uid']}</td>\n\t\t    <td align='center' {$td_bgcolor}>{$members_list['nickname']}</a>\n\t\t</td>\n\t    <td align='center' {$td_bgcolor}>{$age}</td>\n\t    <td align='center' {$td_bgcolor}>{$marrage}</td>\n\t\t<td align='center' {$td_bgcolor}>{$member_level}</td>\n\t\t<td align='center' {$td_bgcolor}>{$dateline}</td>\n\t\t<td align='center' {$td_bgcolor}>";
    if ($img) {
        echo "<img src='{$img}'/>";
    } else {
        echo "无";
    }
    echo "</td>\n\t\t<td align='center' {$td_bgcolor}>\n\t\t\t<input type='text' style='width:50px;' id='sort_{$members_list['uid']}' name='sort_{$members_list['uid']}' />\n\t\t\t<input type='button' value='修改' onclick='modify_sort({$members_list['uid']})' />\n\t\t</td>\n\t\t<td align='center' {$td_bgcolor}><a href='#' onclick='del_recommend({$members_list['uid']})'>删除</a></td>\n\t\t</tr>";
    //note 插入日志
    serverlog(3, 'members_recommend', '添加首页推荐会员uid=' . $uid, $GLOBALS['adminid']);
}
function searchuid()
{
    $uid = MooGetGPC('uid', 'integer', 'G');
    $sql = "SELECT s.uid,s.nickname,s.birthyear,s.marriage,s.s_cid,b.mainimg FROM {$GLOBALS['dbTablePre']}members_search as s left join {$GLOBALS['dbTablePre']}members_base as b on s.uid=b.uid  WHERE s.uid='{$uid}'";
    $res = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    if ($res) {
        $img = MooGetphotoAdmin($res['uid'], 'small');
        if ($img) {
            array_push($res, $img);
        } else {
            array_push($res, '无');
        }
        echo json_encode(array(0 => $res));
    } else {
        echo json_encode(array(0 => 'no'));
    }
}
Example #3
0
	<?php 
foreach ((array) $users as $v) {
    ?>
	<tr>
		<td align="center"><a href="#" onclick="parent.addTab('<?php 
    echo $v['uid'];
    ?>
资料','index.php?action=allmember&h=view_info&uid=<?php 
    echo $v['uid'];
    ?>
','icon')"><?php 
    echo $v['uid'];
    ?>
</a></td>
		<td align="center"><?php 
    $img = MooGetphotoAdmin($v['uid'], 'small');
    if ($img) {
        ?>
<img src="<?php 
        echo $img;
        ?>
" onmouseover="loadImg(<?php 
        echo $v['uid'];
        ?>
)" onmouseout="hideImg()"/><?php 
    } else {
        ?>
无<?php 
    }
    ?>
</td>
Example #4
0
/**
 * 删除采集会员
 */
function allmember_del_collect()
{
    $uid = MooGetGPC('uid', 'integer', 'G');
    if (empty($uid)) {
        salert('变量传递错误', 'index.php?action=allmember&h=collect&clear=1');
    }
    $usertype = $GLOBALS['_MooClass']['MooMySQL']->getOne('select gender,usertype from `' . $GLOBALS['dbTablePre'] . 'members_search` where uid=' . $uid, true);
    if (empty($usertype) || $usertype['usertype'] != 3) {
        salert('你要删除的用户不存在或者不是英才会员', 'index.php?action=allmember&h=collect&clear=1');
    }
    //删除图片
    $imgs = $GLOBALS['_MooClass']['MooMySQL']->getAll('select imgurl,pic_date,pic_name from `' . $GLOBALS['dbTablePre'] . 'pic` where uid=' . $uid, 0, 0, 0, true);
    if (!empty($imgs)) {
        foreach ($imgs as $img) {
            $img_extension = strtolower(pathinfo($img['pic_name'], PATHINFO_EXTENSION));
            $img_name = str_replace('.' . $img_extension, '', $img['pic_name']);
            $img_md5 = md5($img_name);
            $img_path = '../' . PIC_PATH . "/" . $img['pic_date'];
            is_file('../' . $img['imgurl']) ? unlink('../' . $img['imgurl']) : '';
            $img_s_array = array('41_57', '139_189', '171_244', 'orgin');
            foreach ($img_s_array as $value) {
                $file_name = $img_path . '/' . $value . '/' . ($value == 'orgin' ? $img_name . '_nowater' : $img_md5) . '.' . $img_extension;
                is_file($file_name) ? unlink($file_name) : '';
            }
        }
    }
    $user_img_array = array('big', 'small', 'medium', 'mid');
    foreach ($user_img_array as $style) {
        $userimg = MooGetphotoAdmin($uid, $style);
        is_file($userimg) ? unlink($userimg) : '';
    }
    //音乐文件
    $muiscs = $GLOBALS['_MooClass']['MooMySQL']->getAll('select path from `' . $GLOBALS['dbTablePre'] . 'art_music` where uid=' . $uid, 0, 0, 0, true);
    if (!empty($muiscs)) {
        foreach ($muiscs as $muisc) {
            $muisc_path = '../data/mp3/' . $muisc['path'];
            is_file($muisc_path) ? unlink($muisc_path) : '';
        }
    }
    $user_table = array('members_choice', 'members_base', 'members_search', 'certification', 'comment', 'congratulate_remark', 'mail_queue', 'allotuser', 'member_admininfo', 'members_action', 'mmslog', 'screen', 'validuser_id', 'test_member', 'test_vote', 'tmp', 'today_send', 'uplinkcontent', 'uplinkdata', 'vote', 'services', 'service_visitor', 'service_leer', 'service_rose', 'service_chat', 'service_friend', 'service_visitor', 'smsauths', 'smslog', 'smslog_sys', 'server_log', 'service_getadvice', 'service_contact', 'ifyouaretheone', 'pic');
    //用户相关的表
    foreach ($user_table as $table) {
        $table_name = in_array($table, array('membersfastadvance', 'membersfastsort')) ? $table . ($usertype['gender'] ? '_women' : '_man') : $table;
        if (!$GLOBALS['_MooClass']['MooMySQL']->getOne('SHOW TABLES LIKE \'' . $GLOBALS['dbTablePre'] . $table_name . '\'', true)) {
            continue;
        }
        if (MOOPHP_ALLOW_FASTDB) {
            if (in_array($table_name, array('members_search', 'members_base', 'certification', 'members_choice'))) {
                $GLOBALS['fastdb']->delete($table_name . 'uid' . $uid);
            }
        }
        $sql = 'delete from `' . $GLOBALS['dbTablePre'] . $table_name . '` where ';
        switch ($table_name) {
            case 'today_send':
                $where = '`sid`=' . $uid . ' or `uid`=' . $uid;
                break;
            case 'services':
                $where = 's_uid=' . $uid;
                break;
            case 'service_visitor':
                $where = 'uid=' . $uid . ' or visitorid=' . $uid;
                break;
            case 'service_leer':
                $where = 'receiveuid=' . $uid . ' or senduid=' . $uid;
                break;
            case 'service_rose':
                $where = 'receiveuid=' . $uid . ' or senduid=' . $uid;
                break;
            case 'service_chat':
                $where = 's_uid=' . $uid . ' or s_fromid=' . $uid;
                break;
            case 'service_friend':
                $where = 'uid=' . $uid . ' or friendid=' . $uid;
                break;
            case 'service_contact':
                $where = '`other_contact_you`=' . $uid . ' or you_contact_other=' . $uid;
                break;
            default:
                $where = '`uid`=' . $uid;
                break;
        }
        $sql = $sql . $where;
        $GLOBALS['_MooClass']['MooMySQL']->query($sql);
    }
    salert('英才会员已经删除了', 'index.php?action=allmember&h=collect&clear=1');
}
Example #5
0
        ?>
" onclick="parent.addTab('<?php 
        echo $v['uid'];
        ?>
资料','index.php?action=allmember&h=view_info&uid=<?php 
        echo $v['uid'];
        ?>
','icon')"><?php 
        echo $v['uid'];
        ?>
</a>
				<span style="display:none;position:absolute;z-index:1000;"  id="pic_commission_<?php 
        echo $v['uid'];
        ?>
"><?php 
        $img = MooGetphotoAdmin($v['uid'], 'mid');
        if ($img) {
            ?>
<img src="<?php 
            echo $img;
            ?>
" /><?php 
        } else {
        }
        ?>
</span>
			</td>
			<td align="center"><?php 
        if ($v['gender'] == 1) {
            ?>
<img src="templates/images/w.gif" alt="女" title="女"/>
Example #6
0
echo $member['uid'];
?>
">刷新</a></span>
            <div style="clear:both"></div>
        </h1>
        <div class="list-div thispageTable" id="view_info">
            <div class="userpic">
                <div style="width:220px;height:220px;text-align:center;overflow:hidden;">


                    <?php 
if ($member['images_ischeck'] == '1' && $member['mainimg']) {
    ?>
                    <img id="show_pic_1" src="<?php 
    if (MooGetphotoAdmin($member['uid'], 'mid')) {
        echo MooGetphotoAdmin($member['uid'], 'mid');
    } elseif ($member['gender'] == '1') {
        echo '../public/system/images/woman_1.gif';
    } else {
        echo '../public/system/images/man_1.gif';
    }
    ?>
" /></a>
                    <?php 
} elseif ($member['mainimg']) {
    ?>
                    <?php 
    if ($member['gender'] == '1') {
        ?>
                    <img id="show_pic_1" src="../public/system/images/woman.gif"/>
                    <?php 
Example #7
0
function ajax_getimg()
{
    $uid = MooGetGPC('uid', 'integer', 'G');
    echo $img = MooGetphotoAdmin($uid, 'big');
    serverlog(1, "", "{$GLOBALS['adminid']}号客服{$GLOBALS['username']}在匹配搜索中查看会员{$uid}的头像", $GLOBALS['adminid'], $uid);
}