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


PHP Get::rel_path方法代码示例

本文整理汇总了PHP中Get::rel_path方法的典型用法代码示例。如果您正苦于以下问题:PHP Get::rel_path方法的具体用法?PHP Get::rel_path怎么用?PHP Get::rel_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Get的用法示例。


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

示例1: show

 public function show()
 {
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     $rmodel = new AdminrulesAdm();
     switch (Get::req('res', DOTY_ALPHANUM, "")) {
         case 'ok_ins':
             UIFeedback::info(Lang::t('_OPERATION_SUCCESSFUL', 'standard'));
             break;
         case 'err_ins':
             UIFeedback::error(Lang::t('_OPERATION_FAILURE', 'standard'));
             break;
         default:
             if ($rmodel->totalGroup() <= 0) {
                 UIFeedback::notice(Lang::t('_NO_PROFILE_SET', 'adminrules'));
             }
             break;
     }
     $rules_list_js = "";
     if ($this->permissions['assign_profile']) {
         $rules = $rmodel->getGroupForDropdown();
         $rules_list_js .= '[';
         $first = true;
         foreach ($rules as $idst => $label) {
             $rules_list_js .= ($first ? '' : ',') . '{"label":"' . $label . '","value":' . $idst . '}';
             if ($first) {
                 $first = false;
             }
         }
         $rules_list_js .= ']';
     }
     $this->render('show', array('filter_text' => $this->_getSessionValue('filter', ""), 'permissions' => $this->permissions, 'rules_list_js' => $rules_list_js));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:32,代码来源:AdminmanagerAdmController.php

示例2: init

 function init()
 {
     YuiLib::load(array('json' => 'json-min.js', 'container' => 'container_core-min.js', 'menu' => 'menu-min.js', 'button' => 'button-min.js', 'treeview' => 'treeview-min.js'), array('assets/skins/sam' => 'skin.css'));
     cout(Util::get_css('base-folder-tree.css'), 'page_head');
     cout(Util::get_js('appLms/lib/category/lib.categorytree.js'), 'page_head');
     Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:7,代码来源:lib.categorytree.php

示例3: setupJs

    function setupJs($tags_id, $private_tags = '')
    {
        if (!$this->_use_tag) {
            return '';
        }
        $lang =& DoceboLanguage::createInstance('tags', 'framework');
        $this->tags_id = $tags_id;
        YuiLib::load(array('autocomplete' => 'autocomplete-min.js', 'selector' => 'selector-beta-min.js'), array('assets/skins/sam' => 'autocomplete.css'));
        Util::get_js(Get::rel_path('adm') . '/lib/lib.tags.js', true, true);
        // setup some thing that we need in the tag editor
        $GLOBALS['page']->add('<script type="text/javascript">' . "\n" . 'var tag_params ={
			resource_type: "' . $this->resource_type . '", 
			addr: "' . $GLOBALS['where_framework_relative'] . '/ajax.adm_server.php",
			query_append: "file=tags",
			query:"' . $tags_id . '",
			private_query:"' . $private_tags . '",
			popular_tags: "' . addslashes(implode(', ', $this->getPopularTag())) . '",
			user_tags: "' . addslashes(implode(', ', $this->getUserPopularTag(getLogUserId()))) . '", 
			lang: { tags: "' . addslashes($lang->def("_TAGS")) . '",
				tips: "' . addslashes($lang->def("_TAGS_TIPS")) . '",
				popular_tags: "' . addslashes($lang->def("_POPULAR")) . '",
				user_tags: "' . addslashes($lang->def("_YOURS")) . '",
				save: "' . addslashes($lang->def("_SAVE")) . '",
				undo: "' . addslashes($lang->def("_UNDO")) . '",
				add_tags: "' . addslashes($lang->def("_ADD_TAGS")) . '",
				update_tags: "' . addslashes($lang->def("_MOD")) . '"
			}
		};' . "\n" . '</script>', 'scripts');
    }
开发者ID:abhinay100,项目名称:forma_app,代码行数:29,代码来源:lib.tags.php

示例4: load

 /**
  * Load css and yui file
  * @return null
  * @param $js Array[optional]
  * @param $css Array[optional]
  */
 public static function load($module_list = false, $noprint = false)
 {
     $module_list = 'base,autocomplete,charts,tabview,table,treeview,colorpicker';
     if (strpos($module_list, 'base') !== false) {
         $module_list = 'base,' . $module_list;
     }
     $list = explode(',', $module_list);
     $js_load = array();
     $css_load = array();
     foreach ($list as $k => $module) {
         if (isset(self::$_css_map[$module])) {
             $css_load = array_unique(array_merge($css_load, self::$_css_map[$module]));
         }
         if (isset(self::$_js_map[$module])) {
             $js_load = array_unique(array_merge($js_load, self::$_js_map[$module]));
         }
     }
     // remove js alredy loaded
     $css_load = array_diff($css_load, self::$_css_loaded);
     $js_load = array_diff($js_load, self::$_js_loaded);
     if (empty($css_load) && empty($js_load)) {
         return '';
     }
     // load new css
     $to_load = '';
     if (!empty($css_load)) {
         $to_load .= '<!-- yui css -->';
         foreach ($css_load as $k => $filename) {
             $to_load .= Util::get_css(Get::tmpl_path('base') . 'yui-skin/' . $filename, true);
         }
     }
     // load new js
     if (!empty($js_load)) {
         $to_load .= '<!-- yui js -->';
         foreach ($js_load as $k => $filename) {
             $to_load .= Util::get_js('/addons/yui/' . $filename);
             if ($filename == 'utilities/utilities.js') {
                 $to_load .= "\n" . '<script type="text/javascript"> YAHOO.util.Connect.initHeader(\'X-Signature\',\'' . Util::getSignature() . '\'); YAHOO.util.Connect.startEvent.subscribe(function() { YAHOO.util.Connect.initHeader(\'X-Signature\',\'' . Util::getSignature() . '\'); });</script>';
             }
             if ($filename == 'charts/charts-min.js') {
                 $to_load .= "\n" . '<script type="text/javascript"> YAHOO.widget.Chart.SWFURL = "' . Get::rel_path('base') . '/addons/yui/charts/assets/charts.swf"; </script>';
             }
         }
         if (Lang::direction() == 'rtl') {
             $to_load .= Util::get_js('/addons/yui/yui-rtl.js');
         }
     }
     // add loaded file to the cache
     if (!empty($css_load)) {
         self::$_css_loaded = array_merge(self::$_css_loaded, $css_load);
     }
     if (!empty($js_load)) {
         self::$_js_loaded = array_merge(self::$_js_loaded, $js_load);
     }
     if (function_exists('cout') && !$noprint) {
         cout($to_load, 'page_head');
     } else {
         return $to_load;
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:66,代码来源:lib.yuilib.php

示例5: getAddEditForm

    public function getAddEditForm($form_url, $data)
    {
        $this->loadJs();
        $res = '';
        $e = false;
        if ($data['rule_id'] > 0) {
            $e = true;
        }
        $res .= Form::openForm('main_form', $form_url);
        $res .= Form::openElementSpace() . Form::getTextfield(Lang::t('_FROM', 'test'), 'from_score', 'from_score', 11, $e ? $data['from_score'] : '') . Form::getTextfield(Lang::t('_TO', 'test'), 'to_score', 'to_score', 11, $e ? $data['to_score'] : '') . '<br />' . '<p class="section_title">' . Lang::t('_COMPETENCES', 'test') . '</p>' . '<div id="competence_box"></div>' . '<div class="form_line_l">
					<p><label for="input_add_competence" class="floating">' . Lang::t('_NAME', 'test') . '</label></p>
					<div class="form_autocomplete_container">
					<input type="text" maxlength="255" value="" name="input_add_competence" id="input_add_competence" class="textfield">
					<a href="" id="link_add_competence"><img alt="' . Lang::t('_ADD', 'test') . '" src="' . getPathImage() . 'standard/add.png" class="valing-middle"></a>
					<div id="box_autocomplete_competence"></div>
					</div>
				</div>' . '<br />' . '<p class="section_title">' . Lang::t('_COURSES', 'test') . '</p>' . '<div id="course_box"></div>' . '<div class="form_line_l">
					<p><label for="input_add_course" class="floating">' . Lang::t('_NEW_COURSE', 'test') . '</label></p>
					<div class="form_autocomplete_container">
					<input type="text" maxlength="255" value="" name="input_add_course" id="input_add_course" class="textfield">
					<a href="" id="link_add_course"><img alt="' . Lang::t('_ADD', 'test') . '" src="' . getPathImage() . 'standard/add.png" class="valing-middle"></a>
					<div id="box_autocomplete_course"></div>
					</div>
				</div>' . '<br /><br />' . Form::getTextarea(Lang::t('_FEEDBACK_TEXT', 'test'), 'feedback_txt', 'feedback_txt', $e ? $data['feedback_txt'] : '') . Form::getHidden('rule_id', 'rule_id', (int) $data['rule_id']) . Form::getHidden('competences_list', 'competences_list', '') . Form::getHidden('courses_list', 'courses_list', '') . Form::getHidden('test_id', 'test_id', (int) $data['test_id']) . Form::getHidden('category_id', 'category_id', (int) $data['category_id']) . Form::getHidden('save', 'save', '1') . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('btn_save', 'btn_save', Lang::t('_SAVE', 'test')) . Form::getButton('btn_cancel', 'btn_cancel', Lang::t('_UNDO', 'test')) . Form::closeButtonSpace();
        $res .= Form::closeForm();
        $res .= '<script type="text/javascript">
			var course_ac_url="' . Get::rel_path('adm') . '/ajax.adm_server.php?mn=course&plf=lms&op=course_autocomplete&results=20' . '";
			var competence_ac_url="' . Get::rel_path('adm') . '/ajax.adm_server.php?r=adm/competences/competences_autocomplete' . '";
			var lang={"remove_item": "' . Lang::t('_DEL', 'test') . '"};
			var course_arr=' . ($e && !empty($data['courses_list']) ? $data['courses_list'] : '{}') . ';
			var competence_arr=' . ($e && !empty($data['competences_list']) ? $data['competences_list'] : '{}') . ';
			</script>';
        return $res;
    }
开发者ID:abhinay100,项目名称:forma_app,代码行数:34,代码来源:lib.assessment_rule.php

示例6: createModule

/**
 * create a istance of a specified class of a module
 * automaticaly include the file that contains the class of the module
 *
 * @param string	$module_name 	the name og the module to istance
 * @param string 	$class_name 	the name of the class relative to the module, if not passed is 
 *									extracted from the $module_name
 * 
 * @return mixed 	the class istance
 */
function createModule($module_name, $class_name = NULL)
{
    $module_name = preg_replace('/[^a-zA-Z0-9\\-\\_]+/', '', $module_name);
    if (file_exists(_base_ . '/customscripts/' . _folder_lms_ . '/class.module/class.' . $module_name . '.php') && Get::cfg('enable_customscripts', false) == true) {
        include_once _base_ . '/customscripts/' . _folder_lms_ . '/class.module/class.' . $module_name . '.php';
        if ($class_name === NULL) {
            $class_name = 'Module_' . ucfirst($module_name);
        }
    } else {
        if (file_exists(dirname(__FILE__) . '/../class.module/class.' . $module_name . '.php')) {
            include_once dirname(__FILE__) . '/../class.module/class.' . $module_name . '.php';
            if ($class_name === NULL) {
                $class_name = 'Module_' . ucfirst($module_name);
            }
        } else {
            include_once dirname(__FILE__) . '/../class.module/class.definition.php';
            $class_name = 'LmsModule';
        }
    }
    if (Get::cfg('enable_plugins', false)) {
        if (checkIfPlugin($module_name) == "plugin") {
            include_once Get::rel_path('plugins') . '/' . $module_name . '/class/class.' . $module_name . '.php';
            $class_name = 'Module_' . ucfirst($module_name);
        }
    }
    $module_cfg = new $class_name();
    return $module_cfg;
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:38,代码来源:lib.istance.php

示例7: drawCalendar

function drawCalendar()
{
    checkPerm('view');
    $size = importVar('size', false, 'max');
    $width = "90%";
    if ($size == "min") {
        $width = "200px";
    }
    addCss('calendar_' . $size);
    YuiLib::load('base,dragdrop');
    Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar.js', true, true);
    Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar_helper.js', true, true);
    //permissions = permissions granted to the logged user according to his/her level and role
    //	2 => can create/delete/modify all events
    //	1 => can create/delete/modify only own events
    //	0 => can view only
    $permissions = 0;
    if (checkPerm('mod', true)) {
        $permissions = 2;
    } elseif (checkPerm('personal', true)) {
        $permissions = 1;
    }
    //mode="edit" => events can be added and edited according to given permissions
    //mode="view" => events can only be viewed regardless the permissions
    $GLOBALS['page']->add('<script type="text/javascript">' . '	setup_cal(	null, ' . '\'lms\', ' . '\'lms\', ' . '\'edit\', ' . '\'' . $permissions . '\', ' . '\'' . Docebo::user()->getIdSt() . '\' ' . ');' . '</script>', 'page_head');
    $GLOBALS['page']->add("\n" . getTitleArea(Lang::t('_CALENDAR', 'calendar'), 'calendar') . '<div class="std_block">' . '<div id="displayCalendar" style="clear: both; width:' . $width . '"></div>' . '<div class="nofloat"></div>' . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:calendar.php

示例8: show

 public function show()
 {
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     Util::get_js(Get::rel_path('adm') . '/views/groupmanagement/groupmanagement.js', true, true);
     Util::get_js(Get::rel_path('base') . '/widget/dialog/dialog.js', true, true);
     $this->render('show', array('permissions' => $this->permissions, 'result_message' => "", 'filter_text' => ''));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:7,代码来源:GroupmanagementAdmController.php

示例9: init

 public function init()
 {
     YuiLib::load('container,menu,button');
     Util::get_js(Get::rel_path('adm') . '/lib/user_selector/lib.common.js', true, true);
     Util::get_js(Get::rel_path('adm') . '/lib/user_selector/lib.dynamicuserfilter.js', true, true);
     if ($this->_use_other_fields) {
         Util::get_js(Get::rel_path('adm') . '/lib/user_selector/lib.otherfieldtypes.js', true, true);
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:lib.dynamicuserfilter.php

示例10: init

 public function init()
 {
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     //$js_path = Get::rel_path('base').'/widget/competenceselector/';
     //Util::get_js($js_path.'competenceselector.js', true, true);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:lib.competenceselector.php

示例11: admin

 /**
  * Return the link for the admin section
  * @return <type>
  */
 public static function admin()
 {
     $res = '';
     $level = Docebo::user()->getUserLevelId();
     if ($level == ADMIN_GROUP_GODADMIN || $level == ADMIN_GROUP_ADMIN) {
         $res .= '<a href="' . Get::rel_path('adm') . '">' . Get::img('standard/goto_admin.gif', Lang::t('_GOTO_ADMIN')) . Lang::t('_GOTO_ADMIN') . '</a>';
     }
     return $res;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:13,代码来源:lib.cmslayout.php

示例12: loginDispatch

function loginDispatch($op)
{
    switch ($op) {
        case "login":
            Util::jump_to(Get::rel_path('base') . '/index.php?modname=login&amp;op=login');
            //login();
            break;
    }
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:login.php

示例13: init

 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     $this->model = new DashboardAdm();
     YuiLib::load('autocomplete,tabview');
     Util::get_js(Get::rel_path('adm') . '/views/dashboard/dashboard.js', true, true);
     $this->permissions = array('view' => checkPerm('view', true, 'dashboard', 'framework'), 'view_user' => checkPerm('view', true, 'usermanagement', 'framework'), 'add_user' => checkPerm('add', true, 'usermanagement', 'framework'), 'mod_user' => checkPerm('mod', true, 'usermanagement', 'framework'), 'del_user' => checkPerm('del', true, 'usermanagement', 'framework'), 'view_course' => checkPerm('view', true, 'course', 'lms'), 'add_course' => checkPerm('add', true, 'course', 'lms'), 'mod_course' => checkPerm('mod', true, 'course', 'lms'), 'del_course' => checkPerm('del', true, 'course', 'lms'), 'view_communications' => checkPerm('view', true, 'communication', 'lms'), 'add_communications' => checkPerm('add', true, 'communication', 'lms'), 'view_games' => checkPerm('view', true, 'games', 'lms'), 'add_games' => checkPerm('add', true, 'games', 'lms'), 'subscribe' => checkPerm('subscribe', true, 'course', 'lms'));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:10,代码来源:DashboardAdmController.php

示例14: init

 public function init()
 {
     YuiLib::load('base,tabview');
     Lang::init('course');
     $this->path_course = $GLOBALS['where_files_relative'] . '/appLms/' . Get::sett('pathcourse') . '/';
     $this->model = new CartLms();
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     $this->acl_man =& Docebo::user()->getAclManager();
     Util::get_css(Get::rel_path(_base_) . '/appLms/views/cart/cart.css', true, true);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:11,代码来源:CartLmsController.php

示例15: initLibraries

 /**
  * Include the required libraries in order to have all the things ready and working
  */
 public function initLibraries()
 {
     // load yui
     YuiLib::load(array('yahoo-dom-event' => 'yahoo-dom-event.js', 'connection' => 'connection-min.js', 'dragdrop' => 'dragdrop-min.js', 'element' => 'element-beta-min.js', 'animation' => 'animation-min.js', 'json' => 'json-min.js', 'container' => 'container_core-min.js', 'menu' => 'menu-min.js', 'button' => 'button-min.js', 'container' => 'container-min.js', 'button' => 'button-min.js', 'treeview' => 'treeview-min.js', 'resize' => 'resize-beta-min.js', 'selector' => 'selector-beta-min.js'), array('assets/skins/sam' => 'skin.css'));
     // Selector class
     Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
     // Commodities functions
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     // The tableview main file
     Util::get_js(Get::rel_path('base') . '/lib/table_view/tableview.js', true, true);
     // Datatable css
     Util::get_css('../yui-skin/datatable.css', false, true);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:16,代码来源:class.tableview.php


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