/** * Get data form Ajax request and create or update Analytics model. * @return mixed */ public function actionAjax_request() { if (Yii::$app->request->isAjax) { $data = Yii::$app->request->post(); function find_($value1) { // проверка на нужную ссылку $value = '/campaigns?id='; $result = strpos($value1, $value); return $result; } function find_id($value1) { // получение id $value = '/campaigns?id='; $id = str_replace($value, '', $value1); return $id; } if (isset($data['analytics'])) { // проверка на пустоту массива $mass = $data['analytics']; for ($i = 0; $i < count($mass); $i++) { $result = find_($mass[$i][0]); if (!($result === false)) { $id = find_id($mass[$i][0]); if ($id != '') { $models = Campaigns::Get_info($id); $mass[$i][] = (int) $id; $mass[$i][] = $models->id_user; } $new[] = $mass[$i]; } } } // подготовили массив for ($i = 0; $i < count($new); $i++) { $models = Analytics::Get_info($new[$i][1], $new[$i][5]); if ($models == '') { $create_ = Analytics::Create_($new[$i]); if ($create_ != false) { $create_detail_ = Detail::Create_($new[$i], $create_); } } else { $check_detail = Detail::Get_info($models->id, $new[$i][2]); if ($check_detail == '') { $create_detail_ = Detail::Create_($new[$i], $models->id); } else { $update_detail_ = Detail::Update_($new[$i], $models->id); } } } \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; return ['data' => 'Данные успешно загружены']; } }
function is_media($FILE_NAME) { $MEDIA_REAL_TYPE = "rm,rmvb,ram,ra,mpa,mpv,mps,m2v,m1v,mpe,mov,smi,"; $MEDIA_MS_TYPE = "wmv,asf,mp3,mpg,mpeg,mp4,avi,wmv,wma,wav,dat,"; $MEDIA_FLASH_TYPE = "flv,fla,"; $DIRECT_VIEW_TYPE = "jpg,jpeg,bmp,gif,png,xml,xhtml,html,htm,mid,mht,pdf,swf,"; $EXT_NAME = strtolower(substr($FILE_NAME, strrpos($FILE_NAME, ".") + 1)); if (find_id($MEDIA_REAL_TYPE, $EXT_NAME)) { return 1; } if (find_id($MEDIA_MS_TYPE, $EXT_NAME)) { return 2; } if (find_id($MEDIA_FLASH_TYPE, $EXT_NAME)) { return 4; } if (find_id($DIRECT_VIEW_TYPE, $EXT_NAME)) { return 3; } return 0; }
} $query_d = "select USER_ID from USER where (NOT_LOGIN = 0 or NOT_MOBILE_LOGIN = 0) and find_in_set('" . $MY_ARRAY_DEPT[$I] . "',DEPT_ID_OTHER)"; $cursor_d = exequery(TD::conn(), $query_d); while ($ROWD = mysql_fetch_array($cursor_d)) { if (!find_id($USER_ID_STR, $ROWD['USER_ID'])) { $USER_ID_STR .= $ROWD['USER_ID'] . ","; } } } $USER_ID_STR_ARRAY = explode(",", $USER_ID_STR); $USER_ID_STR_ARRAY_COUNT = sizeof($USER_ID_STR_ARRAY); $I = 0; for (; $I < $USER_ID_STR_ARRAY_COUNT; ++$I) { if (!($USER_ID_STR_ARRAY[$I] == "")) { $FUNC_ID_STR = getfunmenubyuserid($USER_ID_STR_ARRAY[$I]); if (!find_id($FUNC_ID_STR, 4)) { $USER_ID_STR = str_replace($USER_ID_STR_ARRAY[$I], "", $USER_ID_STR); } } } if ($PUBLISH == "4") { $SUBJECT = str_replace("'", "\\'", $SUBJECT); $REMIND_URL = "1:notify/manage/index.php"; $SMS_CONTENT1 = sprintf(_("您提交的公告通知,标题:%s被审人") . $_SESSION['LOGIN_USER_NAME'] . _("修改并批准"), csubstr($SUBJECT, 0, 100)); send_sms($SEND_TIME, $_SESSION['LOGIN_USER_ID'], $FROM_ID, 1, $SMS_CONTENT1, $REMIND_URL); } $REMIND_URL = "1:notify/show/read_notify.php?NOTIFY_ID=" . $NOTIFY_ID; if ($SMS_REMIND1 == "on" && $USER_ID_STR != "") { send_sms($SEND_TIME, $_SESSION['LOGIN_USER_ID'], $USER_ID_STR, 1, $SMS_CONTENT, $REMIND_URL); } if ($SMS2_REMIND1 == "on") {
function config_mod($mnb, $option) { $rm = msql_read('users', $_SESSION['modsnod'], $mnb); //module $mod = $rm['module']; $bloc = $rm['block']; $param = $rm['param']; if (strpos($param, ',')) { $param = str_replace(', ', ",\n", $param); $param = ereg_replace("[\n]{2,}", "\n", $param); } $arb = msql_read('system', 'admin_modules', $mod); //props $type = $arb['category']; $prm = $arb['param']; $opt = $arb['option']; $com = $arb['command']; $com = str_replace('scroll', 'scroll scrold', $com); $arc = msql_read('lang', 'admin_modules', $mod); $fhlp = $arc['description']; if (strpos(prma('blocks'), $mod) !== false && $mod) { $type = "div"; $fhlp = $fhlp ? $fhlp : nms(90); $prm = 3; $arb["title"] = 1; } elseif (!$type && $mod != 'system') { $type = 'user_mod'; $fhlp = 'obsolete'; } elseif ($mod == 'Page_titles') { $fhlp .= ' ' . hlpbt('breadcrumb'); } if ($bloc == 'menus') { $type = 'menu_link'; $fhlp = 'menu link'; } if ($arc['help']) { $phlp = admhlp('grey', ajx($mod), 'help') . ' '; } if ($arc['option']) { $ohlp = admhlp('grey', ajx($mod), 'option') . ' '; } if ($arc['command']) { $dhlp = admhlp('grey', ajx($mod), 'command') . ' '; } //usage $rc = array('module' => bal('strong', $mod) . ' (' . $type . ') ' . $mnb, 'usage' => divc('small', $fhlp)); if ($_SESSION['line'][$param]) { $rc["article"] = lkt('', htac('section') . $param, $param); } elseif ($prm == 2) { //wait_ID if (!is_numeric($param)) { $id = find_id($param); } else { $id = $param; } if (is_numeric($id) && $param > 3) { list($dy, $frm, $suj, $amg) = pecho_arts($id); //art $rc["article"] = lkt('', '/?read=' . $id, $suj); } } $l = 'modules_' . $bloc . '_' . $mnb; $rid = randid(); $rds = array('mb', 'mm', 'mp', 'mt', 'mc', 'md', 'mo', 'mh', 'mv', 'me', 'mr', 'mi', 'mj'); foreach ($rds as $k => $v) { $rvs[$v] = $v . $rid; $dvs .= $v . $rid . '|'; } //$dvs.=; $sty = '" onkeypress="checkEnter(event,\'savmod\')'; $form .= hidden('', $rvs['mm'], $mod); //edit if ($mod == "submenus") { require_once 'spe.php'; $rc["edit"] = menus_h($mnb); if ($option) { $param = menu_h_g($option); } } if ($mod == "Banner") { $rc["edit"] = lkc("popbt", '/admin/banner', 'edit_banner'); } elseif ($mod == "user_menu") { $rc["edit"] = jump_btns($rvs['mp'], spelinks(), ' '); } elseif ($mod == "app_menu") { $rc["edit"] = btn('console', 'button/type/process/param/option/condition/root/icon/hide/private§display[,]'); } elseif ($mod == 'link' or $mod == "url") { $arr = explode('|', spelinks()); if ($_SESSION['line']) { $arr += array_flip($_SESSION['line']); } $rc["edit"] = select(array('id' => 'mps', 'onchange' => 'jumpslct(\'' . $rvs['mp'] . '\',this)', 'style' => "width:90px;"), $arr, 'vv'); } elseif ($mod == 'template') { $ra = msql_read('', ses('qb') . '_template', '', 1); if ($ra) { $rb = array_keys_r($ra, 1, 'k'); $rc["edit"] = jump_btns($rvs['mp'], $rb, ''); } } elseif ($mod == 'msql_links') { $rc["edit"] = jump_btns($rvs['mp'], 'links|rssurl|deploy', ''); } elseif ($mod == 'connector') { req('art'); $rc["edit"] = conn_edit(); $rc["edit"] .= txarea('txtarea', $param, 50, 5, 'txtnoir" onkeyup="transvalue(\'' . $rvs['mp'] . '\')" onclick="transvalue(\'' . $rvs['mp'] . '\')"; onblur="transvalue(\'' . $rvs['mp'] . '\');'); } elseif ($mod == 'desktop') { $rc["edit"] = hlpbt('desklr'); } elseif ($mod == 'cssfonts') { $rc["edit"] = jump_btns($rvs['mp'], 'fontphilum|fontmicrosys|', ' '); } elseif ($mod == 'columns') { $rc["edit"] = mod_edit('', 1, $rvs['mp']); } elseif ($mod == 'articles') { $rc["edit"] = divd('amc', artmod_edit_l($rvs['mp'], '', '')); } elseif ($mod == "design" && prmb(5)) { $rc["edit"] = picto(alert) . helps('prmb5'); } //param if ($mod == 'tab_mods' or $mod == 'MenusJ' or $mod == 'art_mod') { $rc["param"] = comline($param, $rvs['mp']); } elseif ($mod == 'app_menu') { $rc["param"] = appmenu($param, $rvs['mp']); } elseif ($mod == "submenus") { $rc["param"] = txarea($rvs['mp'], $param, 42, 4); } elseif ($prm != '0') { $rc["param"] = goodarea($param, $rvs['mp'], '', $j, 42); } else { $form .= hidden('', $rvs['mp'], ''); } if ($mod == 'desktop') { $rc["edit"] = $phlp; $rc["param"] .= ' ' . hlpbt('desklr'); } elseif ($rc["param"] && $mod != 'apps' && $phlp) { $rc["param"] .= ' ' . $phlp; } //title if ($prm != '1' && !$arb["title"]) { $rc["title"] = input(1, $rvs['mt'] . '" size="42' . $sty, $rm['title'], ""); } else { $form .= hidden('', $rvs['mt'], ''); } //bloc if ($bloc != 'system' && $bloc != 'newsletter' && $bloc != 'gsm') { $rc["bloc"] = select_j($rvs['mb'], 'system ' . prma('blocks'), $bloc, 1, $bloc, 0); } else { $form .= hidden('', $rvs['mb'], $bloc); } //condition if ($bloc != 'newsletter') { $rc["condition"] = select_j($rvs['mc'], '- home cat art', $rm['condition'], 3, $rm['condition'], 0) . ' ' . hlpbt('mod_cond'); } else { $form .= hidden('', $rvs['mc'], ''); } //command if ($com) { $rc["command"] = select_j($rvs['md'], '- ' . ajx($com), $rm['command'], 1, $rm['command'], 0) . ' ' . $dhlp; } else { $form .= hidden('', $rvs['md'], ''); } //option if ($opt != '0') { $rc["option"] = select_j($rvs['mo'], '-|' . $opt, $rm['option'], 3, $rm['option'], 0) . ' '; if ($mod == 'LOAD') { $rc["option"] .= hlpbt('art_render'); } else { $rc['option'] .= $ohlp; } } else { $form .= hidden('', $rvs['mo'], ''); } //template if ($arb["template"]) { $ara = msql_read('', ses('qb') . '_template', '', 1); if ($ara) { $tmp = implode(' ', array_keys($ara)); } $rc["template"] = select_j($rvs['me'], '- ' . ajx($tmp), $rm['template'], 1, $rm['template'], 0); } else { $form .= hidden('', $rvs['me'], ''); } //cache if ($arb["cacheable"]) { $rc["cache"] = checkbox_j($rvs['mh'], $rm['cache'], ''); } else { $form .= hidden('', $rvs['mh'], ''); } $rc["hide"] = checkbox_j($rvs['mv'], $rm['hide'], ''); //hide if ($arb["nobr"] != '0') { $rc["nobr"] = checkbox_j($rvs['mr'], $rm['nobr'], ''); } else { $form .= hidden('', $rvs['mr'], ''); } if ($arb["div"] != '0') { $rc["div"] = checkbox_j($rvs['mi'], $rm['div'], ''); } else { $form .= hidden('', $rvs['mi'], ''); } if ($arb["ajax button"] != '0') { $rc["ajax button"] = checkbox_j($rvs['mj'], $rm['js'], ''); } else { $form .= hidden('', $rvs['mj'], ''); } //script if ($type != 'system') { $oks = lj('popbt', 'popup_modsee__3_' . $mnb . '_1', 'script') . hlpbt('comline') . ' '; $oks .= lj('popbt', 'popup_modsee__3_' . $mnb, nms(65)) . ' '; } //if($mod=='LOAD')$rc["edit"]=fast_sets('load'); //render $bt .= ljb("popdel", "SaveR", $l . '_del\',\'' . $dvs, nms(43)) . ' '; $bt .= ljb('popbt', "SaveR", $l . '_new\',\'' . $dvs, nms(44)) . ' '; $bt .= ljb('popbt', "SaveR", $l . '_savb\',\'' . $dvs, nms(66)) . ' '; $bt .= ljb('popsav', "SaveR", $l . '_sav\',\'' . $dvs, nms(57)) . ' '; //master_config $ret .= '<form id="savmod" action="javascript:SaveR(\'' . $l . '_sav\',\'' . $dvs . '\')">' . $form; $ret .= on2cols($rc, 470, 5); $ret .= '</form>'; $ret .= divs('', $bt . $oks); return $ret; }
function read_msg($d, $m) { $id = find_id($d); if (!$id) { return; } $ok = sql('id', 'qda', 'v', 'id=' . $id . ' and substring(frm,1,1)!="_" and re>0'); if (!$ok) { return; } $ret = sql('msg', 'qdm', 'v', 'id=' . $id); if ($m == 2 or $m == "noimages" or $m == "nl") { $ret = kmax($ret); } if ($m != 'brut') { $ret = format_txt($ret, $m, $d); } return $ret; }
} addemailauditlog($AuditLog, $_SESSION['LOGIN_UID'], $log_data); } $query = "SELECT UID,EMAIL_RECENT_LINKMAN from USER_EXT where UID='" . $_SESSION['LOGIN_UID'] . "'"; $cursor = exequery(TD::conn(), $query); if ($ROW = mysql_fetch_array($cursor)) { $UID_EXT = $ROW['UID']; $RECENT_LINKMAN = $ROW['EMAIL_RECENT_LINKMAN']; } $TO_ID_STR_ADD = ""; $TO_ID_STR_RECENT = $TO_ID_STR . td_trim($RECENT_LINKMAN); $TO_ID_STR_RECENT_ARRAY = explode(",", td_trim($TO_ID_STR_RECENT)); $TO_ID_STR_RECENT_COUNT = count($TO_ID_STR_RECENT_ARRAY); $I = 0; for (; $I < $TO_ID_STR_RECENT_COUNT; ++$I) { if (!find_id($TO_ID_STR_ADD, $TO_ID_STR_RECENT_ARRAY[$I])) { $TO_ID_STR_ADD .= $TO_ID_STR_RECENT_ARRAY[$I] . ","; } } if (isset($UID_EXT)) { $query = "update USER_EXT set EMAIL_RECENT_LINKMAN='" . $TO_ID_STR_ADD . "' where UID='" . $_SESSION['LOGIN_UID'] . "'"; } else { $query = "insert into USER_EXT (UID,USER_ID,EMAIL_RECENT_LINKMAN) values ('" . $_SESSION['LOGIN_UID'] . "','" . $_SESSION['LOGIN_USER_ID'] . ("','" . $TO_ID_STR_ADD . "')"); } exequery(TD::conn(), $query); echo $NEW_SMS_HTML; } if ($SEND_FLAG == 1 || $SEND_FLAG == 2) { if ($SEND_FLAG == 1) { echo "<script type=\"text/javascript\">\r\nif(parent && typeof(parent.getBoxCount) == 'function')\r\n{\r\n var tmp = parent.getBoxCount('sentbox');\r\n parent.setBoxCount('sentbox',tmp+1)\r\n}\r\n</script>\r\n"; } else {
$query_d = "select USER_ID from USER where (NOT_LOGIN = 0 or NOT_MOBILE_LOGIN = 0) and find_in_set('" . $MY_ARRAY_DEPT[$I] . "',DEPT_ID_OTHER)"; $cursor_d = exequery(TD::conn(), $query_d); while ($ROWD = mysql_fetch_array($cursor_d)) { if (!find_id($USER_ID_STR, $ROWD['USER_ID'])) { $USER_ID_STR .= $ROWD['USER_ID'] . ","; } } } } $USER_ID_STR_ARRAY = explode(",", $USER_ID_STR); $USER_ID_STR_ARRAY_COUNT = sizeof($USER_ID_STR_ARRAY); $I = 0; for (; $I < $USER_ID_STR_ARRAY_COUNT; ++$I) { if (!($USER_ID_STR_ARRAY[$I] == "")) { $FUNC_ID_STR = getfunmenubyuserid($USER_ID_STR_ARRAY[$I]); if (!find_id($FUNC_ID_STR, 147)) { $USER_ID_STR = str_replace($USER_ID_STR_ARRAY[$I], "", $USER_ID_STR); } } } if ($PUBLISH == "1" && $SMS_REMIND == "on") { $REMIND_URL = "1:news/show/read_news.php?NEWS_ID=" . $NEWS_ID; $SMS_CONTENT = _("请查看新闻!") . "\n" . _("标题:") . csubstr($SUBJECT, 0, 80); if ($SUMMARY) { $SMS_CONTENT .= "\n" . _("内容简介:") . $SUMMARY; } if ($USER_ID_STR != "") { send_sms($SEND_TIME, $_SESSION['LOGIN_USER_ID'], $USER_ID_STR, 14, $SMS_CONTENT, $REMIND_URL); } include_once "inc/itask/itask.php"; mobile_push_notification(userid2uid($USER_ID_STR), $_SESSION['LOGIN_USER_NAME'] . _(":") . _("请查看新闻!") . _("标题:") . csubstr($SUBJECT, 0, 20), "news");
include_once "inc/conn.php"; include_once "inc/utility.php"; include_once "inc/utility_update.php"; $mn = array("mid" => "z013", "name" => "微信企业号管理", "code" => "system/weixinqy"); if (!sys_func_exists($mn)) { $func_id = 0; $sql = "select MAX(FUNC_ID) from sys_function"; $cursor = exequery(TD::conn(), $sql); $ROW = mysql_fetch_array($cursor); $func_id = $ROW[0]; $func_id += 1; $sql_office = "INSERT INTO SYS_FUNCTION (FUNC_ID,MENU_ID,FUNC_NAME,FUNC_CODE) VALUES ('{$func_id}','{$mn['mid']}','{$mn['name']}','{$mn['code']}');"; exequery(TD::conn(), $sql_office); $query = "select FUNC_ID_STR from user_priv where USER_PRIV = '1'"; $cursor = exequery(TD::conn(), $query); if (($ROW = mysql_fetch_array($cursor)) && !find_id($ROW['FUNC_ID_STR'], $func_id)) { $update = "update user_priv set FUNC_ID_STR = '" . $ROW['FUNC_ID_STR'] . "{$func_id},' where USER_PRIV = '1'"; exequery(TD::conn(), $update); } cache_menu(); } //Add instant message offline push task $taskcode = "inst_msg_offl_push"; $taskfile = dirname($_SERVER['PHP_SELF']) . "/task/instant_msg_offline_push.php"; add_task($taskfile, $taskcode); $UPDATE_TIPS = "<div class=\"update_tips\">" . _("安装 微信企业号功能包 成功!") . "</div>"; echo $UPDATE_TIPS; ob_end_clean(); //////////////////////////////////////////// function add_task($file, $code) {
function estorno($transaction_id) { // exemplo de transaction_id: 7C78FDFB90214361B8F266502BEE27B9 // Normalizamos, retirando caracteres inválidos e passando para minúsculas: $transaction_id = preg_replace("/[^0-9A-Z]/", "", strtoupper($transaction_id)); // converte id de transação para id interno: $id = find_id($transaction_id); if (!$id) { return "Não achei a transação"; } // pega html da página de detalhes: $html = http_read("https://pagseguro.uol.com.br/transaction/details.jhtml?id={$id}"); // se html não é o esperado tenta logar novamente: if (!preg_match("#<div id='codtrans'>(.*?)</div>#s", $html, $matches)) { login(); $html = http_read("https://pagseguro.uol.com.br/transaction/details.jhtml?id={$id}"); // se ainda assim não é o esperado, sai fora if (!preg_match("#<div id='codtrans'>(.*?)</div>#s", $html, $matches)) { return "Página não está no formato esperado"; } } // pega form de estorno: if (!preg_match("#<form id=\"refund\".* action=[\"']([^ \"']*)[^>]*(.*)</form>#s", $html, $matches)) { return "Form de estorno não encontrado"; } $url = "https://pagseguro.uol.com.br/" . $matches[1]; $str_campos = $matches[2]; // campos do form: if (!preg_match_all("#<input.*name=[\"']([^\"']*)[\"'] *(value=[\"']([^\"']*)[\"'])?#", $str_campos, $matches)) { return "Campos de estorno não encontrados"; } $form = array_combine($matches[1], $matches[3]); // faz a chamada de estorno: $html = http_read($url, http_build_query($form)); // return preg_match("#O pagamento será estornado na próxima fatura do cartão de crédito do cliente.#", $html, $matches); // fim: return true; }
$ORG_SUBJECT = $SUBJECT; $TYPE_NAME = get_code_name($TYPE_ID, "NEWS"); if ($SUBJECT_COLOR != "") { $SUBJECT = "<font color='" . $SUBJECT_COLOR . "'>" . $SUBJECT . "</font>"; } $FORMAT = $ROW['FORMAT']; $COMPRESS_CONTENT = @gzuncompress($ROW['COMPRESS_CONTENT']); if ($COMPRESS_CONTENT != "" && $FORMAT != "2") { $CONTENT = $COMPRESS_CONTENT; } else { $CONTENT = $ROW['CONTENT']; } $ATTACHMENT_ID = $ROW['ATTACHMENT_ID']; $ATTACHMENT_NAME = $ROW['ATTACHMENT_NAME']; $NEWS_TIME = substr($NEWS_TIME, 0, 10); if (!find_id($READERS, $_SESSION['LOGIN_USER_ID'])) { $READERS .= $_SESSION['LOGIN_USER_ID'] . ","; $query = "update news set READERS='" . $READERS . "',CLICK_COUNT='{$CLICK_COUNT}' where NEWS_ID='{$NEWS_ID}'"; } else { $query = "update NEWS set CLICK_COUNT='" . $CLICK_COUNT . "' where NEWS_ID='{$NEWS_ID}'"; } exequery(TD::conn(), $query); $query1 = "SELECT USER_NAME from USER where USER_ID='" . $PROVIDER . "'"; $cursor1 = exequery(TD::conn(), $query1); if ($ROW = mysql_fetch_array($cursor1)) { $FROM_NAME = $ROW['USER_NAME']; } else { $FROM_NAME = $FROM_ID; } if ($FORMAT == "2") { header("location: " . $CONTENT);
$EMAIL = ""; } $query = "insert into EMAIL_BODY(FROM_ID,TO_ID2,COPY_TO_ID,SUBJECT,CONTENT,SEND_TIME,ATTACHMENT_ID,ATTACHMENT_NAME,SEND_FLAG,SMS_REMIND,FROM_WEBMAIL,TO_WEBMAIL,COMPRESS_CONTENT,WEBMAIL_CONTENT,FROM_WEBMAIL_ID,IS_WEBMAIL) values ('" . $_SESSION['LOGIN_USER_ID'] . ("','" . $TO_ID . "','{$CS_ID}','{$SUBJECT}','{$CONTENT_STRIP}','{$SEND_TIME}','{$ATTACHMENT_ID}','{$ATTACHMENT_NAME}','1','1','{$EMAIL}','{$WEBMAIL}',{$COMPRESS_CONTENT},compress('{$WEBMAIL_CONTENT}'),'{$FROM_WEBMAIL_ID}','{$IS_WEBMAIL1}')"); exequery(TD::conn(), $query); $BODY_ID = mysql_insert_id(); $IMPORTANT = "0"; if ($WEBMAIL != "") { $query = "insert into EMAIL(TO_ID,READ_FLAG,DELETE_FLAG,BODY_ID) values ('__WEBMAIL__" . $BODY_ID . "','0','0','{$BODY_ID}')"; exequery(TD::conn(), $query); $result = proxy_mail("1", $BODY_ID, $IMPORTANT); } $TO_ID .= "," . $CS_ID . ","; $TOK = strtok($TO_ID, ","); $strSEND = ""; while ($TOK != "") { if ($TOK == "" || find_id($strSEND, $TOK)) { $TOK = strtok(","); } else { $strSEND .= $TOK . ","; $query = "insert into EMAIL(TO_ID,READ_FLAG,DELETE_FLAG,BODY_ID) values ('" . $TOK . "','0','0','{$BODY_ID}')"; exequery(TD::conn(), $query); $ROW_ID = mysql_insert_id(); $REMIND_URL = "email/inbox/read_email/read_email.php?BOX_ID=0&BTN_CLOSE=1&FROM=1&EMAIL_ID=" . $ROW_ID; $SMS_CONTENT = sprintf(_("请查收我的邮件!") . "\n" . _("主题:%s"), csubstr($SUBJECT, 0, 100)); send_sms("", $_SESSION['LOGIN_USER_ID'], $TOK, 2, $SMS_CONTENT, $REMIND_URL); $WX_NEED_USER_ID_ARR[] = $TOK; $TOK = strtok(","); } } if ($ATYPE == "fw") { $queryfw = "update EMAIL set IS_F='1' where EMAIL_ID='" . $EMAIL_ID . "'";