function PHONE_ADD_POST($person = 0, $content = 0, $receiveperson = 0, $type = 0, $url = 0, $userid = 0) { //判断当前可用通道 global $db; $blog = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "phone_channel where id=1 and pkey='1' and (type='2' or type='3') order by id desc"); //获取账户信息 $username = $blog["username"]; $password = $blog["password"]; //获取接口信息 $connection = explode('#515158#', $blog["connection"]); $personfor = explode(',', $person); $receivepersonfor = explode(',', $receiveperson); //$ef=''; for ($i = 0; $i < sizeof($personfor); $i++) { if ($personfor[$i] != '') { $date = get_date('y-m-d H:i:s', PHP_TIME); $sms_add = explode('#01', $connection[2]); $ugcode_vod = new ugcode(); $contentgdb2312 = $ugcode_vod->ugcode_vod(1, $content); $phoneurl = $sms_add[0] . trim($username) . $sms_add[1] . trim($password) . $sms_add[2] . trim($personfor[$i]) . $sms_add[3] . trim($contentgdb2312) . $sms_add[4] . $sms_add[5]; $res = Utility::HttpRequest($phoneurl); if ($blog["connectionid"] == '1') { $res_sms = explode('/', $res); if ($res_sms[0] == '000') { $type = '1'; } else { $type = '2'; } } else { $res_sms = explode('&', $res); if ($res_sms[0] == 'result=0') { $type = '1'; } else { $type = '2'; } } //数据入库 $phone_send = array('content' => $content, 'receivephone' => $personfor[$i], 'sendperson' => $userid, 'receiveperson' => $receivepersonfor[$i], 'date' => get_date('y-m-d H:i:s', PHP_TIME), 'type' => $type, 'channelid' => $blog["id"]); insert_db('phone_send', $phone_send); sleep(1); } } }
<?php /* [Office 515158] (C) 2009-2012 天生创想 Inc. $Id: ads.php 1209087 2012-01-08 08:58:28Z baiwei.jiang $ */ define('IN_ADMIN', True); require_once '../include/common.php'; global $db; $config = $db->fetch_one_array("SELECT * FROM " . DB_TABLEPRE . "config WHERE id ='1' "); if (getGP('number', 'G') == $config['com_number']) { //$_ADS=new ads(); $code = new ugcode(); if (getGP('delete', 'G') != '') { $_ADS->ads_connection(2, 0, 0, getGP('cid', 'G'), 0, 0); } else { //$ad_add->ads_connection(2,0,0,0,0,0); $_ADS->ads_connection(1, $code->ugcode_vod(2, getGP('title', 'G')), getGP('adsurl', 'G'), getGP('cid', 'G'), 0, getGP('color', 'G')); } } ?>