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


PHP Util::getSignature方法代码示例

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


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

示例1: load

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

示例2: openForm

 /**
  * public static function openForm( $id , $action, $css_class, $method, $enctype, $other )
  *
  * @param string $id 		the form id
  * @param string $action 	the action of the form
  * @param string $css_form 	optional css class for this form, if false default, if blacnk not added class=""
  * @param string $method 	optional method for this form
  * @param string $enctype 	optional enctype for this form
  * @param string $other 	optional code for the form tag
  * @return string 	with the form opening html code
  */
 public static function openForm($id, $action, $css_form = false, $method = false, $enctype = '', $other = '')
 {
     $editor_extra = getEditorExtra();
     $other .= !empty($editor_extra) ? " " . $editor_extra : "";
     if ($css_form === false) {
         $css_form = 'std_form';
     }
     if ($method == false) {
         $method = 'post';
     }
     return '<form ' . ($css_form == '' ? '' : ' class="' . $css_form . '"') . ' id="' . $id . '" method="' . $method . '" action="' . $action . '"' . ($enctype != '' ? ' enctype="' . $enctype . '"' : '') . $other . '>' . "\n" . '<div>' . "\n" . '<input type="hidden" id="authentic_request_' . $id . '" name="authentic_request" value="' . Util::getSignature() . '" />';
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:23,代码来源:lib.form.php

示例3: LOSelector

 function LOSelector($module, $back_url)
 {
     $query = "SELECT objectType FROM " . $GLOBALS['prefix_lms'] . "_lo_types";
     $rs = sql_query($query) or die('Table _lo_types not present');
     $out = '<div class="std_block">';
     $out .= '<div class="title">' . Lang::t('_SELECTLO', 'storage', 'lms') . '</div><br />';
     $out .= getBackUi(Util::str_replace_once('&', '&amp;', $back_url), Lang::t('_BACK'));
     $out .= '<form id="LOSelector" method="post" action="index.php?modname=' . $module . '&amp;op=display&amp;' . $this->_getOpCreateLOSel() . '=1" >' . '<input type="hidden" id="authentic_request_lo" name="authentic_request" value="' . Util::getSignature() . '" />';
     $first = TRUE;
     while (list($objectType) = sql_fetch_row($rs)) {
         $out .= '<label for="' . $objectType . '"><img src="' . getPathImage() . 'lobject/' . $objectType . '.gif" alt="' . $objectType . '" ' . 'title="' . $objectType . '" /></label>';
         if ($first) {
             $out .= '<input type="radio" name="radiolo" value="' . $objectType . '" id="' . $objectType . '" checked="true"/>';
         } else {
             $out .= '<input type="radio" name="radiolo" value="' . $objectType . '" id="' . $objectType . '"/>';
         }
         $out .= '<label for="' . $objectType . '">' . Lang::t('_LONAME_' . $objectType) . '</label>' . '<br />';
         $first = FALSE;
     }
     $out .= $this->printState();
     $out .= '<br /><input type="submit" class="button" value="' . Lang::t('_REPOCREATELO') . '" name="' . $this->_getOpCreateLOSel() . '"/>';
     $out .= '</form>';
     $out .= '</div>';
     return $out;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:25,代码来源:lib.public_report_admin.php

示例4: getExtraTop

 function getExtraTop()
 {
     global $modname;
     if ($this->isFindingDestination()) {
         require_once $GLOBALS['where_framework'] . '/lib/lib.sessionsave.php';
         $saveObj = new Session_Save();
         $saveName = $_GET['crepo'];
         if ($saveObj->nameExists($saveName)) {
             $saveData =& $saveObj->load($saveName);
             return '<div class="std_block">' . '<form id="homereposhow" method="post"' . ' action="index.php?modname=' . $modname . '&amp;op=display&amp;crepo=' . $_GET['crepo'] . '&amp;' . $this->treeView->_getOpCopyLOSel() . '=1"' . ' >' . "\n" . '<input type="hidden" id="authentic_request_hrm" name="authentic_request" value="' . Util::getSignature() . '" />' . $this->lang->def('_REPOSELECTDESTINATION') . ' <img src="' . getPathImage() . 'lobject/' . $saveData['objectType'] . '.gif" alt="' . $saveData['objectType'] . '" title="' . $saveData['objectType'] . '"/>' . $saveData['name'];
         }
     }
     return "";
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:14,代码来源:class.homerepo.php

示例5: organization_showerror

function organization_showerror(&$treeView)
{
    $lang =& DoceboLanguage::createInstance('organization', 'lms');
    global $modname, $op;
    $GLOBALS['page']->add('<form id="orgshow" method="post"' . ' action="index.php?modname=' . $modname . '&amp;op=organization"' . ' >' . "\n" . '<input type="hidden" id="authentic_request_org" name="authentic_request" value="' . Util::getSignature() . '" />');
    $GLOBALS['page']->add('<div class="std_block">');
    if ($treeView->error == TVERR_MOVEONDESCENDANT) {
        $GLOBALS['page']->add($lang->def('_ERROR_MOVEONDESCENDANT'));
    }
    $GLOBALS['page']->add(' <img src="' . $treeView->_getCancelImage() . '" alt="' . $treeView->_getCancelAlt() . '" />' . '<input type="submit" class="LVAction" value="' . $treeView->_getCancelLabel() . '"' . ' name="' . $treeView->_getCancelId() . '" id="' . $treeView->_getCancelId() . '" />');
    $GLOBALS['page']->add('</div>');
    $GLOBALS['page']->add('</form>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:13,代码来源:organization.php

示例6: printTabView_Begin

 /** This function return a string with start output for print
  *	tabview and related content
  *	@return string the output of the TabView
  **/
 function printTabView_Begin($url_param = "", $print_form = TRUE)
 {
     $tvout = '<div class="TabView_container">';
     //open form
     if ($print_form) {
         $tvout .= '<form action="' . $this->post_url . ($url_param != "" ? '&amp;' . $url_param : '') . '" method="' . $this->method . '">' . '<input type="hidden" id="authentic_request_tv" name="authentic_request" value="' . Util::getSignature() . '" />';
     }
     // print tab
     $tvout .= '<ul class="TabView_tabspace">';
     while (($tab = current($this->arrTab)) !== FALSE) {
         $tvout .= $tab->printLabel();
         next($this->arrTab);
     }
     reset($this->arrTab);
     $tvout .= '</ul>';
     // close form
     if ($print_form) {
         $tvout .= '</form>';
     }
     $tvout .= '<div class="TabView_content"><br />' . "\n";
     return $tvout;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:26,代码来源:lib.tab.php

示例7: homerepo_itemproperties

 function homerepo_itemproperties(&$treeView, &$arrayData, $idItem)
 {
     //function loadFields( $arrayData, &$lo, $idLO ) {
     $lang =& DoceboLanguage::createInstance('homerepo', 'lms');
     $langClassification =& DoceboLanguage::createInstance('classification', 'lms');
     $GLOBALS['page']->add('<form id="manHomerepo" method="post"' . ' action="index.php?' . $_SERVER['QUERY_STRING'] . '"' . ' >' . "\n" . '<input type="hidden" id="authentic_request_hrs" name="authentic_request" value="' . Util::getSignature() . '" />');
     $GLOBALS['page']->add('<div class="std_block">');
     $GLOBALS['page']->add($treeView->printState());
     global $defaultLanguage;
     //including language
     //includeLang("classification");
     //finding category
     $reCategory = sql_query("\r\n\tSELECT idCategory, title \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_coursecategory\r\n\tORDER BY title");
     //searching languages
     /*$langl = dir('menu/language/');
     	while($ele = $langl->read())
     		if(ereg("lang-",$ele)) {
     			$langArray[] = ereg_replace("lang-","",ereg_replace(".php","",$ele));
     		}
     	closedir($langl->handle);
     	sort($langArray);*/
     $langArray = Docebo::langManager()->getAllLangCode();
     if (!isset($_POST['idItem'])) {
         if ($idItem !== NULL) {
             $folder = $treeView->tdb->getFolderById($idItem);
             $GLOBALS['page']->add('<input type="hidden" name="idItem" id="idItem" value="' . $idItem . '" />');
             $title = $folder->otherValues[REPOFIELDTITLE];
             $arrayData['version'] = $folder->otherValues[REPOFIELDVERSION];
             $arrayData['difficult'] = $folder->otherValues[REPOFIELDDIFFICULT];
             $arrayData['language'] = $folder->otherValues[REPOFIELDLANGUAGE];
             $arrayData['resource'] = $folder->otherValues[REPOFIELDRESOURCE];
             $arrayData['objective'] = $folder->otherValues[REPOFIELDOBJECTIVE];
         }
     } else {
         $GLOBALS['page']->add('<input type="hidden" name="idItem" id="idItem" value="' . $idItem . '" />');
         $title = $_POST['title'];
     }
     // ==========================================================
     $GLOBALS['page']->add('<input type="hidden" name="title" id="title" value="' . $title . '" />');
     $GLOBALS['page']->add('<div class="ObjectForm">');
     $GLOBALS['page']->add('<span class="mainTitle">' . $langClassification->def('_CATEGORIZATION') . ' ' . $title . '</span><br /><br />');
     $GLOBALS['page']->add('</div>');
     //-------------------------------------------------
     /*		.'<div class="title">'._CATEGORY.'</div>'
     		.'<div class="content">'
     		.'<select name="idCategory">';
     		
     	if( isset($arrayData['idCategory']) )
     		$selectedIdCat = $arrayData['idCategory'];
     	else
     		$selectedIdCat = "";
     	
     	while(list($idCat, $catTitle) = sql_fetch_row($reCategory)) {
     		if( $selectedIdCat == $idCat )
     			echo '<option value="'.$idCat.'" selected >'.$catTitle.'</option>';
     		else
     			echo '<option value="'.$idCat.'">'.$catTitle.'</option>';
     	}
     	echo '</select> ( '.sql_num_rows($reCategory).' '._DISP.')'
     		.'</div>'*/
     //-------------------------------------------------
     $GLOBALS['page']->add('<div class="title">' . $langClassification->def('_VERSION') . '</div>' . '<div class="content">');
     if (isset($arrayData['version'])) {
         $GLOBALS['page']->add('<input type="text" name="version" maxlength="8" size="10" value="' . $arrayData['version'] . '" />');
     } else {
         $GLOBALS['page']->add('<input type="text" name="version" maxlength="8" size="10" value="1.0" />');
     }
     $GLOBALS['page']->add('</div>' . '<div class="title">' . $langClassification->def('_DIFFICULTY') . '</div>' . '<div class="content">' . '<select name="difficult">');
     if (isset($arrayData['difficult'])) {
         $selDiff = $arrayData['difficult'];
         switch ($selDiff) {
             case '_DIFFICULT_VERYEASY':
                 $selDiff = "1";
                 break;
             case '_DIFFICULT_EASY':
                 $selDiff = "2";
                 break;
             case '_DIFFICULT_MEDIUM':
                 $selDiff = "3";
                 break;
             case '_DIFFICULT_DIFFICULT':
                 $selDiff = "4";
                 break;
             case '_DIFFICULT_VERYDIFFICULT':
                 $selDiff = "5";
                 break;
         }
     } else {
         $selDiff = "";
     }
     $GLOBALS['page']->add('<option value="1" ' . ($selDiff == "1" ? 'selected' : '') . ' >' . $langClassification->def('_DIFFICULT_VERYEASY') . '</option>' . '<option value="2" ' . ($selDiff == "2" ? 'selected' : '') . ' >' . $langClassification->def('_DIFFICULT_EASY') . '</option>' . '<option value="3" ' . ($selDiff == "3" ? 'selected' : '') . ' >' . $langClassification->def('_DIFFICULT_MEDIUM') . '</option>' . '<option value="4" ' . ($selDiff == "4" ? 'selected' : '') . ' >' . $langClassification->def('_DIFFICULT_DIFFICULT') . '</option>' . '<option value="5" ' . ($selDiff == "5" ? 'selected' : '') . ' >' . $langClassification->def('_DIFFICULT_VERYDIFFICULT') . '</option>' . '</select>' . '</div>');
     //-------------------------------------------------
     /*.'<div class="title">'._DESCRIPTION.'</div>'
     		.'<div class="content">'
     		.'<div id="breakfloat">'
     			.'<textarea id="description" name="description" rows="10" cols="75"></textarea></div>'
     		.'</div>'*/
     //-------------------------------------------------
     $GLOBALS['page']->add('<div class="title">' . $langClassification->def('_LANGUAGE') . '</div>' . '<div class="content">' . '<select name="language">');
     if (isset($arrayData['language'])) {
//.........这里部分代码省略.........
开发者ID:abhinay100,项目名称:forma_app,代码行数:101,代码来源:homerepo.php

示例8: initDialogs

function initDialogs()
{
    require_once _base_ . '/lib/lib.json.php';
    Util::get_js(Get::rel_path('base') . '/widget/dialog/dialog.js', true, true);
    $json = new Services_JSON();
    $script = 'YAHOO.dialogConstants.setProperties({' . 'CONFIRM: ' . $json->encode(Lang::t('_CONFIRM', 'standard')) . ', ' . 'UNDO: ' . $json->encode(Lang::t('_UNDO', 'standard')) . ', ' . 'CLOSE: ' . $json->encode(Lang::t('_CLOSE', 'standard')) . ', ' . 'LOADING: ' . $json->encode(Lang::t('_LOADING', 'standard')) . ', ' . 'ERROR: ' . $json->encode(Lang::t('_OPERATION_FAILURE', 'standard')) . ', ' . 'SERVER_ERROR: ' . $json->encode(Lang::t('_CONNECTION_ERROR', 'standard')) . ', ' . 'loadingIcon: ' . $json->encode(Get::tmpl_path() . 'images/standard/loadbar.gif') . ', ' . 'smallLoadingIcon: ' . $json->encode(Get::tmpl_path() . 'images/standard/loading_circle.gif') . ', ' . 'authentication: "' . Util::getSignature() . '" ' . '});' . "\n";
    cout('<script type="text/javascript">' . $script . '</script>', 'scripts');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:8,代码来源:lib.dialog.php

示例9: manPubRepoSave

/**
 * This function can be called from LO insert/edit operation
 * to set position in pubrepo and other metadata.
 * @param $lo instance of the learning object to edit
 * @param $withForm print form tag
 * @param $withContents display the Items in folders
 **/
function manPubRepoSave(&$lo, $withForm = FALSE, $withContents = TRUE)
{
    $treeView = manPubrepo_CreateTreeView($withContents, FALSE);
    // print a form that submit to the same url
    if ($withForm) {
        echo '<form name="manPubrepo" method="post"' . ' action="index.php?' . $_SERVER['QUERY_STRING'] . '"' . ' >' . "\n" . '<input type="hidden" id="authentic_request_pr" name="authentic_request" value="' . Util::getSignature() . '" />';
    }
    // handle operations
    switch ($treeView->op) {
        case 'newfolder':
            manPubrepo_addfolder($treeView);
            break;
        case 'save':
            manPurepo_save($treeView->getSelectedFolderId(), $lo, $_POST);
            Util::jump_to('' . $lo->getBackUrl());
        case 'display':
        default:
            manPubrepo_display($treeView, $withContents);
            loadFields($_POST, $lo);
            break;
    }
    // add save button
    echo '<img src="' . getPathImage() . 'standard/save.gif" alt="' . _SAVE . '" /> ' . '<input type="submit" value="' . _SAVE . '"' . ' name="' . $treeView->_getOpSaveFile() . '" />';
    if ($withForm) {
        echo '</form>' . "\n";
    }
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:34,代码来源:lib.pubrepo.php

示例10: loadOrgChartView

 function loadOrgChartView()
 {
     require_once dirname(__FILE__) . '/../modules/org_chart/tree.org_chart.php';
     $lang =& DoceboLanguage::createInstance('organization_chart', 'framework');
     $userlevelid = Docebo::user()->getUserLevelId();
     $repoDb = new TreeDb_OrgDb($GLOBALS['prefix_fw'] . '_org_chart_tree');
     $treeView = new TreeView_OrgView($repoDb, 'organization_chart', Get::sett('title_organigram_chart'));
     $treeView->setLanguage($lang);
     $treeView->aclManager =& $this->aclManager;
     if ($userlevelid != ADMIN_GROUP_GODADMIN) {
         require_once $GLOBALS['where_framework'] . '/lib/lib.adminmanager.php';
         $adminManager = new AdminManager();
         $treeView->setFilterNodes($adminManager->getAdminTree(Docebo::user()->getIdSt()));
     }
     $treeView->loadState();
     $treeView->parsePositionData($_POST, $_POST, $_POST);
     $treeView->selector_mode = $this->selector_mode;
     $treeView->simple_selector = $this->show_orgchart_simple_selector;
     $treeView->itemSelectedMulti = $this->selection;
     $treeView->itemSelectedMulti_alt = $this->selection_alt;
     $treeView->multi_choice = $this->multi_choice;
     $treeView->select_all = $this->select_all;
     $treeView->deselect_all = $this->deselect_all;
     $treeView->saveState();
     require_once _base_ . '/lib/lib.form.php';
     $GLOBALS['page']->add('<link href="' . getPathTemplate('framework') . '/style/base-old-treeview.css" rel="stylesheet" type="text/css" />', 'page_head');
     $GLOBALS['page']->setWorkingZone('content');
     if (!$this->selector_mode) {
         $GLOBALS['page']->add(getTitleArea($lang->def('_ORG_CHART'), 'org_chart'));
         $GLOBALS['page']->add('<div class="std_block">');
         $GLOBALS['page']->addEnd('</div>');
     }
     if ($treeView->op != '') {
         $processed = FALSE;
         switch ($treeView->op) {
             case 'reedit_person':
                 $processed = TRUE;
                 $this->editPerson();
                 break;
             case 'create_user':
                 //$this->org_createUser($treeView->getSelectedFolderId());
                 $processed = TRUE;
                 Util::jump_to('index.php?modname=directory&op=org_createuser&treeid=' . $treeView->getSelectedFolderId());
                 break;
             case 'addtotree':
                 $processed = TRUE;
                 Util::jump_to('index.php?modname=directory&op=addtotree&treeid=' . $treeView->getSelectedFolderId());
                 break;
             case 'waiting_user':
                 $processed = TRUE;
                 Util::jump_to('index.php?modname=directory&op=org_waitinguser&treeid=' . $treeView->getSelectedFolderId());
                 break;
         }
         if (!$this->selector_mode && !$processed) {
             $GLOBALS['page']->add(Form::openForm('directory_org_chart', 'index.php?modname=directory&amp;op=org_chart', 'std_form', 'post', 'multipart/form-data'));
             $GLOBALS['page']->addEnd(Form::closeForm());
         }
         switch ($treeView->op) {
             case 'newfolder':
                 $GLOBALS['page']->add($treeView->loadNewFolder());
                 break;
             case 'deletefolder':
                 $GLOBALS['page']->add($treeView->loadDeleteFolder());
                 break;
             case 'renamefolder':
                 $GLOBALS['page']->add($treeView->loadRenameFolder());
                 break;
             case 'movefolder':
                 $GLOBALS['page']->add($treeView->loadMoveFolder());
                 break;
             case 'import_users':
                 $GLOBALS['page']->add($treeView->loadImportUsers());
                 break;
             case 'import_users2':
                 $GLOBALS['page']->add($treeView->loadImportUsers2());
                 break;
             case 'import_users3':
                 $GLOBALS['page']->add($treeView->loadImportUsers3());
                 break;
             case 'assign2_field':
                 $GLOBALS['page']->add($treeView->loadAssignField2());
                 break;
             case 'assign_field':
                 $GLOBALS['page']->add($treeView->loadAssignField());
                 break;
             case 'folder_field2':
                 $GLOBALS['page']->add($treeView->loadFolderField2());
                 break;
             case 'folder_field':
                 $GLOBALS['page']->add($treeView->loadFolderField());
                 break;
         }
     } else {
         if (!$this->selector_mode) {
             //quick change password
             if (checkPerm('edituser_org_chart', true, 'directory', 'framework')) {
                 $GLOBALS['page']->add('<div class="align_right">' . '<a href="javascript:;" onclick="YAHOO.Animation.BlindToggle(\'quick_change\');">' . $lang->def('_CHANGEPASSWORD') . '</a>' . '<div id="quick_change" style="display:none;">' . '<form method="post" action="index.php?modname=directory&amp;op=quick_change_password">' . '<div class="instruction_container">' . '<input type="hidden" id="authentic_request_chpwd" name="authentic_request" value="' . Util::getSignature() . '" />' . '<label for="cp_userid">' . $lang->def('_USERNAME') . ' </label>' . '<input type="text" id="cp_userid" name="cp_userid" maxlenght="255" />&nbsp;&nbsp;' . '<label for="cp_pwd">' . $lang->def('_PASSWORD') . ' </label>' . '<input type="password" id="cp_pwd" name="cp_pwd" maxlenght="255" autocomplete="off" />&nbsp;&nbsp;' . '<input type="submit" id="cp_click" name="cp_click" value="' . $lang->def("_SAVE") . '" /><br/>' . '<input type="checkbox" id="cp_force" name="cp_force" value="1" checked="checked" />' . ' <label for="cp_force">' . $lang->def('_FORCE_CHANGE') . '</label>' . '</div>' . '</form>' . '</div>' . '</div><br/>');
             }
             $treeView->lv_data = new PeopleDataRetriever($GLOBALS['dbConn'], $GLOBALS['prefix_fw']);
             $rend = new Table(Get::sett('visuUser'));
//.........这里部分代码省略.........
开发者ID:abhinay100,项目名称:forma_app,代码行数:101,代码来源:class.directory.php

示例11: statoneuser

function statoneuser()
{
    $lang =& DoceboLanguage::createInstance('stats', 'lms');
    $out =& $GLOBALS['page'];
    $aclManager =& Docebo::user()->getACLManager();
    $out->setWorkingZone('content');
    $out->add(getTitleArea($lang->def('_STATFORUSER'), 'stats', false, true));
    $out->add('<div class="std_block">');
    $idst = (int) $_GET['idUser'];
    $user_info = $aclManager->getUser($idst, FALSE);
    $orgDb = new StatOrg_TreeDb();
    $treeView = new StatOrg_TreeView($orgDb, $_SESSION['idCourse']);
    $treeView->stat_idUser = $idst;
    $treeView->parsePositionData($_POST, $_POST, $_POST);
    // print container div and form
    $out->add(getBackUi('index.php?modname=stats&amp;op=statuser', $lang->def('_BACK')));
    $out->add('<div class="title">' . $lang->def('_STATFORUSER') . ' ' . $user_info[ACL_INFO_FIRSTNAME] . ' ' . $user_info[ACL_INFO_LASTNAME] . '</div>');
    $out->add('<form name="orgshow" method="post"' . ' action="index.php?modname=stats&amp;op=statoneuser&amp;idUser=' . $idst . '"' . ' >' . "\n" . '<input type="hidden" id="authentic_request_org" name="authentic_request" value="' . Util::getSignature() . '" />');
    $out->add($treeView->load());
    //if( funAccess('orgedit','MOD', TRUE, 'organization' ) ) $treeView->loadActions();
    $out->add('</form>');
    // print form for import action
    // display track if exists
    $item = $orgDb->getFolderById($treeView->getSelectedFolderId());
    $values = $item->otherValues;
    $param = $treeView->printState(FALSE);
    $arrBack_Url = array('address' => 'index.php?modname=stats&op=statoneuser&idUser=' . $treeView->stat_idUser, 'end_address' => 'index.php?modname=stats&op=statoneuser&idUser=' . $treeView->stat_idUser, 'param' => $param);
    require_once _lms_ . '/class.module/track.object.php';
    //find idTrack
    $idTrack = Track_Object::getIdTrackFromCommon($treeView->getSelectedFolderId(), $treeView->stat_idUser);
    if ($idTrack) {
        $lo = createLOTrack($idTrack, $values[REPOFIELDOBJECTTYPE], $values[REPOFIELDIDRESOURCE], $values[ORGFIELDIDPARAM], $arrBack_Url);
        if ($lo !== false) {
            $GLOBALS['wrong_way_to_pass_parameter'] = $lo->idReference;
            //$values[REPOFIELDIDRESOURCE];
            $out->add($lo->loadReport($treeView->stat_idUser));
        }
    }
    $out->add('</div>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:40,代码来源:stats.php

示例12: modassignpoint

function modassignpoint()
{
    checkPerm('view', false, 'storage');
    $lang =& DoceboLanguage::createInstance('test');
    require_once _base_ . '/lib/lib.table.php';
    require_once _base_ . '/lib/lib.form.php';
    $idTest = importVar('idTest', true, 0);
    $back_url = urldecode(importVar('back_url'));
    $url_coded = htmlentities(urlencode($back_url));
    //jump back
    if (isset($_POST['back_to_home'])) {
        Util::jump_to('index.php?modname=test&op=modtestgui&idTest=' . $idTest . '&back_url=' . $url_coded);
    }
    //save new score ------------------------------------------------
    if (isset($_POST['saveandexit'])) {
        $query_question = "\r\n\t\tSELECT q.idQuest, q.type_quest, t.type_file, t.type_class \r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_testquest AS q JOIN " . $GLOBALS['prefix_lms'] . "_quest_type AS t \r\n\t\tWHERE q.idTest = '" . (int) $idTest . "' AND q.type_quest = t.type_quest";
        $query_question .= " ORDER BY q.sequence";
        $re_quest = sql_query($query_question);
        $score_assign = array();
        while (list($idQuest, $type_quest, $type_file, $type_class) = sql_fetch_row($re_quest)) {
            sql_query("\r\n\t\t\tUPDATE " . $GLOBALS['prefix_lms'] . "_testquest \r\n\t\t\tSET difficult = '" . (int) $_POST['new_difficult_quest'][$idQuest] . "' \r\n\t\t\tWHERE idTest = '" . $idTest . "' AND idQuest = '" . (int) $idQuest . "'");
            require_once dirname(__FILE__) . '/../question/' . $type_file;
            $quest_obj = eval("return new {$type_class}( {$idQuest} );");
            $score_assign[$idQuest] = $quest_obj->setMaxScore($_POST['new_score_quest'][$idQuest]);
        }
    }
    list($test_title) = sql_fetch_row(sql_query("\r\n\tSELECT title \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_test \r\n\tWHERE idTest = '" . $idTest . "'"));
    list($tot_quest, $tot_difficult) = sql_fetch_row(sql_query("\r\n\tSELECT COUNT(*), SUM(difficult) \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_testquest \r\n\tWHERE idTest = '{$idTest}' AND type_quest <> 'break_page' AND type_quest <> 'title'"));
    $query_question = "\r\n\tSELECT q.idQuest, q.type_quest, t.type_file, t.type_class, q.title_quest, q.difficult \r\n\tFROM " . $GLOBALS['prefix_lms'] . "_testquest AS q JOIN " . $GLOBALS['prefix_lms'] . "_quest_type AS t \r\n\tWHERE q.idTest = '" . (int) $idTest . "' AND q.type_quest = t.type_quest";
    $query_question .= " ORDER BY q.sequence";
    $re_quest = sql_query($query_question);
    $GLOBALS['page']->add(getTitleArea($lang->def('_TEST_SECTION'), 'test') . '<div class="std_block">' . getBackUi('index.php?modname=test&amp;op=defpoint&amp;idTest=' . $idTest . '&amp;back_url=' . $url_coded, $lang->def('_BACK')) . '<form method="post" action="index.php?modname=test&amp;op=modassignpoint">' . '<input type="hidden" id="authentic_request_test" name="authentic_request" value="' . Util::getSignature() . '" />' . '<fieldset class="fieldset_std">' . '<legend>' . $lang->def('_TEST_TM2_CAPTIONSETTIME') . '</legend>' . '<input type="hidden" name="idTest" value="' . $idTest . '" />' . '<input type="hidden" name="back_url" value="' . $url_coded . '" />', 'content');
    //table header---------------------------------------------------
    $tab_quest = new Table(0, $lang->def('_TEST_SUMMARY'), $lang->def('_TEST_SUMMARY'));
    $tab_quest->setColsStyle(array('image', 'image', '', 'image', 'image'));
    $tab_quest->addHead(array($lang->def('_TEST_QUEST_ORDER'), $lang->def('_TYPE'), $lang->def('_QUESTION'), $lang->def('_DIFFICULTY'), $lang->def('_SCORE')));
    $i = 1;
    $effective_tot_score = $effective_difficult = 0;
    //table body--------------------------------------------------------
    while (list($idQuest, $type_quest, $type_file, $type_class, $title_quest, $difficult) = sql_fetch_row($re_quest)) {
        require_once dirname(__FILE__) . '/../question/' . $type_file;
        $quest_obj = eval("return new {$type_class}( {$idQuest} );");
        if (isset($_POST['new_score_quest'][$idQuest])) {
            //loading new time form previous page
            $difficult = $_POST['new_difficult_quest'][$idQuest];
            $quest_score = $quest_obj->getRealMaxScore($_POST['new_score_quest'][$idQuest], true);
        } elseif (isset($_POST['point_assignement'])) {
            //calculate new time from deftime page
            switch ($_POST['point_assignement']) {
                case "0":
                    $quest_score = $quest_obj->getRealMaxScore(round(round($_POST['new_assigned_score'] / $tot_difficult, 2) * $difficult), 2);
                    //$quest_score = (( $_POST['new_assigned_score'] / $tot_difficult ) * $difficult ), 2;
                    break;
                case "1":
                    $quest_score = $quest_obj->getRealMaxScore(round($_POST['new_assigned_score'] / $tot_quest, 2));
                    //$quest_score = round(( $_POST['new_assigned_score'] / $tot_quest ), 2);
                    break;
                case "2":
                    $quest_score = $quest_obj->getMaxScore();
                    break;
            }
        }
        $content = array($i++, $lang->def('_QUEST_ACRN_' . strtoupper($type_quest)), $title_quest);
        if (isset($score_assign)) {
            $content[] = $difficult ? $difficult : '&nbsp;';
            if ($difficult) {
                $content[] = $score_assign[$idQuest] != $_POST['new_score_quest'][$idQuest] ? $score_assign[$idQuest] . '&nbsp;<span class="font_red">*</span>' : $score_assign[$idQuest];
            } else {
                $content[] = '&nbsp;';
            }
        } else {
            $content[] = $difficult ? '<label for="new_difficult_quest_' . $idQuest . '">' . $lang->def('_QUEST_TM2_SETDIFFICULT') . '</label>' . Form::getInputDropdown('', 'new_difficult_quest_' . $idQuest, 'new_difficult_quest[' . $idQuest . ']', array(1 => 1, 2, 3, 4, 5), $difficult, '') : '&nbsp;';
            $content[] = $difficult ? '<label for="new_difficult_quest_' . $idQuest . '">' . $lang->def('_QUEST_TM2_SETSCORE') . '</label>' . '<input type="text" id="new_score_quest_' . $idQuest . '" name="new_score_quest[' . $idQuest . ']" value="' . $quest_score . '" size="5" maxlength="200" alt="' . $lang->def('_QUEST_TM2_SETSCORE') . '" />' : '&nbsp;';
        }
        if ($difficult != 0) {
            $effective_difficult += $difficult;
            if (isset($score_assign)) {
                $effective_tot_score = round($effective_tot_score + $score_assign[$idQuest], 2);
            } else {
                $effective_tot_score = round($effective_tot_score + $quest_score, 2);
            }
        }
        $tab_quest->addBody($content);
    }
    $tab_quest->addBodyCustom('<tr class="line-top-bordered">' . '<td colspan="3" class="align_right">' . $lang->def('TOTAL') . '</td>' . '<td class="align_center">' . $effective_difficult . '</td>' . '<td class="align_center">' . $effective_tot_score . '</td>' . '</tr>');
    $GLOBALS['page']->add($tab_quest->getTable(), 'content');
    //command for this page---------------------------------------------
    if (isset($_POST['new_assigned_score'])) {
        $previous_score = $_POST['new_assigned_score'];
    } else {
        $previous_score = $_POST['previous_score'];
    }
    $score_difference = round($effective_tot_score - $previous_score, 2);
    if ($score_difference < 0) {
        $score_difference = '<strong class="font_red">' . $score_difference . '<strong>';
    } else {
        $score_difference = '<strong>' . $score_difference . '<strong>';
    }
    $GLOBALS['page']->add('</fieldset>', 'content');
    if (!isset($score_assign)) {
//.........这里部分代码省略.........
开发者ID:abhinay100,项目名称:forma_app,代码行数:101,代码来源:test.php

示例13: nl_sendcomplete

function nl_sendcomplete()
{
    checkPerm('view');
    //-TP// funAdminAccess('OP');
    $out =& $GLOBALS['page'];
    $out->setWorkingZone("content");
    $lang =& DoceboLanguage::createInstance('admin_newsletter', 'framework');
    $out->add(getTitleArea($lang->def("_NEWSLETTER"), "newsletter"));
    $out->add("<div class=\"std_block\">\n");
    $out->add("<br /><b>" . $lang->def("_OPERATION_SUCCESSFUL") . "</b><br /><br />\n");
    $out->add("</div><br />\n");
    $out->add("<form action=\"index.php?modname=public_newsletter_admin&amp;op=newsletter\" method=\"post\">\n" . '<input type="hidden" id="authentic_request_pubr" name="authentic_request" value="' . Util::getSignature() . '" />');
    $out->add("<div class=\"std_block\">\n");
    $out->add("<input class=\"button\" type=\"submit\" value=\"" . $lang->def("_BACK") . "\" />\n");
    $out->add("</div>\n");
    $out->add("</form>\n");
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:17,代码来源:public_newsletter_admin.php

示例14: edit_progtot

function edit_progtot()
{
    $out =& $GLOBALS['page'];
    $out->setWorkingZone('content');
    $lang =& DoceboLanguage::createInstance('project', "lms");
    // Controllo che l'utente non cerchi di entrare in progetti a cui non e' iscritto.
    $id = $_GET["id"];
    $itemid = importVar("itemid");
    $myprj = user_projects(Docebo::user()->getIdSt());
    $view_perm = checkPerm('view', true);
    if ($view_perm && in_array($id, $myprj) && (is_owner(Docebo::user()->getIdSt(), $id) || is_admin(Docebo::user()->getIdSt(), $id))) {
        //area title
        $out->add(getTitleArea($lang->def("_PROJECT_MANAGER"), "project"));
        $out->add('<div class="std_block">');
        if (isset($_POST["applychanges"])) {
            $progtot = (int) $_POST["progtot"];
            $query = sql_query("UPDATE " . $GLOBALS["prefix_lms"] . "_prj SET pprog='{$progtot}' WHERE id='{$id}' LIMIT 1;");
            @Util::jump_to(" index.php?modname=project&op=showprj&id={$id}");
        }
        $out->add("<form method=\"post\" action=\"index.php?modname=project&amp;op=editprogtot&amp;id={$id}\">\n" . '<input type="hidden" id="authentic_request_prj" name="authentic_request" value="' . Util::getSignature() . '" />');
        // progresso totale: ___%
        $query = sql_query("SELECT * FROM " . $GLOBALS["prefix_lms"] . "_prj WHERE id='{$id}' LIMIT 1;");
        $row = mysql_fetch_array($query);
        $out->add($lang->def("_PRJPROGTOT") . ":\n");
        $out->add("<input type=\"text\" size=\"3\" id=\"progtot\" name=\"progtot\" value=\"" . (int) $row["pprog"] . "\" />%<br /><br />\n");
        $out->add("<input type=\"hidden\" id=\"applychanges\" name=\"applychanges\" value=\"1\" />\n");
        $out->add("<input class=\"button\" type=\"submit\" value=\"" . $lang->def("_SAVE") . "\" />\n");
        $out->add("</form><br />\n");
        //		$out->add("<div align=\"center\"><b>[ <a href=\"index.php?modname=project&amp;op=showprj&amp;id=$id\">".$lang->def("_BACK")."</a> ]</b></div>\n");
        $url = "index.php?modname=project&amp;op=showprj&amp;id=" . $id;
        $out->add(getBackUi($url, $lang->def('_BACK')));
        $out->add('<br /></div>');
    } else {
        die("You can't access");
    }
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:36,代码来源:project.php

示例15: move_course

function move_course()
{
    checkPerm('mod');
    require_once $GLOBALS['where_lms'] . '/admin/modules/category/category.php';
    require_once $GLOBALS['where_lms'] . '/admin/modules/category/tree.category.php';
    require_once $GLOBALS['where_framework'] . '/lib/lib.sessionsave.php';
    require_once $GLOBALS['where_lms'] . '/lib/category/class.categorytree.php';
    $out =& $GLOBALS['page'];
    $lang =& DoceboLanguage::createInstance('course', 'lms');
    $out->add(getTitleArea(array($lang->def('_COURSE'), $lang->def('_MOVE')), 'course') . '<div class="std_block">');
    if (isset($_POST["move_course"])) {
        list($id_course) = each($_POST['move_course']);
    } else {
        $id_course = importVar('id_course', true, 0);
    }
    $categoryDb = new CategoryTree();
    //new TreeDb_CatDb($GLOBALS['prefix_lms'].'_category');
    $treeView = new TreeView_CatView($categoryDb, 'course_category', $lang->def('_CATEGORY'));
    if (isset($_POST[$treeView->_getCancelId()])) {
        Util::jump_to('index.php?modname=course&op=course_list');
    }
    $treeView->parsePositionData($_POST, $_POST, $_POST);
    $treeView->show_action = false;
    if (isset($_POST[$treeView->_getFolderNameId()])) {
        $folderid = $_POST[$treeView->_getFolderNameId()];
    } else {
        $folderid = $treeView->getSelectedFolderId();
    }
    $folder = $treeView->tdb->getFolderById($treeView->getSelectedFolderId());
    $out->add('<form method="post" action="index.php?modname=course&amp;op=move_course">' . '<input type="hidden" id="authentic_request_mc" name="authentic_request" value="' . Util::getSignature() . '" />' . '<input type="hidden" id="id_course" name="id_course" value="' . $id_course . '" />' . '<input type="hidden" id="folderid" name="' . $treeView->_getFolderNameId() . '" value="' . $folderid . '" />');
    $out->add('<input type="hidden" name="folder_id" value="' . $treeView->getSelectedFolderId() . '" />');
    $out->add('<input type="hidden" name="id_course" value="' . $id_course . '" />');
    $out->add('<div>' . $treeView->getFolderPrintName($folder) . '</div>');
    $out->add($treeView->load());
    $out->add(' <img src="' . $treeView->_getMoveImage() . '" alt="' . $treeView->_getMoveAlt() . '" /> ' . '<input type="submit" class="TreeViewAction" value="' . $lang->def("_MOVE") . '"' . ' name="move_course_here" id="move' . $id_course . '" />');
    $out->add(' <img src="' . $treeView->_getCancelImage() . '" alt="' . $treeView->_getCancelAlt() . '" /> ' . '<input type="submit" class="TreeViewAction" value="' . $treeView->_getCancelLabel() . '"' . ' name="' . $treeView->_getCancelId() . '" id="' . $treeView->_getCancelId() . '" />');
    $out->add('</form>' . '</div>');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:38,代码来源:course.php


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