if ($user && $id != 0) { $user_meta = $user; } // Define current page identifier & name $page_identifier = $identifiers[$id]; $page_name = $names[$id]; // Define the current page form action if ($id == 0) { $form_action = keepGet('(m|a|p)', false); } else { $form_action = keepGet('(m|p)', false); } ?> <!DOCTYPE html> <?php htmlTag($locale); ?> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="robots" content="none" /> <title><?php _e("Jappix manager"); ?> • <?php echo $page_name; ?> </title> <link rel="shortcut icon" href="./favicon.ico" /> <?php echoGetFiles($hash, '', 'css', 'manager.xml', '');
function emails() { $this->data['breadcrumb'] = lang('settings_admin_email_breadcrumb'); $this->data['meta_title'] = lang('settings_admin_email_meta_title'); $this->data['sub_title'] = lang('settings_admin_email_sub_title'); $this->load->model('email_m'); if ($this->input->post('message')) { $this->load->helper('security'); $msg = $this->input->post('message', true); $check = false; $data = $this->email_m->getEmail(); foreach ($msg as $key => $val) { if (count($data) > 0) { $insert['label'] = xss_clean($key); $insert['message'] = xss_clean(htmlTag($val)); $check = $this->email_m->update($insert, $key); } else { $insert['label'] = xss_clean($key); $insert['message'] = xss_clean(htmlTag($val)); $check = $this->email_m->save($insert); } } if ($check) { $this->data['msg'] = lang('settings_email_success_msg'); } else { $this->data['error'] = lang('settings_email_error_msg'); } } $email = array(); $mail = $this->email_m->getEmail(); for ($i = 0; $i < count($mail); $i++) { foreach ($mail[$i] as $key => $value) { if ($key == 'label') { $label = $value; } if ($key == 'message') { $email[$label] = $value; } } } $this->data['email'] = $email; $this->data['subview'] = 'admin/settings/emails'; $this->load->view('admin/_layout_main', $this->data); }