Skip to content

Commit

Permalink
Merge pull request #93 from djphil/patch-58
Browse files Browse the repository at this point in the history
Update manage.php
  • Loading branch information
keverw committed May 4, 2013
2 parents d926785 + d4505c2 commit 9d1aecb
Showing 1 changed file with 53 additions and 59 deletions.
112 changes: 53 additions & 59 deletions www/sites/admin/manage.php
@@ -1,4 +1,4 @@
<? <?php
if($_SESSION[ADMINID]) { if($_SESSION[ADMINID]) {
$GoPage= "page=adminmanage"; $GoPage= "page=adminmanage";


Expand Down Expand Up @@ -103,7 +103,7 @@
<div id="managepanel"> <div id="managepanel">


<div id="info"> <div id="info">
<p><? echo $webui_admin_manage_info; ?></p> <p><?php echo $webui_admin_manage_info; ?></p>
</div> </div>


<table> <table>
Expand All @@ -117,7 +117,7 @@
<table> <table>
<tr> <tr>
<td> <td>
<font><p><?= $count ?> <? echo $webui_users_found ?></p></font> <font><p><?= $count ?> <?php echo $webui_users_found; ?></p></font>
</td> </td>


<td> <td>
Expand All @@ -127,55 +127,55 @@
<tr> <tr>
<td> <td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=0&amp;ALimit=<?=$ALimit?>" target="_self"> <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> </a>
</td> </td>


<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"> <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> </a>
</td> </td>


<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>


<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"> <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> </a>
</td> </td>


<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"> <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> </a>
</td> </td>


<td WIDTH="10"></td> <td WIDTH="10"></td>


<td> <td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=0&ALimit=10" target="_self"> <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> </a>
</td> </td>


<td> <td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=0&ALimit=25" target="_self"> <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> </a>
</td> </td>


<td> <td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=0&ALimit=50" target="_self"> <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> </a>
</td> </td>


<td> <td>
<a href="index.php?<?=$GoPage?>&<?=$Link1?><?=$Link2?>AStart=0&ALimit=100" target="_self"> <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> </a>
</td> </td>
<td></td> <td></td>
Expand All @@ -192,13 +192,13 @@




<table> <table>
<form ACTION="index.php?<?=$GoPage?>" METHOD="POST"> <form action="index.php?<?=$GoPage?>" method="POST">
<tr> <tr>
<td> <td>
<div id="message"> <div id="message">
<? echo $webui_admin_manage_username; ?>: <?php echo $webui_admin_manage_username; ?>:
<input TYPE="TEXT" NAME="query" SIZE="50" value="<?=$_POST[query]?>"> <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> </div>
</td> </td>
</tr> </tr>
Expand All @@ -212,31 +212,33 @@
<table> <table>
<tr> <tr>
<td width=36></td> <td width=36></td>
<td width=113 align="center"><p><? echo $webui_admin_manage_edit; ?></p></td> <td width=113 align="center"><p><?php echo $webui_admin_manage_edit; ?></p></td>
<td width=312 align="center"><p><? echo $webui_admin_manage_username; ?></p></td> <td width=312 align="center"><p><?php echo $webui_admin_manage_username; ?></p></td>
<td width=220 align="center"><p><? echo $webui_admin_manage_created; ?></p></td> <td width=220 align="center"><p><?php echo $webui_admin_manage_created; ?></p></td>
<td width=167 align="center"><p><? echo $webui_admin_manage_active; ?></p></td> <td width=167 align="center"><p><?php echo $webui_admin_manage_active; ?></p></td>
<td width=47></td> <td width=47></td>
</tr> </tr>
</table> </table>


<? <?php
$DbLink3 = new DB; $DbLink3 = new DB;
$found = array(); $found = array();
$found[0] = json_encode(array('Method' => 'FindUsers', 'WebPassword' => md5(WEBUI_PASSWORD), $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]))); 'UserID' => cleanQuery($_GET[user_id]),
$do_post_request = do_post_request($found); 'Start' => cleanQuery($AStart),
$recieved = json_decode($do_post_request, true); 'End' => cleanQuery($ALimit),
$fullUserInfo = (array)$recieved['Users']; 'Query' => cleanQuery($_POST[query])));
foreach($fullUserInfo as $userInfo) $do_post_request = do_post_request($found);
{ $recieved = json_decode($do_post_request, true);
$user_id = $userInfo['PrincipalID']; $fullUserInfo = (array)$recieved['Users'];
foreach($fullUserInfo as $userInfo)
{
$user_id = $userInfo['PrincipalID'];
$username = $userInfo['UserName']; $username = $userInfo['UserName'];
$created = $userInfo['Created']; $created = $userInfo['Created'];
$flags = $userInfo['UserFlags']; $flags = $userInfo['Flags'];

$create = date("d.m.Y", $created); $create = date("d.m.Y", $created);
?> ?>


<table> <table>
<tr class="<? echo ($odd = $w%2 )? "even":"odd" ?>" > <tr class="<? echo ($odd = $w%2 )? "even":"odd" ?>" >
Expand All @@ -246,59 +248,51 @@


<td width=91 align="center"> <td width=91 align="center">
<a href="index.php?page=adminedit&userid=<?=$user_id?>"> <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> </a>
</td> </td>


<td width=243> <td width=243>
<b><?=$username?></b> <b><?php echo $username; ?></b>
</td> </td>


<td width=173> <td width=173>
<b><?=$create?></b> <b><?php echo $create; ?></b>
</td> </td>


<td width=100> <td width=100>
<b> <b>
<? <?php
if(($flags & 7) == 7) { if(($flags & 7) == 7) {echo"<font color='#00FF00'>$webui_admin_manage_active</font>";}
echo"<FONT COLOR=#00FF00><? echo $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>";}
elseif(($flags & 3) == 3) { else {echo"<font color='#FF0000'>$webui_admin_manage_inactive</font>";}
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>";
}
?>
</b> </b>
</td> </td>


<td width=21 align=center> <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?>"> <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> </a>


<? } else { ?> <?php } else { ?>


<a href="index.php?<?=$GoPage?>&action=ban&banusr=<?=$username?>&user_id=<?=$user_id?>"> <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> </a>
<? } ?> <?php } ?>
</td> </td>


<td width=21 align=center> <td width=21 align=center>
<a HREF="index.php?<?=$GoPage?>&action=delete&delusr=<?=$username?>&user_id=<?=$user_id?>"> <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> </a>
</td> </td>
</tr> </tr>
</table> </table>
<? } ?> <?php } ?>
</div> </div>
</td> </td>
</tr> </tr>
Expand All @@ -311,11 +305,11 @@


<!-- </center> --> <!-- </center> -->


<? } <?php }
else { else {
echo "<script language=\"javascript\"> echo "<script language=\"javascript\">
<!-- <!--
window.location.href=\"index.php?page=home\"; window.location.href=\"index.php?page=home\";
// --> // -->
</script>"; </script>";
}?> } ?>

0 comments on commit 9d1aecb

Please sign in to comment.