发现与举报有关的代码是:- elseif ($action == 'report') {
-
- $itemid = empty($_GET['itemid'])?0:intval($_GET['itemid']);
- if(!empty($itemid)) {
- $query = $_SGLOBAL['db']->query('SELECT * FROM '.tname('spaceitems').' WHERE itemid=\''.$itemid.'\'');
- if($item = $_SGLOBAL['db']->fetch_array($query)) {
- $query = $_SGLOBAL['db']->query('SELECT itemid, status FROM '.tname('reports').' WHERE itemid=\''.$itemid.'\'');
- $reportitem = $_SGLOBAL['db']->fetch_array($query);
- if($reportitem) {
- if($reportitem['status'] == '0') {
- showxml($blang['information_has_been_reported']);
- } else {
- showxml($blang['not_a_malicious_report']);
- }
- } else {
-
- if(empty($_SGLOBAL['supe_username'])) {
- $_SGLOBAL['supe_username'] = 'Guest';
- }
- $insertsqlarr = array(
- 'itemid' => $itemid,
- 'reportuid' => $_SGLOBAL['supe_uid'],
- 'reporter' => empty($_SGLOBAL['supe_username'])?'Guest':$_SGLOBAL['supe_username'],
- 'reportdate' => $_SGLOBAL['timestamp'],
- 'status' => 0
- );
- inserttable('reports', $insertsqlarr);
- showxml($blang['reported_success']);
- }
- }
- }
复制代码 上面代码中,有跟数据库有关的代码了。
spaceitems这个表大概要换成模型的相关表吧?是什么呢? |