예제 #1
0
 function getNavBar($parent)
 {
     require_once __MODULE__ . '/core/resources/navbar.php';
     $navbar = new NavBar($parent);
     $navbar->generate();
     return $navbar->getNavbar();
 }
예제 #2
0
function tagslist()
{
    require_once _base_ . '/lib/lib.table.php';
    require_once $GLOBALS['where_framework'] . '/lib/lib.tags.php';
    $lang =& DoceboLanguage::createInstance('tags', 'framework');
    $id_tag = Get::req('id_tag', DOTY_INT, 0);
    $tag_name = Get::req('tag', DOTY_STRING, '');
    $filter = Get::req('filter', DOTY_STRING, '');
    $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0);
    $nav_bar->setLink('index.php?modname=tags&op=tags&id_tag=' . $id_tag);
    $ini = $nav_bar->getSelectedElement();
    $tags = new Tags('*');
    $resources = $tags->getResourceByTags($id_tag, false, false, $ini, Get::sett('visuItem'));
    $GLOBALS['page']->add(getTitleArea(array($lang->def('_TAGS')), 'tags') . '<div class="std_block">' . '<div class="tag_list">', 'content');
    while (list(, $res) = each($resources['list'])) {
        $link = $res['permalink'];
        $delim = strpos($link, '?') === false ? '?' : '&';
        if (strpos($link, '#') === false) {
            $link = $link . $delim . 'sop=setcourse&sop_idc=' . $res['id_course'];
        } else {
            $link = str_replace('#', $delim . 'sop=setcourse&sop_idc=' . $res['id_course'] . '#', $link);
        }
        $GLOBALS['page']->add('' . '<h2>' . '<a href="' . $link . '">' . $res['title'] . '</a>' . '</h2>' . '<p>' . $res['sample_text'] . '</p>' . '<div class="tag_cloud">' . '<span>' . $lang->def('_TAGS') . ' : </span>' . '<ul><li>' . implode('</li><li>', $res['related_tags']) . '</li></ul>' . '</div>' . '<br />', 'content');
    }
    $GLOBALS['page']->add('</div>' . $nav_bar->getNavBar($ini, $resources['count']) . '</div>', 'content');
}
예제 #3
0
    function notes()
    {
        checkPerm('view');
        require_once _base_ . '/lib/lib.table.php';
        $lang =& DoceboLanguage::createInstance('notes', 'lms');
        $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0);
        $ini = $nav_bar->getSelectedElement();
        $ord = importVar('ord');
        $inv = importVar('inv');
        switch ($ord) {
            case "tit":
                $ord = $order = 'title';
                if ($inv != 'y') {
                    $a_down = '&amp;inv=y';
                } else {
                    $order .= ' DESC';
                    $a_down = '';
                }
                break;
            default:
                $ord = $order = 'data';
                if ($inv == 'y') {
                    $a_down = '';
                } else {
                    $order .= ' DESC';
                    $a_down = '&amp;inv=y';
                }
        }
        $reNotes = sql_query("\r\n\tSELECT idNotes, data, title \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_notes \r\n\tWHERE owner ='" . getLogUserId() . "' AND idCourse='" . $_SESSION['idCourse'] . "' \r\n\tORDER BY {$order} \r\n\tLIMIT {$ini}," . Get::sett('visuItem'));
        list($num_notes) = sql_fetch_row(sql_query("SELECT COUNT(*) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_notes \r\n\tWHERE owner ='" . getLogUserId() . "' AND idCourse='" . $_SESSION['idCourse'] . "' "));
        $nav_bar->setElementTotal($num_notes);
        $img_up = '<img class="valing-middle" src="' . getPathImage() . 'standard/up_arrow.png" alt="' . $lang->def('_UP') . '"/>';
        $img_down = '<img class="valing-middle" src="' . getPathImage() . 'standard/down_arrow.png" alt="' . $lang->def('_DOWN') . '"/>';
        $tb = new Table(Get::sett('visuItem'), $lang->def('_NOTES'), $lang->def('_NOTES'));
        $contentH = array(($ord == 'data' ? $inv == 'y' ? $img_up : $img_down : '') . '<a href="index.php?modname=notes&amp;op=notes' . $a_down . '"> ' . $lang->def('_DATE') . '</a>', ($ord == 'title' ? $inv == 'y' ? $img_up : $img_down : '') . '<a href="index.php?modname=notes&amp;op=notes&amp;ord=tit' . $a_down . '">' . $lang->def('_TITLE') . '</a>', '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" />', '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_DEL') . '" alt="' . $lang->def('_DEL') . '" />');
        $typeH = array('min-cell', '', 'image', 'image');
        $tb->setColsStyle($typeH);
        $tb->addHead($contentH);
        while (list($idNotes, $data, $title) = sql_fetch_row($reNotes)) {
            $content = array(Format::date($data), '<a href="index.php?modname=notes&amp;op=displaynotes&amp;idNotes=' . $idNotes . '" title="' . $lang->def('_MORET') . '">' . $title . '</a>', '<a href="index.php?modname=notes&amp;op=modnotes&amp;idNotes=' . $idNotes . '">
				<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" /></a>', '<a id="delnotes_' . $idNotes . '"' . ' href="index.php?modname=notes&amp;op=delnotes&amp;idNotes=' . $idNotes . '"' . ' title="' . $lang->def('_TITLE') . ' : ' . strip_tags(str_replace(array('"', "'"), '', $title)) . '">
				<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" /></a>');
            $tb->addBody($content);
        }
        $tb->addActionAdd('<a href="index.php?modname=notes&amp;op=addnotes">' . '<img src="' . getPathImage() . 'standard/add.png" title="' . $lang->def('_ADD') . '" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADD_NOTES') . '</a>');
        $GLOBALS['page']->add(getTitleArea(array($lang->def('_NOTES')), 'notes') . '<div class="std_block">', 'content');
        if (isset($_POST['result'])) {
            switch ($_POST['result']) {
                case "ok":
                    $GLOBALS['page']->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')), 'content');
                case "err":
                    $GLOBALS['page']->add(getErrorUi($lang->def('_OPERATION_FAILURE')), 'content');
            }
        }
        $GLOBALS['page']->add($tb->getTable() . $nav_bar->getNavBar($ini), 'content');
        require_once _base_ . '/lib/lib.dialog.php';
        setupHrefDialogBox('a[href*=delnotes]');
        $GLOBALS['page']->add('</div>', 'content');
    }
예제 #4
0
 public function showHMS($content)
 {
     $tpl = array();
     $tpl['MAIN'] = $content;
     $navbar = new NavBar();
     $tpl['NAVBAR'] = $navbar->show();
     \Layout::addStyle('hms', 'css/hms.css');
     \Layout::add(\PHPWS_Template::process($tpl, 'hms', 'hms.tpl'));
 }
예제 #5
0
    function BuildPreContent()
    {
        $LanguageMenu = $this->BuildLanguageMenu();
        if ($this->DisplayNavBar == true) {
            $TempMenuBar = new NavBar($this->Viewer->viewerID, $this->Viewer->languageID);
            $MainMenuBar = '<a href="http://www.milonic.com/"></a><script>' . $TempMenuBar->DrawMainMenu() . '</script>';
            $SubMenuBar = '<script>' . $TempMenuBar->DrawSubMenus() . '</script>';
        } else {
            $MainMenuBar = "&nbsp;";
            $SubMenuBar = "";
        }
        $Temp = $SubMenuBar . '<table width="750" height="100%" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr valign="top"> 
    <td width="750" height="113" colspan="5" valign="bottom" background="' . $this->PathToRootDir . $this->PageHeaderImage . '"><div align="left"> 
        <table width="100%" cellpadding="0" cellspacing="0">
		<tr><td width="1" ><img src="' . $this->PathToRootDir . 'Images/space.gif" width="1" height="113"></td>
		<td><table width="100%" height="100%" border="0">
          <tr> 
            <td height="43" colspan="2" valign="top">&nbsp;</td>
          </tr>
          <tr> 
            <td height="44" colspan="2" valign="bottom" class="pageTitle"><div align="right">' . $this->PageMainTitle . '</div></td>
          </tr>
          <tr> 
            <td>' . $MainMenuBar . '</td>
            <td valign="top" ><div align="right">' . $LanguageMenu . '</div></td>
          </tr>
        </table>
		</td>
		</tr>
		</table>
        </div></td>
  </tr>
  <tr valign="top"> 
    <td width="1" bgcolor="223450"><img src="' . $this->PathToRootDir . 'Images/space.gif" width="1" height="1"></td>';
        // Now determine if there is any Admin Content to display
        if ($this->PageAdminColContent != '<null>') {
            // If so, display content column as 1 column
            $Temp .= '    <td width="' . (748 - $this->PageAdminColWidth) . '">';
        } else {
            // Else Content column = 3 columns
            $Temp .= '    <td width="748" >';
        }
        $this->AddToDisplayList($Temp);
    }
