function updateWorkplanmain($id) { global $db; $state = 0; $sql = "select * from workplanmain_detail where mainrowid={$id}"; $rs = $db->Execute($sql); $rs_a = $rs->GetArray(); if (sizeof($rs_a) > 0) { $state = 1; } $sql = "select * from workplanmain where id={$id}"; $rs = $db->Execute($sql); $rs_a = $rs->GetArray(); if (sizeof($rs_a) == 1) { $flag = true; $zhixingren = $rs_a[0]['zhixingren']; $zhixingrenArray = explode(",", $zhixingren); for ($i = 0; $i < sizeof($zhixingrenArray); $i++) { if ($zhixingrenArray[$i] != '') { $sql = "select * from workplanmain_detail where createman='" . $zhixingrenArray[$i] . "' and mainrowid={$id} and result=1"; $rs = $db->Execute($sql); $rs_b = $rs->GetArray(); if (sizeof($rs_b) == 0) { $flag = false; } } } $sql = "select max(createtime) as maxtime from workplanmain_detail where mainrowid={$id}"; $rs = $db->Execute($sql); $rs_b = $rs->GetArray(); $maxtime = ''; if (!empty($rs_b[0][maxtime])) { $maxtime = $rs_b[0][maxtime]; } if ($flag) { $state = 2; } if ($state == 2) { newMessage($rs_a[0]['createman'], $rs_a[0]['zhuti'], '工作任务完结', '../CRM/workplanmain_newai.php?' . base64_encode('action=view_default&id=' . $id), $id); $sql = "update workplanmain set state={$state},finishtime=now(),lastzhixingtime='{$maxtime}' where id={$id}"; } else { $sql = "update workplanmain set state={$state},finishtime=null,lastzhixingtime='{$maxtime}' where id={$id}"; } $db->Execute($sql); } }
require_once $mainframe->getPath('admin_html'); require_once $mainframe->getPath('class'); $task = trim(mosGetParam($_REQUEST, 'task', null)); $cid = mosGetParam($_REQUEST, 'cid', array(0)); if (!is_array($cid)) { $cid = array(0); } switch ($task) { case "view": viewMessage($cid[0], $option); break; case "new": newMessage($option, NULL, NULL); break; case "reply": newMessage($option, mosGetParam($_REQUEST, 'userid', 0), mosGetParam($_REQUEST, 'subject', '')); break; case "save": saveMessage($option); break; case "remove": removeMessage($cid, $option); break; case "config": editConfig($option); break; case "saveconfig": saveConfig($option); break; default: showMessages($option);
$db->StartTrans(); $SQL = "update crm_contact set customerid='" . $_POST[customerid] . "',linkmanid='" . $_POST[linkmanid] . "',chance='" . $_POST[chance] . "',user_id='" . $_POST[user_id] . "',createman='" . $_POST[createman] . "',contact='" . $_POST[contact] . "',stage='" . $_POST[stage] . "',describes='" . $_POST[describes] . "',createtime='" . $_POST[createtime] . "',contacttime='" . $_POST[contacttime] . "',nextcontacttime='" . $_POST[nextcontacttime] . "',nextissue='" . $_POST[nextissue] . "',alreadycontact='" . $_POST[alreadycontact] . "',priority='" . $_POST[priority] . "',public='" . $_POST['public'] . "' where id=" . intval($_GET[id]); $rs = $db->Execute($SQL); $id = $_GET[id]; //同步修改机会表 if ($_POST[chance] != '') { $sql = "update crm_chance set `最后联系时间`='" . $_POST[contacttime] . "',`当前阶段`='" . $_POST[stage] . "' where `编号`='" . $_POST[chance] . "'"; $rs = $db->Execute($sql); } deleteMessage('客户联系提醒', $id); deleteCalendar('联系客户', $id); //设置提醒 if ($_POST[nextcontacttime] != '') { $custName = returntablefield("customer", "rowid", $_POST[customerid], "supplyname"); $url = '../JXC/crm_contact_newai.php?' . base64_encode('action=view_default&id=' . $id); newMessage($_POST[createman], '联系客户 ' . $custName, '客户联系提醒', $url, $id, $_POST[nextcontacttime]); $EndTime = strtotime("{$_POST['nextcontacttime']} +1 hour"); $EndTime = date("Y-m-d H:i:s", $EndTime); $url = '../' . $url; newCalendar($_POST[createman], $_POST[nextcontacttime], $EndTime, '联系客户', '1', $custName . ":" . $_POST[nextissue], $url, $id); } $db->CompleteTrans(); if ($db->HasFailedTrans()) { print "<script language=javascript>alert('错误:" . str_replace("'", "\\'", $db->ErrorMsg()) . "');window.history.back(-1);</script>"; exit; } updateLastTrace($_POST[customerid]); $return = FormPageAction("action", "init_default"); print_infor("修改成功", 'trip', "location='?{$return}'", "?{$return}", 1); exit; }
*/ // no direct access defined('_JEXEC') or die('Restricted access'); require_once JApplicationHelper::getPath('admin_html'); $task = JRequest::getCmd('task'); $cid = JRequest::getVar('cid', array(0), '', 'array'); JArrayHelper::toInteger($cid, array(0)); switch ($task) { case 'view': viewMessage($cid[0], $option); break; case 'add': newMessage($option, NULL, NULL); break; case 'reply': newMessage($option, JRequest::getVar('userid', 0, '', 'int'), JRequest::getString('subject')); break; case 'save': saveMessage($option); break; case 'remove': removeMessage($cid, $option); break; case 'config': editConfig($option); break; case 'saveconfig': saveConfig($option); break; default: showMessages($option);
$SYSTEM_PRIV_STOP = "1"; validateMenuPriv("公告通知"); global $db; if ($_GET['action'] == "add_default_data" || $_GET['action'] == "edit_default_data") { //新增消息通知 $touser = explode(",", $_POST["to_user"]); $messagetitle = "公告通知"; $guanlianid = $_POST["id"]; if ($_GET['action'] == "edit_default_data") { $guanlianid = $_GET["id"]; deleteMessage($messagetitle, $guanlianid); } $db->StartTrans(); for ($i = 0; $i < sizeof($touser); $i++) { if ($touser[$i] != "") { newMessage($touser[$i], $_POST['title'], $messagetitle, '../CRM/notify_newai.php?' . base64_encode('action=view_default&id=' . $guanlianid), $guanlianid); $userInfo = returntablefield("user", "user_id", $touser[$i], "user_name,email,MOBIL_NO"); $destlist[$i]['email'] = $userInfo['email']; $destlist[$i]['mobile'] = $userInfo['MOBIL_NO']; $destlist[$i]['name'] = $userInfo['user_name']; } } $db->CompleteTrans(); //新增邮件通知 if ($_POST['ifemail'] == '1') { sendEmail($destlist, $_POST['title'], $_POST['content']); } //新增短信通知 if ($_POST['ifsms'] == '1') { $mobiles = ''; for ($i = 0; $i < sizeof($destlist); $i++) {
} break; case "leaveLobby": if (isPlayerInLobby($uid) == $lid) { leaveLobby($id); } if ($lobby->leader == $uid && countPlayers($lid) == 0) { deleteLobby($lid); } break; case "showChat": echo displayChat($lid); break; case "newMessage": if ($message) { echo newMessage($uid, $lid, $message); } break; } } if ($lid) { switch ($request) { case "lobbyinfo": $lobbyinfo = $lobby->lobbyinfo(); $lobbyplayers = $lobby->lobbyData(); $count = countPlayers($lid); updateLobbyReady($lid); if ($lobby->status == "ready") { removeOfflinePlayers(checkOfflinePlayers($lid)); } $array = array('id' => $uid, 'ready' => readystatus($id, true), 'inlobby' => isPlayerInLobby($uid), 'info' => $lobbyinfo, 'count' => $count, 'players' => $lobbyplayers);
session_start(); $action = isset($_GET['action']) ? $_GET['action'] : ""; $username = isset($_SESSION['username']) ? $_SESSION['username'] : ""; if ($action != "login" && $action != "logout" && !$username) { login(); exit; } switch ($action) { case 'login': login(); break; case 'logout': logout(); break; case 'newMessage': newMessage(); break; case 'editMessage': editMessage(); break; case 'deleteMessage': deleteMessage(); break; case 'listMessages': listMessages(); break; case 'newUser': newUser(); break; case 'editUser': editUser();
} //print_r($ADDINIT);exit; } if ($_GET['action'] == "add_default_data" || $_GET['action'] == "edit_default_data") { //新增消息通知 $touser = explode(",", $_POST["zhixingren"]); $messagetitle = "工作任务"; $guanlianid = $_POST["id"]; if ($_GET['action'] == "edit_default_data") { $guanlianid = $_GET["id"]; deleteMessage($messagetitle, $guanlianid); } $db->StartTrans(); for ($i = 0; $i < sizeof($touser); $i++) { if ($touser[$i] != "") { newMessage($touser[$i], $_POST['zhuti'], $messagetitle, '../CRM/workplanmain_newai.php?' . base64_encode('action=view_default&id=' . $guanlianid), $guanlianid); } $userInfo = returntablefield("user", "user_id", $touser[$i], "user_name,email,MOBIL_NO"); $destlist[$i]['email'] = $userInfo['email']; $destlist[$i]['mobile'] = $userInfo['MOBIL_NO']; $destlist[$i]['name'] = $userInfo['user_name']; } if ($_GET['action'] == "add_default_data" && $_POST['guanlianshiwu'] == "客户服务") { $sql = "update crm_service set 严重程度='3' where 编号='" . $_POST['guanlianid'] . "' and 严重程度='2'"; $db->Execute($sql); } $db->CompleteTrans(); //新增邮件通知 if ($_POST['ifemail'] == '1') { sendEmail($destlist, $_POST['zhuti'], $_POST['content']); }
* See COPYRIGHT.php for copyright notices and details. */ // no direct access defined('_VALID_MOS') or die('Restricted access'); require_once $mainframe->getPath('admin_html'); require_once $mainframe->getPath('class'); $cid = josGetArrayInts('cid'); switch ($task) { case 'view': viewMessage($cid[0], $option); break; case 'new': newMessage($option, NULL, NULL); break; case 'reply': newMessage($option); break; case 'save': saveMessage($option); break; case 'remove': removeMessage($cid, $option); break; case 'config': editConfig($option); break; case 'saveconfig': saveConfig($option); break; default: showMessages($option);
$num = $billinfo['出库数量']; $prodid = $billinfo['办公用品编号']; $storeid = $billinfo['出库仓库']; $sql = "update officeproduct set 数量=数量+{$num},合计金额=round(数量*单价,2) where 办公用品编号='{$prodid}' and 存放地点='{$storeid}'"; $db->Execute($sql); $sql = "update officeproductout set `是否归还`=2,`归还接收人`='" . $_SESSION['LOGIN_USER_ID'] . "',`实际归还日期`='" . date('Y-m-d H:m:s') . "' where `编号`='" . $_GET['编号'] . "'"; $db->Execute($sql); page_css(); $return = FormPageAction("action", "init_default"); print_infor("已设置为归还", 'trip', "location='?{$return}'", "?{$return}", 0); exit; } if ($_GET['action'] == "add_default_data") { if ($_POST['批准人'] == '') { print "<script language=javascript>alert('审核人不能为空');window.history.back(-1);</script>"; exit; } if ($_POST['归还期限'] == '') { $_POST['是否归还'] = '0'; } else { $_POST['是否归还'] = '1'; } $username = returntablefield("user", "user_id", $_POST['申请人'], "user_name"); $title = "来自 {$username} 的借领申请,需办公用品 " . $_POST['办公用品名称'] . " 数量:" . $_POST['出库数量']; $messagetitle = "借领申请"; $guanlianid = $_POST['编号']; $url = "../officeproduct/officeproductout_newai.php?" . base64_encode("action=init_default_search&searchfield=编号&searchvalue={$guanlianid}"); newMessage($_POST['批准人'], $title, $messagetitle, $url, $guanlianid); } $filetablename = 'officeproductout'; require_once 'include.inc.php';
$sql_today = getRoleByUser($sql_today, "fahuoren"); $rs = $db->Execute($sql_today); $rs_today = $rs->fields['NUM']; if ($rs_today > 0) { echo "<br>发货单:<a href=../JXC/fahuodan_newai.php?action=init_default&desksearch=" . urlencode($today) . " target=_blank>" . number_format($rs_today, 0, '', ',') . "个</a>"; } exit; } if ($_GET['action'] == "shenhe") { print "<script>location='crm_workreport_shenhe.php?id=" . $_GET['id'] . "';</script>"; exit; } if ($_GET['action'] == "shenhe_finish") { page_css(); $billid = $_GET['id']; $sql = "update workreport set state='已审核',shenheren='" . $_SESSION['LOGIN_USER_ID'] . "',shenhetime=now(),piyu='" . $_POST['piyu'] . "' where id='{$billid}'"; $rs = $db->Execute($sql); $billinfo = returntablefield("workreport", "id", $billid, "createman,workdate"); $touser = explode(",", $_POST["tixingren"]); $messagetitle = "工作报告"; $guanlianid = $billid; newMessage($billinfo['createman'], $billinfo['workdate'] . "的工作报告已被审核", $messagetitle, '../CRM/workreport_newai.php?' . base64_encode('action=view_default&id=' . $guanlianid), $guanlianid); $return = FormPageAction("action", "init_default"); print_infor("<b>审核通过</b>", 'trip', "location='?{$return}'", "?" . $return, 1); exit; } addShortCutByDate("workdate", "工作日期"); $filetablename = 'workreport'; $parse_filename = 'workreport'; $SYSTEM_ADD_SQL = getRoleByUser($SYSTEM_ADD_SQL, "createman"); require_once 'include.inc.php';
if ($_GET['action'] == "tongyi") { page_css(); $sql = "update customerproduct set `是否审核`=2,`审核时间`='" . date("Y-m-d H:i:s") . "',审核人='" . $_SESSION['LOGIN_USER_ID'] . "' where ROWID=" . $_GET['ROWID']; $db->Execute($sql); $billinfo = returntablefield("customerproduct", "ROWID", $_GET['ROWID'], "主题,创建人"); newMessage($billinfo['创建人'], $billinfo['主题'] . '--已通过!', '报价单审核', '../JXC/customerproduct_newai.php?' . base64_encode('action=view_default&ROWID=' . $_GET['ROWID']), $_GET['ROWID']); $return = FormPageAction("action", "init_default"); print_infor("已同意!", 'trip', "location='?{$return}'", "?{$return}", 0); exit; } if ($_GET['action'] == "foujue") { page_css(); $sql = "update customerproduct set `是否审核`=3,`审核时间`='" . date("Y-m-d H:i:s") . "',审核人='" . $_SESSION['LOGIN_USER_ID'] . "' where ROWID=" . $_GET['ROWID']; $db->Execute($sql); $billinfo = returntablefield("customerproduct", "ROWID", $_GET['ROWID'], "主题,创建人"); newMessage($billinfo['创建人'], $billinfo['主题'] . '--被否决!', '报价单审核', '../JXC/customerproduct_newai.php?' . base64_encode('action=view_default&ROWID=' . $_GET['ROWID']), $_GET['ROWID']); $return = FormPageAction("action", "init_default"); print_infor("已否决!", 'trip', "location='?{$return}'", "?{$return}", 0); exit; } if ($_GET['action'] == "edit_default2") { $rowid = $_GET['ROWID']; //开启事务 $db->StartTrans(); //获取订单号 $billid = returnAutoIncrement("billid", "sellplanmain"); $sql = "select * from customerproduct where ROWID=" . $rowid; $rs = $db->Execute($sql); $rs_a = $rs->GetArray(); if (count($rs_a) == 0) { throw new Exception("找不到此报价单");
function submitMessage() { global $db; if (empty($_POST['text']) || empty($_POST['receiver'])) { output('<center><p><span class="sub_caption">Per favore compila <u>tutti</u> i campi!</span></p></center>'); newMessage(); } else { if (empty($_POST['subject'])) { $_POST['subject'] = '...'; } // An mehrere Empfänger schicken? if (strstr($_POST['receiver'], ';')) { $recv_list = explode(";", str_replace(' ', '', $_POST['receiver'])); $num = 0; for ($i = 0; $i < count($recv_list); $i++) { $receiver = $db->queryrow('SELECT user_id FROM user WHERE user_name="' . $recv_list[$i] . '"'); if ($receiver) { $result = $db->query('INSERT INTO message (sender, receiver, subject, text, time) VALUES ("' . SUPPORTUSER . '","' . $receiver['user_id'] . '","' . htmlspecialchars($_POST['subject']) . '","' . htmlspecialchars($_POST['text']) . '","' . time() . '")'); if ($result == false) { message(DATABASE_ERROR, 'message_query: Could not call INSERT INTO in message'); exit; } log_action('Messaggio con il titolo "' . $_POST['subject'] . '" inviato a ' . $recv_list[$i]); UpdateUnreadMessages($receiver['user_id']); } $num++; } output('<center><p><span class="sub_caption">Il tuo messaggio è stato inviato a ' . $num . ' di ' . count($recv_list) . ' giocatori</span></p></center>'); } else { if ($_POST['receiver'] == '*') { $mes_qry = $db->query('SELECT user_id FROM user WHERE user_auth_level < 2'); while ($receiver = $db->fetchrow($mes_qry)) { $result = $db->query('INSERT INTO message (sender, receiver, subject, text, time) VALUES ("' . SUPPORTUSER . '","' . $receiver['user_id'] . '","' . htmlspecialchars($_POST['subject']) . '","' . htmlspecialchars($_POST['text']) . '","' . time() . '")'); if ($result == false) { message(DATABASE_ERROR, 'message_query: Could not call INSERT INTO in message'); exit; } UpdateUnreadMessages($receiver['user_id']); } log_action('Messaggio con il titolo "' . $_POST['subject'] . '" inviato a tutta la utenza'); } else { $receiver = $db->queryrow('SELECT user_id FROM user WHERE user_name="' . $_POST['receiver'] . '"'); if ($receiver == false) { output('<center><p><span class="sub_caption">Il destinatario non esiste!</span></p></center>'); newMessage(); } else { $result = $db->query('INSERT INTO message (sender, receiver, subject, text, time) VALUES ("' . SUPPORTUSER . '","' . $receiver['user_id'] . '","' . htmlspecialchars($_POST['subject']) . '","' . htmlspecialchars($_POST['text']) . '","' . time() . '")'); if ($result == false) { message(DATABASE_ERROR, 'message_query: Could not call INSERT INTO in message'); exit; } log_action('Messaggio con il titolo "' . $_POST['subject'] . '" inviato a ' . $_POST['receiver']); UpdateUnreadMessages($receiver['user_id']); output('<center><p><span class="sub_caption">Messaggio inviato</span></p></center>'); } } } // End single receiver } }
} /** * Gets all messages from the database. If a cache connection * object is passed then the cache is checked before querying * from the database. */ function getMessages($conn, $cache) { if ($cache) { $messages = $cache->get("messages"); } else { $messages = null; } if (!$messages) { $stmt = $conn->query("SELECT message FROM messages ORDER BY id;"); $messages = $stmt->fetchAll(PDO::FETCH_ASSOC); if ($cache) { $cache->set("messages", $messages); } } return $messages; } header('Content-Type: application/json'); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $message = json_decode(file_get_contents('php://input'), true)['message']; newMessage($conn, $cache, $message); print '{"message": "' . $message . '"}'; } else { $messages = getMessages($conn, $cache); print '{"data": ' . json_encode($messages) . '}'; }
ini_set('error_reporting', E_ALL); error_reporting(E_WARNING | E_ERROR); require_once 'lib.inc.php'; $GLOBAL_SESSION = returnsession(); $SYSTEM_PRIV_STOP = "1"; validateMenuPriv("报销申请"); //$SYSTEM_PRINT_SQL = 1; //print_r($_GET);exit; if ($_GET['action'] == "edit_TongYi") { page_css(); $billid = $_GET['单号']; $sql = "update crm_feiyong_sq set 是否审核='2',审核人='" . $_SESSION['LOGIN_USER_ID'] . "',审核日期=now() where 单号='{$billid}'"; $rs = $db->Execute($sql); $billinfo = returntablefield("crm_feiyong_sq", "单号", $billid, "费用类型,金额,录单员"); $feiyongname = returntablefield("v_feiyongbaoxiao", "id", $billinfo['费用类型'], "typename"); newMessage($billinfo['录单员'], $feiyongname . '(金额:' . $billinfo['金额'] . ')--已通过!', '报销申请', '../CRM/crm_feiyong_sq_newai.php?' . base64_encode('action=view_default&单号=' . $billid), $billid); $return = FormPageAction("action", "init_default"); print_infor("<b>审核通过</b>", 'trip', "location='?{$return}'", "?" . $return, 1); exit; } if ($_GET['action'] == "edit_FouJue") { page_css(); $billid = $_GET['单号']; $sql = "update crm_feiyong_sq set 是否审核='3',审核人='" . $_SESSION['LOGIN_USER_ID'] . "',审核日期=now() where 单号='{$billid}'"; $rs = $db->Execute($sql); $return = FormPageAction("action", "init_default"); print_infor("<b>审核否决</b>", 'trip', "location='?{$return}'", "?" . $return, 1); exit; } $SYSTEM_ADD_SQL = getRoleByUser($SYSTEM_ADD_SQL, "录单员"); addShortCutByDate("创建时间", "创建时间");
function submitMessage() { global $db, $game; if (empty($_POST['text']) || empty($_POST['receiver'])) { $game->out('<p><span class="sub_caption">' . constant($game->sprache("TEXT37")) . '</span></p>'); newMessage(); } else { if (empty($_POST['subject'])) { $_POST['subject'] = '...'; } // Send to multiple recipients? if (strstr($_POST['receiver'], ';')) { $result = $db->query('UPDATE user SET user_message_sig="' . htmlspecialchars($_POST['message_sig']) . '" WHERE user_id=' . $game->player['user_id']); $game->player['user_message_sig'] = htmlspecialchars($_POST['message_sig']); if ($result == false) { message(DATABASE_ERROR, 'message_query: Could not call update user sig'); exit; } $recv_list = explode(";", str_replace(' ', '', $_POST['receiver'])); //echo $_POST['receiver'].'<br><br>'; //print_r($recv_list); $num = 0; $unknown_users = ''; for ($i = 0; $i < count($recv_list); $i++) { if (strtolower($recv_list[$i]) == strtolower('STFC-Support')) { $receiver['user_id'] = SUPPORTUSER; } else { $receiver = $db->queryrow('SELECT user_id FROM user WHERE user_name="' . $recv_list[$i] . '"'); } if ($receiver) { $result = $db->query('INSERT INTO message (sender, receiver, subject, text, time) VALUES ("' . $game->player['user_id'] . '","' . $receiver['user_id'] . '","' . htmlspecialchars($_POST['subject']) . '","' . htmlspecialchars($_POST['text']) . '\\n\\n' . $game->player['user_message_sig'] . '","' . time() . '")'); if ($result == false) { message(DATABASE_ERROR, 'message_query: Could not call INSERT INTO in message'); exit; } UpdateUnreadMessages($receiver['user_id']); $num++; } else { $unknown_users .= '<br>' . constant($game->sprache("TEXT44")) . ' ' . $recv_list[$i] . ' ' . constant($game->sprache("TEXT45")); } } $game->out('<span class="sub_caption">' . constant($game->sprache("TEXT38")) . ' ' . $num . ' ' . constant($game->sprache("TEXT39")) . ' ' . count($recv_list) . ' ' . constant($game->sprache("TEXT40")) . '</span>'); if ($unknown_users != '') { $game->out('<span class="sub_caption">' . $unknown_users . '</span>'); } } else { $result = $db->query('UPDATE user SET user_message_sig="' . htmlspecialchars($_POST['message_sig']) . '" WHERE user_id=' . $game->player['user_id']); $game->player['user_message_sig'] = htmlspecialchars($_POST['message_sig']); if ($result == false) { message(DATABASE_ERROR, 'message_query: Could not call INSERT INTO in message'); exit; } if (strtolower($_POST['receiver']) == strtolower('STFC-Support')) { $receiver['user_id'] = SUPPORTUSER; } else { $receiver = $db->queryrow('SELECT user_id FROM user WHERE user_name="' . htmlspecialchars($_POST['receiver']) . '"'); } if ($receiver == false) { $game->out('<p><span class="sub_caption">' . constant($game->sprache("TEXT41")) . '</span></p>'); newMessage(); } else { $result = $db->query('INSERT INTO message (sender, receiver, subject, text, time) VALUES ("' . $game->player['user_id'] . '","' . $receiver['user_id'] . '","' . htmlspecialchars($_POST['subject']) . '","' . htmlspecialchars($_POST['text']) . '\\n\\n' . $game->player['user_message_sig'] . '","' . time() . '")'); if ($result == false) { message(DATABASE_ERROR, 'message_query: Could not call INSERT INTO in message'); exit; } UpdateUnreadMessages($receiver['user_id']); $game->out('<p><span class="sub_caption">' . constant($game->sprache("TEXT42")) . '</span></p>'); } } // End single receiver } }
//print_r($_GET);exit; if ($_GET['action'] == "edit_TongYi") { print "<script>location='crm_shenqingbaobei_shenhe.php?id=" . $_GET['id'] . "';</script>"; exit; } if ($_POST['action'] == "TongYi") { page_css(); $billid = $_GET['id']; $sql = "update crm_shenqingbaobei set state='2',shenheman='" . $_SESSION['LOGIN_USER_ID'] . "',shenhetime=now(),piyu='" . $_POST['piyu'] . "',tixingren='" . $_POST["tixingren"] . "' where id='{$billid}'"; $rs = $db->Execute($sql); $touser = explode(",", $_POST["tixingren"]); $messagetitle = "项目报备"; $guanlianid = $billid; for ($i = 0; $i < sizeof($touser); $i++) { if ($touser[$i] != "") { newMessage($touser[$i], $_POST['zhuti'], $messagetitle, '../JXC/crm_shenqingbaobei_newai.php?' . base64_encode('action=view_default&id=' . $guanlianid), $guanlianid); } } $return = FormPageAction("action", "init_default"); print_infor("<b>审核通过</b>", 'trip', "location='?{$return}'", "?" . $return, 1); exit; } if ($_POST['action'] == "FouJue") { page_css(); $billid = $_GET['id']; $sql = "update crm_shenqingbaobei set state='3',shenheman='" . $_SESSION['LOGIN_USER_ID'] . "',shenhetime=now(),piyu='" . $_POST['piyu'] . "' where id='{$billid}'"; $rs = $db->Execute($sql); $return = FormPageAction("action", "init_default"); print_infor("<b>审核否决</b>", 'trip', "location='?{$return}'", "?" . $return, 1); exit; }
$CAL_TIME .= ":00:00"; $CAL_TIME = $_GET['CAL_DATE'] . " " . $CAL_TIME; $EndTime = strtotime("{$CAL_TIME} +1 hour"); $EndTime = date("Y-m-d H:i:s", $EndTime); $ADDINIT = array("CAL_TIME" => $CAL_TIME, "END_TIME" => $EndTime, "tixingtime" => $CAL_TIME); } if ($_GET['action'] == "add_default_data" || $_GET['action'] == "edit_default_data") { $id = $_POST['id']; if ($id == '') { $id = $_GET['id']; } if ($_GET['action'] == "edit_default_data") { deleteMessage("日程提醒", $_GET['id']); } //弹出消息 newMessage($_SESSION['LOGIN_USER_ID'], cutStr($_POST['CONTENT'], 12), '日程提醒', '../CRM/calendar_newai.php?' . base64_encode('action=view_default&id=' . $id), $id, $_POST['tixingtime']); //短信通知 if ($_POST['ifsms'] == '1') { $mobiles = returntablefield("user", "user_id", $_SESSION['LOGIN_USER_ID'], "MOBIL_NO"); print "\n<script type=\"text/javascript\" language=\"javascript\" src=\"" . ROOT_DIR . "general/ERP/Enginee/jquery/jquery.js\"></script>\n"; print "<script type=\"text/javascript\" language=\"javascript\">\n\t\t\t\$.post('../Framework/sms_getContents.php?action=send', {\n\t\t\t mobiles:'" . $mobiles . "',\n\t\t\t msg:'" . cutStr("【日程提醒】" . $_POST['CONTENT'], 70) . "',\n\t\t\t attime:'" . $_POST['tixingtime'] . "'\n\t\t\t}, function(data) {\t\n\t\t\t});\n\t\t</script>"; } } if ($_GET['action'] == "delete_array") { deleteMessage("日程提醒", $_GET['selectid']); } if ($_GET['action'] == "finish") { $sql = "update calendar set over_status='" . $_GET['OVER_STATUS'] . "' where id=" . $_GET['id']; $db->Execute($sql); updateMessage("日程提醒", $_GET['id'], $_GET['OVER_STATUS']); header("location:calendar_newai.php");