Пример #1
0
if (!$me->isAdmin()) {
    echo "<html><h1>Not authorized !!</html>";
    exit;
}
reset($HTTP_POST_VARS);
$action = chop($HTTP_POST_VARS["todo"]);
if ($REQUEST_METHOD == "GET") {
    $action = chop($HTTP_GET_VARS["todo"]);
}
$id = chop($HTTP_POST_VARS["id"]);
if ($REQUEST_METHOD == "GET") {
    $id = chop($HTTP_GET_VARS["id"]);
}
$user = new XMEC_user();
if ($id != "") {
    $user->setID($id);
    if (!$user->fetchInfo()) {
        echo "<html><h1>Error getting user info !!</html>";
        exit;
    }
} else {
    echo "<html><h1>No ID selected !!</html>";
    exit;
}
if ($action == "Update") {
    if ($CBWork != "NULL") {
        $user->set('work_type', ucwords($CBWork));
    } else {
        $user->set('work_type', ucwords(trim($TBWork)));
    }
    $user->set('first_name', $TBFname);
Пример #2
0
if (!$user->isAdmin()) {
    echo "<html><h1>Not authorized !!</html>";
    exit;
}
reset($HTTP_POST_VARS);
$action = chop($HTTP_POST_VARS["todo"]);
if ($REQUEST_METHOD == "GET") {
    $action = chop($HTTP_GET_VARS["todo"]);
}
$id = chop($HTTP_POST_VARS["id"]);
if ($REQUEST_METHOD == "GET") {
    $id = chop($HTTP_GET_VARS["id"]);
}
$tmp_user = new XMEC_user();
if ($id != "") {
    $tmp_user->setID($id);
    if (!$tmp_user->fetchInfo()) {
        echo "<html><h1>Error getting user info !!</html>";
        exit;
    }
    $to_address = $tmp_user->get('personal_email');
} else {
    echo "<html><h1>No ID selected !!</html>";
    exit;
}
?>

<TABLE cellSpacing=0 cellPadding=4 width=90% align=center border=0>
  <TR>
		<TD width=6%><BR></TD>
		<TD width=90% height=40 class=head><B>XMEC Mail</B></TD>