From 5b7a13ef5dc1c8de827996809a0954941209e8a2 Mon Sep 17 00:00:00 2001 From: iopietro Date: Fri, 1 Jun 2018 18:34:24 +0200 Subject: [PATCH] General fixes +You can now read all reports in the multihunter panel, it's still a work in progress --- Admin/Templates/Notice/all.tpl | 175 ++++++++++++++++++--------------- Admin/Templates/report.tpl | 21 ++-- Admin/admin.php | 38 ++----- Templates/Message/write.tpl | 2 +- 4 files changed, 119 insertions(+), 117 deletions(-) diff --git a/Admin/Templates/Notice/all.tpl b/Admin/Templates/Notice/all.tpl index e5725837..e07d1e42 100644 --- a/Admin/Templates/Notice/all.tpl +++ b/Admin/Templates/Notice/all.tpl @@ -1,96 +1,117 @@
- - - - - - - -
Subject: -Sent
uid."'") or die(mysqli_error($database->dblink)); - $golds = mysqli_fetch_array($MyGold); - $date2=strtotime("NOW"); - if ($golds['plus'] <= $date2) { ?> + + + + + + + + + + - - - - - + + + = $i) { - echo " +$name = 1; +$count = 0; +for ($i = (1 + $s); $i <= (10 + $s); $i ++) { + if (count($rep1) >= $i) { + echo ""; + $type = $rep1[$i - 1]['ntype']; + if ($type >= 15 || $type <= 17) { + // $type = $type-11; + echo "\"""; + } else if ($type >= 18 || $type <= 22) { + echo "\"""; + } else { + echo "\"""; } - $name++; + echo "
" . $rep1[$i - 1]['topic'] . " "; + if ($rep1[$i - 1]['viewed'] == 0) { + echo "(new)"; + } + $date = $generator->procMtime($rep1[$i - 1]['time']); + echo "
"; } - if(count($rep1) == 0) { - echo ""; + $name ++; +} +if (count($rep1) == 0) { + echo ""; } ?> - -
Subject:Sent
uid . "'") or die(mysqli_error($database->dblink)); + $golds = mysqli_fetch_array($MyGold); + $date2 = strtotime("NOW"); + if ($golds['plus'] <= $date2) { + ?> - + - plus) { - if(isset($_GET['t']) && $_GET['t'] == 5) { - echo ""; - } - else { - echo ""; - } - }?> + + plus) { + if (isset($_GET['t']) && $_GET['t'] == 5) { + echo ""; + } else { + echo ""; + } + } + ?> + 10) { - echo "«»"; - } - else if(isset($_GET['s']) && count($rep1) > $_GET['s']) { - if(count($rep1) > ($_GET['s']+10) && $_GET['s']-10 < count($rep1) && $_GET['s'] != 0) { - echo "«»"; - } - else if(count($rep1) > $_GET['s']+10) { - echo "«»"; - } - else { - echo "«»"; - } - } - ?> + if (! isset($_GET['s']) && count($rep1) < 10) { + echo "«»"; + } else if (! isset($_GET['s']) && count($rep1) > 10) { + echo "«»"; + } else if (isset($_GET['s']) && count($rep1) > $_GET['s']) { + if (count($rep1) > ($_GET['s'] + 10) && $_GET['s'] - 10 < count($rep1) && $_GET['s'] != 0) { + echo "«»"; + } else if (count($rep1) > $_GET['s'] + 10) { + echo "«»"; + } else { + echo "«»"; + } + } + ?>
"; - $type = $rep1[$i-1]['ntype']; - if($type==15 or $type==16 or $type==17){ - //$type = $type-11; - echo "\"".$noticeClass[$type]."\""; - }else if($type==18 or $type==19 or $type==20 or $type==21 or $type==22){ - echo "\"".$noticeClass[$type]."\""; - }else{ - echo "\"".$noticeClass[$type]."\""; - } - echo "
".$rep1[$i-1]['topic']." "; - if($rep1[$i-1]['viewed'] == 0) { - echo "(new)"; - } - $date = $generator->procMtime($rep1[$i-1]['time']); - echo "
".$date[0]." ".$date[1]."
" . $date[0] . " " . $date[1] . "
There are no reports available.
There are no reports available.
- +
\ No newline at end of file diff --git a/Admin/Templates/report.tpl b/Admin/Templates/report.tpl index 212f0fe8..2292ddf3 100644 --- a/Admin/Templates/report.tpl +++ b/Admin/Templates/report.tpl @@ -18,15 +18,15 @@ else $result = mysqli_query($GLOBALS["link"], $sql); $rep1 = $database->mysqli_fetch_all($result); } + if($rep1) { - //$att = $database->getUserArray($rep1['uid'],1); ?> -

Under Construction

+

Reports

+elseif($rep) +{ +?> -
- - reporte de: getUserField($rep[0]['uid'],'username',0);?>
+ Report of: getUserField($rep['uid'],'username',0);?>
-

Reporte

+

Report

readingNotice['data'] = $rep['data']; + include ("../Templates/Notice/" . $message->getReportType($type) . ".tpl"); } else echo "Report ID ".$_GET['bid']." doesn't exist!"; ?> diff --git a/Admin/admin.php b/Admin/admin.php index f542d03b..41febb99 100644 --- a/Admin/admin.php +++ b/Admin/admin.php @@ -527,46 +527,26 @@ if (!empty($_GET['p'])) { CheckLogin()) { - if($_POST or $_GET) + if($_POST || $_GET) { if($_GET['p'] and $_GET['p']!="search") { $filename = 'Templates/'.$_GET['p'].'.tpl'; - if(file_exists($filename)) - { - include($filename); - } - else - { - include('Templates/404.tpl'); - } - } - else - { - include('Templates/search.tpl'); + if(file_exists($filename)) include($filename); + else include('Templates/404.tpl'); } + else include('Templates/search.tpl'); + if(isset($_POST['p']) && isset($_POST['s']) && $_POST['p'] and $_POST['s']) { $filename = 'Templates/results_'.$_POST['p'].'.tpl'; - if(file_exists($filename)) - { - include($filename); - } - else - { - include('Templates/404.tpl'); - } + if(file_exists($filename)) include($filename); + else include('Templates/404.tpl'); } } - else - { - include('Templates/home.tpl'); - } - } - else - { - include('Templates/login.tpl'); + else include('Templates/home.tpl'); } + else include('Templates/login.tpl'); ?>
diff --git a/Templates/Message/write.tpl b/Templates/Message/write.tpl index d51bd604..f7aa6c3e 100644 --- a/Templates/Message/write.tpl +++ b/Templates/Message/write.tpl @@ -74,7 +74,7 @@ echo "re1:".strip_tags($message->reply['topic']); }} ?>" maxlength="35" onkeyup=
- +