本文整理汇总了PHP中updateDate函数的典型用法代码示例。如果您正苦于以下问题:PHP updateDate函数的具体用法?PHP updateDate怎么用?PHP updateDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updateDate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: session_start
<?php
include '../includes/db.php';
require_once '../includes/connecti.php';
/** @var $mysqli mysqli */
require_once '../includes/funcs.inc.php';
include '../includes/JSON.php';
session_start();
$conn = oci_connect($db_user, $db_pass, $db_host);
$selected_company_id = $_SESSION['company_id'];
ob_start();
dump($_POST);
$data = array();
updateDate('purchase', $_POST['purchase_shipping_date']);
$year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true);
$first_colval = "";
$seprator = "";
$last_part = "";
$first_part = "";
$first_tab_ins = "";
foreach ($_POST as $key => $val) {
if (strlen($val) > 0) {
if (substr($key, 0, 9) == "purchase_" && $key != "purchase_supplier" && $key != "purchase_godown" && $key != "purchase_acc_code" && $key != "purchase_notype" && $key != "purchase_id" && $key != "purchase_currency_value") {
if (strlen($key) > 18 && substr($key, 0, 18) == "purchase_shipment_" || strlen($key) > 14 && substr($key, 0, 14) == "purchase_bank_") {
// do nothing with these values, will be handled further ahead.
} else {
if ($key == "purchase_shipping_date") {
$key = "shipping_date";
$val = my_sql_date($val);
}
if ($key == "purchase_receive_date") {
示例2: getReportTitle
<?php
@session_start();
require_once '../includes/connecti.php';
/** @var $mysqli mysqli */
/** @var $result mysqli_result */
require_once '../includes/funcs.inc.php';
$_title = getReportTitle();
if (isset($_GET['report']) && $_GET['report'] == 'true') {
updateDate('rpt_purchase_invoice_start', $_GET['date_start']);
updateDate('rpt_purchase_invoice_end', $_GET['date_end']);
require_once '../includes/PDFReport.class.php';
class PDF extends PDFReport
{
function printHeader()
{
global $showimport, $recDate, $shipDate, $godown, $partyName, $pid, $billNo;
$this->SetFont('Arial', 'B', 10);
$col1 = 30;
$col2 = 50;
$col3 = 30;
$col4 = 50;
$xspace = 80 - $col2;
$pdata = array("Invoice #", $pid, "Bill No", $billNo, "Vendor", $partyName, "Warehouse", $godown, "Ship Date", $shipDate, "Receive Date", $recDate);
for ($i = 0; $i < count($pdata); $i += 4) {
$border = "0";
if (strlen($pdata[$i + 0]) > 0) {
$border = 'B';
}
$this->Cell($col1, 6, $pdata[$i + 0], 0, 0, 'L');
$this->Cell($col2, 6, $pdata[$i + 1], $border, 0, 'L');
示例3: getReportTitle
@session_start();
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
$_title = getReportTitle();
if (isset($_GET['report'])) {
$date_start = "";
if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) {
$date_start = $_GET['date_start'];
}
$date_end = "";
if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) {
$date_end = $_GET['date_end'];
}
updateDate('rpt_party_ledger_start', $date_start);
updateDate('rpt_party_ledger_end', $date_end);
$accounts = array();
foreach ($_GET['account'] as $account) {
if ($account == '#ALL#') {
continue;
}
$accounts[] = $account;
}
if (count($accounts) == 0) {
//all was selected
require_once '../includes/connect.php';
$items = mysql_query("SELECT coa.account_ref_id\n" . " FROM chart_of_account coa\n" . " INNER JOIN party p ON p.account_ref_id = coa.account_ref_id\n" . " WHERE p.party_city = '{$_GET['city']}'\n" . " AND coa.company_ref_id = {$_SESSION['company_id']}\n" . "ORDER BY account_name");
while ($row = mysql_fetch_assoc($items)) {
$accounts[] = $row['account_ref_id'];
}
}
示例4: session_start
<?php
session_start();
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
/** @var $mysqli mysqli */
/** @var $result mysqli_result */
$_title = getReportTitle();
if (isset($_GET['report'])) {
updateDate('rpt_inventory_movement_start', $_GET['date1']);
updateDate('rpt_inventory_movement_end', $_GET['date2']);
$item = array();
$result = $mysqli->query("SELECT im.i_code, im.cno, im.manufacturer_no, im.description, im.company_ref_id FROM item_master im WHERE i_code = {$_GET['item_hidden']}");
if ($row = $result->fetch_assoc()) {
$item = $row;
}
$date1 = $_GET['date1'];
if (strlen($date1) < 1) {
$date1 = getFinancialStartDate();
}
$where = " AND TO_DAYS(trans_date) >= TO_DAYS('" . my_sql_date($date1) . "')\n";
if (strlen($_GET['date2']) > 0) {
$where .= " AND TO_DAYS(trans_date) <= TO_DAYS('" . my_sql_date($_GET['date2']) . "')\n";
}
$data = array();
$result = $mysqli->query("SELECT g.g_name FROM godown g WHERE g.company_ref_id = {$item['company_ref_id']}");
while ($row = $result->fetch_assoc()) {
$gname = $row['g_name'];
$data["{$gname}"] = array();
$data["{$gname}"]['total'] = (double) 0;
$data["{$gname}"]['opening_balance'] = (double) 0;
示例5: session_start
session_start();
require_once '../includes/connect.php';
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
$_title = getReportTitle();
if (isset($_GET['report'])) {
$date_start = "";
if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) {
$date_start = $_GET['date_start'];
}
$date_end = "";
if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) {
$date_end = $_GET['date_end'];
}
updateDate('rpt_ledger_class_start', $date_start);
updateDate('rpt_ledger_class_end', $date_end);
$accounts = array();
$items = mysql_query("SELECT coa.account_ref_id\n" . " FROM chart_of_account coa\n" . " WHERE coa.account_class = '{$_GET['account_class']}'\n" . " AND coa.company_ref_id = {$_SESSION['company_id']}\n" . "ORDER BY account_name");
while ($row = mysql_fetch_assoc($items)) {
$accounts[] = $row['account_ref_id'];
}
$ledger = array();
foreach ($accounts as $account) {
$ledger[] = getLedgerData($account, $_GET['report'], $date_start, $date_end);
}
$mysqli->close();
if ($_GET['report'] == 'pdf') {
include_once '../reports/ledger.pdf.php';
} else {
if ($_GET['report'] == 'xls') {
include_once '../reports/ledger.xls.php';
示例6: ob_start
<?php
include '../includes/connect.php';
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
/** @var $mysqli mysqli */
/** @var $result mysqli_result */
include '../includes/JSON.php';
@session_start();
$selected_company_id = $_SESSION['company_id'];
$login_user_name = $_SESSION['user_name'];
ob_start();
dump($_POST);
$data = array();
updateDate('cash_book', $_POST['cash_book_date']);
$cash_book_date = my_sql_date($_POST['cash_book_date']);
if ($_POST['oper'] == 'delete') {
$cash_book_id = $_POST['cb_id'];
$voucher_id = getValue("voucher_id", "voucher_detail", "voucher_id = (SELECT voucher_id FROM cash_book WHERE cb_id = {$cash_book_id})", true);
d_mysql_query("DELETE FROM voucher_detail WHERE voucher_id = {$voucher_id}");
d_mysql_query("DELETE FROM voucher_master WHERE voucher_id = {$voucher_id}");
d_mysql_query("DELETE FROM cash_book WHERE cb_id = {$cash_book_id}");
} else {
$v_cash_acc_id = $_POST['cash_book_id'];
$year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true);
$counter = $_POST['counter'] * 1;
for ($i = 1; $i <= $counter; $i++) {
$account_code = $_POST["account_" . $i . "_hidden"];
$cash_book_ammount = 0;
$cash_book_type = "";
if (isset($_POST["inp3_{$i}"])) {
示例7: session_start
session_start();
$conn = oci_connect($db_user, $db_pass, $db_host);
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
$_title = getReportTitle();
if (isset($_GET['report'])) {
$date_start = "";
if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) {
$date_start = $_GET['date_start'];
}
$date_end = "";
if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) {
$date_end = $_GET['date_end'];
}
updateDate('rpt_account_outstanding_start', $date_start);
updateDate('rpt_account_outstanding_end', $date_end);
$outstanding = array();
$outstanding[] = getOutstandingData($_GET['account_category'], $_GET['report'], $date_start, $date_end, false);
$mysqli->close();
if ($_GET['report'] == 'pdf') {
include_once '../reports/outstanding.pdf.php';
} else {
if ($_GET['report'] == 'xls') {
include_once '../reports/outstanding.xls.php';
}
}
} else {
?>
<!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>
示例8: session_start
<?php
session_start();
$conn = oci_connect($db_user, $db_pass, $db_host);
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
/** @var $mysqli mysqli */
/** @var $result mysqli_result */
$_title = getReportTitle();
if (isset($_GET['report']) && $_GET['report'] == 'true') {
updateDate('rpt_sales_invoice_start', $_GET['date_start']);
updateDate('rpt_sales_invoice_end', $_GET['date_end']);
require_once '../includes/PDFReport.class.php';
require_once '../includes/fpdf.rotate.php';
class PDF extends PDFReport
{
function printHeader()
{
global $title, $invoice, $partyName, $billno, $partyCity, $date, $billteNo, $transporter, $address, $godown, $aob, $amt;
$this->SetFillColor(255, 255, 255);
$col1 = 20;
$col2 = 60;
$col3 = 15;
$col4 = 20;
$col5 = 25;
$col6 = 30;
$xspace = 10;
$pdata = array();
if ($partyName != 'Cash') {
$pdata = array("Customer", $partyName, "Inv#", $invoice, "Date", $date, "Address", $address, "Bilty #", $billteNo, "Amount this Bill", number_format($amt, 0), "City", $partyCity, "Challan#", $billno, "Previous Balance", number_format($aob, 0), "Transporter", $transporter, "Godown", $godown, "Total Balance", number_format($aob + $amt, 0));
} else {
示例9: session_start
<?php
session_start();
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
$_title = getReportTitle();
if (isset($_GET['report'])) {
updateDate('rpt_godown_stock_start', $_GET['date1']);
updateDate('rpt_godown_stock_end', $_GET['date2']);
if ($_GET['detail'] == 'detail') {
include_once '../reports/godown_stock_old.php';
} else {
if ($_GET['detail'] == 'compact') {
include_once '../reports/godown_stock_new.php';
}
}
} else {
?>
<!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>
<link rel="shortcut icon" href="../images/logo_icon.gif">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../stylesheets/style.css" rel="stylesheet" type="text/css" />
<title><?php
echo $_SESSION['companyname'];
?>
- Reports</title>
<?php
include '../includes/js.php';
?>
示例10: session_start
<?php
include '../includes/connect.php';
include_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
include '../includes/JSON.php';
session_start();
$selected_company_id = $_SESSION['company_id'];
ob_start();
dump($_POST);
$data = array();
updateDate('delivery_chalan', $_POST['delivery_date']);
$year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true);
$first_colval = "";
$seprator = "";
$last_part = "";
$first_part = "";
$first_tab_ins = "";
foreach ($_POST as $key => $val) {
if (strlen($val) > 0) {
if ($key == "delivery_date" || $key == "delivery_party_hidden" || $key == "delivery_godown_hidden" || $key == "delivery_billno" || $key == "delivery_remarks") {
if ($key == "delivery_date") {
$val = my_sql_date($val);
}
if ($key == "delivery_party_hidden") {
$key = "party_code";
}
if ($key == "delivery_godown_hidden") {
$key = "g_code";
}
if ($key == "delivery_billno") {
示例11: getReportTitle
@session_start();
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
$_title = getReportTitle();
if (isset($_GET['report'])) {
$date_start = "";
if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) {
$date_start = $_GET['date_start'];
}
$date_end = "";
if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) {
$date_end = $_GET['date_end'];
}
updateDate('rpt_account_ledger_start', $date_start);
updateDate('rpt_account_ledger_end', $date_end);
$ledger = array();
$ledger[] = getLedgerData_summary($_GET['account_hidden'], $_GET['report'], $date_start, $date_end);
$mysqli->close();
if ($_GET['report'] == 'pdf') {
include_once '../reports/ledger_summary.pdf.php';
} else {
if ($_GET['report'] == 'xls') {
include_once '../reports/ledger_summary.xls.php';
} else {
if ($_GET['report'] == 'htm') {
include '../includes/JSON.php';
$json = new Services_JSON();
$output = $json->encode($ledger);
print $output;
}
示例12: session_start
<?php
session_start();
$conn = oci_connect($db_user, $db_pass, $db_host);
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
/** @var $mysqli mysqli */
/** @var $result mysqli_result */
$_title = getReportTitle();
if (isset($_GET['report']) && $_GET['report'] == 'true') {
updateDate('rpt_sales_return_start', $_GET['date1']);
updateDate('rpt_sales_return_end', $_GET['date2']);
require_once '../includes/PDFReport.class.php';
class PDF extends PDFReport
{
function printHeader()
{
global $date, $billNo, $partyName;
$this->SetFont('Arial', 'B', 8);
$col1 = 30;
$col2 = 50;
$col3 = 30;
$col4 = 50;
$xspace = 80 - $col2;
$pdata = array("Date", $date, "Bill #", $billNo, "Party", $partyName, "", "");
for ($i = 0; $i < count($pdata); $i += 4) {
$border = "0";
if (strlen($pdata[$i + 0]) > 0) {
$border = 'B';
}
$this->Cell($col1, 6, $pdata[$i + 0], 0, 0, 'L');
示例13: getReportTitle
require_once '../includes/connecti.php';
require_once '../includes/funcs.inc.php';
/** @var $mysqli mysqli */
/** @var $result mysqli_result */
$_title = getReportTitle();
if (isset($_GET['report'])) {
$date_start = "";
if (isset($_GET['date_start']) && strlen($_GET['date_start']) > 0) {
$date_start = $_GET['date_start'];
}
$date_end = "";
if (isset($_GET['date_end']) && strlen($_GET['date_end']) > 0) {
$date_end = $_GET['date_end'];
}
updateDate('rpt_account_class_start', $date_start);
updateDate('rpt_account_class_end', $date_end);
$outstanding = array();
$outstanding[] = getOutstandingData($_GET['account_class'], $_GET['report'], $date_start, $date_end, false, true);
$mysqli->close();
if ($_GET['report'] == 'pdf') {
include_once '../reports/outstanding.pdf.php';
} else {
if ($_GET['report'] == 'xls') {
include_once '../reports/outstanding.xls.php';
}
}
} else {
?>
<!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>
示例14: session_start
<?php
include '../includes/connect.php';
include_once '../includes/connecti.php';
/** @var $mysqli mysqli */
require_once '../includes/funcs.inc.php';
include '../includes/JSON.php';
session_start();
$selected_company_id = $_SESSION['company_id'];
ob_start();
dump($_POST);
$data = array();
updateDate('sales_return', $_POST['sales_return_date']);
$year_id = getValue("year_id", "sys_financial_year", "company_ref_id = {$selected_company_id} AND is_active = 'Yes'", true);
$first_colval = "";
$seprator = "";
$last_part = "";
$first_part = "";
$first_tab_ins = "";
foreach ($_POST as $key => $val) {
if (strlen($val) > 0) {
if ($key == "sales_return_date" || $key == "sales_return_remarks" || $key == "sales_return_party_hidden" || $key == "sales_return_billno" || $key == "sales_return_type" || $key == "sales_return_godown_hidden") {
if ($key == "sales_return_date") {
$key = "rsale_date";
$val = my_sql_date($val);
}
if ($key == "sales_return_party_hidden") {
$key = "party_code";
}
if ($key == "sales_return_godown_hidden") {
$key = "g_code";
示例15: session_start
<?php
session_start();
require_once '../includes/connecti.php';
/** @var $mysqli mysqli */
/** @var $result mysqli_result */
require_once '../includes/funcs.inc.php';
$_title = getReportTitle();
if (isset($_GET['report'])) {
updateDate('rpt_cash_movement_start', $_GET['date_start']);
updateDate('rpt_cash_movement_end', $_GET['date_end']);
$data = array();
$tdata = array();
$accounts_classes = array('BANKS' => 'Karachi Region', 'LHR BANKS' => 'Lahore Region');
foreach ($accounts_classes as $accounts_class => $accounts_class_name) {
$sdata = array();
$openingBalance = (double) 0;
$sql = "SELECT coa.account_ref_id FROM chart_of_account coa WHERE coa.account_class = '{$accounts_class}' AND coa.company_ref_id = {$_SESSION['company_id']}";
$result = $mysqli->query($sql);
while ($row = $result->fetch_assoc()) {
$aob = getOpeningBalance($row['account_ref_id'], $_GET['date_start']);
$openingBalance += $aob;
}
$sdata[] = array('account_name' => $accounts_class . " OPEN BAL", 'amount' => $openingBalance);
$runningBalance = (double) 0;
$sql = "" . "SELECT IFNULL(SUM(vd.debit_amount), 0) bal\n" . " FROM voucher_detail vd\n" . " INNER JOIN voucher_master vm ON vm.voucher_id = vd.voucher_id\n" . " WHERE TO_DAYS(vm.voucher_date) >= TO_DAYS('" . my_sql_date($_GET['date_start']) . "')\n" . " AND TO_DAYS(vm.voucher_date) <= TO_DAYS('" . my_sql_date($_GET['date_end']) . "')\n" . " AND vd.account_ref_id IN (SELECT coa.account_ref_id FROM chart_of_account coa WHERE coa.account_class = '{$accounts_class}' AND coa.company_ref_id = vm.company_ref_id)\n" . " AND vm.company_ref_id = {$_SESSION['company_id']}\n";
$result = $mysqli->query($sql);
if ($row = $result->fetch_assoc()) {
$runningBalance += $row['bal'] * 1;
}
$sdata[] = array('account_name' => $accounts_class, 'amount' => $runningBalance);