<style type="text/css">
<!--
.color1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-style: normal;
color: #000000;
background-color: #d0f3ff;
text-decoration: none;
}
.color2 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-style: normal;
color: #000000;
text-decoration: none;
background-color: #FFFFFF;
}
#border {
border-width: .1em;
border-style: solid;
border-color: black;
background-color: #FFFFFF;
}
-->
</style>
<?PHP
echo $disp_overview_table;
$disp_color = 1;
echo $disp_msg;
while( $disp_row = mysql_fetch_array($disp_res) ) {
$disp_problem = substr( $disp_row['Service_Desc'], 0, 40); //Mow make sure to limit the length of the displayed Ticket problem description
$disp_staus = GenStatFromId($inc_dir, $CONF, $disp_row['Status_id']); //Get the correct ID for thislisting run
if( strlen($disp_problem) == 40 ) { $disp_problem .= '...'; } //If the string is long enough, add dots at the end
$usethisid = Null;
if( $CONF['EnableCustomTicketID'] == 1 && $disp_row['Custom_ticket_id'] != "" ) {
$usethisid = "ID:{$disp_row['ID']} Custom ID:{$disp_row['Custom_ticket_id']}";
} else {
$usethisid = "ID:{$disp_row['ID']}";
}
$disp_ticket_url = '<a href="workorder.php?Step=EditAddTicket&Ticket_ID='.$disp_row['ID'].'&Customer_ID='.$disp_row['Customers_ID'].'&SSID='.$disp_SSID.'" style="text-decoration: none">'; //Click on this one and it pulss up the ticket
//Get the right BName
if ( strlen($disp_row['BBus_name']) >= 1 ) {
$dis_bname = $disp_row['BBus_name'];
}
elseif ( strlen($disp_row['BName_first']) >= 1 AND strlen($disp_row['BName_last']) >= 1 ) {
$dis_bname = $disp_row['BName_last'].", ".$disp_row['BName_first'];
}
else{ die("Could not determine which name to display"); }
$dis_bname = substr( $dis_bname, 0, 20); //Reduce the length of the string, to protect the formating
if( strlen($dis_bname) == 20 ) { $dis_bname .= '...'; } //Reduce the length of the string, to protect the formating
echo('<div class="color'.$disp_color.'" id="color1">'.$disp_ticket_url.$usethisid.' --- '.$dis_bname.' --- Problem: '.htmlentities($disp_problem).' --- '.$disp_staus.'</a></div>');
//Color switcher, color is controled my a simple CSS rule, color1 and color2
if( $disp_color == 1 ) { $disp_color = 2; } else { $disp_color = 1; }
} //while( $disp_row = mysql_fetch_arracy($res) )
?>