当前位置: 首页>>代码示例>>PHP>>正文


PHP mdate函数代码示例

本文整理汇总了PHP中mdate函数的典型用法代码示例。如果您正苦于以下问题:PHP mdate函数的具体用法?PHP mdate怎么用?PHP mdate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了mdate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0");
     $this->output->set_header("Pragma: no-cache");
     $this->load->model('web_model');
     if ($this->auth->is_logged() == FALSE) {
         $this->status_login = "not_login";
         $this->key_activation = $this->generate_key(20);
     } else {
         $this->status_login = "logueado";
     }
     /* Obtenemos la fecha actual */
     date_default_timezone_set('UTC');
     $timestamp = now();
     $timezone = 'UM5';
     $daylight_saving = FALSE;
     $now = gmt_to_local($timestamp, $timezone, $daylight_saving);
     $datestring = "%Y-%m-%d %h:%i:%s";
     $this->now = mdate($datestring, $now);
     //$this->name_country = $this->country->ip_info('Visitor', 'Country');
     //$this->code_country = $this->country->ip_info("Visitor", "Country Code");
     $this->name_country = 'PERU';
     $this->code_country = 'PE';
 }
开发者ID:NeuronsWork,项目名称:7tual,代码行数:25,代码来源:web.php

示例2: set_weld

 public function set_weld($rowArr = array())
 {
     $postInfo = array();
     if (sizeof($rowArr) > 0) {
         $postInfo = $rowArr;
     } else {
         foreach ($_POST as $key => $value) {
             if ($key == "PROGRESS_RECID" || $key == "index" || $key == "remarks1" || $key == "idField" || $key == "_defaultId") {
                 continue;
             }
             $postInfo[$key] = mysql_real_escape_string($value);
         }
         //$postInfo['logupdate'] = $postInfo['loguser'] . " " . mdate("%Y-%m-%d %H:%i:%s");
         $postInfo['logdate'] = mdate("%Y-%m-%d %H:%i:%s");
         $postInfo['logtime'] = mdate("%H:%i:%s");
     }
     if (intval($_POST['index']) == 0) {
         $sql = "DELETE FROM {$this->tblName}";
         $query = $this->qms_pip->query($sql);
     }
     if ($_POST['PROGRESS_RECID'] == "0") {
         $query = $this->qms_pip->set($postInfo);
         $query = $this->qms_pip->insert($this->tblName);
     } else {
         $query = $this->qms_pip->where('PROGRESS_RECID', $_POST['PROGRESS_RECID']);
         $query = $this->qms_pip->update($this->tblName, $postInfo);
     }
     return $query;
 }
开发者ID:jhersonn20,项目名称:www,代码行数:29,代码来源:pip_weld_data_model.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0");
     $this->output->set_header("Pragma: no-cache");
     $this->load->model('noise_model');
     if ($this->auth->is_logged() == FALSE) {
         $this->status_login = "not_login";
         $this->key_activation = $this->generate_key(20);
     } else {
         $this->status_login = "logueado";
     }
     // LOAD LIBRARY SLUG
     $config = array('table' => 'notion', 'id' => 'id_notion', 'field' => 'slug', 'title' => 'title', 'replacement' => 'dash');
     $this->load->library('slug', $config);
     ## FECHA
     date_default_timezone_set('UTC');
     $timestamp = now();
     $timezone = 'UM5';
     $daylight_saving = false;
     $now = gmt_to_local($timestamp, $timezone, $daylight_saving);
     $datestring = "%Y-%m-%d %h:%i:%s";
     $this->now = mdate($datestring, $now);
     //$this->name_country = $this->country->ip_info('Visitor', 'Country');
     //$this->code_country = $this->country->ip_info("Visitor", "Country Code");
     $this->name_country = 'PERU';
     $this->code_country = 'PE';
     //$this->state        = $this->country->ip_info('181.66.157.144', 'State');
 }
开发者ID:NeuronsWork,项目名称:7tual,代码行数:29,代码来源:noise.php