예제 #6
0
function webpages()
{
    checkPerm('view');
    require_once _base_ . '/lib/lib.table.php';
    require_once _base_ . '/lib/lib.form.php';
    $mod_perm = checkPerm('mod', true);
    $lang =& DoceboLanguage::createInstance('admin_webpages', 'lms');
    $out =& $GLOBALS['page'];
    $out->setWorkingZone('content');
    $tb = new Table(0, $lang->def('_WEBPAGES_CAPTION'));
    $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0, 'button');
    $ini = $nav_bar->getSelectedElement();
    //search query
    $query_pages = "\r\n\tSELECT idPages, title, publish, in_home, sequence \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_webpages \r\n\tORDER BY sequence \r\n\tLIMIT {$ini}," . Get::sett('visuItem');
    $num_query_pages = "\r\n\tSELECT COUNT(*) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_webpages ";
    //do query
    $re_pages = sql_query($query_pages);
    list($tot_pages) = sql_fetch_row(sql_query($num_query_pages));
    $nav_bar->setElementTotal($tot_pages);
    //-Table---------------------------------------------------------
    $cont_h = array($lang->def('_TITLE'), '<img src="' . getPathImage() . 'webpages/home.png" alt="' . $lang->def('_ALT_HOME') . '" title="' . $lang->def('_TITLE_HOME') . '" />', '<img src="' . getPathImage() . 'standard/publish.png" alt="' . $lang->def('_PUBLISH') . '" title="' . $lang->def('_STATUS') . '" />');
    $type_h = array('', 'image', 'image', 'image');
    if ($mod_perm) {
        $cont_h[] = '<img src="' . getPathImage() . 'standard/down.png" alt="' . $lang->def('_DOWN') . '" title="' . $lang->def('_MOVE_DOWN') . '" />';
        $type_h[] = 'image';
        $cont_h[] = '<img src="' . getPathImage() . 'standard/up.png" alt="' . $lang->def('_UP') . '" title="' . $lang->def('_MOVE_UP') . '" />';
        $type_h[] = 'image';
        $cont_h[] = '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" title="' . $lang->def('_MOD') . '" />';
        $type_h[] = 'image';
        $cont_h[] = '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" title="' . $lang->def('_DEL') . '" />';
        $type_h[] = 'image';
    }
    $tb->setColsStyle($type_h);
    $tb->addHead($cont_h);
    $i = 1;
    while (list($id, $title, $publish, $in_home) = sql_fetch_row($re_pages)) {
        $cont = array($title, $in_home ? '<img src="' . getPathImage() . 'webpages/home.png" alt="' . $lang->def('_ALT_HOME') . '" title="' . $lang->def('_TITLE_HOME') . '" />' : '');
        if ($publish) {
            $cont[] = '<a href="index.php?modname=webpages&amp;op=unpublish&amp;id_page=' . $id . '" title="' . $lang->def('_PUBLISH') . ' : ' . $title . '">' . '<img src="' . getPathImage() . 'standard/publish.png" alt="' . $lang->def('_PUBLISH') . ' : ' . $title . '" /></a>';
        } else {
            $cont[] = '<a href="index.php?modname=webpages&amp;op=publish&amp;id_page=' . $id . '" title="' . $lang->def('_UNPUBLISH') . ' : ' . $title . '">' . '<img src="' . getPathImage() . 'standard/unpublish.png" alt="' . $lang->def('_UNPUBLISH') . ' : ' . $title . '" /></a>';
        }
        if ($mod_perm) {
            if ($i != $tot_pages - $ini * Get::sett('visuItem')) {
                $cont[] = '<a href="index.php?modname=webpages&amp;op=movedown&amp;id_page=' . $id . '" title="' . $lang->def('_MOVE_DOWN') . ' : ' . $title . '">' . '<img src="' . getPathImage() . 'standard/down.png" alt="' . $lang->def('_DOWN') . ' : ' . $title . '" /></a>';
            } else {
                $cont[] = '&nbsp;';
            }
            if ($i != 1 || $ini != 0) {
                $cont[] = '<a href="index.php?modname=webpages&amp;op=moveup&amp;id_page=' . $id . '" title="' . $lang->def('_MOVE_UP') . ' : ' . $title . '">' . '<img src="' . getPathImage() . 'standard/up.png" alt="' . $lang->def('_UP') . ' : ' . $title . '" /></a>';
            } else {
                $cont[] = '&nbsp;';
            }
            $cont[] = '<a href="index.php?modname=webpages&amp;op=modpages&amp;id_page=' . $id . '" title="' . $lang->def('_MOD') . ' : ' . $title . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . ' : ' . $title . '" /></a>';
            $cont[] = '<a href="index.php?modname=webpages&amp;op=delpages&amp;id_page=' . $id . '" title="' . $lang->def('_DEL') . ' : ' . $title . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . ' : ' . $title . '" /></a>';
        }
        $tb->addBody($cont);
        ++$i;
    }
    if ($mod_perm) {
        $tb->addActionAdd('<a class="ico-wt-sprite subs_add" href="index.php?modname=webpages&amp;op=addpages" title="' . Lang::t('_ADD', 'webpages') . '"><span>' . Lang::t('_ADD', 'webpages') . '</span></a>');
    }
    //visualize result
    $out->add(getTitleArea($lang->def('_TITLE_WEBPAGES'), 'webpages') . '<div class="std_block">');
    if (isset($_GET['result'])) {
        switch ($_GET['result']) {
            case "ok":
                $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
                break;
            case "err":
                $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                break;
            case "err_del":
                $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                break;
        }
    }
    $out->add($tb->getTable() . Form::openForm('nav_webpages', 'index.php?modname=webpages&amp;op=webpages') . $nav_bar->getNavBar($ini) . Form::closeForm() . '</div>');
    if ($mod_perm) {
        require_once _base_ . '/lib/lib.dialog.php';
        setupHrefDialogBox('a[href*=delpages]');
    }
}
예제 #7
0
파일: Gerente.php 프로젝트: bverona/SGI
    <!-- Custom CSS -->
    <link href="../../bootstrap/dist/css/sb-admin-2.css" rel="stylesheet">

</head>

<body>

    <!-- wrapper -->    
    <div id="wrapper">


        <!-- Nav Bar -->
        <?php 
require_once '../../Clases/clsNavbar.php';
$obj = new NavBar();
$obj->DefineNavBar();
?>
        <!-- Nav Bar -->

        <!-- page-wrapper -->
        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">Sistema Gestor de Compras</h1>
                </div>
            </div>
            
            <div class="row">
                <div class="col-xs-12 col-lg-offset-2 col-lg-8">
                    <div class="panel panel-default">
예제 #8
0
error_reporting(E_ALL);
//pull in the weather class
$weather = new weather();
$weatherWidget = $weather->weatherWidgetHTML();
$currentWeather = $weather->todaysWeather();
$tomorrowsWeather = $weather->tomorrowsWeather();
//extract the stocks
$stocks = new stockPrices();
$currentPrices = $stocks->getStocksDiv();
//pull in the time object and provide weather info
$time = new Time();
$welcomeWidget = $time->welcomeWidget($currentWeather, $tomorrowsWeather);
$timeNatLangWidget = $time->timeNaturalLanguage(1);
$wallpaperOverride = $time->wallpaperCss();
//import the navbar
$navObj = new NavBar();
$navBar = $navObj->generateMenu('home');
?>
<html>
  
<head>
  <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> 
  <meta http-equiv="refresh" content="60">
  <title>Welcome Screen! (Release 6)</title>
  <!-- Inserting web fonts -->
