| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- //decode by http://dezend.qiling.org QQ 2859470
- define('CURSCRIPT', 'member_comment');
- require_once dirname(__FILE__) . '/global.php';
- require_once MYMPS_INC . '/db.class.php';
- $mlevel = array();
- $mlevel[0] = '<font color=red>待审</font>';
- $mlevel[1] = '<font color=#006acd>正常</font>';
- $commentlevel = $commentlevel ? $commentlevel : 'l2';
- if (!submit_check(CURSCRIPT . '_submit')) {
- $where = 'WHERE 1';
- if ($commentlevel == 'l0') {
- $where .= ' AND a.commentlevel = \'0\'';
- } else {
- if ($commentlevel == 'l1') {
- $where .= ' AND a.commentlevel = \'1\'';
- } else {
- $where .= '';
- }
- }
- $where .= $keywords ? ' AND a.reply LIKE \'%' . $keywords . '%\'' : '';
- chk_admin_purview('purview_模板点评');
- $here = '网友点评';
- $rows_num = $db->getOne('SELECT COUNT(a.id) FROM `' . $db_mymps . 'member_comment` AS a ' . $where);
- $param = setParam(array('part', 'commentlevel'));
- $comment = page1('SELECT a.*,b.tname FROM `' . $db_mymps . 'member_comment` AS a LEFT JOIN `' . $db_mymps . 'member` AS b ON a.userid=b.userid ' . $where . ' ORDER BY a.id DESC');
- include mymps_tpl(CURSCRIPT);
- } else {
- if (is_array($ids)) {
- if ($part == 'delall') {
- foreach ($ids as $kids => $vids) {
- mymps_delete('member_comment', 'WHERE id = ' . $vids);
- }
- write_msg('成功删除指定点评信息!', $url, 'writerecord');
- } else {
- if (strstr($part, 'level')) {
- $part = FileExt($part);
- foreach ($ids as $kids => $vids) {
- $db->query('UPDATE `' . $db_mymps . 'member_comment` SET commentlevel = \'' . $part . '\' WHERE id = ' . $vids);
- }
- write_msg('成功修改指定点评的信息状态为' . $mlevel[$part] . '!', $url, 'writerecord');
- } else {
- write_msg('Undefined Action!');
- }
- }
- } else {
- write_msg('请选定您要操作处理的点评!');
- }
- }
- is_object($db) && $db->Close();
- $mymps_global = $db = $db_mymps = $part = NULL;
|