本文整理汇总了PHP中unix_to_human函数的典型用法代码示例。如果您正苦于以下问题:PHP unix_to_human函数的具体用法?PHP unix_to_human怎么用?PHP unix_to_human使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了unix_to_human函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_html
public function get_html()
{
$ci = get_instance();
$bookings = $ci->booking_model->get_latest_bookings(10);
if (empty($bookings)) {
return "<p>There are no bookings yet.</p>";
}
$html = '
<table class="table table-striped table-hover" id="latest_bookings">
<thead>
<tr><th>Booking Date</th><th>Message</th><th>Job site</th><th>Trade</th><th>Tradesman</th><th>Confirmed</th></tr>
</thead>
<tbody>
';
foreach ($bookings as $booking) {
$confirmed = $booking->confirmed ? 'Yes' : 'No';
$html .= '
<tr>
<td>' . unix_to_human($booking->booking_date) . '</td>
<td>' . $booking->message . '</td>
<td>' . $booking->job_site_address . '</td>
<td>' . $booking->trade . '</td>
<td>' . $booking->tradesman_name . '</td>
<td>' . $confirmed . '</td>
</tr>';
}
$html .= '</tbody></table>';
return $html;
}
开发者ID:nicolasconnault,项目名称:streamliner,代码行数:29,代码来源:latest_bookings.php
示例2: backupDBFull
function backupDBFull()
{
// Получение бэкапа и присвоение его переменной
$backup =& $this->dbutil->backup();
$this->load->helper('download');
force_download('fullbackup-' . unix_to_human(now(), TRUE, 'eu') . '.gz', $backup);
}
开发者ID:carriercomm,项目名称:PostBilling,代码行数:7,代码来源:backup.php
示例3: cetak_surat
public function cetak_surat()
{
setlocale(LC_TIME, 'id_ID');
$this->load->helper('date');
$timenow = unix_to_human(now('Asia/Jakarta'), TRUE, 'us');
$time = date("Ymd-Hi", strtotime($timenow));
$this->load->model('m_mpdf');
$iduser = $this->input->post('iduser', TRUE);
$kategori = $this->input->post('kategori', TRUE);
$noaplikasi = $this->input->post('noaplikasi', TRUE);
if ($kategori == "menlu") {
$result = $this->m_mpdf->get_pdln_user($iduser);
$nip = $result['nip_pemohon'];
$html = $this->load->view('mpdf_template/surat_menlu', $result, true);
} else {
$result = $this->m_mpdf->get_pdln_user3($iduser, $noaplikasi);
$nip = $result['nip_pemohon'];
$html = $this->load->view('mpdf_template/surat_setneg', $result, true);
}
$filename = $time . '-' . $kategori . '-' . $nip;
header("Content-Type: application/vnd.ms-word");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-disposition: attachment; filename=" . $filename . '.doc');
echo $html;
}
开发者ID:datadigicore,项目名称:pdln,代码行数:26,代码来源:C_doc.php
示例4: index
public function index()
{
// Define the page title.
$data['title'] = lang('tle_recent_discussions');
// Define the template.
$data['template'] = 'pages/home/home';
// Get the discussions from the database.
$discussions = $this->discussions->order_by(array('sticky' => 'DESC', 'posted' => 'DESC'))->get_all();
// Loop through the discussions.
if (!empty($discussions)) {
foreach ($discussions as $row) {
// Get the category associated with the discussion.
$cat = $this->categories->get_by('id', $row->category_id);
$data['discussions'][] = array('subject' => anchor(site_url('discussions/view/' . $row->id), $row->subject), 'replies' => $row->replies, 'views' => $row->views, 'last_comment' => unix_to_human($row->last_comment), 'last_poster' => anchor(site_url('users/profile/' . $row->last_poster_id), $row->last_poster), 'category' => anchor(site_url('categories/' . $cat->slug . ''), $cat->name), 'is_sticky' => $row->sticky == 1 ? '<i class="fa fa-thumb-tack"></i> ' : '', 'is_closed' => $row->closed == 1 ? '<i class="fa fa-lock"></i> ' : '');
}
} else {
// Fill with blank data to prevent errors.
$data['discussions'] = '';
}
// Build the page breadcrumbs.
$this->crumbs->add(lang('crumb_recent_discussions'));
// Define the page data.
$data['page'] = array('btn_new_discussion' => anchor(site_url('discussions/new_discussion'), lang('btn_new_discussion'), array('class' => 'btn btn-default btn-xs')), 'discussions' => element('discussions', $data), 'has_discussions' => !empty($discussions) ? 1 : 0, 'breadcrumbs' => $this->crumbs->output(), 'pagination' => $this->pagination->create_links());
$this->render(element('page', $data), element('title', $data), element('template', $data));
}
开发者ID:Ragash,项目名称:DoveForums,代码行数:25,代码来源:Forums.php
示例5: initialize
function initialize($data)
{
$this->load->helper('date');
$now = time();
$this->name = $data['name'];
$this->email = $data['email'];
$this->date = unix_to_human(time(), TRUE, 'eu');
}
开发者ID:adilbk,项目名称:youp,代码行数:8,代码来源:Message.php
示例6: signup
public function signup()
{
$count = 1;
$Domain = "";
$temp = $this->input->post('Domain');
if (isset($temp)) {
foreach ($this->input->post('Domain') as $key => $value) {
if ($count == 1) {
$Domain .= $value;
} else {
$Domain .= ", " . $value;
}
$count++;
}
}
$Error = NULL;
$this->load->helper('date');
$now = time();
$RegistrationKey = md5(uniqid());
$emailid = $_POST['username'] . '@daiict.ac.in';
$this->load->helper('text');
$startyearandprogrameid = floor($_POST['username'] / 1000);
$startyear = floor($startyearandprogrameid / 100);
$programid = $startyearandprogrameid % 100;
$this->db->where('programId', $programid);
$programdata = $this->db->get('program');
$config = array('allowed_types' => 'pdf', 'max_size' => 2048, 'upload_path' => $_SERVER['DOCUMENT_ROOT'] . "SPC/resumes/" . $_POST['username']);
$this->load->library('upload', $config);
if ($programdata->num_rows == 1) {
$insertdata = array('StudentFirstName' => $_POST['firstName'], 'StudentMiddleName' => $_POST['middleName'], 'StudentLastName' => $_POST['lastName'], 'StudentId' => $_POST['username'], 'StudentPassword' => md5($_POST['password']), 'StudentEmailAddress' => $emailid, 'StudentIsActivated' => 0, 'RoleId' => 1, 'StudentEditedDateAndTime' => unix_to_human($now), 'StudentEditorId' => $_POST['username'], 'StudentRegistrationKey' => $RegistrationKey, 'ProgramStartYear' => $startyear, 'ProgramId' => $programid, 'StudentCPI' => $_POST['CPI'], 'StudentDOB' => date("Y-m-d", strtotime($_POST['DOB'])), 'StudentSex' => $_POST['Gender'], 'StudentSSCPercentage' => $_POST['10th'], 'StudentHSCPercentage' => $_POST['12th'], 'StudentGraduationPercentage' => $_POST['Graduation'], 'StudentCurrentBacklogs' => $_POST['CurrentBackLogs'], 'StudentTotalBacklogs' => $_POST['TotalBackLogs'], 'StudentTechnicalElectives' => $_POST['TechnicalElectives'], 'StudentDomainChoice' => $Domain, 'StudentMobileNumber' => $_POST['MobileNumber'], 'StudentAlternateMobileNumber' => $_POST['AlternateMobileNumber1'], 'StudentAddressLine1' => $_POST['AddressLine1'], 'StudentAddressLine2' => $_POST['AddressLine2'], 'StudentCity' => $_POST['City'], 'StudentState' => $_POST['State'], 'StudentPostalCode' => $_POST['PostalCode'], 'StudentGuardianName' => $_POST['GuardianName'], 'StudentGuardianMobileNumber' => $_POST['GuardianMobileNumber'], 'StudentIsInterested' => $_POST['IsInterested']);
if (!is_dir($_SERVER['DOCUMENT_ROOT'] . "SPC/resumes/" . $_POST['username'])) {
mkdir($_SERVER['DOCUMENT_ROOT'] . "SPC/resumes/" . $_POST['username'], 0, true);
}
if ($this->upload->do_upload()) {
$data = $this->upload->data();
$insertdata['StudentResumePath'] = $_SERVER['DOCUMENT_ROOT'] . "resumes/" . $_POST['username'] . '/' . $data['raw_name'] . $data['file_ext'];
$emailConfig = array('mailtype' => 'html');
$this->load->library('email', $emailConfig);
$this->email->from('[email protected]', 'Student Placement Cell');
$this->email->to($emailid);
$this->email->subject("Thanks for Registration.");
$this->email->message("Please click on the below link to activate the account.<br /><a href = '" . base_url() . "register/activate/{$RegistrationKey}'>Activate Account.</a>");
if ($this->email->send() && $this->db->insert('student', $insertdata)) {
$data = array('RegistrationProcess' => TRUE);
$this->session->set_userdata($data);
return 1;
} else {
return -1;
}
} else {
$Error = array("upload" => $this->upload->display_errors());
return $Error;
}
} else {
$Error = array("studentid" => "Invalid Student ID.");
return $Error;
}
}
开发者ID:Vidhan,项目名称:PlacementCellWebsite,代码行数:58,代码来源:registerModel.php
示例7: index
public function index()
{
$time_now = now('America/Mexico_City');
$time_past = $time_now - $this->initial_date_generator(365);
$createDate_past = new DateTime(unix_to_human($time_past, TRUE, 'EU'));
$createDate_now = new DateTime(unix_to_human($time_now, TRUE, 'EU'));
$data = array('titlederecha' => "Datos", 'titleizquierda' => "Grafica", 'portafolios' => $this->get_portafolios(), 'base_url' => base_url(), 'fecha_ini' => $createDate_past->format('Y-m-d'), 'fecha_fin' => $createDate_now->format('Y-m-d'));
$this->call_views('reportes/reporte', $data);
}
开发者ID:rickyrug,项目名称:stocktrackingweb,代码行数:9,代码来源:Reportes.php
示例8: get_with_author_names
public function get_with_author_names($id_or_fields = null, $first_only = false, $order_by = null, $select_fields = array())
{
$messages = parent::get($id_or_fields, $first_only, $order_by, $select_fields);
foreach ($messages as $key => $message) {
$messages[$key]->author = $this->user_model->get_name($message->author_id);
$messages[$key]->date = unix_to_human($message->creation_date);
}
return $messages;
}
开发者ID:nicolasconnault,项目名称:streamliner,代码行数:9,代码来源:Message_model.php
示例9: _get_tpl_filter
/**
* Получение данных фильтра для вставки в шаблон
*/
private function _get_tpl_filter($filter = false)
{
if (!$filter) {
$filter = $this->users->get_filter('users_list');
}
$tpl_data['filter_login'] = isset($filter['login']) ? $filter['login'] : '';
$tpl_data['filter_register_before'] = isset($filter['register_before']) && $filter['register_before'] ? unix_to_human($filter['register_before']) : unix_to_human(now());
$tpl_data['filter_register_after'] = isset($filter['register_after']) && $filter['register_after'] ? unix_to_human($filter['register_after']) : '';
$tpl_data['filter_last_visit_before'] = isset($filter['last_visit_before']) && $filter['last_visit_before'] ? unix_to_human($filter['last_visit_before']) : unix_to_human(now());
$tpl_data['filter_last_visit_after'] = isset($filter['last_visit_after']) && $filter['last_visit_after'] ? unix_to_human($filter['last_visit_after']) : '';
return $tpl_data;
}
开发者ID:mefisto2009,项目名称:GameAP,代码行数:15,代码来源:users_control.php
示例10: get_current_date_start_time
public function get_current_date_start_time($country_code = 'BD')
{
$time_zone_array = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, $country_code);
$dateTimeZone = new DateTimeZone($time_zone_array[0]);
$dateTime = new DateTime("now", $dateTimeZone);
$unix_current_time = now() + $dateTime->getOffset();
$human_current_time = unix_to_human($unix_current_time);
$human_current_time_array = explode(" ", $human_current_time);
$human_current_date = $human_current_time_array[0];
$human_current_date_start_time = $human_current_date . ' 00:00 AM';
$unix_current_date_start_time = human_to_unix($human_current_date_start_time);
return $unix_current_date_start_time - $dateTime->getOffset();
}
开发者ID:bdlions,项目名称:webserver,代码行数:13,代码来源:Date_utils.php
示例11: get_research
function get_research($research, $number_page, $per_page)
{
$where = "(c_title LIKE '%" . $research . "%'\n\t\t\t\tOR c_content LIKE '%" . $research . "%'\n\t\t\t\tOR c_tags LIKE '%" . $research . "%')\n\t\t\t\tAND c_status = 1\n\t\t\t\tAND c_cdate <= '" . unix_to_human(now(), TRUE, 'eu') . "'";
$this->db->select('c_id, c_title, c_content, c_image, c_tags, c_cdate, c_url_rw, r_title, r_url_rw');
$this->db->from('content');
$this->db->join('rubric', 'rubric.r_id = content.r_id');
$this->db->where($where);
$this->db->order_by('c_cdate', 'DESC');
if ($per_page and $number_page) {
$this->db->limit($per_page, ($number_page - 1) * $per_page);
} elseif ($per_page) {
$this->db->limit($per_page);
}
$query = $this->db->get();
return $query;
}
开发者ID:kimoudev,项目名称:blogigniter,代码行数:16,代码来源:model_search.php
示例12: auditQuery
private function auditQuery($_POST)
{
$auditData = array();
$now = time();
$auditData['username'] = $this->session->userdata('username');
$auditData['updateDate'] = unix_to_human($now, TRUE, 'us');
$auditData['previousData'] = "";
$auditData['currentData'] = "";
if (isset($_POST['recordInformationID'])) {
$id = $_POST['recordInformationID'];
$this->db->select('*');
$this->db->from('rm_recordType');
$this->db->where('recordInformationID', $id);
$query = $this->db->get();
if ($query->num_rows() > 0) {
foreach ($query->result() as $results) {
foreach ($results as $key => $value) {
$auditData['previousData'] .= "{$key}: {$value}" . "; ";
}
}
}
} elseif (isset($_POST['retentionScheduleID'])) {
$id = $_POST['retentionScheduleID'];
$this->db->select('*');
$this->db->from('rm_retentionSchedule');
$this->db->where('retentionScheduleID', $id);
$query = $this->db->get();
if ($query->num_rows() > 0) {
foreach ($query->result() as $results) {
foreach ($results as $key => $value) {
$auditData['previousData'] .= "{$key}: {$value}" . "; ";
}
}
}
} else {
$auditData['previousData'] = "No previous data recorded";
}
foreach ($_POST as $key => $value) {
$auditData['currentData'] .= "{$key}: {$value}" . "; ";
}
$this->db->insert('rm_audit', $auditData);
$this->db->select_max('auditID');
$this->db->get('rm_audit');
}
开发者ID:JhunCabas,项目名称:records-authority,代码行数:44,代码来源:auditmodel.php
示例13: show_addform
public function show_addform()
{
$time = now('America/Mexico_City');
/* Reglas para la forma */
$this->form_validation->set_rules('portafolios', 'Portafolios', 'required|callback_validate_portafolios');
$this->form_validation->set_rules('fecha', 'Fecha', 'required');
$this->form_validation->set_rules('cantidad', 'Cantidad', 'required');
if ($this->form_validation->run() == FALSE) {
// se corre validación de reglas definidas
//Array con los datos que se le van a enviar a la vista.
$data = array('accion' => 'aportacion/show_addform', 'title' => 'Agregar aportacion', 'cantidad' => $this->form_validation->set_value('cantidad'), 'portafolios' => $this->get_portafolios(), 'selectedPortafolios' => $this->form_validation->set_value('portafolios'), 'fecha' => unix_to_human($time, TRUE, 'EU'));
$this->call_views('aportaciones/form', $data);
} else {
$p_fecha = $this->input->post('fecha');
$p_cantidad = $this->input->post('cantidad');
$p_portafolios = $this->input->post('portafolios');
$this->Operaciones_Model->insert_Operaciones_Model($p_cantidad, $p_fecha, $p_portafolios, 'AP');
redirect('aportacion/show_list', 'refresh');
}
}
开发者ID:rickyrug,项目名称:stocktrackingweb,代码行数:20,代码来源:Aportacion.php
示例14: get_rubrics_front
function get_rubrics_front()
{
$get_rubrics = $this->db->distinct()->select('rubric.r_id')->join('content', 'content.r_id = rubric.r_id')->from('rubric')->where('c_pdate <=', unix_to_human(now(), TRUE, 'eu'))->where('c_status', 1)->get();
if ($get_rubrics->num_rows() > 0) {
foreach ($get_rubrics->result() as $row) {
$r_id[] = ' OR r_id = ' . $row->r_id;
$r_id[0] = current($r_id);
}
$first = current($r_id);
$explode = explode(" OR", $first);
$first_id = $explode[1];
$params = implode('', $r_id);
$query = $this->db->query('SELECT r_id, r_title, r_description, r_url_rw
FROM rubric
WHERE ' . $first_id . ' ' . $params . '
ORDER BY r_title ASC');
return $query;
} else {
return false;
}
}
开发者ID:kimoudev,项目名称:blogigniter,代码行数:21,代码来源:model_rubric.php
示例15: create_acount
function create_acount()
{
$this->form_validation->set_rules('username', 'Usuario', 'trin|required|min_length[5]|max_length[12]|callback__username_check');
$this->form_validation->set_rules('correo', 'Correo', 'trin|required|valid_email|callback__email_check');
$this->form_validation->set_rules('password', 'Password', 'trin|required|md5');
$this->form_validation->set_rules('repassword', 'Confirmar Password', 'trin|required|matches[password]|md5');
$this->form_validation->set_message('required', 'El campo %s es requerido');
$this->form_validation->set_message('valid_email', 'El campo %s no es valido');
$this->form_validation->set_message('_username_check', 'El campo %s ya existe');
$this->form_validation->set_message('_email_check', 'El campo %s ya existe');
$this->form_validation->set_message('matches', 'Las passwords no coinciden');
if ($this->form_validation->run() == FALSE) {
$this->join();
} else {
$username = $this->input->post('username');
$correo = $this->input->post('correo');
$password = $this->input->post('password');
$activation_code = $this->_random_string(10);
$password = $this->input->post('password');
$now = time();
$gmt = unix_to_human($now, TRUE, 'eu');
$insert = $this->users_model->insert_user($username, $correo, $password, $activation_code, $gmt);
//email confirmacion
$config = array('protocol' => 'smtp', 'smtp_host' => 'ssl://smtp.googlemail.com', 'smtp_port' => 465, 'smtp_user' => '[email protected]', 'smtp_pass' => 'adriansdenis2185', 'mailtype' => 'html');
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
//configuracion del correo
$this->email->from('[email protected]', 'noockers');
$this->email->to($correo);
$this->email->subject('Verificacion de Registro en Noockers');
$this->email->message('Por favor verifique su registro ' . anchor('http://nkr.nindeo.com/users/register_confirm/' . $activation_code, 'Valida tu correo'));
//$this->email->send();
if ($this->email->send()) {
echo 'Email enviado correctamente!!';
} else {
show_error($this->email->print_debugger());
}
}
}
开发者ID:nindeo,项目名称:nkr,代码行数:39,代码来源:users.php
示例16: edit
public function edit($maintenance_contract_id = null)
{
$maintenance_contract_data = $this->maintenance_contract_model->get_values($maintenance_contract_id);
$locked = false;
if (!empty($maintenance_contract_id)) {
require_capability('maintenance_contracts:editcontracts');
$maintenance_contract_data['creation_date'] = unix_to_human($maintenance_contract_data['creation_date'], '%d/%m/%Y %h:%i');
$maintenance_contract_data['next_maintenance_date'] = unix_to_human($maintenance_contract_data['next_maintenance_date'], '%d/%m/%Y %h:%i');
form_element::$default_data = (array) $maintenance_contract_data;
// Set up title bar
$title = "Edit maintenance contract #{$maintenance_contract_id}";
$help = "Use this form to edit the maintenance contract";
} else {
// adding a new maintenance_contract
$title = "Create a new maintenance contract";
$help = 'Use this form to create a new maintenance contract';
}
$post_vars = $this->input->post();
if (!empty($post_vars)) {
foreach ($post_vars as $var => $val) {
form_element::$default_data[$var] = $val;
}
}
$this->config->set_item('replacer', array('miniant' => array('/miniant/maintenance_contracts/index|Maintenance contracts')));
$title_options = array('title' => $title, 'help' => $help, 'expand' => 'page', 'icons' => array());
$jstoload = array('signaturepad/json2', 'maintenance_contracts/edit', 'application/messages');
if (!empty($maintenance_contract_id)) {
$jstoload[] = 'maintenance_contracts/units';
}
$dropdowns = $this->get_dropdowns();
if (!empty($maintenance_contract_id)) {
$this->db->where('account_id', $maintenance_contract_data['account_id']);
$dropdowns['tenancies'] = $this->tenancy_model->get_dropdown('name', '-- Select a Tenancy/Owner --');
} else {
$dropdowns['tenancies'] = array();
}
$pageDetails = array('title' => $title, 'title_options' => $title_options, 'content_view' => 'maintenance_contract/edit', 'maintenance_contract_id' => $maintenance_contract_id, 'maintenance_contract_data' => $maintenance_contract_data, 'dropdowns' => $dropdowns, 'jstoloadinfooter' => $jstoload, 'module' => 'miniant', 'csstoload' => array('jquery.signaturepad'), 'feature_type' => 'Custom Feature');
$this->load->view('template/default', $pageDetails);
}
开发者ID:nicolasconnault,项目名称:streamliner,代码行数:39,代码来源:Maintenance_contracts.php
示例17: getContestDetail
public function getContestDetail()
{
$participantid = $this->session->userdata('participantid');
$q = "SELECT pcc.contest_id, pcc.contest_name, pcc.contest_start, pcc.contest_freeze, pcc.contest_end, pcp.participant_id, pcc.contest_penalty " . "FROM pc_contest pcc, pc_participant pcp WHERE pcc.contest_id = pcp.contest_id AND " . "pcp.participant_id = " . $participantid;
$qr = $this->db->query($q);
$row = $qr->first_row();
$limit = now();
$user = "SELECT count(*) as sum FROM pc_participant WHERE ({$limit} - participant_lastactive) <= 600 AND contest_id = " . $row->contest_id;
$userr = $this->db->query($user);
if ($qr->num_rows() > 0) {
echo "<table>";
echo "<tr><td colspan='2'>" . character_limiter($row->contest_name, 15) . "</td></tr>";
// echo "<tr><td colspan='2'>Participant ID : " . $row->participant_id . "</td></tr>";
echo "<tr><td>Start</td><td>: " . unix_to_human($row->contest_start) . "</td></tr>";
echo "<tr><td>Frz</td><td>: " . unix_to_human($row->contest_freeze) . "</td></tr>";
echo "<tr><td>End</td><td>: " . unix_to_human($row->contest_end) . "</td></tr>";
// echo "<tr><td>Pty</td><td>: " . $row->contest_penalty . " s</td></tr>";
echo "<tr><td>Active</td><td>: " . $userr->first_row()->sum . " users</td></tr>";
echo "</table>";
} else {
echo "Cannot Load Contest Detail";
}
}
开发者ID:aliariff,项目名称:lpoj,代码行数:23,代码来源:participantmodel.php
示例18: show_addform
public function show_addform()
{
$time = now('America/Mexico_City');
//se agregan reglas a la forma
$this->form_validation->set_rules('nombre', 'Nombre de portafolios', 'required');
$this->form_validation->set_rules('valorinicial', 'Valor inicial', 'required');
$this->form_validation->set_rules('fechacreacion', 'Fecha creacion', 'required');
if ($this->form_validation->run() == FALSE) {
//Array con los datos que se le van a enviar a la vista.
$data = array('accion' => 'portafolios/show_addform', 'title' => 'Agregar portafolios', 'nombre' => $this->form_validation->set_value('nombre'), 'valorinicial' => $this->form_validation->set_value('valorinicial'), 'portafolios' => $this->get_portafolios(), 'selectedPortafolios' => $this->form_validation->set_value('portafolios'), 'fechacreacion' => unix_to_human($time, TRUE, 'EU'));
$this->call_views('portafolios/form', $data);
} else {
$p_nombre = $this->input->post('nombre');
$p_valorinicial = $this->input->post('valorinicial');
$p_fechacreacion = $this->input->post('fechacreacion');
$p_portafoliospadre = $this->input->post('portafolios');
if ($p_portafoliospadre == 0) {
$p_portafoliospadre = null;
}
$this->Portafolios_Model->insert_Portafolios_Model($p_nombre, $p_valorinicial, $p_fechacreacion, $p_portafoliospadre);
redirect('portafolios', 'refresh');
}
}
开发者ID:rickyrug,项目名称:stocktrackingweb,代码行数:23,代码来源:Portafolios.php
示例19: edit
public function edit($assignment_id)
{
require_capability('assignments:edit');
$assignment_data = $this->assignment_model->get_values($assignment_id);
if (empty($assignment_data)) {
redirect(base_url() . 'miniant/orders/schedule');
}
$assignment_data->appointment_date = unix_to_human($assignment_data->appointment_date, '%d/%m/%Y %h:%i');
$order = (object) $this->order_model->get_values($assignment_data->order_id);
$order_type = $this->order_model->get_type_string($order->order_type_id);
$statuses = $this->assignment_model->get_statuses($assignment_id, false);
$current_statuses = array();
if (!empty($statuses)) {
foreach ($statuses as $status) {
$current_statuses[] = $status->status_id;
}
}
$allstatuses_array = $this->status_model->get_for_document_type('assignment');
$allstatuses = array();
foreach ($allstatuses_array as $status) {
$allstatuses[$status->id] = $status->name;
}
$assigned_technicians = $this->assignment_model->get_assigned_technicians($order->id, $assignment_data->unit_id);
$this->user_model->filter_by_role($this->role_model->get(array('name' => 'Technician'), true)->id);
$technicians = $this->user_model->get_dropdown('first_name', false);
form_element::$default_data = (array) $assignment_data;
form_element::$default_data['technician_id'] = $assigned_technicians;
form_element::$default_data['senior_technician_id'] = $order->senior_technician_id;
// Set up title bar
$title = "Edit {$assignment_data->reference_id} assignment";
$help = "Use this form to edit the assignment";
$this->config->set_item('replacer', array('miniant' => null, 'orders' => array('/miniant/orders/order|Jobs'), 'assignments' => array('/miniant/orders/schedule|Schedule'), 'edit' => $title, 'add' => $title));
$title_options = array('title' => $title, 'help' => $help, 'expand' => 'page', 'icons' => array());
$pageDetails = array('title' => $title, 'title_options' => $title_options, 'content_view' => 'assignments/edit', 'order_id' => $order->id, 'assignment_id' => $assignment_id, 'assignment_data' => $assignment_data, 'technicians' => $technicians, 'senior_technician_id' => $order->senior_technician_id, 'statuses' => $current_statuses, 'allstatuses' => $allstatuses, 'module' => 'miniant', 'feature_type' => 'Custom Feature', 'module' => 'miniant', 'assigned_technicians' => $assigned_technicians, 'priority_levels' => $this->priority_level_model->get_dropdown('name'), 'jstoloadinfooter' => array('orders/assignment_edit'), 'csstoload' => array());
$this->load->view('template/default', $pageDetails);
}
开发者ID:nicolasconnault,项目名称:streamliner,代码行数:36,代码来源:Assignments.php
示例20: cetak_surat
public function cetak_surat()
{
setlocale(LC_TIME, 'id_ID');
$this->load->helper('date');
$timenow = unix_to_human(now('Asia/Jakarta'), TRUE, 'us');
$time = date("Ymd-Hi", strtotime($timenow));
$this->load->model('m_mpdf');
$iduser = $this->input->post('iduser', TRUE);
$kategori = $this->input->post('kategori', TRUE);
$noaplikasi = $this->input->post('noaplikasi', TRUE);
if ($kategori == "menlu") {
$result = $this->m_mpdf->get_pdln_user($iduser);
$nip = $result['nip_pemohon'];
$html = $this->load->view('mpdf_template/surat_menlu', $result, true);
} else {
$result['query'] = $this->m_mpdf->get_pdln_user2($iduser, $noaplikasi);
$nip = $result['query'][0]['nip_pemohon'];
$html1 = $this->load->view('mpdf_template/surat_setneg_2', $result, true);
$html2 = $this->load->view('mpdf_template/surat_setneg_2_page2', $result, true);
}
$filename = $time . '-' . $menset . '-' . $nip;
$this->load->library('l_mpdf');
$mpdf = $this->l_mpdf->load();
$mpdf = new mPDF('', 'A4', '', '', 30, 20, 20, 25);
if ($kategori == "menlu") {
$mpdf->WriteHTML($html);
} else {
$mpdf->WriteHTML($html1);
$mpdf->AddPage();
$mpdf->WriteHTML($html2);
}
if ($filename != "") {
$mpdf->Output(FCPATH . '../files/' . $kategori . '.pdf', 'F');
}
$mpdf->Output();
}
开发者ID:datadigicore,项目名称:pdln,代码行数:36,代码来源:C_mpdf.php
注:本文中的unix_to_human函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论