<link href='https://fonts.googleapis.com/css?family=Maven+Pro|Poiret+One|Fredericka+the+Great|Cabin+Sketch|Poller+One|Chelsea+Market|Londrina+Solid|Lilita+One|Codystar|Raleway+Dots' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="./css/main.css">
<?php 
echo $wallpaperOverride;
?>
예제 #9
0
 function getViewUserFiles()
 {
     require_once _base_ . '/lib/lib.navbar.php';
     $viewer = $this->getViewer();
     $type = Get::req('type', DOTY_MIXED, '');
     $this->loadUserData($viewer);
     // main container ---------------------------------------------------------------------
     $html = '<h1>' . $this->_lang->def('_PROFILE') . ': ' . $this->resolveUsername() . '</h1>';
     $html .= '<div id="up_user_info" class="up_user_info">';
     $html .= $this->getUserRelatedAction($type);
     require_once $GLOBALS['where_framework'] . '/lib/lib.myfiles.php';
     $user_file = new MyFilesPolicy($this->_user_profile->getIdUser(), $this->getViewer(), $this->_up_data_man->isFriend($this->_user_profile->getIdUser(), $this->getViewer()), $this->_up_data_man->isTeacher($this->getViewer()));
     $num_files = $user_file->getFileCount($type);
     $nav_bar = new NavBar('ini', UP_FILE_LIMIT, $num_files, 'link');
     $ini = $nav_bar->getSelectedElement();
     $nav_bar->setLink($this->_url_man->getUrl($this->_varname_action . '=view_files&type=' . $type . ''));
     $re_files = $user_file->getFileList($type, false, $ini, UP_FILE_LIMIT);
     switch ($type) {
         case "image":
             $html .= '<h2 class="up_type1">' . $this->_lang->def('_IMAGES') . '</h2>' . $nav_bar->getNavBar($ini) . '<div class="up_box_files">';
             if ($re_files && $num_files > 0) {
                 $html .= '<ul class="image_list">';
                 while ($image = $user_file->fetch_row($re_files)) {
                     $size = @getimagesize($GLOBALS['where_files_relative'] . $user_file->getFileAddress($image[MYFILE_FILE_NAME]));
                     $class_limit = '';
                     if ($size[0] > 200 && $size[0] > $size[1]) {
                         $class_limit = 'image_limit_width';
                     }
                     if ($size[1] > 200 && $size[0] < $size[1]) {
                         $class_limit = 'image_limit_height';
                     }
                     $html .= '<li>' . '<a href="' . $this->_url_man->getUrl($this->_varname_action . '=file_details&id_user='******'&type=' . $type . '&id_file=' . $image[MYFILE_ID_FILE]) . '">' . '<img class="user_image ' . $class_limit . '" src="' . $GLOBALS['where_files_relative'] . $user_file->getFileAddress($image[MYFILE_FILE_NAME]) . '" ' . 'title="' . strip_tags($image[MYFILE_DESCRIPTION]) . '" alt="' . strip_tags($image[MYFILE_TITLE]) . '" />' . '<br/>' . $image[MYFILE_TITLE] . '</a>' . '</li>';
                 }
                 $html .= '</ul>';
             } else {
                 $html .= '<p>' . $this->_lang->def('_NO_IMAGE_FOUND') . '</p>';
             }
             $html .= '<div class="nofloat"></div>' . '</div>';
             break;
         case "video":
             $html .= '<h2 class="up_type1">' . $this->_lang->def('_USER_VIDEOS') . '</h2>' . $nav_bar->getNavBar($ini) . '<div class="up_box_files">';
             if ($re_files && $num_files > 0) {
                 require_once _base_ . '/lib/lib.multimedia.php';
                 $html .= '<ul class="video_list">';
                 while ($video = $user_file->fetch_row($re_files)) {
                     $play_code = getEmbedPlay($GLOBALS['where_files_relative'] . $user_file->getFilePath(), $video[MYFILE_FILE_NAME], false, '250', false, false);
                     $class_limit = '';
                     $html .= '<li>' . ($play_code === false ? implode('_', array_slice(explode('_', $video[MYFILE_FILE_NAME]), 3)) : $play_code) . '<br />' . '<a href="' . $this->_url_man->getUrl($this->_varname_action . '=file_details&id_user='******'&type=' . $type . '&id_file=' . $video[MYFILE_ID_FILE]) . '">' . $video[MYFILE_TITLE] . ($play_code === false ? ' (' . $this->_lang->def('_DOWNLOAD') . ')' : '') . '</a>' . '</li>';
                 }
                 $html .= '</ul>';
             } else {
                 $html .= '<p>' . $this->_lang->def('_NO_IMAGE_FOUND') . '</p>';
             }
             $html .= '<div class="nofloat"></div>' . '</div>';
             break;
         case "audio":
             $html .= '<h2 class="up_type1">' . $this->_lang->def('_USER_AUDIO') . '</h2>' . $nav_bar->getNavBar($ini) . '<div class="up_box_files">';
             if ($re_files && $num_files > 0) {
                 require_once _base_ . '/lib/lib.multimedia.php';
                 $html .= '<ul class="video_list">';
                 while ($audio = $user_file->fetch_row($re_files)) {
                     $play_code = getEmbedPlay($GLOBALS['where_files_relative'] . $user_file->getFilePath(), $audio[MYFILE_FILE_NAME], false, '250', false, false);
                     $class_limit = '';
                     $html .= '<li>' . ($play_code === false ? implode('_', array_slice(explode('_', $audio[MYFILE_FILE_NAME]), 3)) : $play_code) . '<br />' . '<a href="' . $this->_url_man->getUrl($this->_varname_action . '=file_details&id_user='******'&type=' . $type . '&id_file=' . $audio[MYFILE_ID_FILE]) . '">' . $audio[MYFILE_TITLE] . ($play_code === false ? ' (' . $this->_lang->def('_DOWNLOAD') . ')' : '') . '</a>' . '</li>';
                 }
                 $html .= '</ul>';
             } else {
                 $html .= '<p>' . $this->_lang->def('_NO_IMAGE_FOUND') . '</p>';
             }
             $html .= '<div class="nofloat"></div>' . '</div>';
             break;
         case "other":
             $html .= '<h2 class="up_type1">' . $this->_lang->def('_USER_OTHER') . '</h2>' . $nav_bar->getNavBar($ini) . '<div class="up_box_files">';
             if ($re_files && $num_files > 0) {
                 require_once _base_ . '/lib/lib.multimedia.php';
                 $html .= '<ul class="other_list">';
                 while ($other = $user_file->fetch_row($re_files)) {
                     $class_limit = '';
                     $html .= '<li>' . '<a href="' . $this->_url_man->getUrl($this->_varname_action . '=file_details&id_user='******'&type=' . $type . '&id_file=' . $other[MYFILE_ID_FILE]) . '">' . '<img src="' . getPathImage('fw') . mimeDetect($user_file->getFilePath() . $other[MYFILE_FILE_NAME]) . '" alt="myme-type" />' . $other[MYFILE_TITLE] . '</a>' . '<br/>' . $other[MYFILE_DESCRIPTION] . '</li>';
                 }
                 $html .= '</ul>';
             } else {
                 $html .= '<p>' . $this->_lang->def('_NO_IMAGE_FOUND') . '</p>';
             }
             $html .= '<div class="nofloat"></div>' . '</div>';
             break;
     }
     $html .= $nav_bar->getNavBar($ini);
     $html .= '</div>';
     return $html;
 }
 public function classroomCourse()
 {
     require_once _base_ . '/lib/lib.navbar.php';
     require_once _lms_ . '/lib/lib.middlearea.php';
     $active_tab = 'classroom';
     $action = Get::req('action', DOTY_STRING, '');
     $page = Get::req('page', DOTY_INT, 1);
     $id_cat = Get::req('id_cat', DOTY_INT, 0);
     $nav_bar = new NavBar('page', Get::sett('visuItem'), $this->model->getTotalCourseNumber($active_tab), 'link');
     $nav_bar->setLink('index.php?r=homecatalogue/allCourse' . ($id_cat > 1 ? '&amp;id_cat=' . $id_cat : ''));
     $html = $this->model->getCourseList($active_tab, $page);
     $user_catalogue = array();
     //$this->model->getUserCatalogue(Docebo::user()->getIdSt());
     $user_coursepath = array();
     //$this->model->getUserCoursepath(Docebo::user()->getIdSt());
     echo '<div style="margin:1em;">';
     $this->render('tab_start', array('user_catalogue' => $user_catalogue, 'active_tab' => $active_tab, 'user_coursepath' => $user_coursepath, 'std_link' => 'index.php?r=homecatalogue/allCourse' . ($page > 1 ? '&amp;page=' . $page : ''), 'model' => $this->model_catalog));
     $this->render('courselist', array('html' => $html, 'nav_bar' => $nav_bar));
     $this->render('tab_end', array('std_link' => 'index.php?r=homecatalogue/allCourse' . ($page > 1 ? '&amp;page=' . $page : ''), 'model' => $this->model_catalog));
     echo '</div>';
 }
