コード例 #1
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>";
        }
コード例 #2
0
ファイル: freshers.php プロジェクト: carriercomm/xmec
    <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>