Location: PHPKode > projects > WorkOrder TS > workorder-ts/workorder.php
<?php define("ERROR_IMG","grfx/check_error.png");error_reporting(E_ALL ^ E_NOTICE);if(1==2) { die('<b>Warning, please read.</b>    <p>You are seeing this message because you tried to open workorder.php or index.html directly with your webbrowser. WorkOrder TS is written in PHP and requires a webserver to work. You can find step by step guides on how to setup the required software <a href="http://www.workorderts.com/Virtual_Brain_Online/article/install_Apache2_PHP5_MySQL5_server_windows/" target="_blank">here</a> (popup) or you can download the all in one testing package for Windows. You can find the WorkOrder TS + XAMPP bundle at the bottom of the <a href="http://www.workorderts.com/Downloads.php" target="_blank">download page</a> (popup), it does not require installation. WorkOrder TS support is always happy to help, you can find the <a href="http://www.workorderts.com/Contact?subject=Error%201292" target="_blank">Contract Form here</a> (popup). Please report Error: 1292 when contacting support regarding this message.</p>');} if( is_dir('./setup_files')==True || file_exists('setup.php')==TRUE ) { if( file_exists("OverwriteLocks")==FALSE ) { if( file_exists("include/config-user.inc.php")==True ) { die("You have not deleted the setup files yet. Please delete the directory <b>setup_files</b> AND <b>setup.php</b>. This is for your security!     <br>The program will not execute until the installer has been removed. Once removed, click on refresh page to login with the username: <b>admin</b> or <b>tech</b> and the password you specified during the setup.<br><br><br><br>     <a href='setup.php'>Or Click Here to Run setup/update</a>");} else { die("WorkOrder TS is not installed or not properly installed. <a href='setup.php'>Click Here to Run setup/update</a>");} } } $inc_dir='./include/';require_once $inc_dir.'magic_quotes.php';$_Il6fL=NULL;$Step=NULL;$_J0fQj=NULL;$_j6Jot=NULL;$Date=NULL;$_J0fCi=NULL;$_J08t6=NULL;$_J08OC=NULL;$_j68CQ=NULL;$_J08lO=NULL;$Sortby=NULL;$_J0tJQ=NULL;$_J0OI6=NULL;$Print=NULL;$SSID=NULL;$EditCustomer=NULL;$Customer_ID=NULL;$_J0o1J=NULL;$EditCustomer=NULL;$SSID_Ver=NULL;$_J0oll=NULL;$_J0C10=NULL;$Update=NULL;$Service_Type=NULL;$_J0ifI=NULL;$Item_model=Null;$EditAllow=Null;$UpService_Desc=NULL;$Item_required_parts=Null;$Item_accessories=Null;$_J0LOL=Null;$GuestKey=Null;$ShowCustomer=Null;$View=Null;$Ticket_ID=Null;$BName=NULL;$TBPhone=NULL;$TBMobile1=Null;$TBOffice1=Null;$CheckedIn=Null;$_J106C=Null;$_J10if=Null;$Item_make=Null;$Service_Desc=Null;$CheckedInBy=Null;$assigned_tech_id=Null;$_J11t1=Null;$Tech_Notes=Null;$User_ID=Null;$_J1QfL=Null;$BBus_name =NULL;$BBus_cont =NULL;$_J1jQC=NULL;$_J1ji1 =NULL;$_J1JoQ=NULL;$_J16jf =NULL;$BName_first =NULL;$BName_last =NULL;$_J1fl0 =NULL;$BAddress2 =NULL;$_J18Ol =NULL;$BCity =NULL;$BState =NULL;$BZip =NULL;$BPhone1 =NULL;$BPhone2 =NULL;$BMobile1 =NULL;$BMobile2 =NULL;$BOffice1 =NULL;$BOffice2 =NULL;$_J1CC1 =NULL;$_J1CCl =NULL;$_J1ClI =NULL;$_J1iJl =NULL;$_J1iii =NULL;$_J1L60 =NULL;$_jCiCQ =NULL;$_jCLt1 =NULL;$_jClji=NULL;$_jClfi =NULL;$_ji06I=NULL;$_ji1Q0 =NULL;$_jiQ1Q =NULL;$_jiQIi =NULL;$_jiQCC =NULL;$_jiIji =NULL;$_jijjj =NULL;$_jij6i =NULL;$_jiJ1I =NULL;$_ji6JO =NULL;$_ji6C8 =NULL;$_jifQi =NULL;$_jiftJ =NULL;$_jifLl =NULL;$_ji8ii =NULL;$_jitQf =NULL;$_jitoJ =NULL;$_jiOjC =NULL;require $inc_dir.'config-guest.inc.php';require $inc_dir.'conn-string-guest.inc.php';@include $inc_dir."pro/workorder_functions_pro.inc.php";if( isset($_GET['Step']) ) { $Step=mysql_real_escape_string($_GET['Step']);} if( isset($_POST['Step']) ) { $_J0fQj=mysql_real_escape_string($_POST['Step']);} if( isset($_GET['Print']) ) { $Print=mysql_real_escape_string($_GET['Print']);} if( isset($_GET['Fb']) ) { $_J0OI6=mysql_real_escape_string($_GET['Fb']);} if( isset($_GET['Sortby']) ) { $Sortby=mysql_real_escape_string($_GET['Sortby']);} if( isset($_GET['Highlight']) ) { $_J0tJQ=mysql_real_escape_string($_GET['Highlight']);} if( isset($_GET['Or']) ) { $_J1L88=mysql_real_escape_string($_GET['Or']);} if( isset($_POST['Branch']) ) { $_J11t1=mysql_real_escape_string($_POST['Branch']);} require $inc_dir.'workorder_function_general.inc.php';$CONF=_OFB10($inc_dir);$css_dir='./skins/'.$CONF['SkinPath'].'/';function _OEJLO($_J1l1J,$_J1lj0,$_J1l88) { $sql="update table ".$CONF['TableNameUsers']." SET User_temp_timeout='$_J1l88',User_temp_shop='$_J1lj0' WHERE ";} if( $_J0fQj=="Temp_Shop_Override" ) { $_JQ081=mysql_real_escape_string($_POST['Temp_User_SSID']);$_J1lj0=mysql_real_escape_string($_POST['Temp_Shop_ID']);$_J1l88=date("Y").'-'.date("m").'-'.date("d")." ".date("H").':'.date("i").':'.date("s");_OEJLO($_JQ081,$_J1lj0,$_J1l88);} if( isset($_GET['SSID']) ) { $SSID=mysql_real_escape_string($_GET['SSID']);} if( isset($_POST['SSID']) ) { $_jotlC=mysql_real_escape_string($_POST['SSID']);} if( empty($SSID)==TRUE AND empty($_jotlC)==FALSE ) { $SSID=$_jotlC;} require_once $inc_dir."workorder_function_getusersettings.inc.php";$aUserSettings=_L00RE($SSID,$inc_dir,$CONF);if( _L0OPO( $inc_dir,$SSID,$CONF )==True ) { $_IlClj=_OFPAC($inc_dir,$CONF['TableNameTicket'],'Store_id','ID = "'.$_Ilifl.'"' );$_IlLfj[1]=$_IlClj[0];} $Store_id=$aUserSettings[1];$_jt10C=$CONF["DefaultValuesStoreName".$Store_id."Date"];if( $Step=="UpdateKey" ) { include $inc_dir.'config-guest.inc.php';include $inc_dir.'conn-string-guest.inc.php';$sql="select config_value from $TableConfig WHERE config_name='WorkorderLicenseKey'";$res=mysql_query($sql,$conn);if ( mysql_error($conn) ) { echo("<hr><br>Server Return Message: ".mysql_error($conn)."<br><hr>");} $row=mysql_fetch_array($res);$_JQ1Q8=$row['config_value'];echo('    <form method="POST" action="workorder.php" name="Setup Workorder"><br>    <table style="width: 60%; text-align: left;" border="0" cellpadding="2" cellspacing="2">    <tbody>      <tr>    <td style="vertical-align: top; width: 40%;">License Key:<br> aaaaa-bbbbb-ccccc-ddddd-eeeee</td>    <td style="vertical-align: top;"><input size="30" name="LicenseKey" value="'.$_JQ1Q8.'"> </td>    </tr>    </tbody>      </table>    <input name="SSID" value="'.$SSID.'" type="hidden">    <input name="Step" value="UpdateKeySave" type="hidden">    <input name="Submit" value="Submit" type="submit"><br>    <br>    </form>');die;} if( $_J0fQj=="UpdateKeySave" ) { include $inc_dir.'config-user.inc.php';include $inc_dir.'conn-string-user.inc.php';$_JQ16o=mysql_real_escape_string($_POST['LicenseKey']);$sql="update $TableConfig set config_value='$_JQ16o' WHERE config_name='WorkorderLicenseKey'";$res=mysql_query($sql,$conn);if ( mysql_error($conn) ) { echo("<hr><br>Server Return Message: ".mysql_error($conn)."<br><hr>");} if( file_exists("$inc_dir/pro/config_downloads.php")==True ) { require_once $inc_dir.'workorder_function_general.inc.php';require_once $inc_dir.'/pro/workorder_functions_pro.inc.php';$_IL0i6=Null;$_IL101=Null;$_IL1if=Null;$_ILQQI=Null;$_ILI00=Null;$_ILICC=0;$res=ValidateKey4($_JQ16o);if( $res !=0 ) { $res=CheckKey4($_JQ16o);$res=substr("$res",strlen($res)-6);if( $res{0}==0 ) { $StoreNum=$res{1};} else { $StoreNum=$res{0}.$res{1};} $_JQ1oO=$CONF['StoreNum'];if( $_JQ1oO < $StoreNum ) { for( $x=1;$x < $StoreNum;$x++) { $_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'Company Address$x'";$_ILQQI[$_ILICC]='Value Company Address'.$x.' Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value Company Address'.$x.' <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'GoogleAddress$x'";$_ILQQI[$_ILICC]='Value GoogleAddress'.$x.' Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value GoogleAddress'.$x.' <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'StoreName$x'";$_ILQQI[$_ILICC]='Value StoreName'.$x.' Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value StoreName'.$x.' <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";} if( is_numeric($StoreNum)==False ) { $StoreNum=1;} for( $x=1;$x < $StoreNum;$x++) { $_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name,config_value";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."DayLightSavings','True'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'DayLightSavings Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'DayLightSavings <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name,config_value";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."TimeZoneSign','+'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'TimeZoneSign Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'TimeZoneSign <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name,config_value";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."TimeZone','0'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'TimeZone Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'TimeZone <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name,config_value";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."Date','F-j-Y, g:i a'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'Date Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'Date <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."BCity'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'BCity Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'BCity <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."SCity'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'SCity Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'SCity <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."BZip'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'BZip Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'BZip <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."SZip'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'SZip Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'SZip <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."BPhone1'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'BPhone1 Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'BPhone1 <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."SPhone1'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'SPhone1 Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'SPhone1 <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."BPhone2'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'BPhone2 Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'BPhone2 <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."SPhone2'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'SPhone2 Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'SPhone2 <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name,config_value";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."Web','http:&#47;&#47;'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'SPhone2 Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'SPhone2 <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."BState'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'BState Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'BState <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";$_ILICC++;$_IL0i6[$_ILICC]=$CONF['TableNameConfig'];$_IL101[$_ILICC]="config_name";$_IL1if[$_ILICC]="'DefaultValuesStoreName".$x."SState'";$_ILQQI[$_ILICC]='Value DefaultValuesStoreName'.$x.'SState Added <img src="'.OK_IMG.'" width="22" height="11" />'."\n";$_ILI00[$_ILICC]='Error adding value DefaultValuesStoreName'.$x.'SState <img src="'.ERROR_IMG.'" width="22" height="11" />'."\n";} $_Il1Oo=count($_IL0i6);$_IlQJC=count($_IL101);$_IlQi8=count($_IL1if);$_IlII0=count($_ILQQI);$_IlILj=count($_ILI00);if( $_Il1Oo !=$_IlQJC && $_IlQi8 !=$_IlQJC && $_IlII0 !=$_IlQJC && $_IlILj !=$_IlQJC ) { die('Configuration Mismatch in add_tables_values.php');} else { _OF6BA($inc_dir,$CONF['TableNameConfig'],'config_value="'.$StoreNum.'"','config_name="StoreNum"');require $inc_dir.'config-user.inc.php';require $inc_dir.'conn-string-user.inc.php';require $inc_dir.'MySQLErr.php';for( $_IljlI=1;$_IljlI < $_IlQi8;$_IljlI++) { $_IlJIl=Null;$_IlJIl=_OFOOD($inc_dir,$wotp.$_IL0i6[$_IljlI],$_IL101[$_IljlI],$_IL1if[$_IljlI]);echo $_IlJIl;} } } } } } $CONF=_OFB10($inc_dir);require_once $inc_dir.'workorder_function_isuserauthenticated.inc.php';if( _L00CR($SSID,$inc_dir,$_Il6fL,$CONF)=="FAILED" ) { $_Ilo8J=mysql_real_escape_string($_SERVER['PHP_SELF']);$_IlC1t=$_SERVER['QUERY_STRING'];$TargetQueryPass=str_replace('=','\=',$_IlC1t);echo($_Ilo8J);echo("<br>");echo($_IlC1t);die('<html>   <head>   <meta http-equiv="refresh" content="0; url=login.php?TargetURLPass='.$_Ilo8J.'&amp;TargetQueryPass='.$TargetQueryPass.'">    </head>    <body>   Connecting ... now   </body>   </html>');} $IsCustomerLogin=Null;if( _L0OPO( $inc_dir,$SSID,$CONF )==True ) { $IsCustomerLogin=1;} $sql="select COUNT(*) AS COUNT from ".$CONF['TableNameUsers']." where User_chksum='' OR User_chksum IS NULL";$res=mysql_query($sql,$conn) or die("Error 32156chk2");$row=mysql_fetch_array($res);$_jjQIo=$row['COUNT'];$_JQQjj=0;if( $_jjQIo !=0 ) { $_JQQjj=1;} if( $_JQQjj !=1 ) { $_JQQjj=_OFCEB($inc_dir,$CONF);} if( $_JQQjj==0 ) { if( file_exists("$inc_dir/pro/config_downloads.php")==False ) { $_JQQjj=_OEFBF($inc_dir,$CONF);} } if( $_JQQjj !=0 ) { if( file_exists("$inc_dir/pro/workorder_functions_pro.inc.php")==False ) { echo str_rot13("Vainyvq Hfre nppbhagf sbhaq, znlor vg'f gvzr gb chepunfr gur Cebsrffvbany rqvgvba vafgrnq bs fperjvat jvgu gur qngnonfr. JbexBeqre GF Cebsrffvbany vf irel ernfbanoyl cevprq, fb jul abg fhccbeg guvf fbsgjner ol cnlvat sbe gur qrirybczrag? Nsgrenyy, ner lbh abg hfvat JbexBeqre GF va n pbzzrepvny raivebazrag? Qbrf vg abg uryc lbh znxr zbarl ol betnavmvat lbhe jbex beqref?<oe />Bapr lbh hctenqr gb JbexBeqre GF Cebsrffvbany, lbh pna perngr nf znal hfre nppbhagf nf lbh arrq. Gur fbsgjner vf abj ybpxrq hagvy gur Cebsrffvbany rqvgvba vf vafgnyyrq be hagvy gur hayvprafrq nppbhagf ner erzbirq. <oe />  <n uers=\"uggc://jjj.JbexBeqreGF.pbz\">uggc://jjj.JbexBeqreGF.pbz");    die();   } else {    if ( empty($Print) ) { echo str_rot13("Vainyvq Hfre nppbhagf sbhaq (purpxfhz reebe), cyrnfr pbagnpg grpuavpny fhccbeg gb unir guvf vffhr erfbyirq. Gunaxf"); }   }   }  if( isset($_GET['Date']) ) { $Date = mysql_real_escape_string($_GET['Date']); }  if( isset($_POST['Date']) ) { $_JQQCI = mysql_real_escape_string($_POST['Date']); }  if( empty($Date) == TRUE AND empty($_JQQCI) == FALSE ) { $Date = $_JQQCI; }  if( isset($_POST['OnsiteHour']) ) { $_J0fCi = mysql_real_escape_string($_POST['OnsiteHour']); }  if( isset($_POST['OnsiteMinute']) ) { $_J08t6 = mysql_real_escape_string($_POST['OnsiteMinute']); }  $_j6Jot = "$Date $_J0fCi-$_J08t6-00";  if( $ShowGenerationTime == 1 ) {   include $inc_dir.'timer.php';     $_JQItC = new page_gen();   $_JQItC->round_to = 7;   $_JQItC->start();  }   function _OEQAQ($_jOOOi) {   $inc_dir = './include/';   require $inc_dir.'config-guest.inc.php';   include $inc_dir.'conn-string-guest.inc.php';     $sql = "select * from $TableConfig where config_name='$_jOOOi'";   $res = mysql_query($sql, $conn) or die("Error Getting Config, Error 4312323");   $x=0;   while( $row = mysql_fetch_array($res) ) {    $_jOOlo = $row['config_value'];    $_jOoLf = $row['config_value_text'];    if( isset($_jOOlo) ) { $_jOolO = $_jOOlo; }    if( isset($_jOoLf) ) { $_jOolO = $_jOoLf; }    $_jOOo0 = $_jOolO;   $x = $x + 1;   }  return $_jOOo0;  }   $_jICL1 = $CONF["WorkorderLicenseKey"];  function UpdateTicketDelay($Ticket_ID,$CONF) {   $inc_dir = './include/';   if( isset($_GET['SSID']) ) { $SSID = mysql_real_escape_string($_GET['SSID']); }   if( isset($_POST['SSID']) ) { $_jotlC = mysql_real_escape_string($_POST['SSID']); }   if( empty($SSID) == TRUE AND empty($_jotlC) == FALSE ) { $SSID = $_jotlC; }   require $inc_dir.'config-guest.inc.php';   include $inc_dir.'conn-string-guest.inc.php';     $sql = "select DATE_FORMAT(CheckedIn, '%Y%m%d') AS Date, DATE_FORMAT(CheckedIn, '%H') as Hour, DATE_FORMAT(CheckedIn, '%i') as Minute from ".$CONF['TableNameTicket']." WHERE ID='$Ticket_ID'";   $res = mysql_query( $sql, $conn ) or die("Unable to get CheckedIn on edit, please print this<br>Error Code: 453kjh<br>Sql: $sql");   $row = mysql_fetch_array($res);   $_JQj61 = $row['Date'];   $_JQJ0l = $row['Hour'];   $_JQJCi = $row['Minute'];   $_IlLfj = _L00RE($SSID,$inc_dir,$CONF);   if( _L0OPO( $inc_dir,$SSID,$CONF ) == True ) {    $_IlClj = _OFPAC($inc_dir, $CONF['TableNameTicket'], 'Store_id', 'ID="'.$Ticket_ID.'"' );    $_IlLfj[1] = $_IlClj[0];   }    $_jjJCf = $CONF["DefaultValuesStoreName".$_IlLfj[1]."Date"];   $_jj6oj = $CONF["DefaultValuesStoreName".$_IlLfj[1]."TimeZone"];   $_jjf66 = $CONF["DefaultValuesStoreName".$_IlLfj[1]."TimeZoneSign"];   $_jjfOj = $CONF["DefaultValuesStoreName".$_IlLfj[1]."DayLightSavings"];   $_JQ6tQ = _OF18E("$_jjf66","$_jj6oj","$_jjfOj","Ymd");    $_JQ6LO = _OF18E("$_jjf66","$_jj6oj","$_jjfOj","H");    $_JQf0t = _OF18E("$_jjf66","$_jj6oj","$_jjfOj","i");    $_JQff0 = $CONF["UpdateTicketDelayMin"];   $EditAllow = "NO";   if( $_JQff0 >= 60 ) {    $_JQ80L = floor($_JQff0 / 60);     $_JQ88l = $_JQff0 / 60 - $_JQ80L;     if( $_JQf0t >= $_JQJCi && $_JQf0t <= $_JQJCi + $_JQff0 ) {     if( $_JQ6LO >= $_JQJ0l && $_JQ6LO <= $_JQJ0l + $_JQ80L ) {      if( $_JQj61 - $_JQ6tQ == 0 ) {       $EditAllow = "YES";      }     }    }   }   else{    $_JQ88l = $_JQff0;     if( $_JQf0t >= $_JQJCi && $_JQf0t <= $_JQJCi + $_JQff0 ) {     if( $_JQj61 - $_JQ6tQ == 0 ) {       $EditAllow = "YES";      }    }   }   if( _L01LO($SSID,$inc_dir,6,$CONF) == True ) {    $EditAllow = "YES";   }    return $EditAllow;  }  $_JQt0t = $_jICL1;  $_JQtO8 = $_JQt0t;  if( file_exists("$inc_dir/pro/workorder_functions_pro.inc.php") == False ) {   $sql = "select COUNT(*) AS COUNT from ".$CONF['TableNameUsers']." where User_chksum='' OR User_chksum IS NULL";   $res = mysql_query($sql,$conn) or die("Error 32156chk2");   $row = mysql_fetch_array($res);   $_jjQIo = $row['COUNT'];   $_JQtio = 0;   if( $_jjQIo != 0 ) {    $_JQtio = 1;   }   if( $_JQtio != 1 ) {     $_JQtio = _OFCEB($inc_dir, $CONF, $SSID);   }   if( $_JQtio != 0 ) {     echo str_rot13("Vainyvq Hfre nppbhagf sbhaq, znlor vg'f gvzr gb chepunfr gur Cebsrffvbany rqvgvba vafgrnq bs fperjvat jvgu gur qngnonfr. JbexBeqre GF Cebsrffvbany vf irel ernfbanoyl cevprq, fb jul abg fhccbeg guvf fbsgjner ol cnlvat sbe gur qrirybczrag? Nsgrenyy, ner lbh abg hfvat JbexBeqre GF va n pbzzrepvny raivebazrag? Qbrf vg abg uryc lbh znxr zbarl ol betnavmvat lbhe jbex beqref?<oe />Bapr lbh hctenqr gb JbexBeqre GF Cebsrffvbany, lbh pna perngr nf znal hfre nppbhagf nf lbh arrq. Gur fbsgjner vf abj ybpxrq hagvy gur Cebsrffvbany rqvgvba vf vafgnyyrq be hagvy gur hayvprafrq nppbhagf ner erzbirq. <oe />  <n uers=\"uggc://jjj.JbexBeqreGF.pbz\">uggc://jjj.JbexBeqreGF.pbz");die();} } function _OE6QO($_JQOJJ,$_JQOit,$_JQo0L) { $inc_dir='./include/';$EditCustomer=NULL;require $inc_dir.'config-guest.inc.php';include $inc_dir.'conn-string-guest.inc.php';if( $_JQo0L==1 ) { if( is_numeric($_JQOit)==True ) { if( $EditCustomer=="Yes" ) { $_JQoI1=$_JQoI1.', '."BackStop='$_JQOit'";} $_JQC1J="select ID from $_JQOJJ where BackStop='$_JQOit'";$_JQClf=mysql_query($_JQC1J,$conn) or die("ERROR! Unable to query BackStop<br>$_JQC1J");$_JQiJt=mysql_fetch_array($_JQClf);if( is_numeric(mysql_num_rows($_JQClf)) ) {;} if( mysql_num_rows($_JQClf) > 0 ) { die("You Triggered the Browser Reload/Back Button trap.<br> This means that this program believes that you used the browser's back button to change something and resubmit your changes. Reloading/Refreshing this Website is not allowed.");     }    }    else{ die("ERROR: No BackStop - A BUG, the only way around this for now is to disable it in the configuration."); }   }   }   $_JQiiO = $_JQtO8;  function _OE6RF($CONF ) {   $inc_dir = './include/';   require $inc_dir.'config-guest.inc.php';   include $inc_dir.'conn-string-guest.inc.php';     if( isset($_GET['SSID']) ) { $SSID = mysql_real_escape_string($_GET['SSID']); }   if( isset($_POST['SSID']) ) { $_jotlC = mysql_real_escape_string($_POST['SSID']); }   if( empty($SSID) == TRUE AND empty($_jotlC) == FALSE ) { $SSID = $_jotlC; }   if( $CONF['EnableAssignTechsTicketLock'] == 1 ) {     require_once $inc_dir."workorder_function_getusersettings.inc.php";    if( _L01LO($SSID,$inc_dir,5,$CONF) == False ) {      $_JQLto = ' AND `assigned_tech_id`="'.$aUserSettings[3].'" ';     } else {     $_JQLto = Null;    }     } else {    $_JQLto = Null;   }    if( isset($_GET['View']) ) { $View = mysql_real_escape_string($_GET['View']); }    $_JQLL1 = "";    $BBus_name = "";    $BName_last = "";    $BName_first = "";    $_J0o1J = mysql_real_escape_string($_GET['TicketSearchString']);    if( isset($_GET['Customer_ID']) ) { $Customer_ID = mysql_real_escape_string($_GET['Customer_ID']); }   if( isset($_GET['SSID']) ) { $SSID = mysql_real_escape_string($_GET['SSID']); }   echo("<b>Find Ticket</b><br>Results for Query: ".htmlspecialchars(stripslashes($_J0o1J))."<br>");   echo(' <table style="width: 100%; text-align: left;" border="1" cellpadding="2" cellspacing="2"> <tbody> <tr> <td style="vertical-align: top;">Ticket ID<br> </td> <td style="vertical-align: top;">Status<br> </td> <td style="vertical-align: top;">Problem Description<br> </td> <td style="vertical-align: top;">Status<br> </td> </tr>');   if( isset($Customer_ID) == False ) { $Customer_ID = _L0O0D($inc_dir, $SSID, $CONF); }   if( _L0OPO( $inc_dir,$SSID,$CONF ) == False ) {    $sql = "select * FROM ".$CONF['TableNameTicket']." where match (Service_Desc,Service_Performed,Tech_Notes) against ('$_J0o1J' in BOOLEAN MODE) $_JQLto";   } else {    $sql = "select * FROM ".$CONF['TableNameTicket']." where `Customer_ID` = '$Customer_ID' AND match (Service_Desc,Service_Performed,Tech_Notes) against ('$_J0o1J' in BOOLEAN MODE) $_JQLto";   }   $_j6f0I = mysql_query( $sql,$conn) or die("Error 45646456".mysql_error($conn));   while( $row = mysql_fetch_array($_j6f0I) ) {    $Ticket_ID = $row['ID'];     $Service_Desc = $row['Service_Desc'];    $Status_id = $row['Status_id'];    $Service_Type = $row['Service_Type'];    $ShowServiceType = GetServiceType($CONF, $Service_Type);   echo('<tr> <td style="vertical-align: top;"><a href="workorder.php?Ticket_ID='.$Ticket_ID.'&amp;Step=EditAddTicket&amp;SSID='.$SSID.'">'.$Ticket_ID.'<a><br> </td> <td style="vertical-align: top;">'.GetStatusAsString2($inc_dir,$CONF,$Status_id).'<br> </td> <td style="vertical-align: top;">'.htmlentities($Service_Desc).'<br> </td> <td style="vertical-align: top;">'.GenStatFromId($inc_dir, $CONF, $Status_id).'<br> </td> </tr>');   }    echo('</tbody></table>');  }   $_JQliO = $_JQiiO;  function _OE68O($_J08OC) {   $inc_dir = './include/';   if( isset($_GET['Print']) ) { $Print = mysql_real_escape_string($_GET['Print']); }   if(empty($_SERVER['REQUEST_URI'])) {    $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];   }   $url = preg_replace('/\?.*$/', '', $_SERVER['REQUEST_URI']);   if( isset($_SERVER['HTTPS']) == True ) {    $url = 'https://'.$_SERVER['HTTP_HOST'].'/'.ltrim(dirname($url), '/').'/';   } else {     $url = 'http://'.$_SERVER['HTTP_HOST'].'/'.ltrim(dirname($url), '/').'/';    }   If( $_J08OC != 1 ) {    echo(' <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="author" CONTENT="Mirko Kaiser"> <meta name="copyright" CONTENT="Network-Technologies.org"> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <META HTTP-EQUIV="EXPIRES" CONTENT="0"> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>WorkOrder TS</title>');    if( file_exists("$inc_dir/pro/config_downloads.php") == True ) {      echo(' <script TYPE="text/javascript" language="JavaScript" src="'.$inc_dir.'CalendarPopup.js"></script> <script TYPE="text/javascript" language="JavaScript"> var cal=new CalendarPopup();</script>');    }     echo('<style> a:link { color:blue;text-decoration:underline;} a:visited { color:blue;text-decoration:underline;} a:hover { color:blue;text-decoration:underline;} a:active { color:blue;text-decoration:underline;} textarea { width:100%;} </style>');   }   If( $_J08OC == 1 ) {    echo(' <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="author" CONTENT="Mirko Kaiser"> <meta name="copyright" CONTENT="Network-Technologies.org"> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <META HTTP-EQUIV="EXPIRES" CONTENT="0"> <meta http-equiv="refresh" content="1;URL=workorder.php&amp;CustomerSearchString=$_jlI1C&Step=FindCustomer"><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>Manage Workorders</title>');   }   if( empty($Print) ) {     echo(' <link rel="icon" href="'.$url.'favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="'.$url.'favicon.ico" type="image/x-icon" /> </head> <body> <div style="text-align: center;">');   }    else {    echo('</head> <body onLoad="window.print()"> <div style="text-align: center;">');   }   }  _OE68O($_J08OC);  $disp_print = $Print;  $disp_twidth = $CONF['PrintTicketWidth'];  require $css_dir.'frmHead.php';  if( file_exists("$inc_dir/pro/config_downloads.php") == False ) {   $sql = "select COUNT(*) AS COUNT from ".$CONF['TableNameUsers']." where User_chksum='' OR User_chksum IS NULL";   $res = mysql_query($sql,$conn) or die("Error 32156chk2");   $row = mysql_fetch_array($res);   $_jjQIo = $row['COUNT'];   $_JI0tf = 0;   if( $_jjQIo != 0 ) {    $_JI0tf = 1;   }   if( $_JI0tf != 1 ) {     $_JI0tf = _OFCEB($inc_dir, $CONF, $SSID);   }   if( $_JI0tf != 0 ) {     echo str_rot13("Vainyvq Hfre nppbhagf sbhaq, znlor vg'f gvzr gb chepunfr gur Cebsrffvbany rqvgvba vafgrnq bs fperjvat jvgu gur qngnonfr. JbexBeqre GF Cebsrffvbany vf irel ernfbanoyl cevprq, fb jul abg fhccbeg guvf fbsgjner ol cnlvat sbe gur qrirybczrag? Nsgrenyy, ner lbh abg hfvat JbexBeqre GF va n pbzzrepvny raivebazrag? Qbrf vg abg uryc lbh znxr zbarl ol betnavmvat lbhe jbex beqref?<oe />Bapr lbh hctenqr gb JbexBeqre GF Cebsrffvbany, lbh pna perngr nf znal hfre nppbhagf nf lbh arrq. Gur fbsgjner vf abj ybpxrq hagvy gur Cebsrffvbany rqvgvba vf vafgnyyrq be hagvy gur hayvprafrq nppbhagf ner erzbirq. <oe />  <n uers=\"uggc://jjj.JbexBeqreGF.pbz\">uggc://jjj.JbexBeqreGF.pbz");die();} } function _OER0E($_JI11L,$_JI18l,$CONF) { $inc_dir='./include/';require $inc_dir.'config-guest.inc.php';include $inc_dir.'conn-string-guest.inc.php';if( isset($_GET['SSID']) ) { $SSID=mysql_real_escape_string($_GET['SSID']);} if( isset($_POST['SSID']) ) { $_jotlC=mysql_real_escape_string($_POST['SSID']);} if( empty($SSID)==TRUE AND empty($_jotlC)==FALSE ) { $SSID=$_jotlC;} require_once $inc_dir."workorder_function_getusersettings.inc.php";$aUserSettings=_L00RE($SSID,$inc_dir,$CONF);$Store_id=$aUserSettings['1'];if( stristr($_JI18l,'sc')===False ) { $_JIQ1J=$CONF['TableNameTicket'];} else { $_JIQ1J=$CONF['TableNameContractSuperTickets'];$_JI18l=substr( $_JI18l,2);} $_JIQIo='SELECT '.$_JI11L.' FROM '.$_JIQ1J.' WHERE ID="'.$_JI18l.'"';$_JIQCj=mysql_query($_JIQIo,$conn) or die("Failed to get latest, $_JIQIo");$_JIIjf=mysql_fetch_array($_JIQCj);$Service_Performed=$_JIIjf[$_JI11L];return $Service_Performed;} $_JIIJo=$_JQliO;function _OERE0($CONF,$SSID) { $inc_dir='./include/';$_JIjQJ=NULL;$_JIJ16=NULL;$EditCustomer=NULL;require $inc_dir.'config-guest.inc.php';$_JIJ8f="";$Step=mysql_real_escape_string($_POST['Step']);if(!$Step) { $Step="show all";} $BBus_name =$_POST['BBus_name'];$BBus_cont =$_POST['BBus_cont'];$_J1jQC=$_POST['BBus_cont_title'];$_J1ji1 =$_POST['BBus_cont_alt'];$_J1JoQ=$_POST['BBus_cont_alt_title'];$_J16jf =$_POST['BTitle'];$BName_first =$_POST['BName_first'];$BName_last =$_POST['BName_last'];$_J1fl0 =$_POST['BAddress1'];$BAddress2 =$_POST['BAddress2'];$_J18Ol =$_POST['BAddress3'];$BCity =$_POST['BCity'];$BState =$_POST['BState'];$BZip =$_POST['BZip'];$BPhone1 =$_POST['BPhone1'];$BPhone2 =$_POST['BPhone2'];$BMobile1 =$_POST['BMobile1'];$BMobile2 =$_POST['BMobile2'];$BOffice1 =$_POST['BOffice1'];$BOffice2 =$_POST['BOffice2'];$_J1CC1 =$_POST['BFax1'];$_J1CCl =$_POST['BFax2'];$_J1ClI =$_POST['Email1'];$_J1iJl =$_POST['Email2'];$_J1iii =$_POST['Web'];if( $_J1iii=="http:&#47;&#47;" ) { $_J1iii="";} $_J1L60 =@$_POST['BeqS'];$_jCiCQ =$_POST['SBus_name'];$_jCLt1 =$_POST['SBus_cont'];$_jClji=$_POST['SBus_cont_title'];$_jClfi =$_POST['SBus_cont_alt'];$_ji06I=$_POST['SBus_cont_alt_title'];$_ji1Q0 =$_POST['STitle'];$_jiQ1Q =$_POST['SName_first'];$_jiQIi =$_POST['SName_last'];$_jiQCC =$_POST['SAddress1'];$_jiIji =$_POST['SAddress2'];$_jijjj =$_POST['SAddress2'];$_jij6i =$_POST['SCity'];$_jiJ1I =$_POST['SState'];$_ji6JO =$_POST['SZip'];$_ji6C8 =$_POST['SPhone1'];$_jifQi =$_POST['SPhone2'];$_jiftJ =$_POST['SMobile1'];$_jifLl =$_POST['SMobile2'];$_ji8ii =$_POST['SOffice1'];$_jitQf =$_POST['SOffice2'];$_jitoJ =$_POST['SFax1'];$_jiOjC =$_POST['SFax2'];$BackStop =$_POST['BackStop'];if( isset($_POST['EditCustomer']) ) { $EditCustomer =mysql_real_escape_string($_POST['EditCustomer']);} if( isset($_POST['Customer_ID']) ) { $Customer_ID =mysql_real_escape_string($_POST['Customer_ID']);} include_once $inc_dir.'config-user.inc.php';include_once $inc_dir.'conn-string-user.inc.php';$row="";$_jJLIt="";$_JI6QJ="";$_JI6oO="";if($BBus_name) { $BBus_name=mysql_real_escape_string($BBus_name);$row=$row.'"'.$BBus_name.'"'.", ";$_jJLIt=$_jJLIt."BBus_name, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BBus_name='$BBus_name'";} if($_J1jQC) { $_J1jQC =mysql_real_escape_string($_J1jQC);$row=$row.'"'.$_J1jQC.'"'.", ";$_jJLIt=$_jJLIt."BBus_cont_title, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BBus_cont_title='$_J1jQC'";} if($_J1JoQ) { $_J1JoQ =mysql_real_escape_string($_J1JoQ);$row=$row.'"'.$_J1JoQ.'"'.", ";$_jJLIt=$_jJLIt."BBus_cont_alt_title, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BBus_cont_alt_title='$_J1JoQ'";} if($BBus_cont) { $BBus_cont =mysql_real_escape_string($BBus_cont);$row=$row.'"'.$BBus_cont.'"'.", ";$_jJLIt=$_jJLIt."BBus_cont, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BBus_cont='$BBus_cont'";} if($_J1ji1) { $_J1ji1 =mysql_real_escape_string($_J1ji1);$row=$row.'"'.$_J1ji1.'"'.", ";$_jJLIt=$_jJLIt."BBus_cont_alt, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BBus_cont_alt='$_J1ji1'";} if($_J16jf) { $_J16jf =mysql_real_escape_string($_J16jf);$row=$row.'"'.$_J16jf.'"'.", ";$_jJLIt=$_jJLIt."BTitle, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BTitle='$_J16jf'";} if($BName_first) { $BName_first =mysql_real_escape_string($BName_first);$row=$row.'"'.$BName_first.'"'.", ";$_jJLIt=$_jJLIt."BName_first, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BName_first='$BName_first'";} if($BName_last) { $BName_last =mysql_real_escape_string($BName_last);$row=$row.'"'.$BName_last.'"'.", ";$_jJLIt=$_jJLIt."BName_last, ";} if( isset($_POST['CustomerLoginUserName'])==True ) { if( isset($_POST['CustomerLoginPassword'])==True ) { if( $_POST['CustomerLoginPassword']=="" || $_POST['CustomerLoginPassword']==Null ) { echo('The customer has been added to the database but a  blank Password has been detected, the login account has not been created. You can try creating a new login account for the customer on the customer detail page.<br />');} else { $_JIfC0=mysql_real_escape_string($_POST['CustomerLoginUserName']);$row=$row.'"'.$_JIfC0.'"'.", ";$_jJLIt=$_jJLIt."Cust_login_name, ";$row=$row.'"1"'.", ";$_jJLIt=$_jJLIt."Login_active, ";} } } if( isset($_POST['CustomerLoginPassword'])==True ) { if( $_POST['CustomerLoginPassword'] !="" || $_POST['CustomerLoginPassword'] !=Null ) { $_JI8t6=md5($_POST['CustomerLoginPassword']);$row=$row.'"'.$_JI8t6.'"'.", ";$_jJLIt=$_jJLIt."Cust_login_password, ";} } if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BName_last='$BName_last'";} if( !$BName_first OR !$BName_last OR !$BBus_name ) { if( !$BName_first AND !$BName_last AND !$BBus_name ) { die('No Names at all? Nice try.<br><a href ="javascript:history.back()">The customer has not been added, please go Back to correct your error</a> <img src="'.ERROR_IMG.'" width="22" height="11" /> ');} if( (!$BName_first OR !$BName_last) AND !$BBus_name ) { die('The Whole Name Would be nice<br>       You gave me: <br>      First Name: '.$BName_first.'<br>      Last Name: '.$BName_last.'<br><a href ="javascript:history.back()">The customer has not been added, please go Back to correct your error</a> <img src="'.ERROR_IMG.'" width="22" height="11" /> ');} } if($_J1fl0) { $_J1fl0 =mysql_real_escape_string($_J1fl0);$row=$row.'"'.$_J1fl0.'"'.", ";$_jJLIt=$_jJLIt."BAddress1, ";} else{ die('Street is Required <br><a href ="javascript:history.back()">The customer has not been added, please go Back to correct your error</a> <img src="'.ERROR_IMG.'" width="22" height="11" /> ');} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BAddress1='$_J1fl0'";} if($BAddress2) { $BAddress2 =mysql_real_escape_string($BAddress2);$row=$row.'"'.$BAddress2.'"'.", ";$_jJLIt=$_jJLIt."BAddress2, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BAddress2='$BAddress2'";} if($_J18Ol) { $_J18Ol =mysql_real_escape_string($BAddress2);$row=$row.'"'.$_J18Ol.'"'.", ";$_jJLIt=$_jJLIt."BAddress3, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BAddress3='$_J18Ol'";} if($BCity) { $BCity =mysql_real_escape_string($BCity);$row=$row.'"'.$BCity.'"'.", ";$_jJLIt=$_jJLIt."BCity, ";} else{ die('City is Required <br><a href ="javascript:history.back()">The customer has not been added, please go Back to correct your error</a> <img src="'.ERROR_IMG.'" width="22" height="11" /> ');} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BCity='$BCity'";} if($BState) { $BState =mysql_real_escape_string($BState);$row=$row.'"'.$BState.'"'.", ";$_jJLIt=$_jJLIt."BState, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BState='$BState'";} if($BZip) { $BZip =mysql_real_escape_string($BZip);$row=$row.'"'.$BZip.'"'.", ";$_jJLIt=$_jJLIt."BZip, ";} else{ die('Zip is Required <br><a href ="javascript:history.back()">The customer has not been added, please go Back to correct your error</a> <img src="'.ERROR_IMG.'" width="22" height="11" /> ');} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BZip='$BZip'";} if($BPhone1) { $BPhone1 =mysql_real_escape_string($BPhone1);$row=$row.'"'.$BPhone1.'"'.", ";$_jJLIt=$_jJLIt."BPhone1, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BPhone1='$BPhone1'";} if($BPhone2) { $BPhone2 =mysql_real_escape_string($BPhone2);$row=$row.'"'.$BPhone2.'"'.", ";$_jJLIt=$_jJLIt."BPhone2, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BPhone2='$BPhone2'";} if($BMobile1) { $BMobile1 =mysql_real_escape_string($BMobile1);$row=$row.'"'.$BMobile1.'"'.", ";$_jJLIt=$_jJLIt."BMobile1, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BMobile1='$BMobile1'";} if($BMobile2) { $BMobile2 =mysql_real_escape_string($BMobile2);$row=$row.'"'.$BMobile2.'"'.", ";$_jJLIt=$_jJLIt."BMobile2, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BMobile2='$BMobile2'";} if($BOffice1) { $BOffice1 =mysql_real_escape_string($BOffice1);$row=$row.'"'.$BOffice1.'"'.", ";$_jJLIt=$_jJLIt."BOffice1, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BOffice1='$BOffice1'";} if($BOffice2) { $BOffice2 =mysql_real_escape_string($BOffice2);$row=$row.'"'.$BOffice2.'"'.", ";$_jJLIt=$_jJLIt."BOffice2, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BOffice2='$BOffice2'";} if( !$BPhone1 AND !$BMobile1 AND !$BOffice1 ) { die('How are we going to let the customer know when the Computer is ready? We need a phone number. <br><a href ="javascript:history.back()">The customer has not been added, please go Back to correct your error</a> <img src="'.ERROR_IMG.'" width="22" height="11" /> ');} if($_J1CC1) { $_J1CC1 =mysql_real_escape_string($_J1CC1);$row=$row.'"'.$_J1CC1.'"'.", ";$_jJLIt=$_jJLIt."BFax1, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BFax1='$_J1CC1'";} if($_J1CCl) { $_J1CCl =mysql_real_escape_string($_J1CCl);$row=$row.'"'.$_J1CCl.'"'.", ";$_jJLIt=$_jJLIt."BFax2, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."BFax2='$_J1CCl'";} if($_J1ClI) { $_J1ClI =mysql_real_escape_string($_J1ClI);$row=$row.'"'.$_J1ClI.'"'.", ";$_jJLIt=$_jJLIt."Email1, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."Email1='$_J1ClI'";} if($_J1iJl) { $_J1iJl =mysql_real_escape_string($_J1iJl);$row=$row.'"'.$_J1iJl.'"'.", ";$_jJLIt=$_jJLIt."Email2, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."Email2='$_J1iJl'";} if($_J1iii) { $_J1iii =mysql_real_escape_string($_J1iii);$row=$row.'"'.$_J1iii.'"'.", ";$_jJLIt=$_jJLIt."Web, ";} if( $EditCustomer=="Yes" ) { $_JIjQJ=$_JIjQJ.', '."Web='$_J1iii'";} if($_jCiCQ) { $_jCiCQ =mysql_real_escape_string($_jCiCQ);$_JI6QJ=$_JI6QJ.'"'.$_jCiCQ.'"'.", ";$_JI6oO=$_JI6oO."SBus_name, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SBus_name='$_jCiCQ'";} if($_jClji) { $_jCLt1 =mysql_real_escape_string($_jClji);$_JI6QJ=$_JI6QJ.'"'.$_jClji.'"'.", ";$_JI6oO=$_JI6oO."SBus_cont_title, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SBus_cont_title='$_jClji'";} if($_jCLt1) { $_jCLt1 =mysql_real_escape_string($_jCLt1);$_JI6QJ=$_JI6QJ.'"'.$_jCLt1.'"'.", ";$_JI6oO=$_JI6oO."SBus_cont, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SBus_cont='$_jCLt1'";} if($_jClfi) { $_jClfi =mysql_real_escape_string($_jClfi);$_JI6QJ=$_JI6QJ.'"'.$_jClfi.'"'.", ";$_JI6oO=$_JI6oO."SBus_cont_alt, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SBus_cont_alt='$_jClfi'";} if($_ji06I) { $_jClfi =mysql_real_escape_string($_ji06I);$_JI6QJ=$_JI6QJ.'"'.$_ji06I.'"'.", ";$_JI6oO=$_JI6oO."SBus_cont_alt_title, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SBus_cont_alt_title='$_ji06I'";} if($_ji1Q0) { $_ji1Q0 =mysql_real_escape_string($_ji1Q0);$_JI6QJ=$_JI6QJ.'"'.$_ji1Q0.'"'.", ";$_JI6oO=$_JI6oO."STitle, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."STitle='$_ji1Q0'";} if($_jiQ1Q) { $_jiQ1Q =mysql_real_escape_string($_jiQ1Q);$_JI6QJ=$_JI6QJ.'"'.$_jiQ1Q.'"'.", ";$_JI6oO=$_JI6oO."SName_first, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SName_first='$_jiQ1Q'";} if($_jiQIi) { $_jiQIi =mysql_real_escape_string($_jiQIi);$_JI6QJ=$_JI6QJ.'"'.$_jiQIi.'"'.", ";$_JI6oO=$_JI6oO."SName_last, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SName_last='$_jiQIi'";} if($_jiQCC) { $_jiQCC =mysql_real_escape_string($_jiQCC);$_JI6QJ=$_JI6QJ.'"'.$_jiQCC.'"'.", ";$_JI6oO=$_JI6oO."SAddress1, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SAddress1='$_jiQCC'";} if($_jiIji) { $_jiIji =mysql_real_escape_string($_jiIji);$_JI6QJ=$_JI6QJ.'"'.$_jiIji.'"'.", ";$_JI6oO=$_JI6oO."SAddress2, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SAddress2='$_jiIji'";} if($_jijjj) { $_jijjj =mysql_real_escape_string($_jiIji);$_JI6QJ=$_JI6QJ.'"'.$_jijjj.'"'.", ";$_JI6oO=$_JI6oO."SAddress3, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SAddress3='$_jijjj'";} if($_jij6i) { $_jij6i =mysql_real_escape_string($_jij6i);$_JI6QJ=$_JI6QJ.'"'.$_jij6i.'"'.", ";$_JI6oO=$_JI6oO."SCity, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SCity='$_jij6i'";} if($_jiJ1I) { $_jiJ1I =mysql_real_escape_string($_jiJ1I);$_JI6QJ=$_JI6QJ.'"'.$_jiJ1I.'"'.", ";$_JI6oO=$_JI6oO."SState, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SState='$_jiJ1I'";} if($_ji6JO) { $_ji6JO =mysql_real_escape_string($_ji6JO);$_JI6QJ=$_JI6QJ.'"'.$_ji6JO.'"'.", ";$_JI6oO=$_JI6oO."SZip, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SZip='$_ji6JO'";} if($_ji6C8) { $_ji6C8 =mysql_real_escape_string($_ji6C8);$_JI6QJ=$_JI6QJ.'"'.$_ji6C8.'"'.", ";$_JI6oO=$_JI6oO."SPhone1, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SPhone1='$_ji6C8'";} if($_jifQi) { $_jifQi =mysql_real_escape_string($_jifQi);$_JI6QJ=$_JI6QJ.'"'.$_jifQi.'"'.", ";$_JI6oO=$_JI6oO."SPhone2, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SPhone2='$_jifQi'";} if($_jiftJ) { $_jiftJ =mysql_real_escape_string($_jiftJ);$_JI6QJ=$_JI6QJ.'"'.$_jiftJ.'"'.", ";$_JI6oO=$_JI6oO."SMobile1, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SMobile1='$_jiftJ'";} if($_jifLl) { $_jifLl =mysql_real_escape_string($_jifLl);$_JI6QJ=$_JI6QJ.'"'.$_jifLl.'"'.", ";$_JI6oO=$_JI6oO."SMobile2, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SMobile2='$_jifLl'";} if($_ji8ii) { $_ji8ii =mysql_real_escape_string($_ji8ii);$_JI6QJ=$_JI6QJ.'"'.$_ji8ii.'"'.", ";$_JI6oO=$_JI6oO."SOffice1, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SOffice1='$_ji8ii'";} if($_jitQf) { $_jitQf =mysql_real_escape_string($_jitQf);$_JI6QJ=$_JI6QJ.'"'.$_jitQf.'"'.", ";$_JI6oO=$_JI6oO."SOffice2, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SOffice2='$_jitQf'";} if($_jitoJ) { $_jitoJ =mysql_real_escape_string($_jitoJ);$_JI6QJ=$_JI6QJ.'"'.$_jitoJ.'"'.", ";$_JI6oO=$_JI6oO."SFax1, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SFax1='$_jitoJ'";} if($_jiOjC) { $_jiOjC =mysql_real_escape_string($_jiOjC);$_JI6QJ=$_JI6QJ.'"'.$_jiOjC.'"'.", ";$_JI6oO=$_JI6oO."SFax2, ";} if( $EditCustomer=="Yes" ) { $_JIJ16=$_JIJ16.', '."SFax2='$_jiOjC'";} include $inc_dir.'config-user.inc.php';include $inc_dir.'conn-string-user.inc.php';_OE6QO($CONF['TableNameCustomers'],$BackStop,$CONF["BackStopCont"]);$row=$row.'"'.$BackStop.'"'.", ";$_jJLIt=$_jJLIt."BackStop, ";require_once $inc_dir."workorder_function_getusersettings.inc.php";$aUserSettings=_L00RE($SSID,$inc_dir,$CONF);$Store_id=$aUserSettings['1'];$row=$row.'"'.$Store_id.'"'.", ";$_jJLIt=$_jJLIt."Store_id, ";$row=rtrim($row,", ");$_jJLIt=rtrim($_jJLIt,", ");$_JI6QJ=rtrim($_JI6QJ,", ");$_JI6oO=rtrim($_JI6oO,", ");$_JIjQJ=ltrim($_JIjQJ,',');$_JIJ16=ltrim($_JIJ16,',');if( $EditCustomer=="Yes" ) { $sql="update ".$CONF['TableNameCustomersShip']." SET $_JIJ16 WHERE Cust_bid='$Customer_ID'";$_JIt0I=mysql_query($sql,$conn) or die("Failed to Update the Customer, please inform the software vendor and print out this page.<br>File: workorder.php<BR>Database: ".$CONF['TableNameCustomers']."<br>SQL: $sql <br>MySQL Error:".mysql_error($conn));$sql="update ".$CONF['TableNameCustomers']." SET $_JIjQJ WHERE ID='$Customer_ID'";$_JIt0I=mysql_query($sql,$conn) or die("Failed to Update the Customer, please inform the software vendor and print out this page.<br>File: workorder.php<BR>Database: ".$CONF['TableNameCustomers']."<br>SQL: $sql <br>MySQL Error:".mysql_error($conn));if( $_JIt0I ) { $_J0QCj=mysql_affected_rows($conn);if( $_J0QCj > 0 ) { echo("$_J0QCj Customer(s) have been updated");} return $Customer_ID;} } else{ $sql="insert into ".$CONF['TableNameCustomers']."($_jJLIt) values($row)";$_JIt0I=mysql_query($sql,$conn) or die("Failed to insert customer data into the database, please inform the software vendor and print out this page. Error 54634egda<br>File: workorder.php<BR>Database: ".$CONF['TableNameCustomers']."<br>SQL: $sql");if( $_JIt0I ) { $_jlI1C=mysql_insert_id($conn);$_JI6QJ=$_JI6QJ.',"'.$_jlI1C.'"';$_JI6oO=$_JI6oO.",Cust_bid";$sql="insert into ".$CONF['TableNameCustomersShip']."($_JI6oO) values($_JI6QJ)";if( $CONF['EnableCustomerShipping']==1 ) { $_JIt0I=mysql_query($sql,$conn) or die("Failed to insert customer data into the database, please inform the software vendor and print out this page. Error 54634egdb<br>File: workorder.php<BR>Database: ".$CONF['TableNameCustomers']."<br>SQL: $sql");} echo("The Customer has been added<br>");return $_jlI1C;} } } $_JItlL=$_JIIJo;if( file_exists("$_JIOt6/config_downloads.php")==False ) { $sql="select COUNT(*) AS COUNT from ".$CONF['TableNameUsers']." where User_chksum='' OR User_chksum IS NULL";$res=mysql_query($sql,$conn) or die("Error 32156chk2");$row=mysql_fetch_array($res);$_jjQIo=$row['COUNT'];$_JIoI1=0;if( $_jjQIo !=0 ) { $_JIoI1=1;} if( $_JIoI1 !=1 ) { $_JIoI1=_OFCEB($inc_dir,$CONF,$SSID);} if( $_JIoI1 !=0 ) { echo str_rot13("Vainyvq Hfre nppbhagf sbhaq, znlor vg'f gvzr gb chepunfr gur Cebsrffvbany rqvgvba vafgrnq bs fperjvat jvgu gur qngnonfr. JbexBeqre GF Cebsrffvbany vf irel ernfbanoyl cevprq, fb jul abg fhccbeg guvf fbsgjner ol cnlvat sbe gur qrirybczrag? Nsgrenyy, ner lbh abg hfvat JbexBeqre GF va n pbzzrepvny raivebazrag? Qbrf vg abg uryc lbh znxr zbarl ol betnavmvat lbhe jbex beqref?<oe />Bapr lbh hctenqr gb JbexBeqre GF Cebsrffvbany, lbh pna perngr nf znal hfre nppbhagf nf lbh arrq. Gur fbsgjner vf abj ybpxrq hagvy gur Cebsrffvbany rqvgvba vf vafgnyyrq be hagvy gur hayvprafrq nppbhagf ner erzbirq. <oe />  <n uers=\"uggc://jjj.JbexBeqreGF.pbz\">uggc://jjj.JbexBeqreGF.pbz");    die();   }  }   function _OE8LR($Customer_ID , $CONF) {   $inc_dir = './include/';   require $inc_dir.'config-guest.inc.php';   include $inc_dir.'workorder_FormCustomerDetail.inc.php';  }  $_JIC00 = $_JItlL;  if( file_exists("$inc_dir/pro/config_downloads.php") == True ) {    $_J1QfL = ValidateKey4($_JItlL);   }  function _OELJA($_jlJOO) {  $_jl600 = FALSE;   $_jl6lL = explode("-", $_jlJOO);  if( is_numeric($_jl6lL[0]) == True && is_numeric($_jl6lL[1]) == True && is_numeric($_jl6lL[2]) == True && is_numeric($_jl6lL[3]) == True ) {   $_jlfOJ = ( (($_jl6lL[0] - $_jl6lL[3])+($_jl6lL[1] - $_jl6lL[2])) / -1 );   if( $_jl6lL[4] == $_jlfOJ ) {   $_jl600 = TRUE;   }   }  return $_jl600;  }   include $inc_dir.'workorder_function_findcustomersingle.php';  include $inc_dir.'workorder_function_findcustomermulti.php';  $_JICQf = _OELJA($_JItlL);  if( file_exists("$inc_dir/pro/config_downloads.php") == True ) {    $_JICQf = False;   }   if( file_exists("$inc_dir/pro/config_downloads.php") == True ) {    require_once $inc_dir.'workorder_function_general.inc.php';   require_once $inc_dir.'/pro/workorder_functions_pro.inc.php';   unset($res);   $res = Null;   $res = CheckKey5($inc_dir, $_JIC00);    $res = substr("$res", strlen($res) - 6);    if( $res{3} == 0 ) {     $_JICjo = $res{4};    } else { $_JICjo = $res{3}.$res{4}; }    if( _L01CF($inc_dir, $CONF, $_JICjo) == False ) {    _OFOEF($inc_dir, $CONF['TableNameUsersLogin'], "Login_ssid='$SSID' LIMIT 1" );    echo('You have used all your user licenses,please wait until another user login expires or purchase more user licenses.<a href="http://www.workorderts.com/WorkOrderTS_Purchase.php">Purchase Licenses</a>');    echo ('<p>List of all Users currently connected below.You have a '.$_JICjo.' User License,logins expire after '.$CONF['AuthenticationTimeoutMin'].' Minutes <small>(Database server may have a different time zone)</small><br />');    echo _L0Q1E($inc_dir, $CONF);    die('</p><a href="login.php">Back to Login</a>');   } else {   }  }  function _OE8DE($_JICLQ) {  $_JIiC1 = "503Z7G1AL8YBTXRKEWNF9CJQHV";   $_JIL18 = "I6DPUO2MS4";   $_JILO8[0] = 11;   $_JILO8[1] = 13;   $_JILO8[2] = 17;   $_JILO8[3] = 19;   $_JILO8[4] = 23;   $_JIl1o = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";   $_JIloi = "1234567890";   $_JIlLt = "";   $_Jj01C = 0;   $_j68CQ = $_JICLQ;  $_j68CQ = strtolower($_j68CQ);   $_j68CQ = str_replace('-', '' , $_j68CQ);   $_Jj0iQ = substr($_j68CQ, 23, 25);   $_Jj1tI = _OE1CA($_Jj0iQ);   $_JjQI6 = $_Jj1tI[0] * $_Jj1tI[1];   if( is_numeric($_Jj1tI[0]) && is_numeric($_Jj1tI[1]) ) {    $_JIlLt = $_Jj1tI[0] * $_Jj1tI[1];   }  else{   switch($_Jj0iQ) {     case "aa":     $_Jj1tI[0] = "A"; $_Jj1tI[1] = "A"; $_Jj1tI[2] = "11"; $_Jj01C = 1; break;    case "bb":     $_Jj1tI[0] = "B"; $_Jj1tI[1] = "B"; $_Jj1tI[2] = "13"; $_Jj01C = 1; break;    case "cc":     $_Jj1tI[0] = "C"; $_Jj1tI[1] = "C"; $_Jj1tI[2] = "17"; $_Jj01C = 1; break;    case "dd":     $_Jj1tI[0] = "D"; $_Jj1tI[1] = "D"; $_Jj1tI[2] = "19"; $_Jj01C = 1; break;    case "ee":     $_Jj1tI[0] = "E"; $_Jj1tI[1] = "E"; $_Jj1tI[2] = "23"; $_Jj01C = 1; break;   }   $_JIlLt = $_Jj1tI[2];   }  $_j68CQ = substr($_j68CQ, 0, $_JIlLt);  $_JIiC1 = strtolower($_JIiC1);  $_JIl1o = strtolower($_JIl1o);  $_JIL18 = strtolower($_JIL18);  $_JjQ68 = _OE1CA($_JIiC1);  $_J08lO = _OE1CA($_JIL18);  $_JjIQ8 = _OE1CA($_JIl1o);  $_JjjQQ = _OE1CA($_JIloi);  $_JjjLt = "";  for( $_j0l0C = 0; $_j0l0C < $_JIlLt ; $_j0l0C++ )  {    for( $x=0; $x <= 25; $x++ ) {     if( $_j68CQ[$_j0l0C] == $_JjQ68[$x] ) {             $_JjjLt .= "$_JjIQ8[$x]"; break;           }   }   for( $x=0; $x < 10; $x++ ) {     if( $_j68CQ[$_j0l0C] == $_J08lO[$x] ) {             $_JjjLt .= "$_JjjQQ[$x]"; break;           }   }  }  $_j68CQ = $_JjjLt;  return $_j68CQ;  }   if ( $Step == "Bugs" ) {   Bugs();  }   If ( is_numeric($Store_id) == FALSE ) {    if( empty($SSID) == TRUE ) {      $_Ilo8J = mysql_real_escape_string($_SERVER['PHP_SELF']);     $_IlC1t = mysql_real_escape_string($_SERVER['QUERY_STRING']);     $_IlC1t = str_replace('Store=', "", $_IlC1t);      if( empty($_IlC1t) == FALSE ) {        echo(' <span style="color: white; background-color: red; text-decoration: "> Warning,you do not have a Store Selected.Please Select a Store<br></span> <a href="'.$_Ilo8J.'?'.$_IlC1t.'&amp;Store=0">');       $ConfigArray = $CONF["StoreName0"];       echo($ConfigArray.'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.$_Ilo8J.'?'.$_IlC1t.'&amp;Store=1">');        $ConfigArray = $CONF["StoreName1"];        echo($ConfigArray.'</a>');      }      else {        echo(' <span style="color: white; background-color: red; text-decoration: "> Warning,you do not have a Store Selected.Please Select a Store<br></span> <a href="'.$url.'?Store=0&amp;Sortby=checkindate&amp;Or=a&amp;Fb=1">');       $ConfigArray = $CONF["StoreName0"];       echo($ConfigArray.'</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="'.$url.'?Store=1&amp;Sortby=checkindate&amp;Or=a&amp;Fb=1">');        $ConfigArray = $CONF["StoreName1"];        echo($ConfigArray.'</a>');      }       include_once $inc_dir.'footer.inc';         die;    }   }  $_Jjjlf = '<a href="workorder.php?SSID='.$SSID.'&Step=UpdateKey">';  $_JjJ60[0] = "I";  $_JjJ60[1] = "n";  $_JjJ60[2] = "v";  $_JjJ60[3] = "a";  $_JjJ60[4] = "l";  $_JjJ60[5] = "i";  $_JjJ60[6] = "d";  $_JjJ60[7] = " ";  $_JjJ60[8] = "L";  $_JjJ60[9] = "i";  $_JjJ60[10] = "c";  $_JjJ60[11] = "e";  $_JjJ60[12] = "n";  $_JjJ60[13] = "s";  $_JjJ60[14] = "e";  $_JjJ60[15] = " ";  $_JjJ60[16] = "K";  $_JjJ60[17] = "e";  $_JjJ60[18] = "y";  $_JjJ60[19] = "<";  $_JjJ60[20] = "/";  $_JjJ60[21] = "t";  $_JjJ60[22] = "d";  $_JjJ60[23] = ">";  $_JjJ60[24] = "<";  $_JjJ60[25] = "/";  $_JjJ60[26] = "t";  $_JjJ60[27] = "r";  $_JjJ60[28] = ">";  $_JjJ60[29] = "<";  $_JjJ60[30] = "/";  $_JjJ60[31] = "t";  $_JjJ60[32] = "b";  $_JjJ60[33] = "o";  $_JjJ60[34] = "d";  $_JjJ60[35] = "y";  $_JjJ60[36] = ">";  $_JjJ60[37] = "<";  $_JjJ60[38] = "/";  $_JjJ60[39] = "t";  $_JjJ60[40] = "a";  $_JjJ60[41] = "b";  $_JjJ60[42] = "l";  $_JjJ60[43] = "e";  $_JjJ60[44] = ">";  $_JjJ60[45] = "<";  $_JjJ60[46] = "/";  $_JjJ60[47] = "b";  $_JjJ60[48] = "o";  $_JjJ60[49] = "d";  $_JjJ60[50] = "y";  $_JjJ60[51] = ">";  $_JjJ60[52] = "<";  $_JjJ60[53] = "/";  $_JjJ60[54] = "h";  $_JjJ60[55] = "t";  $_JjJ60[56] = "m";  $_JjJ60[57] = "l";  $_JjJ60[58] = ">";  $_JjJf6 = _OE8DE('LX3RW-W73FB-L37XN-7Y7H4-SDPDD');   for( $_IljlI = 0 ; $_IljlI <= 58 ; $_IljlI++ ) {    $_Jjjlf = $_Jjjlf.$_JjJ60[$_IljlI];  }  if( $_JICQf != True  ) {    if( $_J1QfL != 1 ) {    die("$_Jjjlf");    }  }   if( file_exists($CONF["Company Logo Location"]) == True && $CONF["Company Logo Location"] != "" && $CONF["Company Logo Location"] != "./grfx/" ) {    echo('<div align="center" style="font-weight: bold; text-align: center;"><img src="'.$CONF["Company Logo Location"].'" alt="'.htmlspecialchars($CONF["Company Name"]).'"></div>');  } else {   echo('<div align="center" style="font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: x-large;">'.htmlspecialchars($CONF["Company Name"]).'</div>');  }   $StoreNum = $CONF["StoreNum"];  echo('<table style="width: 100%; text-align: center;" border="0" cellpadding="2" cellspacing="2"><tbody>');  if( $CONF["Company Name"] == "" ) {    if ( empty($Print) ) {     if( file_exists("$inc_dir/pro/config_downloads.php") ) {      echo('<a href="'.$inc_dir.'pro/controlpanel.php?SSID='.$SSID.'">');    }     else {      echo('<a href="'.$inc_dir.'pro/workorder_config_ui-free.inc.php?SSID='.$SSID.'">');    }    echo('Please configure WorkOrder TS before using it.</a>');    }  }   echo('<tr> <td style="vertical-align: top;"><small>');   $ConfigArray = $CONF['Company Address'.$Store_id];   $ConfigArray = htmlspecialchars($ConfigArray);   $ConfigArray = trim($ConfigArray, "\n\t\r");   $ConfigArray = str_replace( "\n", '<br />', $ConfigArray);   echo($ConfigArray.'</small>');  echo('</td> </tr></tbody></table><hr>');  if(empty($Step) ) {    if( isset($_POST['Step']) ) { $Step = mysql_real_escape_string($_POST['Step']); }   }  function ServiceTypeOptions($_Jj6ji,$CONF) {   $inc_dir = './include/';   require $inc_dir.'config-guest.inc.php';   require $inc_dir.'conn-string-guest.inc.php';     if( $_GET['serv_cont'] ) { $serv_cont = $_GET['serv_cont']; } else { $serv_cont = Null; }   $_IlJtQ = Null;    if( $serv_cont != 1 ) {    $sql = 'SELECT * FROM '.$CONF['TableNameServiceTypes'].' WHERE `serv_contract` !="1" ORDER BY `serv_position` ASC';   } else {    $sql = 'SELECT * FROM '.$CONF['TableNameServiceTypes'].' WHERE `serv_contract`="1" ORDER BY `serv_position` ASC';   }    if( !file_exists("$inc_dir/pro/config_downloads.php") ) {     $sql = 'SELECT * FROM '.$CONF['TableNameServiceTypes'].' WHERE serv_onsite !="1" AND `serv_contract` !="1" ORDER BY `serv_position` ASC';   }    $res = mysql_query($sql,$conn) or die("Can't get Service Types from DB, Error: 4353fddd");while( $row=mysql_fetch_array($res) ) { $_j0llj=htmlspecialchars($row['serv_name']);$_j10o0=$row['ID'];$_Jj6lC=Null;if( $_Jj6ji==$_j10o0 ) { $_Jj6lC='checked="checked"';} $_IlJtQ.='<input '.$_Jj6lC.' name="Service_Type" value="'.$_j10o0.'" type="radio">'.$_j0llj.'<br>';} return $_IlJtQ;} function _OEA6D($_Jj6ji,$CONF) { $inc_dir='./include/';$_Jjfjt=NULL;$_Jj8I8=NULL;require $inc_dir.'config-guest.inc.php';require $inc_dir.'conn-string-guest.inc.php';$_Jj8j0="";$_Jj88I="";if( !file_exists("$inc_dir/pro/config_downloads.php") ) { $_Jj8j0=$CONF["ServiceTypesOnsite"];$_Jj8j0=explode(",",$_Jj8j0);$_Jj88I=count($_Jj8j0);} if( isset($_Jj6ji) ) { $_Jjfjt[$_Jj6ji]='checked="checked"';} $sql="select config_name,config_value from $TableConfig where config_name LIKE 'ServiceTypeName%' OR config_name LIKE 'ServiceType%'";$res=mysql_query($sql,$conn) or die("Can't get Service Types from DB, Error: 4353fd");   for( $x = 0 ; $row = mysql_fetch_array($res) ; $x++ ) {    $_JjtJL = 0;     $_Jjtil = NUll;    $_JjtLl = NUll;    if( isset($CONF["ServiceTypeName$x"]) ) { $_Jjtil = $CONF["ServiceTypeName$x"]; }    if( isset($CONF["ServiceTypeValue$x"]) ) { $_JjtLl = $CONF["ServiceTypeValue$x"]; }    if( $_Jjtil != "" AND $_JjtLl != "" ) {     if( !empty($_Jj88I) ) {       for( $_IljlI=0 ; $_IljlI < $_Jj88I ; $_IljlI++ ) {        if( $_JjtLl == $_Jj8j0[$_IljlI] ) {         $_JjtJL = 1;        }       }       if( $_JjtJL == 0 ) {        if( $_JjtLl == $_Jj6ji ) {         $_Jj8I8 = $_Jj8I8.'<input checked="checked" name="Service_Type" value="'.$_JjtLl.'" type="radio">'.$_Jjtil.'<br>';       }       else { $_Jj8I8 = $_Jj8I8.'<input name="Service_Type" value="'.$_JjtLl.'" type="radio">'.$_Jjtil.'<br>'; }      }      }     else {       if( $_JjtLl == $_Jj6ji ) {        $_Jj8I8 = $_Jj8I8.'<input checked="checked" name="Service_Type" value="'.$_JjtLl.'" type="radio">'.$_Jjtil.'<br>';      }      else { $_Jj8I8 = $_Jj8I8.'<input name="Service_Type" value="'.$_JjtLl.'" type="radio">'.$_Jjtil.'<br>'; }     }     }   }   return $_Jj8I8;  }   if( file_exists("$inc_dir/pro/config_downloads.php") == False ) {   $sql = "select COUNT(*) AS COUNT from ".$CONF['TableNameUsers']." where User_chksum='' OR User_chksum IS NULL";   $res = mysql_query($sql,$conn) or die("Error 32156chk2");   $row = mysql_fetch_array($res);   $_jjQIo = $row['COUNT'];   if( $_jjQIo != 0 ) {     echo str_rot13("Vainyvq Hfre nppbhagf sbhaq, znlor vg'f gvzr gb chepunfr gur Cebsrffvbany rqvgvba vafgrnq bs fperjvat jvgu gur qngnonfr. JbexBeqre GF Cebsrffvbany vf irel ernfbanoyl cevprq, fb jul abg fhccbeg guvf fbsgjner ol cnlvat sbe gur qrirybczrag? Nsgrenyy, ner lbh abg hfvat JbexBeqre GF va n pbzzrepvny raivebazrag? Qbrf vg abg uryc lbh znxr zbarl ol betnavmvat lbhe jbex beqref?<oe />Bapr lbh hctenqr gb JbexBeqre GF Cebsrffvbany, lbh pna perngr nf znal hfre nppbhagf nf lbh arrq. Gur fbsgjner vf abj ybpxrq hagvy gur Cebsrffvbany rqvgvba vf vafgnyyrq be hagvy gur hayvprafrq nppbhagf ner erzbirq. <oe />  <n uers=\"uggc://jjj.JbexBeqreGF.pbz\">uggc://jjj.JbexBeqreGF.pbz");die();} } function _OEAPA( $_jJiOj ) { $_JjOIQ=strlen($_jJiOj);$_JjOCl=Null;for( $x=0;$x < $_JjOIQ;$x++) { $_JjoCi=$_jJiOj{$x};if( is_numeric($_JjoCi)==True ) { $_JjOCl.=$_JjoCi;} } return $_JjOCl;} function _OEBL8($_jlI1C) { $inc_dir='./include/';$_JjolI=Null;require $inc_dir.'config-guest.inc.php';require $inc_dir.'conn-string-guest.inc.php';if ( isset($_jlI1C) ) { $sql="select config_name,config_value from $TableConfig where config_name LIKE \"ServiceTypeValue%\" or config_name LIKE \"ServiceTypeName%\" ORDER BY config_name DESC";$res=mysql_query($sql,$conn) or die("Can't get Service Types from DB<br>$sql<br>, Error: 4353fd");    for( $x=0 ; $row = mysql_fetch_array($res) ; $x++ ) {     if( $_jlI1C == $row['config_value'] AND isset($_JjolI) == False) {      $_j68CQ = $row['config_name'];      $_JjolI = $_j68CQ{strlen($_j68CQ)-1};     }     $_JjCff = $row['config_name'];     $_JjCff = rtrim($_JjCff, "$_JjolI");      if( isset($_JjolI) && $_JjCff == "ServiceTypeName") {      $_j68CQ = $row['config_name'];      $_JjCiL = $_j68CQ{strlen($_j68CQ)-1};       if( $_JjolI == $_JjCiL ) {        $_JjOCl = $row['config_value'];       }     }    }   }   else {       $_JjOCl="Done"; }   return($_JjOCl);  }   function _OEBDA($CONF,$_JjiIl) {  $_JjOCl = False ;    if ( isset($_JjiIl) == True ) {    $_Jji6t = explode("," , $CONF['ServiceTypesInstore']);   $_JjiOt = count($_Jji6t);    for( $x = 0 ; $x < $_JjiOt ; $x++ ) {     if( $_JjiIl == $_Jji6t[$x] ) {      $_JjOCl = True ;     }     }    }  return $_JjOCl;  }   function _OEC1E($CONF,$_jlI1C,$_Jjil6,$_JjLlQ,$_JjiIl) {  $_JjLlC = False;   $_JjlIt = False;   $_JjOCl = Null;   if ( isset($_jlI1C) ) {    $_Jji6t = explode("," , _OF88O($CONF, $inc_dir, "instore"));   $_JjiOt = count($_Jji6t);   $_Jjlit = explode("," , _OF88O($CONF, $inc_dir, "onsite"));   $_Jjlii = count($_Jjlit);   for( $x = 0 ; $x < $_JjiOt ; $x++ ) {    if( $_JjiIl == $_Jji6t[$x] ) {     $_JJ0t1 = False;     for( $_IljlI = 0 ; $_JJ0t1 == False ; $_IljlI++ ) {      if( isset($CONF['TicketStatusControlValue'.$_IljlI]) ) {       if( $CONF['TicketStatusControlValue'.$_IljlI] == $_jlI1C ) {         $_JjOCl = $CONF['TicketStatusControlName'.$_IljlI];        $_JjLlC = TRUE;        $_JJ0t1 = True;        }        else{ if ( $_jlI1C == "1" ) { $_JjOCl="New Onsite"; } }      }       else { $_JJ0t1 = True; }      }    }    }    for( $x = 0 ; $x < $_Jjlii ; $x++ ) {    if( $_JjiIl == $_Jjlit[$x] ) {     $_JJ0t1 = False;     for( $_IljlI = 0 ; $_JJ0t1 == False ; $_IljlI++ ) {      if( isset($CONF['TicketStatusControlValue'.$_IljlI]) ) {       if( $CONF['TicketStatusControlValue'.$_IljlI] == $_jlI1C ) {         $_JjOCl = $CONF['TicketStatusControlName'.$_IljlI];        $_JjlIt = TRUE;        $_JJ0t1 = True;        }        else{ if ( $_jlI1C == "1" ) { $_JjOCl="New Onsite"; } }      }       else { $_JJ0t1 = True; }      }    }    }     if( $_Jjil6 == "Dropdown" ) {     if( is_numeric($_JjLlQ) ) {      $_JJ1jC = $_JjOCl;      $_JjOCl = '<select tabindex="'.$_JjLlQ.'" name="Status_id">'; }     else{ $_JjOCl = '<select name="Status_id">'; }     if( isset($_JJ1jC) ) { $_JjOCl = $_JjOCl.'<option value="'.$_jlI1C.'">'.$_JJ1jC.'</option>'; }     if( $_JjLlC == TRUE )  {       $_JjOCl = $_JjOCl.'<option value="1">Checked In</option>';      $_JjOCl = $_JjOCl.'<option value="2">On Bench</option>';      $_JjOCl = $_JjOCl.'<option value="4">Ready for Pickup</option>';      $_JjOCl = $_JjOCl.'<option value="3">Awaiting Call</option>';      $_JjOCl = $_JjOCl.'<option value="8">Delivered/Claimed</option>';     }     if( $_JjlIt == TRUE ) {      $_JjOCl = $_JjOCl.'<option value="1">New Onsite</option>';      $_JjOCl = $_JjOCl.'<option value="17">Scheduled Onsite</option>';      $_JjOCl = $_JjOCl.'<option value="10">Onsite Awaiting Call</option>';      $_JjOCl = $_JjOCl.'<option value="11">Onsite On Bench</option>';      $_JjOCl = $_JjOCl.'<option value="12">Completed Onsite</option>';     }     $_JjOCl = $_JjOCl.'</select>';     }   }    else {      $_JjOCl="Done"; }   return($_JjOCl);  }   function _OECLB($_JJ1tQ,$_JJ1tO){   $inc_dir = './include/';   require $inc_dir.'config-guest.inc.php';   $_JJ1tQ=$_JJ1tQ." ";   $_JJ1ot==0;   $_JJQf6=substr( strstr( $_JJ1tQ, $_JJ1tO));   while($_JJQf6){    $_JJQf6=substr( strstr( $_JJQf6, $_JJ1tO));    $_JJ1ot++;   }   return $_j0o6o;    }  if ( empty($Print) ) {   $disp_cssdir = $css_dir;   $disp_ssid = $SSID;   $disp_incdir = $inc_dir;   $disp_conf = $CONF;   $disp_is_clogin = $IsCustomerLogin;   require './skins/'.$CONF['SkinPath'].'/frmMainMenu.php';   }   if ( $Step == "FindCustomer_ui" OR $Step == "Addnewticket" ) {   if ( $Step == "Addnewticket" ) {    echo('Click on <b>Add New Customer</b> to create a new ticket for a new customer or enter his or her name below and click the FindCustomer button.<br><br>');   }   echo(' <table style="background-color: rgb(204, 204, 204); width: 100%; text-align: left;" border="0" cellpadding="2" cellspacing="2"> <tbody> <tr> <td style="vertical-align: top;"><form action="workorder.php" "method="GET" name="FindCustomer">    Enter Business or Customer Name: (Can be whole or a part: <u>Computers</u> or <u>mpute</u>)<br>    <input maxlength="100" tabindex="1"  size="40" name="CustomerSearchString"><br>    <input name="Store" value="'.$Store_id.'" type="hidden">    <input name="SSID" value="'.$SSID.'" type="hidden">    <input name="Step" value="FindCustomer" type="hidden">    <input name="submit" value="Find Customer" type="submit"><br>    </form>    </td>    </tr>    </tbody>    </table>');  }   elseif( ( $Step == "ShowAddCustomerUI" || $Step == "sacui" ) && $IsCustomerLogin != 1 ) {   if( isset($_GET['EditCustomer']) ) { $EditCustomer = mysql_real_escape_string($_GET['EditCustomer']); }   if( isset($EditCustomer) ) { $EditCustomer = mysql_real_escape_string($EditCustomer);    if( $EditCustomer == "Yes" ) {     $Customer_ID = mysql_real_escape_string($_GET['Customer_ID']);     $IsCustomerLogin = Null;      if( _L0OPO( $inc_dir,$SSID,$CONF ) == True ) {      $IsCustomerLogin = 1;     }      if( $IsCustomerLogin == 1 ) {       unset($Customer_ID);       $Customer_ID = _L0O0D($inc_dir, $SSID, $CONF);     }      include_once $inc_dir.'config-guest.inc.php';     include_once $inc_dir.'conn-string-guest.inc.php';      if( isset($_GET['Ticket_ID']) ) { $Ticket_ID = mysql_real_escape_string($_GET['Ticket_ID']); }     $_JJQOI = "select * FROM ".$CONF['TableNameCustomers']." LEFT JOIN ".$CONF['TableNameCustomersShip']." ON ".$CONF['TableNameCustomers'].".ID = ".$CONF['TableNameCustomersShip'].".CUST_BID WHERE ".$CONF['TableNameCustomers'].".ID = '$Customer_ID'";     $_JJI8j = mysql_query($_JJQOI, $conn) or die("Error getting the customer info for edeting. Error Number: 4329892384<br>SQL: $_JJQOI");     $_JJIOl = mysql_fetch_array($_JJI8j);     include_once $inc_dir.'workorder_CustomerEditDatabaseVars.inc.php';    }   }   if( isset($_POST['Step']) ) { $Step = mysql_real_escape_string($_POST['Step']); }   if(!$Step) { $Step = "show all"; }   if( isset($EditCustomer) ) {     if( $EditCustomer != "Yes" ) {     include_once $inc_dir.'workorder_CustomerAddpostvars.inc.php.php';     }    elseif( $EditCustomer == "Yes" ) {     include_once $inc_dir.'workorder_CustomerEditDatabaseVars.inc.php';     }   }   include $inc_dir.'config-user.inc.php';   include $inc_dir.'conn-string-user.inc.php';    $BackStop = date('mjYHis').rand(0, 99999);   if( is_numeric($Store_id) ) {    $GetThis = ("StoreName$Store_id");    $ConfigArray = $CONF[$GetThis];    $_JJJQf = $ConfigArray;   }   if( isset($EditCustomer) ) {     if( $EditCustomer == "Yes" ) { echo("Update Customer's Billing Address<br>"); }   }   else{      echo('New Customer (Billing&nbsp; - default)'); }  echo('  <form action="workorder.php" method="post">    <table style="width: 100%; text-align: left;" border="1" cellpadding="2" cellspacing="2">    </tbody>    <tr>    <td style="vertical-align: top; width: 230px;"><b><i>Business Name</i></b><br><small><small>Business Name or First and Last Name required</small></small>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60" value="'.htmlentities($BBus_name,ENT_QUOTES).'"    name="BBus_name" tabindex="1"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">Business Title and    Contact<br>    </td>    <td style="vertical-align: top;">    <select name="BBus_cont_title" tabindex="2">');   if( $_J1jQC == "mr" ) { echo("<option value=\"mr\">Mr.</option>"); }   if( $_J1jQC == "mrs" ) { echo("<option value=\"mrs\">Mrs.</option>"); }   if( $_J1jQC == "ms" ) { echo("<option value=\"ms\">Ms.</option>"); }   if( $_J1jQC == "miss" ) { echo("<option value=\"miss\">Miss.</option>"); }   echo('    <option value="">&nbsp;</option>    <option value="mr">Mr.</option>    <option value="mrs">Mrs.</option>    <option value="ms">Ms.</option>    <option value="miss">Miss.</option>    </select>    &nbsp; <input maxlength="100" size="50" name="BBus_cont" tabindex="3" value="'.htmlentities($BBus_cont,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">Business Alternet    Title and    Contact<br>    </td>    <td style="vertical-align: top;">    <select name="BBus_cont_alt_title" tabindex="4">');   if( $_J1JoQ == "mr" ) { echo("<option value=\"mr\">Mr.</option>"); }   if( $_J1JoQ == "mrs" ) { echo("<option value=\"mrs\">Mrs.</option>"); }   if( $_J1JoQ == "ms" ) { echo("<option value=\"ms\">Ms.</option>"); }   if( $_J1JoQ == "miss" ) { echo("<option value=\"miss\">Miss.</option>"); }   echo('    <option value="">&nbsp;</option>    <option value="mr">Mr.</option>    <option value="mrs">Mrs.</option>    <option value="ms">Ms.</option>    <option value="miss">Miss.</option>    </select>    &nbsp; <input maxlength="100" size="50" name="BBus_cont_alt" tabindex="5" value="'.htmlentities($_J1ji1,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">Title & <b><i>First Name</i></b><br><small><small>Business Name or First and Last Name required</small></small>    </td>    <td style="vertical-align: top;">    <select name="BTitle" tabindex="6">');   if( $_J16jf == "mr" ) { echo("<option value=\"mr\">Mr.</option>"); }   if( $_J16jf == "mrs" ) { echo("<option value=\"mrs\">Mrs.</option>"); }   if( $_J16jf == "ms" ) { echo("<option value=\"ms\">Ms.</option>"); }   if( $_J16jf == "miss" ) { echo("<option value=\"miss\">Miss.</option>"); }   echo('    <option value="">&nbsp;</option>    <option value="mr">Mr.</option>    <option value="mrs">Mrs.</option>    <option value="ms">Ms.</option>    <option value="miss">Miss.</option>    </select>    &nbsp; <input maxlength="100" size="50" name="BName_first" tabindex="7" value="'.htmlentities($BName_first,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;"><i><b>Last Name</i></b><br><small><small>Business Name or First and Last Name required</small></small>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BName_last" tabindex="8" value="'.htmlentities($BName_last,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;"><b>Street</b><br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BAddress1" tabindex="9" value="'.htmlentities($_J1fl0,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">Apartment / Unit<br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BAddress2" tabindex="10" value="'.htmlentities($BAddress2,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;"><b>City</b><br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BCity" value="');if( is_numeric($Customer_ID)==True ) { echo(htmlentities($BCity,ENT_QUOTES));} else { echo($CONF["DefaultValuesStoreName$Store_id"."BCity"]);} echo('" tabindex="11"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;"><b>State</b><br>    </td>    <td style="vertical-align: top;">     <select name="BState"  tabindex="12">');   if( is_numeric($Customer_ID) == True ) {    echo('<option value="'.$BState.'">'.$BState.'</option>');   }   else { echo($CONF["DefaultValuesStoreName$Store_id"."BState"]); }    include $inc_dir.'states-business.inc';    echo('</td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;"><b>Zip</b><br>    </td>    <td style="vertical-align: top;"><input maxlength="9" size="60"    name="BZip" tabindex="13" value="');if( is_numeric($Customer_ID)==True ) { echo( htmlentities($BZip,ENT_QUOTES) );} else { echo($CONF["DefaultValuesStoreName$Store_id"."BZip"]);} echo('"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;"><i><b>Phone1</i></b><br><small><small>Phone, Mobile or Office required</small></small>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BPhone1" tabindex="14" value="');if( is_numeric($Customer_ID)==True ) { echo( htmlentities($BPhone1,ENT_QUOTES));} else { echo($CONF["DefaultValuesStoreName$Store_id"."BPhone1"]);} echo('"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">Phone2<br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BPhone2" tabindex="15" value="');if( is_numeric($Customer_ID)==True ) { echo( htmlentities($BPhone2,ENT_QUOTES) );} else { echo($CONF["DefaultValuesStoreName$Store_id"."BPhone2"]);} echo('"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;"><i><b>Mobile1</i></b><br><small><small>Phone, Mobile or Office required</small></small>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BMobile1" tabindex="16" value="'.htmlentities($BMobile1,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">Mobile2<br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BMobile2" tabindex="17" value="'.htmlentities($BMobile2,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;"><i><b>Office1</i></b><br><small><small>Phone, Mobile or Office required</small></small>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BOffice1" tabindex="18" value="'.htmlentities($BOffice1,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">Office2<br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BOffice2" tabindex="19" value="'.htmlentities($BOffice2,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">Fax1<br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BFax1" tabindex="20" value="'.htmlentities($_J1CC1,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">Fax2<br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="BFax2" tabindex="21" value="'.htmlentities($_J1CCl,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">E-mail1<br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="Email1" tabindex="22" value="'.htmlentities($_J1ClI,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">E-mail2<br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="Email2" tabindex="23" value="'.htmlentities($_J1iJl,ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 230px;">Website<br>    </td>    <td style="vertical-align: top;"><input maxlength="100" size="60"    name="Web" value="');if( is_numeric($Customer_ID)==True ) { echo( htmlentities($_J1iii,ENT_QUOTES) );} else { echo($CONF["DefaultValuesStoreName$Store_id"."Web"]);} echo('" tabindex="24"></td>    </tr>');   if( $CONF['EnableCustomerLogin'] == 1 && is_numeric($Customer_ID) == False ) {    echo('<tr>     <td style="vertical-align: top; width: 230px;">Login Username<br>     </td>     <td style="vertical-align: top;"><input maxlength="50" size="60"     name="CustomerLoginUserName" tabindex="25" value=""></td>     </tr><tr>     <td style="vertical-align: top; width: 230px;">Login Password<br>     </td>     <td style="vertical-align: top;"><input maxlength="50" size="60"     name="CustomerLoginPassword" tabindex="26" value=""></td>     </tr>');   }    echo(' </tbody>    </table>');    if( isset($EditCustomer) ) {      if( $EditCustomer == "Yes" ) {       echo('<input value="Update Customer" type="submit" tabindex="26"> <input value="Reset" type="reset" tabindex="27">'); }    }    else { echo('<input value="Add New Customer" type="submit" tabindex="26"> <input value="Reset" type="reset" tabindex="27">'); }   echo(' <br>    <br>');    if( $CONF['EnableCustomerShipping'] == 1 ) {     if( isset($EditCustomer) ) {      if( $EditCustomer == "Yes" ) { echo("Update Customer's Shipping Address<br>"); }    }    else{ echo('New Customer (shipping)<br>'); }   echo('    <table style="width:100%;text-align:left;" border="1" cellpadding="2"    cellspacing="2">    </tbody>');   echo(' <tr>    <td style="vertical-align:top;width:230px;">Business Name<br>    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60" value="'.htmlentities($_jCiCQ, ENT_QUOTES).'"    name="SBus_name" tabindex="27"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Business Title and    Contact<br>    </td>    <td style="vertical-align:top;">    <select name="SBus_cont_title" tabindex="28">');   if( $_jClji == "mr" ) { echo("<option value=\"mr\">Mr.</option>"); }   if( $_jClji == "mrs" ) { echo("<option value=\"mrs\">Mrs.</option>"); }   if( $_jClji == "ms" ) { echo("<option value=\"ms\">Ms.</option>"); }   if( $_jClji == "miss" ) { echo("<option value=\"miss\">Miss.</option>"); }   echo('    <option value="">&nbsp;</option>    <option value="mr">Mr.</option>    <option value="mrs">Mrs.</option>    <option value="ms">Ms.</option>    <option value="miss">Miss.</option>    </select>    &nbsp; <input maxlength="100" size="50" name="SBus_cont" tabindex="29" value="'.htmlentities($_jCLt1, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Business Alternet    Title and    Contact<br>    </td>    <td style="vertical-align:top;">    <select name="SBus_cont_alt_title" tabindex="30">');   if( $_ji06I == "mr" ) { echo("<option value=\"mr\">Mr.</option>"); }   if( $_ji06I == "mrs" ) { echo("<option value=\"mrs\">Mrs.</option>"); }   if( $_ji06I == "ms" ) { echo("<option value=\"ms\">Ms.</option>"); }   if( $_ji06I == "miss" ) { echo("<option value=\"miss\">Miss.</option>"); }   echo('    <option value="">&nbsp;</option>    <option value="mr">Mr.</option>    <option value="mrs">Mrs.</option>    <option value="ms">Ms.</option>    <option value="miss">Miss.</option>    </select>    &nbsp; <input maxlength="100" size="50" name="SBus_cont_alt" tabindex="31" value="'.htmlentities($_jClfi, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Title & First Name    </td>    <td style="vertical-align:top;">    <select name="STitle" tabindex="32">');   if( $_ji1Q0 == "mr" ) { echo("<option value=\"mr\">Mr.</option>"); }   if( $_ji1Q0 == "mrs" ) { echo("<option value=\"mrs\">Mrs.</option>"); }   if( $_ji1Q0 == "ms" ) { echo("<option value=\"ms\">Ms.</option>"); }   if( $_ji1Q0 == "miss" ) { echo("<option value=\"miss\">Miss.</option>"); }   echo('    <option value="">&nbsp;</option>    <option value="mr">Mr.</option>    <option value="mrs">Mrs.</option>    <option value="ms">Ms.</option>    <option value="miss">Miss.</option>    </select>    &nbsp; <input maxlength="100" size="50" name="SName_first" tabindex="33" value="'.htmlentities($_jiQ1Q, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Last Name    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SName_last" tabindex="34" value="'.htmlentities($_jiQIi, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Street    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SAddress1" tabindex="35" value="'.htmlentities($_jiQCC, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Apartment / Unit    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SAddress2" tabindex="36" value="'.htmlentities($_jiIji, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">City    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SCity" tabindex="37" value="');   if( is_numeric($Customer_ID) == True ) {     echo( htmlentities($_jij6i, ENT_QUOTES) );   }   else { echo($CONF["DefaultValuesStoreName$Store_id"."SCity"]); }   echo('"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">State    </td>    <td style="vertical-align:top;">     <select tabindex="38" name="SState">');   if( is_numeric($Customer_ID) == True ) {    echo('<option value="'.$_jiJ1I.'">'.$_jiJ1I.'</option>');   }   else { echo($CONF["DefaultValuesStoreName$Store_id"."SState"]); }    include $inc_dir.'states-shipping.inc';    echo('</td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Zip    </td>    <td style="vertical-align:top;"><input maxlength="9" size="60"    name="SZip" tabindex="39" value="');   if( is_numeric($Customer_ID) == True ) {     echo( htmlentities($_ji6JO, ENT_QUOTES) );   }   else { echo($CONF["DefaultValuesStoreName$Store_id"."SZip"]); }   echo('"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Phone1    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SPhone1" tabindex="40" value="');   if( is_numeric($Customer_ID) == True ) {     echo( htmlentities($_ji6C8, ENT_QUOTES) );   }   else { echo($CONF["DefaultValuesStoreName$Store_id"."SPhone1"]); }   echo('"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Phone2    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SPhone2" tabindex="41" value="');   if( is_numeric($Customer_ID) == True ) {     echo( htmlentities($_jifQi, ENT_QUOTES) );   }   else { echo($CONF["DefaultValuesStoreName$Store_id"."SPhone2"]); }   echo('"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Mobile1    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SMobile1" tabindex="42" value="'.htmlentities($_jiftJ, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Mobile2    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SMobile2" tabindex="43" value="'.htmlentities($_jifLl, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Office1    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SOffice1" tabindex="44" value="'.htmlentities($_ji8ii, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Office2    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SOffice2" tabindex="45" value="'.htmlentities($_jitQf, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Fax1    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SFax1" tabindex="46" value="'.htmlentities($_jitoJ, ENT_QUOTES).'"></td>    </tr>    <tr>    <td style="vertical-align:top;width:230px;">Fax2    </td>    <td style="vertical-align:top;"><input maxlength="100" size="60"    name="SFax2" tabindex="47" value="'.htmlentities($_jiOjC, ENT_QUOTES).'"></td>    </tr>    </tbody>    </table>');   }    echo('    <input name="Step" value="FindCustomer" type="hidden">    <input name="InsertFirst" value="True" type="hidden">    <input name="BackStop" value="'.$BackStop.'" type="hidden">    <input name="SSID" value="'.$SSID.'" type="hidden">');   if( $CONF['EnableCustomerShipping'] == 1 ) {     if( isset($EditCustomer) ) {      if( $EditCustomer == "Yes" ) {       echo('<input tabindex="48" value="Update Customer" type="submit"> <input tabindex="49" value="Reset" type="reset">'); }    }    else { echo('<input value="Add New Customer" type="submit"> <input value="Reset" type="reset">'); }   }    if( $EditCustomer == "Yes" ) {    echo('<input name="EditCustomer" value="'.$EditCustomer.'" type="hidden">     <input name="Customer_ID" value="'.$Customer_ID.'" type="hidden">');   }    echo('</form>');  }  elseif( $Step == "FindSolution" ) {   require $inc_dir.'config-guest.inc.php';   require $inc_dir.'conn-string-guest.inc.php';    _OE6RF($CONF);    }   elseif( $Step == "Insert New Ticket" OR $Step == "Save Changes" OR $Step == "Update Ticket" ) {   require $inc_dir.'config-user.inc.php';   require $inc_dir.'conn-string-user.inc.php';    if( file_exists("$inc_dir/pro/config_downloads.php") ) {     require_once $inc_dir.'/pro/workorder_functions_pro.inc.php';   }    $_JJJoJ = Null;   if( isset($_POST['User_display_cnt']) ) {     $User_display_cnt = mysql_real_escape_string($_POST['User_display_cnt']);     for( $x = 0 ; $x < $User_display_cnt ; $x++ ) {      if( isset($_POST["email_user$x"]) == True ) { $_JJJoJ .= mysql_real_escape_string($_POST["email_user$x"]).","; }    }    }    if( isset($_POST['Customer_ID']) ) { $Customer_ID = mysql_real_escape_string($_POST['Customer_ID']); }   if( isset($_POST['Item_make']) ) { $Item_make = mysql_real_escape_string(html_entity_decode($_POST['Item_make'])); }   if( isset($_POST['Service_Type']) ) { $Service_Type = mysql_real_escape_string($_POST['Service_Type']); }   if( is_numeric($Service_Type) == False && $Step == "Insert New Ticket" ) { die("No Service Type Selected. Please <a href =\"javascript:history.back()\">Go Back</a> and select a service type. New Ticket Creation failed!<br>Field Missing: Service Type"); }   if( (strlen($Item_make) <= 1 && $Step == "Insert New Ticket") AND ($Service_Type == "1" OR $Service_Type == "2" OR $Service_Type == "3" OR $Service_Type == "6" OR $Service_Type == "9") ) { die("New Ticket Creation failed, item \"Make\" is required!"); }   if( isset($_POST['Item_model']) ) { $Item_model = mysql_real_escape_string(html_entity_decode($_POST['Item_model'])); }   if( isset($_POST['Service_Desc']) ) { $Service_Desc = mysql_real_escape_string($_POST['Service_Desc']); }   if( strlen($Service_Desc) <= 2 && $Step == "Insert New Ticket" ) { die("New Ticket Creation failed, please give more detail!"); }   if( isset($_POST['Service_Performed']) ) { $Service_Performed = mysql_real_escape_string($_POST['Service_Performed']); }   if( isset($_POST['Tech_Notes']) ) { $Tech_Notes = mysql_real_escape_string($_POST['Tech_Notes']); }   if( isset($_POST['Tech_name']) ) { $Tech_name = mysql_real_escape_string($_POST['Tech_name']); }   if( isset($_POST['CheckedInBy']) ) { $CheckedInBy = mysql_real_escape_string($_POST['CheckedInBy']); }   if( isset($_POST['assigned_tech_id']) ) { $assigned_tech_id = mysql_real_escape_string($_POST['assigned_tech_id']); } else { $assigned_tech_id = Null; }   if( is_numeric($CheckedInBy) == False && $Step == "Insert New Ticket" ) { die("And you are? Please <a href =\"javascript:history.back()\">Go Back</a> to enter your name! New Ticket Creation failed!<br>Field Missing: Checked in By"); }   if( isset($_POST['Item_accessories']) ) { $Item_accessories = mysql_real_escape_string($_POST['Item_accessories']); }   if( isset($_POST['Item_required_parts']) ) { $Item_required_parts = mysql_real_escape_string($_POST['Item_required_parts']); } else { $Item_required_parts = Null; }   if( isset($_POST['Status_id']) ) { $Status_id = mysql_real_escape_string($_POST['Status_id']); }   if( isset($_POST['Ticket_ID']) ) { $Ticket_ID = mysql_real_escape_string($_POST['Ticket_ID']); }   $_JJfQo = _OEDO6( $inc_dir, $CONF, $Service_Type );  $_IlLfj = _L00RE($SSID,$inc_dir,$CONF);  if( _L0OPO( $inc_dir,$SSID,$CONF ) == True ) {    $_IlClj = _OFPAC($inc_dir, $CONF['TableNameTicket'], 'Store_id', 'ID = "'.$Ticket_ID.'"' );    $_IlLfj[1] = $_IlClj[0];  }   $_jjJCf = $CONF["DefaultValuesStoreName".$_IlLfj[1]."Date"];  $_jj6oj = $CONF["DefaultValuesStoreName".$_IlLfj[1]."TimeZone"];  $_jjf66 = $CONF["DefaultValuesStoreName".$_IlLfj[1]."TimeZoneSign"];  $_jjfOj = $CONF["DefaultValuesStoreName".$_IlLfj[1]."DayLightSavings"];  $_jt1l8 = _OF18E("$_jjf66","$_jj6oj","$_jjfOj","Y-m-d H:i:s");    $CheckedIn = $_jt1l8;   if( isset($_POST['BackStop']) ) { $BackStop = mysql_real_escape_string($_POST['BackStop']); }   if( isset($_POST['AppendTo']) ) { $_JJfto = mysql_real_escape_string($_POST['AppendTo']); } else { $_JJfto = Null; }   if( isset($_POST['Custom_ticket_id']) ) { $_j61Oj = mysql_real_escape_string($_POST['Custom_ticket_id']); } else { $_j61Oj = Null; }   if( isset($_POST['chkGuestKey']) ) { $_J0LOL = mysql_real_escape_string($_POST['chkGuestKey']); }   if( isset($_POST['User_ID']) ) { $User_ID = mysql_real_escape_string($_POST['User_ID']); }   if( $_J0LOL == 1 ) {     $GuestKey = strtoupper(_OFFRJ(10));    }   _OE6QO($CONF['TableNameTicket'],$BackStop,$CONF["BackStopCont"]);    if( _OFFR1($CONF, $Service_Type) == False && $_JJfQo == False ) {    $_JJ888 = ltrim($_j6Jot);      $_JJ888 = rtrim($_JJ888);    if( strcmp( $_JJ888, "00-0-00") == 0 ) { die('<img src="'.ERROR_IMG.'" width="22" height="11" /> You are trying to create an onsite ticket without a date, <a href ="javascript:history.back()">Please Go Back to Correct your error.</a>'); }   }   if( $_J11t1 != $Store_id ) {   $Store_id = $_J11t1;  }  if ( $Step == "Insert New Ticket" ) {   $row = Null;   $_JJt0o = Null;   if( $_JJfQo == True ) {    require_once $inc_dir.'/pro/new_contract_ticket.php';   } else {    require_once $inc_dir.'/new_ticket.php';   }    if ( count($_JJJoJ) > 0 ) {     if( isset($_SERVER['HTTPS']) ) {      if( $_SERVER['HTTPS'] == "on" ) { $_JJO0O = 'https://'; }    } else { $_JJO0O = 'http://'; }    $_JJO1Q = stripslashes($Service_Desc);    $_JJOfi = stripslashes($Item_required_parts);    $_JJOiI = stripslashes($Item_accessories);    $_JJO0O .= $_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'].'?Step=EditAddTicket&Ticket_ID='.$Ticket_ID;     $_j8OCL = "A new ticket has been added to the database and your expertise is required.\r\nPlease login to WorkOrder TS and check Ticket ID: $Ticket_ID \r\n$_JJO0O\r\nTicket Details:\r\n $_JJO1Q \r\n\r\nParts required:\r\n $_JJOfi \r\n\r\nAdditional Items:\r\n $_JJOiI \r\n";    $subject = "WorkOrder TS - New Ticket Notice ID: $Ticket_ID";    echo("<br />Sending E-Mail to requested recipients.... ".rtrim($_JJJoJ, ",")."<br />");    if( $CONF['EnableCheckinEmailSMTP'] == 1 ) {      smtp_mail($CONF,$_JJJoJ,$subject, $_j8OCL, NULL);    } else {     php_mail($CONF,$_JJJoJ,$subject, $_j8OCL, NULL);    }     }   }  if ( $Step == "Save Changes" ) {   if( stristr($Ticket_ID, 'sc') === False ) {    require $inc_dir.'save_ticket_changes.php';   } else {    require $inc_dir.'pro/save_super_ticket_changes.php';   }  }   if ( $Step == "Update Ticket" ) {   $_IlLfj = _L00RE($SSID,$inc_dir,$CONF);   if( _L0OPO( $inc_dir,$SSID,$CONF ) == True ) {    $_IlClj = _OFPAC($inc_dir, $CONF['TableNameTicket'], 'Store_id', 'ID = "'.$Ticket_ID.'"' );    $_IlLfj[1] = $_IlClj[0];   }    $_jjJCf = $CONF["DefaultValuesStoreName".$_IlLfj[1]."Date"];   $_jj6oj = $CONF["DefaultValuesStoreName".$_IlLfj[1]."TimeZone"];   $_jjf66 = $CONF["DefaultValuesStoreName".$_IlLfj[1]."TimeZoneSign"];   $_jjfOj = $CONF["DefaultValuesStoreName".$_IlLfj[1]."DayLightSavings"];   $_jt1l8 = _OF18E("$_jjf66","$_jj6oj","$_jjfOj","Y-m-d H:i:s");    if( $_JJfto == TRUE ) {    if( isset($_POST['UpdatedBy']) ) { $_JJoOC = mysql_real_escape_string($_POST['UpdatedBy']);     } else {      $sql = "select User_ID,User_name from ".$CONF['TableNameUsers'].",".$CONF['TableNameUsersLogin']." WHERE ".$CONF['TableNameUsers'].".User_ID = ".$CONF['TableNameUsersLogin'].".Login_USER_ID AND ".$CONF['TableNameUsersLogin'].".Login_ssid='$SSID'";     $res = mysql_query($sql,$conn) or die("</select>Unable to get Authenticated User Error: 43536<br>$sql");     $row = mysql_fetch_array($res);     $_JJoOC = $row['User_name']; }    $sql = "select Service_Desc,CheckedInBy,assigned_tech_id from ".$CONF['TableNameTicket']." WHERE ID='$Ticket_ID'";    $res = mysql_query( $sql, $conn) or die("Unable to get the old Service_Performed to append. Please Print this out!<br>Error: 73264eujh<br>SQL: $sql");    $row = mysql_fetch_array($res);    if( empty($Service_Desc) ) {     $_JJoOL = mysql_real_escape_string($row['Service_Desc']);    }    else {     $_JJoOL = mysql_real_escape_string($row['Service_Desc'])."\n--------------------\n"."$Service_Desc"."\n&nbsp;Last Updated by $_JJoOC on ".$_jt1l8."\n";    }     $Service_Desc = $_JJoOL;    $CheckedInBy = $row['CheckedInBy'];    $assigned_tech_id = $row['assigned_tech_id'];    $sql = "select Item_accessories,Item_required_parts,Item_make,Item_model from ".$CONF['TableNameItem']." WHERE Item_ticket_id='$Ticket_ID'";    $res = mysql_query( $sql, $conn) or die("Unable to get the old Item_accessories to append. Please Print this out!<br>Error: 73264eujh<br>SQL: $sql");    $row = mysql_fetch_array($res);    if( empty($Item_accessories) ) {     $_JJCOf = mysql_real_escape_string($row['Item_accessories']);    }    else {     $_JJCOf = mysql_real_escape_string($row['Item_accessories'])."\n--------------------\n"."$Item_accessories"."\n&nbsp;Last Updated by $_JJoOC on ".$_jt1l8."\n";    }     $Item_accessories = $_JJCOf;    if( empty($Item_required_parts) ) {     $_JJCoj = mysql_real_escape_string($row['Item_required_parts']);    }    else {     $_JJi00 =  mysql_real_escape_string($row['Item_required_parts']);     if( !empty($Item_required_parts) ) {      $_JJCoj =  $_JJi00."\n--------------------\n".$Item_required_parts."\n&nbsp;Last Updated by $_JJoOC on ".$_jt1l8."\n";     }    }     $Item_required_parts = $_JJCoj;    $Item_make = mysql_real_escape_string($row['Item_make']);    $Item_model = mysql_real_escape_string($row['Item_model']);   }   $sql = "Update ".$CONF['TableNameItem']." SET Item_make='$Item_make',Item_model='$Item_model',Item_required_parts='$Item_required_parts',Item_accessories='$Item_accessories' WHERE Item_ticket_id='$Ticket_ID'";   mysql_query($sql, $conn) or die("Update ".$CONF['TableNameItem']." FAILED<br>SQL: $sql<br>".mysql_error());   if( ($_j61Oj) && $CONF['EnableCustomTicketID'] == 1 ) {    $_j61Oj = strtoupper($_j61Oj);    $_j6QQo = 'Update '.$CONF['TableNameTicket'].' SET Custom_ticket_id = ""   WHERE Custom_ticket_id = "'.$_j61Oj.'"';    $_j6QlO = mysql_query( $_j6QQo, $conn) or die("Unable to clear of Custom_ticket_id $sql");   }    $_JJiIC = Null;    if( $assigned_tech_id ) {     $_JJiIC = ",assigned_tech_id='$assigned_tech_id'";   } else {    $_JJiIC = ",assigned_tech_id= NULL";   }    $sql = "update ".$CONF['TableNameTicket']." SET Service_Desc='$Service_Desc',Service_Type='$Service_Type', BackStop='$BackStop', Custom_ticket_id ='$_j61Oj', CheckedInBy='$CheckedInBy' $_JJiIC  WHERE ID='$Ticket_ID'";    $res = mysql_query($sql, $conn) or die("Update ".$CONF['TableNameTicket']." failed<br>SQL: $sql<br>mysql_error($conn)");   if( isset($_j6Jot) == True && $_j6Jot != '--00' && $_j6Jot != ' --00' && isset($User_ID) == True ) {    $_JJijI = 'update '.$CONF['TableNameTicket'].' set OnsiteScheduled="'.$_j6Jot.'",OnsiteTechID="'.$User_ID.'" where ID="'.$Ticket_ID.'" ';    $_JJL0o = mysql_query($_JJijI, $conn) or die("Unable to Update Onsite Date. Error Code 2794724<br>$_JJijI");   }  if ( isset($res) ) {   echo('<a href="workorder.php?Step=EditAddTicket&amp;Print=Ticket&amp;Ticket_ID='.$Ticket_ID.'&amp;Customer_ID='.$Customer_ID.'&amp;SSID='.$SSID.'">Print Ticket</a><br>   <a href="workorder.php?Step=EditAddTicket&amp;Ticket_ID='.$Ticket_ID.'&amp;SSID='.$SSID.'">Go To Ticket</a>');  }    if ( count($_JJJoJ) > 0 ) {     if( isset($_SERVER['HTTPS']) ) {      if( $_SERVER['HTTPS'] == "on" ) { $_JJO0O = 'https://'; }    } else { $_JJO0O = 'http://'; }    $_JJO1Q = stripslashes($Service_Desc);    $_JJOfi = stripslashes($Item_required_parts);    $_JJOiI = stripslashes($Item_accessories);    $_JJO0O .= $_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'].'?Step=EditAddTicket&Ticket_ID='.$Ticket_ID;     $_j8OCL = "A new ticket has been added to the database and your expertise is required.\r\nPlease login to WorkOrder TS and check Ticket ID: $Ticket_ID \r\n$_JJO0O\r\nTicket Details:\r\n $_JJO1Q \r\n\r\nParts required:\r\n $_JJOfi \r\n\r\nAdditional Items:\r\n $_JJOiI \r\n";    $subject = "WorkOrder TS - New Ticket Notice ID: $Ticket_ID";    echo("<br />Sending E-Mail to requested recipients.... ".rtrim($_JJJoJ, ",")."<br />");    if( $CONF['EnableCheckinEmailSMTP'] == 1 ) {      smtp_mail($CONF,$_JJJoJ,$subject, $_j8OCL, NULL);    } else {     php_mail($CONF,$_JJJoJ,$subject, $_j8OCL, NULL);    }     }   }   }  elseif( $Step == "View" ) {   $FormType = mysql_real_escape_string($_GET['FormType']);   $Customer_ID = mysql_real_escape_string($_GET['Customer_ID']);   if( $FormType == "CustomerDetail" ) { _OE8LR($Customer_ID , $CONF); }   }   elseif ( $Step == "FindCustomer" ) {   if( isset($_GET['CustomerSearchString']) ) { $_J0o1J = mysql_real_escape_string($_GET['CustomerSearchString']);}   $_JJl0j = explode(" ", $_J0o1J);   $_JJlQj = count($_JJl0j);    if( isset($_POST['InsertFirst']) ) { $_J0oll = mysql_real_escape_string($_POST['InsertFirst']); }   if( $_J0oll == "True" ) {    if( $_J0oll == "True" ) {     $_J0C10 = _OERE0($CONF,$SSID);    }    if( isset($_J0C10) ) {    }    else {     die("Error during insert");    }   }   if( $_JJlQj == 1 ) { _OED0L($_J0C10,$inc_dir,$SSID,$CONF); }   elseif( $_JJlQj > 1 ) { _OECFF($inc_dir,$CONF); }  }  elseif ( $Step == "EditAddTicket" ) {   require $inc_dir.'postvars.inc.php';   if( isset($_POST['holder']) ) { $_J0I1C = mysql_real_escape_string($_POST['holder']); }   if( isset($_GET['serv_cont']) ) { $serv_cont = $_GET['serv_cont']; } else { $serv_cont = Null; }   if( isset($_GET['Customer_ID']) ) { $Customer_ID = mysql_real_escape_string($_GET['Customer_ID']); }   if( isset($_GET['Ticket_ID']) ) { $Ticket_ID = mysql_real_escape_string($_GET['Ticket_ID']); }   if( isset($_GET['View']) ) { $View = mysql_real_escape_string($_GET['View']); }   if( isset($_GET['Ticket_ID']) ) { $Ticket_ID = mysql_real_escape_string($_GET['Ticket_ID']); }   if( isset($_GET['Update']) ) { $Update = mysql_real_escape_string($_GET['Update']); }   $BackStop = date('mjYHis').rand(0, 99999);   if( is_numeric($Customer_ID) ) {   }   else {     if( is_numeric($Ticket_ID) ) {     if( is_numeric($Ticket_ID) == FALSE ) { die("The Ticket ID must be a number"); }     $_J601j = "select Customer_ID from ".$CONF['TableNameTicket']." where ID='$Ticket_ID'";     $_J60oQ = mysql_query( $_J601j, $conn) or die("Error getting customer Code: 4534ds");     $_J61j6 = mysql_num_rows($_J60oQ);      $_J6QQL = mysql_fetch_array($_J60oQ);     if( $_J61j6 < 1 && $CONF['EnableCustomTicketID'] != 1 ) {       die("Unable to find a ticket with ID: $Ticket_ID");      } elseif( $_J61j6 < 1 && $CONF['EnableCustomTicketID'] == 1 && strtolower(substr( $_GET['Ticket_ID'], 0,2)) != 'sc' ) {      $_J601j = "select ID,Customer_ID from ".$CONF['TableNameTicket']." where Custom_ticket_id='$Ticket_ID'";      $_J60oQ = mysql_query( $_J601j, $conn) or die("Error getting customer Code: 4535ds");      $_J6QQL = mysql_fetch_array($_J60oQ);      $Customer_ID = $_J6QQL['Customer_ID'];      $Ticket_ID = $_J6QQL['ID'];      if( is_numeric($Customer_ID) == False ) { die("No Customer or Ticket found, if this is unexpected Error 3455kh"); }     }      $Customer_ID = $_J6QQL['Customer_ID'];     if( is_numeric($Customer_ID) == False &&  $CONF['EnableCustomTicketID'] != 1 ) { die("No Customer or Ticket found, if this is unexpected Error 3453kh"); }    } else{     if( $Ticket_ID != "" && $CONF['EnableCustomTicketID'] == 1 && strtolower(substr( $_GET['Ticket_ID'], 0,2)) != 'sc' ) {      $Ticket_ID = strtoupper($Ticket_ID);       $_J601j = "select ID,Customer_ID from ".$CONF['TableNameTicket']." where Custom_ticket_id='$Ticket_ID'";      $_J60oQ = mysql_query( $_J601j, $conn) or die("Error getting customer Code: 4534ds");      $_J6QQL = mysql_fetch_array($_J60oQ);      $Customer_ID = $_J6QQL['Customer_ID'];      $Ticket_ID = $_J6QQL['ID'];      if( is_numeric($Customer_ID) == False ) { die("No Customer or Ticket found, if this is unexpected Error 3454kh"); }     } elseif( strtolower(substr( $Ticket_ID, 0,2)) == 'sc') {       $Ticket_ID = Null;       $_J6Q86 = $_GET['Ticket_ID'];      $serv_cont = 1;       $_JjjLt = substr($_J6Q86, 2);      $_J601j = "select ".$CONF['TableNameContractSuperTickets'].".*,DATE_FORMAT(created, '$confLocalFormatTime') AS CheckedIn,".$CONF['TableNameUsers'].".User_Name from ".$CONF['TableNameContractSuperTickets'].",".$CONF['TableNameUsers']." where ".$CONF['TableNameUsers'].".User_ID = ".$CONF['TableNameContractSuperTickets'].".created_by AND ".$CONF['TableNameContractSuperTickets'].".ID='$_JjjLt'";      $_J60oQ = mysql_query( $_J601j, $conn) or die("Error getting customer Code: 45366ds<br />$_J601j<br />".mysql_error($conn));      $_J6QQL = mysql_fetch_array($_J60oQ);      $Customer_ID = $_J6QQL['Customer_ID'];      if( is_numeric($_J6QQL['Customer_ID']) == False ) { die("No Service Contract found, if this is unexpected Error 3454khl"); }      $Status_id = $_J6QQL['status_id'];      $Service_Type = $_J6QQL['service_type'];      $CheckedInBy = $_J6QQL['User_Name'];      $TicketStore_id = $_J6QQL['store_id'];      $Service_Desc = $_J6QQL['service_desc'];      $Service_Performed = $_J6QQL['service_performed'];      $Tech_Notes = $_J6QQL['Tech_Notes'];     } else { Die("Unable to Search, missing Ticket ID"); }    }   }   if( is_numeric($Ticket_ID) ) {    if( $IsCustomerLogin == 1 ) {      $_J6ICO = _L0O0D($inc_dir, $SSID, $CONF);     if( $_J6ICO == 0 ) { die("Error, unable to validate customer ticket. E:342fs"); }     if( _L0OEF($inc_dir , $_J6ICO , $Ticket_ID, $CONF) == False ) {      die("Invalid Ticket ID for your customer account, please check your entry");     }    }     if( $CONF['EnableAssignTechsTicketLock'] == 1 ) {      if( _L01LO($SSID,$inc_dir,5,$CONF) == False && $IsCustomerLogin != 1 ){       if( _OF1QO($inc_dir , $SSID , $Ticket_ID, $CONF) == False ) {       die("You are not assigned to this Ticket, please check your entry");      }      }     }    }   else{     if( is_numeric($Customer_ID) AND $View != "NewTicket" ) {      if( is_numeric($Customer_ID) == FALSE ) { die("The Customer ID must be a number"); }     $_J6Ii1 = "select ID from ".$CONF['TableNameTicket']." where Customer_ID='$Customer_ID'";     $_J6j01 = mysql_query( $_J6Ii1, $conn) or die("Error getting customer Code: 4534ds");     $_J6jLO = mysql_fetch_array($_J6j01);     $Ticket_ID = $_J6jLO['ID'];    }   }   if ( is_numeric($Customer_ID) ) {    $sql="select *,DATE_FORMAT(Date_edit, '$confLocalFormatTime') AS Date_added from ".$CONF['TableNameCustomers']." where (BBus_name LIKE '%$_J0o1J%' OR BName_first like '%$_J0o1J%' OR BName_last like '%$_J0o1J%') AND (ID=$Customer_ID) ";    if ( is_numeric($Ticket_ID) && $serv_cont == Null ) {     $_J6Ii1 = "select ".$CONF['TableNameTicket'].".*,DATE_FORMAT(CheckedIn, '$confLocalFormatTime') AS CheckedIn,DATE_FORMAT(`OnsiteScheduled`, '$confLocalFormatTime') AS OnsiteScheduled,".$CONF['TableNameUsers'].".User_Name from ".$CONF['TableNameTicket'].",".$CONF['TableNameUsers']." where ".$CONF['TableNameUsers'].".User_ID = ".$CONF['TableNameTicket'].".CheckedInBy AND ".$CONF['TableNameTicket'].".ID='$Ticket_ID'";     $_J6j01 = mysql_query( $_J6Ii1, $conn) or die("SQL45782: $_J6Ii1");     $_J6jLO = mysql_fetch_array($_J6j01);     $TicketStore_id = $_J6jLO['Store_id'];     $_J6JjQ = "select * from ".$CONF['TableNameItem']." where Item_ticket_id='$Ticket_ID'";     $_J6J6L = mysql_query( $_J6JjQ, $conn) or die("SQL: $_J6JjQ <br>mysql_Error($conn)<br>");     $_J66Jt = mysql_fetch_array($_J6J6L);     $Item_make = $_J66Jt['Item_make'];     $Item_model = $_J66Jt['Item_model'];     $Item_accessories = $_J66Jt['Item_accessories'];     $TicketGuestKey = $_J6jLO['GuestKey'];     $Item_required_parts = $_J66Jt['Item_required_parts'];     $Service_Desc = $_J6jLO['Service_Desc'];     $UpService_Desc = $_J6jLO['Service_Desc'];     $AppDate = $_J6jLO['OnsiteScheduled'];     $CheckedInBy = $_J6jLO['User_Name'];      $CheckedIn = $_J6jLO['CheckedIn'];     $Service_Type = $_J6jLO['Service_Type'];     $Status_id = $_J6jLO['Status_id'];     $assigned_tech_id = $_J6jLO['assigned_tech_id'];     $_J68jj = _OFPJ6($inc_dir, $CONF['TableNameUsers'], '`User_name`', '`User_ID` = "'.$assigned_tech_id.'" ' );     $assigned_tech = $_J68jj[0];     unset($_J68jj);     $Service_Performed = $_J6jLO['Service_Performed'];     $Tech_Notes = $_J6jLO['Tech_Notes'];     $GuestKey = $_J6jLO['GuestKey'];     if( isset($_J6jLO['Custom_ticket_id']) == True ) { $CustomTicketID = $_J6jLO['Custom_ticket_id']; } else { $CustomTicketID = Null; }     if( isset($CustomTicketID) == False ) { $CustomTicketID = Null; }    }    $_j6f0I = mysql_query( $sql,$conn) or die("no Code:654<br>$sql");    $_j0l0C=0;    while( $row = mysql_fetch_array($_j6f0I) ) {     $Customer_ID = $row['ID'];     $BBus_name = $row['BBus_name'];     $BBus_cont = $row['BBus_cont'];     $BName_first = $row['BName_first'];     $BName_last = $row['BName_last'];     $BStreet = $row['BAddress1'];     $BAddress2 = $row['BAddress2'];     if( $BAddress2 != "" ) {       if( is_numeric($BAddress2) ) {       $BAddress2 = "\n Unit: ".$row['BAddress2']; }      else{       $BAddress2 = "\n ".$row['BAddress2']; }     }     $_J18Ol = $row['BAddress3'];     $BPhone1 = $row['BPhone1'];     $BPhone2 = $row['BPhone2'];     $BMobile1 = $row['BMobile1'];     $BMobile2 = $row['BMobile2'];     $BOffice1 = $row['BOffice1'];     $BOffice2 = $row['BOffice2'];     $BCity = $row['BCity'];     $BState = $row['BState'];     $BZip = $row['BZip'];     $_J6O0l = $row['Date_added']; }     if ( strlen($BBus_name) >= 1 ) {      $BName = $BBus_name;     }     elseif ( strlen($BName_first) >= 1 AND strlen($BName_last) >= 1 ) {      $BName = $BName_last.", ".$BName_first;     }     else{ die("Could not determine which name to display"); }   }   if( _L0OPO( $inc_dir,$SSID,$CONF ) == True ) {    if( $Customer_ID != _L0O0D($inc_dir, $SSID, $CONF) ) {     die("This is not your ticket, please contact support and tell them how you got here. Thank you....");    }   }   $disp_ticket_id = strtoupper($_GET['Ticket_ID']);   $disp_ssid = $SSID;   $disp_custom_ticket_id = $CustomTicketID;   $disp_job_status = GetStatusAsString2($inc_dir,$CONF, $Status_id);   $disp_serv_type = GetServiceType($CONF, $Service_Type);   $disp_checkedin_by = $CheckedInBy;   $GetThis = ("StoreName$TicketStore_id");   $disp_storename = $CONF[$GetThis];   $disp_customer_name = $BName;   $disp_is_serv_contr = $serv_cont;   $disp_store_id = $Store_id;   $disp_customer_id = $Customer_ID;  $GoogleSAddress = $CONF["GoogleAddress$Store_id"];  $_J6itj = urlencode($BStreet);  $GoogleSAddress = urlencode($GoogleSAddress);  $GoogleDAddress = htmlentities(str_replace( " ", "+", $_J6itj )).",+".$BZip;  $GoogleSAddress = htmlentities(str_replace( " ", "+", $GoogleSAddress ));   $disp_address = '<a href="http:&#47;&#47;'.$CONF['MappingService'].'&#47;maps?daddr='.$GoogleDAddress.'&saddr='.$GoogleSAddress.'" target="_blank&amp;SSID='.$SSID.'">'.$BStreet.$BAddress2."<br />$BCity, $BState $BZip </a>";   $disp_service_desc = nl2br(htmlentities($Service_Desc));   $disp_serv_performed = ServiceAsTable("204, 255, 255","Service Performed",$Service_Performed);   $disp_tech_notes = ServiceAsTable("255,255,224","Internal Tech Notes",$Tech_Notes);   $disp_phone = Null;   if ( strlen($BPhone1) > 1 ) { $disp_phone .= 'Phone: '.$BPhone1.'<br />'; }   if ( strlen($BPhone2) > 1 ) { $disp_phone .= 'Phone: '.$BPhone2.'<br />'; }   if ( strlen($BMobile1) > 1 ) { $disp_phone .= 'Mobile: '.$BMobile1.'<br />'; }   if ( strlen($BMobile2) > 1 ) { $disp_phone .= 'Mobile: '.$BMobile2.'<br />'; }   if ( strlen($BOffice1) > 1 ) { $disp_phone .= 'Office: '.$BOffice1.'<br />'; }   if ( strlen($BOffice2) > 1 ) { $disp_phone .= 'Office: '.$BOffice2.'<br />'; }   $disp_customer_name = Null;   if ( $BBus_name ) {    $disp_customer_name .= '<small>Business Name:     </small><br /><a href="workorder.php?Step=View&amp;FormType=CustomerDetail&amp;Customer_ID='.$Customer_ID.'&amp;SSID='.$SSID.'">'.$BBus_name.'</a><br />';   }   if ( $BBus_cont ) {    $disp_customer_name .= '<small>Business Contact: <br />    </small>'.$BBus_cont.'<br />';   }   if ( $BName_last AND $BName_first ) {    $disp_customer_name .= '<a href="workorder.php?Step=View&amp;FormType=CustomerDetail&amp;Customer_ID='.$Customer_ID.'&amp;SSID='.$SSID.'">'.$BName_last.', '.$BName_first.'</a>';   }   if( $serv_cont == 1 && strcmp($View, 'NewTicket') != 0 ) {     require 'skins/'.$CONF['SkinPath'].'/frmTicket.php';   } else {    require 'skins/'.$CONF['SkinPath'].'/frmNewUpTicket.php';   }   if ( is_string($Print) && $Print != "" ) { echo('<a href="workorder.php?Sortby=checkindate&amp;Or=a&amp;Fb=1&amp;SSID='.$SSID.'">Done</a>'); }  }  else {  $sql = "NO COMMAND";  if ( is_numeric($_J0OI6) ) {   if( $CONF['EnableAssignTechsTicketLock'] == 1 ) {     require_once $inc_dir."workorder_function_getusersettings.inc.php";    if( _L01LO($SSID,$inc_dir,5,$CONF) == False ) {      $_JQLto = ' AND `assigned_tech_id` = "'.$aUserSettings[3].'" ';     } else {     $_JQLto = Null;    }     } else {    $_JQLto = Null;   }    $sql = "select ".$CONF['TableNameCustomers'].".BName_first,    ".$CONF['TableNameCustomers'].".ID AS Customers_ID,    ".$CONF['TableNameCustomers'].".BBus_name,    ".$CONF['TableNameCustomers'].".BBus_cont,    ".$CONF['TableNameCustomers'].".BName_last,    ".$CONF['TableNameTicket'].".Item_ID,    ".$CONF['TableNameTicket'].".ID,    ".$CONF['TableNameTicket'].".Service_Type,    ".$CONF['TableNameTicket'].".Service_Desc,    ".$CONF['TableNameTicket'].".Service_Performed,    date_format(".$CONF['TableNameTicket'].".CheckedIn,'$confLocalFormatTime') as strLocalFormatTime,    ".$CONF['TableNameTicket'].".Call_cust1,    ".$CONF['TableNameTicket'].".Call_cust2,    ".$CONF['TableNameTicket'].".Call_cust3,    ".$CONF['TableNameTicket'].".Call_cust4,    ".$CONF['TableNameTicket'].".Custom_ticket_id,    ".$CONF['TableNameTicket'].".Status_id from ".$CONF['TableNameTicket'].", ".$CONF['TableNameCustomers']." where ".$CONF['TableNameTicket'].".Customer_ID = ".$CONF['TableNameCustomers'].".ID AND ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Status_id=\"$_J0OI6\" $_JQLto ORDER BY ".$CONF['TableNameTicket'].".CheckedIn ASC"; }    $_Jf0QL = Null;     $_Jf0jj = 'SELECT ID from '.$CONF['TableNameServiceTypes'].' WHERE `serv_onsite` = "1"';    $_Jf1Io = mysql_query($_Jf0jj, $conn) or die("Unable to get Service Types");    while( $_Jf1fO = mysql_fetch_array($_Jf1Io) ) {     $_Jf1lQ = $_Jf1fO['ID'];     if( $_Jf0QL == Null ) { $_Jf0QL = ' AND ( '; }      $_Jf0QL .= $CONF['TableNameTicket'].'.Service_Type="'.$_Jf1lQ.'" OR ';     }     $_Jf0QL = rtrim($_Jf0QL, " ");     $_Jf0QL = rtrim($_Jf0QL, "R");     $_Jf0QL = rtrim($_Jf0QL, "O");     $_Jf0QL .= ' ) ';     $_JfQji = Null;     $_Jf0jj = 'SELECT ID from '.$CONF['TableNameServiceTypes'].' WHERE `serv_instore` = "1"';    $_Jf1Io = mysql_query($_Jf0jj, $conn) or die("Unable to get Service Types Instore sdasd");    while( $_Jf1fO = mysql_fetch_array($_Jf1Io) ) {     $_JfQ6C = $_Jf1fO['ID'];     if( $_JfQji == Null ) { $_JfQji = ' AND ( '; }      $_JfQji .= $CONF['TableNameTicket'].'.Service_Type="'.$_JfQ6C.'" OR ';     }     $_JfQji = rtrim($_JfQji, " ");     $_JfQji = rtrim($_JfQji, "R");     $_JfQji = rtrim($_JfQji, "O");     $_JfQji .= ' ) ';     if( $Sortby == "onsite" ) { $_JfQf8 = $_Jf0QL; }     else{ $_JfQf8 = $_JfQji; }     $_JfIIl = Null;     $_Jf0jj = 'SELECT ID from '.$CONF['TableNameServiceTypes'].' WHERE `serv_expedited` = "1"';    $_Jf1Io = mysql_query($_Jf0jj, $conn) or die("Unable to get List of expedited service types sdasd");    while( $_Jf1fO = mysql_fetch_array($_Jf1Io) ) {     if( $_JfIIl == Null ) {       $_JfIIl = " AND ";       $_JfIIl .= ' ( ';     }      $_JfItl = $_Jf1fO['ID'];     $_JfIIl .= $CONF['TableNameTicket'].'.Service_Type="'.$_JfItl.'" OR ';     }     if( $_JfIIl != Null ) {      $_JfIIl = rtrim($_JfIIl, " ");      $_JfIIl = rtrim($_JfIIl, "R");      $_JfIIl = rtrim($_JfIIl, "O");      $_JfIIl .= ' ) ';     }     $_Jfjfj = "select ".$CONF['TableNameCustomers'].".BName_first,      ".$CONF['TableNameCustomers'].".ID AS Customers_ID,      ".$CONF['TableNameCustomers'].".BBus_name,      ".$CONF['TableNameCustomers'].".BBus_cont,      ".$CONF['TableNameCustomers'].".BName_last,      ".$CONF['TableNameTicket'].".Item_ID,      ".$CONF['TableNameTicket'].".ID,      ".$CONF['TableNameTicket'].".Service_Type,      ".$CONF['TableNameTicket'].".Service_Desc,      ".$CONF['TableNameTicket'].".Service_Performed,      date_format(".$CONF['TableNameTicket'].".CheckedIn,'$confLocalFormatTime') as strLocalFormatTime,      ".$CONF['TableNameTicket'].".Call_cust1,      ".$CONF['TableNameTicket'].".Call_cust2,      ".$CONF['TableNameTicket'].".Call_cust3,      ".$CONF['TableNameTicket'].".Call_cust4,      ".$CONF['TableNameTicket'].".Custom_ticket_id,      ".$CONF['TableNameTicket'].".Status_id from ".$CONF['TableNameTicket'].", ".$CONF['TableNameCustomers']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Customer_ID = ".$CONF['TableNameCustomers'].".ID AND ".$CONF['TableNameTicket'].".Status_id!=8 AND ".$CONF['TableNameTicket'].".Status_id=\"$_J0OI6\" $_JfQf8 $_JfIIl $_JQLto ORDER BY ".$CONF['TableNameTicket'].".CheckedIn ASC";    $_Jfjt1 = mysql_query( $_Jfjfj, $conn) or die("Unable to query for Expedited Tickets.<br>ERROR: 4325hdf<br>exp_sql: $_Jfjfj <br />".mysql_error());    $_JfjlJ = mysql_num_rows($_Jfjt1);    if( _L0OPO( $inc_dir,$SSID,$CONF ) == True || $_JfIIl == Null ) {      $_JfjlJ = 0;     }     if( $_JfjlJ > 0 ) {  $_Jfjt1 = mysql_query($_Jfjfj, $conn) or die("Problem Detected, Error Code 6574568<br>SQL:<br>$_Jfjfj");  $_JfjlJ = mysql_num_rows($_Jfjt1);  echo("Expedited Tickets Shown In Red, found: $_JfjlJ");  echo('<table style="width:100%;text-align:left;" border="0" cellpadding="2" cellspacing="0"><tbody>');   while ( $_JfJif = mysql_fetch_array($_Jfjt1) ) {    $Customer_ID = $_JfJif['Customers_ID'];    $BName_first = $_JfJif['BName_first'];    $BBus_name = $_JfJif['BBus_name'];    $BBus_cont = $_JfJif['BBus_cont'];    $BName_last = $_JfJif['BName_last'];    $Service_Type = $_JfJif['Service_Type'];    $Service_Desc = $_JfJif['Service_Desc'];    $Service_Performed = $_JfJif['Service_Performed'];    $CheckedIn = $_JfJif['strLocalFormatTime'];    $_Jf6C6 = $_JfJif['Call_cust1'];    $_Jfft6 = $_JfJif['Call_cust2'];    $_JffoI = $_JfJif['Call_cust3'];    $_Jf8Qi = $_JfJif['Call_cust4'];    $Status_id = $_JfJif['Status_id'];    $Ticket_ID = $_JfJif['ID'];    $_Jft0C = "select Item_make,Item_model,Item_accessories,Item_required_parts from ".$CONF['TableNameItem']." where Item_customer_id='$Customer_ID' and Item_ticket_id='$Ticket_ID'";    $_JftOt = mysql_query($_Jft0C, $conn) or die("Error Getting item description mysql_error($conn)");    $_Jfto0 = mysql_fetch_array($_JftOt);    $Item_make = $_Jfto0['Item_make'];    $Item_model = $_Jfto0['Item_model'];    $Item_accessories = $_Jfto0['Item_accessories'];    $Item_required_parts = $_Jfto0['Item_required_parts'];    $ShowCustomer = "";    $_JfO1l = "";    $Computer_string = "<small>Make: $Item_make, Model: $Item_model</small>";    if ( $BBus_name ) {     $ShowCustomer .= '<small>Business Name:      </small><br><a href="workorder.php?Step=EditAddTicket&amp;Ticket_ID='.$Ticket_ID.'&amp;Customer_ID='.$Customer_ID.'&amp;SSID='.$SSID.'">'.$BBus_name.'</a><br>';    }    if ( $BBus_cont ) {     $ShowCustomer .= '<small>Business Contact: <br>     </small><a href="workorder.php?Step=EditAddTicket&amp;Ticket_ID='.$Ticket_ID.'&amp;Customer_ID='.$Customer_ID.'&amp;SSID='.$SSID.'">'.$BBus_cont.'</a><br>';    }    if ( $BName_last AND $BName_first ) {     $ShowCustomer .= '<small>Customer Name:      </small><br><a href="workorder.php?Step=EditAddTicket&amp;Ticket_ID='.$Ticket_ID.'&amp;Customer_ID='.$Customer_ID.'&amp;SSID='.$SSID.'">'.$BName_last.', '.$BName_first.'</a><br>';    }    $ShowServiceType = GetServiceType($CONF, $Service_Type);    $JobStatus = _OEC1E($CONF, $Status_id,"", "None", $Service_Type);    echo(' <tr>     <td style="width:400px;vertical-align:top;background-color:rgb(255,102,102);">     <table style="text-align:left;width:400px;" border="1" cellpadding="2" cellspacing="2">     <tbody>     <tr>     <td style="vertical-align:top;">');       if ( is_numeric($Ticket_ID) ) { echo('Ticket: <big>'.$Ticket_ID.'</big>'); }      echo('<br>Checked In:<br>'.$CheckedIn.'</small>     </td>     <td style="vertical-align:top;">'.$ShowCustomer.'</td>     </tr>     <tr>     <td style="vertical-align:top;"><small>Job Status: </small><font style="color:blue;background-color:rgb(51,255,51);">'.$JobStatus.'</font><br>        <small>Service Type: </small>'.$ShowServiceType.'     </td>     <td style="vertical-align:top;"><br>     </td>     </tr>     <tr>     <td style="vertical-align:top;">'.$Computer_string.'<br>     </td>     <td style="vertical-align:top;"><br></td>     </tr>     </tbody>     </table>     </td>     <td style="vertical-align:top;background-color:rgb(255,102,102);"><small><b>Service Description</b></small><br>     '.$Service_Desc.'');    if( strlen($Item_accessories) >= 1 ) { echo('     <div style="text-align:center;"><img alt="" src="./grfx/spacer.png" style="width:200px;height:2px;"></div>     <small><b>Additional Items Checked In</b></small><br>     '.nl2br($Item_accessories).''); }    if( strlen($Item_required_parts) >= 1 ) { echo('     <div style="text-align:center;"><img alt="" src="./grfx/spacer.png" style="width:200px;height:2px;"></div>     <small><b>Items Required For Repair</b></small><br>     '.nl2br($Item_required_parts)); }    echo('     </td>     </tr>     <tr>     <td style="vertical-align:top;"><br>     </td>     <td style="vertical-align:top;"><br>     </td>     </tr>');    }    echo(' </tbody>    </table>');  }   if( $Sortby == "onsite" ) {    $_Jf0QL = Null;     $_Jf0jj = 'SELECT ID from '.$CONF['TableNameServiceTypes'].' WHERE `serv_onsite` = "1"';    $_Jf1Io = mysql_query($_Jf0jj, $conn) or die("Unable to get Service Types");    while( $_Jf1fO = mysql_fetch_array($_Jf1Io) ) {     $_Jf1lQ = $_Jf1fO['ID'];     if( $_Jf0QL == Null ) { $_Jf0QL = ' AND ( '; }      $_Jf0QL .= $CONF['TableNameTicket'].'.Service_Type="'.$_Jf1lQ.'" OR ';     }     $_Jf0QL = rtrim($_Jf0QL, " ");     $_Jf0QL = rtrim($_Jf0QL, "R");     $_Jf0QL = rtrim($_Jf0QL, "O");     $_Jf0QL .= ' ) ';    if( $_J1L88 == "asc" || $_J1L88 == "a") {    $sql = "    select ".$CONF['TableNameCustomers'].".BName_first,     ".$CONF['TableNameCustomers'].".ID AS Customers_ID,     ".$CONF['TableNameCustomers'].".BBus_name,     ".$CONF['TableNameCustomers'].".BBus_cont,     ".$CONF['TableNameCustomers'].".BBus_cont_alt,     ".$CONF['TableNameCustomers'].".BName_last,     ".$CONF['TableNameCustomers'].".BPhone1,     ".$CONF['TableNameCustomers'].".BPhone2,     ".$CONF['TableNameCustomers'].".BMobile1,     ".$CONF['TableNameCustomers'].".BMobile2,     ".$CONF['TableNameCustomers'].".BOffice1,     ".$CONF['TableNameCustomers'].".BOffice2,     ".$CONF['TableNameTicket'].".Item_ID,     ".$CONF['TableNameTicket'].".ID,     ".$CONF['TableNameTicket'].".Custom_ticket_id,     ".$CONF['TableNameTicket'].".Service_Type,     ".$CONF['TableNameTicket'].".Service_Desc,     ".$CONF['TableNameTicket'].".Service_Performed,     date_format(".$CONF['TableNameTicket'].".CheckedIn,'$confLocalFormatTime') as strLocalFormatTime,     ".$CONF['TableNameTicket'].".Call_cust1,     ".$CONF['TableNameTicket'].".Call_cust2,     ".$CONF['TableNameTicket'].".Call_cust3,     ".$CONF['TableNameTicket'].".Call_cust4,     ".$CONF['TableNameTicket'].".Custom_ticket_id,     ".$CONF['TableNameTicket'].".Status_id from ".$CONF['TableNameTicket'].", ".$CONF['TableNameCustomers']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Customer_ID = ".$CONF['TableNameCustomers'].".ID AND ".$CONF['TableNameTicket'].".Status_id!=8 AND ".$CONF['TableNameTicket'].".Status_id=\"$_J0OI6\" $_Jf0QL ORDER BY ".$CONF['TableNameTicket'].".CheckedIn ASC";   } elseif( $_J1L88 == "desc" || $_J1L88 == "d" ) {    $sql = "    select ".$CONF['TableNameCustomers'].".BName_first,     ".$CONF['TableNameCustomers'].".ID AS Customers_ID,     ".$CONF['TableNameCustomers'].".BBus_name,     ".$CONF['TableNameCustomers'].".BBus_cont,     ".$CONF['TableNameCustomers'].".BBus_cont_alt,     ".$CONF['TableNameCustomers'].".BName_last,     ".$CONF['TableNameCustomers'].".BPhone1,     ".$CONF['TableNameCustomers'].".BPhone2,     ".$CONF['TableNameCustomers'].".BMobile1,     ".$CONF['TableNameCustomers'].".BMobile2,     ".$CONF['TableNameCustomers'].".BOffice1,     ".$CONF['TableNameCustomers'].".BOffice2,     ".$CONF['TableNameTicket'].".Item_ID,     ".$CONF['TableNameTicket'].".ID,     ".$CONF['TableNameTicket'].".Custom_ticket_id,     ".$CONF['TableNameTicket'].".Service_Type,     ".$CONF['TableNameTicket'].".Service_Desc,     ".$CONF['TableNameTicket'].".Service_Performed,     date_format(".$CONF['TableNameTicket'].".CheckedIn,'$confLocalFormatTime') as strLocalFormatTime,     ".$CONF['TableNameTicket'].".Call_cust1,     ".$CONF['TableNameTicket'].".Call_cust2,     ".$CONF['TableNameTicket'].".Call_cust3,     ".$CONF['TableNameTicket'].".Call_cust4,     ".$CONF['TableNameTicket'].".Custom_ticket_id,     ".$CONF['TableNameTicket'].".Status_id from ".$CONF['TableNameTicket'].", ".$CONF['TableNameCustomers']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Customer_ID = ".$CONF['TableNameCustomers'].".ID AND ".$CONF['TableNameTicket'].".Status_id=\"$_J0OI6\" OR ".$CONF['TableNameTicket'].".Service_Type=\"5\" ORDER BY ".$CONF['TableNameTicket'].".CheckedIn DESC"; }  }   if( $sql == "NO COMMAND" ) {    if( $Step == "newticket" ) {    echo('<p>You have selected the "New Ticket" option, WorkOrder TS associates all tickets to customers. To create a new ticket you need to find a customer using the "Find Customer" search box first or create a new customer by selecting "New Customer" from the Main Menu dropdown menu.<br />    <small>This message is here to inform WorkOrder TS users and can be removed via the "Config Menu" option in the control panel (pro only).<br />    You can find WorkOrder TS User guides here: <a href="http://www.workorderts.com/Virtual_Brain_Online/category/WorkOrder_TS_User_Guides/" target="_blank">WorkOrder TS User Guides</a></small></p>');   } else {    if( file_exists("$inc_dir/pro/config_downloads.php") == True ) {     if( _L0OPO( $inc_dir,$SSID,$CONF ) == False ) {      require $inc_dir.'pro/ticket_admin_overview.php';     }     require $inc_dir.'pro/ticket_overview.php';     include './skins/'.$CONF['SkinPath'].'/frmShopOverview.php';    } else {     require $inc_dir.'pro/ticket_admin_overview.php';     echo $disp_overview_table;    }    }  }  else {   if( $IsCustomerLogin == 1 ) {    $_J6ICO = _L0O0D($inc_dir, $SSID, $CONF);   if( $_J6ICO == 0 ) { die("Error, unable to validate customer user account. E:342fd"); }   $sql = "select ".$CONF['TableNameCustomers'].".BName_first,     ".$CONF['TableNameCustomers'].".ID AS Customers_ID,     ".$CONF['TableNameCustomers'].".BBus_name,     ".$CONF['TableNameCustomers'].".BBus_cont,     ".$CONF['TableNameCustomers'].".BBus_cont_alt,     ".$CONF['TableNameCustomers'].".BName_last,     ".$CONF['TableNameCustomers'].".BPhone1,     ".$CONF['TableNameCustomers'].".BPhone2,     ".$CONF['TableNameCustomers'].".BMobile1,     ".$CONF['TableNameCustomers'].".BMobile2,     ".$CONF['TableNameCustomers'].".BOffice1,     ".$CONF['TableNameCustomers'].".BOffice2,     ".$CONF['TableNameTicket'].".Item_ID,     ".$CONF['TableNameTicket'].".ID,     ".$CONF['TableNameTicket'].".Custom_ticket_id,     ".$CONF['TableNameTicket'].".Service_Type,     ".$CONF['TableNameTicket'].".Service_Desc,     ".$CONF['TableNameTicket'].".Service_Performed,     date_format(".$CONF['TableNameTicket'].".CheckedIn,'$confLocalFormatTime') as strLocalFormatTime,     ".$CONF['TableNameTicket'].".Call_cust1,     ".$CONF['TableNameTicket'].".Call_cust2,     ".$CONF['TableNameTicket'].".Call_cust3,     ".$CONF['TableNameTicket'].".Call_cust4,     ".$CONF['TableNameTicket'].".Status_id from ".$CONF['TableNameTicket'].", ".$CONF['TableNameCustomers']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Customer_ID = ".$CONF['TableNameCustomers'].".ID AND ".$CONF['TableNameCustomers'].".ID = $_J6ICO ORDER BY ".$CONF['TableNameTicket'].".CheckedIn DESC";  }   $res = mysql_query($sql, $conn) or die("Problem Detected, Error Code 3464687<br>SQL:<br>$sql");  $_JfOji = mysql_num_rows($res);  echo("Displaying $_JfOji Records.");  $_jQ1jo = "background-color: rgb(208, 243, 255);";   if( ini_get('safe_mode') != 1 ) {    set_time_limit(60);   }    while ( $row = mysql_fetch_array($res) ) {    $Customer_ID = $row['Customers_ID'];    $BName_first = $row['BName_first'];    $BBus_name = $row['BBus_name'];    $BBus_cont = $row['BBus_cont'];    $_J1ji1 = $row['BBus_cont_alt'];    $BName_last = $row['BName_last'];    $BPhone1 = $row['BPhone1'];    $BPhone2 = $row['BPhone2'];    $BMobile1 = $row['BMobile1'];    $BMobile2 = $row['BMobile2'];    $BOffice1 = $row['BOffice1'];    $BOffice2 = $row['BOffice2'];    if( isset($row['Computer_ID']) ) { $_JfoIo = $row['Computer_ID']; }    $Service_Type = $row['Service_Type'];    $Service_Desc = $row['Service_Desc'];    $Service_Performed = $row['Service_Performed'];    $CheckedIn = $row['strLocalFormatTime'];    $_Jf6C6 = $row['Call_cust1'];    $_Jfft6 = $row['Call_cust2'];    $_JffoI = $row['Call_cust3'];    $_Jf8Qi = $row['Call_cust4'];    $Status_id = $row['Status_id'];    $Ticket_ID = $row['ID'];    if( isset($row['Custom_ticket_id']) == True ) { $CustomTicketID = '<br />Custom ID: '.htmlentities($row['Custom_ticket_id']); } else { $CustomTicketID = Null; }    if( isset($CustomTicketID) == False ) { $CustomTicketID = Null; }    $_Jft0C = "select Item_make,Item_model,Item_accessories,Item_required_parts from ".$CONF['TableNameItem']." where Item_customer_id='$Customer_ID' and Item_ticket_id='$Ticket_ID'";    $_JftOt = mysql_query($_Jft0C, $conn) or die("Error Getting item description mysql_error($conn)");    $_Jfto0 = mysql_fetch_array($_JftOt);    if( isset($_Jfto0['Item_ID']) ) { $_j60Lt = $_Jfto0['Item_ID']; }    $Item_make = $_Jfto0['Item_make'];    $Item_model = $_Jfto0['Item_model'];    $Item_accessories = $_Jfto0['Item_accessories'];    $Item_required_parts = $_Jfto0['Item_required_parts'];    $ShowCustomer = "";    $_JfoOj = Null;    $_JfCjt = Null;    $_JfCjO = Null;    $_JfiIj = Null;    $_JfO1l = "";    $Computer_string = "<small>Make: $Item_make, Model: $Item_model</small>";    $_JfifO = '<a class="tlinks" href="workorder.php?Step=EditAddTicket&amp;Ticket_ID='.$Ticket_ID.'&amp;Customer_ID='.$Customer_ID.'&amp;SSID='.$SSID.'">';     if ( $BBus_name ) {     $_JfoOj .= $BBus_name;    }    if ( $BBus_cont ) {     $_JfCjt = $BBus_cont."&nbsp; &nbsp;".$_J1ji1;    }    if ( $BName_last AND $BName_first ) {     $_JfiIj .= $_JfifO.$BName_last.', '.$BName_first.'</a><br>';     $ShowCustomer .= $BName_last.', '.$BName_first.'<br>';    }    if( $BPhone1 ) {     $_JfCjO .= " P1:".$BPhone1."&nbsp;";    }    if( $BPhone2 ) {     $_JfCjO .= " P2:".$BPhone2."&nbsp;";    }    if( $BMobile1 ) {     $_JfCjO .= " M1:".$BMobile1."&nbsp;";    }    if( $BMobile2 ) {     $_JfCjO .= " M2:".$BMobile2."&nbsp;";    }    if( $BOffice1 ) {     $_JfCjO .= " O1:".$BOffice1."&nbsp;";    }    if( $BOffice2 ) {     $_JfCjO .= " O2:".$BOffice2."&nbsp;";    }    $ShowServiceType = GetServiceType($CONF, $Service_Type);    $JobStatus = GetStatusAsString2($inc_dir,$CONF, $Status_id);  $css_dir = './skins/'.$CONF['SkinPath'].'/';  if( $_jQ1jo == "background-color: rgb(208, 243, 255);" ) {     $_jQ1jo = "background-color: rgb(255, 255, 255);";   }  elseif( $_jQ1jo == "background-color: rgb(255, 255, 255);" ) {   $_jQ1jo = "background-color: rgb(208, 243, 255);";  }   $disp_cssdir = $css_dir;   $disp_acolor = $_jQ1jo;   $disp_targeturl = $_JfifO;   $disp_tid = $Ticket_ID;   $disp_ctid = $CustomTicketID;   $disp_jobstat = $JobStatus;   $disp_chin = $CheckedIn;   $disp_servtyp = $ShowServiceType;   $disp_itmmke = $Item_make;   $disp_itmmod = $Item_model;   $disp_showbus = $_JfoOj;   $disp_showbc = $_JfCjt;   $disp_shcus = $ShowCustomer;   $disp_cph = $_JfCjO;   $disp_desc = $Service_Desc;   $disp_ass = $Item_accessories;   $disp_ireqp = $Item_required_parts;  require 'skins/'.$CONF['SkinPath'].'/TicketOverview_Big.php';   }    echo(' <tbody>    </table>');   echo("Displaying $_JfOji Records.");  }   }  ?>  <?php   if( $Print == "" ) {   if( $ShowGenerationTime == 1 ) {    $_JQItC->stop();    print('<br><br>page generation time(seconds): ' . $_JQItC->gen());   }   }  include_once $inc_dir.'footer.inc';   if ( empty($Print) ) {    if( file_exists("$inc_dir/pro/config_downloads.php") ) {     echo('<a href="'.$inc_dir.'pro/controlpanel.php?SSID='.$SSID.'">');   }    else {     echo('<a href="'.$inc_dir.'pro/workorder_config_ui-free.inc.php?SSID='.$SSID.'">');   }   if( $IsCustomerLogin == 1 ) {     echo('<a href="guest_login.php">Guest Login</a><br>');    echo('<small><a href="http://www.WorkOrderTS.com" target="_blank" style="color:#000000;text-decoration:none;">Powered by WorkOrderTS</a></small>');   } else {    echo('Control Panel</a> &nbsp; &nbsp; <a href="include/logoff.php?SSID='.$SSID.'">Logoff</a><br>');    echo('<small><a href="http://www.WorkOrderTS.com" target="_blank" style="color:#000000;text-decoration:none;">Powered by WorkOrder TS '.$CONF["VersionStringCode"].'</a></small>');   }    }?>  <br>  </div>  </body>  </html>
Return current item: WorkOrder TS