\n"; // set to true for mapping format if (array_key_exists("mapFormat", $_REQUEST)) { //$q = "select * from headers where protectron != '' and status != 'CLOSED' and status != 'VOID' order by {$_REQUEST['sortop']}"; $q = "select * from headers where cCode = '03500001C' and status != 'CLOSED' and status != 'VOID' order by {$_REQUEST['sortop']}"; $callList = mysql_query($q); while ($call = mysql_fetch_assoc($callList)) { echo " \n"; echo " {$call['protectron']}\n"; echo " ".fixName($call['fName'],$call['lName'])."\n"; echo " {$call['address']}, {$call['city']}\n"; // echo " {$call['city']}\n"; // echo " {$call['status']}\n"; // echo " {$call['assignment']}\n"; echo " \n"; } } else { if (!empty($_REQUEST['sortop'])) $_SESSION['protectron']['options'] = $_REQUEST['sortop']; //$q = "select * from headers where protectron != '' and status != 'CLOSED' and status != 'VOID' order by {$_REQUEST['sortop']}"; $q = "select * from headers where cCode = '03500001C' and status != 'CLOSED' and status != 'VOID' order by {$_REQUEST['sortop']}"; $callList = mysql_query($q); while ($call = mysql_fetch_assoc($callList)) { //age($call['tid'], date("Ymd")); //if (strlen(utf8_decode($call['assignment'])) < 36) $commentStr = $call['address'].", ".$call['city']."\r".$call['assignment']; //else //{ $commentStr = ""; // $spacePos = strpos($call['assignment'], " ", 27); // if ($spacePos) // $commentStr = substr($call['assignment'], 0, $spacePos)." [...]"; // else // $commentStr = $call['assignment']; //} $clientName = fixName($call['fName'],$call['lName']); if (strlen($clientName) > 30) $clientName = $call['lName']; echo " \n"; echo " ".age($call['tid'], date("Ymd"))."\n"; echo " {$call['protectron']}\n"; echo " $clientName\n"; //echo " {$call['address']}\n"; echo " {$call['city']}\n"; echo " {$call['status']}\n"; //echo " $commentStr\n"; echo " {$call['oType']}"; if (!empty($call['ccu'])) echo " ({$call['ccu']})"; echo "\n"; echo " \n"; } } echo "\n"; ?>