예제 #1
0
    public function index()
    {
        SubMenu('我的信息', array(array('编辑我的信息', 'myprofile', 1)));
        $need_info = '&nbsp;&nbsp;<font class=red>* 必填项</font>';
        $pass_info = '&nbsp;&nbsp;<font class=grey>不修改请留空</font>';
        echo '<form method="post" action="' . BURL('myprofile/save') . '">
		<input type="hidden" name="aid" value="' . $this->admin['aid'] . '">';
        TableHeader('编辑我的信息: <span class=note>' . $this->admin['fullname'] . '</span>');
        TableRow(array('<b>登录名:</b>', $this->admin['username']));
        TableRow(array('<b>密码:</b>', '<input type="text" name="password" size="20">' . $pass_info));
        TableRow(array('<b>确认密码:</b>', '<input type="text" name="passwordconfirm" size="20">' . $pass_info));
        TableRow(array('<b>Email地址:</b>', '<input type="text" name="email" value="' . $this->admin['email'] . '" size="20">' . $need_info));
        TableRow(array('<b>昵称 (<font class=blue>中文</font>):</b>', '<input type="text" name="fullname" value="' . $this->admin['fullname'] . '" size="20">' . $need_info));
        TableRow(array('<b>昵称 (<font class=red>英文</font>):</b>', '<input type="text" name="fullname_en" value="' . $this->admin['fullname_en'] . '" size="20">' . $need_info));
        TableFooter();
        PrintSubmit('保存更新');
    }
예제 #2
0
파일: upgrade.php 프로젝트: noikiy/meilala
    public function index()
    {
        SubMenu('系统升级');
        $available = 0;
        if (file_exists($this->update_path . 'upgrade.php') and file_exists($this->update_path . 'version.php')) {
            $available = 1;
        }
        ShowTips('<ul><li>请严格按升级说明进行系统升级, 升级说明一般随附在升级包中.</li>
		<li>升级过程一般是先将升级包解压后, 设置FTP工具以 <span class=note>二进制方式</span> 上传到网站替换原文件, 然后在后台运行升级程序.</li>
		<li>安全建议: <span class=note>升级完成后删除upgrade目录下的所有文件</span>.</li>
		</ul>', '升级提示');
        BR(2);
        TableHeader('升级操作');
        if ($available) {
            include $this->update_path . 'version.php';
            $new = str_replace('.', '', $NewVersion);
            $old = str_replace('.', '', APP_VERSION);
            if (intval($new) <= intval($old)) {
                $output = '<font class=red>您现在正在使用的版本高于或等于升级程序中的版本, 无需升级!</font><BR>';
            } else {
                $output = '<form><input type="submit" value="运行升级程序" class="save" id="doupgrade"></form>';
            }
            TableRow(array('当前使用中的版本是: <span id="version">' . APP_VERSION . '</span>', '正要升级到的版本是: <font class=red>' . $NewVersion . '</font>'));
            TableRow("<center><br>{$output}<br></center>");
        } else {
            TableRow('<center><br><br><b><span class=note>暂无可用的升级程序!</span></b><br><br><br></center>');
        }
        TableFooter();
        echo '<script type="text/javascript">
			$(function(){
				$("#doupgrade").click(function(e){
					var _me=$(this);

					showDialog("确定运行升级程序吗?<BR>建议在升级前备份网站数据.", "确认操作", function(){
						ajax("' . BURL('upgrade/ajax') . '", {}, function(data){
							$("#version").html("' . $NewVersion . '");
							_me.parent().parent().html("<br><font class=blueb>升级已完成!</font><br><br>");
						});
					});

					e.preventDefault();
				});
			});
		</script>';
    }
예제 #3
0
파일: index.php 프로젝트: noikiy/meilala
    function index($path)
    {
        //获取统计数据
        $comms = APP::$DB->getOne("SELECT COUNT(cid) AS nums FROM " . TABLE_PREFIX . "comment WHERE readed = 0");
        SubMenu('欢迎进入 ' . APP_NAME . ' 管理中心', array(array('查看留言', 'comments'), array('管理客人', 'guests'), array('管理记录', 'messages'), array('管理客服', 'users')));
        $welcome = '<ul><li>欢迎 <font class=orange>' . $this->admin['fullname'] . '</font> 进入后台管理面板! 为了确保系统安全, 请在关闭前点击 <a href="#" class="logout">退出</a> 安全离开!</li>
		<li>隐私保护: <span class="note2">' . APP_NAME . '[商业版] 郑重承诺, 您在使用本系统时, WeLive开发商不会收集您的任何信息</span>.</li>
		<li>您在使用 ' . APP_NAME . '[商业版] 时有任何问题, 请访问: <a href="http://bbs.iimei.com//" target="_blank">我美网BBS</a>!</li></ul>';
        ShowTips($welcome, '系统信息');
        BR(2);
        TableHeader('客服操作技巧说明');
        TableRow('<font class=grey>1)</font>&nbsp;&nbsp;将代码 <span class=note>&lt;script type="text/javascript" charset="UTF-8" src="' . BASEURL . 'welive.js"&gt;&lt;/script&gt;</span> 插入网页代码的&lt;head&gt;&lt;/head&gt;内来调用(显示)客服小面板.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp任意网站、任何编码格式的页面均可调用, 包括淘宝, ECShop等商城系统. <span class=note>请勿修改版权, 修改版权将导致无法使用!</span>');
        TableRow('<font class=grey>2)</font>&nbsp;&nbsp;客服窗口中, 按 Ctrl + Alt, 在客服交流区与当前客人小窗口间切换.');
        TableRow('<font class=grey>3)</font>&nbsp;&nbsp;客服窗口中, 按 Ctrl + 下箭头 或 Esc键, 关闭当前客人小窗口. 如果小窗口都关闭了, 自动切换到客服交流区.');
        TableRow('<font class=grey>4)</font>&nbsp;&nbsp;客服窗口中, 按 Ctrl + 上箭头, 展开关闭的客人小窗口.');
        TableRow('<font class=grey>5)</font>&nbsp;&nbsp;客服窗口中, 按 Ctrl + 左或右箭头, 在已展开的客人小窗口间切换.');
        TableRow('<font class=grey>6)</font>&nbsp;&nbsp;客服窗口中, 客人被踢出或禁言后, 刷新页面仍可重新进入客服, 即此两项操作仅作用于当前对话.');
        TableRow('<font class=grey>7)</font>&nbsp;&nbsp;WeLive默认安装后, 前台客服小面板不会自动展开, 即不会进入客服. 如何希望自动展开, 可打开根目录下的welive.js文件, 修改 <span class=note>welive_auto=0</span> 代码中的0为N秒.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp那么, 当用户浏览器打开页面并停留N秒后, 客服小面板将自动展开, 即进入客服. 如果无客服在线, 将自动显示留言板.');
        TableRow('<font class=grey>8)</font>&nbsp;&nbsp;在客服窗口中的客服交流区, 管理员可发送特殊指令: system die --- Socket服务将中止(<span class=note>慎用</span>);&nbsp;&nbsp;all --- 显示所有连接数;&nbsp;&nbsp;admin --- 显示所有客服及其客人数;&nbsp;&nbsp;guest --- 显示客人数');
        TableFooter();
        $info_total = $comms['nums'];
        //更新顶部提示信息
        echo '<script type="text/javascript">
			$(function(){
				var info_total = ' . $info_total . ';

				if(info_total > 0){
					$("#topuser dl#info_all").removeClass("none");
					$("#topuser #info_total").html(info_total);
					$("#topuser #info_comms").html(info_total).attr("class", "orangeb");

				}

				//将统计数据保存为cookie. 注: header已发送, 此页面不能使用php保存cookie
				setCookie("' . COOKIE_KEY . 'backinfos", info_total, 365);
			});
		</script>';
    }
예제 #4
0
파일: messages.php 프로젝트: noikiy/meilala
    public function index()
    {
        $NumPerPage = 10;
        $page = ForceIntFrom('p', 1);
        $search = ForceStringFrom('s');
        $groupid = ForceStringFrom('g');
        if (IsGet('s')) {
            $search = urldecode($search);
        }
        $start = $NumPerPage * ($page - 1);
        SubMenu('记录列表', array(array('记录列表', 'messages', 1)));
        TableHeader('搜索及快速删除');
        TableRow('<center><form method="post" action="' . BURL('messages') . '" name="searchmessages" style="display:inline-block;*display:inline;"><label>关键字:</label>&nbsp;<input type="text" name="s" size="18">&nbsp;&nbsp;&nbsp;<label>分类:</label>&nbsp;<select name="g"><option value="0">全部</option><option value="1" ' . Iif($groupid == '1', 'SELECTED') . ' class=red>客人的发言</option><option value="2" ' . Iif($groupid == '2', 'SELECTED') . '>客服的发言</option></select>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="搜索记录" class="cancel"></form>

		<form method="post" action="' . BURL('messages/fastdelete') . '" name="fastdelete" style="display:inline-block;margin-left:80px;*display:inline;"><label>快速删除记录:</label>&nbsp;<select name="days"><option value="0">请选择 ...</option><option value="360">12个月前的对话记录</option><option value="180">&nbsp;6 个月前的对话记录</option><option value="90">&nbsp;3 个月前的对话记录</option><option value="30">&nbsp;1 个月前的对话记录</option></select>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="快速删除" class="save" onclick="var _me=$(this);showDialog(\'确定删除所选记录吗?\', \'确认操作\', function(){_me.closest(\'form\').submit();});return false;"></form></center>');
        TableFooter();
        if ($search) {
            if (preg_match("/^[1-9][0-9]*\$/", $search)) {
                $s = ForceInt($search);
                $searchsql = " WHERE mid = '{$s}' OR fromid = '{$s}' OR toid = '{$s}' ";
                //按ID搜索
                $title = "搜索ID号为: <span class=note>{$s}</span> 的记录";
            } else {
                $searchsql = " WHERE (fromname LIKE '%{$search}%' OR toname LIKE '%{$search}%' OR msg LIKE '%{$search}%') ";
                $title = "搜索: <span class=note>{$search}</span> 的记录列表";
            }
            if ($groupid) {
                if ($groupid == 1 or $groupid == 2) {
                    $searchsql .= " AND type = " . Iif($groupid == 1, 0, 1) . " ";
                    $title = "在 <span class=note>" . Iif($groupid == 1, '客人的发言', '客服的发言') . "</span> 中, " . $title;
                }
            }
        } else {
            if ($groupid) {
                if ($groupid == 1 or $groupid == 2) {
                    $searchsql .= " WHERE type = " . Iif($groupid == 1, 0, 1) . " ";
                    $title = "全部 <span class=note>" . Iif($groupid == 1, '客人的发言', '客服的发言') . "</span> 列表";
                }
            } else {
                $searchsql = '';
                $title = '全部记录列表';
            }
        }
        $getmessages = APP::$DB->query("SELECT * FROM " . TABLE_PREFIX . "msg " . $searchsql . " ORDER BY mid DESC LIMIT {$start},{$NumPerPage}");
        $maxrows = APP::$DB->getOne("SELECT COUNT(mid) AS value FROM " . TABLE_PREFIX . "msg " . $searchsql);
        echo '<form method="post" action="' . BURL('messages/updatemessages') . '" name="messagesform">
		<input type="hidden" name="p" value="' . $page . '">';
        TableHeader($title . '(' . $maxrows['value'] . '个)');
        TableRow(array('ID', '发送人', '对话内容', '接收人', '记录时间', '<input type="checkbox" id="checkAll" for="deletemids[]"> <label for="checkAll">删除</label>'), 'tr0');
        if ($maxrows['value'] < 1) {
            TableRow('<center><BR><font class=redb>未搜索到任何记录!</font><BR><BR></center>');
        } else {
            while ($msg = APP::$DB->fetch($getmessages)) {
                TableRow(array($msg['mid'], "<a title=\"编辑\" href=\"" . Iif($msg['type'], BURL('users/edit?aid=' . $msg['fromid']), BURL('guests/edit?gid=' . $msg['fromid'])) . "\">{$msg['fromname']}</a>", getSmile($msg['msg']), "<a title=\"编辑\" href=\"" . Iif($msg['type'], BURL('guests/edit?gid=' . $msg['toid']), BURL('users/edit?aid=' . $msg['toid'])) . "\">{$msg['toname']}</a>", DisplayDate($msg['time'], '', 1), '<input type="checkbox" name="deletemids[]" value="' . $msg['mid'] . '">'));
            }
            $totalpages = ceil($maxrows['value'] / $NumPerPage);
            if ($totalpages > 1) {
                TableRow(GetPageList(BURL('messages'), $totalpages, $page, 10, 's', urlencode($search), 'g', $groupid));
            }
        }
        TableFooter();
        PrintSubmit('删除记录', '', 1, '确定删除所选记录吗?');
    }
예제 #5
0
 private function DisplayBackups()
 {
     TableHeader('数据库备份文件');
     TableRow(array('文件名 (/config/)', '大小', '备份日期', '操作', '', ''), 'tr0');
     if (is_dir($this->backupDir)) {
         $dir = opendir($this->backupDir);
         while (false !== ($file = readdir($dir))) {
             if (strpos(strtolower($file), '.sql') > 0) {
                 $stats = stat($this->backupDir . $file);
                 if ($stats['size'] > 0) {
                     TableRow(array($file, DisplayFilesize($stats['size']), DisplayDate($stats['mtime']), '<a file="' . $file . '" class="link-btn restore">恢复</a>', '<a href="' . BURL('database/ajax?action=download&file=' . $file) . '" class="link-btn">下载</a>', '<a file="' . $file . '" class="link-btn ajax">删除</a>'));
                 }
             }
         }
     }
     TableFooter();
 }
예제 #6
0
    public function index()
    {
        SubMenu('语言管理', array(array('语言列表及操作', 'language', 1)));
        $Langs = GetLangs();
        array_unshift($Langs, "Auto");
        foreach ($Langs as $k => $val) {
            $laname = Iif($val == 'Auto', '自动', Iif($val == 'Chinese', '中文', $val));
            $langstr .= '<input type="radio" name="Lang" id="Lang_' . $k . '" value="' . $val . '"' . Iif(APP::$_CFG['Lang'] == $val, ' checked') . '><label for="Lang_' . $k . '">' . $laname . '</label><i class="w20"></i>';
        }
        TableHeader('访客默认语言');
        TableRow('<form>
			<b>设置访客窗口默认语言:</b><i class="w20"></i>' . $langstr . '&nbsp;&nbsp;
			<input type="submit" value="保存设置" class="cancel" id="setlang"><BR>
			<font class=grey>注: 当选择 <span class=note>自动</span> 时, 访客对话窗口将根据其浏览器语言自动选择语言, 非中文浏览器将显示英文信息提示.</font>
			</form>');
        TableFooter();
        BR(2);
        TableHeader('语言文件列表');
        $files = GetLangs(1);
        $columncount = 0;
        echo '<td class="td last"><table width="100%" border="0" cellpadding="5" cellspacing="0">';
        for ($i = 0; $i < count($files); $i++) {
            $columncount++;
            if ($columncount == 1) {
                echo '<tr>';
            }
            echo '<td width="33%">';
            $this->DisplayFileDetails($files[$i]);
            echo '</td>';
            if ($columncount == 3) {
                echo '</tr>';
                $columncount = 0;
            }
        }
        @closedir($handle);
        if ($columncount != 0 && $columncount != 3) {
            while ($columncount < 3) {
                $columncount++;
                echo '<td>&nbsp;</td>';
            }
            echo '</tr>';
        }
        echo '</table></td>';
        TableFooter();
        echo '<script type="text/javascript">
				$(function(){
					$("#setlang").click(function(e){
						var data = $(this).parent().serialize();
						ajax("' . BURL('language/ajax?action=setlang') . '", data, function(data){
							showInfo("访客窗口默认语言设置成功.", "Ajax操作", "", 1, 1);
						});

						e.preventDefault();
					});

					$("#main a.ajax").click(function(e){
						var _me=$(this);
						showDialog("确定删除语言文件: " + _me.attr("file") + " 吗?", "确认操作", function(){
							ajax("' . BURL('language/ajax?action=delete') . '", {file: _me.attr("file")}, function(data){
								_me.parent().parent().hide();
							});
						});

						e.preventDefault();
					});
				});

				</script>';
    }
예제 #7
0
    public function index()
    {
        $NumPerPage = 10;
        $page = ForceIntFrom('p', 1);
        $search = ForceStringFrom('s');
        $groupid = ForceStringFrom('g');
        if (IsGet('s')) {
            $search = urldecode($search);
        }
        $start = $NumPerPage * ($page - 1);
        $admins = array();
        $getadmins = APP::$DB->query("SELECT aid, fullname FROM " . TABLE_PREFIX . "admin");
        while ($a = APP::$DB->fetch($getadmins)) {
            $admins[$a['aid']] = $a['fullname'];
        }
        SubMenu('常用短语列表', array(array('常用短语列表', 'phrases', 1), array('添加常用短语', 'phrases/add')));
        TableHeader('搜索常用短语');
        TableRow('<center><form method="post" action="' . BURL('phrases') . '" name="searchphrases" style="display:inline-block;"><label>客服ID、关键字:</label>&nbsp;<input type="text" name="s" size="18">&nbsp;&nbsp;&nbsp;<label>状态:</label>&nbsp;<select name="g"><option value="0">全部</option><option value="1" ' . Iif($groupid == '1', 'SELECTED') . '>可用</option><option value="2" ' . Iif($groupid == '2', 'SELECTED') . ' class=red>已禁用</option></select>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="搜索常用短语" class="cancel"></form></center>');
        TableFooter();
        if ($search) {
            if (preg_match("/^[1-9][0-9]*\$/", $search)) {
                $s = ForceInt($search);
                $searchsql = " WHERE aid = '{$s}' ";
                //按ID搜索
                $title = "搜索ID号为: <span class=note>{$s}</span> 的常用短语";
            } else {
                $searchsql = " WHERE (msg LIKE '%{$search}%' OR msg_en LIKE '%{$search}%') ";
                $title = "搜索: <span class=note>{$search}</span> 的常用短语列表";
            }
            if ($groupid) {
                if ($groupid == 1 or $groupid == 2) {
                    $searchsql .= " AND activated = " . Iif($groupid == 1, 1, 0) . " ";
                    $title = "在 <span class=note>" . Iif($groupid == 1, '可用的常用短语', '已禁用的常用短语') . "</span> 中, " . $title;
                }
            }
        } else {
            if ($groupid) {
                if ($groupid == 1 or $groupid == 2) {
                    $searchsql .= " WHERE activated = " . Iif($groupid == 1, 1, 0) . " ";
                    $title = "全部 <span class=note>" . Iif($groupid == 1, '可用的常用短语', '已禁用的常用短语') . "</span> 列表";
                }
            } else {
                $searchsql = '';
                $title = '全部常用短语列表';
            }
        }
        $getphrases = APP::$DB->query("SELECT * FROM " . TABLE_PREFIX . "phrase " . $searchsql . " ORDER BY aid DESC, sort DESC LIMIT {$start},{$NumPerPage}");
        $maxrows = APP::$DB->getOne("SELECT COUNT(pid) AS value FROM " . TABLE_PREFIX . "phrase " . $searchsql);
        echo '<form method="post" action="' . BURL('phrases/updatephrases') . '" name="phrasesform">
		<input type="hidden" name="p" value="' . $page . '">';
        TableHeader($title . '(' . $maxrows['value'] . '个)');
        TableRow(array('所属客服', '排序', '状态', '短语 (中)', '短语 (英)', '<input type="checkbox" id="checkAll" for="deletepids[]"> <label for="checkAll">删除</label>'), 'tr0');
        if ($maxrows['value'] < 1) {
            TableRow('<center><BR><font class=redb>未搜索到任何常用短语!</font><BR><BR></center>');
        } else {
            while ($phrase = APP::$DB->fetch($getphrases)) {
                TableRow(array('<input type="hidden" name="pids[]" value="' . $phrase['pid'] . '"><a title="编辑" href="' . BURL('users/edit?aid=' . $phrase['aid']) . '">' . $admins[$phrase['aid']] . ' (ID: ' . $phrase['aid'] . ')</a>', '<input type="text" name="sorts[]" value="' . $phrase['sort'] . '" size="4">', '<select name="activateds[]"' . Iif(!$phrase['activated'], ' class=red') . '><option value="1">可用</option><option class="red" value="0" ' . Iif(!$phrase['activated'], 'SELECTED') . '>禁用</option></select>', '<input type="text" name="msgs[]" value="' . $phrase['msg'] . '" size="60">', '<input type="text" name="msg_ens[]" value="' . $phrase['msg_en'] . '" size="60">', '<input type="checkbox" name="deletepids[]" value="' . $phrase['pid'] . '">'));
            }
            $totalpages = ceil($maxrows['value'] / $NumPerPage);
            if ($totalpages > 1) {
                TableRow(GetPageList(BURL('phrases'), $totalpages, $page, 10, 's', urlencode($search), 'g', $groupid));
            }
        }
        TableFooter();
        echo '<div class="submit"><input type="submit" name="updatephrases" value="保存更新" class="cancel" style="margin-right:28px"><input type="submit" name="deletephrases" value="删除常用短语" class="save" onclick="var _me=$(this);showDialog(\'确定删除所选常用短语吗?\', \'确认操作\', function(){_me.closest(\'form\').submit();});return false;"></div></form>';
    }
예제 #8
0
function ShowTips($tips, $tiptitle = '技巧提示')
{
    TableHeader($tiptitle);
    TableRow('<div class=tips>' . $tips . '</div>');
    TableFooter();
}
예제 #9
0
파일: comments.php 프로젝트: noikiy/meilala
    public function index()
    {
        $NumPerPage = 10;
        $page = ForceIntFrom('p', 1);
        $search = ForceStringFrom('s');
        $groupid = ForceStringFrom('g');
        if (IsGet('s')) {
            $search = urldecode($search);
        }
        $start = $NumPerPage * ($page - 1);
        SubMenu('留言列表', array(array('留言列表', 'comments', 1)));
        TableHeader('搜索及快速删除');
        TableRow('<center><form method="post" action="' . BURL('comments') . '" name="searchcomments" style="display:inline-block;*display:inline;"><label>关键字:</label>&nbsp;<input type="text" name="s" size="18">&nbsp;&nbsp;&nbsp;<label>状态:</label>&nbsp;<select name="g"><option value="0">全部</option><option value="1" ' . Iif($groupid == '1', 'SELECTED') . ' class=red>未读</option><option value="2" ' . Iif($groupid == '2', 'SELECTED') . '>已读</option></select>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="搜索留言" class="cancel"></form>

		<form method="post" action="' . BURL('comments/fastdelete') . '" name="fastdelete" style="display:inline-block;margin-left:80px;*display:inline;"><label>快速删除留言:</label>&nbsp;<select name="days"><option value="0">请选择 ...</option><option value="360">12个月前的已读留言</option><option value="180">&nbsp;6 个月前的已读留言</option><option value="90">&nbsp;3 个月前的已读留言</option><option value="30">&nbsp;1 个月前的已读留言</option></select>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="快速删除" class="save" onclick="var _me=$(this);showDialog(\'确定删除所选留言吗?\', \'确认操作\', function(){_me.closest(\'form\').submit();});return false;"></form></center>');
        TableFooter();
        if ($search) {
            if (preg_match("/^[1-9][0-9]*\$/", $search)) {
                $s = ForceInt($search);
                $searchsql = " WHERE cid = '{$s}' OR gid = '{$s}' OR phone LIKE '%{$s}%' ";
                //按ID搜索
                $title = "搜索数字为: <span class=note>{$s}</span> 的留言";
            } else {
                $searchsql = " WHERE (fullname LIKE '%{$search}%' OR email LIKE '%{$search}%' OR content LIKE '%{$search}%') ";
                $title = "搜索: <span class=note>{$search}</span> 的留言列表";
            }
            if ($groupid) {
                if ($groupid == 1 or $groupid == 2) {
                    $searchsql .= " AND readed = " . Iif($groupid == 1, 0, 1) . " ";
                    $title = "在 <span class=note>" . Iif($groupid == 1, '未读留言', '已读留言') . "</span> 中, " . $title;
                }
            }
        } else {
            if ($groupid) {
                if ($groupid == 1 or $groupid == 2) {
                    $searchsql .= " WHERE readed = " . Iif($groupid == 1, 0, 1) . " ";
                    $title = "全部 <span class=note>" . Iif($groupid == 1, '未读留言', '已读留言') . "</span> 列表";
                }
            } else {
                $searchsql = '';
                $title = '全部留言列表';
            }
        }
        $getcomments = APP::$DB->query("SELECT * FROM " . TABLE_PREFIX . "comment " . $searchsql . " ORDER BY readed ASC, cid DESC LIMIT {$start},{$NumPerPage}");
        $maxrows = APP::$DB->getOne("SELECT COUNT(cid) AS value FROM " . TABLE_PREFIX . "comment " . $searchsql);
        echo '<form method="post" action="' . BURL('comments/updatecomments') . '" name="commentsform">
		<input type="hidden" name="p" value="' . $page . '">';
        TableHeader($title . '(' . $maxrows['value'] . '个)');
        TableRow(array('ID', '状态', '姓名', 'Email', '电话', '留言内容', '<input type="checkbox" id="checkAll2" for="updatecids[]"> <label for="checkAll2">标记已读</label>', 'IP', '留言时间', '<input type="checkbox" id="checkAll" for="deletecids[]"> <label for="checkAll">删除</label>'), 'tr0');
        if ($maxrows['value'] < 1) {
            TableRow('<center><BR><font class=redb>未搜索到任何留言!</font><BR><BR></center>');
        } else {
            while ($comm = APP::$DB->fetch($getcomments)) {
                TableRow(array($comm['cid'], Iif($comm['readed'], '<font class=grey>已读</font>', '<font class=red>未读</font>'), Iif($comm['gid'], '<a title="编辑" href="' . BURL('guests/edit?gid=' . $comm['gid']) . '">' . "{$comm['fullname']}</a>", $comm['fullname']), Iif($comm['email'], '<a href="mailto:' . $comm['email'] . '">' . $comm['email'] . '</a>'), $comm['phone'], nl2br($comm['content']), Iif(!$comm['readed'], '<input type="checkbox" name="updatecids[]" value="' . $comm['cid'] . '">'), $comm['ip'], DisplayDate($comm['time'], '', 1), '<input type="checkbox" name="deletecids[]" value="' . $comm['cid'] . '">'));
            }
            $totalpages = ceil($maxrows['value'] / $NumPerPage);
            if ($totalpages > 1) {
                TableRow(GetPageList(BURL('comments'), $totalpages, $page, 10, 's', urlencode($search), 'g', $groupid));
            }
        }
        TableFooter();
        echo '<div class="submit"><input type="submit" name="updatecomms" value="标记已读" class="cancel" style="margin-right:28px"><input type="submit" name="deletecomms" value="删除留言" class="save" onclick="var _me=$(this);showDialog(\'确定删除所选留言吗?\', \'确认操作\', function(){_me.closest(\'form\').submit();});return false;"></div></form>';
    }
예제 #10
0
파일: guests.php 프로젝트: tecshuttle/51qsk
    public function index()
    {
        $NumPerPage = 10;
        $page = ForceIntFrom('p', 1);
        $letter = ForceStringFrom('key');
        $search = ForceStringFrom('s');
        $groupid = ForceStringFrom('g');
        if (IsGet('s')) {
            $search = urldecode($search);
        }
        $start = $NumPerPage * ($page - 1);
        $admins = array();
        $getadmins = APP::$DB->query("SELECT aid, fullname FROM " . TABLE_PREFIX . "admin");
        while ($a = APP::$DB->fetch($getadmins)) {
            $admins[$a['aid']] = $a['fullname'];
        }
        SubMenu('客人列表', array(array('客人列表', 'guests', 1)));
        TableHeader('快速查找客人');
        for ($alphabet = 'a'; $alphabet != 'aa'; $alphabet++) {
            $alphabetlinks .= '<a href="' . BURL('guests?key=' . $alphabet) . '" title="' . strtoupper($alphabet) . '开头的客人">' . strtoupper($alphabet) . '</a> &nbsp;';
        }
        TableRow('<center><b><a href="' . BURL('guests') . '">[全部客人]</a>&nbsp;&nbsp;&nbsp;<a href="' . BURL('guests?key=Other') . '">[中文名]</a>&nbsp;&nbsp;&nbsp;' . $alphabetlinks . '</b></center>');
        TableFooter();
        TableHeader('搜索及快速删除');
        TableRow('<center><form method="post" action="' . BURL('guests') . '" name="searchguests" style="display:inline-block;*display:inline;"><label>关键字:</label>&nbsp;<input type="text" name="s" size="18">&nbsp;&nbsp;&nbsp;<label>语言或意向:</label>&nbsp;<select name="g"><option value="0">全部</option><option value="cn" ' . Iif($groupid == 'cn', 'SELECTED') . ' class=blue>中文 (语言)</option><option value="en" ' . Iif($groupid == 'en', 'SELECTED') . ' class=red>EN (语言)</option><option value="5" ' . Iif($groupid == '5', 'SELECTED') . '>5分 (意向)</option><option value="4" ' . Iif($groupid == '4', 'SELECTED') . '>4分 (意向)</option><option value="3" ' . Iif($groupid == '3', 'SELECTED') . '>3分 (意向)</option><option value="2" ' . Iif($groupid == '2', 'SELECTED') . '>2分 (意向)</option><option value="1" ' . Iif($groupid == '1', 'SELECTED') . '>1分 (意向)</option></select>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="搜索客人" class="cancel"></form>

		<form method="post" action="' . BURL('guests/fastdelete') . '" name="fastdelete" style="display:inline-block;margin-left:80px;*display:inline;"><label>快速删除客人:</label>&nbsp;<select name="days"><option value="0">请选择 ...</option><option value="360">12个月前登录的客人</option><option value="180">&nbsp;6 个月前登录的客人</option><option value="90">&nbsp;3 个月前登录的客人</option><option value="30">&nbsp;1 个月前登录的客人</option></select>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="快速删除" class="save" onclick="var _me=$(this);showDialog(\'确定删除所选客人吗?<br>注: 客人的对话记录将同时被删除.\', \'确认操作\', function(){_me.closest(\'form\').submit();});return false;"></form></center>');
        TableFooter();
        if ($letter) {
            if ($letter == 'Other') {
                $searchsql = " WHERE fullname <> '' AND fullname NOT REGEXP(\"^[a-zA-Z]\") ";
                $title = '<span class=note>中文姓名</span> 的客人列表';
            } else {
                $searchsql = " WHERE fullname LIKE '{$letter}%' ";
                $title = '<span class=note>' . strtoupper($letter) . '</span> 字母开头的客人列表';
            }
        } else {
            if ($search) {
                if (preg_match("/^[1-9][0-9]*\$/", $search)) {
                    $s = ForceInt($search);
                    $searchsql = " WHERE gid = '{$s}' OR aid = '{$s}' OR phone LIKE '{$s}' ";
                    //按ID搜索
                    $title = "搜索数字为: <span class=note>{$s}</span> 的客人";
                } else {
                    $searchsql = " WHERE (fullname LIKE '%{$search}%' OR address LIKE '%{$search}%' OR browser LIKE '%{$search}%' OR email LIKE '%{$search}%' OR ipzone LIKE '%{$search}%' OR remark LIKE '%{$search}%') ";
                    $title = "搜索: <span class=note>{$search}</span> 的客人列表";
                }
                if ($groupid) {
                    if ($groupid == 'cn' or $groupid == 'en') {
                        $searchsql .= " AND lang = " . Iif($groupid == 'cn', 1, 0) . " ";
                        $title = "在 <span class=note>" . Iif($groupid == 'cn', '中文客人', '英文客人') . "</span> 中, " . $title;
                    } else {
                        $searchsql .= " AND grade = '{$groupid}' ";
                        $title = "在 <span class=note>意向为: " . $groupid . "分</span> 中, " . $title;
                    }
                }
            } else {
                if ($groupid) {
                    if ($groupid == 'cn' or $groupid == 'en') {
                        $searchsql .= " WHERE lang = " . Iif($groupid == 'cn', 1, 0) . " ";
                        $title = "全部 <span class=note>" . Iif($groupid == 'cn', '中文客人', '英文客人') . "</span> 列表";
                    } else {
                        $searchsql .= " WHERE grade = '{$groupid}' ";
                        $title = "<span class=note>意向为: " . $groupid . " 分</span> 的客人列表";
                    }
                } else {
                    $searchsql = '';
                    $title = '全部客人列表';
                }
            }
        }
        $getguests = APP::$DB->query("SELECT * FROM " . TABLE_PREFIX . "guest " . $searchsql . " ORDER BY last DESC LIMIT {$start},{$NumPerPage}");
        $maxrows = APP::$DB->getOne("SELECT COUNT(gid) AS value FROM " . TABLE_PREFIX . "guest " . $searchsql);
        echo '<form method="post" action="' . BURL('guests/updateguests') . '" name="guestsform">
		<input type="hidden" name="p" value="' . $page . '">';
        TableHeader($title . '(' . $maxrows['value'] . '个)');
        TableRow(array('ID', '姓名', '意向分', '语言', '登录', '踢出 (次)', '最后服务', '浏览器', '来自页面', 'Email', '电话', '地址', '备注', '归属地 (IP)', '最后登陆', '<input type="checkbox" id="checkAll" for="deletegids[]"> <label for="checkAll">删除</label>'), 'tr0');
        if ($maxrows['value'] < 1) {
            TableRow('<center><BR><font class=redb>未搜索到任何客人!</font><BR><BR></center>');
        } else {
            while ($user = APP::$DB->fetch($getguests)) {
                TableRow(array($user['gid'], '<a title="编辑" href="' . BURL('guests/edit?gid=' . $user['gid']) . '">' . Iif($user['fullname'], $user['fullname'], '<font class=grey>' . Iif($user['lang'], '无名', 'None') . '</font>') . '</a>', $user['grade'], Iif($user['lang'], '中文', 'EN'), $user['logins'], $user['banned'], $admins[$user['aid']], $user['browser'], "<a href=\"{$user['fromurl']}\" target=\"_blank\">" . ShortTitle($user['fromurl'], 36) . "</a>", Iif($user['email'], '<a href="mailto:' . $user['email'] . '">' . $user['email'] . '</a>'), $user['phone'], $user['address'], ShortTitle($user['remark'], 48), $user['ipzone'] . " ({$user['lastip']})", DisplayDate($user['last'], '', 1), '<input type="checkbox" name="deletegids[]" value="' . $user['gid'] . '">'));
            }
            $totalpages = ceil($maxrows['value'] / $NumPerPage);
            if ($totalpages > 1) {
                TableRow(GetPageList(BURL('guests'), $totalpages, $page, 10, 'key', $letter, 's', urlencode($search), 'g', $groupid));
            }
        }
        TableFooter();
        PrintSubmit('删除客人', '', 1, '确定删除所选客人吗?<br>注: 客人的对话记录将同时被删除.');
    }
예제 #11
0
파일: users.php 프로젝트: tecshuttle/51qsk
    public function index()
    {
        $NumPerPage = 10;
        $page = ForceIntFrom('p', 1);
        $start = $NumPerPage * ($page - 1);
        SubMenu('客服列表', array(array('客服列表', 'users', 1), array('添加客服', 'users/add')));
        $getusers = APP::$DB->query("SELECT * FROM " . TABLE_PREFIX . "admin ORDER BY activated ASC, aid DESC LIMIT {$start},{$NumPerPage}");
        $maxrows = APP::$DB->getOne("SELECT COUNT(aid) AS value FROM " . TABLE_PREFIX . "admin");
        echo '<form method="post" action="' . BURL('users/updateusers') . '" name="usersform">
		<input type="hidden" name="p" value="' . $page . '">';
        TableHeader('共有 ' . $maxrows['value'] . ' 位客服人员');
        TableRow(array('ID', '用户名', '类型', '状态', 'Email', '登录', '昵称 (中)', '职位 (中)', '昵称 (EN)', '职位 (EN)', '注册日期', '最后登陆 (IP)', '<input type="checkbox" id="checkAll" for="deleteaids[]"> <label for="checkAll">删除</label>'), 'tr0');
        while ($user = APP::$DB->fetch($getusers)) {
            TableRow(array($user['aid'], '<a title="编辑" href="' . BURL('users/edit?aid=' . $user['aid']) . '"><img src="' . GetAvatar($user['aid']) . '" class="avatar wh30">' . Iif($user['activated'] == 1, $user['username'], "<font class=red><s>{$user['username']}</s></font>") . '</a>', Iif($user['type'], '<font class=red>管理员</font>', '客服人员'), Iif($user['activated'], '正常', '<font class=red>已禁止</font>'), Iif($user['aid'] == $this->admin['aid'], $user['email'], '<a href="mailto:' . $user['email'] . '">' . $user['email'] . '</a>'), $user['logins'], $user['fullname'], $user['post'], $user['fullname_en'], $user['post_en'], DisplayDate($user['first']), Iif($user['last'] == 0, '<span class="red">从未登陆</span>', DisplayDate($user['last'], '', 1) . " ({$user['lastip']})"), Iif($user['aid'] != $this->admin['aid'], '<input type="checkbox" name="deleteaids[]" value="' . $user['aid'] . '">')));
        }
        $totalpages = ceil($maxrows['value'] / $NumPerPage);
        if ($totalpages > 1) {
            TableRow(GetPageList(BURL('users'), $totalpages, $page));
        }
        TableFooter();
        PrintSubmit('删除客服', '', 1, '确定删除所选客服吗?');
    }
예제 #12
0
    public function mail()
    {
        echo '<form method="post" action="' . BURL('settings/save') . '">
		<input type="hidden" name="action" value="mail">';
        TableHeader('邮件设置');
        TableRow(array('<B>系统Email地址</B><BR><font class=grey>发送邮件时显示在邮件的回复地址中.<BR>如果没有此项设置, 某些接受邮件的服务器可能会把系统发送的邮件当成垃圾邮件.</font>', '<input type="text" style="width:292px;" name="settings[Email]" value="' . APP::$_CFG['Email'] . '">'));
        TableRow(array('<B>邮件发送方式</B><BR><font class=grey>如果WeLive所在服务器是Windows系统, 则必须选择SMTP方式才能发送邮件(<span class=note>要求服务器php环境支持Sockets</span>).<BR>UNIX或linux服务器则推荐使用PHP Mail函数发送邮件.</font>', '<input type="radio" id="m1" name="settings[UseSmtp]" value="0" ' . Iif(!APP::$_CFG['UseSmtp'], ' checked="checked"') . '><label for="m1">PHP Mail</label><i class="w20"></i><input type="radio" id="m2" name="settings[UseSmtp]" value="1" ' . Iif(APP::$_CFG['UseSmtp'], ' checked="checked"') . '><label for="m2">SMTP</label>'));
        TableRow(array('<B>-- SMTP服务器地址</B><BR><font class=grey>如: mailer.weentech.com 或SMTP邮件服务器IP地址.</font>', '<input type="text" style="width:292px;" name="settings[SmtpHost]" value="' . APP::$_CFG['SmtpHost'] . '">'));
        TableRow(array('<B>-- SMTP服务器端口</B><BR><font class=grey>SMTP邮件服务器的端口号, 一般为25.</font>', '<input type="text" style="width:292px;" name="settings[SmtpPort]" value="' . APP::$_CFG['SmtpPort'] . '">'));
        TableRow(array('<B>-- SMTP服务器邮箱</B><BR><font class=grey>使用当前SMTP邮件服务器时您的Email地址, 此Email地址仅用于发送邮件, 不用于接收Email.</font>', '<input type="text" style="width:292px;" name="settings[SmtpEmail]" value="' . APP::$_CFG['SmtpEmail'] . '">'));
        TableRow(array('<B>-- SMTP服务器邮箱用户名</B><BR><font class=grey>登录SMTP服务器邮箱的用户名. 注: 有的SMTP服务器需求填写为用户名对应的邮箱地址.</font>', '<input type="text" style="width:292px;" name="settings[SmtpUser]" value="' . APP::$_CFG['SmtpUser'] . '">'));
        TableRow(array('<B>-- SMTP服务器用户密码</B><BR><font class=grey>登录SMTP服务器邮箱的用户密码.</font>', '<input type="password" style="width:292px;" name="settings[SmtpPassword]" value="' . APP::$_CFG['SmtpPassword'] . '">'));
        TableFooter();
        PrintSubmit('保存设置');
    }
예제 #13
0
파일: avatar.php 프로젝트: noikiy/meilala
    public function index()
    {
        $userid = $this->admin['aid'];
        SubMenu('上传头像');
        echo '<script type="text/javascript" src="' . SYSDIR . 'public/fullavatar/swfobject.js"></script>
		<script type="text/javascript" src="' . SYSDIR . 'public/fullavatar/fullAvatarEditor.js"></script>';
        TableHeader('我的头像');
        echo '<tr><td class="td" style="padding:18px;vertical-align:top;width:1px;"><a href="' . BURL("users/edit?userid={$userid}") . '"><img src="' . GetAvatar($userid) . '" class="avatar" title="当前头像"></a></td>
		<td class="td last" style="padding:18px 0;">
		<div style="">
			<div id="avatar_upload">
				本组件需要安装Flash Player后才可使用,请从<a href="http://www.adobe.com/go/getflashplayer" target="_blank"> www.adobe.com </a>下载安装。
			</div>
			<div style="text-align:center;display:none;" id="avatar_tools">
				<input type="submit" value="保存头像" class="save" id="avatar_save">
				<input type="submit" value="取消" class="cancel" id="avatar_cancel">
			</div>
		</div>
		</td></tr>';
        TableFooter();
        echo '<script type="text/javascript">
		$(function(){
			swfobject.addDomLoadEvent(function () {
				var swf = new fullAvatarEditor("avatar_upload", 420, 760, {
						id: "swf",
						upload_url: "' . BURL('avatar/ajax') . '",
						src_upload:0,
						quality: 90,
						src_size_over_limit: "文件大小(%7b0%7d)超出限制(2MB)\\n请重新选择!",
						src_size_over_limit_font: "Microsoft Yahei",
						src_size_over_limit_font_size:12,
						src_box_width: 360,
						src_box_height: 360,
						src_box_border_width: 3,
						tab_visible: false,
						browse_button: "请点击按钮选择图片",
						browse_button_font: "Microsoft Yahei",
						browse_button_color: "#FF9900",
						browse_tip: "仅支持JPG、JPEG、GIF、PNG格式的图片文件\\n文件不能大于2MB",
						browse_tip_font_size: 12,
						browse_tip_font: "Microsoft Yahei",
						browse_box_align: "left",
						button_visible: false,
						avatar_sizes: "48*48",
						avatar_sizes_desc: "48*48像素",
						avatar_intro: "保存后将生成一个以下规格的头像:",
						avatar_intro_font: "Microsoft Yahei",
						avatar_intro_font_size: 12,
						avatar_tools_font: "Microsoft Yahei",
						avatar_tools_font_size:12,
						tooltip_zoomIn: "放大",
						tooltip_zoomOut: "缩小",
						tooltip_zoomNone: "按图片窗口大小显示",
						tooltip_rotateCW: "顺时针旋转",
						tooltip_rotateCCW: "逆时针旋转",
						tooltip_reset: "重置",
						tooltip_font: "Microsoft Yahei",
						tooltip_font_size:12,
						tooltip_color:"#C50006"
					}, function (data) {
						switch(data.code){
							case 2:
								if (data.type == 0) {
									$("#avatar_tools").show();
								} else {
									$("#avatar_tools").hide();
								}
							break;
							case 5 : 
								if(data.type == 0){
									$(".avatar").attr("src", data.content.msg);
									showInfo("呵呵, 您的头像已保存!", "", function(){$("#avatar_cancel").click();}, 2, 1);
								}else if(data.type == 1){
									showInfo(data.content.msg, "保存头像失败");
								}else{
									showInfo("保存头像文件失败(未知原因), 请重试!");
								}
							break;
						}
					}
				);

				$("#avatar_save").click(function(e){
					swf.call("upload");
					e.preventDefault();
				});
				$("#avatar_cancel").click(function(e){
					$("#avatar_tools").hide();
					swf.call("changepanel", "upload");
					e.preventDefault();
				});
			});
		});
		</script>';
    }
예제 #14
0
 public function index()
 {
     $myid = $this->admin['aid'];
     $NumPerPage = 10;
     $page = ForceIntFrom('p', 1);
     $search = ForceStringFrom('s');
     $groupid = ForceStringFrom('g');
     if (IsGet('s')) {
         $search = urldecode($search);
     }
     $start = $NumPerPage * ($page - 1);
     SubMenu('我的对话记录', array(array('记录列表', 'mymessages', 1)));
     TableHeader('搜索对话记录');
     TableRow('<center><form method="post" action="' . BURL('mymessages') . '" name="search" style="display:inline-block;"><label>关键字:</label>&nbsp;<input type="text" name="s" size="18">&nbsp;&nbsp;&nbsp;<label>分类:</label>&nbsp;<select name="g"><option value="0">全部</option><option value="1" ' . Iif($groupid == '1', 'SELECTED') . ' class=red>客人的发言</option><option value="2" ' . Iif($groupid == '2', 'SELECTED') . '>我的发言</option></select>&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="搜索记录" class="cancel"></form></center>');
     TableFooter();
     if ($search) {
         if (preg_match("/^[1-9][0-9]*\$/", $search)) {
             $s = ForceInt($search);
             $searchsql = " WHERE (mid = '{$s}' OR fromid = '{$s}' OR toid = '{$s}') ";
             //按ID搜索
             $title = "搜索ID号为: <span class=note>{$s}</span> 的记录";
         } else {
             $searchsql = " WHERE (fromname LIKE '%{$search}%' OR toname LIKE '%{$search}%' OR msg LIKE '%{$search}%') ";
             $title = "搜索: <span class=note>{$search}</span> 的记录列表";
         }
         if ($groupid) {
             if ($groupid == 1 or $groupid == 2) {
                 $searchsql .= " AND (" . Iif($groupid == 1, "type = 0 AND toid = '{$myid}'", "type = 1 AND fromid = '{$myid}'") . ") ";
                 $title = "在 <span class=note>" . Iif($groupid == 1, '客人的发言', '我的发言') . "</span> 中, " . $title;
             }
         } else {
             $searchsql .= " AND ((type = 1 AND fromid = '{$myid}') OR (type = 0 AND toid = '{$myid}')) ";
         }
     } else {
         if ($groupid) {
             if ($groupid == 1 or $groupid == 2) {
                 $searchsql .= " WHERE " . Iif($groupid == 1, "type = 0 AND toid = '{$myid}' ", "type = 1 AND fromid = '{$myid}' ");
                 $title = "全部 <span class=note>" . Iif($groupid == 1, '客人的发言', '我的发言') . "</span> 列表";
             }
         } else {
             $searchsql = " WHERE (type = 1 AND fromid = '{$myid}') OR (type = 0 AND toid = '{$myid}') ";
             $title = '全部记录列表';
         }
     }
     $getmy = APP::$DB->query("SELECT * FROM " . TABLE_PREFIX . "msg " . $searchsql . " ORDER BY mid DESC LIMIT {$start},{$NumPerPage}");
     $maxrows = APP::$DB->getOne("SELECT COUNT(mid) AS value FROM " . TABLE_PREFIX . "msg " . $searchsql);
     TableHeader($title . '(' . $maxrows['value'] . '个)');
     TableRow(array('ID', '发送人', '对话内容', '接收人', '记录时间'), 'tr0');
     if ($maxrows['value'] < 1) {
         TableRow('<center><BR><font class=redb>未搜索到任何记录!</font><BR><BR></center>');
     } else {
         while ($msg = APP::$DB->fetch($getmy)) {
             TableRow(array($msg['mid'], $msg['fromname'], getSmile($msg['msg']), $msg['toname'], DisplayDate($msg['time'], '', 1)));
         }
         $totalpages = ceil($maxrows['value'] / $NumPerPage);
         if ($totalpages > 1) {
             TableRow(GetPageList(BURL('mymessages'), $totalpages, $page, 10, 's', urlencode($search), 'g', $groupid));
         }
     }
     TableFooter();
 }