Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- MAde by Believer from Nulledbb.com - Galaxy...
- Please do not share to anyone ;)
- */
- define('IN_MYBB', 1);
- require "global.php";
- global $db, $headerinclude, $header, $theme, $footer;
- $rlq = $db->simple_select("reputation", "uid, reputation, adduid, dateline, comments", "uid", array("order_by" => 'dateline', "order_dir" => 'DESC'));
- $query = $db->simple_select("reputation", "COUNT(*) AS totalreps");
- $totalreps = $db->fetch_field($query, "totalreps");
- $nobans = "
- <tr>
- <td colspan='5' align='center' valign='middle' class='trow1'>There are no Reputation Logs</td>
- </tr>";
- if($db->num_rows($rlq) != 0)
- {
- $replogl = "";
- while($rlqv = $db->fetch_array($rlq))
- {
- $r_uid = $rlqv['uid'];
- $r_adduid = $rlqv['adduid'];
- $r_comments = $rlqv['comments'];
- $r_date = my_date('relative', $rlqv['dateline']);
- $r_reputation = $rlqv['reputation'];
- $getname = $db->query("SELECT username FROM ".TABLE_PREFIX."users WHERE uid='".(int)$r_uid."'");
- $fetchn = $db->fetch_array($getname);
- $name = $fetchn['username'];
- $getnamea = $db->query("SELECT username FROM ".TABLE_PREFIX."users WHERE uid='".(int)$r_adduid."'");
- $fetchna = $db->fetch_array($getnamea);
- $namea = $fetchna['username'];
- if ($rlqv['reputation'] == 0) {
- $r_reputation = "<div class=\"neutralrep\" style=\"text-align: center;\"><span>Neutral / 0</span></div>";
- } elseif ($rlqv['reputation'] < 0) {
- $r_reputation = "<div class=\"negativerep\" style=\"text-align: center;\"><span>$r_reputation</span></div>";
- } elseif ($rlqv['reputation'] > 0) {
- $r_reputation = "<div class=\"positiverep\" style=\"text-align: center;\">$r_reputation</span>";
- }
- $replogl .= '
- <tr>
- <td class="trow1"><span>'.$namea.'</span></td>
- <td class="trow1">'.$r_comments.'</td>
- <td class="trow1"><span>'.$name.'</span></td>
- <td class="trow1" align="left">'.$r_date.'</td>
- <td class="trow1" align="right" width="85">'.$r_reputation.'</td>
- </tr>
- ';
- }
- }
- else
- {
- $replogl = '<tr><td class="trow1" colspan="2" align="center">'. "None" .'</td></tr>';
- }
- $template='<html>
- <head>
- <title>Reputation Log</title>
- {$headerinclude}
- </head>
- <style>
- .positiverep {
- background-color: green;
- color: white;
- border: 1px solid green;
- border-radius: 1px;
- }
- .negativerep {
- background-color: red;
- color: white;
- border: 1px solid red;
- border-radius: 1px;
- }
- .neutralrep{
- background-color: rgba(0, 0, 0, 0.31);
- color: white;
- border: 1px solid rgba(0, 0, 0, 0.31);
- border-radius: 1px;
- }
- </style>
- <body>
- {$header}
- <table border="0" cellspacing="0" cellpadding="10" width="100%" class="tborder">
- <tbody><tr>
- <td colspan="5" class="thead"><strong>Reputation Log</strong><div style="background: rgba(37, 37, 37, 0.55); float: right;padding: 2px;border-radius: 2px;padding-right: 4px;padding-left: 4px;">Total rep - {$totalreps}</div>
- </td>
- </tr>
- </tbody><tbody>
- <tr>
- <td class="tcat">Username</td>
- <td class="tcat">Reason</td>
- <td class="tcat">Given</td>
- <td class="tcat" align="left">Date</td>
- <td class="tcat" align="center">Reputation</td>
- </tr>
- {$replogl}
- </tbody>
- </table>
- {$footer}
- </body>
- </html>';
- $template=str_replace("\'", "'", addslashes($template));
- eval("\$page=\"".$template."\";");
- output_page($page);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement