本文整理汇总了PHP中_can函数的典型用法代码示例。如果您正苦于以下问题:PHP _can函数的具体用法?PHP _can怎么用?PHP _can使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_can函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$this->load->model(array('levels/levels_model', 'sow_model', 'tag/tag_model', 'tag_item/tag_item_model', 'subject/subject_model'));
$this->breadcrumb->append_crumb(lang('sow'), site_url('sow'));
$this->load->model('Sow_model');
$this->append_javascript($this->data['theme_path'] . 'plugins/uploadifive/jquery.uploadifive.js');
$this->append_stylesheet($this->data['theme_path'] . 'plugins/uploadifive/uploadifive.css');
$this->data['js_lang']['url_added'] = lang('url_added');
$this->data['js_lang']['note_updated'] = lang('note_updated');
$this->data['js_lang']['note_deleted'] = lang('note_deleted');
$this->data['js_lang']['interval_updated'] = lang('interval_updated');
$this->data['js_lang']['delete_note'] = lang('delete_note');
$this->data['js_lang']['delete_period'] = lang('delete_period');
$this->data['js_lang']['sow_added_successfully'] = lang('sow_added_successfully');
$this->data['js_lang']['sow_updated_successfully'] = lang('sow_updated_successfully');
$this->data['js_lang']['confirm_delete_url'] = lang('confirm_delete_url');
$this->data['js_lang']['url_deleted_successfully'] = lang('url_deleted_successfully');
$this->data['js_lang']['update_revision'] = lang('update_revision');
$this->data['js_lang']['revision_added_successfully'] = lang('revision_added_successfully');
$this->data['js_lang']['confirm_delete_sow'] = lang('confirm_delete_sow');
if (!_can('Curriculum Planning') and !_can('Curriculum View')) {
$this->_set_flashdata(lang('scheme_of_work_permission_denied'), 'error');
redirect(site_url('dashboard'));
} else {
if (!_can('Curriculum Planning') and !in_array($this->data['current_controller_method'], array('index', 'get_sow', 'download_file_path', 'download_file'))) {
$this->_set_flashdata(lang('scheme_of_work_permission_denied'), 'error');
redirect(site_url('dashboard'));
}
}
// $this->selected_year_term_id = $this->curriculum_year_term;
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->load->model('variables_model');
$this->load->library('form_validation');
$this->data['js_lang']['are_you_sure_you_want_to_delete_this'] = lang('are_you_sure_you_want_to_delete_this');
$this->data['js_lang']['added_successfully'] = lang('added_successfully');
$this->data['js_lang']['edited_successfully'] = lang('edited_successfully');
$this->data['js_lang']['education_level'] = lang('education_level_lbl');
$this->data['js_lang']['id_type'] = lang('id_type_lbl');
$this->data['js_lang']['monthly_income'] = lang('monthly_income_lbl');
$this->data['js_lang']['nation'] = lang('nation_lbl');
$this->data['js_lang']['race'] = lang('race_lbl');
$this->data['js_lang']['payment_type'] = lang('payment_type');
$this->data['js_lang']['payment_item'] = lang('payment_item_lbl');
$this->data['js_lang']['payment_service'] = lang('payment_service');
$this->data['js_lang']['event_item'] = lang('event_item_lbl');
$this->data['js_lang']['country'] = lang('country');
$this->data['js_lang']['event_types'] = lang('event_types');
$this->data['js_lang']['kinship'] = lang('kinship');
$this->data['js_lang']['payment_terms'] = lang('payment_terms');
$this->data['js_lang']['payment_frequency_lbl'] = lang('payment_frequency_lbl');
$this->data['js_lang']['service_added_successfully'] = lang('service_added_successfully');
$this->data['js_lang']['field_added_successfully'] = lang('field_added_successfully');
$this->data['js_lang']['field_updated_successfully'] = lang('field_updated_successfully');
$this->append_javascript($this->data['theme_path'] . 'plugins/uploadifive/jquery.uploadifive_1.js');
$this->append_stylesheet($this->data['theme_path'] . 'plugins/uploadifive/uploadifive.css');
if (!_can('Variables Management')) {
$this->_set_flashdata(lang('variables_permission_denied'), 'error');
redirect(site_url('dashboard'));
}
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->load->model(array('payment_model', 'child/child_model', 'levels/levels_model', 'classes/classes_model', 'account/currency_settings_model'));
$this->load->library('form_validation');
$this->append_stylesheet($this->data['theme_path'] . 'plugins/elrte/css/elrte.css');
$this->append_javascript($this->data['theme_path'] . 'plugins/elrte/js/elrte.min.js');
$this->form_validation->set_error_delimiters('', '');
$this->append_javascript($this->data['theme_path'] . 'plugins/colorpicker/colorpicker.js');
$this->append_stylesheet($this->data['theme_path'] . 'plugins/colorpicker/colorpicker.css');
$this->append_javascript('themes/backend/plugins/chosen/chosen.jquery.js');
$this->append_stylesheet('themes/backend/plugins/chosen/chosen.css');
$default = array();
$centre_settings = $this->payment_model->getOneWhere(array('id' => $this->current_centre_role->centre_id), IMS_DB_PREFIX . 'centre');
$this->data['latest_centre_currency_setting'] = $this->currency_settings_model->getCentreCurrencySetting($this->current_centre_role->centre_id);
global $payment_date_format_settings;
if (empty($centre_settings->billing_settings)) {
$this->data['billing_settings'] = array('vat' => '', 'date_format' => '', 'time_format' => '', 'payment_term' => '', 'business_detail' => '', 'going_to_due' => '', 'over_due' => '', 'snd_over_due' => '');
// $this->data['current_currency'] = 'USD';
$this->data['tax'] = 0;
$payment_date_format_settings = array('date_format' => 'Y-m-d', 'time_format' => 'H:i:s');
} else {
$this->data['billing_settings'] = unserialize($centre_settings->billing_settings);
unset($this->data['billing_settings']['currency']);
// $this->data['current_currency'] = $this->data['billing_settings']['currency'];
$this->data['tax'] = $this->data['billing_settings']['vat'];
$payment_date_format_settings = array('date_format' => $this->data['billing_settings']['date_format'], 'time_format' => $this->data['billing_settings']['time_format']);
}
$this->data['current_currency'] = empty($this->data['latest_centre_currency_setting']) ? 'USD' : $this->data['latest_centre_currency_setting']->currency_code;
if (!_can('Payment Management')) {
$this->_set_flashdata(lang('Permission Denied'), 'error');
redirect(site_url('dashboard'));
}
}
示例4: __construct
public function __construct()
{
parent::__construct();
$this->load->model('Subject_model');
$this->data['js_lang']['are_you_sure_want_to_delete_this_subject'] = lang('are_you_sure_want_to_delete_this_subject');
$this->data['js_lang']['subject_deleted_successfully'] = lang('subject_deleted_successfully');
$this->data['js_lang']['subject_added_successfully'] = lang('subject_added_successfully');
$this->data['js_lang']['subject_edited_successfully'] = lang('subject_edited_successfully');
$this->data['js_lang']['theme_management'] = lang('theme_management');
$this->data['js_lang']['theme_deleted'] = lang('theme_deleted');
$this->data['js_lang']['confirm_delete_theme'] = lang('confirm_delete_theme');
$this->data['js_lang']['sub_theme_deleted'] = lang('sub_theme_deleted');
$this->data['js_lang']['confirm_delete_sub_theme'] = lang('confirm_delete_sub_theme');
$this->data['js_lang']['are_you_sure_want_to_delete_this_area'] = lang('are_you_sure_want_to_delete_this_area');
$this->data['js_lang']['area_deleted_successfully'] = lang('area_deleted_successfully');
$this->data['js_lang']['area_addded_successfully'] = lang('area_addded_successfully');
$this->data['js_lang']['area_edited_successfully'] = lang('area_edited_successfully');
$this->data['js_lang']['are_you_sure_want_to_delete_this_subarea'] = lang('are_you_sure_want_to_delete_this_subarea');
$this->data['js_lang']['subarea_deleted_successfully'] = lang('subarea_deleted_successfully');
$this->data['js_lang']['subarea_addded_successfully'] = lang('subrea_addded_successfully');
$this->data['js_lang']['subarea_edited_successfully'] = lang('subarea_edited_successfully');
$this->breadcrumb->append_crumb(lang('subject'), site_url('subject'));
if (!_can('Subject Management')) {
$this->_set_flashdata(lang('subject_permission_denied'), 'error');
redirect(site_url('dashboard'));
}
}
示例5: __construct
function __construct()
{
parent::__construct();
$this->load->library('unzip');
$this->unzip->allow(array('png', 'gif', 'jpeg', 'jpg', 'avi', 'mpeg', 'mov', 'mpg', 'mp4', 'wma', 'wmv'));
$this->load->model('album_model');
$this->breadcrumb->append_crumb(lang('album'), site_url('album'));
$this->append_javascript($this->data['theme_path'] . 'plugins/uploadifive/jquery.uploadifive.js');
$this->append_stylesheet($this->data['theme_path'] . 'plugins/uploadifive/uploadifive.css');
$this->data['js_lang']['child_added_successfully'] = lang('child_added_successfully');
$this->data['js_lang']['create_new_album'] = lang('create_new_album');
$this->data['js_lang']['edit_album'] = lang('edit_album');
$this->data['js_lang']['item_deleted'] = lang('item_deleted');
$this->data['js_lang']['description_added'] = lang('description_added');
$this->data['js_lang']['edit_portfolio'] = lang('edit_portfolio');
if (!_can('Album Management')) {
$this->_set_flashdata(lang('permission_denied'), 'error');
redirect(site_url('dashboard'));
}
define('NEW_ALBUM', '0');
define('NOT_PUBLISH_YET', '2');
define('PUBLISHED', '1');
$this->session->keep_flashdata('album_type');
$this->session->keep_flashdata('status_type');
$this->session->keep_flashdata('album_offset');
if ($this->data['current_controller_method'] != 'index') {
$this->session->set_flashdata('album_use_flash', true);
}
}
示例6: __construct
function __construct()
{
parent::__construct();
$this->load->model(array('leave_model', 'leave_type_model', 'user/user_model'));
$this->data['js_lang']['add_leave_entitlement'] = lang('add_leave_entitlement');
$this->data['js_lang']['add_leave_entitlement'] = lang('add_leave_entitlement');
$this->data['js_lang']['leave_entitled_successfully'] = lang('leave_entitled_successfully');
$this->data['js_lang']['update_leave_entitlement'] = lang('update_leave_entitlement');
$this->data['js_lang']['leave_entitled__updated_successfully'] = lang('leave_entitled__updated_successfully');
$this->data['js_lang']['confirm_delete'] = lang('confirm_delete');
$this->data['js_lang']['entitled_deleted_successfully'] = lang('entitled_deleted_successfully');
$this->data['js_lang']['add_off_day'] = lang('add_off_day');
$this->data['js_lang']['off_day_added'] = lang('off_day_added');
$this->data['js_lang']['update_leave_off'] = lang('update_leave_off');
$this->data['js_lang']['leave_off_updated'] = lang('leave_off_updated');
$this->data['js_lang']['leave_off_deleted'] = lang('leave_off_deleted');
$this->data['js_lang']['revoke_leave_off'] = lang('revoke_leave_off');
$this->data['js_lang']['cannot_find_leave_request'] = lang('cannot_find_leave_request');
$this->data['js_lang']['view_leave_request'] = lang('view_leave_request');
$this->data['js_lang']['reason_for_reject'] = lang('reason_for_reject');
$this->data['js_lang']['leave_rejected'] = lang('leave_rejected');
$this->data['js_lang']['sure_approve'] = lang('sure_approve');
$this->data['js_lang']['reason_for_revoke'] = lang('reason_for_revoke');
$this->data['js_lang']['leave_revoked_successfully'] = lang('leave_revoked_successfully');
$this->data['js_lang']['apply_leave'] = lang('apply_leave');
$this->data['js_lang']['submit_for_approval'] = lang('submit_for_approval');
if (!_can('Master Settings')) {
$this->_set_flashdata(lang('centre_permission_denied'), 'error');
redirect(site_url('dashboard'));
}
}
示例7: __construct
function __construct()
{
parent::__construct();
$this->load->model('relation_model');
if (!_can("Relation")) {
redirect(site_url("dashboard"));
}
}
示例8: __construct
function __construct()
{
parent::__construct();
$this->load->model('module_model');
$this->form_validation->set_error_delimiters('<label class="control-label h5" for="inputError">', '</label>');
if (!_can("Module")) {
redirect(site_url("dashboard"));
}
}
示例9: __construct
function __construct()
{
parent::__construct();
$this->load->model('blog_model');
$this->load->library('pagination');
if (!_can("Blog")) {
redirect(site_url("dashboard"));
}
}
示例10: __construct
function __construct()
{
parent::__construct();
$this->load->model(array('receipts_model', 'variables/variables_model', 'levels/levels_model'));
$this->data['js_lang']['server_error'] = lang('server_error');
if (!_can('Receipt')) {
$this->_set_flashdata(lang('receipt_permission_denied'), 'error');
redirect(site_url('dashboard'));
}
}
示例11: __construct
function __construct()
{
parent::__construct();
$this->append_javascript($this->data['theme_path'] . 'jui/js/jquery.ui.spinner.min.js');
$this->load->model(array('centre/centre_model', 'user/user_model', 'work_profile_model'));
if (!_can('Leave Configuration')) {
$this->_set_flashdata('Leave Management: Permission Denied', 'error');
redirect(site_url('dashboard'));
}
}
示例12: __construct
function __construct()
{
parent::__construct();
$this->load->model(array('centre_model', 'rc_type_model', 'rc_category_model'));
$this->breadcrumb->append_crumb(lang('centre'), site_url('centre'));
$this->load->library('pagination');
if (!_can("Center")) {
redirect(site_url("dashboard"));
}
}
示例13: __construct
public function __construct()
{
parent::__construct();
$this->load->model('Year_term_model');
$this->breadcrumb->append_crumb(lang('year_term'), site_url('year_term'));
if (!_can('Year-term Management')) {
$this->_set_flashdata(lang('year_term_management_permission_denied'), 'error');
redirect(site_url('dashboard'));
}
}
示例14: __construct
public function __construct()
{
parent::__construct();
$this->load->model(array('slo/Slo_model', 'levels/levels_model', 'sow/Sow_model', 'assessment/assessment_model', 'variables/variables_model', 'subject/subject_Model'));
$this->breadcrumb->append_crumb('SLO', site_url('slo'));
if (!_can('Curriculum Planning') and !_can('Curriculum View')) {
$this->_set_flashdata(lang('summary_of_learning_objective_permission_denied'), 'error');
redirect(site_url('dashboard'));
}
}
示例15: __construct
function __construct()
{
parent::__construct();
$this->breadcrumb->append_crumb(lang('variables'), site_url('variables/index/payment_type'));
$this->breadcrumb->append_crumb(lang('Payment_method_fields'));
$this->load->model('variables_model');
if (!_can('Variables Management')) {
$this->_set_flashdata(lang('variables_permission_denied'), 'error');
redirect(site_url('dashboard'));
}
}