示例4: new_user_post

 public function new_user_post()
 {
     $fn = $this->post("firstname");
     $ln = $this->post("lastname");
     $gender = $this->post("gender");
     $dob = $this->post("dob");
     $cnid = $this->post("country");
     $email = $this->post("email");
     $pwd = $this->post("pwd");
     $datetime = mdate('%Y-%m-%d %h:%i:%s', time());
     //$ra=rand(10000,100000);
     //$ra=$email.$ra;
     $link = md5($email);
     // to create randum number for activation link
     $pwd = do_hash($pwd, 'md5');
     if ($fn && $ln && $dob && $gender && $cnid && $email && $pwd && $datetime && $link) {
         $this->load->model("registration_model");
         $new_user = $this->registration_model->create_user($fn, $ln, $dob, $gender, $cnid, $email, $pwd, $datetime, $link);
         if ($new_user === false) {
             $this->response(array("status" => "failed"));
         } else {
             $this->response(array("status" => "success"));
         }
     }
 }
开发者ID:prasanthjanga,项目名称:wishingmart,代码行数:25,代码来源:registration.php

示例5: addUser

 public function addUser($add = array())
 {
     $query = FALSE;
     $this->db->where('sort', 'prefs')->where('item', 'ti_setup')->delete('settings');
     $this->db->set('sort', 'prefs')->set('item', 'ti_setup')->set('value', 'installed')->set('serialized', '0')->insert('settings');
     if (!empty($add['site_email'])) {
         $this->db->where('staff_email', strtolower($add['site_email']));
         $this->db->delete('staffs');
         $this->db->set('staff_email', strtolower($add['site_email']));
     }
     if (!empty($add['staff_name'])) {
         $this->db->set('staff_name', $add['staff_name']);
     }
     $this->db->set('staff_group_id', '11')->set('staff_location_id', '0')->set('language_id', '11')->set('timezone', '0')->set('staff_status', '1');
     $this->db->set('date_added', mdate('%Y-%m-%d', time()));
     $query = $this->db->insert('staffs');
     if ($this->db->affected_rows() > 0 && $this->db->insert_id()) {
         $staff_id = $this->db->insert_id();
         if (!empty($add['username'])) {
             $this->db->where('username', $add['username']);
             $this->db->delete('users');
             $this->db->set('username', $add['username']);
             $this->db->set('staff_id', $staff_id);
         }
         if (!empty($add['password'])) {
             $this->db->set('salt', $salt = substr(md5(uniqid(rand(), TRUE)), 0, 9));
             $this->db->set('password', sha1($salt . sha1($salt . sha1($add['password']))));
         }
         $query = $this->db->insert('users');
         $this->updateSettings($add['site_name'], $add['site_email']);
     }
     return $query;
 }
开发者ID:AbsoluteBreeze,项目名称:TastyIgniter,代码行数:33,代码来源:Setup_model.php

示例6: luu

      function luu(){
			$name = $this->input->post('name');
          $email = $this->input->post('email');
          $comment = $this->input->post('commentDetail');
          $date = mdate('%Y-%m-%d %H:%i:%s',time());
          $data = array(
            /*'tenlienhe' => $name,
            'lienlac' => $email,
            'noidung' => $comment,
            'ngay' => $date,*/
          'hovaten' => $name,
          'email' => $email,
          'ngay' => $date,
          'noidung' => $comment,
          	            
          );
          /*if($this->db->insert('hoidap',$data)){
              return true;
          }else{
              return false;
          }*/
		if($this->db->insert('lienhe',$data)){
              return true;
          }else{
              return false;
          }
      }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:27,代码来源:hoidap_model.php

示例7: fecha_actual

function fecha_actual()
{
    $time = time();
    $datestring = "%d-%m-%Y";
    // $datestring = "%Y-%m-%d";
    return mdate($datestring, $time);
}
开发者ID:sistemasfidegar,项目名称:beneficiarios_prepasi,代码行数:7,代码来源:my_date_helper.php