예제 #11
0
function news()
{
    checkPerm('view');
    require_once _base_ . '/lib/lib.form.php';
    require_once _base_ . '/lib/lib.table.php';
    require_once _base_ . '/lib/lib.navbar.php';
    $mod_perm = checkPerm('mod', true);
    $lang =& DoceboLanguage::createInstance('admin_news', 'lms');
    $out =& $GLOBALS['page'];
    $out->setWorkingZone('content');
    $tb = new Table(Get::sett('visuItem'), $lang->def('_NEWS'), $lang->def('_NEWS_SUMMARY'));
    $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0, 'link');
    $ini = $nav_bar->getSelectedElement();
    //search query
    $query_news = "\r\n\tSELECT idNews, publish_date, title, short_desc, important\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_news_internal\r\n\tORDER BY important DESC, publish_date DESC\r\n\tLIMIT {$ini}," . Get::sett('visuItem');
    $query_news_tot = "\r\n\tSELECT COUNT(*)\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_news_internal ";
    $re_news = sql_query($query_news);
    list($tot_news) = sql_fetch_row(sql_query($query_news_tot));
    $nav_bar->setElementTotal($tot_news);
    $impo_gif = '<img src="' . getPathImage('lms') . 'standard/important.png" ' . 'title="' . $lang->def('_TITLE_IMPORTANT') . '" ' . 'alt="' . $lang->def('_IMPORTANT') . '" />';
    $type_h = array('image', '', '', 'news_short_td');
    $cont_h = array($impo_gif, $lang->def('_DATE'), $lang->def('_TITLE'), $lang->def('_SHORTDESC'));
    if ($mod_perm) {
        $cont_h[] = '<img src="' . getPathImage() . 'standard/moduser.png" title="' . $lang->def('_RECIPIENTS') . '" ' . 'alt="' . $lang->def('_RECIPIENTS') . '" />';
        $type_h[] = 'image';
        $cont_h[] = '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" ' . 'alt="' . $lang->def('_MOD') . '" />';
        $type_h[] = 'image';
        $cont_h[] = '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_DEL') . '" ' . 'alt="' . $lang->def('_DEL') . '"" />';
        $type_h[] = 'image';
    }
    $tb->setColsStyle($type_h);
    $tb->addHead($cont_h);
    while (list($id_news, $publish_date, $title, $short_desc, $impo) = sql_fetch_row($re_news)) {
        $cont = array($impo ? $impo_gif : '', Format::date($publish_date), $title, Util::cut($short_desc));
        if ($mod_perm) {
            $cont[] = '<a href="index.php?modname=internal_news&amp;op=editviewer&amp;load=1&amp;id_news=' . $id_news . '" ' . 'title="' . $lang->def('_RECIPIENTS') . ' : ' . $title . '">' . '<img src="' . getPathImage() . 'standard/moduser.png" alt="' . $lang->def('_RECIPIENTS') . ' : ' . $title . '" /></a>';
            $cont[] = '<a href="index.php?modname=internal_news&amp;op=modnews&amp;id_news=' . $id_news . '" ' . 'title="' . $lang->def('_MOD') . ' : ' . $title . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . ' : ' . $title . '" /></a>';
            $cont[] = '<a href="index.php?modname=internal_news&amp;op=delnews&amp;id_news=' . $id_news . '" ' . 'title="' . $lang->def('_DEL') . ' : ' . $title . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . ' : ' . $title . '" /></a>';
        }
        $tb->addBody($cont);
    }
    require_once _base_ . '/lib/lib.dialog.php';
    setupHrefDialogBox('a[href*=delnews]');
    if ($mod_perm) {
        $tb->addActionAdd('<a href="index.php?modname=internal_news&amp;op=addnews" title="' . $lang->def('_NEW') . '">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def('_ADD') . '" />' . $lang->def('_NEW') . '</a>');
    }
    $out->add(getTitleArea($lang->def('_NEWS'), 'news') . '<div class="std_block">');
    if (isset($_GET['result'])) {
        switch ($_GET['result']) {
            case "ok":
                $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
                break;
            case "err":
                $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                break;
            case "err_del":
                $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                break;
        }
    }
    if ($mod_perm) {
        $form = new Form();
        $how_much = Get::sett('visuNewsHomePage');
        if (isset($_POST['save_homepage'])) {
            $query_how_news = "\r\n\t\t\tUPDATE " . $GLOBALS['prefix_lms'] . "_setting\r\n\t\t\tSET param_value = '" . abs((int) $_POST['howmuch']) . "'\r\n\t\t\tWHERE param_name = 'visuNewsHomePage'";
            if (sql_query($query_how_news)) {
                $how_much = abs((int) $_POST['howmuch']);
            }
        }
    }
    $out->add($tb->getTable() . $nav_bar->getNavBar($ini) . '</div>');
}
예제 #12
0
function displayCoursePathList(&$url, $selected_tab)
{
    require_once _base_ . '/lib/lib.form.php';
    require_once _base_ . '/lib/lib.user_profile.php';
    require_once _base_ . '/lib/lib.navbar.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.preassessment.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.catalogue.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.coursepath.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.preassessment.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.coursereport.php';
    $lang =& DoceboLanguage::createInstance('catalogue');
    $lang_c =& DoceboLanguage::createInstance('course');
    $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0);
    $nav_bar->setLink($url->getUrl());
    $ini = $nav_bar->getSelectedElement();
    $course_man = new Man_Course();
    $path_man = new CoursePath_Manager();
    $cat_man = new Catalogue_Manager();
    $man_courseuser = new Man_CourseUser();
    $profile = new UserProfile(getLogUserId());
    $profile->init('profile', 'framework', '', 'ap');
    $profile->addStyleSheet('lms');
    $catalogues =& $cat_man->getUserAllCatalogueId(getLogUserId());
    if (!empty($catalogues)) {
        // at least one catalogue is assigned to this user
        $cat_path =& $cat_man->getAllCoursepathOfUser(getLogUserId());
        if (!empty($cat_path)) {
            $path_man->filterInPath($cat_path);
        }
    } elseif (Get::sett('on_catalogue_empty') == 'off') {
        $path_man->filterInPath(array(0));
    }
    if (!Docebo::user()->isAnonymous()) {
        if (!isset($_SESSION['cp_assessment_effect'])) {
            $pa_man = new AssessmentList();
            $arr_assessment = $pa_man->getUserAssessmentSubsription(Docebo::user()->getArrSt());
            $report = new CourseReportManager();
            $user_result = $report->getAllUserFinalScore(getLogUserId(), $arr_assessment['course_list']);
            $rule_man = new AssessmentRule();
            $ass_elem = $rule_man->getCompleteEffectListForAssessmentWithUserResult($arr_assessment['course_list'], $user_result);
            $_SESSION['cp_assessment_effect'] = urlencode(serialize($ass_elem));
        } else {
            $ass_elem = unserialize(urldecode($_SESSION['cp_assessment_effect']));
        }
        if (!empty($ass_elem['parsed']['coursepath'])) {
            $path_man->filterOrInPath($ass_elem['parsed']['coursepath']);
        }
    }
    // retrive all the classroorm
    // search for the coursepath ------------------------------------------------------
    $coursepath = $path_man->getCoursepathList($ini, Get::sett('visuItem'));
    if (empty($coursepath)) {
        // no path found for the criteria ---------------------------------------------
        $GLOBALS['page']->add('<p class="no_course_found">' . $lang->def('_NO_COURSE_FOUND') . '</p></div>', 'content');
        return;
    }
    // find structures of the course path ---------------------------------------------
    $courses = $path_man->getPathStructure(array_keys($coursepath));
    $path_slot = $path_man->getPathSlot(array_keys($coursepath));
    // fin user subscription needed ---------------------------------------------------
    $user_paths =& $path_man->getUserSubscriptionsInfo(getLogUserId(), false);
    $usercourses =& $man_courseuser->getUserSubscriptionsInfo(getLogUserId(), false);
    // find course basilar information ------------------------------------------------
    $course_info = $course_man->getAllCourses(false, false, $courses['all_items'], true);
    $GLOBALS['page']->add($nav_bar->getNavBar($ini), 'content');
    while (list($id_path, $path) = each($coursepath)) {
        $html = '<div class="coursepath_container">';
        $in_h = ' <span class="coursepath_subscribe">';
        $can_subs = true;
        if (isset($ass_elem['parsed']['coursepath'])) {
            if (isset($ass_elem['not_done']['coursepath']) && in_array($id_path, $ass_elem['not_done']['coursepath'])) {
                // the assosiacted preassessment is not done
                $in_h .= '';
                //$lang->def('_MUST_DO_PREASSESSMENT');
                $can_subs = false;
            } elseif (isset($ass_elem['to_apply']['coursepath']) && in_array($id_path, $ass_elem['to_apply']['coursepath'])) {
                // the assosiacted preassessment suggest this coursepath
                $in_h .= $lang->def('_PREASSESSMENT_SUGGESTION');
            }
        } else {
            switch ($path[COURSEPATH_METHOD]) {
                case METHOD_WAIT:
                    $in_h .= $lang->def('_METHOD_WAIT');
                    break;
                case METHOD_AUTO:
                    $in_h .= $lang->def('_METHOD_AUTO');
                    break;
                case METHOD_MANUAL:
                default:
                    $in_h .= $lang->def('_METHOD_MANUAL');
                    $can_subs = false;
                    break;
            }
        }
        $in_h .= '</span>';
        $in_h .= ' <span class="coursepath_status">';
        if (isset($usercourses[$id_path])) {
            // user is alredy subscribed to this coursepath
            if ($usercourses[$id_path]['waiting']) {
                $in_h .= $lang->def('_COURSEPATH_WAITING');
            } else {
                $in_h .= $lang->def('_USER_STATUS_SUBS');
            }
        }
        $in_h .= '</span>';
        // -------------------------------------------------------------
        $html .= '<div class="coursepath_info_container">';
        $html .= '<h2 class="pathtitle">' . $in_h . ($path[COURSEPATH_CODE] != '' ? '[' . $path[COURSEPATH_CODE] . '] ' : '') . $path[COURSEPATH_NAME] . '</h2>' . '<p class="course_support_info">' . str_replace('[enrolled]', $path[CP_ENROLLED], $lang->def('_COURSEPATH_INTRO')) . '</p>';
        if (!isset($courses[$id_path]) || empty($courses[$id_path])) {
            $html .= $lang->def('_NO_COURSE_ASSIGNED_TO_COURSEPATH') . '<br />';
        } else {
            // display the slots
            foreach ($path_slot[$id_path] as $id_slot => $slot_info) {
                if ($id_slot == 0) {
                    $html .= '<h4>' . $lang->def('_MANDATORY') . '</h4>';
                    if (!empty($courses[$id_path][$id_slot])) {
                        $html .= '<ul class="coursepath_mainslot">';
                    }
                } else {
                    if ($slot_info['min_selection'] > 0 && $slot_info['max_selection'] > 0) {
                        $title = str_replace(array('[min_selection]', '[max_selection]'), array($slot_info['min_selection'], $slot_info['max_selection']), $lang->def('_COURSE_PATH_SLOT_MIN_MAX'));
                    } elseif ($slot_info['max_selection'] > 0) {
                        $title = str_replace('[max_selection]', $slot_info['max_selection'], $lang->def('_COURSE_PATH_SLOT_MAX'));
                    } else {
                        $title = $lang->def('_COURSE_PATH_SLOT');
                    }
                    $html .= '<h4>' . $title . '</h4>';
                    if (!empty($courses[$id_path][$id_slot])) {
                        $html .= '<ul class="coursepath_otherslot">';
                    }
                }
                $i = 0;
                while (list($id) = each($courses[$id_path][$id_slot])) {
                    $html .= '<li class="path_course ' . ($i % 2 ? 'path_odd' : '') . '">' . '<a class="show_details_more" href="javascript:;" onclick="course_dash(this, \'' . $id . '\',\'info_' . $id_path . '_' . $id . '\', \'' . $can_subs . '\');">' . $lang->def('_DETAILS') . '</a>' . ($course_info[$id]['code'] != '' ? ' [' . $course_info[$id]['code'] . '] ' : '') . $course_info[$id]['name'] . '<div id="info_' . $id_path . '_' . $id . '"></div>' . '</li>';
                    $i++;
                }
                if (!empty($courses[$id_path][$id_slot])) {
                    $html .= '</ul>';
                }
            }
        }
        $html .= '</div>';
        $html .= '</div>';
        $GLOBALS['page']->add($html, 'content');
    }
    $GLOBALS['page']->add($nav_bar->getNavBar($ini), 'content');
}
예제 #13
0
* Created: 01/01/16
* Updated: 
* By: Mike Rogers
* Notes
* Basic page for displaying body info.
*****************************/
//include files
include_once "getStocks.php";
include_once "navbar.php";
include_once "controller/forms.php";
include_once "time.php";
//DEBUG MODE
// Report all PHP errors (see changelog)
error_reporting(E_ALL);
//import the navbar
$navObj = new NavBar();
$navBar = $navObj->generateMenu('body');
//get the wallpaper synced up
$time = new Time();
$wallpaperOverride = $time->wallpaperCss();
////create the form
$form = new Form();
$BPForm = $form->generateFormHTML("BloodPressure.json");
//generate the form HTML
?>
<html>
  
