$sql_option_id = mysql_query("SELECT options FROM sohorepro_plotting_set WHERE company_id = '" . $company_id_view_plot . "' AND user_id = '" . $user_id_add_set . "' AND order_id = '0' ORDER BY options DESC LIMIT 1"); $object_option = mysql_fetch_assoc($sql_option_id); if (count($object_option['options']) > 0) { $options = $object_option['options'] + 1; } else { $options = '1'; } $query = "INSERT INTO sohorepro_plotting_set\n\t\t\tSET referece_id = '" . $job_reference . "',\n origininals = '" . $original . "',\n options = '" . $options . "', \n print_ea = '" . $print_ea . "',\n size = '" . $size . "',\n custome_details = '" . $size_custom . "', \n output = '" . $output . "',\n media = '" . $media . "',\n binding = '" . $binding . "',\n folding = '" . $folding . "',\n plot_arch = '" . $plot_arch . "',\n spl_instruction = '" . $special_instruction . "',\n custom_size = '" . $size_custom_val . "',\n output_both = '" . $output_both_val . "',\n pick_up = '" . $pickup_date . "', \n pick_up_time = '" . $pickup_time . "',\n drop_off = '" . $drop_val . "',\n ftp_link = '" . $ftp_link_val . "', \n user_name = '" . $user_name_val . "',\n password = '******',\n company_id = '" . $company_id_view_plot . "',\n user_id = '" . $user_id_add_set . "' "; $sql_result = mysql_query($query); $enteredPlotPrimay = EnteredPlotttingPrimary($company_id_view_plot, $user_id_add_set); $count_option = count($enteredPlotPrimay) + 1; $_SESSION['ref_val'] = $_POST['job_reference']; $i = 1; foreach ($enteredPlotPrimay as $plot) { $job_type = $plot['plot_arch'] == '1' ? 'Plotting' : 'Architecture'; $file_upload_exist = UploadFileExist($_SESSION['sohorepro_companyid'], $_SESSION['sohorepro_userid']); ?> <div class="plot_container" style="width: 100%;float: left;border: 1px #FF7E00 solid;margin-bottom: 20px;"> <div class="plot_wrap" style="padding: 5px;"> <div style="width: 100%;float: left;margin-bottom: 10px;"> <div style="float: left;width: 45%;font-weight: bold;">Job Option - <?php echo $i; ?> </div> <div style="float: left;width: 50%;font-weight: bold;text-align: right;cursor: pointer;" onclick="return delete_added_job(<?php echo $plot['id']; ?> );"><span style="background: #D84B36;color: #FFF;padding: 2px 8px;border-radius: 5px;margin-top: 3px;font-weight: bold;">Delete</span></div> </div> <ul> <li><label>Job Type </label><p>: <?php
<input type="hidden" name="jobref_id" id="jobref_id" value="" /> <input type="hidden" name="company_id" id="company_id" value="" /> <input type="hidden" name="drop_off_select_val" id="drop_off_select_val" value="" /> <input type="hidden" name="continue_ok" id="continue_ok" value="0" /> </div> </li> <div id="set"> <input type="hidden" name="pri_inc_val" id="pri_inc_val" value="1" /> <li class="clear"> <!-- FOR EACH START --> <?php $user_id_add_set = $_SESSION['sohorepro_userid']; $company_id_view_plot = $_SESSION['sohorepro_companyid']; $check_plotting = PlottingSetWithoutOrderId($company_id_view_plot, $user_id_add_set); $check_plotting_needed = PlottingNeededSetWithoutOrderId($company_id_view_plot, $user_id_add_set); $check_plotting_files = UploadFileExist($company_id_view_plot, $user_id_add_set); if(count($check_plotting) > 0){ $delete_empty = "DELETE FROM sohorepro_plotting_set WHERE company_id = '".$company_id_view_plot."' AND user_id = '".$user_id_add_set."' AND order_id = '0'"; mysql_query($delete_empty); } if(count($check_plotting_needed) > 0){ $delete_empty = "DELETE FROM sohorepro_sets_needed WHERE comp_id = '".$company_id_view_plot."' AND usr_id = '".$user_id_add_set."' AND order_id = '0'"; mysql_query($delete_empty); } if(count($check_plotting_files) > 0){ $delete_sql = "DELETE FROM sohorepro_upload_files_set WHERE comp_id = '".$company_id_view_plot."' AND user_id = '".$user_id_add_set."' AND order_id = '0' "; mysql_query($delete_sql); }
<div id="content_output-data" style="margin-bottom:20px;"> <!--- TABLE START --> <?php // include "./service_nav.php"; ?> <div id="orderWapper"> <!-- <div class="orderBreadCrumb"> </div> --> <?php $user_session_comp = $_SESSION['sohorepro_companyid']; $user_session = $_SESSION['sohorepro_userid']; $entered_needed_sets = NeededSets($user_session_comp, $user_session); $total_sets = SetsOrderedFinalizeCountOfSetsCustomer($user_session_comp, $user_session); $upload_file_exist = UploadFileExist($user_session_comp, $user_session); ?> <h2 class="headline-interior orange"> Delivery Job Reference: <?php echo $_SESSION['ref_val']; ?> </h2> <div style="float: left;margin-top: 12px;margin-bottom: 20px;" class="shaddows"> <div class="ribbon" id="ribbon_final"><span style="background: #79A70A !important;">ORIGINAL</span></div> <div style="width: 100%;float: left;margin-top: 25px;margin-bottom: 10px;"> <div class="details_div"> <!-- Customer Details Start --> <div style="float: left;width: 65%;margin-left: 30px;margin-top: 7px;font-weight: bold;">Customer Details: </div> <div style="float: left;width: 33%;margin-left: 30px;">