示例8: get_cliente_by_id

 function get_cliente_by_id($id)
 {
     $this->load->helper('date');
     $query = $this->db->get_where("clientes", array("idcliente" => $id));
     if ($query->num_rows() > 0) {
         $c = $query->row_array();
         if ($c['fecnac'] == "" || is_null($c['fecnac'])) {
             $c['fecnac'] = "No especificado";
         } else {
             $c['fecnac'] = mdate("%d-%m-%Y", mysql_to_unix($c['fecnac']));
         }
         $c['fecnac2'] = $c['fecnac'];
         $c['sexo'] = $c['sexo'] == 0 ? "Masculino" : "Femenino";
         $c['ocupacion'] = $c['ocupacion'] == "" || is_null($c['ocupacion']) ? "No especificado" : $c['ocupacion'];
         $c['direccion'] = $c['direccion'] == "" || is_null($c['direccion']) ? "No especificado" : $c['direccion'];
         $c['colonia'] = $c['colonia'] == "" || is_null($c['colonia']) ? "No especificada" : $c['colonia'];
         $c['cp'] = $c['cp'] == "" || is_null($c['cp']) ? "No especificado" : $c['cp'];
         $c['ciudad'] = $c['ciudad'] == "" || is_null($c['ciudad']) ? "No especificada" : $c['ciudad'];
         $c['estado'] = $c['estado'] == "" || is_null($c['estado']) ? "No especificado" : $c['estado'];
         $c['telefono1'] = $c['telefono1'] == "" || is_null($c['telefono1']) ? "No especificado" : $c['telefono1'];
         $c['telefono2'] = $c['telefono2'] == "" || is_null($c['telefono2']) ? "" : $c['telefono2'];
         $c['email'] = $c['email'] == "" || is_null($c['email']) ? "No especificado" : $c['email'];
         $c['enfermedad'] = $c['enfermedad'] == "" || is_null($c['enfermedad']) ? "No especificado" : $c['enfermedad'];
         $c['avisar'] = $c['avisar'] == "" || is_null($c['avisar']) ? "No especificado" : $c['avisar'];
         $c['aviparen'] = $c['aviparen'] == "" || is_null($c['aviparen']) ? "No especificado" : $c['aviparen'];
         $c['avidom'] = $c['avidom'] == "" || is_null($c['avidom']) ? "No especificado" : $c['avidom'];
         $c['avitel'] = $c['avitel'] == "" || is_null($c['avitel']) ? "No especificado" : $c['avitel'];
         $c['vence'] = $c['vence'] == "" || is_null($c['vence']) ? null : $c['vence'];
         return $c;
     }
     return false;
 }
开发者ID:noamyc,项目名称:Gym,代码行数:32,代码来源:clientes_model.php

示例9: view

 public function view()
 {
     $review_id = (int) $this->uri->rsegment(3);
     // retrieve specific customer message based on message id to be passed to view
     if (!($result = $this->Reviews_model->getReview($review_id, $this->customer->getId()))) {
         // check if customer_id is set in uri string
         redirect('account/reviews');
     }
     $this->template->setBreadcrumb('<i class="fa fa-home"></i>', '/');
     $this->template->setBreadcrumb($this->lang->line('text_my_account'), 'account/account');
     $this->template->setBreadcrumb($this->lang->line('text_heading'), 'account/reviews');
     $this->template->setBreadcrumb($this->lang->line('text_view_review'), 'account/reviews/view');
     $this->template->setTitle($this->lang->line('text_view_review'));
     $this->template->setHeading($this->lang->line('text_view_review'));
     $data['back_url'] = site_url('account/reviews');
     $date_format = $this->config->item('date_format') ? $this->config->item('date_format') : '%d %M %y';
     $time_format = $this->config->item('time_format') ? $this->config->item('time_format') : '%h:%i %a';
     $data['location_name'] = $result['location_name'];
     $data['sale_id'] = $result['sale_id'];
     $data['sale_type'] = $result['sale_type'];
     $data['author'] = $result['author'];
     $data['quality'] = $result['quality'];
     $data['delivery'] = $result['delivery'];
     $data['service'] = $result['service'];
     $data['date'] = mdate("{$time_format} - {$date_format}", strtotime($result['date_added']));
     $data['review_text'] = $result['review_text'];
     $this->template->render('account/review_view', $data);
 }
