Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($_SESSION['user_admin']>=$adminRights['whisper_log']) {
- }
- ?>
- <style type="text/css">
- .aviso{
- background-color: #008000;
- padding: 10px;
- text-align: center;
- opacity: 0.85;
- color: white;
- border-radius: 4px;
- border: 1px solid #005B00;
- }
- .aviso_erro{
- background-color: #FF6600;
- padding: 10px;
- text-align: center;
- opacity: 0.85;
- color: white;
- border-radius: 4px;
- border: 1px solid #005B00;
- }
- .itemlist{
- background-color: #333333;
- border: 1px solid black;
- border-radius: 6px;
- color: white;
- text-align: center;
- }
- .topLine{
- background-color: #1E1810;
- border: 1px solid black;
- border-radius: 6px;
- color: white;
- text-align: center;
- }
- #reborndes{
- background-color: #333;
- padding:3px;
- text-align: center;
- border-radius: 5px;
- border: 1px solid #202020;
- color: white;
- }
- #reborndes a{
- color: #C0C0C0;
- }
- input[type="submit"]{
- color: white;
- }
- #aligenter{}
- </style>
- <h2>Logs PMS</h2>
- <form action="index.php?s=admin&a=whisper_log" method="GET">
- <table>
- <input type="hidden" name="s" value="admin"/>
- <input type="hidden" name="a" value="whisper_log"/>
- <tr>
- <td class="topLine">
- <input type="text" name="id" size="11" maxlength="11" placeholder="ID do char"/>
- </td>
- <td class="topLine">
- OU
- </td>
- <td class="topLine">
- <input type="text" name="nick" size="11" maxlength="11" placeholder="Nick do char"/>
- </td>
- <td class="topLine" rowspan="4"><input type="submit" name="submit" value="Procurar"/></td>
- </tr>
- </table>
- </form>
- <?php
- if(isset($_GET['submit']) && $_GET['submit']="suchen" && empty($_GET['who_name'] || $_GET['nick'])){
- $msgtxt = "Porfavor digite algum valor... nenhum resultado encontrado.";
- }
- if(isset($_GET['submit']) && $_GET['submit']="suchen" && !empty($_GET['who_name'] || $_GET['nick']) ){
- if(isset($_GET['who_name']) && empty($_GET['nick'])){
- // PRIMEIRA AÇÃO
- echo"<div class=\"aviso\">Você filtrou as mensagens desejadas pelo ID: <b>".$_GET['who_name']."</b>.</div>";
- $CPSeite = 50;
- if(isset($_GET['pageid'])) {
- if(!checkInt($_GET['pageid']) || !($_GET['pageid']>0)) $aSeite = 1;
- else $aSeite = $_GET['pageid'];
- } else {
- $aSeite = 1;
- }
- $sqlCmd = "SELECT COUNT(*) as logs FROM log.chat_log WHERE who_name='".$_GET['who_name']."'";
- $sqlQry = mysql_query($sqlCmd,$sqlServ);
- $getSum = mysql_fetch_object($sqlQry);
- $cSeite = calcPages($getSum->logs,$aSeite,$CPSeite);
- $maxRange = 5;
- $maxStep = 15;
- if(($aSeite-$maxRange)>0) $sStart = $aSeite-$maxRange;
- else $sStart = 1;
- if(($aSeite+$maxRange)<=$cSeite[0]) $sEnde = $aSeite+$maxRange;
- else $sEnde = $cSeite[0];
- echo "<table>
- <tr>
- <th class='topLine'>Id </th>
- <th class='topLine'>Horário</th>
- <th class='topLine'>Nick</th>
- <th class='topLine'>Destinatário</th>
- <th class='topLine'>Mensagem</th>
- </tr>";
- $selectplayer0 = "SELECT id, name FROM player.player WHERE id='".$_GET['id']."'";
- $selectplayer1 = mysql_query($selectplayer0,$sqlServ);
- $linha = mysql_fetch_assoc($selectplayer1);
- $abfragen1 = "SELECT * FROM log.whisper_log WHERE whom_name='".$linha['name']."' LIMIT ".$cSeite[1].",".$CPSeite;
- $abfragen2 = mysql_query($abfragen1,$sqlServ);
- $totalstatic = mysql_num_rows($abfragen2);
- $abfragen3333 = mysql_fetch_object($selectplayer1);
- if($totalstatic > 0){
- }else{
- $msgtxt = "<a style=\"color:#fff;\">Nenhum resultado foi encontrado.</a>";
- echo"<div class=\"aviso_erro\">".$msgtxt."</div>";
- }
- $i1 = 0;
- $i2 = 1;
- while($abfragen3 = mysql_fetch_object($abfragen2)) {
- $i1++;
- if ($i1 == $i2) {
- $i2 = $i2 + 2;
- $class = "tdunkel";
- } else {
- $class = "thell";
- }
- echo " <tr>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->id."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->time."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->from_msg."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->to_msg."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->msg_text."</td>
- </tr>";
- }
- echo "</table>";
- $ACPSeite = 50;
- if(isset($_GET['pageid'])) {
- if(!checkInt($_GET['pageid']) || !($_GET['pageid']>0)) $AaSeite = 1;
- else $AaSeite = $_GET['pageid'];
- } else {
- $AaSeite = 1;
- }
- $sqlCmdRRR = "SELECT COUNT(*) as logs FROM log.whisper_log WHERE from_msg='".$linha['name']."'";
- $sqlQryRRR = mysql_query($sqlCmdRRR,$sqlServ);
- $getSumRRR = mysql_fetch_object($sqlQryRRR);
- $cSeiteRRR = calcPages($getSumRRR->logs,$AaSeite,$ACPSeite);
- $maxRange = 5;
- $maxStep = 15;
- if(($AaSeite-$maxRange)>0) $sStart = $AaSeite-$maxRange;
- else $sStart = 1;
- if(($AaSeite+$maxRange)<=$cSeiteRRR[0]) $sEnde = $AaSeite+$maxRange;
- else $sEnde = $cSeiteRRR[0];
- echo "<a id=\"aligenter\" href=\"index.php?s=admin&a=whisper_log\"><input type=\"submit\" name=\"submit\" value=\"Retornar\"/></a>";
- echo '<table><tr><td class="tdunkel">';
- if(($AaSeite-$maxStep)>0)
- echo ' <a href="index.php?s=admin&a=whisper_log&id='.$linha['id'].'&nick=&submit=Procurar&pageid='.($AaSeite-$maxStep).'">'.($AaSeite-$maxStep).'</a> «';
- else echo ' <a href="index.php?s=admin&a=whisper_log&id='.$linha['id'].'&nick=&submit=Procurar&pageid=1">1</a> «';
- echo' </td>';
- for($i=$sStart;$i<=$sEnde;$i++) {
- $sKlasse = ($i==$AaSeite) ? "topLine" : "thell";
- echo' <td class="'.$sKlasse.'" style="text-align:center;">';
- echo' <a href="index.php?s=admin&a=whisper_log&id='.$linha['id'].'&nick=&submit=Procurar&pageid='.$i.'">'.$i.'</a>';
- echo' </td>';
- }
- echo' <td class="tdunkel" style="text-align:right;">';
- if(($AaSeite+$maxStep)<=$cSeiteRRR[0]) echo ' » <a href="index.php?s=admin&a=whisper_log&id='.$linha['id'].'&nick=&submit=Procurar&pageid='.($AaSeite+$maxStep).'">'.($AaSeite+$maxStep).'</a>';
- else echo ' » <a href="index.php?s=admin&a=whisper_log&id='.$linha['id'].'&nick=&submit=Procurar&pageid='.$cSeiteRRR[0].'">'.$cSeiteRRR[0].'</a>';
- echo' </td>';
- echo' </tr>';
- echo'</table>';
- }
- if(isset($_GET['nick']) && empty($_GET['id'])){
- // SEGUNDA AÇÃO
- echo"<div class=\"aviso\">Você filtrou as mensagens desejadas pelo NICK: <b>".$_GET['nick']."</b>.</div>";
- $CPSeite = 50;
- if(isset($_GET['page'])) {
- if(!checkInt($_GET['page']) || !($_GET['page']>0)) $aSeite = 1;
- else $aSeite = $_GET['page'];
- } else {
- $aSeite = 1;
- }
- $sqlCmd = "SELECT COUNT(*) as logs FROM log.whisper_log WHERE from_msg ='".$_GET['nick']."'";
- $sqlQry = mysql_query($sqlCmd,$sqlServ);
- $getSum = mysql_fetch_object($sqlQry);
- $cSeite = calcPages($getSum->logs,$aSeite,$CPSeite);
- $maxRange = 5;
- $maxStep = 15;
- if(($aSeite-$maxRange)>0) $sStart = $aSeite-$maxRange;
- else $sStart = 1;
- if(($aSeite+$maxRange)<=$cSeite[0]) $sEnde = $aSeite+$maxRange;
- else $sEnde = $cSeite[0];
- echo "<table>
- <tr>
- <th class='topLine'>Id </th>
- <th class='topLine'>Horário</th>
- <th class='topLine'>Nick</th>
- <th class='topLine'>Destinatário</th>
- <th class='topLine'>Mensagem</th>
- </tr>";
- $abfragen1 = "SELECT * FROM log.whisper_log WHERE from_msg ='".$_GET['nick']."' LIMIT ".$cSeite[1].",".$CPSeite;
- $abfragen2 = mysql_query($abfragen1,$sqlServ);
- $i1 = 0;
- $i2 = 1;
- $totalstaticm = mysql_num_rows($abfragen2);
- $abfragen3333 = mysql_fetch_object($abfragen2);
- if($totalstaticm > 0){ }else{
- $msgtxt = "<a style=\"color:#fff;\">Nenhum resultado foi encontrado.</a>";
- echo"<div class=\"aviso_erro\">".$msgtxt."</div>";
- }
- while($abfragen3 = mysql_fetch_object($abfragen2)) {
- $i1++;
- if ($i1 == $i2) {
- $i2 = $i2 + 2;
- $class = "tdunkel";
- } else {
- $class = "thell";
- }
- echo " <tr>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->id."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->time."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->from_msg."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->to_msg."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->msg_text."</td>
- </tr>";
- }
- echo "</table><br />";
- $ACPSeite = 50;
- if(isset($_GET['pagefrom'])) {
- if(!checkInt($_GET['pagefrom']) || !($_GET['pagefrom']>0)) $AaSeite = 1;
- else $AaSeite = $_GET['pagefrom'];
- } else {
- $AaSeite = 1;
- }
- $sqlCmdRRR = "SELECT COUNT(*) as logs FROM log.whisper_log WHERE from_msg='".$_GET['nick']."'";
- $sqlQryRRR = mysql_query($sqlCmdRRR,$sqlServ);
- $getSumRRR = mysql_fetch_object($sqlQryRRR);
- $cSeiteRRR = calcPages($getSumRRR->logs,$AaSeite,$ACPSeite);
- $maxRange = 5;
- $maxStep = 15;
- if(($AaSeite-$maxRange)>0) $sStart = $AaSeite-$maxRange;
- else $sStart = 1;
- if(($AaSeite+$maxRange)<=$cSeiteRRR[0]) $sEnde = $AaSeite+$maxRange;
- else $sEnde = $cSeiteRRR[0];
- echo "<a id=\"aligenter\" href=\"index.php?s=admin&a=whisper_log\"><input type=\"submit\" name=\"submit\" value=\"Retornar\"/></a>";
- echo '<table><tr><td class="tdunkel">';
- if(($AaSeite-$maxStep)>0)
- echo ' <a href="index.php?s=admin&a=whisper_log&id=&nick='.$abfragen3333->from_msg.'&submit=Procurar&pagefrom='.($AaSeite-$maxStep).'">'.($AaSeite-$maxStep).'</a> «';
- else echo ' <a href="index.php?s=admin&a=whisper_log&id=&nick='.$abfragen3333->from_msg.'&submit=Procurar&pagefrom=1">1</a> «';
- echo' </td>';
- for($i=$sStart;$i<=$sEnde;$i++) {
- $sKlasse = ($i==$AaSeite) ? "topLine" : "thell";
- echo' <td class="'.$sKlasse.'" style="text-align:center;">';
- echo' <a href="index.php?s=admin&a=whisper_log&id=&nick='.$abfragen3333->from_msg.'&submit=Procurar&pagefrom='.$i.'">'.$i.'</a>';
- echo' </td>';
- }
- echo' <td class="tdunkel" style="text-align:right;">';
- if(($AaSeite+$maxStep)<=$cSeiteRRR[0]) echo ' » <a href="index.php?s=admin&a=whisper_log&id=&nick='.$abfragen3333->from_msg.'&submit=Procurar&pagefrom='.($AaSeite+$maxStep).'">'.($AaSeite+$maxStep).'</a>';
- else echo ' » <a href="index.php?s=admin&a=whisper_log&id=&nick='.$abfragen3333->from_msg.'&submit=Procurar&pagefrom='.$cSeiteRRR[0].'">'.$cSeiteRRR[0].'</a>';
- echo' </td>';
- echo' </tr>';
- echo'</table>';
- }
- }else{
- echo"<div class=\"aviso\">Todas as mensagens... para filtrar basta pesquisar acima.<br /><a style=\"color:#FF6600;\">".$msgtxt."</a></div>";
- $CPSeite = 50;
- if(isset($_GET['page'])) {
- if(!checkInt($_GET['page']) || !($_GET['page']>0)) $aSeite = 1;
- else $aSeite = $_GET['page'];
- } else {
- $aSeite = 1;
- }
- $sqlCmd = "SELECT COUNT(*) as logs FROM log.whisper_log";
- $sqlQry = mysql_query($sqlCmd,$sqlServ);
- $getSum = mysql_fetch_object($sqlQry);
- $cSeite = calcPages($getSum->logs,$aSeite,$CPSeite);
- $maxRange = 5;
- $maxStep = 15;
- if(($aSeite-$maxRange)>0) $sStart = $aSeite-$maxRange;
- else $sStart = 1;
- if(($aSeite+$maxRange)<=$cSeite[0]) $sEnde = $aSeite+$maxRange;
- else $sEnde = $cSeite[0];
- echo "<table>
- <tr>
- <th class='topLine'>Id </th>
- <th class='topLine'>Horário</th>
- <th class='topLine'>Nick</th>
- <th class='topLine'>Destinatário</th>
- <th class='topLine'>Mensagem</th>
- </tr>";
- $abfragen1 = "SELECT * FROM log.whisper_log LIMIT ".$cSeite[1].",".$CPSeite;
- $abfragen2 = mysql_query($abfragen1,$sqlServ);
- $i1 = 0;
- $i2 = 1;
- while($abfragen3 = mysql_fetch_object($abfragen2)) {
- $i1++;
- if ($i1 == $i2) {
- $i2 = $i2 + 2;
- $class = "tdunkel";
- } else {
- $class = "thell";
- }
- echo " <tr>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->id."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->time."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->from_msg."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->to_msg."</td>
- <td class='".$class."' id=\"reborndes\">".$abfragen3->msg_text."</td>
- </tr>";
- }
- echo "</table><br />";
- $CPSeite = 50;
- if(isset($_GET['page'])) {
- if(!checkInt($_GET['page']) || !($_GET['page']>0)) $aSeite = 1;
- else $aSeite = $_GET['page'];
- } else {
- $aSeite = 1;
- }
- $sqlCmd = "SELECT COUNT(*) as logs FROM log.whisper_log";
- $sqlQry = mysql_query($sqlCmd,$sqlServ);
- $getSum = mysql_fetch_object($sqlQry);
- $cSeite = calcPages($getSum->logs,$aSeite,$CPSeite);
- $maxRange = 5;
- $maxStep = 15;
- if(($aSeite-$maxRange)>0) $sStart = $aSeite-$maxRange;
- else $sStart = 1;
- if(($aSeite+$maxRange)<=$cSeite[0]) $sEnde = $aSeite+$maxRange;
- else $sEnde = $cSeite[0];
- echo '<table>
- <tr>
- <td class="tdunkel">';
- if(($aSeite-$maxStep)>0) echo ' <a href="index.php?s=admin&a=whisper_log&page='.($aSeite-$maxStep).'">'.($aSeite-$maxStep).'</a> «';
- else echo ' <a href="index.php?s=admin&a=whisper_log&page=1">1</a> «';
- echo' </td>';
- for($i=$sStart;$i<=$sEnde;$i++) {
- $sKlasse = ($i==$aSeite) ? "topLine" : "thell";
- echo' <td class="'.$sKlasse.'" style="text-align:center;">';
- echo' <a href="index.php?s=admin&a=whisper_log&page='.$i.'">'.$i.'</a>';
- echo' </td>';
- }
- echo' <td class="tdunkel" style="text-align:right;">';
- if(($aSeite+$maxStep)<=$cSeite[0]) echo ' » <a href="index.php?s=admin&a=whisper_log&page='.($aSeite+$maxStep).'">'.($aSeite+$maxStep).'</a>';
- else echo ' » <a href="index.php?s=admin&a=whisper_log&page='.$cSeite[0].'">'.$cSeite[0].'</a>';
- echo' </td>';
- echo' </tr>';
- echo'</table>';
- }
- ?>
- <?php } else { echo "<p>Acesso negado!</p>"; } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement