echo "<input type=hidden name=username value=\"" . $user->user_name . "\">\n"; echo "<input type=hidden name=id value=\"" . $user->id . "\">\n"; echo "</form>\n"; } if ($admin < 1 && $id != $user_id) { //echo("You do not have access to see this users channels"); } else { $levels = pg_safe_exec("SELECT " . " channel_id, " . " user_id," . " access," . " levels.flags," . " last_modif," . " suspend_expires,suspend_by," . " name " . " FROM " . " levels," . " channels " . " WHERE " . " user_id = {$id} and " . " channels.id=levels.channel_id AND channels.registered_ts>0 ORDER BY access DESC"); echo "\n <TABLE WIDTH=100% border=1 cellspacing=0 cellpadding=2 BORDER=0 BGCOLOR=#" . $cTheme->table_bgcolor . ">\n <tr>\n <td colspan=6>\n <center><h2>Channels</h2></center>\n </td></tr>"; if (pg_numrows($levels) == 0) { echo "<tr bgcolor=#" . $cTheme->table_sepcolor . "><td colspan=5><center><font color=#" . $cTheme->table_septextcolor . " size=-1><b><em>~ This user has no access on any channel ~</b></em></td></tr>"; } else { echo " <tr bgcolor=#" . $cTheme->table_sepcolor . ">\n<td width=250><font color=" . $cTheme->table_septextcolor . " size=-1><b><em>Channel</em></b></font></td>\n<td width=70 align=center><font color=" . $cTheme->table_septextcolor . " size=-1><b><em>Access</font></td>\n<td width=70 align=center><font color=" . $cTheme->table_septextcolor . " size=-1><b><em>Auto-Op</font></td>\n<td width=70 align=center><font color=" . $cTheme->table_septextcolor . " size=-1k><b><em>Auto-Voice</font></td>\n<td width=70 align=center><font color=" . $cTheme->table_septextcolor . " size=-1k><b><em>Auto-Invite</font></td>\n<td> </td>\n</tr>"; for ($row = 0; $row < pg_numrows($levels); $row++) { $level = pg_fetch_object($levels, $row); display_level($level, "N", "0", "Y", 0, "Y"); } } // of else echo "</table>"; } if ($admin >= 750 || $nrw_lvl > 0) { /* start proc */ $type = array(0 => "Incoming", 1 => "Pending (Traffic Check)", 2 => "Pending (Notification)", 3 => "Accepted", 8 => "Ready for review"); $req00 = "SELECT channels.id,channels.name,pending.created_ts,pending.status,pending.decision_ts FROM pending,users,channels WHERE pending.channel_id=channels.id AND pending.manager_id=users.id AND pending.manager_id='{$id}' AND channels.registered_ts=0 AND (pending.status<4 OR pending.status=8) AND (pending.decision_ts=0 OR pending.decision_ts>now()::abstime::int4-86400*5) ORDER BY pending.created_ts DESC"; $levels = pg_safe_exec($req00); echo "<br>\n <TABLE WIDTH=100% border=1 cellspacing=1 cellpadding=2 BGCOLOR=#" . $cTheme->table_bgcolor . ">\n <tr>\n <td colspan=3>\n <center><h2>Pending Channels with this user as manager</h2></center>\n </td></tr>"; if (pg_numrows($levels) == 0) { echo "<tr bgcolor=#" . $cTheme->main_textlight . "><td colspan=3><center><font color=#" . $cTheme->table_bgcolor . " size=-1><b><em>~ This user has no channel pending registration ~</b></em></td></tr>"; } else { echo " <tr bgcolor=#" . $cTheme->table_sepcolor . ">\n<td width=250><font color=#" . $cTheme->table_septextcolor . " size=-1><b><em>Channel</em></b></font></td>\n<td><font color=#" . $cTheme->table_septextcolor . " size=-1><b><em>Since</font></td>\n<td><font color=#" . $cTheme->table_septextcolor . " size=-1><b><em>Status</font></td>\n<td></td>\n</tr>";
echo "<b>There are no users with access on this channel</b>"; } else { echo "<tr bgcolor=#" . $cTheme->table_sepcolor . ">\n\t<td width=150><FONT color=#" . $cTheme->table_septextcolor . " size=-1><em><b>User</font></td>"; $lastmod = 0; if ($admin > 0) { echo "<td valign=top><FONT color=#" . $cTheme->table_septextcolor . " size=-1><em><b>Infos</font></td>"; $lastmod = 1; } echo "<td align=center width=50><FONT color=#" . $cTheme->table_septextcolor . " size=-1><em><b>Access</font></td>\n\t<td align=center width=100><FONT color=#" . $cTheme->table_septextcolor . " size=-1><em><b>AutoOp?</font></td>\n\t<td align=center width=100><FONT color=#" . $cTheme->table_septextcolor . " size=-1><em><b>AutoVoice?</font></td>"; echo "<td><FONT color=#" . $cTheme->table_septextcolor . " size=-1><em><b>Access Suspended?</font></td>"; // we aren't going to edit users on the web yet //echo("<td align=left width=50><font color=#" . $cTheme->table_septextcolor . " size=-1><em><b>Edit?</font></td></tr>"); echo "</tr>\n"; for ($row = 0; $row < pg_numrows($levels); $row++) { $level = pg_fetch_object($levels, $row); display_level($level, "N", $access, "N", $lastmod); } } // of else echo "</table>"; $bans = pg_safe_exec("SELECT channel_id,id,banmask,set_by,set_ts,level,expires,reason FROM bans WHERE expires>now()::abstime::int4 AND channel_id={$channel->id}"); if (pg_numrows($bans) != 0) { echo " <br><br>\n<TABLE WIDTH=100% cellspacing=0 cellpadding=2 BORDER=1 BGCOLOR=#" . $cTheme->table_bgcolor . ">\n<tr>\n <td colspan=6>\n <center><h2>Bans for this channel (" . (int) pg_numrows($bans) . " total)</h2>\n</center></Td>\n</tr>"; echo " <tr bgcolor=#" . $cTheme->table_headcolor . ">\n\t<td><font color=#" . $cTheme->table_headtextcolor . ">Banmask</td>\n\t<td><font color=#" . $cTheme->table_headtextcolor . ">Set by</td>\n\t<td><font color=#" . $cTheme->table_headtextcolor . ">Set at</td>\n\t<td><font color=#" . $cTheme->table_headtextcolor . ">Duration</td>\n\t<td><font color=#" . $cTheme->table_headtextcolor . ">Level</td>\n\t<td><font color=#" . $cTheme->table_headtextcolor . ">Reason</td>"; // if ($edit) { echo "<td><font color=#" . $cTheme->table_headtextcolor . ">Remove?</font>"; } echo "</td></tr>"; for ($row = 0; $row < pg_numrows($bans); $row++) { $ban = pg_fetch_object($bans, $row); echo " <tr><td>" . $ban->banmask . "</td><td>" . $ban->set_by . "</td>"; echo " <td>" . cs_time($ban->set_ts) . " [" . $ban->set_ts . "]</td><td>" . drake_duration($ban->expires - $ban->set_ts) . " [" . ($ban->expires - $ban->set_ts) / 3600 . " hour(s)]</td>"; echo " <td>" . $ban->level . "</td><td>" . htmlspecialchars($ban->reason) . "</td>";