<head>
  <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> 
  <meta http-equiv="refresh" content="60">
  <title>Body Stats (Release 6)</title>
예제 #14
0
function sessiondetails()
{
    checkPerm('view');
    require_once _base_ . '/lib/lib.table.php';
    $idst_user = importVar('id', true, 0);
    $id_enter = importVar('id_enter', true, 0);
    $p_ini = importVar('p_ini');
    $link = 'index.php?modname=statistic&amp;op=sessiondetails&amp;id=' . $idst_user . '&amp;id_enter=' . $id_enter;
    $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0, 'link');
    $nav_bar->setLink($link . '&amp;p_ini=' . $p_ini);
    $ini = $nav_bar->getSelectedElement();
    $lang =& DoceboLanguage::createInstance('statistic', 'lms');
    $acl_man = Docebo::user()->getAclManager();
    $user_info =& $acl_man->getUser($idst_user, false);
    $query_track = "\r\n\tSELECT g.function, g.type, g.timeof, UNIX_TIMESTAMP(g.timeof) AS unix_time \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_trackingeneral AS g\r\n\tWHERE g.idCourse = '" . (int) $_SESSION['idCourse'] . "' AND g.idUser = '******' AND " . " ( g.idEnter = '" . $id_enter . "' OR (  g.idEnter = 0 AND g.session_id = '" . importVar('sid') . "' ) ) " . " ORDER BY g.timeof \r\n\tLIMIT " . $ini . ", " . Get::sett('visuItem');
    $re_tracks = sql_query($query_track);
    $query_tot_track = "\r\n\tSELECT COUNT(*) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_trackingeneral \r\n\tWHERE idCourse = '" . (int) $_SESSION['idCourse'] . "' AND idUser = '******' AND idEnter = '" . $id_enter . "'";
    list($tot_elem) = sql_fetch_row(sql_query($query_tot_track));
    $nav_bar->setElementTotal($tot_elem);
    // Find modulename -> name int his course
    require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
    $course_man = new Man_Course();
    $mods_names =& $course_man->getModulesName($_SESSION['idCourse']);
    $page_title = array('index.php?modname=statistic&amp;op=statistic' => $lang->def('_STATISTICS'), 'index.php?modname=statistic&amp;op=userdetails&amp;id=' . $idst_user . '&amp;p_ini=' . $p_ini => $user_info[ACL_INFO_LASTNAME] . $user_info[ACL_INFO_FIRSTNAME] ? $user_info[ACL_INFO_LASTNAME] . ' ' . $user_info[ACL_INFO_FIRSTNAME] : $acl_man->relativeId($user_info[ACL_INFO_USERID]), $lang->def('_VIEW_SESSION_DETAILS'));
    $GLOBALS['page']->add(getTitleArea($page_title, 'statistic') . '<div class="std_block">' . getBackUi('index.php?modname=statistic&amp;op=userdetails&amp;id=' . $idst_user . '&amp;p_ini=' . $p_ini, $lang->def('_BACK')), 'content');
    $tb = new Table(0, $lang->def('_VIEW_SESSION_DETAILS'), $lang->def('_VIEW_SESSION_DETAILS'));
    $type_h = array('', '', '');
    $cont_h = array($lang->def('_DATE'), $lang->def('_TYPE_OF_OPERATION'), $lang->def('_TIME_IN'));
    $tb->setColsStyle($type_h);
    $tb->addHead($cont_h);
    $type_h[2] = 'align_right';
    $tb->setColsStyle($type_h);
    $total_sec = 0;
    $read_previous = false;
    while ($read = mysql_fetch_assoc($re_tracks)) {
        if ($read_previous !== false) {
            $time_in = $read['unix_time'] - $read_previous['unix_time'];
            $hours = (int) ($time_in / 3600);
            $minutes = (int) ($time_in % 3600 / 60);
            $seconds = (int) ($time_in % 60);
            if ($minutes < 10) {
                $minutes = '0' . $minutes;
            }
            if ($seconds < 10) {
                $seconds = '0' . $seconds;
            }
            $readable = $hours . 'h ' . $minutes . 'm ' . $seconds . 's ';
            $cont = array(Format::date($read_previous['timeof'], false, true), '<span class="text_bold">' . (isset($mods_names[$read_previous['function']]) ? $mods_names[$read_previous['function']] : $read_previous['function']) . '</span> [' . $read_previous['type'] . ']', $readable);
            $tb->addBody($cont);
        }
        $read_previous = $read;
    }
    $query_last_track = "\r\n\tSELECT g.function, g.type, g.timeof, UNIX_TIMESTAMP(g.timeof) AS unix_time \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_trackingeneral AS g\r\n\tWHERE g.idCourse = '" . (int) $_SESSION['idCourse'] . "' AND g.idUser = '******' AND g.idEnter = '" . $id_enter . "' \r\n\tLIMIT " . ($ini + Get::sett('visuItem')) . ", 1";
    $re_track = sql_query($query_last_track);
    if (mysql_num_rows($re_track) > 0) {
        $read = mysql_fetch_assoc($re_track);
        $time_in = $read['unix_time'] - $read_previous['unix_time'];
        $hours = (int) ($time_in / 3600);
        $minutes = (int) ($time_in % 3600 / 60);
        $seconds = (int) ($time_in % 60);
        if ($minutes < 10) {
            $minutes = '0' . $minutes;
        }
        if ($seconds < 10) {
            $seconds = '0' . $seconds;
        }
        $readable = $hours . 'h ' . $minutes . 'm ' . $seconds . 's ';
    } else {
        $readable = '';
    }
    $cont = array(Format::date($read_previous['timeof']), '<span class="text_bold">' . (isset($mods_names[$read_previous['function']]) ? $mods_names[$read_previous['function']] : $read_previous['function']) . '</span> [' . $read_previous['type'] . ']', $readable);
    $tb->addBody($cont);
    $GLOBALS['page']->add($tb->getTable() . $nav_bar->getNavBar() . getBackUi('index.php?modname=statistic&amp;op=userdetails&amp;id=' . $idst_user . '&amp;p_ini=' . $p_ini, $lang->def('_BACK')) . '</div>', 'content');
}
예제 #15
0
function archiveList()
{
    require_once _base_ . '/lib/lib.table.php';
    $lang =& DoceboLanguage::createInstance('advice');
    $mod_perm = checkPerm('mod', true);
    $out = $GLOBALS['page'];
    $out->setWorkingZone('content');
    $nav_bar = new NavBar('ini', Get::sett('visuItem'), 0, 'button');
    $ini = $nav_bar->getSelectedElement();
    $query_my_arch_advice = "\r\n\t\tSELECT DISTINCT idAdvice\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_adviceuser\r\n\t\tWHERE idUser = '******' AND archivied = '1'";
    $re_my_arch_advice = sql_query($query_my_arch_advice);
    while (list($id) = sql_fetch_row($re_my_arch_advice)) {
        $advice_arch[] = $id;
    }
    if (!empty($advice_arch)) {
        $query_advice = "\r\n\t\t\tSELECT idAdvice, posted, title, description, important, author\r\n\t\t\tFROM " . $GLOBALS['prefix_lms'] . "_advice\r\n\t\t\tWHERE idCourse='" . $_SESSION['idCourse'] . "' AND idAdvice IN ( " . implode($advice_arch, ',') . " )\r\n\t\t\tORDER BY posted DESC\r\n\t\t\tLIMIT {$ini}," . Get::sett('visuItem');
        $re_advice = sql_query($query_advice);
        list($numofadvice) = sql_fetch_row(sql_query("\r\n\t\t\tSELECT COUNT(DISTINCT idAdvice)\r\n\t\t\tFROM " . $GLOBALS['prefix_lms'] . "_advice\r\n\t\t\tWHERE idCourse='" . $_SESSION['idCourse'] . "' AND idAdvice IN ( " . implode($advice_arch, ',') . " )"));
        $nav_bar->setElementTotal($numofadvice);
        if (isset($_GET['result'])) {
            switch ($_GET['result']) {
                case "ok":
                    $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
                    break;
                case "err":
                    $out->add(getErrorUi($lang->def('_ERR_INSERT')));
                    break;
                case "err_user":
                    $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                    break;
            }
        }
        while (list($idA, $posted, $title, $description, $impo, $author) = sql_fetch_row($re_advice)) {
            $out->add('<div class="list_block">' . '<h2 class="heading">');
            if ($impo) {
                $out->add('<img src="' . getPathImage() . 'standard/important.png" alt="' . $lang->def('_IMPORTANT') . '" /> ');
            } else {
                $out->add('');
            }
            $out->add($title . '</h2>' . '<div class="content"><p class="publish-date">' . Format::date($posted) . '</p>' . $description . '</div>' . '<div class="actions">');
            if ($mod_perm) {
                $out->add('<ul class="link_list_inline">' . '<li><a class="ico-wt-sprite subs_users" href="index.php?modname=advice&amp;op=modreader&amp;id_advice=' . $idA . '&amp;load=1" title="' . $lang->def('_VIEW_PERMISSION') . ' : ' . $title . '">' . '<span>' . $lang->def('_MOD') . '</span></a></li>' . '<li><a class="ico-wt-sprite subs_mod" href="index.php?modname=advice&amp;op=modadvice&amp;idAdvice=' . $idA . '" title="' . $lang->def('_MOD') . ' : ' . $title . '">' . '<span>' . $lang->def('_MOD') . '</span></a></li>' . '<li><a class="ico-wt-sprite subs_del" href="index.php?modname=advice&amp;op=deladvice&amp;idAdvice=' . $idA . '" title="' . $lang->def('_DEL') . ' : ' . $title . '">' . '<span>' . $lang->def('_DEL') . '</span></a></li>' . '</ul>');
                require_once _base_ . '/lib/lib.dialog.php';
                setupHrefDialogBox('a[href*=deladvice]');
            }
            $out->add('</div>' . '</div><br />');
        }
    }
    $form = new Form();
    $out->add($form->getHidden('archive_status', 'archive_status', '1') . $nav_bar->getNavBar($ini));
}
예제 #16
0
function forumsearch()
{
    checkPerm('view');
    if (isset($_POST['search_arg'])) {
        $_SESSION['forum']['search_arg'] = $_POST['search_arg'];
        $search_arg = importVar('search_arg');
    } else {
        $search_arg = $_SESSION['forum']['search_arg'];
    }
    $ord = importVar('ord');
    $mod_perm = checkPerm('mod', true);
    require_once _base_ . '/lib/lib.table.php';
    require_once _base_ . '/lib/lib.navbar.php';
    require_once _base_ . '/lib/lib.form.php';
    $lang =& DoceboLanguage::createInstance('forum');
    $acl_man =& Docebo::user()->getAclManager();
    if ($mod_perm) {
        $query_view_forum = "\r\n\t\tSELECT DISTINCT idForum\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_forum\r\n\t\tWHERE idCourse = '" . (int) $_SESSION['idCourse'] . "'";
    } else {
        $acl =& Docebo::user()->getAcl();
        $all_user_idst = $acl->getSTGroupsST(getLogUserId());
        $all_user_idst[] = getLogUserId();
        $query_view_forum = "\r\n\t\tSELECT DISTINCT f.idForum\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_forum AS f\r\n\t\t\tLEFT JOIN " . $GLOBALS['prefix_lms'] . "_forum_access AS fa ON ( f.idForum = fa.idForum )\r\n\t\tWHERE f.idCourse = '" . (int) $_SESSION['idCourse'] . "' AND\r\n\t\t\t( fa.idMember IS NULL OR fa.idMember IN (" . implode($all_user_idst, ',') . " )  ) ";
    }
    $forums = array();
    $re_forum = sql_query($query_view_forum);
    while (list($id_f) = sql_fetch_row($re_forum)) {
        $forums[] = $id_f;
    }
    if (empty($forums)) {
        $page_title = array('index.php?modname=forum&amp;op=forum' => $lang->def('_FORUM'), $lang->def('_SEARCH_RESULT_FOR') . ' : ' . $search_arg);
        $GLOBALS['page']->add(getTitleArea($page_title, 'forum') . '<div class="std_block">' . $lang->def('_NO_PLACEFORSEARCH') . '</div>', 'content');
    }
    $query_num_thread = "\r\n\tSELECT COUNT(DISTINCT t.idThread)\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_forumthread AS t JOIN\r\n\t\t\t" . $GLOBALS['prefix_lms'] . "_forummessage AS m\r\n\tWHERE t.idThread = m.idThread AND t.idForum IN ( " . implode($forums, ',') . " )\r\n\t\tAND ( m.title LIKE '%" . $search_arg . "%' OR m.textof LIKE '%" . $search_arg . "%' ) ";
    list($tot_thread) = sql_fetch_row(sql_query($query_num_thread));
    $jump_url = 'index.php?modname=forum&amp;op=search';
    $nav_bar = new NavBar('ini', Get::sett('visuItem'), $tot_thread, 'link');
    $nav_bar->setLink($jump_url . '&amp;ord=' . $ord);
    $ini = $nav_bar->getSelectedElement();
    $ini_page = $nav_bar->getSelectedPage();
    $query_thread = "\r\n\tSELECT DISTINCT t.idThread, t.idForum, t.author AS thread_author, t.posted, t.title, t.num_post, t.num_view, t.locked, t.erased\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_forumthread AS t JOIN\r\n\t\t\t" . $GLOBALS['prefix_lms'] . "_forummessage AS m\r\n\tWHERE t.idThread = m.idThread AND t.idForum IN ( " . implode($forums, ',') . " )\r\n\t\tAND ( m.title LIKE '%" . $search_arg . "%' OR m.textof LIKE '%" . $search_arg . "%' ) ";
    switch ($ord) {
        case "obji":
            $query_thread .= " ORDER BY t.title DESC ";
            break;
        case "obj":
            $query_thread .= " ORDER BY t.title ";
            break;
        case "authi":
            $query_thread .= " ORDER BY t.author DESC ";
            break;
        case "auth":
            $query_thread .= " ORDER BY t.author ";
            break;
        case "posti":
            $query_thread .= " ORDER BY m.posted ";
            break;
        case "post":
        default:
            $ord = 'post';
            $query_thread .= " ORDER BY m.posted DESC ";
            break;
    }
    $query_thread .= " LIMIT {$ini}, " . Get::sett('visuItem');
    $re_thread = sql_query($query_thread);
    $re_last_post = sql_query("\r\n\tSELECT m.idThread, t.author AS thread_author, m.posted, m.title, m.author  AS mess_author, m.generator\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_forumthread AS t LEFT JOIN\r\n\t\t" . $GLOBALS['prefix_lms'] . "_forummessage AS m ON ( t.last_post = m.idMessage )\r\n\tWHERE t.idForum IN ( " . implode($forums, ',') . " )");
    while (list($idT_p, $id_ta, $posted, $title_p, $id_a, $is_gener) = sql_fetch_row($re_last_post)) {
        $last_authors[$id_ta] = $id_ta;
        if ($posted !== NULL) {
            $last_post[$idT_p]['info'] = Format::date($posted) . '<br />' . substr(strip_tags($title_p), 0, 15) . ' ...';
            $last_post[$idT_p]['author'] = $id_a;
            $last_authors[$id_a] = $id_a;
        }
    }
    if (isset($last_authors)) {
        $authors_names =& $acl_man->getUsers($last_authors);
    }
    $page_title = array('index.php?modname=forum&amp;op=forum' => $lang->def('_FORUM'), $lang->def('_SEARCH_RESULT_FOR') . ' : ' . $search_arg);
    $GLOBALS['page']->add(getTitleArea($page_title, 'forum') . '<div class="std_block">' . Form::openForm('search_forum', 'index.php?modname=forum&amp;op=search') . '<div class="quick_search_form">' . '<label for="search_arg">' . $lang->def('_SEARCH_LABEL') . '</label> ' . Form::getInputTextfield('search_t', 'search_arg', 'search_arg', $search_arg, $lang->def('_SEARCH'), 255, '') . '<input class="search_b" type="submit" id="search_button" name="search_button" value="' . $lang->def('_SEARCH') . '" />' . '</div>' . Form::closeForm(), 'content');
    $tb = new Table(Get::sett('visuItem'), $lang->def('_THREAD_CAPTION'), $lang->def('_THRAD_SUMMARY'));
    $img_up = '<img src="' . getPathImage() . 'standard/ord_asc.png" alt="' . $lang->def('_ORD_ASC') . '" />';
    $img_down = '<img src="' . getPathImage() . 'standard/ord_desc.png" alt="' . $lang->def('_ORD_DESC') . '" />';
    $cont_h = array('<img src="' . getPathImage() . 'standard/msg_read.png" title="' . $lang->def('_FREET') . '" alt="' . $lang->def('_FREE') . '" />', '<a href="' . $jump_url . '&amp;ord=' . ($ord == 'obj' ? 'obji' : 'obj') . '" title="' . $lang->def('_ORDER_BY') . '">' . ($ord == 'obj' ? $img_up : ($ord == 'obji' ? $img_down : '')) . $lang->def('_THREAD') . '</a>', $lang->def('_NUMREPLY'), '<a href="' . $jump_url . '&amp;ord=' . ($ord == 'auth' ? 'authi' : 'auth') . '" title="' . $lang->def('_ORDER_BY') . '">' . ($ord == 'auth' ? $img_up : ($ord == 'authi' ? $img_down : '')) . $lang->def('_AUTHOR') . '</a>', $lang->def('_NUMVIEW'), '<a href="' . $jump_url . '&amp;ord=' . ($ord == 'post' ? 'posti' : 'post') . '" title="' . $lang->def('_ORDER_BY') . '">' . ($ord == 'post' ? $img_up : ($ord == 'posti' ? $img_down : '')) . $lang->def('_LASTPOST') . '</a>');
    $type_h = array('image', '', 'align_center', 'align_center', 'image', 'align_center');
    if ($mod_perm) {
        $cont_h[] = '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" title="' . $lang->def('_MOD') . '" />';
        $type_h[] = 'image';
        $cont_h[] = '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" title="' . $lang->def('_DEL') . '" />';
        $type_h[] = 'image';
    }
    $tb->setColsStyle($type_h);
    $tb->addHead($cont_h);
    while (list($idT, $id_forum, $t_author, $posted, $title, $num_post, $num_view, $locked, $erased) = sql_fetch_row($re_thread)) {
        $c_css = '';
        // thread author
        $t_author = isset($authors_names[$t_author]) ? $authors_names[$t_author][ACL_INFO_LASTNAME] . $authors_names[$t_author][ACL_INFO_FIRSTNAME] == '' ? $acl_man->relativeId($authors_names[$t_author][ACL_INFO_USERID]) : $authors_names[$t_author][ACL_INFO_LASTNAME] . ' ' . $authors_names[$t_author][ACL_INFO_FIRSTNAME] : $lang->def('_UNKNOWN_AUTHOR');
        // last post author
        if (isset($last_post[$idT])) {
            $author = $last_post[$idT]['author'];
            $last_mess_write = $last_post[$idT]['info'] . ' ( ' . $lang->def('_BY') . ': <span class="mess_author">' . (isset($authors_names[$author]) ? $authors_names[$author][ACL_INFO_LASTNAME] . $authors_names[$author][ACL_INFO_FIRSTNAME] == '' ? $acl_man->relativeId($authors_names[$author][ACL_INFO_USERID]) : $authors_names[$author][ACL_INFO_LASTNAME] . ' ' . $authors_names[$author][ACL_INFO_FIRSTNAME] : $lang->def('_UNKNOWN_AUTHOR')) . '</span> )';
        } else {
            $last_mess_write = $lang->def('_NONE');
        }
        // status of the thread
        if ($erased) {
            $status = '<img src="' . getPathImage() . 'standard/cancel.png" alt="' . $lang->def('_FREE') . '" />';
        } elseif ($locked) {
            $status = '<img src="' . getPathImage() . 'standard/locked.png" alt="' . $lang->def('_LOCKED') . '" />';
        } elseif (isset($_SESSION['unreaded_forum'][$_SESSION['idCourse']][$id_forum][$idT])) {
            $status = '<img src="' . getPathImage() . 'standard/msg_unread.png" alt="' . $lang->def('_UNREAD') . '" />';
            $c_css = ' class="text_bold"';
        } else {
            $status = '<img src="' . getPathImage() . 'standard/msg_read.png" alt="' . $lang->def('_FREE') . '" />';
        }
        $content = array($status);
        $content[] = $erased && !$mod_perm ? '<div class="forumErased">' . $lang->def('_OPERATION_SUCCESSFUL') . '</div>' : '<a' . $c_css . ' href="index.php?modname=forum&amp;op=searchmessage&amp;idThread=' . $idT . '&amp;ini_thread=' . $ini_page . '">' . ($search_arg !== '' ? eregi_replace($search_arg, '<span class="filter_evidence">' . $search_arg . '</span>', $title) : $title) . '</a>';
        $content[] = $num_post . (isset($_SESSION['unreaded_forum'][$_SESSION['idCourse']][$id_forum][$idT]) && $_SESSION['unreaded_forum'][$_SESSION['idCourse']][$id_forum][$idT] != 'new_thread' ? '<br /><span class="forum_notread">(' . $_SESSION['unreaded_forum'][$_SESSION['idCourse']][$id_forum][$idT] . ' ' . $lang->def('_ADD') . ')</span>' : '');
        $content[] = $t_author;
        $content[] = $num_view;
        //$content[] = Format::date($posted);
        $content[] = $last_mess_write;
        if ($mod_perm) {
            $content[] = '<a href="index.php?modname=forum&amp;op=modthread&amp;idThread=' . $idT . '&amp;search=1&amp;ini=' . $ini_page . '" ' . 'title="' . $lang->def('_MOD') . ' : ' . strip_tags($title) . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . ' : ' . strip_tags($title) . '" /></a>';
            $content[] = '<a href="index.php?modname=forum&amp;op=delthread&amp;idThread=' . $idT . '&amp;search=1&amp;ini=' . $ini_page . '" ' . 'title="' . $lang->def('_DEL') . ' : ' . strip_tags($title) . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . ' : ' . strip_tags($title) . '" /></a>';
        }
        $tb->addBody($content);
    }
    $GLOBALS['page']->add($tb->getTable(), 'content');
    $GLOBALS['page']->add($nav_bar->getNavBar($ini) . '</div>', 'content');
}
예제 #17
0
function coursecatalogue($id_block, $title, $option = array())
{
    YuiLib::load(array('animation' => 'my_animation', 'container' => 'container-min', 'container' => 'container_core-min'));
    cout(Util::get_js(Get::rel_path('cms') . '/modules/catalog/catalog.js', true), 'page_head');
    if (!isset($_SESSION['chart'])) {
        $_SESSION['chart'] = array();
    }
    $id_course = Get::req('id_course', DOTY_INT, 0);
    $action = Get::req('action', DOTY_STRING, '');
    if ($id_course !== 0 && $action === '') {
        $_SESSION['chart'][$id_course]['idCourse'] = $id_course;
    } else {
        require_once _lms_ . '/lib/lib.subscribe.php';
        $man_subscribe = new CourseSubscribe_Management();
        $man_subscribe->subscribeToCourse(getLogUserId(), $id_course);
    }
    require_once _cms_ . '/lib/lib.catalog.php';
    require_once _base_ . '/lib/lib.navbar.php';
    cout('<link href="./modules/catalog/catalog.css" type="text/css" rel="stylesheet"/>', 'page_head');
    $css_path = Get::tmpl_path('base') . 'yui-skin';
    cout(Util::get_css($css_path . '/tabview.css', true), 'page_head');
    $lang =& DoceboLanguage::CreateInstance('catalogue', 'cms');
    $man_cat = new Man_Catalog();
    $array_id_block = explode('_', $id_block);
    $page = Get::req('page', DOTY_INT, 0);
    if ($page == 0) {
        $page = $this->getBlockPage($array_id_block[0]);
    }
    cout(getTitleArea($title) . '<div class="std_block">');
    $catalogue = $man_cat->getCatalogueForBlock($array_id_block[0]);
    $all_course = false;
    if (array_search(0, $catalogue) !== false) {
        unset($catalogue[array_search(0, $catalogue)]);
        $all_course = true;
    }
    $id_catalogue = Get::req('id_catalogue', DOTY_INT, -2);
    if ($id_catalogue == -2) {
        if (count($catalogue)) {
            if (isset($catalogue[0])) {
                $id_catalogue = $catalogue[0]['id_catalogue'];
            } else {
                $id_catalogue = $catalogue[1]['id_catalogue'];
            }
        } else {
            $id_catalogue = 0;
        }
    }
    $id_category = Get::req('id_cat', DOTY_INT, 0);
    $number_courses = $man_cat->getCourseNumberForBlock($array_id_block[0], $id_catalogue, $id_category, $all_course);
    $nav_bar = new NavBar('ini', Get::sett('visuItem'), $number_courses);
    $nav_bar->setLink('index.php?pag=' . $page . '&amp;id_catalogue=' . $id_catalogue . ($id_category != 0 ? '&amp;id_cat=' . $id_category : ''));
    $ini = $nav_bar->getSelectedPage();
    $limit = ($ini - 1) * Get::sett('visuItem');
    cout($nav_bar->getNavBar() . '<div id="demo" class="yui-navset">' . '<ul class="yui-nav">');
    foreach ($catalogue as $catalogue_info) {
        cout('<li ' . ($catalogue_info['id_catalogue'] == $id_catalogue ? ' class="selected"' : '') . '><a href="index.php?pag=' . $page . '&amp;id_catalogue=' . $catalogue_info['id_catalogue'] . '"><em>' . $catalogue_info['name'] . '</em></a></li>');
    }
    cout('<li ' . ($id_catalogue == 0 ? ' class="selected"' : '') . '><a href="index.php?pag=' . $page . '&amp;id_catalogue=0"><em>' . $lang->def('_ALL_COURSES') . '</em></a></li>' . '<li ' . ($id_catalogue == -1 ? ' class="selected"' : '') . '><a href="index.php?pag=' . $page . '&amp;id_catalogue=-1"><em>' . $lang->def('_CATEGORY') . '</em></a></li>');
    reset($catalogue);
    cout('</ul>');
    cout('<div class="yui-content">');
    if ($number_courses == 0 && $id_catalogue != -1) {
        cout('<p>' . $lang->def('_NO_COURSE_FOR_CATALOG') . '</p>');
    } elseif ($id_catalogue == -1) {
        //Category Visualization
        if ($id_category == 0) {
            $query = "SELECT ca.idCategory, ca.path, ca.lev, ca.iLeft, ca.iRight, COUNT(co.idCourse)" . " FROM " . $GLOBALS['prefix_lms'] . "_category AS ca" . " LEFT JOIN " . $GLOBALS['prefix_lms'] . "_course AS co ON co.idCategory = ca.idCategory" . " WHERE ca.lev = 1" . " GROUP BY ca.idCategory" . " ORDER BY ca.lev, ca.path";
        } else {
            $query = "SELECT iLeft, iRight" . " FROM " . $GLOBALS['prefix_lms'] . "_category" . " WHERE idCategory = " . $id_category;
            list($ileft, $iright) = sql_fetch_row(sql_query($query));
            $query = "SELECT ca.idCategory, ca.path, ca.lev, ca.iLeft, ca.iRight, COUNT(co.idCourse)" . " FROM " . $GLOBALS['prefix_lms'] . "_category AS ca" . " LEFT JOIN " . $GLOBALS['prefix_lms'] . "_course AS co ON co.idCategory = ca.idCategory" . " WHERE ca.iLeft >= " . $ileft . " AND ca.iRight <= " . $iright . " GROUP BY ca.idCategory" . " ORDER BY ca.lev, ca.path";
        }
        $result = sql_query($query);
        $first = true;
        $num_folder = sql_num_rows($result);
        cout('<div class="cat_nav">');
        while (list($id_cat, $path, $lev, $ileft, $iright, $courses) = sql_fetch_row($result)) {
            $cat_name = end(explode('/', $path));
            if ($id_category == $id_cat) {
                cout('<div class="cat_position">' . '<a href="index.php?pag=' . $page . '&id_catalogue=-1">' . $lang->def('_CATEGORY') . '</a>');
                if ($lev > 1) {
                    $query_parent = "SELECT idCategory, path" . " FROM " . $GLOBALS['prefix_lms'] . "_category" . " WHERE iLeft < " . $ileft . " AND iRight > " . $iright . " ORDER BY lev ASC";
                    $result_parent = sql_query($query_parent);
                    while (list($id_cat_pa, $path_pa) = sql_fetch_row($result_parent)) {
                        $pa_name = end(explode('/', $path_pa));
                        cout(' - <a href="index.php?pag=' . $page . '&id_catalogue=-1&amp;id_cat=' . $id_cat_pa . '">' . $pa_name . '</a>');
                    }
                }
                cout(' - ' . $cat_name . '</div>');
            }
            if ($first && $num_folder > 0) {
                $first = false;
                cout('<ul class="cat_nav_list">');
            }
            if ($id_category != $id_cat) {
                $sub_folder = ($iright - $ileft - 1) / 2;
                cout('<li>' . '<a href="index.php?pag=' . $page . '&id_catalogue=-1&amp;id_cat=' . $id_cat . '">' . $cat_name . '<br />' . ($sub_folder > 0 ? '<span class="cat_item_info">' . $lang->def("_CATEGORIES") . ' (' . $sub_folder . ')<br />' : '') . ($courses > 0 ? '<span class="cat_item_info">' . $lang->def("_COURSES") . ' (' . $courses . ')' : '') . '</a>' . '</li>');
            }
        }
        if ($num_folder > 0) {
            cout('</ul>');
        }
        cout('</div>');
        //Course visualization
        cout('<div class="course_list">');
        if ($number_courses == 0) {
            cout('<p>' . $lang->def('_NO_COURSE_FOR_CATEGORY') . '</p>');
        } else {
            $courses = $man_cat->getCourseForBlock($array_id_block[0], $limit, $id_catalogue, $id_category, $all_course);
            foreach ($courses as $course_info) {
                $action = $this->controlCourse($course_info, $page, $id_catalogue, $id_category, $ini);
                cout('<div class="course">' . '<div class="course_info">' . '<h3 class="course_title"><img src="' . getPathImage() . '/language/' . strtolower($course_info['lang_code']) . '.png" alt="" title="" /> ' . $course_info['name'] . '</h3>' . '<p class="course_description">' . $course_info['description'] . '</p>' . '</div>' . '<div class="course_action">' . $action . '</div>' . '</div>');
            }
        }
        cout('</div>');
    } else {
        //Course in catalogue visualization
        $courses = $man_cat->getCourseForBlock($array_id_block[0], $limit, $id_catalogue, $id_category, $all_course);
        foreach ($courses as $course_info) {
            $action = $this->controlCourse($course_info, $page, $id_catalogue, $id_category, $ini);
            cout('<div class="course">' . '<div class="course_info">' . '<h3 class="course_title"><img src="' . getPathImage() . '/language/' . strtolower($course_info['lang_code']) . '.png" alt="" title="" /> ' . $course_info['name'] . '</h3>' . '<p class="course_description">' . $course_info['description'] . '</p>' . '</div>' . '<div class="course_action">' . $action . '</div>' . '</div>');
        }
    }
    cout('</div>' . '</div>' . $nav_bar->getNavBar() . '</div>');
}
예제 #18
0
?>
<div class="wrap">
    <?php 
