Location: PHPKode > projects > WorkOrder TS > workorder-ts/include/pro/workorder_showshopoverview.inc.php
<?PHP if( $SSID !="" ) { $Store_id=$aUserSettings[1];$User_name=$aUserSettings[2];$_jtoC0=$CONF["StoreName$Store_id"];$_JCLjO=$CONF['TicketStatusControlName4'];$_JCLJ1=$CONF['TicketStatusControlName5'];$_JCLo1=$CONF['TicketStatusControlName6'];$_JCljt=$CONF['TicketStatusControlName7'];$_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.=' ) ';$_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) ) { $_JfItl=$_Jf1fO['ID'];if( $_JfIIl==Null ) { $_JfIIl=' ( ';} $_JfIIl.=$CONF['TableNameTicket'].'.Service_Type="'.$_JfItl.'" OR ';} $_JfIIl=rtrim($_JfIIl," ");$_JfIIl=rtrim($_JfIIl,"R");$_JfIIl=rtrim($_JfIIl,"O");$_JfIIl.=' ) ';$sql="select count(*) from ".$CONF['TableNameTicket']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Status_id!=8 AND ".$CONF['TableNameTicket'].".Status_id=\"1\" $_JfQji AND $_JfIIl ORDER BY ".$CONF['TableNameTicket'].".CheckedIn";$res=mysql_query( $sql,$conn);@$row=mysql_fetch_array($res);$_JClCt=$row['count(*)'];if( $_JClCt > 0 ) { $_Ji008=",<b> $_JClCt Expedited.</b>";} else { $_Ji008=".";} $sql="select count(*) from ".$CONF['TableNameTicket']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Status_id!=8 AND ".$CONF['TableNameTicket'].".Status_id=\"1\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"4\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"8\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"5\" AND ".$CONF['TableNameTicket'].".Service_Type!=\"9\" ORDER BY ".$CONF['TableNameTicket'].".CheckedIn Asc";$res=mysql_query( $sql,$conn);$row=mysql_fetch_array($res);$_Ji061=$row['count(*)'];$sql="select count(*) from ".$CONF['TableNameTicket']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Status_id!=8 AND ".$CONF['TableNameTicket'].".Status_id=\"2\" $_JfQji AND $_JfIIl ORDER BY ".$CONF['TableNameTicket'].".CheckedIn";$res=mysql_query( $sql,$conn);@$row=mysql_fetch_array($res);$_Ji0oQ=$row['count(*)'];if( $_Ji0oQ > 0 ) { $_Ji16t=",<b> $_Ji0oQ Expedited.</b>";} else { $_Ji16t=".";} $sql="select count(*) from ".$CONF['TableNameTicket']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Status_id!=8 AND ".$CONF['TableNameTicket'].".Status_id=\"2\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"4\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"8\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"5\" AND ".$CONF['TableNameTicket'].".Service_Type!=\"9\" ORDER BY ".$CONF['TableNameTicket'].".CheckedIn Asc";$res=mysql_query( $sql,$conn);$row=mysql_fetch_array($res);$_Ji1O0=$row['count(*)'];$sql="select count(*) from ".$CONF['TableNameTicket']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Status_id!=8 AND ".$CONF['TableNameTicket'].".Status_id=\"3\" $_JfQji AND $_JfIIl ORDER BY ".$CONF['TableNameTicket'].".CheckedIn";$res=mysql_query( $sql,$conn);@$row=mysql_fetch_array($res);$_Ji1o8=$row['count(*)'];if( $_Ji1o8 > 0 ) { $_JiQ88=",<b> $_Ji1o8 Expedited.</b>";} else { $_JiQ88=".";} $sql="select count(*) from ".$CONF['TableNameTicket']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Status_id!=8 AND ".$CONF['TableNameTicket'].".Status_id=\"3\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"4\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"8\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"5\" AND ".$CONF['TableNameTicket'].".Service_Type!=\"9\" ORDER BY ".$CONF['TableNameTicket'].".CheckedIn Asc";$res=mysql_query( $sql,$conn);$row=mysql_fetch_array($res);$_JiQiL=$row['count(*)'];$sql="select count(*) from ".$CONF['TableNameTicket']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Status_id!=8 AND ".$CONF['TableNameTicket'].".Status_id=\"4\" $_JfQji AND $_JfIIl ORDER BY ".$CONF['TableNameTicket'].".CheckedIn";$res=mysql_query( $sql,$conn);@$row=mysql_fetch_array($res);$_JiQLL=$row['count(*)'];if( $_JiQLL > 0 ) { $_JiI1L=",<b> $_JiQLL Expedited.</b>";} else { $_JiI1L=".";} $sql="select count(*) from ".$CONF['TableNameTicket']." where ".$CONF['TableNameTicket'].".Store_id=\"$Store_id\" AND ".$CONF['TableNameTicket'].".Status_id!=8 AND ".$CONF['TableNameTicket'].".Status_id=\"4\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"4\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"8\" AND ".$CONF['TableNameTicket'].".Service_Type<>\"5\" AND ".$CONF['TableNameTicket'].".Service_Type!=\"9\" ORDER BY ".$CONF['TableNameTicket'].".CheckedIn Asc";$res=mysql_query( $sql,$conn);$row=mysql_fetch_array($res);$_JiIfj=$row['count(*)'];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>');} echo('    <table style="width: 580px; text-align: left;" align="center" border="1"    cellpadding="2" cellspacing="2">    <tbody>    <tr>    <td style="vertical-align: top;">Welcome '.$User_name.',<br> you are    currently assigned to the '.$_jtoC0.' branch.    </td>    </tr>');echo('    <tr>    <td style="vertical-align: top;">It is now: '.date($confLocalFormatTimePHP).'<br>    </td>    </tr>');if( $User_name=="Demo" || $User_name=="demo" || $User_name=="Demo1" || $User_name=="demo1" ) { echo('    <tr>    <td style="vertical-align: top;"><span style="vertical-align: top; color: rgb(204, 0, 0);">     <b>Hello Demo User</b>, here is a small guide to help you find your way around.     <br><u>Find Customer</u> - Enter Name or keep blank. From here you can create new Tickets for existing customers and access their history.     <br><u>New Customer</u> - Create a new customer, once the customer has been added you will be forwarded to the New Ticket form. It is possible to Schedule Onsite Appointments from here by Selecting one of the Onsite options and by selecting a date.     <BR><u>Scheduler</u> - Access your company scheduler, you can add new tickets by clicking on the day number.     <BR><BR>This is the latest developer version(unstable), some features might behave unexpected. Please report any odd behavior. <a href="http://www.network-technologies.org/contact.php">Contact</a>    </td>    </tr>');} if( $User_name=="DemoAdmin" || $User_name=="demoadmin" ) { echo('    <tr>    <td style="vertical-align: top;"><span style="vertical-align: top; color: rgb(204, 0, 0);">     <b>Hello Demo Admin</b> you have a few more rights then a regular user has in this demo. As DemoAdmin you can access the control panel to reconfigure WorkOrder TS and you have the rights to edit tickets. All other Control Panel functions are disabled. Please keep in mind that your are working with the FULL Pro edition here.<br>     <br><u>Find Customer</u> - Enter Name or keep blank. From here you can create new Tickets for existing customers and access their history.     <br><u>New Customer</u> - Create a new customer, once the customer has been added you will be forwarded to the New Ticket form. It is possible to Schedule Onsite Appointments from here by Selecting one of the Onsite options and by selecting a date.     <BR><u>Scheduler</u> - Access your company scheduler, you can add new tickets by clicking on the day number.     <BR><BR>This is the latest developer version(unstable), some features might behave unexpected. Please report any odd behavior. <a href="http://www.network-technologies.org/contact.php">Contact</a>    </td>    </tr>');} echo('<tr>   <td style="vertical-align: top;"><span style="font-weight: bold;">Current   </span><span style="font-weight: bold;">In-store </span><span   style="font-weight: bold;">Ticket Status for location: '.$_jtoC0.'</span><br>   There are currently '.$_Ji061.' tickets marked '.$_JCLjO.$_Ji008.'<br>   There are currently '.$_Ji1O0.' tickets marked '.$_JCLJ1.$_Ji16t.'<br>   There are currently '.$_JiQiL.' tickets marked '.$_JCLo1.$_JiQ88.'<br>   There are currently '.$_JiIfj.' tickets marked '.$_JCljt.$_JiI1L.'<br>   </td>   </tr>');echo('   </tbody>   </table>');} ?>
Return current item: WorkOrder TS