本文整理汇总了PHP中dateNow函数的典型用法代码示例。如果您正苦于以下问题:PHP dateNow函数的具体用法?PHP dateNow怎么用?PHP dateNow使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dateNow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_component
function update_component()
{
$comp = GetAllSelect('payroll_component', 'id')->result();
foreach ($comp as $c) {
$data = array('session_id' => $this->new_session, 'payroll_component_id' => $c->id);
$filter = array('session_id' => 'where/' . $this->new_session, 'payroll_component_id' => 'where/' . $c->id);
$num_rows = GetAllSelect('payroll_component_session', 'id', $filter)->num_rows();
if ($num_rows > 0) {
$this->db->where('session_id', $this->new_session)->where('payroll_component_id', $c->id)->update('payroll_component_session', $data);
} else {
$this->db->insert('payroll_component_session', $data);
}
$filter2 = array('session_id' => 'where/' . $this->old_session, 'payroll_component_id' => 'where/' . $c->id);
$comp_sess_before = getValue('id', 'payroll_component_session', $filter2);
print_ag($comp_sess_before);
$comp_value = getAll('payroll_component_value', array('payroll_component_session_id' => 'where/' . $comp_sess_before))->row();
print_ag($comp_value);
$comp_sess_new = getValue('id', 'payroll_component_session', $filter);
$num_rows_new = GetAllSelect('payroll_component_value', 'id', array('payroll_component_session_id' => 'where/' . $comp_sess_new))->num_rows();
if (!empty($comp_value)) {
$data2 = array('payroll_component_session_id' => $comp_sess_new, 'from' => $comp_value->from, 'to' => $comp_value->to, 'formula' => $comp_value->formula, 'is_condition' => $comp_value->is_condition, 'min' => $comp_value->min, 'max' => $comp_value->max, 'created_by' => sessId(), 'created_on' => dateNow());
if ($num_rows_new > 0) {
$this->db->where('payroll_component_session_id', $comp_sess_new)->update('payroll_component_value', $data2);
} else {
$this->db->insert('payroll_component_value', $data2);
}
}
print_ag($this->db->last_query());
}
}
示例2: ajax_update
public function ajax_update()
{
//$this->_validate();
$data = array('kode' => $this->input->post('kode'), 'title' => $this->input->post('title'), 'catatan' => $this->input->post('catatan'), 'lokasi_gudang_id' => $this->input->post('lokasi_gudang_id'), 'edited_by' => sessId(), 'edited_on' => dateNow());
$this->gudang->update(array('id' => $this->input->post('id')), $data);
echo json_encode(array("status" => TRUE));
}
示例3: ajax_update
public function ajax_update()
{
//$this->_validate();
$data = array('mata_uang_asing' => $this->input->post('mata_uang_asing'), 'nilai_dalam_rupiah' => $this->input->post('nilai_dalam_rupiah'), 'catatan' => $this->input->post('catatan'), 'edited_by' => sessId(), 'edited_on' => dateNow());
$this->main->update(array('id' => $this->input->post('id')), $data);
echo json_encode(array("status" => TRUE));
}
示例4: ajax_update
public function ajax_update()
{
//$this->_validate();
$data = array('code' => $this->input->post('kode'), 'name' => $this->input->post('title'), 'type' => $this->input->post('type'), 'ref_id' => $this->input->post('ref'), 'modify_user_id' => sessId(), 'modify_date' => dateNow());
$this->coa_setup->update(array('id' => $this->input->post('id')), $data);
echo json_encode(array("status" => TRUE));
}
示例5: add
function add()
{
permissionUser();
$list = array('kode_barang' => $this->input->post('kode_barang'), 'deskripsi' => $this->input->post('deskripsi'), 'diretur' => $this->input->post('diretur'), 'diterima' => $this->input->post('diterima'), 'satuan' => $this->input->post('satuan'));
$data = array('no' => $this->input->post('no'), 'tanggal_transaksi' => date('Y-m-d', strtotime($this->input->post('tanggal_transaksi'))), 'pengeluaran_id' => $this->input->post('pengeluaran_id'), 'catatan' => $this->input->post('catatan'), 'created_by' => sessId(), 'created_on' => dateNow());
$this->db->insert($this->table_name, $data);
$insert_id = $this->db->insert_id();
for ($i = 0; $i < sizeof($list['kode_barang']); $i++) {
$data2 = array($this->file_name . '_id' => $insert_id, 'kode_barang' => $list['kode_barang'][$i], 'deskripsi' => $list['deskripsi'][$i], 'diretur' => str_replace(',', '', $list['diretur'][$i]), 'diterima' => str_replace(',', '', $list['diterima'][$i]), 'satuan_id' => $list['satuan'][$i]);
$this->db->insert($this->table_name . '_list', $data2);
}
redirect($this->module . '/' . $this->file_name, 'refresh');
}
示例6: addwidget
function addwidget()
{
//insertTerms();
$termid = $this->input->post('id');
$pos = $this->input->post('pos');
$widget = $this->input->post('widget');
$s = array('term_id' => $termid);
$name = $this->m_database->fieldRow('terms', $s, 'name');
$slug = $this->m_database->fieldRow('terms', $s, 'slug');
$data = json_encode(array('prefix' => $widget));
$time = strtotime(dateNow(TRUE));
insertTerms("sidebar", $name . "_item", $slug . "-item-" . $time, "", $termid, $data);
echo json_encode('ok');
}
示例7: add
function add()
{
permissionUser();
$list = array('barang_id' => $this->input->post('barang_id'), 'catatan_barang' => $this->input->post('catatan_barang'), 'buku' => $this->input->post('buku'), 'satuan_buku' => $this->input->post('satuan_buku'), 'fisik' => $this->input->post('fisik'), 'satuan_id' => $this->input->post('satuan_id'));
$data = array('no' => $this->input->post('no'), 'tgl' => date('Y-m-d', strtotime($this->input->post('tgl'))), 'catatan' => $this->input->post('catatan'), 'created_by' => sessId(), 'created_on' => dateNow());
$this->db->insert($this->module . '_' . $this->file_name, $data);
$insert_id = $this->db->insert_id();
for ($i = 0; $i < sizeof($list['barang_id']); $i++) {
$data2 = array($this->file_name . '_id' => $insert_id, 'barang_id' => $list['barang_id'][$i], 'catatan' => $list['catatan_barang'][$i], 'buku' => str_replace(',', '', $list['buku'][$i]), 'satuan_buku' => str_replace(',', '', $list['satuan_buku'][$i]), 'fisik' => str_replace(',', '', $list['fisik'][$i]), 'satuan_id' => $list['satuan_id'][$i]);
$this->db->insert($this->module . '_' . $this->file_name . '_list', $data2);
$this->db->where(array('barang_id' => $list['barang_id'][$i]));
$this->db->update('stok', array('dalam_stok' => $list['fisik'][$i]));
}
redirect($this->module . '/' . $this->file_name, 'refresh');
}
示例8: send
function send()
{
$sess_id = sessId();
$data = array('sender_id' => sessId(), 'receiver_id' => $this->input->post('receiver_id'), 'message' => $this->input->post('msg'), 'sent_on' => dateNow());
$this->db->insert('chat', $data);
$id = $this->input->post('receiver_id');
$data['id'] = $id;
$data['sess_name'] = getName(sessId());
$data['buddy_name'] = getName($id);
$q = "SELECT *\n FROM chat\n WHERE (sender_id = '{$sess_id}' AND receiver_id = '{$id}')\n OR (sender_id = '{$id}' AND receiver_id = '{$sess_id}')\n order by sent_on desc\n limit 10\n ";
$data['message'] = $this->db->query($q);
//lastq();
$data['photo'] = '';
$data['photo_chat'] = '';
$this->load->view('chat/detail', $data);
}
示例9: send_notification
function send_notification($id)
{
permissionUser();
$url = base_url() . $this->file_name . '/detail/' . $id;
$subject = 'Pengajuan Work Order';
$isi = getName(sessId()) . " membuat Work Order, Untuk melihat detail silakan <a href={$url}> KLIK DISINI </a>.";
$no = getValue('no', $this->table_name, array('id' => 'where/' . $id));
//SEND NOTIFICATION TO PRODUCTION
$group_id = array('8');
$user_id = $this->db->select('user_id')->where_in('group_id', $group_id)->get('users_groups')->result();
foreach ($user_id as $u) {
$data = array('sender_id' => sessId(), 'receiver_id' => $u->user_id, 'sent_on' => dateNow(), 'judul' => $subject, 'isi' => $isi, 'no' => $no, 'url' => $url);
$this->db->insert('notifikasi', $data);
$this->send_email(getEmail($u->user_id), $subject, $isi);
}
return TRUE;
}
示例10: registerDo
function registerDo($username, $password, $nama, $hp, $emailx, $role, $status, $sendMail = FALSE)
{
$checkUsername = array('username' => $username);
if ($this->CI->m_database->isBOF('userlogin', $checkUsername) == TRUE) {
$checkEmail = array('email' => $emailx);
if ($this->CI->m_database->isBOF('userlogin', $checkEmail) == TRUE) {
$checkHP = array('hp' => $hp);
if ($this->CI->m_database->isBOF('userlogin', $checkHP) == TRUE) {
$dbPass = $this->CI->m_security->createPassword($password);
$dUser = array('username' => $username, 'password' => $dbPass, 'nama' => $nama, 'hp' => $hp, 'email' => $emailx, 'status' => $status);
if ($this->CI->m_database->addRow('userlogin', $dUser) == TRUE) {
$IDUser = $this->CI->m_database->lastInsertID();
taxonomyCreate($IDUser, 'role_user', $role);
$tglSekarang = dateNow(TRUE);
taxonomyCreate($IDUser, 'register_user', $tglSekarang);
if ($sendMail == TRUE) {
$this->CI->load->library('m_net');
$myMail = optionGet('company_email');
$myName = optionGet('company_name');
$subject = optionGet('email_register_subject');
$message = optionGet('email_register_message');
$output = '';
$output .= $message . '<br/>';
$output .= 'Username : <b>' . $username . '</b><br/>';
$output .= 'Password : <b>' . $password . '</b><br/>';
$output .= '<hr/>';
$output .= 'Regards,<br/><p> </p>';
$output .= $myName;
$this->CI->m_net->SendEmail($myMail, $myName, $emailx, $subject, $output, '', '');
return true;
} else {
return true;
}
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
示例11: ajax_add
public function ajax_add()
{
//$this->_validate();
$dibayar = str_replace(',', '', $this->input->post('dibayar'));
$kurensi = $this->input->post('kurensi');
$list_id = $this->input->post('inv');
$saldo = str_replace(',', '', $this->input->post('saldo'));
$data = array('list_id' => $list_id, 'no' => $this->input->post('no'), 'coa_id' => $this->input->post('coa_id'), 'tgl_dibayar' => date('Y-m-d', strtotime($this->input->post('tgl_dibayar'))), 'dibayar' => $dibayar, 'catatan' => $this->input->post('catatan'), 'created_by' => sessId(), 'created_on' => dateNow());
$insert = $this->main->save($data);
$terbayar = getValue('terbayar', 'purchase_hutang_list', array('id' => 'where/' . $list_id));
$terbayar = $terbayar + $dibayar;
$status = $saldo > 0 ? 2 : 3;
$data_list = array('terbayar' => $terbayar, 'saldo' => $saldo, 'status_hutang_id' => $status, 'edited_by' => sessId(), 'edited_on' => dateNow());
$this->db->where('id', $list_id)->update('purchase_hutang_list', $data_list);
rekening('purchase_hutang', $insert, $data['coa_id'], 'out', $data['dibayar'], 0, $kurensi);
echo json_encode(array("status" => TRUE));
}
示例12: add
function add()
{
permissionUser();
$list = array('kode_barang' => $this->input->post('kode_barang'), 'deskripsi' => $this->input->post('deskripsi'), 'diretur' => $this->input->post('diretur'), 'diterima' => $this->input->post('diterima'), 'satuan' => $this->input->post('satuan'));
$data = array('no' => $this->input->post('no'), 'tanggal_transaksi' => date('Y-m-d', strtotime($this->input->post('tanggal_transaksi'))), 'ref_id' => $this->input->post('penerimaan_id'), 'catatan' => $this->input->post('catatan'), 'created_by' => sessId(), 'created_on' => dateNow());
$this->db->insert($this->table_name, $data);
$insert_id = $this->db->insert_id();
for ($i = 0; $i < sizeof($list['kode_barang']); $i++) {
$data2 = array($this->file_name . '_id' => $insert_id, 'kode_barang' => $list['kode_barang'][$i], 'deskripsi' => $list['deskripsi'][$i], 'diretur' => str_replace(',', '', $list['diretur'][$i]), 'diterima' => str_replace(',', '', $list['diterima'][$i]), 'satuan_id' => $list['satuan'][$i]);
if ($this->db->insert($this->table_name . '_list', $data2)) {
$sisa = getValue('dalam_stok', 'stok', array('barang_id' => 'where/' . $list['kode_barang'][$i])) - $list['diretur'][$i];
$this->db->where('barang_id', $list['kode_barang'][$i])->update('stok', array('dalam_stok' => $sisa));
$status = $list['diretur'][$i] >= $list['diterima'][$i] ? 4 : 5;
}
}
$this->insert_po_status($this->input->post('penerimaan_id'));
redirect($this->module . '/' . $this->file_name, 'refresh');
}
示例13: add
function add()
{
permissionUser();
$list = array('kode_barang' => $this->input->post('kode_barang'), 'deskripsi' => $this->input->post('deskripsi'), 'jumlah' => $this->input->post('jumlah'), 'satuan' => $this->input->post('satuan'), 'harga' => $this->input->post('harga'), 'disc' => $this->input->post('disc'), 'catatan_barang' => $this->input->post('catatan_barang'));
//print_mz($list);
$data = array('no' => $this->input->post('no'), 'tanggal_transaksi' => date('Y-m-d', strtotime($this->input->post('tanggal_transaksi'))), 'tanggal_pengiriman' => date('Y-m-d', strtotime($this->input->post('tanggal_pengiriman'))), 'po' => $this->input->post('po'), 'jatuh_tempo_pembayaran' => date('Y-m-d', strtotime($this->input->post('jatuh_tempo'))), 'no_faktur' => $this->input->post("no_faktur"), 'tanggal_faktur' => date('Y-m-d', strtotime($this->input->post('tanggal_faktur'))), 'catatan' => $this->input->post('catatan'), 'created_by' => sessId(), 'created_on' => dateNow());
$this->db->where('po', $this->input->post('po'))->update('purchase_order', array('is_invoiced' => 1));
$this->db->insert($this->table_name, $data);
$insert_id = $this->db->insert_id();
if ($this->input->post('metode_pembayaran_id') == 2) {
$data_hutang = array('pembelian_id' => $insert_id, 'total' => str_replace(',', '', $this->input->post('saldo')), 'terbayar' => 0, 'saldo' => str_replace(',', '', $this->input->post('saldo')), 'status_hutang_id' => 1);
$this->db->insert('purchase_hutang_list', $data_hutang);
}
for ($i = 0; $i < sizeof($list['kode_barang']); $i++) {
$data2 = array($this->file_name . '_id' => $insert_id, 'kode_barang' => $list['kode_barang'][$i], 'deskripsi' => $list['deskripsi'][$i], 'jumlah' => str_replace(',', '', $list['jumlah'][$i]), 'satuan_id' => $list['satuan'][$i], 'harga' => str_replace(',', '', $list['harga'][$i]), 'disc' => str_replace(',', '', $list['disc'][$i]));
$this->db->insert($this->table_name . '_list', $data2);
}
redirect($this->module . '/' . $this->file_name, 'refresh');
}
示例14: send_notification
function send_notification($id)
{
permissionUser();
$url = base_url() . 'purchase/order/INV/' . $id;
$isi = getName(sessId()) . " Melakukan Transaksi cash_ledger Barang <a href={$url}> KLIK DISINI </a> ";
$approver = getAll('approver');
foreach ($approver->result() as $r) {
$data = array('sender_id' => sessId(), 'receiver_id' => $r->user_id, 'sent_on' => dateNow(), 'judul' => 'cash_ledger Order', 'isi' => $isi, 'url' => $url);
$this->db->insert('notifikasi', $data);
}
return TRUE;
}
示例15: percentageDonation
?>
€</span></p>
<p>Avancée <span><?php
echo percentageDonation($totalAmount7);
?>
%</span></p>
<p class="italic"><?php
echo $totalDonor7;
?>
contributeur(s)</p>
</div>
</div>
<div class="col-md-6 col-lg-4 single-day">
<div class="visual-icon <?php
dateNow('2016-02-26');
?>
">
<h3>9</h3>
</div>
<div class="content">
<p>Contribution <span><?php
echo $totalAmount8;
?>
€</span></p>
<p>Avancée <span><?php
echo percentageDonation($totalAmount8);
?>
%</span></p>
<p class="italic"><?php
echo $totalDonor8;