本文整理汇总了PHP中flashMsg函数的典型用法代码示例。如果您正苦于以下问题:PHP flashMsg函数的具体用法?PHP flashMsg怎么用?PHP flashMsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了flashMsg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: output_errors
/**
* Output Validation Errors
*
* Using the Status class move all errors into an error
* message
*
* @access public
*/
function output_errors()
{
// Make sure the status module is
$this->CI->load->library('status/status/status');
$error = $this->error_string(' ',' ');
flashMsg('warning',$error);
}
示例2: __construct
function __construct()
{
parent::__construct();
// Set base crumb
$this->bep_site->set_crumb($this->lang->line('backendpro_control_panel'),'admin');
// Set container variable
$this->_container = $this->config->item('backendpro_template_admin') . "container.php";
$this->_phpinfocontainer = $this->config->item('backendpro_template_admin') . "phpinfocontainer.php";
// Set Pop container variable
$this->_popup_container = $this->config->item('backendpro_template_admin') . "popup.php";
// Make sure user is logged in
check('Control Panel');
// Check to see if the install path still exists
if( is_dir('install'))
{
flashMsg('warning',$this->lang->line('backendpro_remove_install'));
}
// Set private meta tags
//$this->bep_site->set_metatag('name','content',TRUE/FALSE);
$this->bep_site->set_metatag('robots','nofollow, noindex');
$this->bep_site->set_metatag('pragma','nocache',TRUE);
// Load the ADMIN asset group
$this->bep_assets->load_asset_group('ADMIN');
// Loading module model for menu on the left
$this->load->model('category/MCats');
$this->load->model('currency/MCurrency');
$this->lang->load('shop');
$this->load->language('kaimonokago/kaimonokagoadmin');
$this->load->language('welcome/webshop');
log_message('debug','BackendPro : Admin_Controller class loaded');
}
示例3: add_schedule
function add_schedule($object)
{
$group_id = $object['group_name'];
$where['group_id'] = $group_id;
$this->CI->schedule_model->delete_schedule($where);
$days = array('sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday');
$index = 0;
$day_number = 0;
/* 0 for sunday, 1 for monday and so on */
foreach ($days as $day) {
$index = 0;
$data = array();
foreach ($object[$day] as $item) {
$hr = explode(':', $item, 2);
$hr = $hr[0];
$data['group_id'] = $group_id;
$data['day'] = $day;
$data['start_time'] = $item;
$data['duration'] = $object[$day][$index++];
$data['order'] = $index;
$data['slot'] = $day_number * 24 + $hr;
$this->CI->schedule_model->add_schedule($data);
}
$day_number++;
}
flashMsg('success', 'Schedule added successfully');
return;
}
示例4: Admin_Controller
function Admin_Controller()
{
parent::Site_Controller();
// Set base crumb
$this->bep_site->set_crumb($this->lang->line('backendpro_control_panel'), 'admin');
// Set container variable
$this->_container = $this->config->item('backendpro_template_admin') . "container.php";
// Set Pop container variable
$this->_popup_container = $this->config->item('backendpro_template_admin') . "popup.php";
// Make sure user is logged in
check('Control Panel');
// Check to see if the install path still exists
if (is_dir('install')) {
flashMsg('warning', $this->lang->line('backendpro_remove_install'));
}
// Set private meta tags
//$this->bep_site->set_metatag('name','content',TRUE/FALSE);
$this->bep_site->set_metatag('robots', 'nofollow, noindex');
$this->bep_site->set_metatag('pragma', 'nocache', TRUE);
// Load the ADMIN asset group
$this->bep_assets->load_asset_group('ADMIN');
// Loading language file here rather than Shop_admin_controller.php.
// Otherwise menu items will not be displayed
$this->lang->load('shop');
$this->load->module_language('kaimonokago', 'kaimonokagoadmin');
$this->load->module_language('welcome', 'webshop');
log_message('debug', 'BackendPro : Admin_Controller class loaded');
}
示例5: delete
function delete()
{
$this->MKaimonokago->deleteitem($this->table, $this->id);
$this->session->set_flashdata('message', $this->lang->line('kago_deleted'));
flashMsg('success', $this->lang->line('kago_deleted'));
redirect($this->module . "/admin/index/", "refresh");
}
示例6: update
function update($id)
{
$this->form_validation->set_rules('ten','"Tên"','required');
$this->form_validation->set_rules('diachi','"Địa chỉ"','required');
$this->form_validation->set_rules('dienthoai','"Điện thoại"','required');
$this->form_validation->set_rules('email','"Email"','required');
$this->form_validation->set_rules('website','"Website"','required');
if($this->form_validation->run())
{
$this->MContact->updateContact($id);
$data['title']="Quản lý địa chỉ liên hệ";
$data['module'] = $this->module;
$data['header'] = $this->lang->line('backendpro_access_control');
$data['page'] = $this->config->item('backendpro_template_admin')."view";
$data['contact'] = $this->MContact->getListContact();
flashMsg('success','Thông tin liên hệ được cập nhật thành công');
$this->load->view($this->_container,$data);
}
else
{
$data['title']="Quản lý địa chỉ liên hệ";
$data['module'] = $this->module;
$data['header'] = $this->lang->line('backendpro_access_control');
$data['page'] = $this->config->item('backendpro_template_admin')."view";
$data['contact'] = $this->MContact->getListContact();
flashMsg('error','Bạn phải nhập đầy đủ thông tin');
$this->load->view($this->_container,$data);
}
}
示例7: index
function index()
{
//security check
$this->freakauth_light->check('admin');
//load necessary models and libraries
$this->load->model('postplanmodel');
$this->load->library('validation');
//set rules for falidation
$rules['packet'] = 'required';
$rules['time'] = 'required';
$rules['idletimeout'] = 'required';
$this->validation->set_rules($rules);
//get price for /byte and /minute
$data['packet'] = $this->postplanmodel->getPerByte();
$data['time'] = $this->postplanmodel->getPerMinute();
$data['idletimeout'] = $this->postplanmodel->getIdleTimeout();
$data['bw_download'] = $this->postplanmodel->getDownloadRate();
$data['bw_upload'] = $this->postplanmodel->getUploadRate();
//set page information
$data['title'] = 'Postpaid Setting';
$data['action'] = 'Postpaid Setting';
$data['notice'] = '';
$this->load->vars($data);
if ($this->validation->run() == FALSE) {
$this->load->view('admin/postplan/postplan_view');
} else {
$this->postplanmodel->save();
// $data['notice'] = 'Postpaid Settings Saved !';
flashMsg('Postpaid Settings Saved !');
redirect('/admin/postplan');
}
}
示例8: output_errors
/**
* Output Validation Errors
*
* Using the Status class move all errors into an error
* message
*
* @access public
*/
function output_errors()
{
// Make sure the status module is
$this->CI->load->module_library('status', 'status');
foreach ($this->_error_array as $error) {
flashMsg('warning', $error);
}
}
示例9: delete_group
function delete_group($where)
{
$status = $this->CI->group_model->delete_group($where);
if ($status) {
flashMsg('success', "Group Deleted Successfully");
} else {
flashMsg('warning', "Sorry Group Can't be deleted");
}
return;
}
示例10: create
function create()
{
$this->freakauth_light->check('user');
if ($this->invoicemodel->insert($this->uri->segment(3))) {
$this->print_invoice();
flashMsg('Invoice Created');
$this->load->view('invoice/invoice_view.php');
} else {
flashMsg('Cannot Create Invoice, this account has never been used');
redirect('postpaid', 'location');
}
}
示例11: view
function view($id=0)
{
$this->bep_assets->load_asset_group('TINYMCE');
$data['title']='Hỏi đáp';
$data['module'] = $this->module;
$data['hoidap']=$this->Mhoidap->getView($id);
$data['header'] = $this->lang->line('backendpro_access_control');
$data['page'] = $this->config->item('backendpro_template_admin') . "admin_hoidap_view";
$this->bep_site->set_crumb($this->lang->line('kogo_edit_hoidap'));
flashMsg('succes','Hiển thị câu hỏi số '.$id.' thành công');
$this->load->view($this->_container,$data);
}
示例12: update
function update()
{
$this->bep_assets->load_asset_group('TINYMCE');
$data['hjx'] = $this->Mslide->getIDs();
$x = $data['hjx'];
foreach($x as $key => $list )
{
$data = $this->_fields($list['id']);
$this->Mslide->updateSlide($data);
}
$this->index();
flashMsg('success','Cập nhật thành công!!!');
}
示例13: delete
function delete($id)
{
if (IS_AJAX) {
$this->MMessages->delete($id);
} else {
if ($id) {
$this->MMessages->delete($id);
flashMsg('success', 'Task deleted');
redirect('messages/admin/', 'refresh');
}
flashMsg('warning', 'Task not deleted');
redirect('messages/admin/', 'refresh');
}
}
示例14: upload
function upload()
{
$config['upload_path'] = './assets/upload/';
$config['allowed_types'] = '*';
$config['max_size'] = '0';
$config['max_width'] = '0';
$config['max_height'] = '0';
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload())
{
$data['module'] = $this->module;
$error = array('error' => $this->upload->display_errors());
$data['title']="Cập nhật lịch học";
$data['header'] = $this->lang->line('backendpro_access_control');
$data['page'] = $this->config->item('backendpro_template_admin') . "admin_lichhoc_home";
$data['query']=$this->Mlichhoc->get_lichhoc();
flashMsg('error','Bạn chưa chọn file upload hoặc định dạng file không phù hợp');
$this->load->view($this->_container,$data);
}
else
{
$upload=$this->upload->data();
if($this->Mlichhoc->delete_lichhoc()==true)
{
$pathToFile = 'assets/upload/'.$upload['file_name'];
$dulieu = new Spreadsheet_Excel_Reader($pathToFile,false,"UTF-8");
for ($i = 2; $i <= $dulieu->sheets[0]['numRows']; $i++)
{
$khoa = $dulieu->sheets[0]['cells'][$i][1];
$thoigian = $dulieu->sheets[0]['cells'][$i][2];
$diadiem = $dulieu->sheets[0]['cells'][$i][3];
$giangvien = $dulieu->sheets[0]['cells'][$i][4];
$this->Mlichhoc->insert_lichhoc($khoa,$thoigian,$diadiem,$giangvien);
}
if(file_exists($pathToFile))
unlink($pathToFile);
redirect(base_url().'index.php/lichhoc/admin','refresh');
}
}
}
示例15: edit
function edit()
{
if ($this->input->post('langname')) {
$data = $this->_fields();
$this->MKaimonokago->updateItem($this->module, $data);
flashMsg('success', $this->lang->line('kago_updated'));
redirect($this->module . '/admin/index', 'refresh');
} else {
$id = $this->uri->segment(4);
$data['title'] = $this->lang->line('kago_edit');
$data['info'] = $this->MKaimonokago->getInfo($this->module, $id);
$data['header'] = $this->lang->line('backendpro_access_control');
$data['page'] = $this->config->item('backendpro_template_admin') . "admin_edit";
$data['module'] = $this->module;
$this->load->view($this->_container, $data);
}
}