• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP to_YMD函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中to_YMD函数的典型用法代码示例。如果您正苦于以下问题:PHP to_YMD函数的具体用法?PHP to_YMD怎么用?PHP to_YMD使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了to_YMD函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: ini_set

<?php

include "../commons.php";
include "../conexion.php";
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
session_start();
//p_array($_REQUEST);
//p_array($_SESSION);
$queryTicket = "\r\n\tinsert into\r\n\t\tfuel_load\r\n\t\t(\r\n\t\t\tbrokerId,\r\n\t\t\ttruckId,\r\n\t\t\tfuelLoadDate,\r\n\t\t\tfuelLoadCommet,\r\n\t\t\tfuelLoadStart,\r\n\t\t\tfuelLoadFinish,\r\n\t\t\tfuelLoadRegistered,\r\n\t\t\tfuelLoadMileage\r\n\t\t)\r\n\t\tvalues\r\n\t\t(\r\n\t\t\t'" . $_GET['brokerId'] . "',\r\n\t\t\t'" . $_GET['truckId'] . "',\r\n\t\t\t'" . mysql_real_escape_string(to_YMD($_GET['fdate'])) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['comment']) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['start']) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['finish']) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['registered']) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['mileage']) . "'\r\n\t\t)";
$jsondata['query'] = $queryTicket;
mysql_query($queryTicket, $conexion);
$lastFuel = mysql_insert_id();
$broker = mysql_fetch_assoc(mysql_query("select brokerPid from broker where brokerId=" . $_GET['brokerId'], $conexion));
$truck = mysql_fetch_assoc(mysql_query("select truckNumber from truck where truckId=" . $_GET['truckId'], $conexion));
$newLine = "";
$newLine .= "<tr id='removableFuel{$lastFuel}'>";
$newLine .= "<td class=fisrt'>" . $_GET['fdate'] . "<input type='hidden' value='" . $lastFuel . "' class='hiddenId' /></td>";
$newLine .= "<td >" . $broker['brokerPid'] . "-" . $truck['truckNumber'] . "</td>";
$newLine .= "<td >" . $_GET['comment'] . "</td>";
$newLine .= "<td >" . $_GET['start'] . "</td>";
$newLine .= "<td >" . $_GET['finish'] . "</td>";
$newLine .= "<td >" . ($_GET['finish'] - $_GET['start']) . "</td>";
$newLine .= "<td >" . $_GET['registered'] . "</td>";
$newLine .= "<td >" . $_GET['mileage'] . "</td>";
$newLine .= "<td><img src='/trucking/img/13.png' width='20' height='20' class='editable' /></td>";
$newLine .= "<td class='last'><img src='/trucking/img/118.png' width='20' height='20' class='deletable' /></td>";
$newLine .= "</tr>";
//$jsondata['table']="";
$jsondata['line'] = $newLine;
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:submitFuel.php


示例2: saveEditBroker

function saveEditBroker($handler, $brokerId, $pid, $name, $contact, $tax, $tel, $fax, $radio, $mobile, $carrier, $email, $icc, $wc, $wcexp, $inslb, $lbexp, $genln, $glexp, $start, $percentage, $term, $gender, $ethnicId, $line1, $line2, $city, $state, $zip, $box)
{
    $broker = getBasicBrokerInfo($handler, $brokerId);
    $pid = mysql_real_escape_string($pid);
    $name = mysql_real_escape_string($name);
    $contact = mysql_real_escape_string($contact);
    $tax = mysql_real_escape_string($tax);
    $tel = cleanPhoneNumber(mysql_real_escape_string($tel));
    $fax = cleanPhoneNumber(mysql_real_escape_string($fax));
    $radio = mysql_real_escape_string($radio);
    $mobile = cleanPhoneNumber(mysql_real_escape_string($mobile));
    $carrier = mysql_real_escape_string($carrier);
    $email = mysql_real_escape_string($email);
    $icc = mysql_real_escape_string($icc);
    $wc = mysql_real_escape_string($wc);
    $wcexp = to_YMD(mysql_real_escape_string($wcexp));
    $inslb = mysql_real_escape_string($inslb);
    $lbexp = to_YMD(mysql_real_escape_string($lbexp));
    $genln = mysql_real_escape_string($genln);
    $glexp = to_YMD(mysql_real_escape_string($glexp));
    $start = to_YMD(mysql_real_escape_string($start));
    $percentage = mysql_real_escape_string($percentage);
    $term = mysql_real_escape_string($term);
    $gender = mysql_real_escape_string($gender);
    $ethnicId = mysql_real_escape_string($ethnicId);
    $line1 = mysql_real_escape_string($line1);
    $line2 = mysql_real_escape_string($line2);
    $city = mysql_real_escape_string($city);
    $state = mysql_real_escape_string($state);
    $zip = mysql_real_escape_string($zip);
    $box = mysql_real_escape_string($box);
    $addressId = editAddress($handler, $broker['addressId'], $line1, $line2, $city, $state, $zip, $box);
    $queryBroker = "\n\tUPDATE broker SET\n\t brokerPid = '{$pid}', \n\t brokerName = '{$name}', \n\t brokerContactName = '{$contact}', \n\t brokerTax = '{$tax}', \n\t brokerTel = '{$tel}', \n\t brokerFax = '{$fax}', \n\t brokerRadio = '{$radio}', \n\t brokerMobile = '{$mobile}', \n\t carrierId = '{$carrier}', \n\t brokerEmail = '{$email}', \n\t brokerIccCert = '{$icc}', \n\t brokerInsuranceWc = '{$wc}', \n\t brokerWcExpire = '{$wcexp}', \n\t brokerInsuranceLiability = '{$inslb}', \n\t brokerLbExpire = '{$lbexp}', \n\t brokerGeneralLiability = '{$genln}', \n\t brokerGlExp = '{$glexp}', \n\t brokerStartDate = '{$start}', \n\t brokerStatus = '1', \n\t brokerPercentage = '{$percentage}', \n\t brokerGender = '{$gender}', \n\t ethnicId = '{$ethnicId}', \n\t termId = '{$term}'\n\tWHERE brokerId = '{$brokerId}'";
    mysql_query($queryBroker, $handler);
    return $brokerId;
}
开发者ID:jscasca,项目名称:mfrogs_mfi,代码行数:36,代码来源:common_server_functions.php


