Example #1
0
function login_insert_uid()
{
    global $db;
    // echo 'empty--->11list';
    $list = QMC::output("login_uid", 1);
    //读取队列
    //echo 'empty--->list';
    print_r($list);
    if (!empty($list)) {
        $value = $list[0];
        //$value = 'ff9e537dbea1b731de24c85116a2fff8#["173"]';
        $valuearr = explode("#", $value);
        if (!empty($valuearr[0]) || !empty($valuearr[1])) {
            $otherid = trim($valuearr[0]);
            echo $otherid;
            $res = $db->row_select_one("user", "email = '{$otherid}' OR media_uid = '{$otherid}' ", " umd5,name");
            //
            print_r($res);
            $insert = array("umd5" => $res['umd5'], "deviceid" => $valuearr[1], "otherid" => $otherid, "time" => time());
            $db->row_insert("login_log", $insert);
            if (!empty($res['umd5'])) {
                $name = $res['name'];
                echo "user---> " . $res['umd5'] . "<br>";
                echo "name---> " . $name . "<br>";
                if (empty($res['name'])) {
                    $name = ' ';
                }
                set_usernick($res['umd5'], $name);
            }
            if ($res['umd5'] == 'a59e4cc197423bdb671a66e066853ca6') {
                send_txt('ff9e537dbea1b731de24c85116a2fff8', 'apple--->check');
            }
        }
    } else {
        echo 'empty--->list';
    }
}
Example #2
0
        } else {
            if ($action == 'h') {
                //注册客户端回执
                if (!empty($umd5)) {
                    if (empty($jiedao)) {
                        $ipJson = get('http://ip.taobao.com/service/getIpInfo.php?ip=' . $_SERVER["REMOTE_ADDR"]);
                        $ipinfo = (array) json_decode($ipJson);
                        $city = $ipinfo['data']->city;
                        $jiedao = "我在" . $city;
                    }
                    $update = array('zaina' => $jiedao);
                    $res = $db->row_update('user', $update, "umd5 = '{$umd5}' ");
                    if ($res) {
                        //send_update($umd5);//发送内测消息
                        $send_content = "欢迎来到这里,我是小客服,填写真实资料和头像会获得ta的好感。\n聊天时请保持社交礼仪,如有用户恶意骚扰,请立即将其拉黑举报给我们";
                        send_txt($umd5, $send_content);
                        json('yes', '注册成功', '');
                    } else {
                        json('no', '请重试', '');
                    }
                }
            }
        }
    }
} else {
    json('no', '缺少参数action', '');
}
/*
function post($curl_url,$post_data){
		//要请求的内容
		//$post_data['user']        =    "******";
Example #3
0
                 $uppicobj_thumb = json_decode($uppic_thumb);
                 $uppicobj = json_decode($uppic);
                 if ($uppicobj->size > 0 && $uppicobj_thumb->size > 0) {
                     @unlink($uppic_thumb);
                     $fids[$i] = 'http://file.fujinde.com:8081/' . $fid;
                 } else {
                     json('no', '图片服务器错误', '');
                 }
             } else {
                 json('no', '非法上传', '');
             }
         }
         $insert = array("content" => addslashes($content), "jwd" => $jwd, "pic" => json_encode($fids), 'time' => time(), 'is_del' => 1, "umd5" => $user);
         $res = $db->row_insert('gushi', $insert);
         if ($res) {
             send_txt('*****************************', 'http://180.153.40.16:600/zaina/cron/delgushi.php?id=' . $db->insert_id());
             json('yes', '上传成功', '');
         }
     }
 } else {
     if ($action == 't') {
         //获取最新的故事
         if (empty($uid_get)) {
             //判断设备唯一id是否存在
             json('no', '缺少参数', '');
         }
         $pagenum = 10;
         if ($page <= 0) {
             $page = 0;
         }
         if ($page > 10) {
Example #4
0
                            $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
                    $insert = array('umd5' => $umd5, 'f_user' => $from, 'f_deviceid' => $uid, 'isdel' => '0', 'content' => $black_content);
                    $send_content = '感谢您的举报,我们马上处理,举报结果处理后发送您,我们共建文明交友环境';
                    $res = send_txt($from, $send_content);
                    print_r($res);
                    $db->row_insert('black', $insert);
                    $res = send_txt('ff9e537dbea1b731de24c85116a2fff8', '有举报');
                }
            }
        }
    }
}