$proj_consult_here = $proj_consult_13;
} elseif ($check_disc == 14) {
    $proj_consult_here = $proj_consult_14;
} elseif ($check_disc == 15) {
    $proj_consult_here = $proj_consult_15;
} elseif ($check_disc == 16) {
    $proj_consult_here = $proj_consult_16;
} elseif ($check_disc == 17) {
    $proj_consult_here = $proj_consult_17;
} elseif ($check_disc == 18) {
    $proj_consult_here = $proj_consult_18;
} elseif ($check_disc == 19) {
    $proj_consult_here = $proj_consult_19;
}
$sql = "SELECT * FROM contacts_contactlist, contacts_companylist, contacts_disciplinelist WHERE contact_company = company_id AND contact_discipline = discipline_id AND discipline_id = '{$check_consult}' OR contact_company = company_id AND contact_discipline = discipline_id AND contact_id = '{$proj_consult_here}' ORDER BY company_name, contact_namesecond";
$result = mysql_query($sql, $conn) or die(mysql_error());
print "<select class=\"inputbox\" name=\"proj_consult_{$check_disc}\">";
print "<option value=\"\">-- None --</option>";
while ($array = mysql_fetch_array($result)) {
    $contact_id = $array['contact_id'];
    $contact_namefirst = $array['contact_namefirst'];
    $contact_namesecond = $array['contact_namesecond'];
    $company_name = TrimLength($array['company_name'], 28);
    $company_postcode = $array['company_postcode'];
    print "<option value={$contact_id}";
    if ($proj_consult_here == $contact_id) {
        print " selected";
    }
    print ">" . $company_name . " (" . $contact_namefirst . " " . $contact_namesecond . ")</option>";
}
print "</select>";
    print "<a href=\"index2.php?page=tasklist_edit\" class=\"menu_tab\">Edit</a>";
}
print "<a href=\"index2.php?page=tasklist_list\" class=\"menu_tab\">List</a></p>";
print "<ul class=\"button_left\">";
print "<li><a href=\"index2.php?page=tasklist_view&amp;subcat=all\">View All Current Tasks</a></li>";
print "<li><a href=\"index2.php?page=tasklist_view&amp;subcat=user\">View My Current Tasks</a></li>";
print "</ul>";
$sql = "SELECT * FROM intranet_tasklist, intranet_projects WHERE tasklist_person = {$user_id_current} AND tasklist_project = proj_id AND tasklist_percentage < 100 order by tasklist_due DESC LIMIT 5";
$result = mysql_query($sql, $conn) or die(mysql_error());
if (mysql_num_rows($result) > 0) {
    print "<h1 class=\"heading_side\">Current Tasks</h1>";
    print "<ul class=\"button_left\">";
    while ($array = mysql_fetch_array($result)) {
        $tasklist_id = $array['tasklist_id'];
        $job_id = $array['tasklist_project'];
        $tasklist_title = TrimLength($array['tasklist_notes'], 60);
        $tasklist_due = $array['tasklist_due'];
        $checktime = time() - 43200;
        if ($checktime > $tasklist_due and $tasklist_due > 0 and $tasklist_due != NULL) {
            $format = "class=\"alert\"";
        }
        $sql2 = "SELECT proj_num, proj_id, proj_fee_track FROM intranet_projects WHERE proj_id = {$job_id}";
        $result2 = mysql_query($sql2, $conn) or die(mysql_error());
        $array2 = mysql_fetch_array($result2);
        $proj_id = $array2['proj_id'];
        $proj_num = $array2['proj_num'];
        $proj_fee_track = $array2['proj_fee_track'];
        if ($proj_fee_track == "1") {
            print "<li><a href=\"index2.php?page=project_view&amp;proj_id={$proj_id}\">";
        } else {
            print "<li>";