Exemplo n.º 1
0
            if ((int) $user->flags & 0x20) {
                // new users.flags (NOPURGE 0x0020)
                echo "<font color=#" . $cTheme->main_yes . "><b>Yes</b></font>&nbsp;(username will NOT be caught by the automatic removal)";
            } else {
                echo "<font color=#" . $cTheme->main_no . "><b>No</b></font>&nbsp;(username can be removed for being idled too much)";
            }
            echo "</td></tr>\n";
        }
    }
    echo " <tr><td valign=top><b>Public Key:</b></td><td>";
    echo " <textarea name=public_key cols=20 rows=3>" . $user->public_key . "</textarea><br></td></tr>";
}
if (!$edit && ($admin > 0 || has_acl($user_id)) && ($admin >= 800 || acl(XIPR_MOD_OWN) && $user_id == $user->id || acl(XIPR_VIEW_OWN) && $user_id == $user->id || acl(XIPR_MOD_OTHERS) && $isAdminLvl < $admin || acl(XIPR_VIEW_OTHERS) && $isAdminLvl < $admin)) {
    // not in user edit mode .. separate page for modifications ...
    $rip = @pg_safe_exec("SELECT * FROM ip_restrict WHERE user_id='" . (int) $user->id . "'");
    if ($rip && ($isAdminLvl > 0 || has_acl($user->id))) {
        //only if the table is present... and the user has a need for IPR entries
        echo "<tr><td colspan=2 bgcolor=#" . $cTheme->table_sepcolor . "><font size=-1 color=#" . $cTheme->table_septextcolor . "><em><b>Access IP restrictions</b> (ACL+)</em></td></tr>";
        echo "<TR><TD colspan=2><font size=-1><b>";
        // function matches_wild($string_to_match,$wildcard_mask)
        echo "This user is restricted to login on the following IP/Host masks :</b><br>\n";
        echo "<form name=dummy><ul>";
        $amask = 0;
        while ($ripo = @pg_fetch_object($rip)) {
            $amask++;
            echo "<li> ";
            if ($ripo->allowrange2 != 0) {
                // IP range
                echo long2ip($ripo->allowrange1) . "<b>&nbsp;&gt;&gt;&nbsp;</b>" . long2ip($ripo->allowrange2);
            } elseif ($ripo->allowrange1 != 0) {
                // single IP
Exemplo n.º 2
0
<?php

/* $Id: add.php,v 1.6 2004/07/25 03:31:52 nighty Exp $ */
$min_lvl = 800;
require "../../../php_includes/cmaster.inc";
std_connect();
$user_id = std_security_chk($auth);
$admin = std_admin();
$cTheme = get_theme_info();
$res = pg_safe_exec("SELECT user_name FROM users WHERE id='" . (int) $user_id . "'");
$adm_usr = pg_fetch_object($res, 0);
$adm_user = $adm_usr->user_name;
if ($admin <= 0 && !has_acl($user_id)) {
    echo "Sorry your admin access is too low.";
    die;
}
$nrw_lvl = 0;
if (acl(XWEBAXS_2)) {
    $nrw_lvl = 1;
}
if (acl(XWEBAXS_3)) {
    $nrw_lvl = 2;
}
echo "<html><head><title>NOREG (ADD MODE)</title>";
std_theme_styles();
echo "</head>\n";
std_theme_body("../");
if ($admin < $min_lvl && $nrw_lvl < 1) {
    echo "Sorry, Your admin access is too low.<br><br>\n";
    echo "</body></html>\n\n";
    die;
Exemplo n.º 3
0
    if (CSERVICE_SITE_URL != "") {
        ?>
<A HREF="<?php 
        echo CSERVICE_SITE_URL;
        ?>
" target=_top>Live Java Chat</a><br><br>
<?php 
    }
    ?>
<A HREF="http://forum.yournetwork.org/" TARGET="_top">Forum</A><BR><br>
<A HREF="servers.php" TARGET="right">Server List</A><BR><br>
<A HREF="people.php" TARGET="right">CService People</A><BR><br>
<hr noshade size=1>
<?php 
}
if (($admin > 0 || has_acl($user_id)) && $mode != "empty") {
    ?>
	<?php 
    if ($admin > 0) {
        ?>
		<b>Admin Tools:<br>
	<?php 
    } else {
        ?>
		<b>ACL Tools:<br>
		<?php 
        if (acl(XAT_CAN_VIEW) || acl(XAT_CAN_EDIT)) {
            ?>
		<a href="users.php" target=right>User Lookup</a><br>
		<?php 
        }
Exemplo n.º 4
0
 echo "<b>to IP</b><br>";
 echo "<input type=text name=t2ip2 size=20 maxlength=15>";
 echo "</td>\n";
 echo "<td valign=top>";
 echo "<b>Mask</b><br>";
 echo "<input type=text name=t3mask size=35 maxlength=255>";
 echo "<br>";
 echo "<i>";
 echo "wildcards <b>*</b> and <b>?</b> are allowed.";
 echo "</i>";
 echo "</td>\n";
 echo "</tr>";
 echo "<tr><td colspan=3 align=right><input type=submit value=\"Add\"></td></tr>\n";
 echo "</table>\n";
 echo "<br><br>";
 if ($user_id == $usr->id && ($admin > 0 || has_acl($user_id)) && is_ip_restrict()) {
     // safety valve warning
     echo "<font size=+1 color=#ff1111><b>";
     echo "WARNING</b> : The current IP restrictions will NOT allow you to login.<br>Your current IP is : " . cl_ip() . "</font><br><br>";
 }
 echo "<table border=1 cellspacing=0 cellpadding=3>\n";
 $amask = 0;
 while ($ip = pg_fetch_object($ipq)) {
     $amask++;
     echo "<tr>";
     if ($ip->allowrange2 != 0) {
         // IP range
         echo "<td>Range</td>";
         echo "<td><b>";
         echo long2ip($ip->allowrange1) . "</b>-<b>" . long2ip($ip->allowrange2);
     } elseif ($ip->allowrange1 != 0) {