/** * Method to build the menu in html for display purposes. * * @param string $iconPath The path to the icons within the skins * icons folder. Default: false. * * @return string $menu The menu */ public function show() { $homeLabel = $this->objLanguage->languageText('word_home', 'system', 'Home'); $logoutLabel = $this->objLanguage->languageText('word_logout', 'system', 'Logout'); $confirmLabel = $this->objLanguage->languageText('phrase_confirmlogout'); $home = $this->objConfig->getdefaultModuleName(); $str = '<ul id="menuList" class="adxm">'; //this is not using this javascript menu. its using the css one $str .= '<li id="home" class="navigation-list first" ><a href="' . $this->uri('', $home) . '">' . $homeLabel . '</a></li>'; foreach ($this->menu as $key => $item) { $objLink = new link('#'); $objLink->link = $key . ' '; $str .= '<li id="' . strtolower($key) . '" class="navigation-list">' . $objLink->show() . '<ul class="inner-menu" >' . "\n"; $counter = 1; $numitems = count($item); foreach ($item as $link => $val) { $this->toolbarIcon->setIcon($link, null, 'icons/modules/'); $this->toolbarIcon->title = $val; $this->toolbarIcon->align = 'left'; $this->toolbarIcon->extra = ' vspace="3" hspace="5" width="17" height="17"'; $icon = $this->toolbarIcon->show(); $objLink = new link($this->uri('', $link)); $objLink->link = $icon . '<div class="menulinktext">' . $val . '</div>'; $valLink = $objLink->show(); if ($counter == 1) { $cssclass = 'first'; } else { if ($counter == $numitems) { $cssclass = 'last'; } } $str .= '<li id="" class="' . $cssclass . '">' . $valLink . "</li>\r\n"; $counter++; } $str .= "</ul></li>\n"; } $str .= '<li id="logout" class="navigation-list last"><a href="javascript: if(confirm(\'' . $confirmLabel . '\')) {document.location= \'' . $this->uri(array('action' => 'logoff'), 'security', '', FALSE, TRUE) . '\'};">' . $logoutLabel . '</a></li>'; $str .= "</ul>"; return $str; }
/** * Method to build the menu in html for display purposes. * @param string $iconPath The path to the icons within the skins * icons folder. Default: false. * @return string $menu The menu */ public function show() { $homeLabel = $this->objLanguage->languageText('word_home', 'system', 'Home'); $logoutLabel = $this->objLanguage->languageText('word_logout', 'system', 'Logout'); $confirmLabel = $this->objLanguage->languageText('phrase_confirmlogout'); $postlogin = '******'; //$this->objConfig->getdefaultModuleName(); $home = $this->objConfig->getPrelogin(); $showLogout = FALSE; // Check if the user is logged in if ($this->objUser->isLoggedIn()) { $home = $postlogin; $showLogout = TRUE; } $str = '<ul style="list-style: none; background-color:#fff;">'; // Home link $objLink = new link($this->uri('', $home)); $objLink->link = $homeLabel; $link = $objLink->show(); $str .= '<li style="border-right: 1px #ead0cf dotted; background-image: none;">' . $link . '</li>'; if (!empty($this->menu)) { foreach ($this->menu as $item) { $actArr = !empty($item['action']) ? array('action' => $item['action']) : ''; $objLink = new link($this->uri($actArr, $item['module'])); $objLink->link = $item['text']; $link = $objLink->show(); $str .= '<li style="border-right: 1px #ead0cf dotted; background-image: none;">' . $link . '</li>'; } } if ($showLogout) { $url = $this->uri(array('action' => 'logoff'), 'security'); $objLink = new link("javascript: if(confirm('{$confirmLabel}')) {document.location= '{$url}'};"); $objLink->link = $logoutLabel; $link = $objLink->show(); $str .= '<li style="background-image: none;">' . $link . '</li>'; } $str .= '</ul><br />'; return $str; }
You do not have access to this module <?php $this->loadClass('link', 'htmlelements'); $link = new link($this->uri(NULL, '_default')); $link->link = 'Return to Home Page'; echo $link->show();
} } if ($folderPermission) { $header->str .= $editLink->show(); } echo $header->show(); echo '<br /><p><strong>' . $this->objLanguage->languageText('word_description', 'system', 'Description') . ':</strong> <em>' . $file['filedescription'] . '</em></p>'; echo '<p><strong>' . $this->objLanguage->languageText('word_tags', 'system', 'Tags') . ':</strong> '; if (count($tags) == 0) { echo '<em>' . $this->objLanguage->languageText('phrase_notags', 'system', 'no tags') . '</em>'; } else { $comma = ''; foreach ($tags as $tag) { $tagLink = new link($this->uri(array('action' => 'viewbytag', 'tag' => $tag))); $tagLink->link = $tag; echo $comma . $tagLink->show(); $comma = ', '; } } echo '</p>'; //$tabContent = $this->newObject('tabcontent', 'htmlelements'); //$tabContent = $this->newObject('jquerytabs', 'htmlelements'); $tabContent = $this->newObject('tabber', 'htmlelements'); $tabContent->width = '90%'; if ($preview != '') { if ($file['category'] == 'images') { // $this->appendArrayVar('headerParams', $this->getJavaScriptFile('jquery.imagefit_0.2.js', 'jquery')); // $this->appendArrayVar('bodyOnLoad', "jQuery('#filemanagerimagepreview').imagefit();"); $preview = '<div id="filemanagerimagepreview">' . $preview . '</div>'; } $objWashout = $this->getObject('washout', 'utilities');
/** * * Make the item linked to enter context * * @param string $contextCode The context to enter * @param string $linkText The text (or image tag) of the link * @return string The rendered link * @access private * */ private function linkItem($contextCode, $linkText) { $link = new link($this->uri(array('action' => 'joincontext', 'contextcode' => $contextCode))); $link->link = $linkText; return $link->show(); }
/** * This method adds rows to the global table. * * @param string $moduleName: Name to be displayed * @param string $iconPicture: Icon to be displayed * @param string $moduleId: Module URI * @param array $linkArray: Additional parameters for URI * @param boolean $iconsFolder: If true, get image from icons folder, else get image from the icons/module folder * @param boolean $popup: Create a link or a popup window */ public function addNavigationRow($moduleName, $iconPicture, $moduleId = null, $linkArray = null, $iconsFolder = false, $popup = false) { $this->loadClass('link', 'htmlelements'); $this->globalTable->startRow(); if ($iconsFolder) { $this->icon->setIcon($iconPicture); } else { $this->icon->setModuleIcon($iconPicture); } $this->icon->alt = $moduleName; $this->icon->title = $moduleName; $this->globalTable->addCell($this->icon->show(), 20, 'absmiddle', 'center'); $moduleLink = new link($this->uri($linkArray, $moduleId)); $moduleLink->link = $moduleName; $this->globalTable->addCell($moduleLink->show(), null, 'absmiddle'); $this->globalTable->endRow(); }
'.$selectLink->show().' </div> </div> '; */ $objImage = new image(); $objImage->src = $thumbImg; $objImage->align = 'middle'; $image = $objImage->show(); $objLayer = new layer(); $objLayer->cssClass = 'imageDiv'; $objLayer->addToStr($image); $image = $objLayer->show(); $objLayer = new layer(); $objLayer->cssClass = 'linkDiv'; $objLayer->addToStr($selectLink->show()); $link = $objLayer->show(); $objLayer = new layer(); $objLayer->cssClass = 'floatlangdir'; $objLayer->width = '120px; margin-bottom: 20px;'; $objLayer->addToStr($image . $link); $string .= $objLayer->show(); $fileIdArray .= 'fileId[' . $count . '] = "' . $file['id'] . '";'; $filenameArray .= 'fileName[' . $count . '] = \'' . str_replace('&', '&', $thumbImg) . '\';'; if ($count == 0) { $defaultItem['id'] = $file['id']; $defaultItem['count'] = $count; } if ($defaultValue == $file['id']) { $defaultItem['id'] = $file['id']; $defaultItem['count'] = $count;
<?php $this->loadClass('htmlheading', 'htmlelements'); $this->loadClass('link', 'htmlelements'); $header = new htmlheading(); $header->type = 1; $header->cssClass = 'error'; $header->str = $this->objLanguage->code2Txt('mod_context_unabletoentercontext', 'context', NULL, 'Unable to enter [-context-]'); echo $header->show(); echo '<p>' . $this->objLanguage->code2Txt('mod_context_unabletoenterinfo', 'context', NULL, 'The [-context-] you tried to enter either does not exist, or is private with access restricted to members only.') . '</p>'; $objNav = $this->getObject('contextadminnav', 'contextadmin'); $str = $this->objLanguage->languageText('word_browse', 'glossary', 'Browse') . ': ' . $objNav->getAlphaListingAjax(); $str .= '<div id="browsecontextcontent"></div>'; $str .= $this->getJavaScriptFile('contextbrowser.js'); echo $str; $link = new link($this->uri(NULL, '_default')); $link->link = $this->objLanguage->languageText('phrase_backhome', 'system', 'Back to home'); echo '<p><br />' . $link->show() . '</p>';
$searchForm->addToForm($button->show()); // Create an Instance of the CSS Layout $cssLayout = $this->newObject('csslayout', 'htmlelements'); $objFolders = $this->getObject('dbfolder'); $objQuotas = $this->getObject('dbquotas'); $header = new htmlheading(); $header->type = 2; $header->str = $this->objLanguage->languageText('mod_filemanager_name', 'filemanager', 'File Manager'); $leftColumn = $header->show(); $tagCloudLink = new link($this->uri(array('action' => 'tagcloud'))); $tagCloudLink->link = 'Tag Cloud'; $leftColumn .= $searchForm->show() . '<ul><li>' . $tagCloudLink->show() . '</li>'; if ($objUser->isAdmin()) { $quotaManager = new link($this->uri(array('action' => 'quotamanager'))); $quotaManager->link = $this->objLanguage->languageText('mod_filemanager_quotamanager', 'filemanager', 'Quota Manager'); $leftColumn .= '<li>' . $quotaManager->show() . '</li>'; } $leftColumn .= '</ul>'; if (!isset($folderId)) { $folderId = ''; } if ($this->contextCode != '' && $this->getParam('context') != 'no') { $leftColumn .= '<div class="filemanagertree">' . $objFolders->getTree('context', $this->contextCode, 'dhtml', $folderId) . $objQuotas->getQuotaGraph('context/' . $this->contextCode) . '</div>'; $leftColumn .= '<br /><br /><br />'; } //$leftColumn .= $objFolders->showUserFolders($folderId); $leftColumn .= '<div class="filemanagertree">' . $objFolders->getTree('users', $this->objUser->userId(), 'dhtml', $folderId) . $objQuotas->getQuotaGraph('users/' . $this->objUser->userId()) . '</div>'; $leftColumn = "<div class='filemanager_left'>{$leftColumn}</div>"; $cssLayout->setLeftColumnContent($leftColumn); // Set the Content of middle column $ret = "<div class='filemanager_main'>" . $this->getContent() . "</div>";
$this->loadClass('htmlheading', 'htmlelements'); $this->loadClass('textinput', 'htmlelements'); $this->loadClass('label', 'htmlelements'); $this->loadClass('button', 'htmlelements'); $this->loadClass('link', 'htmlelements'); $this->loadClass('checkbox', 'htmlelements'); $objTabbedbox =& $this->newObject('tabbedbox', 'htmlelements'); $objIcon = $this->getObject('geticon', 'htmlelements'); $header = new htmlheading(); $header->type = 1; $header->str = $this->objContext->getTitle(); if ($this->isValid('addusers')) { $objIcon->setIcon('add'); $link = new link($this->uri(array('action' => 'viewsearchresults'))); $link->link = $objIcon->show(); $header->str .= ' ' . $link->show(); } echo $header->show(); // Lecturers $header = new htmlheading(); $header->type = 3; $header->str = ucwords($this->objLanguage->code2Txt('word_lecturers', 'system', NULL, '[-authors-]')); //$header->align = 'center'; //echo $header->show(); $objTable = $this->newObject('htmltable', 'htmlelements'); $objTable->cellpadding = 5; $objTable->cellspacing = 1; $objTable->id = "lecturerTable"; $objTable->css_class = "sorttable"; $objTable->startRow(); if ($this->isValid('removeallusers') && count($lecturerDetails) > 0) {
/** * Short description for function * * Long description (if any) ... * * @param string $userId Parameter description (if any) ... * @param unknown $path Parameter description (if any) ... * @return string Return description (if any) ... * @access public */ public function generateBreadcrumbsFromUserPath($userId, $path) { // users/1/archives/error_log/error_log $userPath = 'users/' . $userId; $regex = '/\\Ausers\\/' . $userId . '\\/'; $remainderPath = preg_replace($regex . '/', '', $path); $homeLink = new link($this->uri(NULL)); $homeLink->link = 'My Files'; $breadcrumbs = $homeLink->show(); $items = explode('/', $remainderPath); $itemCount = count($items); if ($itemCount > 0) { $counter = 1; foreach ($items as $item) { $userPath .= '/' . $item; if ($counter == $itemCount) { $breadcrumbs .= ' > ' . $item; } else { $itemLink = new link($this->uri(array('action' => 'viewfolder', 'folder' => $this->getFolderId($userPath)))); $itemLink->link = $item; $breadcrumbs .= ' > ' . $itemLink->show(); } $counter++; } } return $breadcrumbs; }
$conGroups[2] = array('id' => 'Guest', 'name' => $guestLabel); $objSelectBox->insertLeftOptions($conGroups, 'id', 'name'); $objSelectBox->insertRightOptions(array()); // Insert the selectbox into the form object. $objHead->str = $conGroupLabel; $objHead->type = 3; $objForm->addToForm('<p>' . $objHead->show() . '</p><p>' . $objSelectBox->show() . '</p>'); /* *********** Save and close buttons ************* */ $objButton = new button('save', $saveLabel); $objButton->setOnClick('submitPerms()'); $btns = '<p><br/>' . $objButton->show(); $objButton = new button('save', $closeLabel); $objButton->setOnClick('window.close()'); $btns .= ' ' . $objButton->show() . '</p>'; $objForm->addToForm($btns); /* ************ Show the form ************* */ $str .= $objForm->show(); /* ************ Restore default permissions ************ */ $objInput = new textinput('modulename', $moduleName); $objInput->fldType = 'hidden'; $objLink = new link('javascript:void(0)'); $objLink->extra = "onclick=\"restoreDefaults()\""; $objLink->link = $restoreLabel; $objForm = new form('restore', $this->uri(array('action' => 'restoreperms'))); $objForm->addToForm($objInput->show()); $objForm->addToForm($objLink->show()); $str .= '<p><br/>' . $objForm->show() . '</p>'; $objLayer = new layer(); $objLayer->str = $str; $objLayer->align = 'center'; echo $objLayer->show() . '<p> </p>';
/** * * Method to show a block for the userdetails module * * @access public * @return string $string The html string for the block display */ public function showBlock() { $bizcard = $this->showBizCard(FALSE); $objLink = new link($this->uri(NULL, 'userdetails')); $link = $objLink->show(); $string = $bizcard . '<br />' . $link; return $string; }
/** * Method to Show Sub Modal Window Open from Link */ private function showLink() { // Load the Link Class $this->loadClass('link', 'htmlelements'); // Create Link $link = new link($this->url); $link->link = $this->text; // Set class to submodal-[requiredwidth]-[requiredheight] $link->cssClass = 'submodal-' . $this->width . '-' . $this->height; // Return Link return $link->show(); }
$header = new htmlHeading(); $header->type = "1"; $header->cssClass = "useractivitytitle"; $header->str = $this->objLanguage->languageText('mod_contextcontent_toolsactivity', 'contextcontent', 'Tools activity') . ' - ' . $coursetitle . ' (' . $startdate . ' - ' . $enddate . ')'; $homelink = new link($this->uri(array("action" => "selecttoolsadates"))); $homelink->link = $this->objLanguage->languageText("word_back", "system", "Back"); $homelink->link = $this->objLanguage->languageText("word_back", "system", "Back"); $exportLink = new link($this->uri(array("action" => "exportospreadsheet", "assignmentid" => $assignment['id']))); $exportLink->link = $this->objLanguage->languageText('mod_assignment_export', 'assignment', 'Export to spreadsheet'); $exportStr = ' |  ' . $exportLink->show(); echo $header->show(); //echo '<br/>' . $homelink->show(); $table = $this->getObject('htmltable', 'htmlelements'); $table->startHeaderRow(); $table->addHeaderCell('No'); $table->addHeaderCell('Tool'); $table->addHeaderCell('Activity count'); $table->endHeaderRow(); $count = 1; foreach ($data as $row) { $link = new link($this->uri(array("action" => "showuseractivitybymodule", "startdate" => $startdate, "enddate" => $enddate, "moduleid" => $row['module_id'], "contextcode" => $contextcode))); $link->link = $row['module_id']; $table->startRow(); $table->addCell($count + "."); $table->addCell($link->show()); $table->addCell($row['activitycount']); $table->endRow(); $count++; } echo $table->show(); //echo $homelink->show();
$objListLink->link = $objIcon->show(); $objIcon->setIcon('thumbnailsview'); $objThumbLink->link = $objIcon->show(); //assigning a class value to the links to enable styling $objListLink->cssClass = $this->objLanguage->languageText("word_sexybutton", "system") . " listview"; $objThumbLink->cssClass = $this->objLanguage->languageText("word_sexybutton", "system") . " thumbnailview"; //get the current view $currentView = $this->getParam('view'); if ($currentView == "list" || $currentView == NULL) { $objThumbLink->cssId = "inactive"; } else { $objListLink->cssId = "inactive"; } //append the appropriate link to switch view //if($currentView == strtolower($this->objLanguage->languageText("phrase_thumbnailview","system"))){ $objViewHeading->str = "<div class='changeview'" . $this->objLanguage->languageText("phrase_changeview", "system") . "<br />" . $objListLink->show(); //} else{ $objViewHeading->str .= $objThumbLink->show(); $objViewHeading->str .= "</div>"; //} //append heading with link to form $objForm->addToForm($objViewHeading->show()); //append the form to the div element and then close the element $domElements['viewDiv']->setAttribute('innerHTML', $objForm->show()); if ($folderPermission2) { $fieldset = new fieldset(); $fieldset->setLegend($this->objLanguage->languageText('mod_filemanager_createafolder', 'filemanager', 'Create a Folder')); $fieldset->addContent($this->objFolders->showCreateFolderForm($folderId) . $domElements['viewDiv']->getAttribute('innerHTML')); echo $fieldset->show(); } $accessLink = "";
$button = new button('submitform', $this->objLanguage->languageText('mod_useradmin_updatedetails', 'useradmin', 'Update Details')); $button->setToSubmit(); // $button->setOnClick('validateForm()'); $form->addToForm('<p>' . $button->show() . '</p>'); $form->addRule('useradmin_firstname', $this->objLanguage->languageText('mod_userdetails_enterfirstname', 'userdetails'), 'required'); $form->addRule('useradmin_surname', $this->objLanguage->languageText('mod_userdetails_entersurname', 'userdetails'), 'required'); $form->addRule('useradmin_email', $this->objLanguage->languageText('mod_userdetails_enteremailaddress', 'userdetails'), 'required'); $form->addRule('useradmin_email', $this->objLanguage->languageText('mod_userdetails_entervalidemailaddress', 'userdetails'), 'email'); echo $form->show(); echo '</div>'; echo '<div><div style="width:25%; float: left; padding: 5px;">'; echo '<h3>' . $this->objLanguage->languageText('phrase_userimage', 'userdetails') . ':</h3>'; $objModule = $this->getObject('modules', 'modulecatalogue'); $changeimageform = new form('changeimage', $this->uri(array('action' => 'changeimage'))); $changeimageform->addToForm($useridinput->show()); if ($objModule->checkIfRegistered('filemanager')) { $objSelectFile = $this->getObject('selectimage', 'filemanager'); $objSelectFile->name = 'imageselect'; $objSelectFile->restrictFileList = array('jpg', 'gif', 'png', 'jpeg', 'bmp'); $changeimageform->addToForm($objSelectFile->show()); $button = new button('changeimage', $this->objLanguage->languageText('phrase_updateimage', 'userdetails')); $button->setToSubmit(); $changeimageform->addToForm('<br />' . $button->show()); } echo $changeimageform->show(); echo '</div>'; echo '</div>'; $returnlink = new link($this->uri(NULL)); $returnlink->link = 'Return to User Administration'; echo '<br clear="left" />' . $returnlink->show();
/** * Method to generate the postlogin side menu * @return string Generated menu */ public function show() { // Get menu items $options = $this->objMenu->getSideMenus('elearnpostlogin'); $objUserPic = $this->getObject('imageupload', 'useradmin'); $header = new htmlHeading(); $header->type = 2; $header->str = $this->objUser->fullName(); $str = ''; //$header->show(); $str .= '<p align="center"><img src="' . $objUserPic->userpicture($this->objUser->userId()) . '" alt="User Image" style="margin-bottom: 2px;" /></p>'; //$str .= '<br />'; // First add user pic //$str = $this->sideMenu->userDetails(); $objBlock = $this->getObject('blocks', 'blocks'); $str .= $objBlock->showBlock('mycontexts', 'context', NULL, 20, TRUE, FALSE); // If menu items exist if (count($options) > 0) { // Prepare items - will be sorted alphabetically $menuItems = array(); // Loop through items foreach ($options as $option) { // Get proper name of module $name = ucwords($this->objLanguage->code2Txt('mod_' . $option['module'] . '_name', $option['module'])); // Create link $link = new link($this->uri(NULL, $option['module'])); $link->link = $name; // add to array $menuItems[$name] = $link->show(); } // Sort alphabetically ksort($menuItems); // Generated proper menu $str .= '<ul id="nav-secondary">'; foreach ($menuItems as $item => $link) { $str .= '<li>' . $link . '</li>'; } $str .= '</ul><br />'; } return $str; }
} // Check if Student if (in_array($result['userid'], $students)) { $radio->setSelected('student'); } // Check if Lecturer if (in_array($result['userid'], $lecturers)) { $radio->setSelected('lecturer'); } $table->addCell($radio->show()); $table->endRow(); } $addUsersForm = new form('addusers', $this->uri(array('action' => 'addusers'))); $button = new button('submitform', $this->objLanguage->languageText('mod_contextgroups_updateuserroles', 'contextgroups')); $button->setToSubmit(); $button->extra = 'style="margin-right: 50px;"'; $hiddenInput = new hiddeninput('context', $contextCode); $addUsersForm->addToForm($hiddenInput->show()); $hiddenInput = new hiddeninput('changedItems', ''); // $hiddenInput->cssId = 'changedItems'; $hiddenInput->extra = 'id="changedItems"'; $addUsersForm->addToForm($hiddenInput->show()); $addUsersForm->addToForm($table->show()); $addUsersForm->addToForm('<p align="right">' . $button->show() . '</p>'); echo $addUsersForm->show(); echo '<p>' . $this->objLanguage->languageText('mod_contextgroups_browseresults', 'contextgroups', 'Browse Results') . ': ' . $paging . '</p>'; } $returnLink = new link($this->uri(NULL)); $returnLink->link = ucwords($this->objLanguage->code2Txt('phrase_returntocontextgroups', 'contextgroups')); echo '<p align="center">' . $returnLink->show() . '</p>';
$this->loadClass('htmlheading', 'htmlelements'); $this->loadClass('link', 'htmlelements'); $heading = new htmlheading(); $heading->type = 1; $heading->str = $helptitle; //.' '.$viewletHelp; $content = $heading->show() . $helptext; if (count($moduleHelp) > 0) { $content .= '<h5>Related Help for this Module</h5><ul>'; $link = new link(); foreach ($moduleHelp as $text) { if ($text['code'] == 'help_' . $module . '_about_title') { $helpItem = 'about'; } else { $helpItem = str_replace('help_' . $module . '_title_', '', $text['code']); } $link->href = $this->uri(array('action' => 'view', 'rootModule' => $module, 'helpid' => $helpItem)); $helpTitle = $objLanguage->code2Txt($text['code'], $module); if (strtoupper(substr($helpTitle, 0, 12)) == '[*HELPLINK*]') { $array = explode('/', $helpTitle); $helpTitle = $objLanguage->code2Txt('help_' . $array[1] . '_title_' . $array[2], $module); } $link->link = $helpTitle; $content .= '<li>' . $link->show() . '</li>'; } $content .= "</ul>"; } echo $content; //</div> //<div style="position: fixed; height: 40px; bottom: 0; left: 0; width:100%; right: 0; padding: 5px;" id="footer"><?php //echo $richHelp; //</div>
/** * * Get the link for the skin chooser * * @param string $canvas The canvas code * @param $canvasType The type of canvas (personal, skin) * @return string The formatted link * @access private * */ private function getSkinChooserLink($canvas, $canvasType = 'personal') { $ln = $this->uri(array('action' => 'ask', 'type' => $canvasType, 'key' => 'canvas', 'value' => $canvas), 'canvas'); $objLink = new link($ln); $objLink->link = $canvas; $objLink->rel = 'facebox'; //gb_page_center[640, 480] return $objLink->show(); }
/** * Standard block show method. * * @return string $this->display block rendered * @access public */ public function show() { $ret = ""; $persCan = $this->objLanguage->languageText("mod_canvas_typepersonal", "canvas"); $persUri = $this->uri(array('action' => 'select', 'ctype' => 'personal'), 'canvas'); // Only allow admin users to change the site skins if ($this->objUser->isAdmin()) { $skinCan = $this->objLanguage->languageText("mod_canvas_typeskin", "canvas"); $skinUri = $this->uri(array('action' => 'select', 'ctype' => 'skin'), 'canvas'); $objLink = new link($skinUri); $objLink->link = $skinCan; $ret .= $objLink->show(); } $objLink = new link($persUri); $objLink->link = $persCan; $ret .= "<br />" . $objLink->show(); return "<div class='canvas_selectblock'>{$ret}</div>"; }
// Get any header params or body onload parameters for objects on the toolbar. $menu->getParams($headerParams, $bodyOnLoad); } // Create a variable to hold the Footer depending on the login status. if (isset($footerStr)) { if (isset($this->footerNav)) { $this->footerNav->str = $footerStr; } else { $this->footerNav = new stdClass(); $this->footerNav->str = $footerStr; } } elseif ($objUser->isLoggedIn()) { $this->loadClass('link', 'htmlelements'); $link = new link($this->URI(array('action' => 'logoff'), 'security')); $link->link = $objLanguage->languageText("word_logout"); $footerStr = $objLanguage->languageText("mod_context_loggedinas", 'context') . ' <strong>' . $objUser->fullname() . '</strong> (' . $link->show() . ')'; } // Create an empty array for the header paramseters unless it is already set. if (!isset($headerParams)) { $headerParams = array(); } // Create an empty array for the body onload paramseters unless it is already set. if (!isset($bodyOnLoad)) { $bodyOnLoad = array(); } // Set the header style depending on whether we must suppress banner. if (isset($pageSuppressBanner)) { $headerStyle = "header_no_banner"; } else { $headerStyle = "header"; }
/** * Method to display the left menu with the index * * @access public * @return string html */ public function leftMenu() { $hdMenu = $this->objLanguage->languageText('word_menu'); $lnModules = $this->objLanguage->languageText('mod_logger_statisticsbymodule', 'logger'); $lnUser = $this->objLanguage->languageText('mod_logger_statisticsbyuser', 'logger'); $lnStatistics = $this->objLanguage->languageText('mod_logger_statistics', 'logger'); $lnPages = $this->objLanguage->languageText('mod_logger_pagespermodule', 'logger'); $lnCoursePages = $this->objLanguage->languageText('mod_logger_pagespercourse', 'logger'); $str = '<ul>'; $objLink = new link($this->uri('')); $objLink->link = $lnModules; $str .= '<li>' . $objLink->show() . '</li>'; if ($this->contextFlag) { $objLink = new link($this->uri(array('action' => 'showstatsbycontext'))); $objLink->link = $lnCoursePages; $str .= '<li>' . $objLink->show() . '</li>'; } $hasAccess = $this->objUser->isLecturer(); if ($hasAccess) { $userId = $this->objUser->userId(); $role = 'Lecturers'; $objContextGroups = $this->getObject('managegroups', 'contextgroups'); $lectRole = $objContextGroups->rolecontextcodes($userId, $role); if (!empty($lectRole)) { foreach ($lectRole as $myLectRole) { $contextTitle = $this->objContext->getField('title', $myLectRole); $objLink = new link($this->uri(array('action' => 'userstats'))); $objLink->link($this->uri(array('module' => 'logger', 'action' => 'statsbycontext', 'contextcode' => $myLectRole))); $objLink->link = $contextTitle . " " . $lnStatistics; $str .= '<li>' . $objLink->show() . '</li>'; } } } else { $userId = $this->objUser->userId(); $objContextGroups = $this->getObject('managegroups', 'contextgroups'); $studRole = $objContextGroups->rolecontextcodes($userId, $role = 'Students'); foreach ($studRole as $myStudRole) { $contextTitle = $this->objContext->getField('title', $myStudRole); $objLink = new link($this->uri(array('action' => 'userstats'))); $objLink->link($this->uri(array('module' => 'logger', 'action' => 'userstatsbycontext', 'userId' => $myStudRole['userid'], 'contextcode' => $myStudRole))); $objLink->link = $contextTitle . " " . $lnStatistics; $str .= '<li>' . $objLink->show() . '</li>'; } } /* $objLink = new link($this->uri(array('action' => 'userstats'))); $objLink->link = $lnUser; $str .= '<li>'.$objLink->show().'</li>'; $objLink = new link($this->uri('')); $objLink->link = $lnPages; $str .= '<li>'.$objLink->show().'</li>'; */ $str .= '</ul>'; return $this->objFeatureBox->show($hdMenu, $str); }
$link->link = 'Configure site parameters'; $objIcon->setIcon('computer'); $table->addCell($objIcon->show()); $table->addCell($link->show(), NULL, NULL, NULL, NULL, 'colspan="3"'); $table->endRow(); //Loop and give the module configs //$modules = array_reverse($modules); $rClass = 'even'; foreach ($modules as $module) { if ($module['pmodule'] != '_site_') { $rClass = $rClass == 'odd' ? 'even' : 'odd'; $table->startRow(); $link = new link($this->uri(array('action' => 'step2', 'pmodule_id' => $module['pmodule']))); $link->link = ucfirst($this->objLanguage->code2Txt('mod_' . $module['pmodule'] . '_name', $module['pmodule'])); $objIcon->setModuleIcon($module['pmodule']); $table->addCell($objIcon->show(), NULL, 'top', NULL, $rClass); $table->addCell($link->show(), NULL, 'top', NULL, $rClass); $table->addCell(ucfirst($this->objLanguage->code2Txt('mod_' . $module['pmodule'] . '_desc', $module['pmodule'])), NULL, 'top', NULL, $rClass); $table->addCell($module['paramcount'], '10%', 'top', NULL, $rClass); $table->endRow(); } } //Set up the title $this->loadClass('htmlheading', 'htmlelements'); $header = new htmlheading(); $header->type = 1; $header->str = $this->objLanguage->languageText("help_sysconfig_about_title", 'sysconfig'); $ret = $header->show() . "<br />" . $table->show(); $ret = "<div class='sysconfig_main'>{$ret}</div>"; $cssLayout->setMiddleColumnContent($ret); echo $cssLayout->show();
<?php $this->loadClass('link', 'htmlelements'); $this->loadClass('htmlheading', 'htmlelements'); $header = new htmlHeading(); $header->type = "1"; $header->cssClass = "useractivitytitle"; $header->str = ucfirst($this->objLanguage->code2Txt('mod_contextcontent_studentactivity', 'contextcontent', NULL, '[-readonly-] activity')) . ' - ' . $modulename . ' (' . $startdate . ' - ' . $enddate . ')'; $homelink = new link($this->uri(array("action" => "showuseractivitybymodule", "startdate" => $startdate, "enddate" => $enddate, "moduleid" => $modulename))); $homelink->link = $this->objLanguage->languageText("word_back", "system", "Back"); $exportLink = new link($this->uri(array("action" => "exportospreadsheet", "assignmentid" => $assignment['id']))); $exportLink->link = $this->objLanguage->languageText('mod_assignment_export', 'assignment', 'Export to spreadsheet'); $exportStr = ' |  ' . $exportLink->show(); echo $header->show(); echo $this->objUser->fullname($userid); //echo '<br/>'.$homelink->show(); $table = $this->getObject('htmltable', 'htmlelements'); $table->startHeaderRow(); $table->addHeaderCell('No'); $table->addHeaderCell('Date'); $table->addHeaderCell('Action'); $table->endHeaderRow(); $count = 1; foreach ($data as $row) { $table->startRow(); $table->addCell($count + "."); $table->addCell($row['createdon']); $table->addCell($row['action']); $table->endRow(); $count++; }
<?php $this->loadClass('link', 'htmlelements'); echo '<h1>' . $this->objLanguage->languageText('mod_filemanager_overwriteresults', 'filemanager', 'Overwrite Results') . '</h1>'; $results = explode('____', $results); $list = array(); foreach ($results as $result) { $result = explode('__', $result); if (count($result) == 2) { $file = $this->objFiles->getFile($result[0]); if ($file != FALSE) { $link = new link($this->uri(array('action' => 'fileinfo', 'id' => $file['id']))); $link->link = $file['filename']; switch ($result[1]) { case 'overwrite': $list[] = '<span class="confirm">' . $link->show() . ' - ' . $this->objLanguage->languageText('mod_filemanager_filehasbeenoverwritten', 'filemanager', 'file has been overwritten') . '</span>'; break; default: $list[] = $link->show() . ' - ' . $this->objLanguage->languageText('mod_filemanager_filehasnotbeenoverwritten', 'filemanager', 'file has been not been overwritten'); break; } } } } if (count($list) > 0) { echo '<ul>'; foreach ($list as $message) { echo '<li>' . $message . '</li>'; } echo '</ul>'; }
/** * Method to generate the actual toolbar */ private function generateOutput() { //See if the site map module is registered $isRegistered = $this->objModule->checkIfRegistered('sitemap'); if ($isRegistered) { $this->menuItems['sitemap'] = array('text' => $this->objLanguage->languageText('phrase_sitemap', 'sitemap', 'Site Map'), 'link' => $this->uri(NULL, 'sitemap')); } // Logout is always last $this->menuItems['logout'] = array('text' => $this->objLanguage->languageText('word_logout', 'system', 'Logout'), 'link' => $this->uri(array('action' => 'logoff'), 'security')); $str = '<span class="glossymenu"><ul class="glossytabs">'; foreach ($this->menuItems as $menuItem => $menuInfo) { $link = new link($menuInfo['link']); $link->link = '<strong>' . $menuInfo['text'] . '</strong>'; if (isset($menuInfo['title'])) { $link->title = $menuInfo['title']; } if (isset($menuInfo['class'])) { $link->cssClass = $menuInfo['class']; } $css = $this->default == $menuItem ? ' class="current"' : ''; $str .= '<li ' . $css . '>' . $link->show() . '</li>'; } if ($this->objModule->checkIfRegistered('bookmarks') && $this->objUser->isLoggedIn()) { if (!$this->objModule->checkIfRegistered('statusbar')) { $objBookmark = $this->getObject('bookmarksops', 'bookmarks'); $goto = $objBookmark->showGotoLink(); if (!empty($goto)) { $str .= '<li class="bookmark_icon">' . $goto . '</li>'; } $str .= '<li class="bookmark_icon">' . $objBookmark->showLink() . '</li>'; $this->params[] = $objBookmark->bookmarkParams(); } } $str .= '</ul></span>'; if ($this->objModule->checkIfRegistered('statusbar') && $this->objUser->isLoggedIn()) { $objStatusbar = $this->getObject('statusbarops', 'statusbar'); $str .= $objStatusbar->showStatusbar(); $this->params[] = $objStatusbar->statusbarParams(); } if ($this->contextCode != '') { $str .= $this->addContextLogoutJS(); } return $str; }
/** * Method to create a link for users to use the addthis.com service * @param string $url URL of Page * @return string addthis.com Link */ public function addThis($url = '') { // Check URL $url = $this->checkURL($url); // Create Link $addThis = new link('http://www.addthis.com/bookmark.php?pub=&url=' . $url); $addThis->link = '<img src="' . $this->getResourceURI('socialbookmarking/button1-bm.gif') . '" border="0" width="125" height="16" border="0" />'; return $addThis->show(); }
/** * Method to generate the actual toolbar */ private function generateOutput() { // Logout is always last if ($this->objUser->isLoggedIn()) { $this->menuItems['logout'] = array('text' => $this->objLanguage->languageText('word_logout', 'system', 'Logout'), 'link' => $this->uri(array('action' => 'logoff'), 'security')); } $str = '<ul class="glossytabs">'; foreach ($this->menuItems as $menuItem => $menuInfo) { $link = new link($menuInfo['link']); $link->link = '<strong>' . $menuInfo['text'] . '</strong>'; if (isset($menuInfo['title'])) { $link->title = $menuInfo['title']; } if (isset($menuInfo['class'])) { $link->cssClass = $menuInfo['class']; } $css = $this->default == $menuItem ? ' class="current"' : ''; $str .= '<li ' . $css . '>' . $link->show() . '</li>'; } $str .= '</ul>'; return $str; }