开发者ID:allrested,项目名称:TastyIgniter,代码行数:28,代码来源:Reviews.php

示例10: index

 function index()
 {
     $datestring = "%Y-%m-%d";
     $date = mdate($datestring);
     if ($this->session->userdata('logged')) {
         $userid = $this->session->userdata('id');
         $ownerid = $this->getOwnerid($userid);
         $datasend = array('ow' => $this->getOwner($userid), 'stadium' => $this->mystadium->getstadium($ownerid));
         $stID = null;
         foreach ($datasend['stadium'] as $d) {
             $stID[] = $d->stadium_id;
         }
         if ($stID != null) {
             $curtime = $today = date("Y-m-d") . ' ' . date("h:i:s");
             $datasend['todayprice'] = $this->booking->getSumpricetoday($userid);
         } else {
             $this->session->set_flashdata('msg', 'กรุณาเพิ่มสนาม');
         }
         $totalbooking = $this->booking->getbookingDashboard($ownerid);
         $datasend['totalbooking'] = $totalbooking;
         $datasend['playingtoday'] = $this->booking->getbookingDashboard_Playing($ownerid);
         $datasend['todaycomming'] = $this->booking->getbookingDashboard_comming($ownerid);
         $datasend['todaypass'] = $this->booking->getbookingDashboard_Pass($ownerid);
         $this->load->view("dashboard", $datasend);
         //////////print_r($datasend);
     } else {
         $this->load->view('index');
     }
 }
开发者ID:terkmods,项目名称:CBT,代码行数:29,代码来源:stadium.php

示例11: Insert2Db

 public function Insert2Db()
 {
     $this->load->database('default');
     $this->db->select('max(cast(Id as decimal)) as MaxId');
     $query = $this->db->get('User');
     $row = $query->row();
     if (isset($row)) {
         $this->addingUser->Id = $row->MaxId + 1;
     } else {
         $this->addingUser->Id = 1;
     }
     $this->db->close();
     $this->load->database('default');
     $newUser = array('Id' => $this->addingUser->Id, 'Name' => $this->addingUser->Name, 'Email' => $this->addingUser->Email, 'Password' => $this->addingUser->Password);
     $this->db->set('CreateDate', 'NOW()', FALSE);
     $this->db->insert('User', $newUser);
     $this->load->helper('date');
     $timeFomat = "%Y/%m/%d";
     $time = time();
     $date = mdate($timeFomat, $time);
     $this->addingUser->CreateDate = $date;
     $result = $this->db->affected_rows();
     $this->db->close();
     return $result;
 }
开发者ID:hopdq,项目名称:ecom,代码行数:25,代码来源:AddingUserModel.php

示例12: add_validate

 public function add_validate($post)
 {
     $time = time();
     $datestring = '%Y-%m-%d';
     $date = mdate($datestring, $time);
     $this->form_validation->set_rules('destination', 'Destination', 'trim|required');
     $this->form_validation->set_rules('description', 'Description', 'trim|required');
     $this->form_validation->set_rules('date_from', 'Date From', 'trim|required');
     $this->form_validation->set_rules('date_to', 'Date To', 'trim|required');
     if ($this->form_validation->run() == FALSE) {
         return false;
     } else {
         if ($this->input->post('date_from') < $date) {
             $this->session->set_flashdata('date_errors', 'The date from should be set in the future');
             return false;
         }
         if ($this->input->post('date_to') < $date) {
             $this->session->set_flashdata('date_errors', 'The date to should be set in the future');
             return false;
         }
         if ($this->input->post('date_to') < $this->input->post('date_from')) {
             $this->session->set_flashdata('date_errors', 'The date to should be set after date from');
             return false;
         }
         return true;
     }
 }
开发者ID:jaypatrickm,项目名称:CODINGDOJO-CODEIGNITER-RBF-TRAVELBUDDY,代码行数:27,代码来源:main.php

示例13: update_login

 function update_login($id_user)
 {
     $datestring = '%Y-%m-%d %h:%i:%s';
     $this->db->set('last_login', mdate($datestring, now('Asia/Jakarta')));
     $this->db->where('id_user', $id_user);
     $this->db->update('user');
 }
