コード例 #1
0
    if (!empty($search_name)) {
        echo "No match found. ";
        if (!empty($matches)) {
            echo " Partial matches are: <blockquote> {$matches} </blockquote>\n";
        }
    }
    echo " Enter user name:\n        <blockquote>\n         <input type='text' name='search_text' >\n         <input type='submit' name='search_submit' value='Search'>\n        </form>\n    ";
    admin_page_tail();
    exit;
}
row1("<b>User: </b> " . $user->name . "<br/>\n      Id# " . $user->id . "<div align='right'>\n        <input name='reset_page'  type='submit' value='Reset'>\n        <input name='manage_user' type='submit' value='Update'><br>\n        <input name=\"delete_user\" type=\"submit\" value=\"Delete user\">\n        </div>");
if ($delete_problem) {
    echo "<font color='RED'>{$delete_problem}</font><br/>\n";
}
show_user_summary_public($user);
show_profile_link_ops($user);
if ($is_admin) {
    row2("E-mail:", "{$user->email_addr}");
}
project_user_summary($user);
end_table();
project_user_page_private($user);
echo "</form>\n";
// Special User status:
echo "\n\n<P>\n   <table width='100%'><tr>\n   <td width='50%' valign='TOP'> \n";
echo "<form name='special_user' action=manage_user.php method=\"POST\">\n    <input type='hidden' name='userid' value='" . $user->id . "'>\n";
start_table();
row1("Special User Status: {$user->name}", $Nbf);
echo "<tr>\n";
for ($i = 0; $i < $Nbf; $i++) {
    $bit = substr($user->prefs->special_user, $i, 1);
コード例 #2
0
ファイル: manage_user.php プロジェクト: entibasse/superhost
function show_manage_user_form($user)
{
    global $special_user_bitfield;
    $Nbf = sizeof($special_user_bitfield);
    admin_page_head("Management {$user->name}");
    if (!defined("POST_REPORT_EMAILS")) {
        echo "<p><font color='RED'>\n       There is no administrative email address defined for reporting problems\n    or abuse in the forums.  Please define POST_REPORT_EMAILS in project.inc\n            </font></p>\n";
    }
    echo "<form name='manage_user' action=manage_user.php method='POST'>\n        <input type='hidden' name='userid' value='" . $user->id . "'>\n    ";
    start_table();
    row1("<b>User: </b> {$user->name} <div align='right'>\n            <input name=\"delete_user\" type=\"submit\" value=\"Delete user\">\n            </div>");
    show_user_summary_public($user);
    show_profile_link_ops($user);
    row2("Email:", "{$user->email_addr}");
    project_user_summary($user);
    end_table();
    project_user_page_private($user);
    echo "</form>\n";
    // Special User status:
    echo "\n\n<P>\n       <table width='100%'><tr>\n       <td width='50%' valign='TOP'> \n";
    echo "<form name='special_user' action=manage_user.php method=\"POST\">\n        <input type='hidden' name='userid' value='" . $user->id . "'>\n    ";
    start_table();
    row1("Special User Status");
    echo "<tr>\n";
    for ($i = 0; $i < $Nbf; $i++) {
        $bit = substr($user->prefs->special_user, $i, 1);
        echo "<tr><td><input type='checkbox'' name='special_user_" . $i . "' value='1'";
        if ($bit == 1) {
            echo " checked='checked'";
        }
        echo ">" . $special_user_bitfield[$i] . "</td></tr>\n";
    }
    echo "</tr>";
    echo "</tr><td colspan={$Nbf} align='RIGHT'>\n        <input name='special_user' type='SUBMIT' value='Update'>\n        </td></tr>\n    ";
    end_table();
    echo "</form>\n";
    echo "\n\n</td><td valign='TOP'>\n\n";
    // Suspended posting privileges
    echo "<form name='banishment' action=manage_user.php method=\"POST\">\n        <input type='hidden' name='userid' value='" . $user->id . "'>\n    ";
    start_table();
    row1("Suspension");
    if ($user->prefs->banished_until) {
        $dt = $user->prefs->banished_until - time();
        if ($dt > 0) {
            $x = " Suspended until " . time_str($user->prefs->banished_until) . "<br/> (Expires in " . time_diff($dt) . ")";
        } else {
            $x = " last suspended " . time_str($user->prefs->banished_until);
        }
        row1($x);
    } else {
        $dt = 0;
    }
    echo "<tr><td>\n    Suspend user for:\n     <blockquote>\n            <input type='radio' name='suspend_for' value='3600'> 1 hour   <br/>\n            <input type='radio' name='suspend_for' value='7200'> 2 hours  <br/>\n            <input type='radio' name='suspend_for' value='18000'> 6 hours  <br/>\n            <input type='radio' name='suspend_for' value='36000'> 12 hours  <br/>\n            <input type='radio' name='suspend_for' value='86400'> 24 hours  <br/>\n    ";
    echo "\n        <input type='radio' name='suspend_for' value='172800'> 48 hours  <br/>\n        <input type='radio' name='suspend_for' value='", 86400 * 7, "'> 1 week  <br/>\n        <input type='radio' name='suspend_for' value='", 86400 * 14, "'> 2 weeks  <br/>\n    ";
    if ($dt > 0) {
        echo "\n            <input type='radio' name='suspend_for' value='-1'>  <b>unsuspend</b>   <br/>";
    }
    echo "\n     </blockquote>\n\n    ";
    echo "<P>Reason (required):\n";
    echo "<textarea name='suspend_reason' cols='40' rows='4'></textarea>";
    echo "<br><font size='-2' >The reason will be sent to both the user\n            and to the project administrators.</font>\n";
    echo "<p align='RIGHT'><input name='suspend_submit' type='SUBMIT' value='Update'></P>\n";
    echo " </td></tr>\n";
    end_table();
    echo "</form>\n";
    echo "</td></tr> </table>\n";
    admin_page_tail();
}