示例3: ini_set

<?php

include "../commons.php";
include "../conexion.php";
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
session_start();
//p_array($_REQUEST);
//p_array($_SESSION);
$coordinates = getCoordinates("{$_REQUEST['addressLine1']} {$_REQUEST['addressZip']} {$_REQUEST['addressCity']} {$_REQUEST['addressState']}");
$queryAddress = "\r\ninsert into\r\n\taddress \r\n\t(\r\n\t\taddressLine1,\r\n\t\taddressLine2,\r\n\t\taddressCity,\r\n\t\taddressState,\r\n\t\taddressZip,\r\n\t\taddressPOBox,\r\n\t\taddressLat,\r\n\t\taddressLong\r\n\t)\r\n\tvalues\r\n\t(\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressLine1']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressLine2']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressCity']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressState']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressZip']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressPOBox']) . "',\r\n\t\t'" . $coordinates[0] . "',\r\n\t\t'" . $coordinates[1] . "'\r\n\t)";
//insert
mysql_query($queryAddress, $conexion);
$addressId = mysql_insert_id();
$queryBroker = "\r\ninsert into\r\n\tdriver\r\n\t(\r\n\t\tdriverFirstName,\r\n\t\tdriverLastName,\r\n\t\taddressId,\r\n\t\tdriverSSN,\r\n\t\tdriverTel,\r\n\t\tdriverMobile,\r\n\t\tcarrierId,\r\n\t\tdriverEmail,\r\n\t\tdriverUnion,\r\n\t\tdriverStartDate,\r\n\t\tdriverStatus,\r\n\t\tdriverPercentage,\r\n\t\tbrokerId,\r\n\t\ttermId,\r\n\t\tdriverGender,\r\n\t\tdriverClass,\r\n\t\tethnicId,\r\n\t\tworkId\r\n\t)\r\n\tvalues\r\n\t(\r\n\t\t'" . mysql_real_escape_string($_REQUEST['driverFirst']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['driverLast']) . "',\r\n\t\t'" . mysql_real_escape_string($addressId) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['driverSSN']) . "',\r\n\t\t'" . mysql_real_escape_string(cleanPhoneNumber($_REQUEST['driverTel'])) . "',\r\n\t\t'" . mysql_real_escape_string(cleanPhoneNumber($_REQUEST['driverMobile'])) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['carrierId']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['driverMail']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['driverUnion']) . "',\r\n\t\t'" . mysql_real_escape_string(to_YMD($_REQUEST['startupDate'])) . "',\r\n\t\t'1',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['driverPercentage']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerId']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['termId']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['driverGender']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['driverClass']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['ethnicId']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['workId']) . "'\r\n\t)";
//echo $queryBroker;
mysql_query($queryBroker, $conexion);
$brokerId = mysql_insert_id();
mysql_close($conexion);
header("Location:newDriver.php");
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:21,代码来源:submitDriver.php


示例4: getNextSaturdayDate

function getNextSaturdayDate($date)
{
    $ret = to_YMD($date);
    //$ret = strtotime($ret);
    //$ret = date('Y-m-d',$ret);
    for ($i = 1; $i <= 7; $i++) {
        if (date('w', strtotime()) == 6) {
            $ret = date('Y-m-d', strtotime('+' . $i . ' day'));
        }
    }
    $ret = to_MDY($ret);
    return $ret;
}
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:13,代码来源:commons.php


示例5: using

	</table>
</td>
<td>
</td>
<td>

</td>
</tr>
</table>

<br>

<table align="center" class="report" width="100%" cellspacing="0" >
<?php 
$tableHolder = "";
$ticketsQuery = "\r\n\tSELECT\r\n\t\t*\r\n\tFROM\r\n\t\tticket\r\n\t\tJOIN item using (itemId)\r\n\t\tJOIN project using (projectId)\r\n\t\tJOIN customer using (customerId)\r\n\t\tJOIN truck using (truckId)\r\n\t\tJOIN broker using (brokerId)\r\n\t\tLEFT JOIN reportticket using (ticketId)\r\n\tWHERE\r\n\t\treportId is null AND\r\n\t\tticketDate >= '" . ($fromDate == "" ? "0000-00-00" : to_YMD($fromDate)) . "' \r\n\t\t" . ($toDate == "" ? "" : " AND ticketDate < '" . to_YMD($toDate) . "' ") . "\r\n\t\t" . ($filter == 0 ? "" : " AND brokerId = " . $filter) . "\r\n\tORDER BY\r\n\t\tticketDate asc\r\n";
//echo $ticketsQuery;
$tickets = mysql_query($ticketsQuery, $conexion);
while ($ticket = mysql_fetch_assoc($tickets)) {
    $tableHolder .= "<tr>";
    $tableHolder .= "<td>" . to_MDY($ticket['ticketDate']) . "</td>";
    $tableHolder .= "<td>" . $ticket['ticketMfi'] . ($ticket['ticketNumber'] == "" ? "" : "/" . $ticket['ticketNumber']) . "</td>";
    $tableHolder .= "<td>" . $ticket['customerName'] . "</td>";
    $tableHolder .= "<td>" . $ticket['projectName'] . "</td>";
    $tableHolder .= "<td>" . $ticket['brokerPid'] . "-" . $ticket['truckNumber'] . "</td>";
    $tableHolder .= "</tr>";
}
?>
	<tr>
		<th >Date</th>
		<th >Ticket</th>
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:showUnreportedTickets.php


