member_comment.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. //decode by http://dezend.qiling.org QQ 2859470
  3. define('CURSCRIPT', 'member_comment');
  4. require_once dirname(__FILE__) . '/global.php';
  5. require_once MYMPS_INC . '/db.class.php';
  6. $mlevel = array();
  7. $mlevel[0] = '<font color=red>待审</font>';
  8. $mlevel[1] = '<font color=#006acd>正常</font>';
  9. $commentlevel = $commentlevel ? $commentlevel : 'l2';
  10. if (!submit_check(CURSCRIPT . '_submit')) {
  11. $where = 'WHERE 1';
  12. if ($commentlevel == 'l0') {
  13. $where .= ' AND a.commentlevel = \'0\'';
  14. } else {
  15. if ($commentlevel == 'l1') {
  16. $where .= ' AND a.commentlevel = \'1\'';
  17. } else {
  18. $where .= '';
  19. }
  20. }
  21. $where .= $keywords ? ' AND a.reply LIKE \'%' . $keywords . '%\'' : '';
  22. chk_admin_purview('purview_模板点评');
  23. $here = '网友点评';
  24. $rows_num = $db->getOne('SELECT COUNT(a.id) FROM `' . $db_mymps . 'member_comment` AS a ' . $where);
  25. $param = setParam(array('part', 'commentlevel'));
  26. $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');
  27. include mymps_tpl(CURSCRIPT);
  28. } else {
  29. if (is_array($ids)) {
  30. if ($part == 'delall') {
  31. foreach ($ids as $kids => $vids) {
  32. mymps_delete('member_comment', 'WHERE id = ' . $vids);
  33. }
  34. write_msg('成功删除指定点评信息!', $url, 'writerecord');
  35. } else {
  36. if (strstr($part, 'level')) {
  37. $part = FileExt($part);
  38. foreach ($ids as $kids => $vids) {
  39. $db->query('UPDATE `' . $db_mymps . 'member_comment` SET commentlevel = \'' . $part . '\' WHERE id = ' . $vids);
  40. }
  41. write_msg('成功修改指定点评的信息状态为' . $mlevel[$part] . '!', $url, 'writerecord');
  42. } else {
  43. write_msg('Undefined Action!');
  44. }
  45. }
  46. } else {
  47. write_msg('请选定您要操作处理的点评!');
  48. }
  49. }
  50. is_object($db) && $db->Close();
  51. $mymps_global = $db = $db_mymps = $part = NULL;