Navbar::begin(['brandLabel' => 'Тестовое приложение']);
ActiveForm::begin(['action' => ['main/search'], 'method' => 'post', 'options' => ['class' => 'navbar-form navbar-right']]);
echo '<div class="input-group input-group-sm">';
echo Html::input('type:text', 'search', '', ['placeholder' => 'Найти...', 'class' => 'form-control']);
echo '<span class="input-group-btn">';
echo Html::submitButton('<span class = "glyphicon glyphicon-search"></span>', ['class' => 'btn btn-success']);
echo '</span></div>';
ActiveForm::end();
echo Nav::widget(['items' => [['label' => 'Главная <span class="glyphicon glyphicon-home"></span>', 'url' => ['main/index']], ['label' => 'О проекте <span class ="glyphicon glyphicon-question-sign"></span>', 'url' => ['#'], 'linkOptions' => ['data-toggle' => 'modal', 'data-target' => '#modal', 'style' => 'cursor:pointer,outline:none']], ['label' => 'Выпадающий пункт', 'items' => ['<li class ="dropdown-header">Заголовок</li>', '<li class = "divider"></li>', ['label' => 'Ссылка', 'url' => '#']]], ['label' => 'Регистрация', 'url' => ['main/reg']], ['label' => 'Вход', 'url' => ['main/login']]], 'encodeLabels' => false, 'options' => ['class' => 'navbar-nav navbar-right']]);
Modal::begin(['header' => 'Header', 'id' => 'modal']);
echo 'Some text';
Modal::end();
NavBar::end();
?>
    <div class="container">
        <?php 
