示例#1
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 
示例#2
0
include 'xmec.inc';
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..
示例#3
0
文件: aow.php 项目: carriercomm/xmec
                <TD width=4 height=4><IMG height=4 src="images/corner.gif" width=4></TD>
        <TD align=left background=images/tb_top.gif height=4><IMG height=4 src="images/tb_left_topt.gif" width=8></TD>
        <TD align=right background=images/tb_top.gif height=4><IMG height=4 src="images/tb_right_topt.gif" width=8></TD>
        <TD width=4 height=4><IMG height=4 src="images/corner.gif" width=4></TD>
    </TR>
    <TR>
                <TD vAlign=top width=4 background=images/tb_left.gif height="50%"><IMG height=6 src="images/tb_left_topb.gif" width=3></TD>
                <TD colSpan=2 rowSpan=2>

<?php 
$sqlbox = "SELECT work_type, COUNT(*) AS Entries FROM xmec_user WHERE work_type <> '' GROUP BY work_type ORDER by Entries DESC";
$dbh =& XMEC::getDB();
if (DB::isManip($sqlbox)) {
    echo "No manipulation queries please !";
} else {
    $r = $dbh->query(XMEC_user::unQuote($sqlbox));
    if (DB::isError($r)) {
        echo "Query: {$sql} failed.";
    } else {
        echo "<table border=0>";
        echo "<tr bgcolor=#DDDDDD>";
        echo "<td><b class=title>Field of Work</b></td>";
        echo "<td><b class=title>XMECians</b></td>";
        echo "</tr>";
        while (is_array($x = $r->fetchRow())) {
            echo "<tr>";
            for ($i = 0; $i < count($x); $i++) {
                echo "<td bgcolor=#CFDDD1>{$x[$i]}</td>";
            }
            echo "</tr>";
        }
示例#4
0
    <TR>
                <TD vAlign=top width=4 background=images/tb_left.gif height="50%"><IMG height=6 src="images/tb_left_topb.gif" width=3></TD>
                <TD colSpan=2 rowSpan=2>

<!-- Content -->

<table cellpadding=0 cellspacing=3 width="100%">
<tr bgcolor="#CFDDD1">
<td><b class=stitle>Name</b></td>
<td><b class=stitle>Branch</b></td>
<td><b class=stitle>Percentage</b></td>
</tr>';
$dbh =& XMEC::getDB();
$condition = " xmec_user.msn like '%FRESHER%' ";
$query = "select concat(first_name, ' ', middle_name, ' ', last_name) as name, branch,msn,concat('\\downloads\resume\\',first_name,'_',last_name,'.rtf') as link from xmec_user where " . $condition;
$queryHndl = $dbh->query(XMEC_user::unQuote($query));
$colored = 0;
while (is_array($da = $queryHndl->fetchRow())) {
    if ($colored % 2) {
        echo '<tr bgcolor="#CFDDD1">';
    } else {
        echo '<tr>';
    }
    echo '<td>' . $da[0] . '</td>';
    echo '<td>' . $da[1] . '</td>';
    echo '<td>' . $da[2] . '</td>';
    echo '<td>' . $da[3] . '</td>';
    echo '</tr>';
    $colored++;
}
echo '</table>
示例#5
0
}
$me =& XMEC::getUser();
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)));
示例#6
0
}
$user =& XMEC::getUser();
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>
示例#7
0
//include 'xmec.inc';
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');
$webpage = $user->get('webpage');
$forwarding_addr = $user->get('forwarding_addr');
$alias = $user->get('forwarding_addr');
$pass_st = "";
$email_st = "";
示例#8
0
}
$me =& XMEC::getUser();
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)));