protected function view_404() { //first configurate raintpl //you should set that place you store your templates files //add css page browser\page::add_header('<link rel="stylesheet" type="text/css" href="./plugins/system/msg/styles/404.css" />'); $this->cache = $this->raintpl->cache('404', 60); if ($this->cache) { //file is exist in cache //going to show that on page with browser\page //for more information about show_block function in browser\page see browser\page documents $page_content = $this->cache; } else { //file is not exist in cache going to create that //add tag for show messages //with assign you send value for varible in html file //for more information about template\raintpl->assign see template\raintpl documents $this->raintpl->assign("msg_404", _('Sorry. Page Not Found!')); $this->raintpl->assign("text404", _('404 !')); //after set all varibles we going to show that on page with browser\page $page_content = $this->raintpl->draw('404', true); } //return tittle of content you want to show return array(_('Not Found!'), $page_content); }
protected function view_draw($config) { //configure raintpl // $this->raintpl->configure('tpl_dir', 'core/lib/controls/uploader/'); //add headers to page// browser\page::add_header('<script src="./core/ect/scripts/events/functions.js"></script>'); browser\page::add_header('<script src="./core/lib/controls/uploader/ctr_uploader.js"></script>'); browser\page::add_header('<link rel="stylesheet" type="text/css" href="./core/lib/controls/uploader/ctr_uploader.css" />'); if ($config['SCRIPT_SRC'] != '') { browser\page::add_header('<script src="' . $config['SCRIPT_SRC'] . '"></script>'); } if ($config['CSS_FILE'] != '') { browser\page::add_header('<link rel="stylesheet" type="text/css" href="' . $config['CSS_FILE']) . '" />'; } $this->raintpl->assign("size", $config['SIZE']); $this->raintpl->assign("class", $config['CLASS']); $this->raintpl->assign("form", $config['FORM']); $this->raintpl->assign("name", $config['NAME']); $this->raintpl->assign("label", $config['LABEL']); $this->raintpl->assign("help", $config['HELP']); $this->raintpl->assign("type", $config['TYPE']); $this->raintpl->assign("txt_file_address", _('File name')); $this->raintpl->assign("txt_upload", _('Upload')); $this->raintpl->assign("txt_select", _('Select')); $this->raintpl->assign("txt_max_size", _('Max Size')); $this->raintpl->assign("txt_max_size_unit", $config['FILE_UNIT']); $this->raintpl->assign("max_size", $config['MAX_FILE_SIZE']); $this->raintpl->assign("max_size_unit", $config['MAX_FILE_SIZE_UNIT']); $this->raintpl->assign("txt_file_types", _('Valid types')); $this->raintpl->assign("file_types", $config['FILE_TYPES']); $this->raintpl->assign("preview", $config['PREVIEW']); //return control return $this->raintpl->draw('ctr_uploader', true); }
public function view_draw($e, $config) { if ($config['CSS_FILE'] != '') { browser\page::add_header(''); } $this->raintpl->assign("e", $e); $this->raintpl->assign("style", $config['STYLE']); $this->raintpl->assign("class", $config['CLASS']); return $this->raintpl->draw("ctr_row", true); }
public function view_draw($config, $show) { //configure raintpl // $this->raintpl->configure('tpl_dir', 'core/lib/controls/combobox/tpl/'); //add headers to page// browser\page::add_header('<script src="./core/ect/scripts/events/functions.js"></script>'); if ($config['SCRIPT_SRC'] != '') { browser\page::add_header('<script src="' . $config['SCRIPT_SRC'] . '"></script>'); } if ($config['CSS_FILE'] != '') { browser\page::add_header('<link rel="stylesheet" type="text/css" href="' . $config['CSS_FILE']) . '" />'; } //Assign variables $this->raintpl->assign("id", $config['NAME']); $this->raintpl->assign("form", $config['FORM']); $this->raintpl->assign("value", $config['VALUE']); $this->raintpl->assign("label", $config['LABEL']); $elements = []; if ($config['COLUMN_LABELS'] == '') { //WANT TO SHOW SIMPLE ARRAY $indexes = array_keys($config['SOURCE']); foreach ($config['SOURCE'] as $keys => $source) { $elements[$keys]['label'] = $source; $elements[$keys]['value'] = $source; } } else { //want to bind control to table foreach ($config['TABLE'] as $keys => $source) { $elements[$keys]['label'] = $source[$config['COLUMN_LABELS']]; $elements[$keys]['value'] = $source[$config['COLUMN_VALUES']]; } } $this->raintpl->assign("source", $elements); $this->raintpl->assign("size", $config['SIZE']); $this->raintpl->assign("help", $config['HELP']); $this->raintpl->assign("bs_control", $config['BS_CONTROL']); $this->raintpl->assign("inline", $config['INLINE']); $this->raintpl->assign("styles", $config['STYLE']); $this->raintpl->assign("class", $config['CLASS']); $this->raintpl->assign("j_onchange", $config['J_ONCHANGE']); $this->raintpl->assign("p_onchange_f", $config['P_ONCHANGE_FUNCTION']); $this->raintpl->assign("p_onchange_p", $config['P_ONCHANGE_PLUGIN']); $this->raintpl->assign("j_after_onchange", $config['J_AFTER_ONCHANGE']); if ($config['DISABLE']) { $this->raintpl->assign("disabled", 'disabled'); } else { $this->raintpl->assign("disabled", 'enabled'); } //return control $ctr = $this->raintpl->draw('ctr_combobox', true); if ($show) { echo $ctr; } return $ctr; }
public function view_draw($config, $show) { //configure raintpl // $this->raintpl->configure('tpl_dir', 'core/lib/controls/textbox/tpl/'); //add headers to page// browser\page::add_header('<script src="./core/ect/scripts/events/functions.js"></script>'); if ($config['SCRIPT_SRC'] != '') { browser\page::add_header('<script src="' . $config['SCRIPT_SRC'] . '"></script>'); } if ($config['CSS_FILE'] != '') { browser\page::add_header('<link rel="stylesheet" type="text/css" href="' . $config['CSS_FILE']) . '" />'; } //Assign variables $this->raintpl->assign("id", $config['NAME']); $this->raintpl->assign("form", $config['FORM']); $this->raintpl->assign("password", $config['PASSWORD']); $this->raintpl->assign("value", $config['VALUE']); $this->raintpl->assign("label", $config['LABEL']); $this->raintpl->assign("help", $config['HELP']); $this->raintpl->assign("size", $config['SIZE']); $this->raintpl->assign("bs_size", $config['BS_SIZE']); $this->raintpl->assign("type", $config['TYPE']); $this->raintpl->assign("bs_control", $config['BS_CONTROL']); $this->raintpl->assign("inline", $config['INLINE']); $this->raintpl->assign("placeholder", $config['PLACE_HOLDER']); $this->raintpl->assign("styles", $config['STYLE']); $this->raintpl->assign("class", $config['CLASS']); $this->raintpl->assign("addon", $config['ADDON']); $this->raintpl->assign("j_onclick", $config['J_ONCLICK']); $this->raintpl->assign("p_onclick_f", $config['P_ONCLICK_FUNCTION']); $this->raintpl->assign("p_onclick_p", $config['P_ONCLICK_PLUGIN']); $this->raintpl->assign("j_after_onclick", $config['J_AFTER_ONCLICK']); $this->raintpl->assign("j_onfocus", $config['J_ONFOCUS']); $this->raintpl->assign("p_onfocus_f", $config['P_ONFOCUS_FUNCTION']); $this->raintpl->assign("p_onfocus_p", $config['P_ONFOCUS_PLUGIN']); $this->raintpl->assign("j_after_onfocus", $config['J_AFTER_ONFOCUS']); $this->raintpl->assign("j_onblur", $config['J_ONBLUR']); $this->raintpl->assign("p_onblur_f", $config['P_ONBLUR_FUNCTION']); $this->raintpl->assign("p_onblur_p", $config['P_ONBLUR_PLUGIN']); $this->raintpl->assign("j_after_onblur", $config['J_AFTER_ONBLUR']); if ($config['DISABLE']) { $this->raintpl->assign("disabled", 'disabled'); } else { $this->raintpl->assign("disabled", 'enabled'); } //return control $ctr = $this->raintpl->draw('ctr_textbox', true); if ($show) { echo $ctr; } return $ctr; }
public function view_draw($config) { //configure raintpl // $this->raintpl->configure('tpl_dir', 'core/lib/controls/button/tpl/'); //add headers to page// browser\page::add_header('<script src="./core/ect/scripts/events/functions.js"></script>'); if ($config['SCRIPT_SRC'] != '') { browser\page::add_header('<script src="' . $config['SCRIPT_SRC'] . '"></script>'); } if ($config['CSS_FILE'] != '') { browser\page::add_header('<link rel="stylesheet" type="text/css" href="' . $config['CSS_FILE']) . '" />'; } //Assign variables $this->raintpl->assign("id", $config['NAME']); $this->raintpl->assign("href", $config['HREF']); //if href config is enabled we are sorry for do onclick events if ($config['HREF'] != '') { $config['J_ONCLICK'] = '0'; $config['P_ONCLICK_FUNCTION'] = '0'; $config['P_ONCLICK_PLUGIN'] = '0'; $config['J_AFTER_ONCLICK'] = '0'; } $this->raintpl->assign("form", $config['FORM']); $this->raintpl->assign("value", $config['VALUE']); $this->raintpl->assign("bs_control", $config['BS_CONTROL']); $this->raintpl->assign("size", $config['SIZE']); $this->raintpl->assign("label", $config['LABEL']); $this->raintpl->assign("type", 'btn btn-' . $config['TYPE']); $this->raintpl->assign("styles", $config['STYLE']); $this->raintpl->assign("class", $config['CLASS']); $this->raintpl->assign("j_onclick", $config['J_ONCLICK']); $this->raintpl->assign("p_onclick_f", $config['P_ONCLICK_FUNCTION']); $this->raintpl->assign("p_onclick_p", $config['P_ONCLICK_PLUGIN']); $this->raintpl->assign("j_after_onclick", $config['J_AFTER_ONCLICK']); $this->raintpl->assign("j_onfocus", $config['J_ONFOCUS']); $this->raintpl->assign("p_onfocus_f", $config['P_ONFOCUS_FUNCTION']); $this->raintpl->assign("p_onfocus_p", $config['P_ONFOCUS_PLUGIN']); $this->raintpl->assign("j_after_onfocus", $config['J_AFTER_ONFOCUS']); $this->raintpl->assign("j_onblur", $config['J_ONBLUR']); $this->raintpl->assign("p_onblur_f", $config['P_ONBLUR_FUNCTION']); $this->raintpl->assign("p_onblur_p", $config['P_ONBLUR_PLUGIN']); $this->raintpl->assign("j_after_onblur", $config['J_AFTER_ONBLUR']); if ($config['DISABLE']) { $this->raintpl->assign("disabled", 'disabled'); } else { $this->raintpl->assign("disabled", 'enabled'); } //return control return $this->raintpl->draw('ctr_button', true); }
public function view_draw($config) { if ($config['CSS_FILE'] != '') { browser\page::add_header('<link rel="stylesheet" type="text/css" href="' . $config['CSS_FILE']) . '" />'; } $this->raintpl->assign("name", $config['NAME']); $this->raintpl->assign("label", $config['LABEL']); $this->raintpl->assign("id", $config['NAME']); $this->raintpl->assign("style", $config['STYLE']); $this->raintpl->assign("class", $config['CLASS']); $this->raintpl->assign("disabled", $config['DISABLED']); $this->raintpl->assign("form", $config['FORM']); $this->raintpl->assign("value", $config['VALUE']); $this->raintpl->assign("checked", $config['CHECKED']); return $this->raintpl->draw("ctr_radioitem", true); }
protected function view_main($menu, $content, $user) { browser\page::add_header('<link href="./plugins/system/administrator/style/core_content.css" rel="stylesheet">'); //Assign variables $this->raintpl->assign("menu", $menu); $this->raintpl->assign("content", $content); $this->raintpl->assign("user_logout", _('Log Out')); $this->raintpl->assign("user_logout_url", core\general::create_url(array('plugin', 'users', 'action', 'btn_logout_onclick'))); $this->raintpl->assign("user_name", $user['username']); $this->raintpl->assign("user_profile", _('Profile')); $this->raintpl->assign("user_profile_url", core\general::create_url(array('plugin', 'users', 'action', 'profile'))); $this->raintpl->assign("user_settings", _('Settings')); $this->raintpl->assign("user_settings_url", core\general::create_url(array('service', '1', 'plugin', 'administrator', 'action', 'main', 'p', 'administrator', 'a', 'settings'))); $this->raintpl->assign("sarkesh_admin", _('Sarkesh Administrator')); $this->raintpl->assign("sarkesh_admin_url", core\general::create_url(array('service', '1', 'plugin', 'administrator', 'action', 'main', 'p', 'administrator', 'a', 'dashboard'))); //draw and return back menus return $this->raintpl->draw('core_content', true); }
protected function view_draw($config) { if ($config['CSS_FILE'] != '') { browser\page::add_header($config['CSS_FILE']); } $this->raintpl->assign('headers', $config['HEADERS']); $this->raintpl->assign('rows', $config['ROWS']); $this->raintpl->assign('headers_width', $config['HEADERS_WIDTH']); $this->raintpl->assign('size', $config['SIZE']); $this->raintpl->assign('bs_control', $config['BS_CONTROL']); $this->raintpl->assign('border', $config['BORDER']); $this->raintpl->assign('hover', $config['HOVER']); $this->raintpl->assign('striped', $config['STRIPED']); $this->raintpl->assign('class', $config['CLASS']); if ($config['TYPE'] == 'NORMAL') { return $this->raintpl->draw("ctr_table_normal", true); } else { return $this->raintpl->draw("ctr_table_source", true); } }
protected function view_draw($config) { if ($config['EDITOR']) { browser\page::add_header('<script src="./core/lib/controls/textarea/editors/nicedit/nicEdit.js" type="text/javascript"></script>'); } if ($config['CSS_FILE'] != '') { browser\page::add_header('<link rel="stylesheet" type="text/css" href="' . $config['CSS_FILE']) . '" />'; } $this->raintpl->assign("name", $config['NAME']); $this->raintpl->assign("label", $config['LABEL']); $this->raintpl->assign("help", $config['HELP']); $this->raintpl->assign("id", $config['NAME']); $this->raintpl->assign("rows", $config['ROWS']); $this->raintpl->assign("size", $config['SIZE']); $this->raintpl->assign("style", $config['STYLE']); $this->raintpl->assign("value", $config['VALUE']); $this->raintpl->assign("editor", $config['EDITOR']); $this->raintpl->assign("form", $config['FORM']); $this->raintpl->assign("class", $config['CLASS']); return $this->raintpl->draw("ctr_textarea", true); }