本文整理汇总了PHP中tanggalsystem函数的典型用法代码示例。如果您正苦于以下问题:PHP tanggalsystem函数的具体用法?PHP tanggalsystem怎么用?PHP tanggalsystem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tanggalsystem函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Header
function Header()
{
global $conn;
global $dbname;
global $userid;
global $kdOrg;
global $tgl;
global $akhirY;
global $akhirYline;
$sInduk = "select induk from " . $dbname . ".organisasi where kodeorganisasi='" . $kdOrg . "'";
$qInduk = mysql_query($sInduk) or die(mysql_error());
$rInduk = mysql_fetch_assoc($qInduk);
// $str1="select * from ".$dbname.".organisasi where kodeorganisasi='".$rInduk['induk']."'";
$str1 = "select * from " . $dbname . ".organisasi where kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'";
$res1 = mysql_query($str1);
while ($bar1 = mysql_fetch_object($res1)) {
$nama = $bar1->namaorganisasi;
$alamatpt = $bar1->alamat . ", " . $bar1->wilayahkota;
$telp = $bar1->telepon;
}
$sIsi = "select * from " . $dbname . ".sdm_absensiht where kodeorg='" . $kdOrg . "' and tanggal='" . tanggalsystem($tgl) . "'";
$qIsi = mysql_query($sIsi) or die(mysql_error());
$rIsi = mysql_fetch_assoc($qIsi);
$sOrg = "select namaorganisasi from " . $dbname . ".organisasi where kodeorganisasi='" . $rIsi['kodeorg'] . "'";
$qOrg = mysql_query($sOrg) or die(mysql_error());
$rOrg = mysql_fetch_assoc($qOrg);
$path = 'images/logo.jpg';
$this->Image($path, 15, 10, 20);
$this->SetFont('Arial', 'B', 10);
$this->SetFillColor(255, 255, 255);
$this->SetX(40);
$this->Cell(60, 5, $nama, 0, 1, 'L');
$this->SetX(40);
$this->MultiCell(150, 5, $alamatpt, 0);
//$this->Cell(60,5,$alamatpt,0,1,'L');
$this->SetX(40);
$this->Cell(60, 5, "Tel: " . $telp, 0, 1, 'L');
$this->Ln();
$this->SetFont('Arial', 'B', 8);
$this->Cell(20, 5, $nama, '', 1, 'L');
$this->SetFont('Arial', '', 8);
$akhirY = $this->GetY() - 5;
$this->Line(10, $akhirY, 200, $akhirY);
$akhirYline = $this->GetY();
$this->SetY($akhirYline);
$this->Cell(35, 5, $_SESSION['lang']['kodeorg'], '', 0, 'L');
$this->Cell(2, 5, ':', '', 0, 'L');
$this->Cell(75, 5, $rIsi['kodeorg'], '', 0, 'L');
$this->Cell(25, 5, $_SESSION['lang']['nm_perusahaan'], '', 0, 'L');
$this->Cell(2, 5, ':', '', 0, 'L');
$this->Cell(35, 5, $rOrg['namaorganisasi'], 0, 1, 'L');
$this->Cell(35, 5, $_SESSION['lang']['tanggal'], '', 0, 'L');
$this->Cell(2, 5, ':', '', 0, 'L');
$this->Cell(75, 5, $tgl, '', 0, 'L');
$this->Cell(25, 5, $_SESSION['lang']['periode'], '', 0, 'L');
$this->Cell(2, 5, ':', '', 0, 'L');
$this->Cell(35, 5, substr(tanggalnormal($rIsi['periode']), 1, 7), 0, 1, 'L');
$this->Ln();
}
示例2: genNoJournal
/**
* genNoJournal
* Generate Nomor Jurnal
*/
public function genNoJournal($tanggal, $kodeUnit, $kodeJurnal, $counter)
{
if (substr($tanggal, 2, 1) == '-') {
$tanggal = tanggalsystem($tanggal);
} elseif (substr($tanggal, 4, 1) == '-') {
$tanggal = str_replace('-', '', $tanggal);
}
$nojurnal = $tanggal . '/' . $kodeUnit . '/' . $kodeJurnal . '/' . str_pad($counter + 1, 3, '0', STR_PAD_LEFT);
return $nojurnal;
}
示例3: tanggalsystem
<?php
require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
require_once 'lib/zLib.php';
require_once 'lib/fpdf.php';
require_once 'lib/terbilang.php';
$lksiTgs = $_SESSION['empl']['lokasitugas'];
$_POST['unitId'] == '' ? $kdOrg = $_GET['unitId'] : ($kdOrg = $_POST['unitId']);
$_POST['tglDari'] == '' ? $tglDari = tanggalsystem($_GET['tglDari']) : ($tglDari = tanggalsystem($_POST['tglDari']));
$_POST['tglSmp'] == '' ? $tglSmp = tanggalsystem($_GET['tglSmp']) : ($tglSmp = tanggalsystem($_POST['tglSmp']));
$_GET['proses'] == '' ? $proses = $_POST['proses'] : ($proses = $_GET['proses']);
$optNmKar = makeOption($dbname, 'datakaryawan', 'karyawanid,namakaryawan');
$optTipeId = makeOption($dbname, 'datakaryawan', 'karyawanid,tipekaryawan');
$optTipe = makeOption($dbname, 'sdm_5tipekaryawan', 'id,tipe');
if ($kdOrg == '') {
exit("Error: Working unit required");
}
if ($tglDari == '' || $tglSmp == '') {
exit("Error: Date required");
}
function dates_inbetween($date1, $date2)
{
$day = 60 * 60 * 24;
$date1 = strtotime($date1);
$date2 = strtotime($date2);
$days_diff = round(($date2 - $date1) / $day);
// Unix time difference devided by 1 day to get total days in between
$dates_array = array();
$dates_array[] = date('Y-m-d', $date1);
示例4: isset
<?php
require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
$totalSmaData = $dsetujui = $dtolak = $dmenungguKptsn = $blmDiajukan = $pros = 0;
//======================================
$proses = isset($_GET['proses']) ? $_GET['proses'] : '';
$nopp = isset($_GET['nopp']) ? $_GET['nopp'] : '';
$tglSdt = isset($_GET['tglSdt']) ? tanggalsystem($_GET['tglSdt']) : '';
$statusPP = isset($_GET['statPP']) ? $_GET['statPP'] : '';
$periode = isset($_GET['periode']) ? $_GET['periode'] : '';
$lokBeli = isset($_GET['lokBeli']) ? $_GET['lokBeli'] : '';
//ambil namapt
$str = "select namaorganisasi from " . $dbname . ".organisasi where kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'";
$namapt = 'COMPANY NAME';
$res = mysql_query($str);
while ($bar = mysql_fetch_object($res)) {
$namapt = strtoupper($bar->namaorganisasi);
}
$stream = "<table cellspacing='1' border='0'>\r\n <tr><td colspan=10 align=center>" . strtoupper($_SESSION['lang']['riwayatPP']) . "</td></tr>\r\n <tr><td colspan=3 align='left'>" . $_SESSION['lang']['user'] . ":" . $_SESSION['standard']['username'] . "</td></tr>\r\n <tr><td colspan=3 align='left'>" . $_SESSION['lang']['tanggal'] . ":" . date('d-m-Y H:i:s') . "</td></tr></table>\r\n <table cellspacing='1' border='1'>\r\n <tr>\r\n <td bgcolor=#DEDEDE align=center>No.</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['nopp'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['tanggal'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['kodevhc'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['kodebarang'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['namabarang'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['satuan'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['jmlhDiminta'] . "</td> \r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['jumlah'] . " " . $_SESSION['lang']['disetujui'] . "</td> \r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['keterangan'] . "</td> \r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['status'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['nopo'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['tgl_po'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['status'] . " </td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['namasupplier'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['rapbNo'] . "</td>\r\n <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['tanggal'] . "</td>\r\n </tr></table><table cellspacing='1' border='1'>";
if ($nopp == '' && $tglSdt == '' && $statusPP == '' && $periode == '' && $lokBeli == '' && $_GET['supplier_id'] == '' && $_GET['txNmbrg'] == '') {
$tglSkrng = date("Y-m");
$sql = "select a.*,b.*,a.keterangan as keterangan,a.kodevhc as kodevhc FROM " . $dbname . ".log_prapodt a left join " . $dbname . ".log_prapoht b on a.nopp=b.nopp where substr(b.tanggal,1,7)='" . $tglSkrng . "' order by a.nopp desc ";
} else {
if ($tglSdt != '') {
$where = " where b.tanggal='" . $tglSdt . "'";
} else {
$where = " where a.nopp!=''";
}
if ($statusPP != '') {
示例5: checkPostGet
<?php
require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
require_once 'lib/zLib.php';
require_once 'lib/fpdf.php';
$proses = checkPostGet('proses', '');
$tipeIntex = checkPostGet('tipeIntexRe', '');
$unit = checkPostGet('unitRe', '');
$tgl_1 = checkPostGet('tglRe', '');
$tanggl = checkPostGet('tglRe', '');
$kdPabrik = checkPostGet('kdPabrikRe', '');
$optSupp = makeOption($dbname, 'log_5supplier', 'kodetimbangan,namasupplier');
$optNm = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
$XA = tanggalsystem($tanggl);
$thnA = substr($XA, 0, 4);
$blnA = substr($XA, 4, 2);
$tglA = substr($XA, 6, 2);
if ($proses != 'getKodeorg') {
//for($x=$tglA-1;$x>=0;$x--){
// $tm=mktime(0,0,0,$blnA,$tglA-$x,$thnA);
// $TGL[]=date('Y-m-d',$tm);
// if($x==$tglA-1)
// $listTGL="'".date('Y-m-d',$tm)."'";
// else
// $listTGL.=",'".date('Y-m-d',$tm)."'";
//}
for ($x = 7; $x >= 0; $x--) {
$tm = mktime(0, 0, 0, $blnA, $tglA - $x, $thnA);
$TGL[] = date('Y-m-d', $tm);
示例6: tanggalsystem
if ($_POST['tanggalpermintaan'] == '') {
$_POST['tanggalpermintaan'] = '00-00-0000';
}
if ($_POST['tanggalbayar'] == '') {
$_POST['tanggalbayar'] = '00-00-0000';
}
if ($_POST['tanggalkades'] == '') {
$_POST['tanggalkades'] = '00-00-0000';
}
if ($_POST['tanggalcamat'] == '') {
$_POST['tanggalcamat'] = '00-00-0000';
}
$tanggalpermintaan = tanggalsystem($_POST['tanggalpermintaan']);
$tanggalbayar = tanggalsystem($_POST['tanggalbayar']);
$tanggalkades = tanggalsystem($_POST['tanggalkades']);
$tanggalcamat = tanggalsystem($_POST['tanggalcamat']);
$method = $_POST['method'];
if ($method == '') {
$method = $_GET['method'];
$idlahan = $_GET['idlahan'];
$pemilik = $_GET['pemilik'];
}
switch ($method) {
case 'pdf':
$str1 = "select padid, nama from " . $dbname . ".pad_5masyarakat";
$res1 = mysql_query($str1);
while ($bar1 = mysql_fetch_object($res1)) {
$kamuspemilik[$bar1->padid] = $bar1->nama;
}
class PDF extends FPDF
{
示例7: strtotime
$day = 60 * 60 * 24;
$date1 = strtotime($date1);
$date2 = strtotime($date2);
$days_diff = round(($date2 - $date1) / $day);
// Unix time difference devided by 1 day to get total days in between
$dates_array = array();
$dates_array[] = date('Y-m-d', $date1);
for ($x = 1; $x < $days_diff; $x++) {
$dates_array[] = date('Y-m-d', $date1 + $day * $x);
}
$dates_array[] = date('Y-m-d', $date2);
return $dates_array;
}
if ($tgl_1 != '' && $tgl_2 != '') {
$tgl1 = tanggalsystem($tgl1);
$tgl22 = tanggalsystem($tgl22);
}
$test = dates_inbetween($tgl1, $tgl22);
$brdr = 0;
$bgclr = "";
if ($proses == 'excel') {
$bgclr = " bgcolor=#DEDEDE";
$brdr = 1;
}
$tab .= "<table cellpadding=1 cellspacing=1 border=" . $brdr . " class=sortable><thead>";
$tab .= "<tr>";
$tab .= "<td " . $bgclr . ">" . $_SESSION['lang']['tanggal'] . "</td>";
$tab .= "<td align=center " . $bgclr . ">Kode " . $_SESSION['lang']['station'] . "</td>";
$tab .= "<td align=center " . $bgclr . ">Nama " . $_SESSION['lang']['station'] . "</td>";
$tab .= "<td align=center " . $bgclr . ">Kode " . $_SESSION['lang']['mesin'] . "</td>";
$tab .= "<td align=center " . $bgclr . ">" . $_SESSION['lang']['nmmesin'] . "</td>";
示例8: PDF
}
}
$pdf = new PDF('P', 'pt', 'A4');
$width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
$height = 9;
$pdf->AddPage();
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', '', 7);
if ($gudang == '') {
$str = "select a.tanggal,a.tahuntanam,a.unit,a.kodeorg,sum(a.hasilkerja) as jjg,sum(a.hasilkerjakg) as berat,\r\n sum(a.upahkerja) as upah,sum(a.upahpenalty) as upahpenalty, sum(a.premibasis) as premibasis,\r\n sum(a.upahpremi) as premi,sum(a.rupiahpenalty) as penalty,count(a.karyawanid) as jumlahhk \r\n from " . $dbname . ".kebun_prestasi_vw a\r\n left join " . $dbname . ".organisasi c on substr(a.kodeorg,1,4)=c.kodeorganisasi\r\n where c.induk = '" . $pt . "' and a.tanggal between " . tanggalsystem($tgl1) . " and " . tanggalsystem($tgl2) . " \r\n and a.jurnal=1 \r\n group by a.tanggal,a.kodeorg";
} else {
$where = '';
if ($gudang != $_SESSION['empl']['lokasitugas']) {
$where = " and a.jurnal=1";
}
$str = "select a.tanggal,a.tahuntanam,a.unit,a.kodeorg,sum(a.hasilkerja) as jjg,sum(a.hasilkerjakg) as berat,\r\n sum(a.upahkerja) as upah,sum(a.upahpenalty) as upahpenalty, sum(a.premibasis) as premibasis,\r\n sum(a.upahpremi) as premi,sum(a.rupiahpenalty) as penalty,count(a.karyawanid) as jumlahhk \r\n from " . $dbname . ".kebun_prestasi_vw a\r\n where unit = '" . $gudang . "' and a.tanggal between " . tanggalsystem($tgl1) . " and " . tanggalsystem($tgl2) . " \r\n " . $where . " \r\n group by a.tanggal, a.kodeorg";
}
$res = mysql_query($str);
$no = 0;
$totberat = $totUpah = $totUpahpenalty = $totJjg = $totPremi = $totPremibasis = $totHk = $totPenalty = 0;
while ($bar = mysql_fetch_object($res)) {
$periode = date('Y-m-d H:i:s');
$tanggal = $bar->tanggal;
$kodeorg = $bar->kodeorg;
$no += 1;
$pdf->Cell(3 / 100 * $width, $height, $no, 1, 0, 'C', 1);
$pdf->Cell(8 / 100 * $width, $height, tanggalnormal($tanggal), 1, 0, 'C', 1);
$pdf->Cell(6 / 100 * $width, $height, substr($kodeorg, 0, 6), 1, 0, 'L', 1);
$pdf->Cell(10 / 100 * $width, $height, $kodeorg, 1, 0, 'L', 1);
$pdf->Cell(8 / 100 * $width, $height, $bar->tahuntanam, 1, 0, 'C', 1);
$pdf->Cell(6 / 100 * $width, $height, number_format($bar->jjg, 0), 1, 0, 'R', 1);
示例9: exit
if ($data['hutangunit'] == 1 and ($data['pemilikhutang'] == '' or $data['noakunhutang'] == '')) {
exit("Error: Silakan melengkapi data hutang.");
}
if ($data['hutangunit'] == '') {
$data['hutangunit'] = 0;
}
$where = "notransaksi='" . $data['notransaksi'] . "' and kodeorg='" . $data['kodeorg'] . "' and noakun='" . $data['oldNoakun'] . "' and tipetransaksi='" . $data['tipetransaksi'] . "'";
$wheredt = "notransaksi='" . $data['notransaksi'] . "' and kodeorg='" . $data['kodeorg'] . "'";
$datadt['noakun2a'] = $param['noakun'];
$datadt['matauang'] = $param['matauang'];
$datadt['kurs'] = $param['kurs'];
unset($data['notransaksi']);
unset($data['kodeorg']);
unset($data['oldNoakun']);
unset($data['tipetransaksi']);
$data['tanggal'] = tanggalsystem($data['tanggal']);
$data['jumlah'] = str_replace(',', '', $data['jumlah']);
$query = updateQuery($dbname, 'keu_kasbankht', $data, $where);
$querydt = updateQuery($dbname, 'keu_kasbankdt', $datadt, $wheredt);
if (!mysql_query($query)) {
echo "DB Error ht : " . mysql_error();
} else {
if (!mysql_query($querydt)) {
echo "DB Error dt : " . mysql_error();
} else {
echo 'Done.';
}
}
// tadinya ga pake else echo Done, tapi kalo ga pake update-annya ga kesimpen. koq bisa ya?
// tambahan querydt untuk ngupdate noakun2a kasbankdt
break;
示例10: makeOption
$nmBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang');
$satBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,satuan');
$stPp = array("0" => "Proses Persetujuan", "1" => "sudah selesai di sisi user", "2" => "PP sudah bisa di PO", "3" => "Ditolak");
$stPo = array("0" => "Belum Selesai", "1" => "sudah selesai dan diajukan", "2" => "sudah dapat di kirim(persetujuan selesai)", "3" => "barang sudah ada yang masuk gudang");
$proses = $_GET['proses'];
$nopp = $_POST['nopp'];
$tgl = tanggalsystem($_POST['tgl']);
$per = $_POST['per'];
$lok = $_POST['lok'];
$stat = $_POST['stat'];
$sup = $_POST['sup'];
$nama = $_POST['nama'];
$psj = $_POST['psj'];
if ($proses == 'excel' || $proses == 'pdf') {
$nopp = $_GET['nopp'];
$tgl = tanggalsystem($_GET['tgl']);
$per = $_GET['per'];
$lok = $_GET['lok'];
$stat = $_GET['stat'];
$sup = $_GET['sup'];
$nama = $_GET['nama'];
$psj = $_GET['psj'];
}
if ($proses == 'excel') {
$stream = "<table class=sortable cellspacing=1 border=1>";
} else {
$stream = "<table class=sortable cellspacing=1>";
}
$stream .= "<thead class=rowheader>\n <tr class=rowheader>\n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['nourut'] . "</td>\n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['nopp'] . "</td> \n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['tanggal'] . "</td>\n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['kodebarang'] . "</td> \n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['namabarang'] . "</td>\n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['jumlah'] . "</td>\n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['satuan'] . "</td>\n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['status'] . " " . $_SESSION['lang']['persetujuan'] . "</td>\n <td bgcolor=#CCCCCC align=center>Ostd</td> \n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['chat'] . "</td> \n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['nopo'] . "</td> \n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['tgl_po'] . "</td> \n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['namasupplier'] . "</td> \n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['status'] . " PO</td>\n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['rapbNo'] . "</td>\n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['tanggal'] . "</td>\n <td bgcolor=#CCCCCC align=center>" . $_SESSION['lang']['print'] . "</td>\n \n </tr></thead>";
//lokasitugas lock
//print_r($_SESSION['empl']);
示例11: makeOption
<?php
require_once 'master_validation.php';
require_once 'config/connection.php';
include 'lib/nangkoelib.php';
include_once 'lib/zLib.php';
$optNm = makeOption($dbname, 'log_5klbarang', 'kode,kelompok');
$optNmBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang');
$nopp = isset($_POST['rnopp']) ? $_POST['rnopp'] : '';
$tanggal = isset($_POST['rtgl_pp']) ? tanggalsystem($_POST['rtgl_pp']) : '';
$kodeorg = isset($_POST['rkd_bag']) ? $_POST['rkd_bag'] : '';
$method = isset($_POST['method']) ? $_POST['method'] : '';
$user_id = isset($_POST['usr_id']) ? $_POST['usr_id'] : '';
$nopp2 = isset($_POST['dnopp']) ? $_POST['dnopp'] : '';
$stat_cls = isset($_POST['stat']) ? $_POST['stat'] : '';
$tgl = date('Ymd');
$bln = substr($tgl, 4, 2);
$thn = substr($tgl, 0, 4);
switch ($method) {
case 'delete':
$strx = "delete from " . $dbname . ".log_prapoht where nopp='" . $nopp . "'";
if (mysql_query($strx)) {
$ql = "delete from " . $dbname . ".log_prapodt where nopp='" . $nopp . "'";
mysql_query($ql) or die(mysql_error());
} else {
echo " Error," . addslashes(mysql_error($conn));
}
break;
case 'update':
$strx = "update " . $dbname . ". log_prapoht set tanggal='" . $tanggal . "',kodeorg='" . $kodeorg . "' where nopp='" . $nopp . "'";
if (mysql_query($strx)) {
示例12: session_start
<?php
session_start();
include_once 'lib/nangkoelib.php';
include_once 'lib/zLib.php';
include_once 'config/connection.php';
$proses = checkPostGet('proses', '');
$id = checkPostGet('absnId', '');
$kdOrg = checkPostGet('kdOrg', '');
$tgl = tanggalsystem(checkPostGet('tgl', ''));
$arrTipeLembur = array($_SESSION['lang']['haribiasa'], $_SESSION['lang']['hariminggu'], $_SESSION['lang']['harilibur'], $_SESSION['lang']['hariraya']);
switch ($proses) {
case 'createTable':
$table .= "<table id='ppDetailTable'>";
# Header
$table .= "<thead>";
$table .= "<tr>";
$table .= "<td>" . $_SESSION['lang']['namakaryawan'] . "</td>";
$table .= "<td>" . $_SESSION['lang']['tipelembur'] . "</td>";
$table .= "<td>" . $_SESSION['lang']['jamaktual'] . "</td>";
$table .= "<td>" . $_SESSION['lang']['uangmakan'] . "</td>";
$table .= "<td>" . $_SESSION['lang']['penggantiantransport'] . "</td>";
$table .= "<td>" . $_SESSION['lang']['uangkelebihanjam'] . "</td>";
$table .= "<td>Action</td>";
$table .= "</tr>";
$table .= "</thead>";
# Data
$table .= "<tbody id='detailBody'>";
$idAbn = explode("###", $id);
$sTpLmbr2 = "select tipelembur from " . $dbname . ".sdm_5lembur where kodeorg='" . substr($idAbn[0], 0, 4) . "'";
//echo"warning:".$sTpLmbr2;
示例13: session_start
<?php
session_start();
require_once 'master_validation.php';
require_once 'config/connection.php';
include_once 'lib/nangkoelib.php';
require_once 'lib/zLib.php';
$proses = checkPostGet('proses', '');
$txtFind = checkPostGet('txtfind', '');
$absnId = explode("###", checkPostGet('absnId', ''));
$tgl = isset($absnId[1]) ? tanggalsystem($absnId[1]) : '';
$kdOrg = $absnId[0];
$krywnId = checkPostGet('krywnId', '');
$shifTid = checkPostGet('shifTid', '');
$asbensiId = checkPostGet('asbensiId', '');
$Jam = checkPostGet('Jam', '');
$Jam2 = checkPostGet('Jam2', '');
$ket = checkPostGet('ket', '');
$periode = checkPostGet('period', '');
$idOrg = substr($_SESSION['empl']['lokasitugas'], 0, 4);
$catu = checkPostGet('catu', '');
$penaltykehadiran = checkPostGet('dendakehadiran', '');
$periodeAkutansi = $_SESSION['org']['period']['tahun'] . "-" . $_SESSION['org']['period']['bulan'];
$kdJbtn = makeOption($dbname, 'datakaryawan', 'karyawanid,kodejabatan');
$tipeKary = makeOption($dbname, 'datakaryawan', 'karyawanid,tipekaryawan');
##buat cek proses gaji
$iPer = "select * from " . $dbname . ".sdm_5periodegaji where kodeorg='" . $_SESSION['empl']['lokasitugas'] . "' and " . " sudahproses=0 order by periode asc limit 1";
$nPer = mysql_query($iPer) or die(mysql_error($conn));
$dPer = mysql_fetch_assoc($nPer);
$perGjSkrg = $dPer['periode'];
switch ($proses) {
示例14: str_replace
$data['jumlahrealisasi'] = str_replace(',', '', $data['jumlahrealisasi']);
$data['jjgkontanan'] = str_replace(',', '', $data['jjgkontanan']);
# Empty Data
foreach ($data as $cont) {
if ($cont == '') {
echo 'Warning : Data tidak boleh ada yang kosong';
exit;
}
}
# Convert Tanggal
$param['tanggal'] = tanggalsystem($param['tanggal']);
$where = "notransaksi='" . $param['notransaksi'] . "' and kodeblok='" . $param['blokalokasi'] . "' and kodekegiatan='" . $param['kodekegiatan'] . "' and tanggal='" . $param['tanggal'] . "' and blokspkdt='" . $param['kodeblok'] . "' and kodesegment='" . $param['kodesegment'] . "'";
$query = updateQuery($dbname, 'log_baspk', $data, $where);
if (!mysql_query($query)) {
echo "DB Error : " . mysql_error();
exit;
}
break;
case 'delete':
# Convert Tanggal
$param['tanggal'] = tanggalsystem($param['tanggal']);
$where = "notransaksi='" . $param['notransaksi'] . "' and kodeblok='" . $param['blokalokasi'] . "' and kodekegiatan='" . $param['kodekegiatan'] . "' and tanggal='" . $param['tanggal'] . "' and blokspkdt='" . $param['kodeblok'] . "' and kodesegment='" . $param['kodesegment'] . "'";
$query = "delete from `" . $dbname . "`.`log_baspk` where " . $where;
if (!mysql_query($query)) {
echo "DB Error : " . mysql_error();
exit;
}
break;
default:
break;
}
示例15: mysql_error
$sDel = "delete from " . $dbname . ".kebun_pengirimanbbt where notransaksi='" . $notrans . "'";
if (mysql_query($sDel)) {
echo "";
} else {
echo "DB Error : " . mysql_error($conn);
}
break;
//cari transaksi
//cari transaksi
case 'cari_transaksi':
OPEN_BOX();
echo "<fieldset>\r\n<legend>" . $_SESSION['lang']['result'] . "</legend>";
echo "<div style=\"width:600px; height:450px; overflow:auto;\">\r\n\t\t\t<table cellspacing=1 border=0 class='sortable'>\r\n\t\t<thead>\r\n<tr class=rowheader>\r\n<td>" . $_SESSION['lang']['notransaksi'] . "</td>\r\n<td>" . $_SESSION['lang']['kodeorg'] . "</td>\r\n<td>" . $_SESSION['lang']['tanggal'] . "</td>\r\n<td>" . $_SESSION['lang']['jenisbibit'] . "</td>\r\n<td>" . $_SESSION['lang']['jumlah'] . "</td>\r\n<td>Action</td>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n";
if (isset($_POST['txtSearch'])) {
$txt_search = $_POST['txtSearch'];
$txt_tgl = tanggalsystem($_POST['txtTgl']);
$txt_tgl_a = substr($txt_tgl, 0, 4);
$txt_tgl_b = substr($txt_tgl, 4, 2);
$txt_tgl_c = substr($txt_tgl, 6, 2);
$txt_tgl = $txt_tgl_a . "-" . $txt_tgl_b . "-" . $txt_tgl_c;
} else {
$txt_search = '';
$txt_tgl = '';
}
if ($txt_search != '') {
$where = " notransaksi LIKE '%" . $txt_search . "%'";
} elseif ($txt_tgl != '') {
$where .= " tanggal LIKE '" . $txt_tgl . "'";
} elseif ($txt_tgl != '' && $txt_search != '') {
$where .= " notransaksi LIKE '%" . $txt_search . "%' and tanggal LIKE '%" . $txt_tgl . "%'";
}