示例6: ini_set

include "../conexion.php";
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
session_start();
//p_array($_REQUEST);
//p_array($_SESSION);
$coordinates = getCoordinates("{$_REQUEST['addressLine1']} {$_REQUEST['addressZip']} {$_REQUEST['addressCity']} {$_REQUEST['addressState']}");
$queryAddress = "\r\ninsert into\r\n\taddress \r\n\t(\r\n\t\taddressLine1,\r\n\t\taddressLine2,\r\n\t\taddressCity,\r\n\t\taddressState,\r\n\t\taddressZip,\r\n\t\taddressPOBox,\r\n\t\taddressLat,\r\n\t\taddressLong\r\n\t)\r\n\tvalues\r\n\t(\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressLine1']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressLine2']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressCity']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressState']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressZip']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressPOBox']) . "',\r\n\t\t'" . $coordinates[0] . "',\r\n\t\t'" . $coordinates[1] . "'\r\n\t)";
//insert
mysql_query($queryAddress, $conexion);
$addressId = mysql_insert_id();
if ($_REQUEST['projectStartup'] == "") {
    $date = 'now()';
} else {
    $date = "'" . to_YMD(mysql_real_escape_string($_REQUEST['projectStartup'])) . "'";
}
$queryCustomer = "\r\ninsert into\r\n\tproject\r\n\t(\r\n\t\tprojectName,\r\n\t\tprojectStartup,\r\n\t\tjobLandId,\r\n\t\tjobTerrainId,\r\n\t\taddressId,\r\n\t\tprojectCounty,\r\n\t\tprojectTownship,\r\n\t\tprojectIepa,\r\n\t\tprojectBow,\r\n\t\tprojectBoa,\r\n\t\tprojectMaterial,\r\n\t\tprojectSw,\r\n\t\tprojectLoads,\r\n\t\tprojectTrucks,\r\n\t\tprojectEnviromental,\r\n\t\tprojectPin,\r\n\t\tcustomerId,\r\n\t\tcontactId,\r\n\t\tprojectCompany,\r\n\t\tprojectClass1PW,\r\n\t\tprojectClass2PW,\r\n\t\tprojectClass3PW,\r\n\t\tprojectClass4PW,\r\n\t\tprojectBrokerPW,\r\n\t\tprojectUnder,\r\n\t\tprojectApprovalNumber\r\n\t)\r\n\tvalues\r\n\t(\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectName']) . "',\r\n\t\t" . $date . ",\r\n\t\t'" . mysql_real_escape_string($_REQUEST['jobLand']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['jobTerrain']) . "',\r\n\t\t'" . mysql_real_escape_string($addressId) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectCounty']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectTownship']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectIepa']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectBow']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectBoa']) . "',\r\n\t\t'" . mysql_real_escape_string(implode(",", $_REQUEST['typemat'])) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectSw']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectLoads']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectTrucks']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectEnvironmental']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectPin']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['customer']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['contact']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectCompany']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectClass1PW']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectClass2PW']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectClass3PW']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectClass4PW']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectBrokerPW']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectUnder']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectApprovalNumber']) . "'\r\n\t)";
mysql_query($queryCustomer, $conexion);
//echo$queryCustomer;
$job = mysql_insert_id();
mysql_query($queryAddress, $conexion);
$addressId = mysql_insert_id();
mysql_query("insert into owner (ownerName,addressId,projectId) values ('',{$addressId},{$job})", $conexion);
$owner = mysql_insert_id();
if (!is_dir("../../archive/customerId{$_REQUEST['customer']}/job{$job}}")) {
    mkdir("../../archive/customerId{$_REQUEST['customer']}/job{$job}");
    chmod("../../archive/customerId{$_REQUEST['customer']}/job{$job}", 0777);
}
$queryLog = "\r\ninsert into \r\n\tlog\r\n\t\t(logDate, userId, logAction, logDescription)\r\n\tvalues\r\n\t\t(NOW()," . $_SESSION['user']->id . ",1,' " . mysql_real_escape_string($_REQUEST['customerName']) . " into customers');";
/*
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:submitJob.php


示例7: session_start

<?php

include "../commons.php";
session_start();
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
//p_array($_REQUEST);
//p_array($_SESSION);
$coordinates = getCoordinates("{$_REQUEST['addressLine1']} {$_REQUEST['addressZip']} {$_REQUEST['addressCity']} {$_REQUEST['addressState']}");
$queryAddress = "\r\nUPDATE\r\n\taddress \r\nSET\r\n\t\taddressLine1='" . mysql_real_escape_string($_REQUEST['addressLine1']) . "',\r\n\t\taddressLine2='" . mysql_real_escape_string($_REQUEST['addressLine2']) . "',\r\n\t\taddressCity='" . mysql_real_escape_string($_REQUEST['addressCity']) . "',\r\n\t\taddressState='" . mysql_real_escape_string($_REQUEST['addressState']) . "',\r\n\t\taddressZip='" . mysql_real_escape_string($_REQUEST['addressZip']) . "',\r\n\t\taddressPOBox='" . mysql_real_escape_string($_REQUEST['addressPOBox']) . "',\r\n\t\taddressLat='" . $coordinates[0] . "',\r\n\t\taddressLong='" . $coordinates[1] . "'\r\nWHERE\r\n\t\taddressId=" . $_REQUEST['a'] . "\r\n\t\t";
//echo $queryAddress;
mysql_query($queryAddress, $conexion);
$queryBroker = "\r\nUPDATE\r\n\tproject\r\nSET\r\n\t\tprojectName='" . mysql_real_escape_string($_REQUEST['projectName']) . "',\r\n\t\tprojectStartup='" . to_YMD(mysql_real_escape_string($_REQUEST['projectStartup'])) . "',\r\n\t\tjobLandId='" . $_REQUEST['jobLand'] . "',\r\n\t\tjobTerrainId='" . $_REQUEST['jobTerrain'] . "',\r\n\t\tprojectCounty='" . mysql_real_escape_string($_REQUEST['projectCounty']) . "',\r\n\t\tprojectTownship='" . mysql_real_escape_string($_REQUEST['projectTownship']) . "',\r\n\t\tprojectIepa='" . mysql_real_escape_string($_REQUEST['projectIepa']) . "',\r\n\t\tprojectBow='" . mysql_real_escape_string($_REQUEST['projectBow']) . "',\r\n\t\tprojectBoa='" . mysql_real_escape_string($_REQUEST['projectBoa']) . "',\r\n\t\tprojectMaterial='" . mysql_real_escape_string(implode(",", $_REQUEST['typemat'])) . "',\r\n\t\tprojectSw='" . mysql_real_escape_string($_REQUEST['projectSw']) . "',\r\n\t\tprojectLoads='" . mysql_real_escape_string($_REQUEST['projectLoads']) . "',\r\n\t\tprojectTrucks='" . mysql_real_escape_string($_REQUEST['projectTrucks']) . "',\r\n\t\tprojectEnviromental='" . mysql_real_escape_string($_REQUEST['projectEnvironmental']) . "',\r\n\t\tprojectPin='" . mysql_real_escape_string($_REQUEST['projectPin']) . "',\r\n\t\tcustomerId='" . $_REQUEST['customer'] . "',\r\n\t\tcontactId='" . (isset($_REQUEST['contact']) ? $_REQUEST['contact'] : "0") . "',\r\n\t\tprojectCompany='" . mysql_real_escape_string($_REQUEST['projectCompany']) . "',\r\n\t\tprojectClass1PW='" . mysql_real_escape_string($_REQUEST['projectClass1PW']) . "',\r\n\t\tprojectClass2PW='" . mysql_real_escape_string($_REQUEST['projectClass2PW']) . "',\r\n\t\tprojectClass3PW='" . mysql_real_escape_string($_REQUEST['projectClass3PW']) . "',\r\n\t\tprojectClass4PW='" . mysql_real_escape_string($_REQUEST['projectClass4PW']) . "',\r\n\t\tprojectBrokerPW='" . mysql_real_escape_string($_REQUEST['projectBrokerPW']) . "',\r\n\t\tprojectUnder='" . mysql_real_escape_string($_REQUEST['projectUnder']) . "',\r\n\t\tprojectApprovalNumber='" . mysql_real_escape_string($_REQUEST['projectApprovalNumber']) . "'\r\nWHERE\r\n\t\tprojectId=" . $_REQUEST['i'] . "\r\n\t\t";
//echo $queryBroker;
mysql_query($queryBroker, $conexion);
$queryLog = "\r\ninsert into \r\n\tlog\r\n\t\t(logDate, userId, logAction, logDescription)\r\n\tvalues\r\n\t\t(NOW()," . $_SESSION['user']->id . ",2,' " . mysql_real_escape_string($_REQUEST['brokerName']) . " into brokers');";
/*
For Log Actions:
1 -> New (insert into)
2 -> Edit (update from)
3 -> Delete (delete from)
*/
mysql_query($queryLog, $conexion);
if (!is_dir("../../archive/customerId{$_REQUEST['customer']}/job{$job}}")) {
    mkdir("../../archive/customerId{$_REQUEST['customer']}/job{$job}");
    chmod("../../archive/customerId{$_REQUEST['customer']}/job{$job}", 0777);
}
mysql_close($conexion);
header("Location:/trucking/php/view/viewJob.php?i=" . $_REQUEST['i']);
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:30,代码来源:submitEditJob.php