开发者ID:ilyashrn,项目名称:fsms,代码行数:7,代码来源:user.php

示例14: backup

 public function backup()
 {
     $this->user->restrict('Admin.Maintenance.Manage');
     $data['backup_tables'] = TRUE;
     $timestamp = mdate('%Y-%m-%d-%H-%i-%s', now());
     $this->template->setTitle($this->lang->line('text_backup_heading'));
     $this->template->setHeading($this->lang->line('text_backup_heading'));
     $this->template->setButton($this->lang->line('button_backup'), array('class' => 'btn btn-primary', 'onclick' => '$(\'#edit-form\').submit();'));
     $this->template->setButton($this->lang->line('button_migrate'), array('class' => 'btn btn-success', 'onclick' => '$(\'#migrate-form\').submit();'));
     $this->template->setButton($this->lang->line('button_icon_back'), array('class' => 'btn btn-default', 'href' => site_url('maintenance')));
     if ($this->input->get('restore') and $this->_restore() === TRUE) {
         redirect('maintenance');
     } else {
         if ($this->input->get('download') and $this->_download() === TRUE) {
             redirect('maintenance');
         } else {
             if ($this->input->get('delete') and $this->_delete() === TRUE) {
                 redirect('maintenance');
             }
         }
     }
     $checked_tables = $this->session->flashdata('tables') ? $this->session->flashdata('tables') : $this->input->post('tables');
     if (!$this->Maintenance_model->checkTables($checked_tables)) {
         redirect('maintenance');
     } else {
         if ($this->input->post('tables') and $this->input->post('compression') and $this->_backup() === TRUE) {
             redirect('maintenance');
         }
     }
     if ($this->input->post('file_name')) {
         $data['file_name'] = $this->input->post('file_name');
     } else {
         $data['file_name'] = 'tastyigniter-' . $timestamp;
     }
     if ($this->input->post('drop_tables')) {
         $data['drop_tables'] = $this->input->post('drop_tables');
     } else {
         $data['drop_tables'] = '0';
     }
     if ($this->input->post('add_inserts')) {
         $data['add_inserts'] = $this->input->post('add_inserts');
     } else {
         $data['add_inserts'] = '1';
     }
     if ($this->input->post('compression')) {
         $data['compression'] = $this->input->post('compression');
     } else {
         $data['compression'] = 'none';
     }
     if ($this->session->flashdata('tables')) {
         $data['tables'] = $this->session->flashdata('tables');
     } else {
         if ($this->input->post('tables')) {
             $data['tables'] = $this->input->post('tables');
         } else {
             $data['tables'] = array();
         }
     }
     $this->template->render('maintenance', $data);
 }
开发者ID:tastyigniter,项目名称:tastyigniter,代码行数:60,代码来源:Maintenance.php

示例15: set

 public function set($postInfo = array())
 {
     $PROGRESS_RECID = 0;
     if (sizeof($postInfo) == 0) {
         foreach ($_POST as $key => $value) {
             if ($key == "PROGRESS_RECID" || $key == "index" || $key == "remarks1" || $key == "idField" || $key == "_defaultId") {
                 continue;
             }
             $postInfo[$key] = mysql_real_escape_string($value);
         }
         $postInfo['log_date'] = mdate("%Y-%m-%d %H:%i:%s");
         $PROGRESS_RECID = $_POST['PROGRESS_RECID'];
     } else {
         $PROGRESS_RECID = $postInfo['PROGRESS_RECID'];
         unset($postInfo['PROGRESS_RECID']);
     }
     // $postInfo['logtime'] = mdate("%H:%i:%s");
     if ($_POST['PROGRESS_RECID'] == "0") {
         $query = $this->piping->set($postInfo);
         $query = $this->piping->insert($this->tblName);
     } else {
         $query = $this->piping->where('PROGRESS_RECID', $_POST['PROGRESS_RECID']);
         $query = $this->piping->update($this->tblName, $postInfo);
     }
     return $query;
 }
开发者ID:jhersonn20,项目名称:www,代码行数:26,代码来源:twhse_pip_mat_model.php


注:本文中的mdate函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。