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


PHP SessionManager::get_session_category方法代码示例

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


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

示例1: show_session_data

 /**
  * Shows the general data for a particular meeting
  *
  * @param id	session id
  * @return string	session data
  */
 public static function show_session_data($id_session)
 {
     if ($id_session != strval(intval($id_session))) {
         return '';
     } else {
         $id_session = intval($id_session);
     }
     $session_info = api_get_session_info($id_session);
     $session_category = SessionManager::get_session_category($session_info['session_category_id']);
     $session_category_name = null;
     if (!empty($session_category)) {
         $session_category_name = $session_category['name'];
     }
     $user_info = api_get_user_info($session_info['id_coach']);
     $general_coach = null;
     if (!empty($user_info)) {
         $general_coach = $user_info['complete_name'] . ' (' . $user_info['username'] . ')';
     }
     $msg_date = SessionManager::parse_session_dates($session_info);
     $output = '';
     if (!empty($session_category)) {
         $output .= '<tr><td>' . get_lang('SessionCategory') . ': ' . '<b>' . $session_category_name . '</b></td></tr>';
     }
     $output .= '<tr>
                     <td style="width:50%">' . get_lang('SessionName') . ': ' . '<b>' . $session_info['name'] . '</b></td>
                     <td>' . get_lang('GeneralCoach') . ': ' . '<b>' . $general_coach . '</b></td></tr>';
     $output .= '<tr><td>' . get_lang('SessionIdentifier') . ': ' . Display::return_icon('star.png', ' ', array('align' => 'absmiddle')) . '</td>
                     <td>' . get_lang('Date') . ': ' . '<b>' . $msg_date . '</b></td></tr>';
     return $output;
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:36,代码来源:course_home.lib.php

示例2: api_get_path

       window.location = "' . $url . '?course_id="+courseId;
    });
});
</script>';
// jqgrid will use this URL to do the selects
if (!empty($courseId)) {
    $url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_sessions&course_id=' . $courseId;
} else {
    $url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_sessions';
}
if (isset($_REQUEST['keyword'])) {
    //Begin with see the searchOper param
    $url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_sessions&_force_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=s.name&searchString=' . Security::remove_XSS($_REQUEST['keyword']) . '&searchOper=bw';
}
if (isset($_REQUEST['id_category'])) {
    $sessionCategory = SessionManager::get_session_category($_REQUEST['id_category']);
    if (!empty($sessionCategory)) {
        //Begin with see the searchOper param
        $url = api_get_path(WEB_AJAX_PATH) . 'model.ajax.php?a=get_sessions&_force_search=true&rows=20&page=1&sidx=&sord=asc&filters=&searchField=sc.name&searchString=' . Security::remove_XSS($sessionCategory['name']) . '&searchOper=bw';
    }
}
$url .= '&list_type=' . $list_type;
$result = SessionManager::getGridColumns($list_type);
$columns = $result['columns'];
$column_model = $result['column_model'];
// Autowidth
$extra_params['autowidth'] = 'true';
// height auto
$extra_params['height'] = 'auto';
$extra_params['postData'] = array('filters' => array("groupOp" => "AND", "rules" => $result['rules']));
//With this function we can add actions to the jgrid (edit, delete, etc)
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:31,代码来源:session_list.php

示例3: get_lang

*	@package chamilo.admin
*/
/*		INIT SECTION */
// name of the language file that needs to be included
$language_file = 'admin';
$cidReset = true;
//require_once '../inc/global.inc.php';
// setting the section (for the tabs)
$this_section = SECTION_PLATFORM_ADMIN;
$id_session = (int) $_GET['id_session'];
SessionManager::protect_session_edit($id_session);
$tool_name = get_lang('SessionOverview');
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('Sessions'));
$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
$session = api_get_session_info($id_session);
$session_cat_info = SessionManager::get_session_category($session['session_category_id']);
$session_category = null;
if (!empty($session_cat_info)) {
    $session_category = $session_cat_info['name'];
}
$action = isset($_GET['action']) ? $_GET['action'] : null;
$url_id = api_get_current_access_url_id();
switch ($action) {
    case 'add_user_to_url':
        $user_id = $_REQUEST['user_id'];
        $result = UrlManager::add_user_to_url($user_id, $url_id);
        $user_info = api_get_user_info($user_id);
        if ($result) {
            $message = Display::return_message(get_lang('UserAdded') . ' ' . api_get_person_name($user_info['firstname'], $user_info['lastname']), 'confirm');
        }
        break;
开发者ID:ragebat,项目名称:chamilo-lms,代码行数:31,代码来源:resume_session.php


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