Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update manage.php #93

Merged
merged 1 commit into from

2 participants

@djphil

Repair Ban / Unban a little

@keverw keverw merged commit 9d1aecb into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 4, 2013
  1. @djphil

    Update manage.php

    djphil authored
This page is out of date. Refresh to see the latest.
Showing with 53 additions and 59 deletions.
  1. +53 −59 www/sites/admin/manage.php
View
112 www/sites/admin/manage.php
@@ -1,4 +1,4 @@
-<?
+<?php
if($_SESSION[ADMINID]) {
$GoPage= "page=adminmanage";
@@ -103,7 +103,7 @@
<div id="managepanel">
<div id="info">
- <p><? echo $webui_admin_manage_info; ?></p>
+ <p><?php echo $webui_admin_manage_info; ?></p>
</div>
<table>
@@ -117,7 +117,7 @@
<table>
<tr>
<td>
- <font><p><?= $count ?> <? echo $webui_users_found ?></p></font>
+ <font><p><?= $count ?> <?php echo $webui_users_found; ?></p></font>
</td>
<td>
@@ -127,29 +127,29 @@
<tr>
<td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=0&amp;ALimit=<?=$ALimit?>" target="_self">
- <img SRC=images/icons/icon_back_more_<? if(0 > ($AStart - $ALimit)) echo off; else echo on ?>.gif WIDTH=15 HEIGHT=15 border="0">
+ <img SRC=images/icons/icon_back_more_<?php if(0 > ($AStart - $ALimit)) echo off; else echo on ?>.gif WIDTH=15 HEIGHT=15 border="0">
</a>
</td>
<td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=<? if(0 > ($AStart - $ALimit)) echo 0; else echo $AStart - $ALimit; ?>&amp;ALimit=<?=$ALimit?>" target="_self">
- <img SRC=images/icons/icon_back_one_<? if(0 > ($AStart - $ALimit)) echo off; else echo on ?>.gif WIDTH=15 HEIGHT=15 border="0">
+ <img SRC=images/icons/icon_back_one_<?php if(0 > ($AStart - $ALimit)) echo off; else echo on ?>.gif WIDTH=15 HEIGHT=15 border="0">
</a>
</td>
<td>
- <p><? echo $webui_navigation_page; ?> <?=$LANG_ADMPAYMENT8?> <?= round($AStart / $ALimit ,0)+1; ?> <? echo $webui_navigation_of; ?> <?= @round($count / $ALimit,0); ?></p>
+ <p><?php echo $webui_navigation_page; ?> <?php echo $LANG_ADMPAYMENT8; ?> <?= round($AStart / $ALimit ,0)+1; ?> <? echo $webui_navigation_of; ?> <?= @round($count / $ALimit,0); ?></p>
</td>
<td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=<? if($count <= ($AStart + $ALimit)) echo 0; else echo $AStart + $ALimit; ?>&amp;ALimit=<?=$ALimit?>" target="_self">
- <img SRC=images/icons/icon_forward_one_<? if($count <= ($AStart + $ALimit)) echo off; else echo on ?>.gif WIDTH=15 HEIGHT=15 border="0">
+ <img SRC=images/icons/icon_forward_one_<?php if($count <= ($AStart + $ALimit)) echo off; else echo on ?>.gif WIDTH=15 HEIGHT=15 border="0">
</a>
</td>
<td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=<? if(0 > ($count - $ALimit)) echo 0; else echo $count - $ALimit; ?>&amp;ALimit=<?=$ALimit?>" target="_self">
- <img SRC=images/icons/icon_forward_more_<? if(0 > ($count - $ALimit)) echo off; else echo on ?>.gif WIDTH=15 HEIGHT=15 border="0">
+ <img SRC=images/icons/icon_forward_more_<?php if(0 > ($count - $ALimit)) echo off; else echo on ?>.gif WIDTH=15 HEIGHT=15 border="0">
</a>
</td>
@@ -157,25 +157,25 @@
<td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=0&ALimit=10" target="_self">
- <img SRC=images/icons/<? if($ALimit != 10) echo icon_limit_10_on; else echo icon_limit_off; ?>.gif WIDTH=15 HEIGHT=15 border="0" ALT="Limit 10">
+ <img SRC=images/icons/<?php if($ALimit != 10) echo icon_limit_10_on; else echo icon_limit_off; ?>.gif WIDTH=15 HEIGHT=15 border="0" ALT="Limit 10">
</a>
</td>
<td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=0&ALimit=25" target="_self">
- <img SRC=images/icons/<? if($ALimit != 25) echo icon_limit_25_on; else echo icon_limit_off; ?>.gif WIDTH=15 HEIGHT=15 border="0" ALT="Limit 25">
+ <img SRC=images/icons/<?php if($ALimit != 25) echo icon_limit_25_on; else echo icon_limit_off; ?>.gif WIDTH=15 HEIGHT=15 border="0" ALT="Limit 25">
</a>
</td>
<td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=0&ALimit=50" target="_self">
- <img SRC=images/icons/<? if($ALimit != 50) echo icon_limit_50_on; else echo icon_limit_off; ?>.gif WIDTH=15 HEIGHT=15 border="0" ALT="Limit 50">
+ <img SRC=images/icons/<?php if($ALimit != 50) echo icon_limit_50_on; else echo icon_limit_off; ?>.gif WIDTH=15 HEIGHT=15 border="0" ALT="Limit 50">
</a>
</td>
<td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=0&ALimit=100" target="_self">
- <img SRC=images/icons/<? if($ALimit != 100) echo icon_limit_100_on; else echo icon_limit_off; ?>.gif WIDTH=15 HEIGHT=15 border="0" ALT="Limit 100">
+ <img SRC=images/icons/<?php if($ALimit != 100) echo icon_limit_100_on; else echo icon_limit_off; ?>.gif WIDTH=15 HEIGHT=15 border="0" ALT="Limit 100">
</a>
</td>
<td></td>
@@ -192,13 +192,13 @@
<table>
- <form ACTION="index.php?<?=$GoPage?>" METHOD="POST">
+ <form action="index.php?<?=$GoPage?>" method="POST">
<tr>
<td>
<div id="message">
- <? echo $webui_admin_manage_username; ?>:
+ <?php echo $webui_admin_manage_username; ?>:
<input TYPE="TEXT" NAME="query" SIZE="50" value="<?=$_POST[query]?>">
- <button id="search_bouton" TYPE="Submit" value="<? echo $webui_people_search_bouton ?>"><? echo $webui_people_search_bouton ?></button>
+ <button id="search_bouton" TYPE="Submit" value="<?php echo $webui_people_search_bouton; ?>"><?php echo $webui_people_search_bouton; ?></button>
</div>
</td>
</tr>
@@ -212,31 +212,33 @@
<table>
<tr>
<td width=36></td>
- <td width=113 align="center"><p><? echo $webui_admin_manage_edit; ?></p></td>
- <td width=312 align="center"><p><? echo $webui_admin_manage_username; ?></p></td>
- <td width=220 align="center"><p><? echo $webui_admin_manage_created; ?></p></td>
- <td width=167 align="center"><p><? echo $webui_admin_manage_active; ?></p></td>
+ <td width=113 align="center"><p><?php echo $webui_admin_manage_edit; ?></p></td>
+ <td width=312 align="center"><p><?php echo $webui_admin_manage_username; ?></p></td>
+ <td width=220 align="center"><p><?php echo $webui_admin_manage_created; ?></p></td>
+ <td width=167 align="center"><p><?php echo $webui_admin_manage_active; ?></p></td>
<td width=47></td>
</tr>
</table>
- <?
- $DbLink3 = new DB;
- $found = array();
- $found[0] = json_encode(array('Method' => 'FindUsers', 'WebPassword' => md5(WEBUI_PASSWORD),
- 'UserID' => cleanQuery($_GET[user_id]), 'Start' => cleanQuery($AStart), 'End' => cleanQuery($ALimit), 'Query' => cleanQuery($_POST[query])));
- $do_post_request = do_post_request($found);
- $recieved = json_decode($do_post_request, true);
- $fullUserInfo = (array)$recieved['Users'];
- foreach($fullUserInfo as $userInfo)
- {
- $user_id = $userInfo['PrincipalID'];
+ <?php
+ $DbLink3 = new DB;
+ $found = array();
+ $found[0] = json_encode(array('Method' => 'FindUsers', 'WebPassword' => md5(WEBUI_PASSWORD),
+ 'UserID' => cleanQuery($_GET[user_id]),
+ 'Start' => cleanQuery($AStart),
+ 'End' => cleanQuery($ALimit),
+ 'Query' => cleanQuery($_POST[query])));
+ $do_post_request = do_post_request($found);
+ $recieved = json_decode($do_post_request, true);
+ $fullUserInfo = (array)$recieved['Users'];
+ foreach($fullUserInfo as $userInfo)
+ {
+ $user_id = $userInfo['PrincipalID'];
$username = $userInfo['UserName'];
$created = $userInfo['Created'];
- $flags = $userInfo['UserFlags'];
-
+ $flags = $userInfo['Flags'];
$create = date("d.m.Y", $created);
- ?>
+ ?>
<table>
<tr class="<? echo ($odd = $w%2 )? "even":"odd" ?>" >
@@ -246,59 +248,51 @@
<td width=91 align="center">
<a href="index.php?page=adminedit&userid=<?=$user_id?>">
- <b><? echo $webui_admin_manage_edit; ?></b>
+ <b><?php echo $webui_admin_manage_edit; ?></b>
</a>
</td>
<td width=243>
- <b><?=$username?></b>
+ <b><?php echo $username; ?></b>
</td>
<td width=173>
- <b><?=$create?></b>
+ <b><?php echo $create; ?></b>
</td>
<td width=100>
<b>
- <?
- if(($flags & 7) == 7) {
- echo"<FONT COLOR=#00FF00><? echo $webui_admin_manage_active; ?></FONT>";
- }
- elseif(($flags & 3) == 3) {
- echo"<FONT COLOR=#FF0000><? echo $webui_admin_manage_notconf; ?></FONT>";
- }
- elseif(($flags & 5) == 5) {
- echo"<FONT COLOR=#FF0000><? echo $webui_admin_manage_banned; ?></FONT>";
- }
- else {
- echo"<FONT COLOR=#FF0000><? echo $webui_admin_manage_inactive; ?></FONT>";
- }
- ?>
+ <?php
+ if(($flags & 7) == 7) {echo"<font color='#00FF00'>$webui_admin_manage_active</font>";}
+ else if(($flags & 3) == 3) {echo"<font color='#FF0000'>$webui_admin_manage_notconf</font>";}
+ else if($flags & (16 | 32)){echo"<font color='#FF0000'>$webui_admin_manage_banned</font>";}
+ else {echo"<font color='#FF0000'>$webui_admin_manage_inactive</font>";}
+ ?>
</b>
</td>
<td width=21 align=center>
- <? if($active ==5) {?>
+ <?php if($flags & (16 | 32)) {?>
<a href="index.php?<?=$GoPage?>&action=unban&unbanusr=<?=$username?>&user_id=<?=$user_id?>">
- <img src="images/icons/unban.png" alt="<? echo $webui_admin_manage_userunban; ?>" title="<? echo $webui_admin_manage_userunban; ?>">
+ <img src="images/icons/unban.png" alt="<?php echo $webui_admin_manage_userunban; ?>" title="<?php echo $webui_admin_manage_userunban; ?>">
</a>
- <? } else { ?>
+ <?php } else { ?>
<a href="index.php?<?=$GoPage?>&action=ban&banusr=<?=$username?>&user_id=<?=$user_id?>">
- <img src="images/icons/ban.png" alt="<? echo $webui_admin_manage_userban; ?>" title="<? echo $webui_admin_manage_userban; ?>">
+ <img src="images/icons/ban.png" alt="<?php echo $webui_admin_manage_userban; ?>" title="<?php echo $webui_admin_manage_userban; ?>">
</a>
- <? } ?>
+ <?php } ?>
</td>
<td width=21 align=center>
<a HREF="index.php?<?=$GoPage?>&action=delete&delusr=<?=$username?>&user_id=<?=$user_id?>">
- <img src="images/icons/btn_del.png" alt="<? echo $webui_admin_manage_userdelete; ?>" title="<? echo $webui_admin_manage_userdelete; ?>">
+ <img src="images/icons/btn_del.png" alt="<?php echo $webui_admin_manage_userdelete; ?>" title="<?php echo $webui_admin_manage_userdelete; ?>">
</a>
</td>
</tr>
</table>
- <? } ?>
+ <?php } ?>
</div>
</td>
</tr>
@@ -311,11 +305,11 @@
<!-- </center> -->
- <? }
+<?php }
else {
echo "<script language=\"javascript\">
<!--
window.location.href=\"index.php?page=home\";
// -->
</script>";
-}?>
+} ?>
Something went wrong with that request. Please try again.