示例8: ini_set

<?php

include "../commons.php";
include "../conexion.php";
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
session_start();
//p_array($_REQUEST);
//p_array($_SESSION);
$testExisting = "select count(*) as existing from ticket where ticketMfi='" . $_GET['ticket'] . "' and ticketNumber='" . $_GET['ticketNumber'] . "'";
$tests = mysql_query($testExisting, $conexion);
$test = mysql_fetch_assoc($tests);
if ($test['existing'] == 0) {
    $queryTicket = "\r\n\tinsert into\r\n\t\tticket\r\n\t\t(\r\n\t\t\titemId,\r\n\t\t\ttruckId,\r\n\t\t\tdriverId,\r\n\t\t\tticketDate,\r\n\t\t\tticketAmount,\r\n\t\t\tticketBrokerAmount,\r\n\t\t\tticketNumber,\r\n\t\t\tticketMfi,\r\n\t\t\tticketPercentage\r\n\t\t)\r\n\t\tvalues\r\n\t\t(\r\n\t\t\t'" . mysql_real_escape_string($_GET['itemId']) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['truckId']) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['driverId']) . "',\r\n\t\t\t'" . mysql_real_escape_string(to_YMD($_GET['ticketDate'])) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['ticketAmount']) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['ticketBrokerAmount']) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['ticketNumber']) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['ticket']) . "',\r\n\t\t\t'" . mysql_real_escape_string($_GET['ticketPercentage']) . "'\r\n\t\t)";
    //echo $queryTicket;
    mysql_query($queryTicket, $conexion);
    $lastTicket = mysql_insert_id();
    if ($_GET['driverId'] != 0) {
        $queryRelation = "select count(*) as existing from lastdrivingrelation where truckId =" . $_GET['truckId'];
        $relations = mysql_query($queryRelation, $conexion);
        $relation = mysql_fetch_assoc($relations);
        if ($relation['existing'] == 0) {
            $querySaveRelation = "insert into lastdrivingrelation (truckId,driverId) values ('" . $_GET['truckId'] . "','" . $_GET['driverId'] . "')";
        } else {
            $querySaveRelation = "update lastdrivingrelation set driverId = '" . $_GET['driverId'] . "' where truckId = '" . $_GET['truckId'] . "'";
        }
        mysql_query($querySaveRelation, $conexion);
    }
    $queryLog = "\r\n\tinsert into \r\n\t\tlog\r\n\t\t\t(logDate, userId, logAction, logDescription)\r\n\t\tvalues\r\n\t\t\t(NOW()," . $_SESSION['user']->id . ",1,' " . mysql_real_escape_string($_REQUEST['itemId']) . " into items');";
    mysql_query($queryLog, $conexion);
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:submitTicket.php


示例9: ini_set

<?php

include "../commons.php";
include "../conexion.php";
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
session_start();
//p_array($_REQUEST);
//p_array($_SESSION);
$chequeNumber = mysql_escape_string($_REQUEST['customerChequeNum']);
$chequeAmount = mysql_escape_string($_REQUEST['customerChequeAmount']);
$chequeDate = mysql_escape_string(to_YMD($_REQUEST['customerChequeDate']));
$paidFromCheque = 0;
$insertSuperCheck = "\r\nINSERT INTO\r\n\tcustomer_super_check (\r\n\t\tcustomerId,\r\n\t\tcustomerSuperCheckNumber,\r\n\t\tcustomerSuperCheckAmount,\r\n\t\tcustomerSuperCheckDate,\r\n\t\tcustomerSuperCheckCreationDate,\r\n\t\tcustomerSuperCheckNote\r\n\t) values (\r\n\t\t" . $_REQUEST['customerId'] . ",\r\n\t\t'" . $chequeNumber . "',\r\n\t\t'" . $chequeAmount . "',\r\n\t\t'" . $chequeDate . "',\r\n\t\tnow(),\r\n\t\t'" . mysql_escape_string($_REQUEST['customerChequeNote']) . "'\r\n\t)\r\n";
//echo $insertSuperCheck;
mysql_query($insertSuperCheck, $conexion);
$superChequeId = mysql_insert_id();
//$superChequeId = 0;
if ($_REQUEST['hiddenInvoices'] != "") {
    $invoiceInCheque = "\r\n\tINSERT INTO\r\n\t\treceiptcheques (\r\n\t\t\treceiptchequesDate,\r\n\t\t\treceiptchequeNumber,\r\n\t\t\tcustomerSuperCheckId,\r\n\t\t\treceiptchequesAmount,\r\n\t\t\tinvoiceId\r\n\t\t) values \r\n\t";
    $first = true;
    $invoices = explode("-", $_REQUEST['hiddenInvoices']);
    foreach ($invoices as $invoicePair) {
        $pair = explode(",", $invoicePair);
        if ($first) {
            $first = false;
        } else {
            $invoiceInCheque .= ",";
        }
        $invoiceInCheque .= "('{$chequeDate}', '{$chequeNumber}', '{$superChequeId}', " . $pair[1] . "," . $pair[0] . ")";
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:submitCustomerSuperCheck.php


示例10: ini_set

<?php

include "../commons.php";
include "../conexion.php";
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
session_start();
$reportId = $_REQUEST['reportId'];
$brokerId = $_GET['brokerId'];
$driverId = $_GET['driverId'];
$afterDate = $_GET['afterDate'];
$beforeDate = $_GET['beforeDate'];
$beforeEndDate = $_GET['beforeEndDate'];
$week = $_GET['week'];
$paid = $_GET['paid'];
$additionalParams = "?brokerId={$brokerId}&driverId={$driverId}&afterDate={$afterDate}&beforeDate={$beforeDate}&beforeEndDate={$beforeEndDate}&week{$week}=&paid={$paid}";
$date = 'now()';
$queryCustomer = "\ninsert into\n\tpaidcheques\n\t(\n\t\tpaidchequesDate,\n\t\treportId,\n\t\tpaidchequeNumber,\n\t\tpaidchequesAmount\n\t)\n\tvalues\n\t(\n\t\t'" . mysql_real_escape_string(to_YMD($_REQUEST['paidchequesDate'])) . "',\n\t\t'" . mysql_real_escape_string($reportId) . "',\n\t\t'" . mysql_real_escape_string($_REQUEST['paidchequeNumber']) . "',\n\t\t'" . mysql_real_escape_string($_REQUEST['paidchequesAmount']) . "'\n\t)";
mysql_query($queryCustomer, $conexion);
//echo$queryCustomer;
//$job = mysql_insert_id();
/*
For Log Actions:
1 -> New (insert into)
2 -> Edit (update from)
3 -> Delete (delete from)
*/
//mysql_query($queryLog,$conexion);
mysql_close($conexion);
header("Location:reportBroker [Invoices].php" . $additionalParams);
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:submitPayCheque.php


示例11: ini_set

<?php

include "../commons.php";
include "../conexion.php";
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
session_start();
//p_array($_REQUEST);
//p_array($_SESSION);
$insertSupplierInvoice = "\r\nINSERT INTO\r\n\tsupplierinvoice (\r\n\t\tsupplierId,\r\n\t\tsupplierInvoiceNumber,\r\n\t\tsupplierInvoiceAmount,\r\n\t\tsupplierInvoiceComment,\r\n\t\tsupplierInvoiceDate,\r\n\t\tsupplierInvoiceCreationDate\r\n\t) values (\r\n\t\t" . $_REQUEST['supplierId'] . ",\r\n\t\t'" . mysql_escape_string($_REQUEST['invoiceNum']) . "',\r\n\t\t'" . mysql_escape_string($_REQUEST['invoiceAmount']) . "',\r\n\t\t'" . mysql_escape_string($_REQUEST['invoiceComment']) . "',\r\n\t\t'" . mysql_escape_string(to_YMD($_REQUEST['invoiceDate'])) . "',\r\n\t\tnow()\r\n\t)\r\n";
mysql_query($insertSupplierInvoice, $conexion);
$added = array();
$invoiceId = mysql_insert_id();
$ticketPerInvoice = "\r\nINSERT INTO\r\n\tsupplierinvoiceticket (\r\n\t\tsupplierInvoiceId,\r\n\t\tticketId\r\n\t) values \r\n";
$first = true;
$tickets = explode("-", $_REQUEST['hiddenTickets']);
foreach ($tickets as $ticketId) {
    if (isset($added[$ticketId])) {
        continue;
    } else {
        $added[$ticketId] = '1';
    }
    if ($first) {
        $first = false;
    } else {
        $ticketPerInvoice .= ",";
    }
    $ticketPerInvoice .= "({$invoiceId}, {$ticketId})";
}
//echo $ticketPerInvoice;
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:submitSupplierInvoice.php


示例12: ini_set

<?php

include "../commons.php";
include "../conexion.php";
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
session_start();
//p_array($_REQUEST);
//p_array($_SESSION);
$queryDispatch = "\r\ninsert into\r\n\tdispatch \r\n\t(\r\n\t\tprojectId,\r\n\t\tdispatchDate,\r\n\t\tdispatchComment,\r\n\t\tdispatchCount\r\n\t)\r\n\tvalues\r\n\t(\r\n\t\t'" . mysql_real_escape_string($_REQUEST['projectId']) . "',\r\n\t\t" . ($_REQUEST['dispatchDate'] == "" ? "now()" : "'" . to_YMD($_REQUEST['dispatchDate']) . "'") . ",\r\n\t\t'" . mysql_real_escape_string($_REQUEST['dispatchComment']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['dispatchCount']) . "'\r\n\t)";
//echo $queryDispatch;
mysql_query($queryDispatch, $conexion);
mysql_query($queryVendor, $conexion);
$vendorId = mysql_insert_id();
//echo $queryVendor;
$queryLog = "\r\ninsert into \r\n\tlog\r\n\t\t(logDate, userId, logAction, logDescription)\r\n\tvalues\r\n\t\t(NOW()," . $_SESSION['user']->id . ",1,' " . mysql_real_escape_string($_REQUEST['dispatchDate']) . " into vendors');";
/*
For Log Actions:
1 -> New (insert into)
2 -> Edit (update from)
3 -> Delete (delete from)
*/
mysql_query($queryLog, $conexion);
mysql_close($conexion);
header("Location:dispatchNew.php");
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:26,代码来源:submitNew.php


示例13: ini_set

<?php

include "../commons.php";
include "../conexion.php";
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
session_start();
//p_array($_REQUEST);
//p_array($_SESSION);
$coordinates = getCoordinates("{$_REQUEST['addressLine1']} {$_REQUEST['addressZip']} {$_REQUEST['addressCity']} {$_REQUEST['addressState']}");
$queryAddress = "\r\ninsert into\r\n\taddress \r\n\t(\r\n\t\taddressLine1,\r\n\t\taddressLine2,\r\n\t\taddressCity,\r\n\t\taddressState,\r\n\t\taddressZip,\r\n\t\taddressPOBox,\r\n\t\taddressLat,\r\n\t\taddressLong\r\n\t)\r\n\tvalues\r\n\t(\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressLine1']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressLine2']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressCity']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressState']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressZip']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['addressPOBox']) . "',\r\n\t\t'" . $coordinates[0] . "',\r\n\t\t'" . $coordinates[1] . "'\r\n\t)";
//insert
mysql_query($queryAddress, $conexion);
$addressId = mysql_insert_id();
$queryBroker = "\r\ninsert into\r\n\tbroker\r\n\t(\r\n\t\tbrokerPid,\r\n\t\tbrokerName,\r\n\t\tbrokerContactName,\r\n\t\taddressId,\r\n\t\tbrokerTax,\r\n\t\tbrokerTel,\r\n\t\tbrokerFax,\r\n\t\tbrokerRadio,\r\n\t\tbrokerMobile,\r\n\t\tcarrierId,\r\n\t\tbrokerEmail,\r\n\t\tbrokerIccCert,\r\n\t\tbrokerInsuranceWc,\r\n\t\tbrokerWcExpire,\r\n\t\tbrokerInsuranceLiability,\r\n\t\tbrokerLbExpire,\r\n\t\tbrokerGeneralLiability,\r\n\t\tbrokerGlExp,\r\n\t\tbrokerStartDate,\r\n\t\tbrokerStatus,\r\n\t\tbrokerPercentage,\r\n\t\tbrokerGender,\r\n\t\tethnicId,\r\n\t\ttermId\r\n\t)\r\n\tvalues\r\n\t(\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerPid']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerName']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerContactName']) . "',\r\n\t\t'" . mysql_real_escape_string($addressId) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerTax']) . "',\r\n\t\t'" . mysql_real_escape_string(cleanPhoneNumber($_REQUEST['brokerTel'])) . "',\r\n\t\t'" . mysql_real_escape_string(cleanPhoneNumber($_REQUEST['brokerFax'])) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerRadio']) . "',\r\n\t\t'" . mysql_real_escape_string(cleanPhoneNumber($_REQUEST['brokerMobile'])) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['carrierId']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerMail']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerIccCert']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerInsWc']) . "',\r\n\t\t'" . mysql_real_escape_string(to_YMD($_REQUEST['brokerWcExpire'])) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerInsLiability']) . "',\r\n\t\t'" . mysql_real_escape_string(to_YMD($_REQUEST['brokerLbExpire'])) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerGeneralLiability']) . "',\r\n\t\t'" . mysql_real_escape_string(to_YMD($_REQUEST['brokerGlExp'])) . "',\r\n\t\t'" . mysql_real_escape_string(to_YMD($_REQUEST['startupDate'])) . "',\r\n\t\t'1',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerPercentage']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['brokerGender']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['ethnicId']) . "',\r\n\t\t'" . mysql_real_escape_string($_REQUEST['termId']) . "'\r\n\t)";
//echo $queryBroker;
mysql_query($queryBroker, $conexion);
$brokerId = mysql_insert_id();
if (!is_dir("../../archive/brokerId{$brokerId}")) {
    mkdir("../../archive/brokerId{$brokerId}");
}
$queryLog = "\r\ninsert into \r\n\tlog\r\n\t\t(logDate, userId, logAction, logDescription)\r\n\tvalues\r\n\t\t(NOW()," . $_SESSION['user']->id . ",1,' " . mysql_real_escape_string($_REQUEST['customerName']) . " into customers');";
/*
For Log Actions:
1 -> New (insert into)
2 -> Edit (update from)
3 -> Delete (delete from)
*/
mysql_query($queryLog, $conexion);
mysql_close($conexion);
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:submitBroker.php


