diff --git a/.htaccess b/.htaccess index 8982287..3109550 100644 --- a/.htaccess +++ b/.htaccess @@ -17,7 +17,8 @@ RewriteRule ^np/images/(.*)$ /modules/nickpage/images/$1 [L,NC] RewriteRule np/(.*) index.php?task=nickpage&user=$1 RewriteRule ^register/(.*)? register.php?regstring=$1 RewriteRule ^avatar/(.*)? index.php?task=rp&sum=avatar&id=$1 -RewriteRule ^chat/reports/(.*)? index.php?task=chat&sub=report&uid=$1 +RewriteRule ^reports/(.*)? index.php?task=chat&sub=report&uid=$1 +RewriteRule ^reports/? index.php?task=chat&sub=report RewriteRule ^chat/in? index.php?task=chat&sub=in RewriteRule ^chat? index.php?task=chat RewriteRule ^t/(.*\.html?)$ index.php?task=text&url=$1 [L] diff --git a/modules/chat/chat.ajax.php b/modules/chat/chat.ajax.php index 504fad5..53547b5 100644 --- a/modules/chat/chat.ajax.php +++ b/modules/chat/chat.ajax.php @@ -354,19 +354,19 @@ class chat extends ajax_module{ } if($_GET['call']=='repdelete'){ - if($session->userdata['rp_admin']=='1'){ + if($session->userdata['chatrights']>=50){ $db->query("DELETE FROM `ptc_reports` WHERE `rid` = '".intval($_GET['id'])."'"); } } if($_GET['call']=='repseen'){ - if($session->userdata['rp_admin']=='1'){ + if($session->userdata['chatrights']>=50){ $db->query("UPDATE `ptc_reports` SET `seen`=1 WHERE `rid` = '".intval($_GET['id'])."'"); } } if($_GET['call']=='repunseen'){ - if($session->userdata['rp_admin']=='1'){ + if($session->userdata['chatrights']>=50){ $sql="UPDATE `ptc_reports` SET `seen`='0' WHERE `rid` = '".intval($_GET['id'])."'"; echo $sql; $db->query("UPDATE `ptc_reports` SET `seen`='0' WHERE `rid` = '".intval($_GET['id'])."'"); diff --git a/modules/chat/chat.output.php b/modules/chat/chat.output.php index 61b1a66..752a6a0 100644 --- a/modules/chat/chat.output.php +++ b/modules/chat/chat.output.php @@ -324,7 +324,7 @@ class chat extends module{ $counter++; } if(isset($_POST['room']) && $_POST['room']!=""){ - if($_POST['room']!='Chitchat' || $session->userdata['rp_admin']==1){ + if($_POST['room']!='Chitchat' || $session->userdata['chatrights']>=50){ $log=$db->query("SELECT * FROM `ptc_chatlog` WHERE `room`='".$db->escape($_POST['room'])."'".$date.$cd." ORDER BY `timestamp`"); while($rowl=$db->fetch_array($log)){ $rowl['date']=date('H:i:s',$rowl['timestamp']); @@ -368,7 +368,7 @@ class chat extends module{ $rooms=''; $result=$db->query("SELECT `room` FROM `ptc_chatlog` GROUP BY `room`"); while($row=$db->fetch_array($result)){ - if($session->userdata['rp_admin']==0 && $row['room']=='Chitchat'){ + if($session->userdata['chatrights']<50 && $row['room']=='Chitchat'){ continue; } if($_POST['room']==$row['room']){ @@ -396,7 +396,7 @@ class chat extends module{ if($session->userdata['uid']==0){ $core->message('Sorry', "You have to be logged in to participate."); }else{ - if(!$session->userdata['rp_admin']=='1'){ + if(!$session->userdata['chatrights']>=50){ $core->message('Sorry', "Can't touch this."); }else{ if($_GET['uid']==''){ diff --git a/modules/chat/templates/default/reports.tpl b/modules/chat/templates/default/reports.tpl index 4908b8b..92bdced 100644 --- a/modules/chat/templates/default/reports.tpl +++ b/modules/chat/templates/default/reports.tpl @@ -1,47 +1,26 @@ - - -
- - - - - - - - - - - - - - - - -{$meta} -