Location: PHPKode > projects > WorkOrder TS > workorder-ts/include/pro/config_service_types.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>WorkOrder TS-The Operating System Independent Ticket Management System.</title> </head> <body> <?PHP $inc_dir="../";require_once $inc_dir.'magic_quotes.php';$_Il6fL=NULL;$debug=1;$_j06tj=True;$_j06LI=30;require $inc_dir.'config-user.inc.php';require $inc_dir.'conn-string-user.inc.php';require $inc_dir.'workorder_function_general.inc.php';require $inc_dir.'workorder_function_upload.php';$CONF=_OFB10($inc_dir);$SSID=_OEF0R();require_once $inc_dir.'workorder_function_isuserauthenticated.inc.php';if( _L00CR($SSID,$inc_dir,$_Il6fL,$CONF)=="FAILED" ) { die('Not Authenticated, please login first');} $_j0fjJ=Null;$_j0flC=Null;$_j08JQ=Null;$_j08ft=Null;$_j088C=Null;$_j0t1f=Null;$_j0tJL=Null;$_j0Oj8=False;$_j0Of0=1;$_j0o00=1;$_j0o6o=1;$_j0ol6=1;$_j0C8f=1;$_j0i1J=1;$_j0ioL=1;$_j0LIQ=1;$_j0l0C=1;$x=0;$_j0l1l=0;error_reporting(E_ALL );foreach($_POST as $_j0llj=> $_j10o0) { $x++;if( ereg("^serv_id[0-9]+",$_j0llj)) { $_j0l1l++;$_j0fjJ[$_j0l1l]=addslashes($_j10o0);$_j0Of0++;} if( ereg("^serv_name[0-9]+",$_j0llj)) { $_j0flC[$_j0l1l]=addslashes($_j10o0);$_j0o00++;} elseif( isset($_j0flC[$_j0l1l])==False) { $_j0flC[$_j0l1l]=Null;} if( ereg("^serv_instore[0-9]+",$_j0llj)) { if( $_j10o0==1 ) { $_j08JQ[$_j0l1l]=addslashes($_j10o0);} else { $_j08JQ[$_j0l1l]=Null;} $_j0o6o++;} elseif( isset($_j08JQ[$_j0l1l])==False) { $_j08JQ[$_j0l1l]=Null;} if( ereg("^serv_onsite[0-9]+",$_j0llj)) { echo "$_j0llj : $_j10o0 <br />";if( $_j10o0==1 ) { $_j08ft[$_j0l1l]=addslashes($_j10o0);} else { $_j08ft[$_j0l1l]=Null;} $_j0ol6++;} elseif( isset($_j08ft[$_j0l1l])==False) { $_j08ft[$_j0l1l]=Null;} if( ereg("^serv_contr[0-9]+",$_j0llj)) { echo "$_j0llj : $_j10o0 <br />";if( $_j10o0==1 ) { $_j11O8[$_j0l1l]=addslashes($_j10o0);} else { $_j11O8[$_j0l1l]=Null;} $_j0ol6++;} elseif( isset($_j11O8[$_j0l1l])==False) { $_j11O8[$_j0l1l]=Null;} if( ereg("^serv_exp[0-9]+",$_j0llj)) { echo "$_j0llj : $_j10o0 <br />";if( $_j10o0==1 ) { $_j088C[$_j0l1l]=addslashes($_j10o0);} else { $_j088C[$_j0l1l]=Null;} $_j0C8f++;} elseif( isset($_j088C[$_j0l1l])==False) { $_j088C[$_j0l1l]=Null;} if( ereg("^serv_position[0-9]+",$_j0llj)) { $_j0t1f[$_j0l1l]=addslashes($_j10o0);$_j0i1J++;} elseif( isset($_j0t1f[$_j0l1l])==False) { $_j0t1f[$_j0l1l]=Null;} if( ereg("^serv_tick_isdone[0-9]+",$_j0llj)) { $_j11Ll[$_j0l1l]=addslashes($_j10o0);} elseif( isset($_j11Ll[$_j0l1l])==False) { $_j11Ll[$_j0l1l]=Null;} if( ereg("^delete_value[0-9]+",$_j0llj)) { echo "$_j0llj : $_j10o0 <br />";$_j0tJL[$_j0l0C]=addslashes($_j10o0);$_j0l0C++;} } if( $debug==1 ) { echo count($_j1QQ6);echo count($_j1I16);echo count($_j1IJ0);echo count($_j1I8j);echo count($_j1Ii6);echo count($_j1j0l);echo "<br />Pos".count($_j1jll);echo "<br />Menu ID".count($_j1JiI);echo "<br />";} $_j16tt=count($_j0fjJ);$_j1ff0=count($_j0flC);$_j18j0=count($_j08JQ);$_j18il=count($_j08ft);$_j1tQf=count($_j088C);$_j1tJt=count($_j0t1f);$_j1t80=count($_j0tJL);if( isset($_POST['new_serv_name'])==True && @$_POST['new_serv_name'] !="" ) { if( isset($_POST['new_serv_id'])==True ) { $_j1OC6=addslashes($_POST['new_serv_id']);} else { $_j1OC6=Null;} if( isset($_POST['new_serv_name'])==True ) { $_j1tC8=addslashes($_POST['new_serv_name']);} else { $_j1tC8=Null;} if( isset($_POST['new_serv_instore'])==True ) { $_j1ooO=addslashes($_POST['new_serv_instore']);} else { $_j1ooO=Null;} if( isset($_POST['new_serv_onsite'])==True ) { $_j1C18=addslashes($_POST['new_serv_onsite']);} else { $_j1C18=Null;} if( isset($_POST['new_serv_contr'])==True ) { $_j1i0C=addslashes($_POST['new_serv_contr']);} else { $_j1i0C=Null;} if( isset($_POST['new_serv_exp'])==True ) { $_j1iLL=addslashes($_POST['new_serv_exp']);} else { $_j1iLL=Null;} if( isset($_POST['new_serv_position'])==True ) { $_j1LLQ=addslashes($_POST['new_serv_position']);} else { $_j1LLQ=Null;} if( $_j1ooO==Null || $_j1ooO=="" ) { $_j1ooO=0;} if( $_j1C18==Null || $_j1C18=="" ) { $_j1C18=0;} if( $_j1i0C==Null || $_j1i0C=="" ) { $_j1i0C=0;} if( $_j1iLL==Null || $_j1iLL=="" ) { $_j1iLL=0;} if( $_j1LLQ==Null || $_j1LLQ=="" ) { $_j1LLQ=0;} _OFQQC($inc_dir,$CONF['TableNameServiceTypes'],'serv_name,serv_instore,serv_onsite,serv_contract,serv_expedited,serv_position','"'.$_j1tC8.'","'.$_j1ooO.'","'.$_j1C18.'","'.$_j1i0C.'","'.$_j1iLL.'","'.$_j1LLQ.'"');$_j0Oj8=True;} unset($x);if( ($_j16tt !=$_j1ff0) && $_j18j0 !=$_j18il && $_j1tQf !=$_j1tJt ) { die("Array lenght mismatch! Some information is missing, please check your input. Error: 3264234");} else { for( $x=1;$x <=$_j16tt;$x++) { if( isset($_j08ft[$x])==False ) { $_j08ft[$x]=0;} if( isset($_j08JQ[$x])==False ) { $_j08JQ[$x]=0;} if( isset($_j11O8[$x])==False ) { $_j11O8[$x]=0;} if( isset($_j088C[$x])==False ) { $_j088C[$x]=0;} if( isset($_j0t1f[$x])==False ) { $_j0t1f[$x]=0;} if( file_exists("$inc_dir/pro/config_downloads.php")==True ) { _OFQAF($inc_dir,$CONF['TableNameServiceTypes'],'serv_name="'.$_j0flC[$x].'",serv_instore="'.$_j08JQ[$x].'",serv_onsite="'.$_j08ft[$x].'",serv_expedited="'.$_j088C[$x].'",serv_position="'.$_j0t1f[$x].'",serv_contract="'.$_j11O8[$x].'"','ID="'.$_j0fjJ[$x].'"');echo('<br />');$_j0Oj8=True;} else { _OFQAF($inc_dir,$CONF['TableNameServiceTypes'],'serv_name="'.$_j0flC[$x].'",serv_instore="'.$_j08JQ[$x].'",serv_expedited="'.$_j088C[$x].'",serv_position="'.$_j0t1f[$x].'"','ID="'.$_j0fjJ[$x].'"');echo('<br />');$_j0Oj8=True;} } } for( $_j1lji=1;$_j1lji <=$_j1t80;$_j1lji++) { if( $_j0tJL[$_j1lji] > 0 && is_numeric($_j0tJL[$_j1lji])==True) { _OFOEF($inc_dir,$CONF['TableNameServiceTypes'],'ID="'.$_j0tJL[$_j1lji].'"');} } if( $_j0Oj8==true ) { echo("All Done <br />");echo('<a href="javascript:window.close();">Close Window</a>');} if( $_j0Oj8==False ) { require $inc_dir.'config-user.inc.php';require $inc_dir.'conn-string-user.inc.php';echo('<form id="frmConfigServiceTypes" name="frmConfigServiceTypes" method="post" action="config_service_types.php">   <span style="font-weight: bold;">WorkOrder TS Service Type Control</span><br />  Here you can change the service types used throughout the program<br />  <small><strong>This is also an excellent way to screw up WorkOrder TS completely, please backup and/or ask support before changing the values below</strong></small><br />');echo('');echo('<ul>   <span style="font-size: 80%;">You can add a new service type on the line below, fillout the input fields below and click "Save".<br />   You can delete entries by checking the box behind each entry.<br />   <ul>    <li>Instore - Specifies if a Service Type is Instore</li>    <li>Onsite - Specifies if a Service Type is Onsite</li>    <li>Expedited - Specifies if the program should treat this Service Type as expedited</li>    <li>Contract - Specifies if the program should treat this Service Type as a Service Contract</li>    <li>Position - Specifies the Service Type list position</li>    <li>Delete - Allows you to delete Service Types - Do not delete Service Types which are in use!</li>   </ul>   Shoot yourself in the foot warning!! You can change/delete any service type, gone is gone....<br />Do not delete/change service types once they have been used!!!<br /></span>   <input type="submit" name="btnSavest" id="btnSaveMenu" value="Save" />   <li>   <input type="hidden" name="ServTNewID" value="1" />   <input maxlength="10" size="6" value="" name="new_serv_id" />   <input maxlength="254" size="30" value="" name="new_serv_name" /> &nbsp;&nbsp;   <input name="new_serv_instore" type="checkbox" value="1" />Instore &nbsp;');if( file_exists("$inc_dir/pro/config_downloads.php")==True ) { echo('<input name="new_serv_onsite" type="checkbox" value="1" />Onsite &nbsp;');} echo(' <input name="new_serv_contr" type="checkbox" value="1" />Contract &nbsp;   <input name="new_serv_exp" type="checkbox" value="1" />Expedited &nbsp;   <input maxlength="10" size="2" value="" name="new_serv_position" />Position &nbsp;   </li>');echo('<li>   <input maxlength="10" size="6" value="" name="" style="color: black; background-color: rgb(204, 255, 255);    text-align: center;" />   <input maxlength="254" size="30" value="Name" name="" style="color: black; background-color: rgb(204, 255, 255);   text-align: center;" /> &nbsp;&nbsp;   </li>');if( file_exists("$inc_dir/pro/config_downloads.php")==True ) { $sql="select * from ".$CONF['TableNameServiceTypes']." ORDER BY `serv_position` ASC";} else { $sql="select * from ".$CONF['TableNameServiceTypes']." WHERE `serv_onsite` != 1 ORDER BY `serv_position` ASC";} $res=mysql_query($sql,$conn) or die("Can't get Service Types from DB<br />$sql<br />, Error: 414f53fd");  $_jQ1jj = mysql_num_rows($res) / 2;   $_jQ1jo = 'style="color: black; background-color: rgb(207,207,207);"';   $_jQ1C1 = Null;  for( $x=1 ; $row = mysql_fetch_array($res) ; $x++ ) {   if( $_jQ1jo == 'style="color: black; background-color: rgb(207,207,207);"' ) {      $_jQ1jo = 'style="color: black; background-color: rgb(255, 255, 255);"';    }   elseif( $_jQ1jo == 'style="color: black; background-color: rgb(255, 255, 255);"' ) {     $_jQ1jo = 'style="color: black; background-color: rgb(207,207,207);"';   }   echo('<li '.$_jQ1jo.'> <input '.$_jQ1jo.' maxlength="10" size="6" value="'.$row['ID'].'" name="serv_id'.$x.'" /> <input '.$_jQ1jo.' maxlength="254" size="30" value="'.htmlspecialchars($row['serv_name']).'" name="serv_name'.$x.'" /> &nbsp;&nbsp;');   if( isset($row['serv_instore']) == True ) {    if( $row['serv_instore'] == 1 ) {      $_jQ1C1 = 'checked="checked"';    }    }    echo(' <input '.$_jQ1jo.' '.$_jQ1C1.' name="serv_instore'.$x.'" type="checkbox" value="1" />Instore &nbsp;');   $_jQ1C1 = Null;   if( file_exists("$inc_dir/pro/config_downloads.php") == True ) {   if( isset($row['serv_onsite']) == True ) {    if( $row['serv_onsite'] == 1 ) {      $_jQ1C1 = 'checked="checked"';    }    }    echo(' <input '.$_jQ1jo.' '.$_jQ1C1.' name="serv_onsite'.$x.'" type="checkbox" value="1" />Onsite &nbsp;');   $_jQ1C1 = Null;   }   if( isset($row['serv_contract']) == True ) {    if( $row['serv_contract'] == 1 ) {      $_jQ1C1 = 'checked="checked"';    }    }    echo(' <input '.$_jQ1jo.' '.$_jQ1C1.' name="serv_contr'.$x.'" type="checkbox" value="1" />Contract &nbsp;');   $_jQ1C1 = Null;   if( isset($row['serv_expedited']) == True ) {    if( $row['serv_expedited'] == 1 ) {      $_jQ1C1 = 'checked="checked"';    }    }    echo(' <input '.$_jQ1jo.' '.$_jQ1C1.' name="serv_exp'.$x.'" type="checkbox" value="1" />Expedited &nbsp;');   $_jQ1C1 = Null;   echo(' <input '.$_jQ1jo.' maxlength="10" size="2" value="'.$row['serv_position'].'" name="serv_position'.$x.'" />Position &nbsp;');   echo(' <input '.$_jQ1jo.' name="delete_value'.$x.'" type="checkbox" value="'.$row['ID'].'" />Delete </li>');  }   echo('</ul> <input name="SSID" value="'.$SSID.'" type="hidden" /> <input type="submit" name="btnSaveMenu" id="btnSaveServiceType" value="Save" /><br /> </form>');  }   ?>  </body>  </html>
Return current item: WorkOrder TS