示例14: ini_set

<?php

include "../commons.php";
include "../conexion.php";
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
session_start();
//p_array($_REQUEST);
//p_array($_SESSION);
$brokerId = $_REQUEST['brokerId'];
$driverId = $_REQUEST['driverId'];
$fromDate = to_YMD($_REQUEST['reportStartDate']);
$toDate = $_REQUEST['reportEndDate'] != "" ? to_YMD($_REQUEST['reportEndDate']) : date('Y-m-d');
//$fromDate = '2012-11-05';
//$toDate = '2013-02-10';
//echo $fromDate;
//echo "<br/>";
//echo $toDate;
//echo "<br/>";
//$firstSunday = strtotime('last Sunday', strtotime($fromDate));
//echo date('Y-m-d',$firstSunday);
$firstSunday = isSunday($fromDate) ? $fromDate : lastSunday($fromDate);
//echo $firstSunday;
$thisSunday = $firstSunday;
$nextSaturday = getNextSaturday($fromDate);
while (strtotime($thisSunday) <= strtotime($toDate)) {
    //echo $thisSunday." __ ".$nextSaturday."<br/>";
    //check for tickets
    $queryTickets = "\r\n\t\tSELECT\r\n\t\t\t*\r\n\t\tFROM\r\n\t\t\tticket\r\n\t\t\tJOIN truck using (truckId)\r\n\t\t\tLEFT JOIN reportticket using (ticketId)\r\n\t\tWHERE\r\n\t\t\tticketDate BETWEEN '{$thisSunday}' AND '{$nextSaturday}'\r\n\t\t\tAND reportId is null\r\n\t\t\tAND brokerId = {$brokerId} \r\n\t\t\t" . ($driverId != 0 ? " AND driverId = " . $driverId : "") . "\r\n\t";
    //echo $queryTickets."<br/>";
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:submitReport.php


示例15: array

<td>
</td>
<td>
</td>
</tr>
</table>

<br>
<table align="center" class="report" width="100%" cellspacing="0" >

<?php 
$total = 0;
$count = 0;
$tableBody = "";
$tablearray = array();
$invoicesQuery = "select * from invoice where invoiceDate \r\nBETWEEN '" . to_YMD($startDate) . "' AND '" . to_YMD($endDate) . "'";
$invoicesReg = mysql_query($invoicesQuery, $conexion);
$num = mysql_num_rows($invoicesReg);
if (mysql_num_rows($invoicesReg) > 0) {
    $totalIncome = 0;
    $totalBrokerExpense = 0;
    $totalMaterialExpense = 0;
    while ($invoice = mysql_fetch_assoc($invoicesReg)) {
        $invoiceId = $invoice['invoiceId'];
        $ticketsQuery = "select * from invoiceticket where invoiceId={$invoiceId}";
        $ticketsReg = mysql_query($ticketsQuery, $conexion);
        if (mysql_num_rows($ticketsReg) > 0) {
            while ($invTicket = mysql_fetch_assoc($ticketsReg)) {
                $ticketId = $invTicket['ticketId'];
                $ticketQuery = "select * from ticket join item using (itemId) where ticketId = {$ticketId}";
                $ticketReg = mysql_query($ticketQuery, $conexion);
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:showDateProfit.php


示例16: session_start

<?php

include "../commons.php";
session_start();
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
//p_array($_REQUEST);
//p_array($_SESSION);
$coordinates = getCoordinates("{$_REQUEST['addressLine1']} {$_REQUEST['addressZip']} {$_REQUEST['addressCity']} {$_REQUEST['addressState']}");
$queryAddress = "\r\nUPDATE\r\n\taddress \r\nSET\r\n\t\taddressLine1='" . mysql_real_escape_string($_REQUEST['addressLine1']) . "',\r\n\t\taddressLine2='" . mysql_real_escape_string($_REQUEST['addressLine2']) . "',\r\n\t\taddressCity='" . mysql_real_escape_string($_REQUEST['addressCity']) . "',\r\n\t\taddressState='" . mysql_real_escape_string($_REQUEST['addressState']) . "',\r\n\t\taddressZip='" . mysql_real_escape_string($_REQUEST['addressZip']) . "',\r\n\t\taddressPOBox='" . mysql_real_escape_string($_REQUEST['addressPOBox']) . "',\r\n\t\taddressLat='" . $coordinates[0] . "',\r\n\t\taddressLong='" . $coordinates[1] . "'\r\nWHERE\r\n\t\taddressId=" . $_REQUEST['a'] . "\r\n\t\t";
//echo $queryAddress;
mysql_query($queryAddress, $conexion);
$queryBroker = "\r\nUPDATE\r\n\tdriver\r\nSET\r\n\t\tdriverFirstName='" . mysql_real_escape_string($_REQUEST['driverFirstName']) . "',\r\n\t\tdriverLastName='" . mysql_real_escape_string($_REQUEST['driverLastName']) . "',\r\n\t\tdriverMobile='" . cleanPhoneNumber(mysql_real_escape_string($_REQUEST['driverMobile'])) . "',\r\n\t\tcarrierId='" . mysql_real_escape_string($_REQUEST['carrierId']) . "',\r\n\t\tdriverEmail='" . mysql_real_escape_string($_REQUEST['driverMail']) . "',\r\n\t\tdriverSSN='" . mysql_real_escape_string($_REQUEST['driverSSN']) . "',\r\n\t\tdriverPercentage='" . mysql_real_escape_string($_REQUEST['driverPercentage']) . "',\r\n\t\tdriverStartDate='" . to_YMD(mysql_real_escape_string($_REQUEST['driverStartDate'])) . "',\r\n\t\tdriverStatus='" . mysql_real_escape_string($_REQUEST['driverStatus']) . "',\r\n\t\tdriverTel='" . cleanPhoneNumber(mysql_real_escape_string($_REQUEST['driverTel'])) . "',\r\n\t\ttermId ='" . mysql_real_escape_string($_REQUEST['termId']) . "',\r\n\t\tethnicId ='" . mysql_real_escape_string($_REQUEST['ethnicId']) . "',\r\n\t\tworkId ='" . mysql_real_escape_string($_REQUEST['workId']) . "',\r\n\t\tdriverClass ='" . mysql_real_escape_string($_REQUEST['driverClass']) . "',\r\n\t\tdriverGender ='" . mysql_real_escape_string($_REQUEST['driverGender']) . "',\r\n\t\tdriverPW ='" . mysql_real_escape_string($_REQUEST['driverPW']) . "',\r\n\t\tunionId ='" . mysql_real_escape_string($_REQUEST['unionId']) . "'\r\nWHERE\r\n\t\tdriverId=" . $_REQUEST['i'] . "\r\n\t\t";
//echo $queryBroker;
mysql_query($queryBroker, $conexion);
//if($_REQUEST['driverRemaining731']>0){
$firstRemaining = mysql_fetch_assoc(mysql_query("select * from remainings_731 where driverId=" . $_REQUEST['i'] . " and remainingStartDate='0000-00-00' limit 1", $conexion));
if ($firstRemaining != null) {
    //update
    mysql_query("update remainings_731 set remainingValue='" . mysql_real_escape_string($_REQUEST['driverRemaining731']) . "' where driverId=" . $_REQUEST['i'] . " and remainingStartDate='0000-00-00' ", $conexion);
    //echo "update remainings_731 set remainingValue='".mysql_real_escape_string($_REQUEST['driverRemaining731'])."' where driverId=".$_REQUEST['i']." and remainingStartDate='0000-00-00' ";
} else {
    //insert
    mysql_query("insert into remainings_731 (driverId,remainingValue) values (" . $_REQUEST['i'] . "," . mysql_real_escape_string($_REQUEST['driverRemaining731']) . ")", $conexion);
}
//}
$queryLog = "\r\ninsert into \r\n\tlog\r\n\t\t(logDate, userId, logAction, logDescription)\r\n\tvalues\r\n\t\t(NOW()," . $_SESSION['user']->id . ",2,' " . mysql_real_escape_string($_REQUEST['driverName']) . " into drivers');";
/*
For Log Actions:
1 -> New (insert into)
开发者ID:jscasca,项目名称:mfrogs_trucking,代码行数:31,代码来源:submitEditDriver.php


示例17: ini_set

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP to_array函数代码示例发布时间:2022-05-23
下一篇:
PHP to_MDY函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap