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


PHP Table::addActionAdd方法代码示例

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


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

示例1: fileList

function fileList(&$url)
{
    checkPerm('view');
    require_once _base_ . '/lib/lib.tab.php';
    require_once _base_ . '/lib/lib.table.php';
    require_once _base_ . '/lib/lib.form.php';
    $file_man = new MyFile(getLogUserId());
    $tab_man = new TabView('myfiles', '');
    $lang =& DoceboLanguage::createInstance('myfiles');
    $areas = $file_man->getFilesAreas();
    while (list($id_page, $area_name) = each($areas)) {
        $new_tab = new TabElemDefault($id_page, $lang->def($area_name), getPathImage('fw') . 'myfiles/' . $id_page . '.gif');
        $tab_man->addTab($new_tab);
    }
    $tab_man->parseInput($_POST, $_SESSION);
    $active_tab = $tab_man->getActiveTab();
    if (!$active_tab) {
        $active_tab = importVar('working_area', false, $file_man->getDefaultArea());
        $tab_man->setActiveTab($active_tab);
    }
    $GLOBALS['page']->addStart(Form::openForm('tab_myfiles', $url->getUrl('op=myfiles')) . Form::getHidden('working_area', 'working_area', $active_tab) . $tab_man->printTabView_Begin('', false), 'content');
    $GLOBALS['page']->addEnd($tab_man->printTabView_End() . Form::closeForm(), 'content');
    $tb = new Table(0, $lang->def('_MYFILES_CAPTION'), $lang->def('_MYFILES_SUMMARY'));
    $cont_h = array($lang->def('_TITLE'), $lang->def('_FILE_POLICY'), '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" />', '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_REM_FILE') . '" alt="' . $lang->def('_DEL') . '" />');
    $type_h = array('', 'image nowrap', 'image', 'image');
    $tb->setColsStyle($type_h);
    $tb->addHead($cont_h);
    $re_files = $file_man->getFileList($active_tab, false, MYFILE_TITLE);
    while ($file_info = $file_man->fetch_row($re_files)) {
        $cont = array($file_info[MYFILE_TITLE]);
        switch ($file_info[MYFILE_POLICY]) {
            case MF_POLICY_FREE:
                $cont[] = $lang->def('_MF_POLICY_FREE');
                break;
            case MF_POLICY_TEACHER:
                $cont[] = $lang->def('_MF_POLICY_TEACHER');
                break;
            case MF_POLICY_FRIENDS:
                $cont[] = $lang->def('_MF_POLICY_FRIENDS');
                break;
            case MF_POLICY_TEACHER_AND_FRIENDS:
                $cont[] = $lang->def('_MF_POLICY_TEACHER_AND_FRIENDS');
                break;
            case MF_POLICY_NOONE:
                $cont[] = $lang->def('_MF_POLICY_NOONE');
                break;
        }
        $cont[] = '<a href="' . $url->getUrl('op=modfiles&working_area=' . $active_tab . '&id_file=' . $file_info[MYFILE_ID_FILE]) . '">' . '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . ' : ' . $file_info[MYFILE_TITLE] . '" alt="' . $lang->def('_MOD') . '" />' . '</a>';
        $cont[] = '<a href="' . $url->getUrl('op=delfiles&id_file=' . $file_info[MYFILE_ID_FILE]) . '">' . '<img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_REM_FILE') . ' : ' . $file_info[MYFILE_TITLE] . '" alt="' . $lang->def('_DEL') . '" />' . '</a>';
        $tb->addBody($cont);
    }
    $tb->addActionAdd('<p class="new_elem_link"><a href="' . $url->getUrl('op=modfiles&working_area=' . $active_tab) . '">' . $lang->def('_ADD_' . $active_tab) . '</a></p>');
    $tb->addActionAdd('<p>' . '<a href="' . $url->getUrl('modname=profile&op=profile&id_user=' . getLogUserId() . '&ap=view_files&type=' . $active_tab . '&from=1') . '">' . '<img src="' . getPathImage('fw') . 'myfiles/' . $active_tab . '.gif" title="' . $lang->def($active_tab) . '" alt="' . $lang->def('_VIEW_' . $active_tab) . '" />' . '</a>' . '<a href="' . $url->getUrl('modname=profile&op=profile&id_user=' . getLogUserId() . '&ap=view_files&type=' . $active_tab . '&from=1') . '">' . $lang->def('_VIEW_' . $active_tab) . '</a></p>');
    $GLOBALS['page']->add($tb->getTable(), 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:55,代码来源:myfiles.php

示例2: modglossarygui

 function modglossarygui($object_glos = NULL)
 {
     checkPerm('view', false, 'storage');
     $lang =& DoceboLanguage::createInstance('glossary');
     require_once _base_ . '/lib/lib.table.php';
     $tableGlossary = new Table(Get::sett('visuItem'), '', $lang->def('_GLOSSARY_SUMMARY'));
     $tableGlossary->initNavBar('ini', 'link');
     $ini = $tableGlossary->getSelectedElement();
     $back_coded = htmlentities(urlencode($object_glos->back_url));
     list($title) = sql_fetch_row(sql_query("\r\n\tSELECT title\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_glossary \r\n\tWHERE idGlossary = '" . $object_glos->getId() . "'"));
     $reTerm = sql_query("\r\n\tSELECT idTerm, term \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_glossaryterm \r\n\tWHERE idGlossary = '" . $object_glos->getId() . "' \r\n\tORDER BY term \r\n\tLIMIT {$ini}," . Get::sett('visuItem'));
     list($num_of_term) = sql_fetch_row(sql_query("\r\n\tSELECT COUNT(*) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_glossaryterm\r\n\tWHERE idGlossary = '" . $object_glos->getId() . "'"));
     if ($title == '') {
         $_SESSION['last_error'] = $lang->def('_FILEUNSPECIFIED');
         Util::jump_to(Util::str_replace_once('&', '&amp;', $object_glos->back_url) . '&amp;create_result=0');
     }
     $GLOBALS['page']->add(getTitleArea($lang->def('_GLOSSARY'), 'glossary', $lang->def('_GLOSSARY')) . '<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&amp;', $object_glos->back_url) . '&amp;mod_result=0', $lang->def('_BACK')) . '<b>' . $lang->def('_GLOSSARY') . ' : ' . $title . '</b><br /><br />' . '<div class="mod_container">' . '<a href="index.php?modname=glossary&amp;op=modglossary&amp;idGlossary=' . $object_glos->getId() . '&amp;back_url=' . $back_coded . '" title="' . $lang->def('_MOD_TITLE') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" /> ' . $lang->def('_MOD_TITLE') . '</a>' . '</div><br />', 'content');
     $contentArray = array($lang->def('_TERM'), '<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') . '" />');
     $typeArray = array('', 'image', 'image');
     $GLOBALS['page']->add($tableGlossary->addHead($contentArray, $typeArray));
     while (list($idTerm, $term) = sql_fetch_row($reTerm)) {
         $content = array($term, '<a href="index.php?modname=glossary&amp;op=modterm&amp;idTerm=' . $idTerm . '&amp;back_url=' . $back_coded . '" title="' . $lang->def('_MOD') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" /></a>', '<a href="index.php?modname=glossary&amp;op=delterm&amp;idTerm=' . $idTerm . '&amp;back_url=' . $back_coded . '" title="' . $lang->def('_DEL') . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" /></a>');
         $tableGlossary->addBody($content);
     }
     $tableGlossary->addActionAdd('<a href="index.php?modname=glossary&amp;op=addterm&amp;idGlossary=' . $object_glos->getId() . '&amp;back_url=' . $back_coded . '" title="' . $lang->def('_ADDTERM') . '">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADDTERM') . '</a>');
     $tableGlossary->setLink('index.php?modname=glossary&amp;op=modglossarygui' . '&amp;idGlossary=' . $object_glos->getId() . '&amp;back_url=' . $back_coded);
     $GLOBALS['page']->add($tableGlossary->getTable() . $tableGlossary->getNavBar($ini, $num_of_term) . '</div>', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:28,代码来源:glossary.php

示例3: notes

    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');
    }
开发者ID:abhinay100,项目名称:forma_app,代码行数:59,代码来源:notes.php

示例4: reportList

function reportList()
{
    checkPerm('view');
    require_once _base_ . '/lib/lib.table.php';
    $lang =& DoceboLanguage::createInstance('report', 'framework');
    $_SESSION['report_tempdata'] = array();
    $can_mod = checkPerm('mod', true);
    $acl_man = Docebo::aclm();
    $public_admin_mod = true;
    $query = "SELECT t1.*, t2.userid \r\n\tFROM %lms_report_filter as t1 \r\n\t\tLEFT JOIN %adm_user as t2 ON t1.author=t2.idst\r\n\tWHERE t1.is_public = 1 OR t1.author = " . Docebo::user()->getId();
    $tb = new Table();
    $tb->initNavBar('ini', 'button');
    $col_type = array('', 'align_center', 'align_center', 'image');
    $col_content = array($lang->def('_NAME'), $lang->def('_TAB_REP_CREATOR', 'report', 'framework'), $lang->def('_CREATION_DATE'), '<img src="' . getPathImage() . 'standard/view.png" alt="' . $lang->def('REPORT_SHOW_RESULTS') . '" title="' . $lang->def('REPORT_SHOW_RESULTS') . '" />');
    if ($public_admin_mod && $can_mod) {
        $col_type[] = 'image';
        $col_content[] = '<img src="' . getPathImage() . 'standard/edit.png"  alt="' . $lang->def('_MOD') . '" title="' . $lang->def('_MOD') . '"/>';
        $col_type[] = 'image';
        $col_content[] = '<img src="' . getPathImage() . 'standard/delete.png"  alt="' . $lang->def('_DEL') . '" title="' . $lang->def('_DEL') . '"/>';
    }
    $tb->setColsStyle($col_type);
    $tb->addHead($col_content);
    $res = sql_query($query);
    if ($res) {
        while ($row = sql_fetch_assoc($res)) {
            $id = $row['id_filter'];
            $opn_link = '<a href="index.php?modname=public_report_admin&amp;op=view_report&amp;idrep=' . $id . '" ' . ' title="' . $lang->def('REPORT_SHOW_RESULTS', 'report', 'framework') . '">' . '<img src="' . getPathImage() . 'standard/view.png" alt="' . $lang->def('REPORT_SHOW_RESULTS', 'report', 'framework') . '" />' . '</a>';
            $tb_content = array($row['author'] == 0 ? $lang->def($row['filter_name']) : $row['filter_name'], $row['author'] == 0 ? '<div class="align_center">-</div>' : $acl_man->relativeId($row['userid']), Format::date($row['creation_date']), $opn_link);
            if ($public_admin_mod && $can_mod) {
                if ($row['author'] == Docebo::user()->getId()) {
                    $tb_content[] = '<a href="index.php?modname=public_report_admin&amp;op=modify_name&amp;modid=' . $id . '" ' . ' title="' . $lang->def('_MOD', 'report', 'framework') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD', 'report', 'framework') . '" />' . '</a>';
                } else {
                    $tb_content[] = '';
                }
                if ($row['author'] == Docebo::user()->getId()) {
                    $tb_content[] = '<a href="index.php?modname=public_report_admin&amp;op=del_public_report&amp;idrep=' . $id . '" ' . ' title="' . $lang->def('_DEL', 'report', 'framework') . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL', 'report', 'framework') . '" />' . '</a>';
                } else {
                    $tb_content[] = '';
                }
            }
            $tb->addBody($tb_content);
        }
    }
    require_once _base_ . '/lib/lib.dialog.php';
    setupHrefDialogBox('a[href*=del_public_report]');
    if ($public_admin_mod && $can_mod) {
        $tb->addActionAdd('<a href="index.php?modname=public_report_admin&amp;op=create_name">' . '<img src="' . getPathImage() . 'standard/add.png" title="' . $lang->def('_NEW') . '" /> ' . $lang->def('_NEW') . '</a>');
    }
    cout(getTitleArea($lang->def('_REPORT')) . '<div class="std_block">' . $tb->getTable() . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:50,代码来源:public_report_admin.php

示例5: listroom

 function listroom()
 {
     require_once _base_ . '/lib/lib.table.php';
     $lang =& DoceboLanguage::createInstance('admin_config', 'scs');
     $out =& $GLOBALS['page'];
     $mod_perm = checkPerm('mod', true);
     $out->setWorkingZone('content');
     $out->add(getTitleArea($lang->def('_ROOM_MAN'), 'admin_conf') . '<div class="std_block">');
     $tb_room = new Table(0, $lang->def('_ALL_ROOMS'), $lang->def('_ALL_ROOMS_SUMMARY'));
     $cont_h = array($lang->def('_ROOM_NAME'), $lang->def('_ROOM_TYPE'));
     $type_h = array('', 'align_center');
     if ($mod_perm) {
         $cont_h[] = '<img src="' . getPathImage('fw') . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" />';
         $type_h[] = 'image';
         $cont_h[] = '<img src="' . getPathImage('fw') . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" />';
         $type_h[] = 'image';
     }
     $tb_room->setColsStyle($type_h);
     $tb_room->addHead($cont_h);
     $query_rooms = "\r\n\tSELECT id_room, room_name, room_type \r\n\tFROM " . $GLOBALS['prefix_scs'] . "_rules_room ";
     $re_rooms = sql_query($query_rooms);
     while (list($id_room, $room_name, $room_type) = sql_fetch_row($re_rooms)) {
         $cont = array($room_name);
         switch ($room_type) {
             case "course":
                 $cont[] = $lang->def('_COURSE');
                 break;
             case "private":
                 $cont[] = $lang->def('_PRIVATE');
                 break;
             case "public":
                 $cont[] = $lang->def('_PUBLIC');
                 break;
         }
         if ($mod_perm) {
             $cont[] = '<a href="index.php?modname=room&amp;op=modroom&amp;id_room=' . $id_room . '"' . ' title="' . $lang->def('_MOD') . ' : ' . $room_name . '">' . '<img src="' . getPathImage('fw') . 'standard/edit.png" alt="' . $lang->def('_MOD') . ' : ' . $room_name . '" /></a>';
             $cont[] = '<a href="index.php?modname=room&amp;op=delroom&amp;id_room=' . $id_room . '"' . ' title="' . $lang->def('_DEL') . ' : ' . $room_name . '">' . '<img src="' . getPathImage('fw') . 'standard/delete.png" alt="' . $lang->def('_DEL') . ' : ' . $room_name . '" /></a>';
         }
         $tb_room->addBody($cont);
     }
     if ($mod_perm) {
         $tb_room->addActionAdd('<a href="index.php?modname=room&amp;op=newroom">' . '<img src="' . getPathImage('fw') . 'standard/add.png" alt="' . $lang->def('_NEW_ROOM') . '" />' . '&nbsp;' . $lang->def('_NEW_ROOM') . '</a>');
     }
     $out->add($tb_room->getTable());
     $out->add('</div>');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:46,代码来源:room.php

示例6: modlinkgui

 function modlinkgui($object_link)
 {
     checkPerm('view', false, 'storage');
     $lang =& DoceboLanguage::createInstance('link');
     require_once _base_ . '/lib/lib.table.php';
     $del_perm = checkPerm('view', false, 'storage');
     $back_coded = htmlentities(urlencode($object_link->back_url));
     $textQuery = "\r\n\tSELECT idLink, title, link_address, sequence \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_link \r\n\tWHERE idCategory = '" . $object_link->getId() . "' \r\n\tORDER BY sequence";
     $result = sql_query($textQuery);
     $num_link = mysql_num_rows($result);
     list($title_cat) = sql_fetch_row(sql_query("\r\n\tSELECT title\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_link_cat \r\n\tWHERE idCategory = '" . $object_link->getId() . "'"));
     $GLOBALS['page']->add(getTitleArea($lang->def('_SECT_LINK'), 'link') . '<div class="std_block">' . getBackUi(Util::str_replace_once('&', '&amp;', $object_link->back_url) . '&amp;mod_result=0', $lang->def('_BACK')) . '<b>' . $lang->def('_TITLE') . ' : ' . $title_cat . '</b><br /><br />' . '<div class="mod_container">' . '<a href="index.php?modname=link&amp;op=modlinkcat&amp;idCategory=' . $object_link->getId() . '&amp;back_url=' . $back_coded . '" title="' . $lang->def('_MOD_TITLE') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" /> ' . $lang->def('_MOD_TITLE') . '</a>' . '</div><br />', 'content');
     $tableCat = new Table(0, '', $lang->def('_SUMMARY_LINK'));
     $contentH = array($lang->def('_QUESTION'), $lang->def('_URL'), '<img src="' . getPathImage() . 'standard/down.png" alt="' . $lang->def('_DOWN') . '" title="' . $lang->def('_MOVE_DOWN') . '" />', '<img src="' . getPathImage() . 'standard/up.png" alt="' . $lang->def('_UP') . '" title="' . $lang->def('_MOVE_UP') . '" />', '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" title="' . $lang->def('_MOD') . '" />', '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" title="' . $lang->def('_DEL') . '" />');
     $typeH = array('', 'image', 'image', 'image', 'image', 'image');
     $tableCat->setColsStyle($typeH);
     $tableCat->addHead($contentH);
     $i = 1;
     while (list($idLink, $title, $link_address, $seq) = sql_fetch_row($result)) {
         $rowContent = array($seq . ') ' . $title, $link_address);
         if ($i != $num_link) {
             $rowContent[] = '<a href="index.php?modname=link&amp;op=movedown&amp;idLink=' . $idLink . '&amp;back_url=' . $back_coded . '">' . '<img src="' . getPathImage() . 'standard/down.png" alt="' . $lang->def('_DOWN') . '" title="' . $lang->def('_MOVE_DOWN') . '" /></a>';
         } else {
             $rowContent[] = '&nbsp;';
         }
         if ($i != 1) {
             $rowContent[] = '<a href="index.php?modname=link&amp;op=moveup&amp;idLink=' . $idLink . '&amp;back_url=' . $back_coded . '">' . '<img src="' . getPathImage() . 'standard/up.png" alt="' . $lang->def('_UP') . '" title="' . $lang->def('_MOVE_UP') . '" /></a>';
         } else {
             $rowContent[] = '&nbsp;';
         }
         $rowContent[] = '<a href="index.php?modname=link&amp;op=modlink&amp;idLink=' . $idLink . '&amp;back_url=' . $back_coded . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" title="' . $lang->def('_MOD') . '" /></a>';
         $rowContent[] = '<a href="index.php?modname=link&amp;op=dellink&amp;idLink=' . $idLink . '&amp;back_url=' . $back_coded . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" title="' . $lang->def('_DEL') . '" /></a>';
         $tableCat->addBody($rowContent);
         ++$i;
     }
     $tableCat->addActionAdd('<a href="index.php?modname=link&amp;op=newlink&amp;idCategory=' . $object_link->getId() . '&amp;back_url=' . $back_coded . '" title="' . $lang->def('_ADDLINKT') . '">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADDLINK') . '</a>');
     $GLOBALS['page']->add($tableCat->getTable() . '<span class="text_bold text_little">[ ' . '<a href="index.php?modname=link&amp;op=fixsequence&amp;idCategory=' . $object_link->getId() . '&amp;back_url=' . $back_coded . '">' . $lang->def('_FIX_SEQUENCE') . '</a>' . ' ]</span>' . '</div>', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:38,代码来源:link.php

示例7: project

function project()
{
    checkPerm('view');
    $out =& $GLOBALS['page'];
    $out->setWorkingZone('content');
    $lang =& DoceboLanguage::createInstance('project', "lms");
    require_once _base_ . '/lib/lib.table.php';
    $myprj = userProjectsList(Docebo::user()->getIdSt());
    $mod_perm = checkPerm('mod', true);
    $del_perm = checkPerm('del', true);
    //area title
    $out->add(getTitleArea($lang->def("_PROJECT_MANAGER"), "project") . '<div class="std_block">' . "\n");
    $tab = new Table(0, $lang->def("_MYPRJ"), $lang->def("_PROJECT_SUMMARY"));
    $content_h = array($lang->def("_TITLE"), $lang->def("_PROGRESS"), $lang->def("_PERCENTAGE"));
    $type_h = array('', '', 'image');
    if ($mod_perm) {
        $content_h[] = '<img src="' . getPathImage() . 'standard/moduser.png" ' . 'alt="' . $lang->def("_MODPROJECTADMIN") . '" title="' . $lang->def("_MODPROJECTADMIN") . '" />';
        $type_h[] = 'image';
        $content_h[] = '<img src="' . getPathImage() . 'standard/edit.png" ' . 'alt="' . $lang->def("_MOD") . '" title="' . $lang->def("_MOD") . '" />';
        $type_h[] = 'image';
    }
    if ($del_perm) {
        $content_h[] = '<img src="' . getPathImage() . 'standard/delete.png" ' . 'alt="' . $lang->def("_DEL") . '" title="' . $lang->def("_DEL") . '" />';
        $type_h[] = 'image';
    }
    $tab->setColsStyle($type_h);
    $tab->addHead($content_h);
    if (!empty($myprj)) {
        foreach ($myprj as $key => $row) {
            $val = $row["id"];
            $progtot = $row["pprog"];
            if ($progtot < 100) {
                $class = "prjprogbar_g";
                $img = "progbar_g";
            } else {
                $class = "prjprogbar_r";
                $img = "progbar_r";
            }
            $content = array('<a href="index.php?modname=project&amp;op=showprj&amp;id=' . $val . '">' . $row["ptitle"] . '</a>', renderProgress($progtot, 0, 100, false), $progtot . '%');
            if ($mod_perm) {
                if ($row["flag"] == 2) {
                    $content[] = '<a href="index.php?modname=project&amp;op=manprjadmin&amp;id=' . $val . '">' . '<img src="' . getPathImage() . 'standard/moduser.png" ' . 'alt="' . $lang->def("_MODPROJECTADMIN") . '" title="' . $lang->def("_MODPROJECTADMIN") . '" /></a>';
                    $content[] = '<a href="index.php?modname=project&amp;op=modprj&amp;id=' . $val . '">' . '<img src="' . getPathImage() . 'standard/edit.png" ' . 'alt="' . $lang->def("_MOD") . '" title="' . $lang->def("_MOD") . '" /></a>';
                } else {
                    $content[] = "&nbsp;";
                    $content[] = "&nbsp;";
                }
            }
            if ($del_perm) {
                if ($row["flag"] == 2) {
                    $content[] = '<a href="index.php?modname=project&amp;op=delprj&amp;id=' . $val . '" title="' . $lang->def("_DEL") . ' : ' . strip_tags($row["ptitle"]) . '">' . '<img src="' . getPathImage() . 'standard/delete.png" ' . 'alt="' . $lang->def("_DEL") . '" title="' . $lang->def("_DEL") . '" /></a>';
                } else {
                    $content[] = "&nbsp;";
                }
            }
            $tab->addBody($content);
        }
    }
    if ($del_perm) {
        require_once _base_ . '/lib/lib.dialog.php';
        setupHrefDialogBox('a[href*=delprj]');
    }
    if (checkPerm('add', true)) {
        $tab->addActionAdd('<a href="index.php?modname=project&amp;op=addprj" title="' . $lang->def("_NEW_PROJECT") . '">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def("_NEW_PROJECT") . '" /> ' . $lang->def("_NEW_PROJECT") . '</a>');
    }
    $out->add($tab->getTable());
    $out->add('</div>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:68,代码来源:project.php

示例8: get_schedulations_table

function get_schedulations_table($idrep = false)
{
    checkPerm('view');
    $can_mod = checkPerm('mod', true);
    require_once _base_ . '/lib/lib.table.php';
    Util::get_js(Get::rel_path('base') . '/widget/dialog/dialog.js', true, true);
    YuiLib::load('selector');
    $acl_man =& Docebo::user()->getACLManager();
    $level = Docebo::user()->getUserLevelId(getLogUserId());
    $admin_cond = '';
    switch ($level) {
        case ADMIN_GROUP_GODADMIN:
        case ADMIN_GROUP_ADMIN:
            break;
        case ADMIN_GROUP_PUBLICADMIN:
        case ADMIN_GROUP_USER:
        default:
            $admin_cond .= " AND t1.id_creator=" . getLogUserId();
            break;
    }
    $query = "SELECT t1.*, t3.userid as report_owner, t2.filter_name as report_name, " . "COUNT(t4.id_user) as num_users FROM " . $GLOBALS['prefix_lms'] . "_report_schedule as t1, " . $GLOBALS['prefix_lms'] . "_report_filter as t2, " . $GLOBALS['prefix_fw'] . "_user as t3, " . $GLOBALS['prefix_lms'] . "_report_schedule_recipient as t4 " . "WHERE t1.id_report_filter=t2.id_filter AND t3.idst=t1.id_creator " . "AND t4.id_report_schedule=t1.id_report_schedule " . $admin_cond . " " . ($idrep ? "AND t1.id_report_filter={$idrep} " : '') . "GROUP BY t1.id_report_schedule";
    $lang =& DoceboLanguage::createInstance('report', 'framework');
    $output = '';
    $tb = new Table(Get::sett('visu_course'));
    $tb->initNavBar('ini', 'button');
    $col_type = array('align_center', 'align_center', 'align_center', 'align_center', 'align_center', 'align_center');
    //,'image','image');
    $col_content = array($lang->def('_NAME'), $lang->def('_TAB_REP_CREATOR'), $lang->def('_CREATION_DATE'), $lang->def('_SEND'), $lang->def('_RECIPIENTS'), $lang->def('_ACTIVE'));
    if ($can_mod) {
        $col_type[] = 'image';
        $col_type[] = 'image';
        $col_content[] = '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD', 'standard') . '" title="' . $lang->def('_MOD') . '" />';
        $col_content[] = '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL', 'standard') . '" title="' . $lang->def('_DEL') . '" />';
    }
    $tb->setColsStyle($col_type);
    $tb->addHead($col_content);
    $res = sql_query($query);
    if ($res) {
        while ($row = mysql_fetch_assoc($res)) {
            $id = $row['id_report_schedule'];
            $recipients_link = "ajax.adm_server.php?mn=report&amp;plf=lms&amp;op=show_recipients_window&amp;idsched=" . $id;
            $mod_link = '<a href="index.php?modname=report&amp;op=sched_mod&amp;id_sched=' . $id . '&amp;idrep=' . $idrep . '" ' . ' title="' . $lang->def('_MOD') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" />' . '</a>';
            $rem_link = '<a href="index.php?modname=report&amp;op=schedulelist&amp;idrep=' . $idrep . '&amp;action=sched_rem&amp;id_sched=' . $id . '" ' . ' title="' . $lang->def('_DEL') . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" />' . '</a>';
            $enabled = '<image class="handover" src="' . getPathImage('lms') . 'standard/' . ($row['enabled'] == 1 ? 'publish.png' : 'unpublish.png') . '" ' . 'onclick="enable_schedulation(this, ' . $row['id_report_schedule'] . ');" />' . '<input type="hidden" id="enable_value_' . $row['id_report_schedule'] . '" ' . 'value="' . ($row['enabled'] == 1 ? '0' : '1') . '" />';
            $num_users = '<a href="' . $recipients_link . '" title="' . $lang->def('_RECIPIENTS') . '" ' . 'class="" id="show_recipients_' . $id . '">' . $row['num_users'] . '</a>';
            $tb_content = array(_SCHED_KEY_NAME => $row['name'], _SCHED_KEY_CREATOR => $acl_man->relativeId($row['report_owner']), _SCHED_KEY_CREATION => Format::date($row['creation_date']), _SCHED_KEY_PERIOD => get_period_text($row['period']), _SCHED_KEY_NUMUSER => $num_users, _SCHED_KEY_ENABLED => $enabled);
            if ($can_mod) {
                $tb_content[_SCHED_KEY_MOD] = $mod_link;
                $tb_content[_SCHED_KEY_REM] = $rem_link;
            }
            $tb->addBody($tb_content);
        }
    }
    $tb->addActionAdd('
		<a href="index.php?modname=report&amp;op=report_schedule&amp;idrep=' . $idrep . '">' . '<img src="' . getPathImage() . 'standard/add.png" ' . 'title="' . $lang->def('_ADD') . '" /> ' . $lang->def('_ADD') . '</a>');
    $output .= $tb->getTable();
    $output .= '<script type="text/javascript">
		YAHOO.util.Event.onDOMReady(function() {
			var links = YAHOO.util.Selector.query("a[id^=show_recipients_]");
			YAHOO.util.Event.addListener(links, "click", function(e) {
				CreateDialog("show_recipients_dialog", {
					width: "600px",
					modal: true,
					close: true,
					visible: false,
					fixedcenter: false,
					constraintoviewport: false,
					draggable: true,
					hideaftersubmit: true,
					isDynamic: true,
					confirmOnly: true,
					ajaxUrl: this.href
				}).call(this, e);
			});
		});
	</script>';
    return $output;
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:78,代码来源:report_schedule.php

示例9: webpages

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]');
    }
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:83,代码来源:webpages.php

示例10: assignMetaCertificate

function assignMetaCertificate()
{
    checkPerm('mod');
    require_once _base_ . '/lib/lib.table.php';
    $lang =& DoceboLanguage::createInstance('certificate', 'lms');
    $id_certificate = importVar('id_certificate', true, 0);
    $_SESSION['meta_certificate'] = array();
    $out =& $GLOBALS['page'];
    $out->setWorkingZone('content');
    $tb = new Table(Get::sett('visuItem'), $lang->def('_META_CERTIFICATE_ASSIGN_CAPTION'), $lang->def('_META_CERTIFICATE_ASSIGN_CAPTION'));
    $tb->initNavBar('ini', 'link');
    $tb->setLink("index.php?modname=meta_certificate&amp;op=assign");
    $ini = $tb->getSelectedElement();
    $query = "SELECT idMetaCertificate, title, description" . " FROM " . $GLOBALS['prefix_lms'] . "_certificate_meta" . " WHERE idCertificate = '" . $id_certificate . "'";
    $result = sql_query($query);
    $type_h = array('', '', 'image', 'image', 'image', 'image');
    $cont_h = array($lang->def('_NAME'), $lang->def('_DESCRIPTION'), '<img src="' . getPathImage() . 'standard/view.png" alt="' . $lang->def('_DETAILS') . '" title="' . $lang->def('_DETAILS') . '" />', '<img src="' . getPathImage() . 'standard/modelem.png" alt="' . $lang->def('_MOD') . '" title="' . $lang->def('_MOD') . '" />', '<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') . '"" />');
    $tb->setColsStyle($type_h);
    $tb->addHead($cont_h);
    while (list($id_meta_certificate, $title, $description) = sql_fetch_row($result)) {
        $tb->addBody(array(stripslashes($title), stripslashes($description), '<a href="index.php?modname=meta_certificate&amp;op=viewdetails&amp;idmeta=' . $id_meta_certificate . '&amp;id_certificate=' . $id_certificate . '"><img src="' . getPathImage() . 'standard/view.png" alt="' . $lang->def('_DETAILS') . '" title="' . $lang->def('_DETAILS') . '" /></a>', '<a href="index.php?modname=meta_certificate&amp;op=modassignment&amp;idmeta=' . $id_meta_certificate . '&amp;id_certificate=' . $id_certificate . '"><img src="' . getPathImage() . 'standard/modelem.png" alt="' . $lang->def('_MOD') . '" title="' . $lang->def('_MOD') . '" /></a>', '<a href="index.php?modname=meta_certificate&amp;op=modassignmetacertificate&amp;idmeta=' . $id_meta_certificate . '&amp;id_certificate=' . $id_certificate . '"><img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_MOD') . '" alt="' . $lang->def('_MOD') . '" /></a>', '<a href="index.php?modname=meta_certificate&amp;op=delassignmetacertificate&amp;idmeta=' . $id_meta_certificate . '&amp;id_certificate=' . $id_certificate . '"><img src="' . getPathImage() . 'standard/delete.png" title="' . $lang->def('_DEL') . '" alt="' . $lang->def('_DEL') . '"" /></a>'));
    }
    require_once _base_ . '/lib/lib.dialog.php';
    setupHrefDialogBox('a[href*=delassignmetacertificate]');
    $tb->addActionAdd('<a class="new_element_link" href="index.php?modname=meta_certificate&amp;op=new_assign&amp;id_certificate=' . $id_certificate . '" title="' . $lang->def('_NEW_ASSING_META_CERTIFICATE') . '">' . $lang->def('_NEW_ASSING_META_CERTIFICATE') . '</a>');
    $out->add(getTitleArea($lang->def('_TITLE_META_CERTIFICATE_ASSIGN'), 'certificate') . '<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;
            case "err_info":
                $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                break;
            case "err_mod_info":
                $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                break;
            case "error_mod_assign":
                $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                break;
        }
    }
    $out->add($tb->getTable() . $tb->getNavBar($ini, sql_num_rows($result)) . getBackUi('index.php?modname=meta_certificate&amp;op=meta_certificate', $lang->def('_BACK')) . '</div>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:50,代码来源:meta_certificate.php

示例11: pathelem


//.........这里部分代码省略.........
             $num_course = 0;
         } else {
             $num_course = count($courses[$id_slot]);
             $all_courses = true;
             if (Docebo::user()->getUserLevelId() != ADMIN_GROUP_GODADMIN) {
                 $all_courses = false;
                 require_once _base_ . '/lib/lib.preference.php';
                 $adminManager = new AdminPreference();
                 $admin_courses = $adminManager->getAdminCourse(Docebo::user()->getIdST());
                 $all_course = false;
                 if (isset($admin_courses['course'][0])) {
                     $all_course = true;
                 } elseif (isset($admin_courses['course'][-1])) {
                     require_once _lms_ . '/lib/lib.catalogue.php';
                     $cat_man = new Catalogue_Manager();
                     $user_catalogue = $cat_man->getUserAllCatalogueId(Docebo::user()->getIdSt());
                     if (count($user_catalogue) > 0) {
                         $courses = array(0);
                         foreach ($user_catalogue as $id_cat) {
                             $catalogue_course =& $cat_man->getCatalogueCourse($id_cat, true);
                             $courses = array_merge($courses, $catalogue_course);
                         }
                         foreach ($courses as $id_course) {
                             if ($id_course != 0) {
                                 $admin_courses['course'][$id_course] = $id_course;
                             }
                         }
                     } elseif (Get::sett('on_catalogue_empty', 'off') == 'on') {
                         $all_courses = true;
                     }
                 } else {
                     $array_courses = array();
                     $array_courses = array_merge($array_courses, $admin_courses['course']);
                     if (!empty($admin_courses['coursepath'])) {
                         require_once _lms_ . '/lib/lib.coursepath.php';
                         $path_man = new CoursePath_Manager();
                         $coursepath_course =& $path_man->getAllCourses($admin_courses['coursepath']);
                         $array_courses = array_merge($array_courses, $coursepath_course);
                     }
                     if (!empty($admin_courses['catalogue'])) {
                         require_once _lms_ . '/lib/lib.catalogue.php';
                         $cat_man = new Catalogue_Manager();
                         foreach ($admin_courses['catalogue'] as $id_cat) {
                             $catalogue_course =& $cat_man->getCatalogueCourse($id_cat, true);
                             $array_courses = array_merge($array_courses, $catalogue_course);
                         }
                     }
                     $admin_courses['course'] = array_merge($admin_courses['course'], $array_courses);
                 }
             }
             while (list($id_item, $prerequisites) = each($courses[$id_slot])) {
                 $cont = array($course_info[$id_item]['code'], $course_info[$id_item]['name']);
                 if ($prerequisites != '') {
                     $cont[] = coursePathSubstPrer($prerequisites, $course_info);
                 } else {
                     $cont[] = '';
                 }
                 if ($mod_perm) {
                     if (in_array($id_item, $admin_courses['course']) || $all_courses) {
                         if ($i != $num_course - 1) {
                             $cont[] = '<a href="index.php?modname=coursepath&amp;op=downelem&amp;id_path=' . $id_path . '&amp;id_course=' . $id_item . '&amp;id_slot=' . $id_slot . '" ' . 'title="' . $lang->def('_MOVE_DOWN') . ' : ' . $course_info[$id_item]['name'] . '">' . Get::img('standard/down.png', Lang::t('_DOWN', 'coursepath')) . '</a>';
                         } else {
                             $cont[] = '';
                         }
                         if ($i != 0) {
                             $cont[] = '<a href="index.php?modname=coursepath&amp;op=upelem&amp;id_path=' . $id_path . '&amp;id_course=' . $id_item . '&amp;id_slot=' . $id_slot . '" ' . 'title="' . $lang->def('_MOVE_UP') . ' : ' . $course_info[$id_item]['name'] . '">' . Get::img('standard/up.png', Lang::t('_UP', 'coursepath')) . '</a>';
                         } else {
                             $cont[] = '';
                         }
                         $cont[] = '<a href="index.php?modname=coursepath&amp;op=modprerequisites&amp;id_path=' . $id_path . '&amp;id_course=' . $id_item . '&amp;id_slot=' . $id_slot . '" ' . 'title="' . $lang->def('_MOD') . ' : ' . $course_info[$id_item]['name'] . '">' . Get::img('standard/moderate.png', Lang::t('_MOD', 'coursepath') . ' : ' . $course_info[$id_item]['name']) . '</a>';
                         $cont[] = '<a href="index.php?modname=coursepath&amp;op=delcoursepath&amp;id_path=' . $id_path . '&amp;id_course=' . $id_item . '&amp;id_slot=' . $id_slot . '" ' . 'title="' . $lang->def('_DEL') . ' : ' . $course_info[$id_item]['name'] . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . ' : ' . $course_info[$id_item]['name'] . '" /></a>';
                     } else {
                         $cont[] = '';
                         $cont[] = '';
                         $cont[] = '';
                         $cont[] = '';
                     }
                 }
                 $tb_path->addBody($cont);
                 $i++;
             }
         }
         // add link
         if ($mod_perm) {
             $tb_path->addActionAdd('<a class="ico-wt-sprite subs_import" href="index.php?modname=coursepath&amp;op=importcourse&amp;load=1&amp;id_path=' . $id_path . '&amp;id_slot=' . $id_slot . '" ' . 'title="' . $lang->def('_IMPORT_COURSE') . '">' . '<span>' . $lang->def('_IMPORT_COURSE') . '</span>' . '</a>');
         }
         $GLOBALS['page']->add($tb_path->getTable() . '<br />', 'content');
         $slot_number++;
     }
     /*
     $GLOBALS['page']->add(
     	'<a href="index.php?modname=coursepath&amp;op=modslot&amp;id_path='.$id_path.'" '
     		.'title="'.$lang->def('_NEW_SLOT_TITLE').'">'
     		.'<img src="'.getPathimage().'standard/add.png" alt="'.$lang->def('_ADD').'" />'
     		.$lang->def('_NEW_SLOT')
     	.'</a>'
     ,'content');
     */
     $GLOBALS['page']->add(getBackUi('index.php?modname=coursepath&amp;op=pathlist', $lang->def('_BACK')) . '</div>', 'content');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:101,代码来源:coursepath.php

示例12: showLog

function showLog()
{
    require_once _base_ . '/lib/lib.form.php';
    require_once _base_ . '/lib/lib.table.php';
    $lang =& DoceboLanguage::createInstance('conference', 'lms');
    $id = Get::req('id', DOTY_INT, 0);
    $conference = new Conference_Manager();
    $room_info = $conference->roomInfo($id);
    $acl_man =& Docebo::user()->getAclManager();
    cout(getTitleArea('') . '<div class="std_block">', 'content');
    $room_log = array();
    switch ($room_info['room_type']) {
        case 'teleskill':
            require_once $GLOBALS['where_scs'] . '/lib/lib.teleskill.php';
            $teleskill = new Teleskill_Management();
            $roomid = $teleskill->getRoomId($id);
            if (isset($_POST['update_log'])) {
                $teleskill->updateRoomLog($roomid);
            }
            $room_log = $teleskill->getRoomLog($roomid);
            break;
    }
    $tb = new Table(0, $lang->def('_ROOM_LOG'), $lang->def('_ROOM_LOG'));
    $cont_h = array($lang->def('_FULLNAME'), $lang->def('_ROLE'), $lang->def('_DATE'), $lang->def('_TOTAL_TIME'), $lang->def('_NUMBER_OF_ACCESS'));
    $type_h = array('', '', '', '', '');
    $tb->setColsStyle($type_h);
    $tb->addHead($cont_h);
    foreach ($room_log as $log_row) {
        $user_info = $acl_man->getUser($log_row['idUser'], false);
        $cont = array();
        if ($user_info[ACL_INFO_FIRSTNAME] !== '' && $user_info[ACL_INFO_LASTNAME]) {
            $cont[] = $user_info[ACL_INFO_FIRSTNAME] . ' ' . $user_info[ACL_INFO_LASTNAME] . ' (' . $acl_man->relativeId($user_info[ACL_INFO_USERID]) . ')';
        } elseif ($user_info[ACL_INFO_FIRSTNAME] !== '') {
            $cont[] = $user_info[ACL_INFO_FIRSTNAME] . ' (' . $acl_man->relativeId($user_info[ACL_INFO_USERID]) . ')';
        } elseif ($user_info[ACL_INFO_LASTNAME] !== '') {
            $cont[] = $user_info[ACL_INFO_LASTNAME] . ' (' . $acl_man->relativeId($user_info[ACL_INFO_USERID]) . ')';
        } else {
            $cont[] = $acl_man->relativeId($user_info[ACL_INFO_USERID]);
        }
        $cont[] = $log_row['role'] == 1 ? $lang->def('_USER_ROLE') : $lang->def('_TUTOR_ROLE');
        $cont[] = Format::date($log_row['date'], 'datetime');
        $duration_s = 0;
        $duration_m = 0;
        $duration_h = 0;
        $duration = $log_row['duration'];
        $duration_s = $duration % 60;
        $duration -= $duration_s;
        if ($duration) {
            $duration_m = $duration % 3600 / 60;
            $duration -= $duration_m * 60;
            if ($duration) {
                $duration_h = $duration / 3600;
            }
        }
        $cont[] = $duration_h . ' ' . $lang->def('_HOURS') . ' ' . $duration_m . ' ' . $lang->def('_MINUTS') . ' ' . $duration_s . ' ' . $lang->def('_SECONDS');
        $cont[] = $log_row['access'];
        $tb->addBody($cont);
    }
    $tb->addActionAdd(Form::getButton('update_log', 'update_log', $lang->def('_UPDATE_LOG')));
    cout(Form::openForm('log_table', 'index.php?modname=conference&amp;op=log&amp;id=' . $id) . $tb->getTable() . Form::closeForm() . '<br/>' . getBackUi('index.php?modname=conference&amp;op=history', $lang->def('_BACK')), 'content');
    cout('</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:62,代码来源:conference.php

示例13: modrule

function modrule(&$url)
{
    checkPerm('mod');
    YuiLib::load(array('animation' => 'animation-min.js', 'dragdrop' => 'dragdrop-min.js', 'button' => 'button-min.js', 'container' => 'container-min.js', 'my_window' => 'windows.js'), array('container/assets/skins/sam' => 'container.css', 'button/assets/skins/sam' => 'button.css'));
    addJs($GLOBALS['where_lms_relative'] . '/admin/modules/preassessment/', 'ajax.preassessment.js');
    $id_assessment = importVar('id_assess', true, 0);
    require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
    $course_man = new Man_Course();
    require_once $GLOBALS['where_lms'] . '/lib/lib.coursepath.php';
    $coursepath_man = new CoursePath_Manager();
    require_once $GLOBALS['where_lms'] . '/lib/lib.preassessment.php';
    $assess_man = new AssessmentList();
    $rule_man = new AssessmentRule();
    $lang =& DoceboLanguage::createInstance('preassessment');
    // recover assessment
    $assessment = $assess_man->getAssessment($id_assessment);
    $rule_list = $rule_man->getAllRule($id_assessment);
    // recover new type one
    require_once _base_ . '/lib/lib.table.php';
    $tb = new Table(0, $lang->def('_CAPTION_PREASSESSMENT_RULE'), $lang->def('_SUMMARY_PREASSESSMENT_RULE'));
    // table header --------------------------------------------------------------------------------------------
    $cont_h = array($lang->def('_RULE_TEXT'), $lang->def('_RULE_ACTION'), '<img src="' . getPathImage('lms') . 'standard/modelem.png" alt="' . $lang->def('_ALT_ADD_EFFECT') . '" />', '<img src="' . getPathImage('lms') . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" />', '<img src="' . getPathImage('lms') . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" />');
    $type_h = array('nowrap', '', 'image', 'image', 'image');
    $usedef = 1;
    $tb->addHead($cont_h, $type_h);
    while ($rule = $rule_man->fetch_row($rule_list)) {
        $id = $rule[RULE_ID];
        if ($rule[RULE_TYPE] == RULE_DEFAULT) {
            $usedef = 0;
        }
        $rule_name = $rule_man->resolveRuleTypePhrase($lang, $rule);
        $cont = array($rule_name);
        $effect = '';
        $effects = $rule_man->parseEffects($rule[RULE_EFFECT]);
        if (count($effects['course']) > 0) {
            $effect .= $lang->def('_COURSES') . ': ' . $course_man->listCourseName($effects['course']);
        }
        if (count($effects['coursepath']) > 0) {
            if (count($effects['course']) > 0) {
                $effect .= '<br/>';
            }
            $path_list =& $coursepath_man->getNames($effects['coursepath']);
            $effect .= $lang->def('_COURSEPATH') . ': ' . implode(', ', $path_list);
        }
        if (count($effects['course']) == 0 && count($effects['coursepath']) == 0) {
            $effect = $lang->def('_DO_NOTHING');
        }
        $cont[] = $effect;
        $cont[] = '<a href="' . $url->getUrl('op=assignrule&id_rule=' . $id . '&load=1') . '" title=""' . $lang->def('_ADD_EFFECT') . '">' . '<img src="' . getPathImage('lms') . 'standard/modelem.png" alt="' . $lang->def('_ALT_ADD_EFFECT') . '" />' . '</a>';
        $cont[] = '<a href="' . $url->getUrl('op=modrulet&id_rule=' . $id) . '" title="' . $lang->def('_MOD_TITLE') . '"' . '" onclick="mod_rule_mask(\'' . $id_assessment . '\', \'' . $id . '\'); return false;"' . '>' . '<img src="' . getPathImage('lms') . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" />' . '</a>';
        $cont[] = '<a href="' . $url->getUrl('op=delrule&id_rule=' . $id) . '" title="' . $lang->def('_DEL') . ': ' . $rule_name . '"' . '	onclick="del_assessment_rule(\'' . $id . '\', \'' . strip_tags($rule_name) . '\'); return false;"' . '>' . '<img src="' . getPathImage('lms') . 'standard/delete.png" alt="' . $lang->def('_DEL') . '" />' . '</a>';
        $tb->addBody($cont);
    }
    require_once _base_ . '/lib/lib.dialog.php';
    setupHrefDialogBox('a[href*=delrule]');
    $tb->addActionAdd('<a class="new_element_link" ' . ' 	onclick="add_rule_mask(\'' . $id_assessment . '\', \'' . $usedef . '\'); return false;"' . ' id="add_rule" ' . 'href="#" ' . '>' . $lang->def('_ADD_RULE') . '</a>');
    $GLOBALS['page']->add('<script type="text/javascript">' . 'YAHOO.util.Event.onDOMReady( function(e) {' . ' setup_assessment(); ' . ' YAHOO.util.Event.addListener("add_rule", "click", function(e) { add_rule_mask(\'' . $id_assessment . '\', \'' . $usedef . '\'); });' . '});' . '</script>', 'page_head');
    $GLOBALS['page']->add(getTitleArea(array($url->getUrl() => $lang->def('_ASSESSMENT'), $lang->def('_RULES') . ': ' . $assessment['name']), 'preassessment') . '<div class="std_block">' . getInfoUi($lang->def('_RULE_OVERLAPPED')), 'content');
    if (isset($_GET['result'])) {
        $GLOBALS['page']->add(guiResultStatus($lang, $_GET['result']), 'content');
    }
    $GLOBALS['page']->add($tb->getTable(), 'content');
    $GLOBALS['page']->add(getBackUi($url->getUrl(), $lang->def('_BACK')) . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:64,代码来源:preassessment.php

示例14: classroom

 function classroom()
 {
     checkPerm('view');
     require_once _base_ . '/lib/lib.form.php';
     require_once _base_ . '/lib/lib.table.php';
     $mod_perm = true;
     // create a language istance for module admin_classroom
     $lang =& DoceboLanguage::createInstance('admin_classroom', 'lms');
     $out =& $GLOBALS['page'];
     $out->setWorkingZone('content');
     $tb = new Table(Get::sett('visuItem'), $lang->def('_CLASSROOM_CAPTION'), $lang->def('_CLASSROOM_SUMMARY'));
     $tb->initNavBar('ini', 'link');
     $tb->setLink('index.php?modname=reservation&amp;op=classroom&amp;id_course=' . $_SESSION['idCourse']);
     $ini = $tb->getSelectedElement();
     //search query of classrooms
     $query_classroom = "\r\n\t\tSELECT idClassroom, name, description\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_classroom\r\n\t\tORDER BY name\r\n\t\tLIMIT {$ini}," . Get::sett('visuItem');
     $query_classroom_tot = "\r\n\t\tSELECT COUNT(*)\r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_classroom";
     $re_classroom = sql_query($query_classroom);
     list($tot_classroom) = sql_fetch_row(sql_query($query_classroom_tot));
     $type_h = array('', 'news_short_td', "image", "image");
     $cont_h = array($lang->def('_NAME'), $lang->def('_DESCRIPTION'));
     if ($mod_perm) {
         $cont_h[] = '<img src="' . getPathImage() . 'standard/edit.png" title="' . $lang->def('_TITLE_MOD_CLASSROOM') . '" ' . '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($idClassroom, $name, $descr) = sql_fetch_row($re_classroom)) {
         $cont = array($name, $descr);
         if ($mod_perm) {
             $cont[] = '<a href="index.php?modname=reservation&amp;op=modclassroom&amp;idClassroom=' . $idClassroom . '" ' . 'title="' . $lang->def('_TITLE_MOD_CLASSROOM') . ' : ' . $name . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . ' : ' . $name . '" /></a>';
             $cont[] = '<a href="index.php?modname=reservation&amp;op=delclassroom&amp;idClassroom=' . $idClassroom . '" ' . 'title="' . $lang->def('_DEL') . ' : ' . $name . '">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . $lang->def('_DEL') . ' : ' . $name . '" /></a>';
         }
         $tb->addBody($cont);
     }
     if ($mod_perm) {
         $tb->addActionAdd('<a href="index.php?modname=reservation&amp;op=addclassroom" title="' . $lang->def('_TITLE_NEW_CLASSROOM') . '">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def('_ADD') . '" />' . $lang->def('_NEW_CLASSROOM') . '</a>');
     }
     $out->add(getTitleArea($lang->def('_TITLE_CLASSROOM'), 'classroom', $lang->def('_ALT_TITLE_CLASSROOM')) . '<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(getBackUi('index.php?modname=reservation&amp;op=reservation&amp;active_tab=subscribed_user', $lang->def('_BACK')));
     $out->add($tb->getTable() . $tb->getNavBar($ini, $tot_classroom) . '</div>');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:57,代码来源:reservation.php

示例15: news

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>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:72,代码来源:internal_news.php


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