$table = "`" . DATABASE_NAME . "`.`ar_book_chapter_mono`";
                 break;
             case 10:
             case 11:
                 $table = "`" . DATABASE_NAME . "`.`ar_poster_reports`";
                 break;
         }
         $query = "SELECT *\n\t\t\t\tFROM " . $table . ", `" . AUTH_DATABASE . "`.`user_data`\n\t\t\t\tWHERE `proxy_id` = " . $departmentMember . "\n\t\t\t\tAND `proxy_id` = `" . AUTH_DATABASE . "`.`user_data`.`id`\n\t\t\t\tAND `type_id` = '{$typeID}'" . $dateWhere;
         if ($results = $db->GetAll($query)) {
             if ($departmentMember != $lastMember) {
                 echo "<h2>" . $departmentMemberName . "</h2>";
                 $outputBreak = false;
             } else {
                 $outputBreak = true;
             }
             $currentType = getPublicationTypesSpecificFromID($typeID);
             if (substr($currentType, -1, 1) != "s") {
                 $currentType = $currentType . "s";
             }
             $publicationSidebar[] = $currentType;
             echo "<a name=\"" . $departmentMemberName . "\"></a>";
             if ($outputBreak == true) {
                 echo "<br>";
             }
             echo "<h3>" . $currentType . "</h3>\n";
             display($results, $db);
             $lastMember = $departmentMember;
         }
     }
 }
 /*if(isset($publicationSidebar)) {
 function display($results, $db)
 {
     foreach ($results as $result) {
         $formattedRec = "";
         if ($formattedRec == "") {
             if ($result["author_list"] != "") {
                 $formattedRec = html_encode($result["author_list"]) . ", ";
             }
             if ($result["title"] != "") {
                 $formattedRec = $formattedRec . html_encode($result["title"]) . ", ";
             }
             if (isset($result["status_date"]) && strlen($result["status_date"]) == 5) {
                 $month = substr($result["status_date"], 0, 1);
                 $year = substr($result["status_date"], 1, 4);
                 $formattedRec = $formattedRec . $month . "-" . $year . ", ";
             } else {
                 if (isset($result["status_date"]) && strlen($result["status_date"]) == 6) {
                     $month = substr($result["status_date"], 0, 2);
                     $year = substr($result["status_date"], 2, 4);
                     $formattedRec = $formattedRec . $month . "-" . $year . ", ";
                 } else {
                     $formattedRec = $formattedRec . " Pending Approval, ";
                 }
             }
             if ($result["source"] != "") {
                 $formattedRec = $formattedRec . html_encode($result["source"]) . ", ";
             }
             if (isset($result["editor_list"])) {
                 $formattedRec . "Ed. " . html_encode($result["editor_list"]) . ", ";
             }
             if ($result["volume"] != "" && $result["edition"] != "") {
                 $formattedRec = $formattedRec . "Vol. " . html_encode($result["volume"]) . "(" . html_encode($result["edition"]) . "):";
             } else {
                 if ($result["volume"] != "" && $result["edition"] == "") {
                     $formattedRec = $formattedRec . "Vol. " . html_encode($result["volume"]) . ", ";
                 } else {
                     if ($result["volume"] == "" && $result["edition"] != "") {
                         $formattedRec = $formattedRec . html_encode($result["edition"]) . ":";
                     }
                 }
             }
             if ($result["pages"] != "") {
                 $formattedRec = $formattedRec . html_encode($result["pages"]);
             }
             // Check for existance of extra comma or colon at the end of the record
             // if there is one remove it
             $lengthOfRec = strlen($formattedRec) - 2;
             $lastChar = substr($formattedRec, $lengthOfRec, 1);
             if ($lastChar == "," || $lastChar == ":") {
                 $formattedRec = substr($formattedRec, 0, $lengthOfRec);
             }
             $typeDesc = getPublicationTypesSpecificFromID($result["type_id"]);
             $roleDesc = getPublicationRoleSpecificFromID($result["role_id"]);
             $formattedRec .= " <b> - " . $roleDesc . " (" . $typeDesc . ")</b>";
         }
         $outputArray[$result["status"]][] = $formattedRec;
     }
     $keyHeader = "<b>(1) Published:</b><br>";
     echo $keyHeader;
     if (count($outputArray['Published']) > 0) {
         for ($u = 0; $u < count($outputArray['Published']); $u++) {
             $ctr = $u + 1;
             $outputString = $outputArray['Published'][$u] . "<br /><br />";
             echo $outputString;
         }
     } else {
         echo "No Records.<br>";
     }
     $keyHeader = "<br><b>(2) In Press:</b><br>";
     echo $keyHeader;
     if (count($outputArray['In Press']) > 0) {
         for ($u = 0; $u < count($outputArray['In Press']); $u++) {
             $ctr = $u + 1;
             $outputString = $outputArray['In Press'][$u] . "<br /><br />";
             echo $outputString;
         }
     } else {
         echo "No Records.<br>";
     }
     $keyHeader = "<br><b>(3) Submitted:</b><br>";
     echo $keyHeader;
     if (count($outputArray['Submitted']) > 0) {
         for ($u = 0; $u < count($outputArray['Submitted']); $u++) {
             $ctr = $u + 1;
             $outputString = $outputArray['Submitted'][$u] . "<br /><br />";
             echo $outputString;
         }
     } else {
         echo "No Records.<br>";
     }
     unset($outputArray);
 }