function slctEmployee()
{
    db_conn('cubit');
    $Sl = "SELECT empnum,enum, sname, fnames FROM employees WHERE div = '" . USER_DIV . "' ORDER BY sname,fnames";
    $Ry = db_exec($Sl) or errDie("Unable to select employees from database.");
    if (pg_numrows($Ry) < 1) {
        return "\r\n\t\t\tNo employees found in database.<p>\r\n\t\t\t<table border=0 cellpadding='2' cellspacing='1'>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th>Quick Links</th>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<script>document.write(getQuicklinkSpecial());</script>\r\n\t\t\t\t<tr bgcolor='#88BBFF'>\r\n\t\t\t\t\t<td><a href='../main.php'>Main Menu</a></td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>";
    }
    $employees = "<select size=1 name=empnum>";
    while ($myEmp = pg_fetch_array($Ry)) {
        $employees .= "<option value='{$myEmp['empnum']}'>{$myEmp['sname']}, {$myEmp['fnames']} ({$myEmp['enum']})</option>";
    }
    $employees .= "</select>";
    $slctEmployee = "\r\n\t\t<h3>Select employee to process</h3>\r\n\t\t<table " . TMPL_tblDflts . ">\r\n\t\t<form action='" . SELF . "' method='POST'>\r\n\t\t\t<input type='hidden' name='key' value='process'>\r\n\t\t\t<tr>\r\n\t\t\t\t<th colspan='2'>Employee</th>\r\n\t\t\t</tr>\r\n\t\t\t<tr class='" . bg_class() . "'>\r\n\t\t\t\t<td>Employee</td>\r\n\t\t\t\t<td align='center'>{$employees}</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr class='" . bg_class() . "'>\r\n\t\t\t\t<td>Select month</td>\r\n\t\t\t\t<td align='center'>" . mlist("MON", date("m")) . "</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan='2' align='right'><input type='submit' value='Process &raquo;'></td>\r\n\t\t\t</tr>\r\n\t\t</form>\r\n\t\t</table>\r\n\t\t<p>\r\n\t\t<table border='0' cellpadding='2' cellspacing='1'>\r\n\t\t\t<tr>\r\n\t\t\t\t<th>Quick Links</th>\r\n\t\t\t</tr>\r\n\t\t\t<script>document.write(getQuicklinkSpecial());</script>\r\n\t\t\t<tr bgcolor='#88BBFF'>\r\n\t\t\t\t<td><a href='../main.php'>Main Menu</a></td>\r\n\t\t\t</tr>\r\n\t\t</table>";
    return $slctEmployee;
}
function slctEmployee()
{
    $employees = "<select size=1 name=empnum>\n";
    db_connect();
    $sql = "SELECT enum as empnum,empnum as e, sname, fnames FROM employees WHERE div = '" . USER_DIV . "' ORDER BY sname";
    $empRslt = db_exec($sql) or errDie("Unable to select employees from database.");
    if (pg_numrows($empRslt) < 1) {
        return "No employees found in database.<p>" . mkQuickLinks(ql("../admin-employee-add.php", "Add Employee"), ql("../admin-employee-view.php", "View Employees"));
    }
    while ($myEmp = pg_fetch_array($empRslt)) {
        $employees .= "<option value='{$myEmp['e']}'>{$myEmp['sname']}, {$myEmp['fnames']} ({$myEmp['empnum']})</option>\n";
    }
    $employees .= "</select>";
    $slctEmployee = "<h3>Select month to view</h3>\n        <table cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n                <form action='" . SELF . "' method=post>\n                <input type=hidden name=key value=slip>\n                <tr><th>Select Month</th></tr>\n                <tr><td align=center>" . mlist("mon") . "</td></tr>\n\t\t<tr><th>Employee</th></tr>\n                <tr class='bg-odd'><td align=center>{$employees}</td></tr>\n                <tr><td colspan=2 align=right><input type=submit value='View &raquo;'></td></tr>\n                </form>\n        </table>" . mkQuickLinks(ql("../admin-employee-add.php", "Add Employee"), ql("../admin-employee-view.php", "View Employees"));
    return $slctEmployee;
}
        break;
    case "cjtype":
        headAdmin("联盟资源");
        cjtype();
        break;
    case "cjall":
        headAdmin("联盟资源");
        cjall();
        break;
    case "breakpoint":
        headAdmin("联盟资源");
        breakpoint();
        break;
    case "list":
        headAdmin("联盟资源");
        mlist();
        break;
    case "glist":
        glist();
        break;
    default:
        headAdmin("联盟资源");
        main();
        break;
}
dispseObj();
function breakpoint()
{
    echo gBreakpoint("../upload/maccjbreakpoint") . "正在载入断点续传数据,请稍后......";
}
function cjsel()