本文整理汇总了PHP中date::date_english_minus方法的典型用法代码示例。如果您正苦于以下问题:PHP date::date_english_minus方法的具体用法?PHP date::date_english_minus怎么用?PHP date::date_english_minus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类date
的用法示例。
在下文中一共展示了date::date_english_minus方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: form
<?php
include "../../libraries/start.php";
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "date.php";
$date = new date();
//$pegawai_status = $form->input('pegawai_status');
$pegawai_status = $_GET['pegawai_status'];
//$tgl_awal = $date->date_english_minus($form->input('tgl_awal'));
$tgl_awal = $date->date_english_minus($_GET['tgl_awal']);
$tgl_akhir = $date->date_add_days($tgl_awal, 6);
$tgl_awal_hr = (int) substr($tgl_awal, 8, 2);
$tgl_akhir_hr = (int) substr($tgl_akhir, 8, 2);
$selisih = $tgl_akhir_hr - $tgl_awal_hr;
$status = $form->status($pegawai_status);
$sql = "SELECT A.*, P.nippos, P.nama FROM absensi A " . "JOIN pegawai P ON A.pegawai_id=P.id " . "WHERE P.pegawai_status='{$pegawai_status}' AND P.aktif='1' " . "ORDER BY P.nippos ASC";
$items = $database->fetch_array($sql);
$sql_2 = "SELECT * FROM pegawai WHERE pegawai_status='{$pegawai_status}' AND aktif='1' ORDER BY nippos ASC";
$items_2 = $database->fetch_array($sql_2);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php
include $dir_subviews . "bs_meta.php";
?>
<?php
include $dir_subviews . "bs_css.php";
示例2: form
<?php
require "../../libraries/start.php";
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "date.php";
$date = new date();
if (isset($_POST['submit'])) {
$id = $form->input('id');
$pegawai_id = $form->input('pegawai_id');
$tanggal = $date->date_english_minus($form->input('tanggal'));
$keterangan_datang = $form->input('keterangan_datang');
$keterangan_pulang = $form->input('keterangan_pulang');
$jam_dtg1 = $form->input('jam_dtg1');
$jam_dtg2 = $form->input('jam_dtg2');
$jam_dtg3 = $form->input('jam_dtg3');
$jam_plg1 = $form->input('jam_plg1');
$jam_plg2 = $form->input('jam_plg2');
$jam_plg3 = $form->input('jam_plg3');
//$jam_datang = $form->input('jam_datang');
//$jam_pulang = $form->input('jam_pulang');
$jam_datang = $jam_dtg1 . ":" . $jam_dtg2 . ":" . $jam_dtg3;
$jam_pulang = $jam_plg1 . ":" . $jam_plg2 . ":" . $jam_plg3;
$status_datang = $form->input('status_datang');
$status_pulang = $form->input('status_pulang');
$action = $form->input('action');
$datetime = date('Y-m-d H:i:s');
$user = $_SESSION['nama'];
if (empty($status_pulang)) {
$status_pulang = '0';
}
示例3: pagination
<?php
include "../../libraries/start.php";
require $dir_libraries . "pagination.php";
$pagination = new pagination();
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "date.php";
$date = new date();
if (isset($_POST['cari'])) {
if (!empty($_POST['tanggal'])) {
$tanggal = $date->date_english_minus($_POST['tanggal']);
} else {
$tanggal = '';
}
$nama = $_POST['nama'];
$tanggal_2 = $_POST['tanggal'];
} elseif (isset($_GET['tanggal'])) {
$nama = '';
$tanggal = $_GET['tanggal'];
$tanggal_2 = $date->date_indo_slash($_GET['tanggal']);
} else {
$nama = '';
$tanggal = date('Y-m-d');
$tanggal_2 = '';
}
?>
<!DOCTYPE html>
<html lang="en">
示例4: form
<?php
require "../../libraries/start.php";
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "date.php";
$date = new date();
if (isset($_POST['submit'])) {
$id = $form->input('id');
$nama = $form->input('nama');
$username = $form->input('username');
$password = $form->input('password');
$old_password = $form->input('old_password');
$user_level_id = $form->input('user_level_id');
$aktif = $form->input('aktif');
$tgl_awal = $date->date_english_minus($form->input('tgl_awal'));
$tgl_akhir = $date->date_english_minus($form->input('tgl_akhir'));
$action = $form->input('action');
if ($action == "insert") {
$sql = "INSERT INTO user_login VALUES ('{$id}','{$username}',PASSWORD('{$password}'),'{$nama}','{$user_level_id}','1','{$tgl_awal}','{$tgl_akhir}')";
if (!$database->query($sql)) {
//die($sql);
$_SESSION['info'] = "Error: SQL Command";
header("Location: " . $addr_user . "index.php");
exit;
} else {
$_SESSION['info'] = "Berhasil Tambah Data User";
header("Location: " . $addr_user . "index.php");
exit;
}
}