本文整理汇总了PHP中date::dateEnglishMinus方法的典型用法代码示例。如果您正苦于以下问题:PHP date::dateEnglishMinus方法的具体用法?PHP date::dateEnglishMinus怎么用?PHP date::dateEnglishMinus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类date
的用法示例。
在下文中一共展示了date::dateEnglishMinus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: image
require $dir_libraries . "image.php";
$image = new image();
require $dir_libraries . "date.php";
$date = new date();
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "number.php";
$number = new number();
if (isset($_POST['save'])) {
$nama = $form->input('nama');
$id_tipe = $form->input('id_tipe');
$id_no = $form->input('id_no');
$jabatan = $form->input('jabatan');
$aktif = $form->input('aktif');
$tempat = $form->input('tempat');
$tgl_lahir = $date->dateEnglishMinus($form->input('tgl_lahir'));
$jns_kelamin = $form->input('jns_kelamin');
$agama = $form->input('agama');
$pernikahan = $form->input('pernikahan');
$pekerjaan_id = $form->input('pekerjaan_id');
$pendidikan = $form->input('pendidikan');
$alamat = $form->input('alamat');
$rt = $form->input('rt');
$rw = $form->input('rw');
$propinsi_id = $form->input('propinsi_id');
$kota_id = $form->input('kota_id');
$kecamatan_id = $form->input('kecamatan_id');
$desa_id = $form->input('desa_id');
$hp = $form->input('hp');
$telp_rumah = $form->input('telp_rumah');
$telp_kantor = $form->input('telp_kantor');
示例2: custom
require "../../../libraries/start.php";
require $dir_libraries . "custom.php";
$custom = new custom();
require $dir_libraries . "date.php";
$date = new date();
require $dir_libraries . "form.php";
$form = new form();
require $dir_libraries . "number.php";
$number = new number();
if (isset($_POST['save'])) {
$nama = $form->input('nama');
$user_level_id = $form->input('user_level_id');
$aktif = $form->input('aktif');
$username = $form->input('username');
$tgl1 = $date->dateEnglishMinus($form->input('tgl1'));
$tgl2 = $date->dateEnglishMinus($form->input('tgl2'));
$action = $form->input('action');
$user = $_SESSION['nama'];
$datetime = date('Y-m-d H:i:s');
// START INSERT DATA ==============================>
if ($action == "insert") {
$id = $number->id('user_login', 5);
$sql = "INSERT INTO user_login\n (id, nama, user_level_id, aktif, username, password, tgl1, tgl2, crt, crt_date) \n VALUES \n ('{$id}','{$nama}','{$user_level_id}','{$aktif}','{$username}',PASSWORD('{$username}'),'{$tgl1}','{$tgl2}','{$user}','{$datetime}')";
if (!$database->query($sql)) {
die($sql);
} else {
$_SESSION['success'] = "<b>Berhasil!</b> Anda telah menambah data baru";
header("Location: create.php");
exit;
}