Location: PHPKode > projects > WorkOrder TS > workorder-ts/setup_files/setup-old.php
<?PHP error_reporting(E_ALL ^ E_NOTICE);$AdminCmd=Null;$_jttl8=Null;$CompanyName=Null;$Address=Null;$_jtoC0=Null;$db_user=Null;$_jtoii=Null;$_jICL1=Null;$_jtCt0=Null;$_jtCtj=Null;$StoreNum=Null;$_jIC60=Null;$inc_dir='../include/';if( isset($_POST['Submit']) ) { $_jttl8=$_POST['Submit'];} $_jtCoj=$inc_dir."config-guest.inc.php";$_jtifi=$inc_dir."config-user.inc.php";$_jtii6=$inc_dir."conn-string-guest.inc.php";$_jtL8i=$inc_dir."conn-string-user.inc.php";if( isset($_POST['Company_Name']) ) { $_jtLLi=$_POST['Company_Name'];} if( isset($_POST['Company_Name']) ) { $CompanyName=$_POST['Company_Name'];} if( isset($_POST['Company_Name_sl']) ) { $_jtLLi=$_POST['Company_Name_sl'];} if( isset($_POST['Company_Name_sl']) ) { $CompanyName=$_POST['Company_Name_sl'];} $_jO01C=false;if( isset($_POST['StoreNum']) ) { $StoreNum=$_POST['StoreNum'];} if( file_exists("$inc_dir/pro/calendar.php")==False ) { $StoreNum=1;} for( $x=0;$x < $StoreNum;$x++) { if( isset($_POST['Address'.$x]) ) { $Address[$x]=$_POST['Address'.$x];} if( isset($_POST['StoreName'.$x]) ) { $_jtoC0[$x]=$_POST['StoreName'.$x];} if( isset($_POST['GoogleAddress'.$x]) ) { $_jtoii[$x]=$_POST['GoogleAddress'.$x];} } if( isset($_POST['LogoPath']) ) { $_ILlIL=$_POST['LogoPath'];} if( isset($_POST['Rate_Instore']) ) { $_ILlCO=$_POST['Rate_Instore'];} if( isset($_POST['Rate_Onsite']) ) { $_Il00j=$_POST['Rate_Onsite'];} if( isset($_POST['Disclaimer']) ) { $_jO111=$_POST['Disclaimer'];} if( isset($_POST['AdminPassword']) ) { $_jIoOt=htmlentities($_POST['AdminPassword'],ENT_QUOTES);} if( isset($_POST['TechPassword']) ) { $_jIC60=htmlentities($_POST['TechPassword'],ENT_QUOTES);} if( isset($_POST['LicenseKey']) ) { $_jICL1=$_POST['LicenseKey'];} if( isset($_POST['CustomerID']) ) { $_jtCt0=$_POST['CustomerID'];} if( isset($_POST['db']) ) { $db=$_POST['db'];} if( isset($_POST['db_un_root']) ) { $db_un_root=$_POST['db_un_root'];} if( isset($_POST['db_pw_root']) ) { $db_pw_root=$_POST['db_pw_root'];} if( isset($_POST['db_un_guest']) ) { $db_un_guest=$_POST['db_un_guest'];} if( isset($_POST['db_pw_guest']) ) { $db_pw_guest=$_POST['db_pw_guest'];} if( isset($_POST['db_un_user']) ) { $db_un_user=$_POST['db_un_user'];} if( isset($_POST['db_pw_user']) ) { $db_pw_user=$_POST['db_pw_user'];} if( isset($_POST['db_server']) ) { $db_server=$_POST['db_server'];} if( isset($_POST['TableTicket']) ) { $_jOQL8=$_POST['TableTicket'];} if( isset($_POST['TableCustomers']) ) { $_jOICJ=$_POST['TableCustomers'];} if( isset($_POST['TableCustomersDetail']) ) { $_jOIi1=$_POST['TableCustomersDetail'];} if( isset($_POST['TableItems']) ) { $_jOIlj=$_POST['TableItems'];} if( isset($_POST['TableConfig']) ) { $TableConfig=$_POST['TableConfig'];} if( isset($_POST['TableUsers']) ) { $_jOj81=$_POST['TableUsers'];} if( isset($_POST['TableUsersLogin']) ) { $_jOjif=$_POST['TableUsersLogin'];} if( isset($_POST['TablePrefix']) ) { $_jIOL6=$_POST['TablePrefix'];} if( isset($_POST['ProInstall']) ) { $_jtCtj=$_POST['ProInstall'];} if( isset($_GET['AdminCmd']) ) { $AdminCmd=$_GET['AdminCmd'];} if( isset($_GET['F']) ) { $F=$_GET['F'];} require "setup_variable_values.inc.php";function _OE1CA($_j68CQ,$l=1) { do {$_jJCfj[]=substr($_j68CQ,0,$l);$_j68CQ=substr($_j68CQ,$l);} while($_j68CQ !="");return $_jJCfj;} function _OE1E0($_jO6oQ,$_jOf0C,$_jO80O) { $_j66CC=$_jO6oQ;$_jO8ol=$_jOf0C;$_jOtQ0=$_jO80O;$_jOto6=('PMA_USR_BROWSER_AGENT'=='IE' || 'PMA_USR_BROWSER_AGENT'=='OPERA') ? 'application/octetstream':'application/octet-stream';header('Content-Type: '.$_jOto6);if ('PMA_USR_BROWSER_AGENT'=='IE') { header('Content-Disposition: inline; filename="' . $_jO8ol . '.' . $_jOtQ0 . '"');header("Content-Transfer-Encoding: binary");header('Expires: 0');header('Cache-Control: must-revalidate, post-check=0, pre-check=0');header('Pragma: public');print $_j66CC;} else { header('Content-Disposition: attachment; filename="' . $_jO8ol . '.' . $_jOtQ0 . '"');header("Content-Transfer-Encoding: binary");header('Expires: 0');header('Pragma: no-cache');print $_j66CC;} } function _OEQAQ($_jOOOi,$_jtCoj,$_jtii6) { $_jOOo0=Null;$_jtCoj="./include/config-guest.inc.php";$_jtifi="./include/config-user.inc.php";$_jtii6="./include/conn-string-guest.inc.php";$_jtL8i="./include/conn-string-user.inc.php";require $_jtCoj;require $_jtii6;$sql="select * from $TableConfig where config_name='$_jOOOi'";$res=@mysql_query($sql,$conn);$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;} if( $AdminCmd=="Download" ) { if( $F==1 ) { _OE1E0($_jOC8O,"config-guest",'inc.php');} if( $F==3 ) { _OE1E0($_jOi60,"config-user",'inc.php');} } if( $_jttl8=="Submit" ) { $db=$_POST['db'];$db_un_root=$_POST['db_un_root'];$db_pw_root=$_POST['db_pw_root'];$db_un_guest=$_POST['db_un_guest'];$db_pw_guest=$_POST['db_pw_guest'];$db_un_user=$_POST['db_un_user'];$db_pw_user=$_POST['db_pw_user'];$db_server=$_POST['db_server'];$_jOQL8=$_POST['TableTicket'];$_jOICJ=$_POST['TableCustomers'];$_jOIlj=$_POST['TableItems'];$TableConfig=$_POST['TableConfig'];$_jOIi1=$_POST['TableCustomersDetail'];$_jOj81=$_POST['TableUsers'];$_jOjif=$_POST['TableUsersLogin'];$_jIOL6=$_POST['TablePrefix'];$_jOi81=$_POST['Operation'];if( $_jtCtj==1 ) { require_once "include/pro/workorder_functions_pro.inc.php";if( ValidateKey4($_jICL1) !=1 ) { $StoreNum=1;} else { $StoreNum=$_POST['StoreNum'];} } else { $StoreNum=1;} if( $_jIoOt=="" ) { die("Admin Password is empty! Blank Passwords are not allowed in my programs!");} if( file_exists("$inc_dir/pro/calendar.php")==False ) { if( $_jIC60=="" ) { die("Tech Password is empty! Blank Passwords are not allowed in my programs!");} } echo("Step 2<br>");$_jOL1I=False;$_jOLC1=$_jOC8O;$_jO8ol=$_jtCoj;if (is_writable($_jO8ol)) { if (!$_jOl61=fopen($_jO8ol,'w')) { exit;} if (fwrite($_jOl61,$_jOLC1)===FALSE) { $_jOL1I=True;exit;} echo "<br>Success, wrote to file ($_jO8ol)<BR>";} else { $_jOL1I=True;} $db_server_user=$db_server;$db_user=$db;$db_un_user=$_POST['db_un_user'];$db_pw_user=$_POST['db_pw_user'];$_jOLC1=$_jOi60;$_jO8ol=$_jtifi;if (is_writable($_jO8ol)) { if (!$_jOl61=fopen($_jO8ol,'w')) { exit;} if (fwrite($_jOl61,$_jOLC1)===FALSE) { $_jOL1I=True;exit;} echo "<br>Success, wrote to file ($_jO8ol)<BR>";} else { $_jOL1I=True;} if( $_jOL1I==True ) { echo("<p><b>Error Writing to at least one config file</b><br>   Download the config files by pressing the buttons below and save them into the <u>include directory</u>  <br /><a href=\"setup_files/sample_overwrite.png\" target=\"_blank\">See Screenshot Example</a>");echo('<br>   <table style="width: 30%; text-align: left;" border="0" cellpadding="2" cellspacing="2">   <tbody>   <tr>   <td style="vertical-align: top;">    <form method="POST" action="setup.php?AdminCmd=Download&F=1">    <input name="db_un_guest" value="'.$db_un_guest.'" type="hidden">    <input name="db_pw_guest" value="'.$db_pw_guest.'" type="hidden">    <input name="db_un_user" value="'.$db_un_user.'" type="hidden">    <input name="db_pw_user" value="'.$db_pw_user.'" type="hidden">    <input name="db" value="'.$db.'" type="hidden">    <input name="db_user" value="'.$db.'" type="hidden">    <input name="db_server" value="'.$db_server.'" type="hidden">    <input name="db_server_user" value="'.$db_server_user.'" type="hidden">    <input name="TableConfig" value="'.$_jIOL6.$TableConfig.'" type="hidden">    <input name="AdminCmd" value="Download" type="hidden">    <input name="Submit" value="Download Guest Config" type="submit">    </form>   </td>   <td style="vertical-align: top;">    <form method="POST" action="setup.php?AdminCmd=Download&F=3">    <input name="db_un_guest" value="'.$db_un_guest.'" type="hidden">    <input name="db_pw_guest" value="'.$db_pw_guest.'" type="hidden">    <input name="db_un_user" value="'.$db_un_user.'" type="hidden">    <input name="db_pw_user" value="'.$db_pw_user.'" type="hidden">    <input name="db" value="'.$db.'" type="hidden">    <input name="db_user" value="'.$db.'" type="hidden">    <input name="db_server" value="'.$db_server.'" type="hidden">    <input name="db_server_user" value="'.$db_server_user.'" type="hidden">    <input name="TableConfig" value="'.$_jIOL6.$TableConfig.'" type="hidden">    <input name="AdminCmd" value="Download" type="hidden">    <input name="Submit" value="Download User Config" type="submit">    </form>   </td>   </tr>   </tbody>   </table></p><br>');} if( empty($db_un_root)==True ) { echo("<br><br>If your server is hosted by a third party, you can ignore the message blow and click on Step_3 to continue.<br>No Master Username provided, please create the required user accounts manually, then proceed to Step 3");echo("<br /><b>Use these commands to create your database and users if this is a new installation</b>   <br>Database:   <br>create database $db_user;   <br>Guest:   <br>GRANT SELECT ON $db.* TO '$db_un_guest'@'$db_server' IDENTIFIED BY '$db_pw_guest';   <br>User:   <br>GRANT LOCK TABLES,ALTER,SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON $db.* TO '$db_un_user'@'$db_server_user' IDENTIFIED BY '$db_pw_user';");} echo('<br>Please proceede to Step 3 to create/update the needed tables.<br>');echo('<form method="POST" action="setup.php?StoreNum=1" name="Setup Workorder">   <input name="db_un_root" value="'.$db_un_root.'" type="hidden">   <input name="db_pw_root" value="'.$db_pw_root.'" type="hidden">   <input name="db_un_guest" value="'.$db_un_guest.'" type="hidden">   <input name="db_pw_guest" value="'.$db_pw_guest.'" type="hidden">   <input name="db_un_user" value="'.$db_un_user.'" type="hidden">   <input name="db_pw_user" value="'.$db_pw_user.'" type="hidden">   <input name="db" value="'.$db.'" type="hidden">   <input name="db_user" value="'.$db_user.'" type="hidden">   <input name="db_server_user" value="'.$db_server_user.'" type="hidden">   <input name="Company_Name_sl" value="'.$_jtLLi.'" type="hidden">   <input name="Operation" value="'.$_jOi81.'" type="hidden">   <input name="LogoPath" value="'.$_ILlIL.'" type="hidden">   <input name="Rate_Instore" value="'.$_ILlCO.'" type="hidden">   <input name="Rate_Onsite" value="'.$_Il00j.'" type="hidden">   <input name="Disclaimer" value="'.$_jO111.'" type="hidden">   <input name="AdminPassword" value="'.$_jIoOt.'" type="hidden">');if( isset($_jIC60) ) { echo('<input name="TechPassword" value="'.$_jIC60.'" type="hidden">');} echo(' <input name="CustomerID" value="'.$_jtCt0.'" type="hidden">   <input name="TableTicket" value="'.$_jIOL6.$_jOQL8.'" type="hidden">   <input name="TableCustomers" value="'.$_jIOL6.$_jOICJ.'" type="hidden">   <input name="TableCustomersDetail" value="'.$_jIOL6.$_jOIi1.'" type="hidden">   <input name="TableItems" value="'.$_jIOL6.$_jOIlj.'" type="hidden">   <input name="TableConfig" value="'.$_jIOL6.$TableConfig.'" type="hidden">   <input name="TableUsers" value="'.$_jIOL6.$_jOj81.'" type="hidden">   <input name="TableUsersLogin" value="'.$_jIOL6.$_jOjif.'" type="hidden">   <input name="TablePrefix" value="'.$_jIOL6.'" type="hidden">   <input name="AdminCmd" value="Download" type="hidden">   <input name="LicenseKey" value="'.$_jICL1.'" type="hidden">   <input name="ProInstall" value="'.$_jtCtj.'" type="hidden">   <input name="StoreNum" value="'.$StoreNum.'" type="hidden">');for( $x=0;$x < $StoreNum;$x++) { echo(' <input name="Address'.$x.'" value="'.$Address[$x].'" type="hidden">     <input name="StoreName'.$x.'" value="'.$_jtoC0[$x].'" type="hidden">     <input name="GoogleAddress'.$x.'" value="'.$_jtoii[$x].'" type="hidden">');} echo(' <input name="Submit" value="Step_3" type="submit"></form>');} elseif( $_jttl8=="Step_3" ) { $db=$_POST['db'];$db_un_guest=$_POST['db_un_guest'];$db_pw_guest=$_POST['db_pw_guest'];$db_un_user=$_POST['db_un_user'];$db_pw_user=$_POST['db_pw_user'];$db_server_user=$_POST['db_server_user'];$db_user=$_POST['db_user'];$_jOi81=$_POST['Operation'];require "setup_files/setup_create_tables.inc.php";echo("<hr>Now Inserting Default Values and Configuration Data, any error messages below will be configuration related.");require "setup_files/setup_add_values.inc.php";echo("<br>All required values have been inserted, there should be no errors.<hr>");echo("<hr>Applying Updates since First Release");require "setup_files/update.php";echo("<br>Updates Applied<hr>");if( $_jtCtj !=1 ) { echo("<br><u>Installation Complete</u>, please delete the file setup.php and the directory setup_files. The program will not run with the setup files/directory in place! Don't forget to remove the write permissions from your configuration files in the include directory if you changed them during the installation!<br>You may now login as admin or tech with the passwords you provided, on the first page of this setup.<br>   <b>More Configuration</b> options are now available via the Control Panel. You can access the control panel after you login using the admin account. The link to the Control Panel is at the bottom of most pages.<br>   <a href=\"workorder.php\">Goto workorder.php<a/>");  }   if( $_jtCtj == 1 ) {   echo("<br><u>Installation Complete</u>, please delete the file setup.php and the directory setup_files. The program will not run with the setup files/directory in place! Don't forget to remove the write permissions from your configuration files in the include directory if you changed them during the installation!<br>   Please login as admin and load the <b>Control Panel</b>, here you should update your prices and create user accounts for your users.<br>   The link to the Control Panel is at the bottom of most pages.<br>   <a href=\"workorder.php\">Goto workorder.php<a/>");} } elseif( $_jttl8 !="Submit" && $_jttl8 !="Step_3" && $AdminCmd !="Download") { if( file_exists($_jtCoj) AND file_exists($_jtifi) ) { if( ( filesize($_jtCoj) > 0 ) && ( filesize($_jtifi) > 0 ) ) { echo "Existing Config Files found, please run Upgrade or Uninstall.<br>";$_jO01C=true;require $_jtCoj;require $_jtii6;require $_jtifi;require $_jtL8i;if( empty($TableConfig) ) { $_jOQL8=_OEQAQ("TableNameConfig",$_jtCoj,$_jtii6);} if( empty($_jOQL8) ) { $_jOQL8=_OEQAQ("TableNameTicket",$_jtCoj,$_jtii6);} if( empty($_jOICJ) ) { $_jOICJ=_OEQAQ("TableNameCustomers",$_jtCoj,$_jtii6);} if( empty($_jOIi1) ) { $_jOIi1=_OEQAQ("TableNameCustomersDetail",$_jtCoj,$_jtii6);} if( empty($_jOIlj) ) { $_jOIlj=_OEQAQ("TableNameItem",$_jtCoj,$_jtii6);} if( empty($_jOj81) ) { $_jOj81=_OEQAQ("TableNameUsers",$_jtCoj,$_jtii6);} if( empty($_jOjif) ) { $_jOjif=_OEQAQ("TableNameUsersLogin",$_jtCoj,$_jtii6);} $_jIOL6=_OEQAQ("TablePrefix",$_jtCoj,$_jtii6);$TableConfig=trim( $TableConfig,$_jIOL6);$_jOjif=trim( $_jOjif,$_jIOL6);$_jOj81=trim( $_jOj81,$_jIOL6);$_jOICJ=trim( $_jOICJ,$_jIOL6);$_jOIi1=trim( $_jOIi1,$_jIOL6);$_jOQL8=trim( $_jOQL8,$_jIOL6);$_jOIlj=trim( $_jOIlj,$_jIOL6);if( empty($_ILlIL) ) { $_ILlIL=_OEQAQ("Company",$_jtCoj,$_jtii6);} $CompanyName=_OEQAQ("Company Name",$_jtCoj,$_jtii6);$_jtCt0=_OEQAQ("WorkorderLicenseCustomerID",$_jtCoj,$_jtii6);$_jICL1=_OEQAQ("WorkorderLicenseKey",$_jtCoj,$_jtii6);$_ILlIL=_OEQAQ("Company Logo Location",$_jtCoj,$_jtii6);$_ILlCO=_OEQAQ("Rate-Instore",$_jtCoj,$_jtii6);$_Il00j=_OEQAQ("Rate-Onsite",$_jtCoj,$_jtii6);$_Il0tf=_OEQAQ("Disclaimer-Checkin",$_jtCoj,$_jtii6);$StoreNum=_OEQAQ("StoreNum",$_jtCoj,$_jtii6);for( $x=0;$x < $StoreNum;$x++) { $Address[$x]=_OEQAQ("Company Address$x",$_jtCoj,$_jtii6);$_jtoC0[$x]=_OEQAQ("StoreName$x",$_jtCoj,$_jtii6);$_jtoii[$x]=_OEQAQ("GoogleAddress$x",$_jtCoj,$_jtii6);} if( $CompanyName=="" AND $Address[0]=="" AND $_jtoC0[0]=="" ) { echo("There appears to be a problem with the database connection. Testing .....");$sql="select * from $TableConfig where config_name='$_jOOOi'";$res=@mysql_query($sql,$conn);$_j6oJi=mysql_error();$_jjQIJ=mysql_errno();echo("<br><br>Database Error Message: $_j6oJi");if( $_jjQIJ=="1045" ) { echo("<br>Looks like the Username or Password in your config files do not match. To retrieve your stored information from the database, edit the files config-guest.inc.php and config-user.inc.php located in the include directory with a text editor such as vi or notepad/wordpad (Use \"Save\" not \"Save As\". Please correct the problem(s), then reload this page.");} } die('<p><a href="setup_files/update.php?SetupType=update">Upgrade</a>&nbsp;&nbsp;&nbsp;&nbsp;     <a href="setup_files/uninstall.php">Uninstall</a></p><br>');} } if( empty($_ILlIL) ) { $_ILlIL="./grfx/";} if( empty($_jOQL8) ) { $_jOQL8="ticket";} if( empty($_jOICJ) ) { $_jOICJ="customers";} if( empty($_jOIi1) ) { $_jOIi1="customers_detail";} if( empty($_jOIlj) ) { $_jOIlj="item";} if( empty($TableConfig) ) { $TableConfig="config";} if( empty($_jOj81) ) { $_jOj81="users";} if( empty($_jOjif) ) { $_jOjif="users_login";} if( empty($_jIOL6) ) { $_jIOL6="Workorder_";} if( empty($db_un_guest) ) { $db_un_guest="work_guest";} if( empty($db_un_user) ) { $db_un_user="work_user";} if( empty($_Il0tf) ) { $_Il0tf='<p>    Exclusion of Liability for Data Loss and Component Conflicts    COMPANYNAME, shall have no liability with respect to    (1) data lost, regardless of the cause, (2) data recovery services,    data contained in any product in COMPANYNAME possession. COMPANYNAME has no obligation to pay for or reimburse for the recovering of    data. COMPANYNAME shall have no liability with respect to conflicts    between your software and components installed in and product placed in    COMPANYNAME possession, including but not limited to, upgrading    and/or adding components.    Warning: Any product left for more than thirty (30) days, after    reasonable attempts to notify you have been made, may be sold and    proceeds kept to cover monies due COMPANYNAME, for repair and/or    storage, including the cost of selling the product.    Notice of receipt of the above Liability Limitations and the acceptance    of the Limitations is acknowledges by the signature:</p>    Signature:____________________________________________&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date:________________<br>    By signing above, the person states that they have the proper authority    to approve any work requested to be done on the product left with    COMPANYNAME.';} if( empty($_ILlCO) ) { $_ILlCO='$_jOloL/hour, $_jOloL Desktop Diagnostic/Minimum, $_jOloL Laptop Diagnostic/Minimum';} if( empty($_Il00j) ) { $_Il00j='$_jOloL per hour, $_jOloL minimum (no trip charge)';} if( empty($db_server_user) ) { $db_server_user="localhost";} $_jo0IJ=phpversion();$_jo1Q1=str_replace(".","",$_jo0IJ);if( $_jo1Q1 < 500 ) { } $self=$_SERVER['PHP_SELF'];if( file_exists("$inc_dir/pro/calendar.php")==False ) { $StoreNum=1;} else { require_once "include/pro/workorder_functions_pro.inc.php";if( empty($_jICL1)==FALSE ) { $res=ValidateKey4($_jICL1);if( $res==0 ) { $_jICL1=NULL;} else{ $res=CheckKey4($_jICL1);$res=substr("$res",strlen($res)-4);$StoreNum=$res{0};$_jtCtj=1;} } if( get_magic_quotes_gpc() ) { echo("PHP Magic Quotes are enabled on your system. Please disable this option in your php.ini file or your webhosting configuration page.");} if( empty($_jICL1)==TRUE && $_jO01C==false) { echo('<br /><br />Setup: <br />     Please enter your License Information.<br />     <form method="POST" action="setup.php" name="Setup Workorder">     Company Name: <input size="50" name="Company_Name"><br />     License Key: &nbsp;&nbsp;&nbsp; aaaaa-bbbbb-ccccc-ddddd-eeeee: <input size="30"  value="'.$_jICL1.'"  name="LicenseKey"><br />     <input name="Add License" value="Add License" type="submit"><br />     <br>     </form>');die();} } if (get_magic_quotes_gpc()) { echo("PHP Magic Quotes are enabled on your system. Please disable this option in your php.ini file or your webhosting configuration page.");} echo('<br><br>Setup:<br>    <form method="POST" action="setup.php?StoreNum=1" name="Setup Workorder"><br>    <table style="width: 100%; text-align: left;" border="1"    cellpadding="2" cellspacing="2">    <tbody>    <tr>    <td style="vertical-align: top; width: 520px;">Operation:<br>    </td>    <td style="vertical-align: top;">    <input checked="checked" name="Operation" value="DBinstall" type="radio">Install&nbsp;&nbsp;&nbsp;&nbsp;');if( $_jO01C==True ) { echo('<a href="setup_files/update.php?SetupType=update">Upgrade</a>&nbsp;&nbsp;&nbsp;&nbsp;     <a href="setup_files/uninstall.php">Uninstall</a><br>');} echo('</td>    </tr>');if( is_numeric($StoreNum) ) { echo('    <tr>    <td style="vertical-align: top; width: 520px;">Company Name:<br>    </td>    <td style="vertical-align: top;"><input size="50" name="Company_Name" value="'.stripslashes($CompanyName).'"></td>    </tr>');} if( is_numeric($StoreNum) ) { for( $x=0;$StoreNum > $x;$x++) { echo('<tr>      <td style="vertical-align: top; width: 520px;">Company Address'.($x+1).':<br>      </td>      <td style="vertical-align: top;"><textarea cols="40" rows="4" name="Address'.$x.'">'.stripslashes($Address[$x]).'</textarea></td>      </tr>      <tr>      <td style="vertical-align: top; width: 520px;"><u>Store'.$x.' Google Address:</u><br>      Please enter your street address, zip here to give google maps a start location to plan your route. Example: <b>3401 Bonita Beach Road, 34134</b>      </td>      <td style="vertical-align: top;"><input size="50" name="GoogleAddress'.$x.'" value="'.stripslashes($_jtoii[$x]).'"></td>      </tr>      <tr>      <td style="vertical-align: top; width: 520px;"><u>Store'.$x.' Short Name:</u><br>      This will be used like this: Checked in by: TECHNAME in: STORE SHORT NAME      </td>      <td style="vertical-align: top;"><input size="50" name="StoreName'.$x.'" value="'.stripslashes($_jtoC0[$x]).'"></td>      </tr>');} echo('    <tr>    <td style="vertical-align: top; width: 520px;">Company Logo Location:<br>Size should be around 290x50 pixel.    </td>    <td style="vertical-align: top;"><input size="50" name="LogoPath" value="'.$_ILlIL.'"></td>    </tr>    <tr><td  style="vertical-align: top; width: 520px;">Database Field Notice<br>    </td>    <td style="vertical-align: top;"><u>Server Hosted by Third Party or Shared Server</u><br>     If this is your setup, you should have received a database name, username and password from your hosting provider. Since it is very unlikely that you are allowed to create more database usernames, simply fill out the fields below according to the example and all will be well.<br>     Database Name: Received from your hosting provider.<br>     Server Address: Received from your hosting provider. Domain Name or IP<br>     Database Master Account: Leave Both Fields Empty<br>     Guest User: Use the Username you received from your hosting provider.<br>     Guest Password: Use the Password you received from your hosting provider.<br>     User Account: Use the same Username you used for the Guest User<br>     User Password: Use the same Password used for the Guest Password.<br><br>     The program is designed to use the lowest permission level required to complete a task. A page which only requires read access can never write to the database because the guest account only has SELECT permissions. Using the same account for both will work just fine but will not provide the additional layer of security.<br>     <br>     <u>If this is your server</u><br>     If this is your server, you can pick most values as you please. If the database does not exist it will be created. In your case enter your database root username and password at the Master Account fields.<br>    </td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">Database Name:<br>    </td>    <td style="vertical-align: top;"><input size="30" name="db" value="'.$db_user.'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">Server Address: (localhost)<br>    </td>    <td style="vertical-align: top;"><input value="'.$db_server_user.'"    size="30" name="db_server"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">Database Master Account(root)<br>Used to create the database and user accounts. Not needed if the database and user accounts already exist. WILL NOT BE SAVED!    </td>    <td style="vertical-align: top;">    User Name: <input size="30" name="db_un_root"><br />    User Password: <input size="30" name="db_pw_root"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">Guest User    (SELECT):<br>    </td>    <td style="vertical-align: top;"><input maxlength="16" size="30"    name="db_un_guest" value="'.$db_un_guest.'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">Guest Password:<br><small><a href="http://www.network-technologies.org/main_projects_index_show_all.php" target="_blank">Random Password Generator</a></small>    </td>    <td style="vertical-align: top;"><input size="30"    name="db_pw_guest" value="'.$db_pw_guest.'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">User Account    (LOCK TABLES,ALTER,SELECT,INSERT,UPDATE,<br>DELETE,CREATE,DROP):<br>    </td>    <td style="vertical-align: top;"><input maxlength="16" size="30"    name="db_un_user" value="'.$db_un_user.'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">User Password:<br><small><a href="http://www.network-technologies.org/main_projects_index_show_all.php" target="_blank">Random Password Generator</a></small>    </td>    <td style="vertical-align: top;"> <input size="30"    name="db_pw_user" value="'.$db_pw_user.'"></td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">Table Name Prefix:</td>    <td style="vertical-align: top;"><input value="'.$_jIOL6.'" maxlength="10" size="30" name="TablePrefix">         <input value="'.$_jOjif.'" type="hidden" name="TableUsersLogin">         <input value="'.$_jOj81.'" type="hidden" name="TableUsers">        <input value="'.$TableConfig.'" type="hidden" name="TableConfig">        <input value="'.$_jOIi1.'" type="hidden" name="TableCustomersDetail">        <input value="'.$_jOICJ.'" type="hidden" name="TableCustomers">        <input value="'.$_jOQL8.'" type="hidden" name="TableTicket">        <input value="'.$_jOIlj.'" type="hidden" name="TableItems">    </td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">Customer ID:</td>    <td style="vertical-align: top;"><input size="30"  disabled="disabled" value="1"  name="CustomerID"> </td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">Admin Password:</td>    <td style="vertical-align: top;"><input size="30" name="AdminPassword"> </td>    </tr>');if( file_exists("$inc_dir/pro/calendar.php")==False ) { echo('    <tr>    <td style="vertical-align: top; width: 520px;">Tech Password:</td>    <td style="vertical-align: top;"><input size="30" name="TechPassword"> </td>    </tr>    <tr>    <td style="vertical-align: top; width: 520px;">License Key: &nbsp;&nbsp;&nbsp; aaaaa-bbbbb-ccccc-ddddd-eeeee<br>Availible for free at <a href="http://www.network-technologies.org/Projects/workorder_processing_software_online_demo.php" target="_blank">Network-Technologies.org</a></td>    <td style="vertical-align: top;"><input size="30"  value="'.$_jICL1.'"  name="LicenseKey"> </td>    </tr>');} else { echo('    <tr>    <td style="vertical-align: top; width: 520px;">License Key: &nbsp;&nbsp;&nbsp; aaaaa-bbbbb-ccccc-ddddd-eeeee</td>    <td style="vertical-align: top;"><input size="30"  value="'.$_jICL1.'"  name="LicenseKey"> </td>    </tr');} echo('    </tbody>    </table>    <input name="Submit" value="Submit" type="submit"><br>    <br>      <input name="Rate_Instore" value="'.$_ILlCO.'" type="hidden">    <input name="Rate_Onsite" value="'.$_Il00j.'" type="hidden">    <input type=hidden name="Disclaimer" value="'.$_Il0tf.'">');if( $_jtCtj==1 ) { echo('<input name="ProInstall" value="'.$_jtCtj.'" type ="hidden">      <input name="StoreNum" value="'.$StoreNum.'" type="hidden">');} echo('</form>');} else { echo("Please select the number of Stores first");} } ?>
Return current item: WorkOrder TS