• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getResultUi函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getResultUi函数的典型用法代码示例。如果您正苦于以下问题:PHP getResultUi函数的具体用法?PHP getResultUi怎么用?PHP getResultUi使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: loadBody

 function loadBody()
 {
     require_once $GLOBALS['where_framework'] . '/modules/' . $this->module_name . '/' . $this->module_name . '.php';
     $out =& $this->get_out();
     $lang =& $this->get_lang();
     if (isset($_GET['addconnector']) && !isset($_POST['cancel'])) {
         require_once $GLOBALS['where_framework'] . '/lib/lib.iotask.php';
         $connMgr =& $this->get_connMgr();
         $filename = key($_POST['file']);
         if ($connMgr->add_connector($filename)) {
             $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
         } else {
             $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')) . $connMgr->get_last_error());
         }
     }
     if (isset($_GET['addconnectionok']) && !isset($_POST['cancel'])) {
         $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
     }
     if (isset($_GET['addtaskok']) && !isset($_POST['cancel'])) {
         $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
     }
     if (isset($_GET['deleteconnectionok']) && !isset($_POST['cancel'])) {
         $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
     } elseif (isset($_GET['deleteconnectionerror']) && !isset($_POST['cancel'])) {
         $out->add(getErrorUi($lang->def('_ERR_FAIL_DELETE_CONNECTOR')));
     }
     if (isset($_GET['deletetaskok']) && !isset($_POST['cancel'])) {
         $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
     } elseif (isset($_GET['deletetakserror']) && !isset($_POST['cancel'])) {
         $out->add(getErrorUi($lang->def('_ERR_FAIL_DELETE_TASK')));
     }
     if (isset($_POST['action'])) {
         switch (key($_POST['action'])) {
             case 'new_connector':
                 ioTask_UIConnectorNew($this);
                 break;
             case 'run_task':
                 ioTask_UITaskRun($this, current($_POST['action']), key($_POST['action']));
                 break;
             case 'new_task':
             case 'edit_task':
                 ioTask_UITaskNew($this, current($_POST['action']), key($_POST['action']));
                 break;
             case 'delete_task':
                 ioTask_UITaskDelete($this, current($_POST['action']), key($_POST['action']));
                 break;
             case 'new_connection':
             case 'edit_connection':
                 ioTask_UIConnectionNew($this, current($_POST['action']), key($_POST['action']));
                 break;
             case 'delete_connection':
                 ioTask_UIConnectionDelete($this, current($_POST['action']), key($_POST['action']));
                 break;
         }
     } elseif (isset($_GET['addconnection']) && !isset($_POST['cancel'])) {
         ioTask_UIConnectionNew($this, '', '');
     } else {
         ioTask_UITab($this, $GLOBALS['op']);
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:60,代码来源:class.iotask.php


示例2: adminConf

 function adminConf()
 {
     require_once _base_ . '/lib/lib.form.php';
     $lang =& DoceboLanguage::createInstance('admin_config', 'scs');
     $out =& $GLOBALS['page'];
     $out->setWorkingZone('content');
     $out->add(getTitleArea($lang->def('_ADMIN_CONF'), 'admin_conf') . '<div class="std_block">');
     if (isset($_POST['save'])) {
         $query_update = "UPDATE " . $GLOBALS['prefix_scs'] . "_rules_admin SET ";
         if (isset($_POST['rules'])) {
             while (list($var_name, $new_value) = each($_POST['rules'])) {
                 $query_update .= " {$var_name} = '" . $new_value . "',";
             }
             $re = sql_query(substr($query_update, 0, -1));
         }
         if ($re) {
             $out->add(getResultUi($lang->def('_MOD_OK')));
         } else {
             $out->add(getErrorUi($lang->def('_MOD_ERR')));
         }
     }
     $query_rules_admin = "\r\n\tSELECT server_status, \r\n\t\tenable_recording_function, enable_advice_insert, enable_write, enable_chat_recording, \r\n\t\tenable_private_subroom, enable_public_subroom, \r\n\t\tenable_drawboard_watch, enable_drawboard_write, \r\n\t\tenable_audio, enable_webcam, enable_stream_watch, enable_strem_write, enable_remote_desktop \r\n\tFROM " . $GLOBALS['prefix_scs'] . "_rules_admin";
     $re_rules_admin = sql_query($query_rules_admin);
     $rules = mysql_fetch_array($re_rules_admin);
     $out->add(Form::openForm('rules_admin', 'index.php?modname=admin_configuration&amp;op=conf') . Form::openElementSpace() . Form::getOpenCombo($lang->def('_SERVER_STATUS')) . Form::getInputRadio('rules_server_status_yes', 'rules[server_status]', 'yes', $rules['server_status'] == 'yes', '') . '&nbsp;' . Form::getLabel('', $lang->def('_YES'), 'label_padded') . '&nbsp;' . Form::getInputRadio('rules_server_status_no', 'rules[server_status]', 'no', $rules['server_status'] == 'no', '') . '&nbsp;' . Form::getLabel('', $lang->def('_NO'), 'label_padded') . '&nbsp;' . Form::getCloseCombo() . maskMultiple('enable_recording_function', $rules['enable_recording_function']) . maskMultiple('enable_advice_insert', $rules['enable_advice_insert']) . maskMultiple('enable_write', $rules['enable_write']) . maskMultiple('enable_chat_recording', $rules['enable_chat_recording']) . maskMultiple('enable_private_subroom', $rules['enable_private_subroom']) . maskMultiple('enable_public_subroom', $rules['enable_public_subroom']) . maskMultiple('enable_drawboard_watch', $rules['enable_drawboard_watch']) . maskMultiple('enable_drawboard_write', $rules['enable_drawboard_write']) . maskMultiple('enable_audio', $rules['enable_audio']) . maskMultiple('enable_webcam', $rules['enable_webcam']) . maskMultiple('enable_stream_watch', $rules['enable_stream_watch']) . maskMultiple('enable_strem_write', $rules['enable_strem_write']) . maskMultiple('enable_remote_desktop', $rules['enable_remote_desktop']) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('save', 'save', $lang->def('_SAVE')) . Form::getButton('undo', 'undo', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::closeForm());
     $out->add('</div>');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:admin_configuration.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: groupCodeList

function groupCodeList()
{
    require_once _base_ . '/lib/lib.form.php';
    require_once _base_ . '/lib/lib.table.php';
    $lang =& DoceboLanguage::createInstance('code');
    $code_manager = new CodeManager();
    $tot_group_code = $code_manager->getCodeGroupNumber();
    cout(getTitleArea($lang->def('_CODE')) . '<div class="std_block">');
    $result = Get::req('result', DOTY_STRING, '');
    if (isset($_GET['activation'])) {
        $query = "UPDATE " . $GLOBALS['prefix_fw'] . "_setting" . " SET param_value = 'on'" . " WHERE param_name = 'use_code_module'";
        if (sql_query($query)) {
            Util::jump_to('index.php?modname=code&amp;op=list&result=ok');
        } else {
            Util::jump_to('index.php?modname=code&amp;op=list&result=err');
        }
    }
    if (Get::cfg('use_code_module') === 'off') {
        cout(getResultUi('<a href="index.php?modname=code&amp;op=list&amp;activation=true">' . $lang->def('_MODULE_NOT_ACTIVATED') . '</a>'));
    }
    switch ($result) {
        case 'ok':
            UIFeedback::info($lang->def('_OPERATION_SUCCESSFUL'));
            break;
        case 'err':
            UIFeedback::error($lang->def('_OPERATION_FAILURE'));
            break;
    }
    if ($tot_group_code) {
        $tb = new Table('20');
        $tb->initNavBar('ini', 'link');
        $ini = $tb->getSelectedElement();
        $cont_h = array($lang->def('_TITLE'), $lang->def('_DESCRIPTION'), $lang->def('_CODE_USED_NUMBER'), Get::sprite('subs_csv', Lang::t('_CODE', 'course')), Get::sprite('subs_add', Lang::t('_GENERATE_CODE', 'course')), Get::sprite('subs_import', Lang::t('_IMPORT', 'course')), Get::sprite('subs_elem', Lang::t('_COURSES', 'course')), Get::sprite('subs_users', Lang::t('_ASSIGN_USERS', 'course')), Get::sprite('subs_mod', Lang::t('_MOD', 'course')), Get::sprite('subs_del', Lang::t('_DEL', 'course')));
        $type_h = array('', '', 'min-cell', 'image', 'image', 'image', 'image', 'image', 'image', 'image');
        $tb->setColsStyle($type_h);
        $tb->addHead($cont_h);
        $array_group_code = $code_manager->getCodeGroupsList($ini);
        foreach ($array_group_code as $group_code_info) {
            $cont = array();
            $cont[] = $group_code_info['title'];
            $cont[] = $group_code_info['description'];
            $cont[] = $group_code_info['code_used'];
            $cont[] = '<a href="index.php?modname=code&amp;op=code_list&amp;id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_csv', Lang::t('_CODE', 'course')) . '</a>';
            $cont[] = '<a href="index.php?modname=code&amp;op=generate_code&amp;id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_add', Lang::t('_GENERATE_CODE', 'course')) . '</a>';
            $cont[] = '<a href="index.php?modname=code&amp;op=import_code&amp;id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_import', Lang::t('_IMPORT', 'course')) . '</a>';
            $cont[] = '<a href="index.php?modname=code&amp;op=assign_course&amp;id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_elem' . ($group_code_info['course_associated'] ? '' : '_grey'), Lang::t('_COURSES', 'course')) . '</a>';
            $cont[] = '<a href="index.php?modname=code&amp;op=assign_tree&amp;id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_users' . ($group_code_info['folder_associated'] ? '' : '_grey'), Lang::t('_ASSIGN_USERS', 'course')) . '</a>';
            $cont[] = '<a href="index.php?modname=code&amp;op=mod_group_code&amp;id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_mod', Lang::t('_MOD', 'course')) . '</a>';
            $cont[] = '<a href="index.php?modname=code&amp;op=del_group_code&amp;id_code_group=' . $group_code_info['id_code_group'] . '">' . Get::sprite('subs_del', Lang::t('_DEL', 'course')) . '</a>';
            $tb->addBody($cont);
        }
        $tb->addActionAdd('<a href="index.php?modname=code&amp;op=add_group_code">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def('_ADD') . '" />' . $lang->def('_ADD') . '</a>');
        cout($tb->getTable() . $tb->getNavBar($ini, $tot_group_code));
        setupHrefDialogBox('a[href*=del_group_code]');
    } else {
        cout($lang->def('_NO_CONTENT') . '<br/>' . '<a href="index.php?modname=code&amp;op=add_group_code">' . '<img src="' . getPathImage() . 'standard/add.png" alt="' . $lang->def('_ADD') . '" />' . $lang->def('_ADD') . '</a>');
    }
    cout('</div>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:59,代码来源:code.php


示例5: showhtml

function showhtml()
{
    checkPerm('view');
    $lang =& DoceboLanguage::createInstance('htmlfront', 'lms');
    $query = "\r\n\tSELECT textof\r\n\tFROM " . $GLOBALS['prefix_lms'] . "_htmlfront \r\n\tWHERE id_course = '" . $_SESSION['idCourse'] . "'";
    $re_htmlfront = sql_query($query);
    list($textof) = sql_fetch_row($re_htmlfront);
    $GLOBALS['page']->add(getTitleArea($lang->def('_HTMLFRONT'), 'htmlfront') . '<div class="std_block">' . (isset($_GET['saveok']) ? getResultUi($lang->def('_OPERATION_SUCCESSFUL')) : '') . '<div class="htmlfront_container">' . $textof . '</div>' . (checkPerm('mod', true) ? '<p class="table-container-below">' . '<a class="infomod" href="index.php?modname=htmlfront&amp;op=edithtml" title="' . $lang->def('_MOD') . '">' . '<img src="' . getPathImage() . 'standard/edit.png" alt="' . $lang->def('_MOD') . '" />&nbsp;' . $lang->def('_MOD') . '</a></p>' : '') . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:htmlfront.php


示例6: config

function config()
{
    checkPerm('view');
    require_once _base_ . '/lib/lib.tab.php';
    require_once _base_ . '/lib/lib.form.php';
    require_once _adm_ . '/class/class.conf.php';
    $lang =& DoceboLanguage::createInstance('configuration', 'framework');
    $active_tab = importVar('active_tab', false, 1);
    //instance class-------------------------------------------
    $conf = new Config_Framework();
    $groups = $conf->getRegroupUnit();
    cout(getTitleArea($lang->def('_CONFIGURATION')) . '<div class="std_block">');
    //save page if require
    if (isset($_POST['save_config'])) {
        if ($conf->saveElement($active_tab)) {
            cout(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
        } else {
            cout(getErrorUi($lang->def('_ERROR_IN_SAVE')));
        }
    }
    cout('<div id="global_conf" class="yui-navset">' . '<ul class="yui-nav">');
    while (list($id, $name) = each($groups)) {
        // print the tab list
        cout('<li' . ($id == $active_tab ? ' class="selected"' : '') . '><a href="#tab_g_' . $id . '"><em>' . $name['name'] . '</em></a></li>');
    }
    reset($groups);
    cout('</ul>' . '<div class="yui-content">');
    while (list($id, $name) = each($groups)) {
        // print the tab content
        cout('<div id="tab_g_' . $id . '">' . '<h2>' . $name['name'] . '</h2>' . '<p style="padding:4px">' . $name['descr'] . '</p>' . Form::openForm('conf_option_' . $id, 'index.php?modname=configuration&amp;op=config') . Form::openElementSpace() . Form::getHidden('active_tab_' . $id, 'active_tab', $id));
        switch ($id) {
            case SMS_GROUP:
                cout(show_sms_panel($lang) . '<br />');
                break;
            default:
                cout('<br />');
        }
        cout('' . $conf->getPageWithElement($id) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('save_config_' . $id, 'save_config', $lang->def('_SAVE')) . Form::getButton('undo_' . $id, 'undo', $lang->def('_UNDO')) . Form::closeButtonSpace() . Form::CloseForm() . '<br />' . '</div>');
    }
    cout('<script type="text/javascript">
		var targets =  YAHOO.util.Selector.query("span[id^=tt_target]");
		new YAHOO.widget.Tooltip("tooltip_info",
			{ context:targets,
			effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.20}
		 });
		</script>', 'scripts');
    reset($groups);
    cout('</div>' . '<div style="clear:left">&nbsp;</div>' . '</div>' . '</div>');
    cout('<script type="text/javascript">' . "\tnew YAHOO.widget.TabView('global_conf', {orientation:'left'});" . '</script>', 'scripts');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:50,代码来源:configuration.php


示例7: membersTree

 /**
  * Print list of user in org_chart pages
  **/
 function membersTree($groupid, &$treeView)
 {
     require_once _base_ . '/lib/lib.form.php';
     if (Get::sett('register_deleted_user') == 'on') {
         $lang =& DoceboLanguage::createInstance('profile', 'framework');
         $GLOBALS['page']->add('<br />' . '<a href="index.php?modname=directory&amp;op=view_deleted_user">' . $lang->def('_DELETED_USER_LIST') . '</a>');
     }
     $data =& $treeView->lv_data;
     $lv =& $treeView->lv_view;
     $lv->show_flat_mode_flag = TRUE;
     if ($groupid === FALSE) {
         return;
     }
     if ($groupid != '') {
         $arrGroup = $this->aclManager->getGroup(FALSE, $groupid);
         if ($arrGroup !== FALSE) {
             $idst = $arrGroup[0];
             $description = $arrGroup[2];
         }
     } else {
         $lv->show_flat_mode_flag = FALSE;
     }
     if ($lv->op == 'deleteperson') {
         $userid = $lv->getIdSelectedItem();
         $idst_user = $this->aclManager->getUserST($userid);
         $id_org = $treeView->getSelectedFolderId();
         $idst_group = $treeView->tdb->getGroupST($id_org);
         $this->aclManager->removeFromGroup($idst_group, $idst_user);
         $idst_group_desc = $treeView->tdb->getGroupDescendantsST($id_org);
         $this->aclManager->removeFromGroup($idst_group_desc, $idst_user);
     } elseif ($lv->op == 'suspendperson') {
         $userid = $lv->getIdSelectedItem();
         $idst_user = $this->aclManager->getUserST($userid);
         $this->aclManager->suspendUser($idst_user);
         $GLOBALS['page']->add(getResultUi($this->lang->def('_SUSPENDED')));
     } elseif ($lv->op == 'recoverperson') {
         $userid = $lv->getIdSelectedItem();
         $idst_user = $this->aclManager->getUserST($userid);
         $this->aclManager->recoverUser($idst_user);
         $GLOBALS['page']->add(getResultUi($this->lang->def('_REACTIVATED_USER')));
     }
     if ($groupid != '') {
         $data->setGroupFilter($idst, $lv->flat_mode);
     }
     $userlevelid = Docebo::user()->getUserLevelId();
     if ($userlevelid != ADMIN_GROUP_GODADMIN) {
         require_once $GLOBALS['where_framework'] . '/lib/lib.adminmanager.php';
         $adminManager = new AdminManager();
         $data->intersectGroupFilter($adminManager->getAdminTree(Docebo::user()->getIdSt()));
     }
     $GLOBALS['page']->add($lv->printOut(), 'content');
     //$this->selected = $lv->printedItems;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:56,代码来源:class.directory.php


示例8: create


//.........这里部分代码省略.........
    $tb = new Table(Get::sett('visuItem'), $lang->def('_META_CERTIFICATE_CREATE_CAPTION'), $lang->def('_META_CERTIFICATE_CREATE_CAPTION'));
    $tb->initNavBar('ini', 'button');
    $ini = $tb->getSelectedElement();
    $query = "SELECT idMetaCertificate" . " FROM " . $GLOBALS['prefix_lms'] . "_certificate_meta" . " WHERE idCertificate = '" . $id_certificate . "'";
    $result = sql_query($query);
    while (list($id_meta_temp) = sql_fetch_row($result)) {
        $id_meta[] = $id_meta_temp;
    }
    $query = "SELECT idCourse, idUser" . " FROM " . $GLOBALS['prefix_lms'] . "_courseuser" . " WHERE status = '" . _CUS_END . "'";
    $result = sql_query($query);
    $user_course_completed = array();
    while (list($id_course_t, $id_user_t) = sql_fetch_row($result)) {
        $user_course_completed[$id_user_t][$id_course_t] = $id_course_t;
    }
    $query = "SELECT idMetaCertificate, title" . " FROM " . $GLOBALS['prefix_lms'] . "_certificate_meta";
    $result = sql_query($query);
    $array_title = array();
    while (list($id_meta_t, $title_t) = sql_fetch_row($result)) {
        $array_title[$id_meta_t] = $title_t;
    }
    $query = "SELECT idUser, idMetaCertificate, COUNT(*)" . " FROM " . $GLOBALS['prefix_lms'] . "_certificate_meta_course" . " GROUP BY idUser, idMetaCertificate";
    $result = sql_query($query);
    $array_control = array();
    while (list($id_user_t, $id_meta_t, $control_t) = sql_fetch_row($result)) {
        $array_control[$id_user_t][$id_meta_t] = $control_t;
    }
    if (isset($_POST['undo_filter_create'])) {
        unset($_POST['filter_username']);
        unset($_POST['filter_firstname']);
        unset($_POST['filter_lastname']);
        unset($_POST['filter_release_status']);
    }
    $query = "SELECT m.idUser, u.lastname, u.firstname, u.userid" . " FROM " . $GLOBALS['prefix_lms'] . "_certificate_meta_course as m" . " JOIN " . $GLOBALS['prefix_fw'] . "_user as u ON u.idst = m.idUser" . " WHERE m.idMetaCertificate IN (" . implode(',', $id_meta) . ")" . (isset($_POST['filter_username']) ? "AND u.userid LIKE '%" . $_POST['filter_username'] . "%'" : '') . (isset($_POST['filter_firstname']) ? "AND u.firstname LIKE '%" . $_POST['filter_firstname'] . "%'" : '') . (isset($_POST['filter_lastname']) ? "AND u.lastname LIKE '%" . $_POST['filter_lastname'] . "%'" : '') . " GROUP BY m.idUser, u.lastname, u.firstname, u.userid" . " ORDER BY u.lastname, u.firstname, u.userid";
    $result = sql_query($query);
    while (list($id_user, $lastname, $firstname, $userid) = sql_fetch_row($result)) {
        foreach ($id_meta as $idmeta) {
            if (isset($array_control[$id_user][$idmeta]) && $array_control[$id_user][$idmeta]) {
                $title = strip_tags($array_title[$idmeta]);
                $query = "SELECT idCourse" . " FROM " . $GLOBALS['prefix_lms'] . "_certificate_meta_course" . " WHERE idUser = '" . $id_user . "'" . " AND idMetaCertificate = '" . $idmeta . "'";
                $result_int = sql_query($query);
                $control = true;
                while (list($id_course) = sql_fetch_row($result_int)) {
                    if (!isset($user_course_completed[$id_user][$id_course])) {
                        $control = false;
                    }
                }
                if ($control) {
                    $tot_element++;
                    if ($tot_element > $ini && $tot_element <= $ini + Get::sett('visuItem')) {
                        list($is_released) = sql_fetch_row(sql_query("SELECT COUNT(*)" . " FROM " . $GLOBALS['prefix_lms'] . "_certificate_meta_assign" . " WHERE idUser = '" . $id_user . "'" . " AND idMetaCertificate = '" . $idmeta . "'"));
                        if (!isset($_POST['filter_release_status']) || isset($_POST['filter_release_status']) && $_POST['filter_release_status'] == 0 || isset($_POST['filter_release_status']) && $_POST['filter_release_status'] == '1' && $is_released == 1 || isset($_POST['filter_release_status']) && $_POST['filter_release_status'] == '2' && $is_released == 0) {
                            if ($first) {
                                $first = false;
                                $type_h = array('', '', '', 'image', 'image', 'image');
                                $cont_h = array($lang->def('_FULLNAME'), $lang->def('_USERNAME'), $lang->def('_TITLE'), Get::img('standard/view.png', Lang::t('_PREVIEW', 'certificate')), Get::img('course/certificate.png', Lang::t('_TAKE_A_COPY', 'certificate')), '<img src="' . getPathImage('lms') . 'standard/delete.png" alt="' . $lang->def('_ALT_REM_META_CERT') . ' : ' . strip_tags($title) . '" />');
                                $tb->setColsStyle($type_h);
                                $tb->addHead($cont_h);
                            }
                            $cont = array();
                            $cont[] = $lastname . ' ' . $firstname;
                            $cont[] = $acl_man->relativeId($userid);
                            $cont[] = $title;
                            $cont[] = '<a href="index.php?modname=meta_certificate&amp;op=preview_cert&amp;id_certificate=' . $id_certificate . '&amp;idmeta=' . $idmeta . '&amp;iduser=' . $id_user . '">' . Get::img('standard/view.png', Lang::t('_PREVIEW', 'certificate') . ' : ' . strip_tags($title)) . '</a>';
                            $cont[] = '<a href="index.php?modname=meta_certificate&amp;op=release_cert&amp;id_certificate=' . $id_certificate . '&amp;idmeta=' . $idmeta . '&amp;iduser=' . $id_user . '">' . Get::img('course/certificate.png', Lang::t('_TAKE_A_COPY', 'certificate') . ' : ' . strip_tags($title)) . '</a>';
                            if ($is_released) {
                                $cont[] = '<a href="index.php?modname=meta_certificate&amp;op=del_released&amp;id_certificate=' . $id_certificate . '&amp;idmeta=' . $idmeta . '&amp;iduser=' . $id_user . '">' . '<img src="' . getPathImage('lms') . 'standard/delete.png" alt="' . $lang->def('_ALT_REM_META_CERT') . ' : ' . strip_tags($title) . '" /></a>';
                            } else {
                                $cont[] = '';
                            }
                            $tb->addBody($cont);
                        }
                    }
                }
            }
        }
    }
    require_once _base_ . '/lib/lib.dialog.php';
    setupHrefDialogBox('a[href*=del_released]');
    $array_release_status = array($lang->def('_ALL') => '0', $lang->def('_ONLY_RELEASED') => '1', $lang->def('_ONLY_NOT_RELEASED') => '2');
    if ($first) {
        $out->add(getTitleArea($lang->def('_TITLE_META_CERTIFICATE_CREATE'), 'certificate') . '<div class="std_block">');
        if (isset($_POST['filter'])) {
            $out->add(Form::openForm('meta_certificate_filter', 'index.php?modname=meta_certificate&op=create&id_certificate=' . $id_certificate) . Form::openElementSpace() . Form::getTextfield($lang->def('_USERNAME'), 'filter_username', 'filter_username', '255', isset($_POST['filter_username']) ? $_POST['filter_username'] : '') . Form::getTextfield($lang->def('_FIRSTNAME'), 'filter_firstname', 'filter_firstname', '255', isset($_POST['filter_firstname']) ? $_POST['filter_firstname'] : '') . Form::getTextfield($lang->def('_LASTNAME'), 'filter_lastname', 'filter_lastname', '255', isset($_POST['filter_lastname']) ? $_POST['filter_lastname'] : '') . Form::getRadioSet($lang->def('_RELEASE_STATUS_FILTER'), 'filter_release_status', 'filter_release_status', $array_release_status, isset($_POST['filter_release_status']) ? $_POST['filter_release_status'] : '0') . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('filter', 'filter', $lang->def('_FILTER')) . Form::getButton('undo_filter_create', 'undo_filter_create', $lang->def('_UNDO_FILTER')) . Form::closeButtonSpace() . Form::closeForm());
        }
        $out->add($lang->def('_NO_USER_FOUND') . getBackUi('index.php?modname=meta_certificate&amp;op=meta_certificate', $lang->def('_BACK')) . '</div>');
    } else {
        $out->add(getTitleArea($lang->def('_TITLE_META_CERTIFICATE_CREATE'), 'certificate') . '<div class="std_block">');
        if (isset($_GET['result'])) {
            switch ($_GET['result']) {
                case "ok":
                    $out->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
                    break;
                case "err_del_cert":
                    $out->add(getErrorUi($lang->def('_OPERATION_FAILURE')));
                    break;
            }
        }
        $out->add(Form::openForm('meta_certificate_filter', 'index.php?modname=meta_certificate&op=create&id_certificate=' . $id_certificate) . Form::openElementSpace() . Form::getTextfield($lang->def('_USERNAME'), 'filter_username', 'filter_username', '255', isset($_POST['filter_username']) ? $_POST['filter_username'] : '') . Form::getTextfield($lang->def('_FIRSTNAME'), 'filter_firstname', 'filter_firstname', '255', isset($_POST['filter_firstname']) ? $_POST['filter_firstname'] : '') . Form::getTextfield($lang->def('_LASTNAME'), 'filter_lastname', 'filter_lastname', '255', isset($_POST['filter_lastname']) ? $_POST['filter_lastname'] : '') . Form::getRadioSet($lang->def('_RELEASE_STATUS_FILTER'), 'filter_release_status', 'filter_release_status', $array_release_status, isset($_POST['filter_release_status']) ? $_POST['filter_release_status'] : '0') . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('filter', 'filter', $lang->def('_FILTER')) . Form::getButton('undo_filter_create', 'undo_filter_create', $lang->def('_UNDO_FILTER')) . Form::closeButtonSpace() . $tb->getTable() . $tb->getNavBar($ini, $tot_element) . Form::closeForm() . getBackUi('index.php?modname=meta_certificate&amp;op=meta_certificate', $lang->def('_BACK')) . '</div>');
    }
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:101,代码来源:meta_certificate.php


示例9: coursePanel


//.........这里部分代码省略.........
					var edition_count = 0, edition_max = ' . (int) $date_info['max_par'] . ';
					for (i=0; i<edition_boxes.length; i++) {
						if (edition_boxes[i].checked) edition_count++;
					}
					YAHOO.util.Dom.get("available_places_count_' . $id_edition . '").innerHTML = ""+(edition_max - edition_count);
					if (edition_count >= edition_max) {
						for (i=0; i<edition_boxes.length; i++) {
							if (!edition_boxes[i].checked) edition_boxes[i].disabled = true;
						}
					} else {
						for (i=0; i<edition_boxes.length; i++) {
							if (edition_boxes[i].disabled) edition_boxes[i].disabled = false;
						}
					}
				});';
    }
    $avail_script .= '}
			setupAvailablePlaces();
		</script>';
    cout($avail_script, 'page_head');
    //any error message from previous operations?
    $message = "";
    $err = Get::req('err', DOTY_MIXED, false);
    switch ($err) {
        case 'invalid':
            $message .= getErrorUi($lang->def('_ERROR_WHILE_SUBSCRIBING') . '.');
            break;
        case 'ok':
            $content = $lang->def('_SUBSCRIBE_SUCCESSFULL');
            $count = Get::req('count', DOTY_MIXED, false);
            if ($count !== false && is_numeric($count)) {
                $content .= "&nbsp;(" . $lang->def('_NUM_SUBSCRIBED') . ":&nbsp;" . $count . ")";
            }
            $message .= getResultUi($content);
            break;
    }
    //print page
    cout(getTitleArea($lang->def('_COURSEPANEL'), 'coursepanel') . '<div class="std_block">' . $message . $back_ui, 'content');
    cout('<link rel="stylesheet" type="text/css" href="' . Get::rel_path('base') . '/addons/yui/grids/grids-min.css">', 'page_head');
    $comps_list = $man_competences->GetCompetencesList();
    //write period of checking for expiration, from beginning date to ending date
    $date_1 = $expire_duration > 0 ? date("Y-m-d H:i:s", strtotime("-" . $expire_duration . " days")) : "";
    $date_2 = $expire_duration > 0 ? date("Y-m-d H:i:s", strtotime("+" . $expire_duration . " days")) : "";
    if ($date_1 != "" && $date_2 != "") {
        $date_period = Format::date($date_1, "date") . ' - ' . Format::date($date_2, "date");
    } else {
        $date_period = '(' . $lang->def('_ALL') . ')';
    }
    $selector = "";
    //$selector .= $form->openElementSpace();
    $selector .= '<div class="yui-g"><div id="select_1" class="yui-u first align_left">';
    $selector .= $form->openForm('action_panel', "index.php?modname=public_coursepanel&op=coursepanel");
    $selector .= $form->openElementSpace();
    $selector .= '<p class="align_left">' . $lang->def('_EXPIRING_USERS_FOR_PERIOD') . ':&nbsp;<b>' . $date_period . '</b>;</p>';
    //$selector .= $lang->def('_FOR_COMPETENCE').':&nbsp;';
    $selector .= $form->getDropDown($lang->def('_FOR_COMPETENCE') . ':&nbsp;', 'competence_selector', 'sel_competence', $comps_names, $sel_competence, '');
    $selector .= $form->getDropDown($lang->def('_FOR_COURSE') . ':&nbsp;', 'course_selector', 'sel_course', $courses_dropdown[$sel_competence], $sel_course, '');
    $selector .= $form->openButtonSpace();
    $selector .= $form->getButton('update', 'update', $lang->def('_UPDATE'));
    $selector .= $form->closeButtonSpace();
    $selector .= $form->closeElementSpace();
    $selector .= $form->closeForm();
    $selector .= '</div><div id="select_2" class="yui-u align_left">';
    //if (count($comps_list)>0) { ...
    $selector .= $form->openElementSpace();
    $selector .= $form->openForm('action_panel', "index.php?modname=public_coursepanel&op=expired");
开发者ID:abhinay100,项目名称:forma_app,代码行数:67,代码来源:public_coursepanel.php


示例10: show_personal_media

function show_personal_media(&$out, &$lang)
{
    if (!canAccessPersonalMedia()) {
        die("You can't access!");
    }
    require_once _base_ . '/lib/lib.table.php';
    require_once _base_ . '/lib/lib.mimetype.php';
    require_once _base_ . '/lib/lib.multimedia.php';
    $url = getPopupBaseUrl();
    $tab = new Table();
    $user_id = (int) Docebo::user()->getIdSt();
    //if(Get::sett('hteditor') == 'tinymce') {
    $GLOBALS['page']->add('' . '<script type="text/javascript" type="text/javascript" src="' . Get::rel_path('base') . '/addons/tiny_mce/tiny_mce_popup.js"></script>', 'page_head');
    $GLOBALS['page']->add('<script type="text/javascript">' . 'var FileBrowserDialogue = {
		    init : function () {
		        // Here goes your code for setting your custom things onLoad.
				var allLinks = document.getElementsByTagName("link");
				allLinks[allLinks.length-1].parentNode.removeChild(allLinks[allLinks.length-1]);
		    },
		    mySubmit : function (url) {
		        var URL = url;
		        var win = tinyMCEPopup.getWindowArg("window");

		        // insert information now
		        win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;

		        // for image browsers: update image dimensions
		        if(win.ImageDialog) {
			        if (win.ImageDialog.getImageData) win.ImageDialog.getImageData();
			        if (win.ImageDialog.showPreviewImage) win.ImageDialog.showPreviewImage(URL);
		        }
		        // close popup window
		        tinyMCEPopup.close();
		    }
		}
			tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
		' . '</script>', 'page_head');
    //}
    $head = array($lang->def("_PREVIEW"), $lang->def("_TYPE"), $lang->def("_FILENAME"));
    $head[] = "<img src=\"" . getPathImage() . "standard/download.png\" alt=\"" . $lang->def("_ATTACHMENT") . "\" title=\"" . $lang->def("_ATTACHMENT") . "\" />";
    $head[] = "<img src=\"" . getPathImage() . "standard/delete.png\" alt=\"" . $lang->def("_DEL") . "\" title=\"" . $lang->def("_DEL") . "\" />";
    $head_type = array('preview80', 'image', '', 'image', 'image');
    $tab->setColsStyle($head_type);
    $tab->addHead($head);
    $path = (strlen(dirname($_SERVER['PHP_SELF'])) != 1 ? dirname($_SERVER['PHP_SELF']) : '') . '/';
    $path .= $GLOBALS["where_files_relative"];
    $site_url = "http://" . $_SERVER['HTTP_HOST'] . $path . '/common/users/';
    $qtxt = "\r\n\tSELECT *\r\n\tFROM " . $GLOBALS["prefix_fw"] . "_user_file\r\n\tWHERE user_idst='" . $user_id . "'";
    $q = sql_query($qtxt);
    if ($q && mysql_num_rows($q) > 0) {
        while ($row = mysql_fetch_array($q)) {
            $rowcnt = array();
            if (!empty($row["media_url"])) {
                $rowcnt[] = "&nbsp;";
            } else {
                $file = _USER_FPATH . rawurlencode($row["real_fname"]);
                $rowcnt[] = "<div style=\"text-align: center;\">" . '<a href="#" onclick="javascript:window.open(\'' . $file . '\',\'\');return false;">' . "<img height=\"120\" src=\"" . $file . "\" alt=\"" . $row["fname"] . "\" title=\"" . $row["fname"] . "\" /></a></div>";
            }
            $img = "<img src=\"" . getPathImage('fw') . mimeDetect($file) . "\" alt=\"" . $row["fname"] . "\" title=\" ";
            $img .= $row["fname"] . "\" />\n";
            $rowcnt[] = $img;
            $rowcnt[] = $row["fname"];
            if (!empty($row["media_url"])) {
                $type = getMediaType($row["media_url"]);
            } else {
                $type = getMediaType($row["fname"]);
            }
            $sel_url = $url . "&amp;op=select&amp;from=personal&amp;type=" . $type . "&amp;item_id=" . $row["id"];
            $img = "<img src=\"" . getPathImage() . "standard/download.png\" alt=\"" . $lang->def("_ATTACHMENT") . "\" title=\"" . $lang->def("_ATTACHMENT") . "\" />\n";
            $rowcnt[] = '<a href="' . $sel_url . '" ' . (Get::sett('hteditor') == 'tinymce' ? 'onclick="FileBrowserDialogue.mySubmit(\'' . $site_url . $row["real_fname"] . '\'); return false;"' : '') . '>' . $img . "</a>\n";
            $img = "<img src=\"" . getPathImage('fw') . "standard/delete.png\" alt=\"" . $lang->def("_DEL") . "\" title=\"" . $lang->def("_DEL") . "\" />\n";
            $rowcnt[] = "<a href=\"" . $url . "&amp;op=delpersonal&amp;item_id=" . $row["id"] . "\">" . $img . "</a>\n";
            $tab->addBody($rowcnt);
        }
    }
    $url = getPopupBaseUrl() . "&amp;op=addpersonal";
    $tab->addActionAdd("<a href=\"" . $url . "\">" . $lang->def("_ADD") . "</a>");
    if (isset($_GET['result'])) {
        switch ($_GET['result']) {
            case "invalid_ext":
                $GLOBALS['page']->add(getErrorUi($lang->def('_INVALID_EXTENSION')));
                break;
            case "upload_err":
                $GLOBALS['page']->add(getErrorUi($lang->def('_ERROR_UPLOAD')));
                break;
            case "upload_ok":
                $GLOBALS['page']->add(getResultUi($lang->def('_OPERATION_SUCCESSFUL')));
                break;
        }
    }
    $GLOBALS['page']->add($tab->getTable());
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:92,代码来源:body.php


示例11: show_report_LO

 function show_report_LO($report_data = NULL, $other = '')
 {
     $jump_url = '';
     //show_report
     checkPerm('view');
     $lang =& DoceboLanguage::createInstance('report', 'framework');
     if (isset($_POST['send_mail_confirm'])) {
         $op = 'send_mail_confirm';
     } elseif (isset($_POST['send_mail'])) {
         $op = 'send_mail';
     } else {
         $op = 'show_result';
     }
     switch ($op) {
         case 'send_mail_confirm':
             $subject = importVar('mail_object', false, '[' . $lang->def('_SUBJECT') . ']');
             //'[No subject]');
             $body = importVar('mail_body', false, '');
             $acl_man = new DoceboACLManager();
             $user_info = $acl_man->getUser(getLogUserId(), false);
             if ($user_info) {
                 $sender = $user_info[ACL_INFO_EMAIL];
             }
             $mail_recipients = unserialize(urldecode(Get::req('mail_recipients', DOTY_STRING, '')));
             // prepare intestation for email
             $from = "From: " . $sender . $GLOBALS['mail_br'];
             $header = "MIME-Version: 1.0" . $GLOBALS['mail_br'] . "Content-type: text/html; charset=" . getUnicode() . $GLOBALS['mail_br'];
             $header .= "Return-Path: " . Get::sett('sender_event') . $GLOBALS['mail_br'];
             $header .= "Reply-To: " . Get::sett('sender_event') . $GLOBALS['mail_br'];
             $header .= "X-Sender: " . Get::sett('sender_event') . $GLOBALS['mail_br'];
             $header .= "X-Mailer: PHP/" . phpversion() . $GLOBALS['mail_br'];
             // send mail
             $arr_recipients = array();
             foreach ($mail_recipients as $recipient) {
                 $rec_data = $acl_man->getUser($recipient, false);
                 //mail($rec_data[ACL_INFO_EMAIL] , stripslashes($subject), stripslashes(nl2br($body)), $from.$header."\r\n");
                 $arr_recipients[] = $rec_data[ACL_INFO_EMAIL];
             }
             $mailer = DoceboMailer::getInstance();
             $mailer->SendMail($sender, $arr_recipients, stripslashes($subject), stripslashes(nl2br($body)));
             $result = getResultUi($lang->def('_OPERATION_SUCCESSFUL'));
             cout($this->_get_LO_query('html', NULL, $result));
             break;
         case 'send_mail':
             require_once _base_ . '/lib/lib.form.php';
             $mail_recipients = Get::req('mail_recipients', DOTY_MIXED, array());
             cout('' . Form::openElementSpace() . Form::getTextfield($lang->def('_SUBJECT'), 'mail_object', 'mail_object', 255) . Form::getTextarea($lang->def('_MAIL_BODY'), 'mail_body', 'mail_body') . Form::getHidden('mail_recipients', 'mail_recipients', urlencode(serialize($mail_recipients))) . Form::closeElementSpace() . Form::openButtonSpace() . Form::getButton('send_mail_confirm', 'send_mail_confirm', $lang->def('_SEND_MAIL')) . Form::getButton('undo_mail', 'undo_mail', $lang->def('_UNDO')) . Form::closeButtonSpace() . '</div>', 'content');
             break;
         default:
             cout($this->_get_LO_query('html', $report_data, $other));
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:52,代码来源:class.report_user.php


示例12: testvote


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getResults函数代码示例发布时间:2022-05-15
下一篇:
PHP getResultNum函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap