Пример #1
0
         $totalRejection += $_cutting['rejection'] * 1;
         $temp['item'] = $_cutting['item'];
         $temp['job_date'] = $_cutting['job_date'];
         $temp['waste'] = $_cutting['waste'];
         $totalWaste += $_cutting['waste'] * 1;
         $arr[] = $temp;
     }
     $prop['totalNet'] = $totalNet;
     $prop['totalQty'] = $totalQty;
     $prop['totalHc'] = $totalHc;
     $prop['totalRejection'] = $totalRejection;
     $prop['totalWaste'] = $totalWaste;
 } else {
     if ($StringUtils->equalsPost('subtab', 'delivery')) {
         $_deliverys = ias_db_query("SELECT * FROM ( " . "  SELECT `dispatch_no`, " . "         `item`, " . "         `unit`, " . "         `tr_no`, " . "         `no_of_bags`, " . "         `qty`, " . "         `gross`, " . "         `core`, " . "         `job_date`, " . "         case unit when 'PCS' then round((qty * no_of_bags) - core,2) " . "\t\t\telse " . "\t\t\t\t round((gross-core),2) " . "\t\t\tEND as total  " . "    FROM `{$CONFIG['TABLE_PREFIX']}item_dispatch` " . "   WHERE `prod_id` = {$prodid} " . ") x WHERE 1=1 {$wh} ORDER BY `dispatch_no` DESC");
         $deliverys = ias_db_fetch_rowset($_deliverys);
         mysql_free_result($_deliverys);
         $totalTotal = 0;
         foreach ($deliverys as $_delivery) {
             $temp = array();
             $temp['dispatch_no'] = $_delivery['dispatch_no'];
             $temp['item'] = $_delivery['item'];
             $temp['unit'] = $_delivery['unit'];
             $temp['tr_no'] = $_delivery['tr_no'];
             $temp['no_of_bags'] = $_delivery['no_of_bags'];
             $temp['qty'] = $_delivery['qty'];
             $temp['gross'] = $_delivery['gross'];
             $temp['core'] = $_delivery['core'];
             $temp['job_date'] = $_delivery['job_date'];
             $temp['total'] = $_delivery['total'];
             $totalTotal += $_delivery['total'] * 1;
Пример #2
0
		buttons : [ { text:"Find",  handler:handleCutSearchSubmit, isDefault:true },
				    { text:"Reset", handler:handleCutSearchReset },
					{ text:"Close", handler:handleCancel } ]
	});
	dialogCuttingSearch.callback = { success: handleSuccess, failure: handleFailure };
	dialogCuttingSearch.validate = handleCutSearchSubmit;
	dialogCuttingSearch.render();
	
	function btnSearchCuttingClick(p_oEvent) {
		dialogCuttingSearch.show();
	}
	var btnSearchCutting = new YAHOO.widget.Button("btnSearchCutting", { onclick: { fn: btnSearchCuttingClick } });
	
	var cutItemItems = [<?php 
$_production = ias_db_query("SELECT DISTINCT `item` FROM `{$CONFIG['TABLE_PREFIX']}cutting_production`");
$productions = ias_db_fetch_rowset($_production);
mysql_free_result($_production);
$first = true;
foreach ($productions as $production) {
    if (!$first) {
        print ",";
    }
    if ($first) {
        $first = false;
    }
    print "\"{$production['item']}\"";
}
?>
	];
	
	var cutItemAutoDataSource = new YAHOO.util.LocalDataSource(cutItemItems);
Пример #3
0
<button type="button" id="btnAddUser" name="btnAddUser" value="Add">Add</button>
<div id="markupUser">
	<table id="tableUser">
		<tbody><?php 
$uindex = 0;
$_users = ias_db_query("SELECT * FROM `{$CONFIG['TABLE_PREFIX']}users` ORDER BY `name` asc");
$users = ias_db_fetch_rowset($_users);
mysql_free_result($_users);
foreach ($users as $_user) {
    ?>
			<tr>
			  <td><?php 
    echo $_user['id'];
    ?>
</td>
			  <td><?php 
    echo $_user['name'];
    ?>
</td>
			  <td><?php 
    echo $_user['user'];
    ?>
</td>
			  <td><?php 
    echo $_user['email'];
    ?>
</td>
			  <td><?php 
    echo $_user['lastvisit'];
    ?>
</td>
Пример #4
0
    }
}
if (!preg_match('/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/', $raw_ip)) {
    $raw_ip = '0.0.0.0';
}
if (!preg_match('/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/', $hdr_ip)) {
    $hdr_ip = '0.0.0.0';
}
// Constants used by the ias_die function
define('INFORMATION', 1);
define('ERROR', 2);
define('CRITICAL_ERROR', 3);
($CONFIG['LINK_ID'] = ias_db_connect()) || die('<b>IAS critical error</b>:<br />Unable to connect to database !<br /><br />MySQL said: <b>' . mysql_error() . '</b>');
$_options = ias_safedb_query("SELECT * FROM `{$CONFIG['TABLE_PREFIX']}options` ORDER BY `id`");
if ($_options) {
    $options = ias_db_fetch_rowset($_options);
    mysql_free_result($_options);
    foreach ($options as $_option) {
        $CONFIG[$_option['name']] = $_option['value'];
    }
}
/**************************************************************************
   Database functions
 **************************************************************************/
// Connect to the database
/**
 * ias_db_connect()
 *
 * Connect to the database
 **/
function ias_db_connect()
Пример #5
0
<?php

require_once 'db.php';
$json = array();
$_additives = ias_db_query("SELECT * FROM `{$CONFIG['TABLE_PREFIX']}exturder_additive_list` WHERE `ext_pro_id` = {$_GET['ext_pro_id']}");
$additives = ias_db_fetch_rowset($_additives);
mysql_free_result($_additives);
foreach ($additives as $_addlist) {
    $json_array = array();
    $json_array['ext_add_list_no'] = $_addlist['ext_add_list_no'];
    $json_array['item_name'] = $_addlist['item_name'];
    $json_array['item_qty'] = $_addlist['item_qty'];
    $json[] = $json_array;
}
echo JSON_print($json);