$_POST["birthday"] = $birthday;
 $_POST["startyear"] = $res['startyear'];
 $_POST["academy"] = $res['academy'];
 $_POST["country"] = $res['country'];
 $_POST["school"] = $res['school'];
 $_SGLOBAL["inviteactive_showemail"] = true;
 $_SGLOBAL["no_inviteactive"] = true;
 $inviteactive_showmsg = true;
 $country = $_POST['country'];
 $school = $_POST['school'];
 $_SCONFIG['overseas'] = true;
 include_once 'do_quickmarkregister.php';
 $lng = '';
 $lat = '';
 try {
     $res = getIpDetails();
     $lng = $res['longitude'];
     $lat = $res['latitude'];
     $forg = array("uid" => $newuid, "ip" => getonlineip(), "country" => $country, "school" => $school, "lng" => $lng, "lat" => $lat);
     inserttable("spaceforeign", $forg);
     //设置隐私
     $_SGLOBAL['db']->query("INSERT INTO " . tname('spaceinfo') . " (type,subtype,uid,friend) VALUES ('contact','mobile'," . $newuid . ",1)");
     $query = $_SGLOBAL['db']->query("UPDATE " . tname("spaceforeign") . " SET dataline='" . time() . "' WHERE uid={$newuid}");
     //给外事处发消息进行认证
     $query = $_SGLOBAL['db']->query("SELECT * FROM " . tname("space") . " WHERE consul=1");
     if ($res = $_SGLOBAL['db']->fetch_array($query)) {
         $recver = $res['uid'];
     }
     $setarr = array('uid' => $recver, 'type' => "friend", 'new' => 1, 'authorid' => $newuid, 'author' => $name, 'note' => "({$birthday},{$academy}," . $startyear . "级)" . '向您发起了' . $country . $school . '学校的认证请求<br/><a href="space.php?do=friend&view=confirmoverseas&uid=%27' . $newuid . '%27&type=overseas">通过请求</a><span class="pipe">|</span><a href="space.php?do=friend&view=refuseoverseas&uid=%27' . $newuid . '%27&type=overseas">忽略</a>', 'dateline' => $_SGLOBAL['timestamp']);
     $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET notenum=notenum+1 WHERE uid='{$recver}'");
     inserttable('notification', $setarr);
示例#2
0
     }
 }
 $_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET " . implode(',', $setarr) . " WHERE uid='{$_SGLOBAL['supe_uid']}'");
 $title_template = cplang(cplang('feed_doing_title'));
 $title_data = saddslashes(serialize(sstripslashes(array('message' => $message))));
 $body_template = $body_data = '';
 if ($complainOK) {
     $title_template = cplang(cplang('feed_complain'));
     $title_data = '';
     $body_template = '{message}';
     $body_data = saddslashes(serialize(sstripslashes(array('message' => $message))));
 }
 //ʼþfeed
 if ($add_doing) {
     $ip = getonlineip();
     $ip_detail = getIpDetails();
     $lon = $ip_detail['latitude'];
     $lat = $ip_detail['longitude'];
     $pos = "http://lbs.juhe.cn/api/getaddressbylngb?lngx=" . $lat . "&lngy=" . $lon;
     $opts = array('http' => array('method' => 'GET', 'time' => 1));
     $context = stream_context_create($opts);
     $res = file_get_contents($pos, false, $context);
     $res = json_decode($res, 1);
     $address = $res['row']['result']['formatted_address'];
     if ($picid && $filepath) {
         $feedarr = array('appid' => UC_APPID, 'icon' => 'doing', 'uid' => $_SGLOBAL['supe_uid'], 'username' => $_SGLOBAL['supe_username'], 'dateline' => $_SGLOBAL['timestamp'], 'title_template' => $title_template, 'title_data' => $title_data, 'body_template' => $body_template, 'body_data' => $body_data, 'id' => $newdoid, 'idtype' => 'doid', 'fromdevice' => 'web', 'image_1' => pic_get($filepath, 1, 0), 'image_1_link' => "space.php?uid={$_SGLOBAL['supe_uid']}&do=album&picid={$picid}", 'ip' => $ip, 'address' => $address);
     } else {
         $feedarr = array('appid' => UC_APPID, 'icon' => 'doing', 'uid' => $_SGLOBAL['supe_uid'], 'username' => $_SGLOBAL['supe_username'], 'dateline' => $_SGLOBAL['timestamp'], 'title_template' => $title_template, 'title_data' => $title_data, 'body_template' => $body_template, 'body_data' => $body_data, 'id' => $newdoid, 'idtype' => 'doid', 'fromdevice' => 'web', 'ip' => $ip, 'address' => $address);
     }
     $feedarr['hash_template'] = md5($feedarr['title_template'] . "\t" . $feedarr['body_template']);
     //ϲºÃhash