if (!XMEC::authenticate_user()) {
    echo "<html><h1>Please login to access this page<html>";
    exit;
}
reset($HTTP_POST_VARS);
$action = chop($HTTP_POST_VARS["todo"]);
if ($REQUEST_METHOD == "GET") {
    $action = chop($HTTP_GET_VARS["todo"]);
}
$me =& XMEC::getUser();
$user = $me;
$admin = FALSE;
if ($me->isAdmin() && isset($id) && $id != "" && $_s == 1) {
    $admin = TRUE;
    $user = new XMEC_user($id);
    if (!$user->fetchInfo()) {
        echo "<html><h1>ID not found !</html>";
        exit;
    }
}
$pemail_pref = $user->getPref('personal_email');
$oemail_pref = $user->getPref('official_email');
$curr_visib = $user->getAddressVisibility('PRESENT');
$comp_visib = $user->getAddressVisibility('COMPANY');
$perm_visib = $user->getAddressVisibility('PERMANENT');
$pass_st = "";
$email_st = "";
$addr_st = "";
if ($action == "update") {
    // Password change..
    if (!empty($passwd1) || !empty($passwd2) || !empty($passwd3)) {
Exemple #2
0
<?php

include 'xmec.inc';
$auth = XMEC::authenticate_user();
if ($id != "") {
    $res = new XMEC_user($id);
    if ($res->fetchInfo()) {
        $pres_addr = $res->getAddress('PRESENT');
        $comp_addr = $res->getAddress('COMPANY');
        $perm_addr = $res->getAddress('PERMANENT');
        ?>

<BODY bgcolor=#FFFFFF>
<LINK rel=stylesheet href="style.css" type="text/css">
<TABLE bgcolor=#FFFFFF  cellspacing=0 width=370 align=center ><TR><TD>
<TABLE bgcolor=#FFFFFF cellspacing=0 cellpadding=5 width=100% align=center border=1>
<TR><TD class=record bgcolor=#FFDFB0  width=370 align=left>
<strong>XMEC Record</strong></TD><TD class=record bgcolor=#FFDFB0   width=370 align=right>No. RQ00<?php 
        echo htmlentities($res->get('id'));
        ?>
9K</TD></TR>
<TR>
<TD class=record bgcolor=#FFDFB0 width=370 align=left>Engineering Dept</TD>
<TD class=record bgcolor=#FFDFB0   width=370 align=right><?php 
        echo htmlentities($res->get('branch'));
        ?>
</TD>
</TR>
<TR>
<TD class=record bgcolor=#FFDFB0  width=370 align=left>Year of Joining</TD>
<TD class=record bgcolor=#FFDFB0 width=370 align=right><?php 
Exemple #3
0
    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>
  </TR>