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


PHP flashdata函数代码示例

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


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

示例1: index

 public function index()
 {
     $this->auth->check_access("team");
     $this->template->title(APP_NAME, "team List");
     $data['notif'] = flashdata("notif");
     $data['result'] = $this->model_team->find_all();
     $data['result_enginer'] = $this->model_team->get_where('user', array('user_group' => 'enginer'));
     $this->renderAdmin("admin/team/team_list", $data);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:9,代码来源:Team.php

示例2: index

 public function index($offset = 0)
 {
     $this->auth->login_scurity();
     $this->template->title(APP_NAME, "Notification List");
     $limit = isset($_GET['limit']) ? $_GET['limit'] : 10;
     $q = isset($_GET['q']) ? $_GET['q'] : '';
     $level = $this->auth->level_name_by_idlevel(user_admin('level'));
     $user_reff = NULL;
     $user_reff_id = NULL;
     if (in_array($level, array('pm_vendor_manager', 'tt_vendor_manager', 'tt_vendor_helpdesk'))) {
         $user_reff = 'vendor';
         $user_reff_id = user_admin('idvendor');
     }
     $config['base_url'] = "admin/notification/index/";
     $config['total_rows'] = $this->model_notification->count_all($user_reff, $user_reff_id);
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $data['pagination'] = $this->pagination($config);
     $data['notif'] = flashdata("notif");
     $data['result'] = $this->model_notification->get_notification($offset, $limit, $user_reff, $user_reff_id);
     $data['total_rows'] = $config['total_rows'];
     $data['notif'] = flashdata("notif");
     $data['user_reff'] = $user_reff;
     $data['user_reff_id'] = $user_reff_id;
     $this->renderAdmin("admin/notification/notification_list", $data);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:26,代码来源:Notification.php

示例3: index

 public function index($offset = 0)
 {
     $this->auth->check_access("pm");
     $data['notif'] = flashdata("notif");
     $data['result'] = $this->model_pm->get_pm();
     $this->renderAdmin("admin/pm/pm_list", $data);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:7,代码来源:Pm.php

示例4: delete

 public function delete($id)
 {
     $this->user->soft_delete($id);
     save_log('Excluiu usuário id: ' . $id);
     flashdata('Usuário excluído com Sucesso!');
     redirect('app/users');
 }
开发者ID:rogerioleal1,项目名称:ci_base,代码行数:7,代码来源:Users.php

示例5: delete

 public function delete($id)
 {
     $this->group->delete($id);
     $this->group_menu->delete(['group_id' => $id]);
     flashdata('Grupo excluído com sucesso!');
     save_Log('Excluiu grupo id: ' . $id);
     redirect('app/groups');
 }
开发者ID:rogerioleal1,项目名称:ci_base,代码行数:8,代码来源:Groups.php

示例6: plan

 public function plan()
 {
     $this->auth->check_access("pm_plan");
     $this->form_validation->set_rules("periode", "Previous Period", "required");
     $this->form_validation->set_rules("new_periode", "New Period", "required");
     if ($this->form_validation->run()) {
         $periode = $this->input->post('periode');
         $vendor = $this->input->post('vendor');
         $result_periode = $this->model_pm->get_single('pm_period', 'idpm_period', $periode);
         $result_task_site = $this->get_not_pm($periode, $vendor);
         $all_task_site = array();
         $not_check = array();
         //print_pre($result_task_site); exit;
         foreach ($result_task_site as $site) {
             $all_task_site[] = $site->idpm;
         }
         $site_check = $this->input->post('site');
         if (!$site_check) {
             $site_check = array();
         }
         foreach ($all_task_site as $site_id) {
             if (!in_array($site_id, $site_check)) {
                 $not_check[] = $site_id;
             }
         }
         //print_pre($not_check); exit();
         $result_pm = $this->model_pm->get_site_periode_nocheck($periode, $vendor, $not_check);
         //print_pre($result_pm); exit();
         foreach ($result_pm as $pm) {
             $data = array();
             $data['pm_parent'] = $pm->idpm;
             $data['pm_vendor'] = $pm->pm_vendor;
             $data['pm_plan_name'] = $pm->pm_plan_name;
             $data['user_iduser'] = $pm->user_iduser;
             $data['pm_period_idpm_period'] = $this->input->post('new_periode');
             $data['pm_description'] = $pm->pm_description;
             $data['om_create_date'] = date("Y-M-d H:i:s");
             $data['om_create_by'] = user_admin('iduser');
             $data['om_deletion_flag'] = '0';
             $idpm = $this->model_pm->store($data);
             //
             $result_info = $this->model_pm->get_info($pm->pmp_idsite);
             $data = array("pm_idpm" => $idpm, "pmp_idsite" => $pm->pmp_idsite, "pmp_vendor" => $pm->pmp_vendor, "vendor_user_idvendor_user_pic" => '', "pmp_idsite" => $pm->pmp_idsite, "pmp_status" => "Missing PIC Assignment", "pmp_remark" => "", "pmp_task_type" => $pm->pmp_task_type, "pmp_priority" => $pm->pmp_priority, "pmp_blocked_access" => $pm->pmp_blocked_access, "om_created_date" => date("Y-m-d H:i:s"), "om_update_date" => date("Y-m-d H:i:s"), "om_created_by" => user_admin('iduser'), "om_deletion_flag" => '0', "flag_last_checked" => $pm->flag_last_checked);
             $idpm_plan_detil = $this->model_pm->insert('pm_plan_detail', $data);
             $data = array("pmh_remark" => "", "pmh_status" => "Missing PIC Assignment", "pmh_by" => user_admin("iduser"), "pmh_date" => date('Y-m-d H:i:s'), "PM_PLAN_DETIL_idpm_plan" => $idpm_plan_detil);
             $this->model_pm->insert('pm_history', $data);
         }
         set_flashdata("notif", alert("PM Plan sucess, selanjutnya Meluncur test ke Task list "));
     }
     $data = array();
     $data['notif'] = flashdata("notif");
     $data['result_periode'] = $this->model_periode->get_periode(0, 100, NULL);
     $data['result_vendor'] = $this->model_pm->get_all_data('OMSubcontractor');
     $this->renderAdmin("admin/pm/pm_plan", $data);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:55,代码来源:Pm.php

示例7: import_csv

 /**
  * Imports the .csv-file and outputs a download.
  * @param file $filename
  */
 private function import_csv($filename)
 {
     $row = 0;
     $out = fopen('php://output', 'w');
     ob_start();
     fputcsv($out, array('proefpersoon', 'leeftijd in maanden', 'leeftijd in maanden en dagen (m;d)', 'percentielscore begrip', 'taalleeftijd begrip', 'percentielscore productie', 'taalleeftijd productie', 'percentielscore woordvormen', 'taalleeftijd woordvormen', 'percentielscore zinnen', 'taalleeftijd zinnen'), ';');
     $separator = $this->input->post('separator');
     if (($handle = fopen($filename, 'r')) !== FALSE) {
         while (($data = fgetcsv($handle, 1000, $separator)) !== FALSE) {
             $row++;
             if ($row != 1 && $data !== array(NULL)) {
                 if (count($data) == 8) {
                     // TODO: remove duplicate code below (refer to functions age_in_months)
                     $diff = date_diff(new DateTime($data[1]), new DateTime($data[2]));
                     $ageinmonths = intval($diff->format('%r') . ($diff->format('%m') + 12 * $diff->format('%y')));
                     $ageinmonthsdays = $diff->format('%r') . ($diff->format('%m') + 12 * $diff->format('%y')) . ';' . $diff->format('%d');
                     $ncdi_check = array('ip_address' => $this->input->ip_address(), 'p_number' => $data[0], 'ageinmonths' => $ageinmonths, 'ageinmonthsdays' => $ageinmonthsdays, 'gender' => $data[3] === 'M' ? Gender::Male : Gender::Female, 'b_score' => intval($data[4]), 'p_score' => intval($data[5]), 'w_score' => intval($data[6]), 'z_score' => intval($data[7]));
                 } else {
                     flashdata(sprintf('Verkeerd aantal kolommen op rij %d, check het bestand. (heb je het goede scheidingsteken aangevinkt?)', $row), FALSE);
                     redirect('ncdi_calculator');
                 }
                 // TODO: deal with constants here
                 $test = $this->testModel->get_test_by_code('ncdi_wz');
                 $testcat_codes = array('b', 'p', 'w', 'z');
                 $row = array($ncdi_check['p_number'], $ncdi_check['ageinmonths'], $ncdi_check['ageinmonthsdays']);
                 foreach ($testcat_codes as $testcat_code) {
                     $testcat = $this->testCatModel->get_testcat_by_code($test, $testcat_code);
                     $raw_score = $ncdi_check[$testcat_code . '_score'];
                     if ($raw_score) {
                         $perc = $this->percentileModel->find_percentile($testcat->id, $ncdi_check['gender'], $ncdi_check['ageinmonths'], $raw_score);
                         $age = $this->percentileModel->find_50percentile_age($testcat->id, $ncdi_check['gender'], $raw_score);
                         array_push($row, $perc);
                         array_push($row, $age);
                     } else {
                         array_push($row, '-');
                         array_push($row, '-');
                     }
                 }
                 fputcsv($out, $row, ';');
                 //$this->NCDICheckModel->add_ncdi_check($ncdi_check);
             }
         }
         fclose($handle);
     }
     $csv = ob_get_contents();
     ob_end_clean();
     fclose($out);
     return $csv;
 }
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:53,代码来源:calculator.php

示例8: index

 public function index($offset = 0)
 {
     $this->auth->check_access("meta_list");
     $this->template->title(APP_NAME, "Meta List");
     $this->load->library('pagination');
     $limit = isset($_GET['limit']) ? $_GET['limit'] : 10;
     $q = isset($_GET['q']) ? $_GET['q'] : '';
     $config['base_url'] = "admin/meta/index/";
     $config['total_rows'] = $this->model_meta->count_all($q);
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $data['pagination'] = $this->pagination($config);
     $data['notif'] = flashdata("notif");
     $data['result'] = $this->model_meta->get_meta($offset, $limit, $q);
     $this->renderAdmin("admin/meta/meta_list", $data);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:16,代码来源:Meta.php

示例9: index

 public function index($offset = 0)
 {
     $this->auth->check_access("site");
     $this->template->title(APP_NAME, "site List");
     $limit = isset($_GET['limit']) ? $_GET['limit'] : 10;
     $q = isset($_GET['q']) ? $_GET['q'] : '';
     $config['base_url'] = "admin/site/index/";
     $config['total_rows'] = $this->model_site->count_all($q);
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $data['pagination'] = $this->pagination($config);
     $data['notif'] = flashdata("notif");
     $data['result'] = $this->model_site->get_site($offset, $limit, $q);
     $data['total_rows'] = $config['total_rows'];
     $data['notif'] = flashdata("notif");
     $this->renderAdmin("admin/site/site_general", $data);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:17,代码来源:Site.php

示例10: index

 public function index($offset = 0)
 {
     $this->auth->check_access("tt_access");
     $this->load->library('pagination');
     $limit = isset($_GET['limit']) ? $_GET['limit'] : 10;
     $q = isset($_GET['q']) ? $this->input->get('q', TRUE) : '';
     $data_filter = array();
     if (isset($_GET['siteid']) and !empty($_GET['siteid'])) {
         $data_filter['protelindo_site_id'] = $this->input->get('siteid', TRUE);
     }
     if (isset($_GET['region']) and !empty($_GET['region'])) {
         $data_filter['Region'] = $this->input->get('region', TRUE);
     }
     if (isset($_GET['status']) and !empty($_GET['status'])) {
         $data_filter['sla_event_status'] = $this->input->get('status', TRUE);
     }
     if (isset($_GET['desc']) and !empty($_GET['desc'])) {
         $data_filter['tt_status_description'] = $this->input->get('desc', TRUE);
     }
     if (isset($_GET['status_description']) and !empty($_GET['status_description'])) {
         $data_filter['tt_status_description'] = $this->input->get('status_description', TRUE);
     }
     if (isset($_GET['ttno']) and !empty($_GET['ttno'])) {
         $data_filter['tt_no'] = $this->input->get('ttno', TRUE);
     }
     //default tt open
     $data_filter['tt_open'] = $this->input->get('tt_open', TRUE);
     $config['base_url'] = "admin/tt/index/";
     $config['total_rows'] = $this->model_tt->count_all($data_filter);
     $config['per_page'] = $limit;
     $config['uri_segment'] = 4;
     $data['pagination'] = $this->pagination($config);
     $data['notif'] = flashdata("notif");
     $data['result'] = $this->model_tt->get_tt($offset, $limit, $data_filter);
     $data['result_region'] = $this->model_tt->get_all_data('Region');
     $data['result_vendor'] = $this->model_tt->get_vendor();
     $data['result_status'] = $this->model_tt->get_status();
     $data['result_status_description'] = $this->model_tt->get_status_description();
     $data['total_rows'] = $config['total_rows'];
     $this->renderAdmin("admin/tt/tt_list", $data);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:41,代码来源:Tt.php

示例11: delete

 /** Deletes the specified closing. */
 public function delete($closing_id)
 {
     $this->closingModel->delete_closing($closing_id);
     flashdata(lang('closing_deleted'));
     redirect($this->agent->referrer(), 'refresh');
 }
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:7,代码来源:closing.php

示例12: update

 public function update($id = NULL)
 {
     $this->auth->check_access("vendor_user_update");
     $this->template->title(APP_NAME, "vendor user Update");
     $this->form_validation->set_rules("username", "vendor_username", "required");
     $this->form_validation->set_rules("fullname", "full name", "required");
     $this->form_validation->set_rules("phone", "phone", "required");
     $this->form_validation->set_rules("email", "email", "required|valid_email");
     if ($this->form_validation->run()) {
         $config['upload_path'] = './asset/vendor-user-image/';
         $config['allowed_types'] = 'gif|jpg|png';
         $config['max_size'] = '9999999';
         $config['max_width'] = '9999999';
         $config['max_height'] = '9999999';
         $this->load->library('upload', $config);
         if ($_FILES and $_FILES['avatar']['name']) {
             if (!$this->upload->do_upload("avatar")) {
                 $error = $this->upload->display_errors();
                 set_flashdata("notif", alert($error, "danger"));
                 redirect("admin/vendor_user");
             } else {
                 $data_upload = $this->upload->data();
                 $data['avatar'] = $data_upload['file_name'];
             }
         }
         $data['username'] = $this->input->post("username");
         $data['fullname'] = $this->input->post("fullname");
         $data['idvendor'] = user_admin('idvendor');
         $data['email'] = $this->input->post("email");
         $data['phone'] = $this->input->post("phone");
         $data['om_update_date'] = date("Y-m-d H:i:s");
         $data['om_update_by'] = user_admin('iduser');
         $data['om_deletion_flag'] = 0;
         $data['access_pm'] = $this->input->post("access_pm");
         $data['access_tt'] = $this->input->post("access_tt");
         $data['imei_number'] = $this->input->post("imei_number");
         $this->model_vendor_user->change($id, $data);
         $this->model_vendor_user_region->delete_region_byid_vendor($id);
         //insert multiple user region
         $data_region = array();
         $region_id = $this->input->post('region_id');
         if (is_array($region_id)) {
             foreach ($region_id as $region) {
                 $data_region = array('vendor_user_idvendor_user' => $id, 'idregion' => $region);
                 $this->model_vendor_user_region->store($data_region);
             }
         }
         set_flashdata("notif", alert("Berhasil mengupdate data vendor user"));
         redirect("admin/vendor_user");
     }
     $data['notif'] = flashdata("notif");
     $data["result_vendor"] = $this->model_vendor_user->get_all_data('OMSubcontractor');
     $data["vendor_user_level"] = $this->config->item("level");
     $data['row'] = $this->model_vendor_user->find($id);
     $data["result_region"] = $this->model_vendor_user->get_all_data('Region');
     $data["result_region_selected"] = $this->model_vendor_user_region->get_region_byid_vendor($id);
     $this->renderAdmin("admin/vendor_user/vendor_user_update", $data);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:58,代码来源:Vendor_user.php

示例13: get_jnotif

function get_jnotif()
{
    return flashdata('jnotif');
}
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:4,代码来源:app_helper.php

示例14: delete

 /** Deletes the specified percentile, and returns to previous page */
 public function delete($percentile_id)
 {
     $this->percentileModel->delete_percentile($percentile_id);
     flashdata(lang('percentile_deleted'));
     redirect('percentile', 'refresh');
 }
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:7,代码来源:percentile.php

示例15: delete

 /** Deletes the specified language, and returns to previous page */
 public function delete($language_id)
 {
     $this->languageModel->delete_language($language_id);
     flashdata(lang('language_deleted'), TRUE, 'language_message');
     redirect($this->agent->referrer(), 'refresh');
 }
开发者ID:UiL-OTS-labs,项目名称:babylab-admin,代码行数:7,代码来源:language.php


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