write_log("修改邮件发送模版", $_SESSION['admin_name'], 3); adminmsg("保存成功!", 2, $link); } elseif ($act == 'send') { get_token(); $smarty->assign('pageheader', "邮件营销"); require_once dirname(__FILE__) . '/include/admin_mailqueue_fun.php'; require_once QISHI_ROOT_PATH . 'include/page.class.php'; $uid = intval($_GET['uid']); $email = trim($_GET['email']); $wheresql = ' WHERE m_uid=' . $uid . ' ORDER BY m_id DESC '; $total_sql = "SELECT COUNT(*) AS num FROM " . table('mailqueue') . $wheresql; $perpage = 10; $page = new page(array('total' => $db->get_total($total_sql), 'perpage' => $perpage)); $currenpage = $page->nowindex; $offset = ($currenpage - 1) * $perpage; $maillog = get_mailqueue($offset, $perpage, $wheresql); $url = trim($_REQUEST['url']); if (empty($url)) { $url = "?act=send&email={$email}&uid={$uid}"; } $smarty->assign('url', $url); $smarty->assign('maillog', $maillog); $smarty->assign('page', $page->show(3)); $smarty->display('mail/admin_mail_send.htm'); } elseif ($act == 'email_send') { check_token(); $uid = intval($_POST['uid']); $url = trim($_REQUEST['url']); if (!$uid) { adminmsg('用户UID错误!', 0); }
$wheresql = " WHERE m_subject like '%{$key}%'"; } if ($key_type === 2) { $wheresql = " WHERE m_mail = '{$key}'"; } $oederbysql = ""; } $_GET['m_type'] != '' ? $wheresqlarr['m_type'] = intval($_GET['m_type']) : ''; if (!empty($wheresqlarr)) { $wheresql = wheresql($wheresqlarr); } $total_sql = "SELECT COUNT(*) AS num FROM " . table('mailqueue') . $wheresql; $page = new page(array('total' => $db->get_total($total_sql), 'perpage' => $perpage)); $currenpage = $page->nowindex; $offset = ($currenpage - 1) * $perpage; $list = get_mailqueue($offset, $perpage, $wheresql . $oderbysql); $smarty->assign('navlabel', "list"); $smarty->assign('list', $list); $smarty->assign('page', $page->show(3)); $smarty->display('mailqueue/admin_mailqueue_list.htm'); } elseif ($act == 'mailqueue_add') { get_token(); $label[] = array('{sitename}', '网站名称'); $label[] = array('{sitedomain}', '网站域名'); $label[] = array('{sitelogo}', '网站LOGO'); $label[] = array('{address}', '联系地址'); $label[] = array('{tel}', '联系电话'); $smarty->assign('label', $label); $smarty->assign('navlabel', 'add'); $smarty->display('mailqueue/admin_mailqueue_add.htm'); } elseif ($act == 'mailqueue_add_save') {