$mem->connect("172.18.1.23", 12000); $issend = $mem->get($from . $umd5 . 'is_look_send'); if (empty($issend)) { $res_from = $db->row_select_one("user", "umd5 = '{$from}' ", " name , headurl , sex, age"); $from_name = $res_from['name']; $from_sex = $res_from['sex'] == 1 ? '男' : '女'; $from_age = $res_from['age']; $send_content = "昵称:" . $from_name . "\n性别:" . $from_sex . "\n年龄:" . $from_age . "岁" . "\n刚刚访问了您的主页.\n发布您的故事让更多人了解你。"; if ($res['version'] < 2) { send_txt($umd5, $send_content); } else { $content['headurl'] = $res_from['headurl']; $content['username'] = $from_name; $ext = array("attr" => "card", "content" => $from_sex . " " . $from_age . "岁 \n\n ta 刚刚访问了您的主页。发布您的故事让更多人了解你。", "user" => $from); //$umd5 = 'ff9e537dbea1b731de24c85116a2fff8'; send_card($umd5, $content, $ext); } $mem->set($from . $umd5 . 'is_look_send', "1", 0, 60000); } json('yes', '', $res_json); } else { json('no', '暂无该用户', ""); } } else { if ($action == 'd') { //拉黑举报 $black_content = $_GET['black_content']; if (is_array($black_content)) { $black_content = json_encode($black_content); } //$umd5
function zan_send() { global $db; // echo 'empty--->11list'; $list = QMC::output("upzan", 1); //读取队列 echo '<br>zan_send--->list<br>'; // $list = array('ff9e537dbea1b731de24c85116a2fff8#["128"]'); print_r($list); if (!empty($list)) { $value = $list[0]; $valuearr = explode("#", $value); if (!empty($valuearr[0]) || !empty($valuearr[1])) { $from = trim($valuearr[0]); $res_from = $db->row_select_one("user", "umd5 = '{$from}' ", " name , headurl , sex, age"); $from_name = $res_from['name']; $from_sex = $res_from['sex'] == 1 ? '男' : '女'; $from_age = $res_from['age']; $headurl = $res_from['headurl']; $gushi_id_json = trim($valuearr[1]); $itemzanarr = json_decode($gushi_id_json); foreach ($itemzanarr as $item) { $res = $db->row_select_one("gushi", " id = '{$item}' ", " umd5 , content"); // $to = $res['umd5']; echo $to . "--->send<br>"; $content_gushi = $res['content']; $slstr = strCut($content_gushi, 31); $content['headurl'] = $headurl; $content['username'] = $from_name; $ext = array("attr" => "card", "content" => $from_sex . " " . $from_age . "岁 \n\n ta 赞了您的相册 \n" . $slstr, "user" => $from); //echo $from_name; $sendlog = send_card($to, $content, $ext); //print_r($sendlog); } } } else { echo 'zan_send--->empty'; } }