echo $content;
?>
    </div>
</div>
<footer class="footer">
    <div class="container">
    <span class="badge">
        <span class = "glyphicon glyphicon-copyright-mark"></span> ART-LABS interiors<?php 
echo date('Y');
?>
    </span>
예제 #19
0
<?php

// FireBlog 1.0 Navigation module
// Copyright (C) Alex Smith 2005
include "inc/navigation.inc.php";
$navbar = new NavBar();
$query = "SELECT * FROM links ORDER BY id";
$result = mysql_query($query);
$num = mysql_numrows($result);
$i = 0;
while ($i < $num) {
    $type = mysql_result($result, $i, 'link_type');
    if ($type == 'category') {
        $name = mysql_result($result, $i, 'link_name');
        if ($navbar->in_section == 1) {
            $navbar->section_end();
        }
        $navbar->section_begin($name);
    } elseif ($type == 'link') {
        $name = mysql_result($result, $i, 'link_name');
        $desc = mysql_result($result, $i, 'link_description');
        $target = mysql_result($result, $i, 'link_target');
        $navbar->create_link($name, $target, $desc);
    } elseif ($type == 'home') {
        $name = mysql_result($result, $i, 'link_name');
        $navbar->create_homepage_link($name);
    } elseif ($type == 'page') {
        $name = mysql_result($result, $i, 'link_name');
        $desc = mysql_result($result, $i, 'link_description');
        $page = mysql_result($result, $i, 'link_target');
        $navbar->create_page_link($name, $page, $desc);
예제 #20
0
 function getSelectedElement($var_name = false, $kind_of = false)
 {
     $page = NavBar::getSelectedPage($var_name, $kind_of);
     return ($page - 1) * $this->element_per_page;
 }
예제 #21
0
    <link href="../../bootstrap/dist/css/sb-admin-2.css" rel="stylesheet">
  </head>

  <body onload="LlenaSelect();LlenaArticulo();Filtro(<?php 
echo $_SESSION["id_almacen"];
?>
)">

    <div id="wrapper">

        <?php 
/*
 *  Define el Tipo de NavBar a Usar
 */
require_once '../../Clases/clsNavbar.php';
$objNavBar = new NavBar();
$objNavBar->DefineNavBar();
?>
        
             <div id="page-wrapper">
                <br>
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <div class="row">                            
                            <div class=" col-xs-12 ">
                                <div class="col-xs-12 col-sm-3">
                                    <br><b>Listado de Artículos</b>
                                </div>
                                <div class="col-xs-12 col-sm-3">
                                    <br>
                                    <select class="form-control" id="cbArticulo" name="cbArticulo" onchange="Filtro(<?php 
예제 #22
0
 public function coursepathCourse()
 {
     require_once _base_ . '/lib/lib.navbar.php';
     $active_tab = 'coursepath';
     $nav_bar = new NavBar('page', Get::sett('visuItem'), count($this->model->getUserCoursepath(Docebo::user()->getIdSt())), 'link');
     $nav_bar->setLink('index.php?r=catalog/coursepathCourse');
     $page = Get::req('page', DOTY_INT, 1);
     $html = $this->model->getCoursepathList(Docebo::user()->getIdSt(), $page);
     $user_catalogue = $this->model->getUserCatalogue(Docebo::user()->getIdSt());
     $user_coursepath = $this->model->getUserCoursepath(Docebo::user()->getIdSt());
     echo '<div class="layout_colum_container">';
     $lmstab = $this->widget('lms_tab', array('active' => 'catalog', 'close' => false));
     $this->render('tab_start', array('user_catalogue' => $user_catalogue, 'active_tab' => $active_tab, 'user_coursepath' => $user_coursepath));
     $this->render('courselist', array('html' => $html, 'nav_bar' => $nav_bar));
     $this->render('tab_end', array());
     $lmstab->endWidget();
     echo '</div>';
 }