/**
  * Method to show the Side Bar
  *
  */
 public function show()
 {
     $str = '';
     $this->loadClass('htmlheading', 'htmlelements');
     $header = new htmlheading();
     $header->type = 2;
     $header->str = $this->objContext->getTitle();
     $str .= $header->show();
     // Put in the image for the context (course)
     $objContextImage = $this->getObject('contextimage');
     $contextImage = $objContextImage->getContextImage($this->contextCode);
     if ($contextImage !== FALSE) {
         $str .= '<p align="center"><img src="' . $contextImage . '" /></p><br />';
     }
     // Add the search form
     $str .= $this->searchForm();
     // Add all the context modules
     $objContextModules = $this->getObject('dbcontextmodules');
     $contextModules = $objContextModules->getContextModules($this->contextCode);
     $objModules = $this->getObject('modules', 'modulecatalogue');
     $nodes = array();
     $nodes[] = array('text' => ucwords($this->objLanguage->code2Txt('mod_context_contexthome', 'context', NULL, '[-context-] Home')), 'uri' => $this->uri(NULL, 'context'), 'nodeid' => 'context', 'css' => 'sidebarhomelink');
     if (count($contextModules) > 0) {
         foreach ($contextModules as $module) {
             $moduleInfo = $objModules->getModuleInfo($module);
             if ($moduleInfo['isreg']) {
                 // Make sure that Wall is not included as a link since it cannot be used this way
                 if (strtolower($module) !== 'wall') {
                     $nodes[] = array('text' => ucwords($moduleInfo['name']), 'uri' => $this->uri(NULL, $module), 'nodeid' => $module);
                 }
             }
         }
     }
     if ($this->objUser->isAdmin() || $this->objContextGroups->isContextLecturer()) {
         $nodes[] = array('text' => ucwords($this->objLanguage->code2Txt('mod_context_contextcontrolpanel', 'context', NULL, '[-context-] Control Panel')), 'uri' => $this->uri(array('action' => 'controlpanel'), 'context'), 'nodeid' => 'controlpanel');
     }
     $nodes[] = array('text' => ucwords($this->objLanguage->code2Txt('phrase_leavecourse', 'system', NULL, 'Leave [-context-]')), 'uri' => $this->uri(array('action' => 'leavecontext'), 'context'), 'nodeid' => 'leavecontext');
     $objSideBar = $this->getObject('sidebar', 'navigation');
     $objSideBar->showHomeLink = FALSE;
     if ($this->getParam('module') == 'context') {
         if ($this->getParam('action') == 'controlpanel') {
             $activeId = 'controlpanel';
         } else {
             $activeId = 'context';
         }
     } else {
         $activeId = $this->getParam('module');
     }
     $str .= $objSideBar->show($nodes, $activeId);
     return "<div class='context_sidebar'>{$str}</div>";
 }
$searchForm = new form('filesearch', $this->uri(array('action' => 'search')));
$searchForm->method = 'GET';
$hiddenInput = new hiddeninput('module', 'filemanager');
$searchForm->addToForm($hiddenInput->show());
$hiddenInput = new hiddeninput('action', 'search');
$searchForm->addToForm($hiddenInput->show());
$textinput = new textinput('filequery', $this->getParam('filequery'));
$searchForm->addToForm($textinput->show());
$button = new button('search', $this->objLanguage->languageText('word_search', 'system', 'Search'));
$button->setToSubmit();
$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 = '';
}
</script>
<?php 
// check if the site signup user string is set, if so, use it to populate the fields
if (isset($userstring)) {
    $userstring = base64_decode($userstring);
    $userstring = explode(',', $userstring);
} else {
    $userstring = NULL;
}
$this->loadClass('form', 'htmlelements');
$this->loadClass('dropdown', 'htmlelements');
$this->loadClass('radio', 'htmlelements');
$this->loadClass('textinput', 'htmlelements');
$this->loadClass('label', 'htmlelements');
$this->loadClass('htmlheading', 'htmlelements');
$header = new htmlheading();
$header->type = 1;
$header->str = $this->objLanguage->languageText('phrase_registeron', 'userregistration', 'Register on') . ' ' . $this->objConfig->getSitename();
echo '<div style="padding:10px;">' . $header->show();
$required = '<span class="required_field"> * ' . $this->objLanguage->languageText('word_required', 'system', 'Required') . '</span>';
$str = $this->objLanguage->languageText('mod_userregistration_firstneedtoregister', 'userregistration', 'In order to be able to access [[SITENAME]], you first need to register');
$str = str_replace('[[SITENAME]]', $this->objConfig->getSitename(), $str);
echo '<p>' . $str . '<br />';
echo $this->objLanguage->languageText('mod_userregistration_pleaseenterdetails', 'userregistration', 'Please enter your details, email address and desired user name in the form below.') . '</p>';
$form = new form('register', $this->uri(array('action' => 'register')));
$messages = array();
$table = $this->newObject('htmltable', 'htmlelements');
$table->startRow();
$username = new textinput('register_username');
$username->extra = "maxlength=255";
$usernameLabel = new label($this->objLanguage->languageText('word_username', 'system') . '&nbsp;', 'input_register_username');
Beispiel #4
0
                if (!empty($dCon)) {
                    $dCon .= ',';
                }
                $dCon .= $val;
            }
        }
        $permissions = $dAcl . '|' . $dGroup . '|_con_' . $dCon;
        if (isset($modData['isContext'])) {
            $dependsContext = $modData['isContext'];
        }
        if (isset($modData['isAdmin'])) {
            $adminOnly = $modData['isAdmin'];
        }
    }
}
$objHead = new htmlheading();
$objHead->str = $addHeading;
if ($mode == 'edit') {
    $objHead->str = $editHeading;
}
$objHead->type = 1;
$str = $objHead->show();
$str .= '<p><b>' . $moduleLabel . ':</b>&nbsp;&nbsp;' . $moduleName . '</p>';
$objTable->init();
$objTable->width = '99%';
$objTable->cellpadding = 5;
$objTable->startRow();
$objTable->addCell('', '30%');
$objTable->addCell('', '40%');
$objTable->addCell('', '10%');
$objTable->addCell('', '20%');
Beispiel #5
0
$this->loadClass('link', 'htmlelements');
$this->loadClass('form', 'htmlelements');
$this->loadClass('button', 'htmlelements');
$this->loadClass('hiddeninput', 'htmlelements');
$this->loadClass('formatfilesize', 'files');
$this->loadClass('htmlheading', 'htmlelements');
echo '<div id="filemanagerbreadcrumbs">' . $fileBreadrumbs . '</div>';
// Set for Layout Template
$this->setVar('folderId', $folderId);
$objIcon = $this->newObject('geticon', 'htmlelements');
$objFileIcons = $this->getObject('fileicons', 'files');
$objFileIcons->size = 'large';
$objIcon->setIcon('edit');
$editLink = new link($this->uri(array('action' => 'editfiledetails', 'id' => $file['id'])));
$editLink->link = $objIcon->show();
$header = new htmlheading();
$header->type = 1;
$header->str = $objFileIcons->getFileIcon($file['filename']) . ' ' . str_replace('_', ' ', htmlentities($file['filename']));
$fileDownloadPath = $this->objConfig->getcontentPath() . $file['path'];
$fileDownloadPath = $this->objCleanUrl->cleanUpUrl($fileDownloadPath);
$folder = $this->objFolders->getFolder($folderId);
if ($folder['access'] == 'private_all' || $folder['access'] == 'private_selected') {
    $fileDownloadPath = $this->uri(array("action" => "downloadsecurefile", "path" => $file['path'], "filename" => $file['filename']));
}
$accessKeyExists = false;
if (key_exists("access", $file)) {
    $accessKeyExists = true;
}
$visibilityKeyExists = false;
if (key_exists("visibility", $file)) {
    $visibilityKeyExists = true;
        line-height:120px;
        text-align:center;        
    }
    div.linkDiv{
        text-align:center;
    }
</style>
        ';
    $this->appendArrayVar('headerParams', $checkOpenerScript);
}
$objLayer = new layer();
$objLayer->position = 'absolute; top: 60px; right: 10px; bottom: 110px; left: 10px';
$objLayer->zIndex = '2; overflow-y:scroll; overflow-x:hidden';
$objLayer->addToStr($string);
$str .= $objLayer->show();
$objHeading = new htmlheading();
$objHeading->str = $uploadFile;
$objHeading->type = 1;
$string = $objHeading->show();
$this->objUpload->formaction = $this->uri(array('action' => 'selectfileuploads'));
$this->objUpload->numInputs = 1;
$mode = new hiddeninput('mode', 'selectimagewindow');
$name = new hiddeninput('name', $this->getParam('name'));
$context = new hiddeninput('context', $this->getParam('context'));
$workgroup = new hiddeninput('workgroup', $this->getParam('workgroup'));
$restrict = new hiddeninput('restrict', $this->getParam('restrict'));
$value = new hiddeninput('value', $this->getParam('value'));
$this->objUpload->formExtra = $mode->show() . $name->show() . $context->show() . $workgroup->show() . $value->show() . $restrict->show();
$string .= $this->objUpload->show();
$objLayer = new layer();
$objLayer->position = 'absolute; left: 10px; right: 10px; bottom: 10px';
 /**
  * Method to generate an edit context settings form
  * @param array $context Current Context Settings
  * @return str
  */
 public function editContextForm($context)
 {
     $header = new htmlheading();
     $header->type = 1;
     $header->str = $this->objLanguage->languageText('word_edit', 'system', 'Edit') . ': ' . $context['title'];
     $str = $header->show();
     $title = new textinput('title');
     $title->size = 50;
     if ($context != NULL) {
         $title->value = htmlentities($context['title']);
     }
     $titleLabel = new label($this->objLanguage->languageText('word_title', 'system', 'Title'), 'input_title');
     $status = new dropdown('status');
     //$status->setBreakSpace('<br />');
     $status->addOption('Published', $this->objLanguage->languageText('word_published', 'system', 'Published'));
     $status->addOption('Unpublished', $this->objLanguage->languageText('word_unpublished', 'system', 'Unpublished'));
     if ($context != NULL) {
         $status->setSelected($context['status']);
     }
     if ($this->objSysConfig->getValue('context_access_private_only', 'context', 'false') == 'true') {
         if (is_null($context)) {
             $access_ = 'Private';
         } else {
             $access_ = $context['access'];
         }
         $access = new hiddeninput('access', $access_);
     } else {
         $access = new radio('access');
         $access->setBreakSpace('<br />');
         $access->addOption('Public', '<strong>' . $this->objLanguage->languageText('word_public', 'system', 'Public') . '</strong> - <span class="caption">' . ucfirst($this->objLanguage->code2Txt('mod_context_publiccontextdescription', 'context', NULL, '[-context-] can be accessed by all users, including anonymous users')) . '</span>');
         $access->addOption('Open', '<strong>' . $this->objLanguage->languageText('word_open', 'system', 'Open') . '</strong> - <span class="caption">' . ucfirst($this->objLanguage->code2Txt('mod_context_opencontextdescription', 'context', NULL, '[-context-] can be accessed by all users that are logged in')) . '</span>');
         $access->addOption('Private', '<strong>' . $this->objLanguage->languageText('word_private', 'system', 'Private') . '</strong> - <span class="caption">' . $this->objLanguage->code2Txt('mod_context_privatecontextdescription', 'context', NULL, 'Only [-context-] members can enter the [-context-]') . '<span class="caption">');
         if ($context != NULL) {
             $access->setSelected($context['access']);
         } else {
             $access->setSelected('Public');
         }
     }
     $table = $this->newObject('htmltable', 'htmlelements');
     if ($context != NULL) {
         $table->startRow();
         $table->addCell(ucwords($this->objLanguage->code2Txt('mod_context_contextcode', 'context', NULL, '[-context-] Code')) . ':', 100);
         $table->addCell('<strong>' . $context['contextcode'] . '</strong>');
         $table->endRow();
     } else {
         $code = new textinput('contextcode');
         $codeLabel = new label(ucwords($this->objLanguage->code2Txt('mod_context_contextcode', 'context', NULL, '[-context-] Code')), 'input_contextcode');
         $table->startRow();
         $table->addCell($codeLabel->show(), 100);
         $table->addCell($code->show() . ' <span id="contextcodemessage"></span>');
         $table->endRow();
     }
     $table->startRow();
     $table->addCell($titleLabel->show() . ':');
     $table->addCell($title->show());
     $table->endRow();
     $table->startRow();
     $table->addCell('&nbsp;');
     $table->addCell('&nbsp;');
     $table->endRow();
     $table->startRow();
     $table->addCell($this->objLanguage->languageText('word_status', 'system', 'Status') . ':');
     $table->addCell($status->show());
     $table->endRow();
     if ($this->objSysConfig->getValue('context_access_private_only', 'context', 'false') == 'false') {
         $table->startRow();
         $table->addCell($this->objLanguage->languageText('word_access', 'system', 'Access') . ':');
         $table->addCell($access->show());
         $table->endRow();
     }
     $alerts = explode("|", $context['alerts']);
     $emailAlert = new checkbox('emailalertopt', $this->objLanguage->languageText('mod_contextadmin_emailalert', 'contextadmin', 'Email alerts'), $alerts[0] == 'e' || $alerts[0] == '1');
     // this will checked
     //$alerts=array();
     //$emailchecked=;
     //$emailAlert->setChecked(FALSE);
     //if($emailchecked) {
     //    $emailAlert->setChecked($emailchecked);
     //}
     $table->startRow();
     $table->addCell($this->objLanguage->languageText('mod_contextadmin_emailalert', 'contextadmin', 'Alerts'));
     $table->addCell($emailAlert->show());
     $table->endRow();
     $objSelectImage = $this->getObject('selectimage', 'filemanager');
     $objSelectImage->context = TRUE;
     $table2 = $this->newObject('htmltable', 'htmlelements');
     $table2->startRow();
     $table2->addCell($table->show(), 600, NULL, NULL, NULL, 'colspan="2"');
     $table2->addCell($objSelectImage->show());
     $table2->endRow();
     $table2->startRow();
     $table2->addCell('&nbsp;');
     $table2->addCell('&nbsp;');
     $table2->addCell('&nbsp;');
     $table2->endRow();
     $table2->startRow();
     $table2->addCell(ucwords($this->objLanguage->code2Txt('mod_context_aboutcontext', 'context', NULL, 'About [-context-]')) . ':', 100);
     $htmlEditor = $this->newObject('htmlarea', 'htmlelements');
     $htmlEditor->name = 'about';
     $htmlEditor->toolbarSet = 'advanced';
     if ($context != NULL) {
         $htmlEditor->value = $context['about'];
     }
     $table2->addCell($htmlEditor->show(), NULL, NULL, NULL, NULL, 'colspan="2"');
     $table2->endRow();
     $table2->startRow();
     $table2->addCell('&nbsp;');
     $table2->addCell('&nbsp;');
     $table2->addCell('&nbsp;');
     $table2->endRow();
     $table2->startRow();
     $table2->addCell('&nbsp;', 100);
     if ($context == NULL) {
         $button = new button('savecontext', $formButton);
     } else {
         $button = new button('savecontext', ucwords($this->objLanguage->code2Txt('mod_context_updatecontext', 'context', NULL, 'Update [-context-]')));
     }
     $button->setToSubmit();
     $table2->addCell($button->show(), NULL, NULL, NULL, NULL, 'colspan="2"');
     $table2->endRow();
     $form = new form('createcontext', $this->uri(array('action' => $this->formAction), $this->formModule));
     $form->addToForm($table2->show());
     if ($this->objSysConfig->getValue('context_access_private_only', 'context', 'false') == 'true') {
         $form->addToForm($access->show());
     }
     if ($context != NULL) {
         $hiddenInput = new hiddeninput('contextcode', $context['contextcode']);
         $form->addToForm($hiddenInput->show());
     }
     $form->addRule('title', $this->objLanguage->code2Txt('mod_context_entertitleofcontext', 'context', NULL, 'Please enter the title of your [-context-]'), 'required');
     $str .= $form->show();
     return $str;
 }
 /**
  * Method to display the context pages visited by a user
  * @added by Paul Mungai
  * @access public
  * @return string html
  */
 public function getVisitedPages($userId = NULL, $contextCode = NULL, $module = NULL)
 {
     $this->objUserLoginHistory = $this->getObject('userloginhistory', 'security');
     $hdCoursePages = $this->objLanguage->languageText('mod_logger_visitedpageshistory', 'logger');
     $lbFullName = $this->objLanguage->languageText('mod_logger_fullname', 'logger');
     $lbUserAccesses = $this->objLanguage->languageText('mod_logger_totalUserAccesses', 'logger');
     $lbFirstLogin = $this->objLanguage->languageText('mod_logger_firstLogin', 'logger');
     $lbLastLogin = $this->objLanguage->languageText('mod_logger_lastLogin', 'logger');
     $lbWordNo = $this->objLanguage->languageText('mod_logger_wordNo', 'logger');
     $lbPageName = $this->objLanguage->languageText('mod_logger_pageName', 'logger');
     $lbAccessTime = $this->objLanguage->languageText('mod_logger_accessTime', 'logger');
     if ($userId == NULL) {
         $userId = $this->objUser->userId();
     }
     //get user login info
     $userLastLogin = $this->objUserLoginHistory->doGetLastLogin($userId);
     $userFirstLogin = $this->objUserLoginHistory->doGetFirstLogin($userId);
     $userLookUp = $this->objUser->lookupData($this->objUser->userName($userId));
     $objTable = new htmltable();
     $objTable->width = '100%';
     $objTable->border = '0';
     $objTable->cellspacing = '0';
     $objTable->cellpadding = '10';
     $objTable->startRow();
     $objTable->addCell("<b>" . $lbFullName . ": </b>" . $this->objUser->fullname($userId), '40%', 'top', 'left');
     $objTable->addCell("<b>" . $lbUserAccesses . ": </b>" . $userLookUp['logins'], '60%', 'top', 'left');
     $objTable->endRow();
     $objTable->startRow();
     $objTable->addCell("<b>" . $lbFirstLogin . ": </b>" . $userFirstLogin, '40%', 'top', 'left');
     $objTable->addCell("<b>" . $lbLastLogin . ": </b>" . $userLastLogin, '60%', 'top', 'left');
     $objTable->endRow();
     if ($contextCode == Null) {
         $sql = $this->logShow->userLoggerDetails($userId, $contextCode = Null, $module);
     } elseif ($module == Null) {
         $sql = $this->logShow->userLoggerDetails($userId, $contextCode, $module = Null);
     } else {
         $sql = $this->logShow->userLoggerDetails($userId, $contextCode, $module);
     }
     $contexts = array();
     $key = 0;
     foreach ($sql as $myContext) {
         $contexts[$key] = $myContext['context'];
         $key = $key + 1;
     }
     //Remove duplicate values from the array
     $userContexts = array_unique($contexts);
     $objHead = new htmlheading();
     $objHead->str = ucwords($hdCoursePages);
     $objHead->type = 2;
     $objHead->align = 'center';
     $str = $objHead->show() . "<br />" . $objTable->show() . "<br />";
     $class = 'even';
     foreach ($userContexts as $thisContext) {
         $contextTitle = $this->objContext->getField('title', $thisContext);
         $objTable = new htmltable();
         $objTable->width = '100%';
         $objTable->border = '0';
         $objTable->cellspacing = '0';
         $objTable->cellpadding = '10';
         $objTable->startRow();
         $objTable->addHeaderCell("<b>" . $contextTitle . "</b>", '100%', 'top', 'left', Null, 'colspan=3');
         $objTable->endRow();
         $objTable->startRow();
         $objTable->addCell("<b>" . $lbWordNo . ".</b>", '5%', 'top', 'left');
         $objTable->addCell("<b>" . $lbPageName . "</b>", '75%', 'top', 'left');
         $objTable->addCell("<b>" . $lbAccessTime . "</b>", '25%', 'top', 'left');
         $objTable->endRow();
         $mySql = $this->logShow->userLoggerDetails($userId, $thisContext, $module = 'contextcontent');
         $key = 1;
         $eventparamvalue = array();
         $dateCreated = array();
         foreach ($mySql as $myContext) {
             $eventparamvalue[$key] = $myContext['eventparamvalue'];
             $dateCreated[$key] = $myContext['datecreated'];
             $strEventParamValue = explode('=', $eventparamvalue[$key], 2);
             $action = $strEventParamValue[0];
             $param = $strEventParamValue[1];
             if ($action == 'id') {
                 $strParam = explode('&', $param, 2);
                 $pageId = $strParam[0];
                 //i.e. gen5Srv7Nme24_1731_1217434951
                 $paramMsg = $strParam[1];
                 //i.e. message=&action=viewpage
             } elseif ($action !== 'NULL') {
                 $action = $strEventParamValue[0];
                 //i.e. action
                 $param = $strEventParamValue[1];
                 //i.e. viewpage&id=gen5Srv7Nme24_54
                 $strParam = explode('&', $param, 2);
                 $paramAction = $strParam[0];
                 //viewpage
                 $paramId = $strParam[1];
                 //id=gen5Srv7Nme24_5450_1216228562
                 $strId = explode('=', $paramId, 2);
                 $nameId = $strId[0];
                 //id
                 $pageId = $strId[1];
                 //gen5Srv7Nme24_5450_1216228562
             }
             if ($this->contextFlag) {
                 //Get page title
                 $thisPageTitle = $this->objContentOrder->getPage($pageId, $thisContext);
             } else {
                 $thisPageTitle['menutitle'] = array();
             }
             $pageTitle = $thisPageTitle['menutitle'];
             if (!empty($pageTitle)) {
                 $objTable->startRow();
                 $objTable->addCell($key, Null, 'top', 'left', $class);
                 $objTable->addCell($pageTitle, Null, 'top', 'left', $class);
                 $objTable->addCell($dateCreated[$key], Null, 'top', 'left', $class);
                 $objTable->endRow();
                 $key = $key + 1;
                 if ($class == 'odd') {
                     $class = 'even';
                 } else {
                     $class = 'odd';
                 }
             }
         }
         $str .= $objTable->show() . "<br />";
     }
     return $str . "<br />";
 }
Beispiel #9
0
 /**
  * Method to get the about form
  * @return string
  * @param string $contextCode
  * @access public
  */
 public function getAboutForm($contextCode = '')
 {
     if (empty($contextCode)) {
         $contextCode = $this->_objDBContext->getContextCode();
     }
     //add step 1 template
     $objH = new htmlheading();
     $objForm = new form();
     $inpContextCode = new textinput();
     $inpMenuText = new textinput();
     $inpAbout = $this->newObject('htmlarea', 'htmlelements');
     $inpButton = new button();
     $objH->str = $this->_objLanguage->code2Txt("mod_context_aboutthecontext", 'context', array('context' => 'Course'));
     $objH->type = 3;
     //setup the form
     $objForm->name = 'addfrm';
     $objForm->action = $this->uri(array('action' => 'saveaboutedit'));
     //$objForm->extra = 'class="f-wrap-1"';
     $objForm->displayType = 3;
     $inpAbout->name = 'about';
     $inpAbout->id = 'about';
     $inpAbout->value = '';
     $contextLine = $this->_objDBContext->getRow('contextcode', $this->_objDBContext->getContextCode());
     $inpAbout->setContent($contextLine['about']);
     //$inpAbout->cssClass = 'f-comments';
     $inpButton->setToSubmit();
     $inpButton->cssClass = 'f-submit';
     $inpButton->value = $this->_objLanguage->languageText("word_save");
     //validation
     //$objForm->addRule('about','About is a required field!', 'required');
     //$objForm->addToForm('<div class="req"><b>*</b> Indicates required field</div>');
     //$objForm->addToForm('<fieldset>');
     $objForm->addToForm($objH->show());
     //$objForm->addToForm('</fieldset><b><span class="req">*</span>About:</b>');
     $objForm->addToForm($inpAbout->show());
     $objForm->addToForm('<div class="f-submit-wrap">' . $inpButton->show() . '<br /></div>');
     return $objForm->show() . '<br/>';
     //return $inpAbout->show();
 }
Beispiel #10
0
    }
    //Add content sideblocks to options
    if (!empty($contentSmallBlocks)) {
        foreach ($contentSmallBlocks as $contentSmallBlock) {
            $block = $this->objBlocks->showBlock($contentSmallBlock["id"], "contentblocks");
            $rightBlocksDropDown->addOption('block|' . $contentSmallBlock["id"] . '|' . "contentblocks", htmlentities($contentSmallBlock["title"]) . '(contentblocks)');
            $leftBlocksDropDown->addOption('block|' . $contentSmallBlock["id"] . '|' . "contentblocks", htmlentities($contentSmallBlock["title"]) . '(contentblocks)');
        }
    }
    $button = new button('addrightblock', $objLanguage->languageText('mod_prelogin_addblock', 'prelogin', 'Add Block'));
    $button->cssId = 'rightbutton';
    $value = $objLanguage->languageText('mod_context_turneditingon', 'context', 'Turn Editing On');
    $objEdBut = $this->getObject('buildcanvas', 'canvas');
    $editBut = $objEdBut->getSwitchButton($value);
}
$header = new htmlheading();
$header->type = 3;
$header->str = $objLanguage->languageText('mod_context_addablock', 'context', 'Add a Block');
$toolbar = $this->getObject('contextsidebar');
$contextContentIsRegistered = $objModule->checkIfRegistered('contextcontent');
$utillink = "";
$this->dbSysConfig = $this->getObject('dbsysconfig', 'sysconfig');
$showAdminShortcutBlock = $this->dbSysConfig->getValue('SHOW_SHORTCUTS_BLOCK', 'context');
if ($showAdminShortcutBlock == "TRUE" || $showAdminShortcutBlock == "true" || $showAdminShortcutBlock == "True") {
    if ($this->isValid('addblock')) {
        $trackerlink = "";
        $siteRoot = $objConfig->getsiteRoot();
        $moduleUri = $objConfig->getModuleURI();
        $imgPath = "";
        $objIcon->setIcon('plus');
        $plusIcon = $objIcon->show();
Beispiel #11
0
<?php

$ret = "";
$this->loadClass('htmlheading', 'htmlelements');
$header = new htmlheading();
$header->type = 1;
$header->str = ucwords($title);
$ret .= $header->show();
if ($this->getParam('message') != '') {
    switch ($this->getParam('message')) {
        default:
            $message = '';
            break;
        case 'contextupdated':
            $contextcode = $this->getParam('contextcode', Null);
            //Get Context Title
            $title = $this->objContext->getTitle($contextcode);
            if (empty($title)) {
                $title = $this->objContext->getMenuText($contextcode);
            }
            $message = $title . ' ' . $this->objLanguage->languageText('mod_contextadmin_successfullyupdated', 'contextadmin', 'has been successfully updated') . '!';
            break;
        case 'contextdeleted':
            $message = $this->getParam('title') . ' ' . $this->objLanguage->languageText('mod_contextadmin_hasbeendeleted', 'contextadmin', 'has been successfully deleted');
            break;
    }
    if ($message != '') {
        $this->setSession('displayconfirmationmessage', FALSE);
        $timeoutMessage = $this->getObject('timeoutmessage', 'htmlelements');
        $timeoutMessage->setMessage($message);
        $timeoutMessage->timeout = 10000;
<?php

$this->objFileIcons = $this->getObject('fileicons', 'files');
$this->loadClass('form', 'htmlelements');
$this->loadClass('checkbox', 'htmlelements');
$this->loadClass('htmlheading', 'htmlelements');
$this->loadClass('label', 'htmlelements');
$this->loadClass('button', 'htmlelements');
$this->loadClass('hiddeninput', 'htmlelements');
$this->loadClass('textarea', 'htmlelements');
$heading = new htmlheading();
$heading->type = 1;
$heading->str = $this->objLanguage->languageText('mod_filemanager_editfiledetails', 'filemanager', 'Edit File Details') . ': ' . $file['filename'];
echo $heading->show();
$form = new form('updatefiledetails', $this->uri(array('action' => 'updatefiledetails')));
$table = $this->newObject('htmltable', 'htmlelements');
$table->startRow();
$label = new label($this->objLanguage->languageText('word_description', 'system', 'Description') . ':', 'input_description');
$table->addCell($label->show());
$description = new textarea('description');
$description->value = $file['description'];
$table->addCell($description->show());
$table->endRow();
$table->startRow();
$label = new label($this->objLanguage->languageText('mod_filemanager_keywordstags', 'filemanager', 'Keywords/Tags') . ':<br />' . $this->objLanguage->languageText('mod_filemanager_separatewithcommas', 'filemanager', 'Separate with commas'), 'input_keywords');
$table->addCell($label->show());
$keywords = new textarea('keywords');
$keywordsList = '';
if (count($tags) > 0) {
    $comma = '';
    foreach ($tags as $tag) {
Beispiel #13
0
* */
// set up body parameter
if ($mode == 'addsystem' || $mode == 'editsystem') {
    $this->setVar('bodyParams', ' onload = "{document.getElementById(\'input_systemtype\').focus();document.getElementById(\'input_systemtype\').select();}"');
} elseif ($mode == 'addtext') {
    $this->setVar('bodyParams', ' onload = "{document.getElementById(\'input_text\').focus();document.getElementById(\'input_text\').select();}"');
} elseif ($mode == 'edittext' && $canDelete != 'N') {
    $this->setVar('bodyParams', ' onload = "{document.getElementById(\'input_text\').focus();document.getElementById(\'input_text\').select();}"');
}
// set up html elements
$this->loadClass('htmlheading', 'htmlelements');
$this->loadClass('textinput', 'htmlelements');
$this->loadClass('link', 'htmlelements');
$this->loadClass('button', 'htmlelements');
$this->loadClass('form', 'htmlelements');
$objHeader = new htmlheading();
$objTable =& $this->newObject('htmltable', 'htmlelements');
$objText = new textinput();
$objLink = new link();
$objButton = new button();
$objForm = new form();
$objIcon =& $this->newObject('geticon', 'htmlelements');
// set up language items
$header = $this->objLanguage->languageText('mod_systext_name', 'systext');
$systemLabel = $this->objLanguage->languageText('mod_systext_system', 'systext');
$textLabel = $this->objLanguage->languageText('mod_systext_text', 'systext');
$nosystemLabel = $this->objLanguage->languageText('mod_systext_nosystem', 'systext');
$notextLabel = $this->objLanguage->languageText('mod_systext_notext', 'systext');
$addsystemLabel = $this->objLanguage->languageText('mod_systext_addsystem', 'systext');
$newsystemLabel = $this->objLanguage->languageText('mod_systext_newsystem', 'systext');
$addtextLabel = $this->objLanguage->languageText('mod_systext_addtext', 'systext');
 /**
  * Method to display the navigation
  */
 public function show()
 {
     $str = '';
     $heading = new htmlheading();
     $heading->type = 2;
     $heading->str = ucwords($this->objLanguage->code2Txt('mod_contextadmin_name', 'contextadmin', NULL, '[-context-] Admin'));
     $str = $heading->show();
     $str .= '<ul id="nav-secondary">';
     $mycoursesLink = new link($this->uri(NULL));
     $mycoursesLink->link = ucwords($this->objLanguage->code2Txt('phrase_mycourses', 'system', NULL, 'My [-contexts-]'));
     $str .= '<li>' . $mycoursesLink->show() . '</li>';
     $objUser = $this->getObject('user', 'security');
     if ($objUser->isAdmin() || $objUser->isLecturer()) {
         $createCourse = new link($this->uri(array('action' => 'add')));
         $createCourse->link = ucwords($this->objLanguage->code2Txt('mod_contextadmin_createcontext', 'contextadmin', NULL, 'Create [-context-]'));
         $str .= '<li>' . $createCourse->show() . '</li>';
     }
     $str .= '</ul>';
     $heading = new htmlheading();
     $heading->type = 3;
     $heading->str = ucwords($this->objLanguage->code2Txt('mod_contextadmin_searchforcontext', 'contextadmin', NULL, 'Search for [-context-]'));
     $str .= '<br />' . $heading->show();
     $form = new form('searchform', $this->uri(array('action' => 'search')));
     $form->method = 'GET';
     $module = new hiddeninput('module', $this->getParam('module', 'contextadmin'));
     $action = new hiddeninput('action', 'search');
     $textinput = new textinput('search', $this->getParam('search'));
     $button = new button('searchbutton', $this->objLanguage->languageText('word_search', 'system', 'Search'));
     $button->setToSubmit();
     $form->addToForm($module->show() . $action->show() . $textinput->show() . $button->show());
     $str .= $form->show();
     $heading = new htmlheading();
     $heading->type = 3;
     $heading->str = ucwords($this->objLanguage->code2Txt('phrase_browsecourses', 'system', NULL, 'Browse [-contexts-]'));
     $str .= $heading->show();
     $str .= $this->getAlphaListingTable();
     return $str;
 }
Beispiel #15
0
<?php

//Set up the CSS Layout
$cssLayout = $this->newObject('csslayout', 'htmlelements');
$cssLayout->setNumColumns(2);
$this->loadClass('htmlheading', 'htmlelements');
$header = new htmlheading();
$header->type = 1;
$header->str = $this->objLanguage->languageText("mod_sysconfig_edtxt", 'sysconfig');
$left = "<div class='sysconfig_left'>" . $this->objLanguage->languageText("mod_sysconfig_edlabel", 'sysconfig') . "</div><br />&nbsp;<br />";
$cssLayout->setLeftColumnContent($left);
$middle = $header->show() . $str;
$middle = "<div class='sysconfig_main'>{$middle}</div>";
$cssLayout->setMiddleColumnContent($middle);
echo $cssLayout->show();
Beispiel #16
0
<?php

//<div style="padding-bottom: 60px;">
$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;
Beispiel #17
0
<?php

$this->loadClass('link', 'htmlelements');
//Set up the CSS Layout
$cssLayout = $this->newObject('csslayout', 'htmlelements');
$cssLayout->setNumColumns(2);
//Set up the title depending on system or module params
$this->loadClass('htmlheading', 'htmlelements');
$header = new htmlheading();
$header->type = 1;
$pgHd = $pmodule;
$objIcon = $this->newObject('geticon', 'htmlelements');
if ($pmodule == '_site_') {
    $pgHd = $leftText = $this->objLanguage->languageText("mod_sysconfig_editsys", 'sysconfig');
    $leftText = $this->objLanguage->languageText("mod_sysconfig_step2s", 'sysconfig');
    //Create the table for the output
    $objTable = $this->newObject('htmltable', 'htmlelements');
    $objConfig = $this->newObject('altconfig', 'config');
    $objTable->cellpadding = 5;
    $objTable->width = '100%';
    //Get the special delete icon to work with confirm
    $objDelIcon = $this->newObject('geticon', 'htmlelements');
    $objDelIcon->setIcon("delete");
    $objDelIcon->alt = $this->objLanguage->languageText("word_delete");
    //Add a row
    $objTable->startRow();
    $objTable->addCell("<b>" . $this->objLanguage->languageText("mod_sysconfig_paramname", 'sysconfig') . "</b>", "40%", NULL, "LEFT", "heading");
    $objTable->addCell("<b>" . $this->objLanguage->languageText("mod_sysconfig_paramvalue", 'sysconfig') . "</b>", "50%", NULL, "LEFT", "heading");
    $objTable->addCell("<b>" . $this->objLanguage->languageText("mod_sysconfig_action", 'sysconfig') . "</b>", "10%", NULL, "RIGHT", "heading");
    $objTable->endRow();
    $xml = $objConfig->readConfig('', 'XML');
 /**
  * Method to Display the Business Card
  * @return string
  */
 public function show()
 {
     switch ($this->userArray['sex']) {
         case 'M':
             $gender = 'Male';
             break;
         case 'F':
             $gender = 'Female';
             break;
         default:
             $gender = 'Unknown';
             break;
     }
     $emailLabel = $this->objLanguage->languageText('phrase_emailaddress');
     $genderLabel = $this->objLanguage->languageText('word_gender');
     $mobileLabel = $this->objLanguage->languageText('phrase_mobilenumber');
     $countryLabel = $this->objLanguage->languageText('word_country');
     $image = $this->objUser->getUserImage($this->userArray['userid'], TRUE);
     if ($this->showResetImage) {
         if ($this->objUser->hasCustomImage($this->userArray['userid'])) {
             $resetimageform = new form('updateimage', $this->uri(array('action' => $this->resetAction), $this->resetModule));
             $id = new hiddeninput('id', $this->userArray['id']);
             $resetimageform->addToForm($id->show());
             $userid = new hiddeninput('userid', $this->userArray['userid']);
             $resetimageform->addToForm($userid->show());
             $button = new button('resetimage', 'Reset Image');
             $button->setToSubmit();
             $resetimageform->addToForm(' ' . $button->show());
             $image .= $resetimageform->show();
         }
     }
     $objHeading = new htmlheading();
     $objHeading->str = $this->userArray['title'] . ' ' . $this->userArray['firstname'] . ' ' . $this->userArray['surname'];
     $objHeading->type = 1;
     $heading = $objHeading->show();
     $objTable = new htmltable();
     $objTable->width = '100%';
     $objTable->cellpadding = '4';
     $objTable->startRow();
     $objTable->addCell($image, '25%', 'center', 'center', 'userbizcardleft', 'rowspan="6"');
     $objTable->endRow();
     $objTable->startRow();
     $objTable->addCell('<strong>' . ucfirst(strtolower($emailLabel)) . ':</strong>', '30%', '', '', 'heading', '');
     $objTable->addCell($this->userArray['emailaddress'], '', '', '', 'heading', '');
     $objTable->endRow();
     $objTable->startRow();
     $objTable->addCell('<strong>' . $mobileLabel . ':</strong>', '', '', '', 'heading', '');
     $objTable->addCell($this->userArray['cellnumber'], '', '', '', 'heading', '');
     $objTable->endRow();
     $objTable->startRow();
     $objTable->addCell('<strong>' . $countryLabel . ':</strong>', '', '', '', 'heading', '');
     $objTable->addCell($this->objCountries->getCountryName($this->userArray['country']) . ' ' . $this->objCountries->getCountryFlag($this->userArray['country']), '', '', '', 'heading', '');
     $objTable->endRow();
     $objTable->startRow();
     $objTable->addCell('<strong>' . $genderLabel . ':</strong>', '', '', '', 'heading', '');
     $objTable->addCell($gender, '', '', '', 'heading', '');
     $objTable->endRow();
     $string = $objTable->show();
     $objFieldset = new fieldset();
     $objFieldset->legend = $heading;
     $objFieldset->contents = $string;
     $objFieldset->width = '500px';
     $fieldset = $objFieldset->show();
     return $fieldset;
 }
 /**
  *
  * Get the header that appears above each add block dropdown
  * when editing is turned on.
  *
  * @return string The header HTML text
  * @access private
  *
  */
 private function getHeader()
 {
     $header = new htmlheading();
     $header->type = 3;
     $header->str = $this->objLanguage->languageText('mod_context_addablock', 'context', 'Add a Block');
     return $header->show();
 }
Beispiel #20
0
$headerTitle = $context['title'] . ' - ' . $this->objLanguage->code2Txt('mod_contextadmin_outcomes', 'contextadmin', NULL, '[-context-] Outcomes');
$formButton = $this->objLanguage->languageText('mod_contextadmin_gotonextstep', 'contextadmin', 'Go to Next Step');
$deleteLOButton = $this->objLanguage->languageText('mod_contextadmin_deleteselected', 'contextadmin', 'Delete Selected');
$addLOButton = $this->objLanguage->languageText('mod_contextadmin_addselected', 'contextadmin', 'Add Selected');
$objStepMenu = $this->newObject('stepmenu', 'navigation');
if ($mode == 'edit') {
    $objStepMenu->addStep(str_replace('[-num-]', 1, $this->objLanguage->code2Txt('mod_contextadmin_stepnumber', 'contextadmin', NULL, 'Step [-num-]')) . ' - ' . ucwords($this->objLanguage->code2Txt('mod_context_contextsettings', 'context', NULL, '[-context-] Settings')), ucwords($this->objLanguage->code2Txt('mod_contextadmin_updatecontextitlesettings', 'contextadmin', NULL, 'Update [-context-] Title and Settings')));
} else {
    $objStepMenu->addStep(str_replace('[-num-]', 1, $this->objLanguage->code2Txt('mod_contextadmin_stepnumber', 'contextadmin', NULL, 'Step [-num-]')) . ' - ' . ucwords($this->objLanguage->code2Txt('mod_context_contextsettings', 'context', NULL, '[-context-] Settings')), $this->objLanguage->code2Txt('mod_contextadmin_checkcontextcodeavailable', 'contextadmin', NULL, 'Enter [-context-] settings and check whether [-context-] code is available'));
}
$objStepMenu->addStep(str_replace('[-num-]', 2, $this->objLanguage->code2Txt('mod_contextadmin_stepnumber', 'contextadmin', NULL, 'Step [-num-]')) . ' - ' . ucwords($this->objLanguage->code2Txt('mod_contextadmin_contextinformation', 'contextadmin', NULL, '[-context-] Information')), $this->objLanguage->code2Txt('mod_contextadmin_enterinfoaboutcontext', 'contextadmin', NULL, 'Enter more information about your [-context-] and select a [-context-] image'));
$objStepMenu->addStep(str_replace('[-num-]', 3, $this->objLanguage->code2Txt('mod_contextadmin_stepnumber', 'contextadmin', NULL, 'Step [-num-]')) . ' - ' . ucwords($this->objLanguage->code2Txt('mod_contextadmin_courseoutcome', 'contextadmin', NULL, '[-context-] Outcomes')), $this->objLanguage->code2Txt('mod_context_enteroutcomecontext', 'contextadmin', NULL, 'Enter the main Outcomes / Goals of the [-context-]'));
$objStepMenu->addStep(str_replace('[-num-]', 4, $this->objLanguage->code2Txt('mod_contextadmin_stepnumber', 'contextadmin', NULL, 'Step [-num-]')) . ' - ' . ucwords($this->objLanguage->code2Txt('mod_context_contextpluginsabs', 'context', array('plugins' => 'plugins'), '[-context-] [-plugins-]')), $this->objLanguage->code2Txt('mod_contextadmin_selectpluginsforcontextabs', 'contextadmin', array('plugins' => 'plugins'), 'Select the [-plugins-] you would like to use in this [-context-]'));
$objStepMenu->setCurrent(3);
echo $objStepMenu->show();
$header = new htmlheading();
$header->type = 1;
$header->str = ucwords($headerTitle);
echo '<br />' . $header->show();
$objSelectImage = $this->getObject('selectimage', 'filemanager');
//Hidden textinput to store the old outcome
$goalsHiddenTxtInput = $this->newObject('textinput', 'htmlelements');
if (!empty($context['goals'])) {
    $goalsHiddenTxtInput->textinput($name = "goals", $value = $context['goals'], $type = 'hidden', $size = "10");
} else {
    $goalsHiddenTxtInput->textinput($name = "goals", $value = "", $type = 'hidden', $size = "10");
}
$table = $this->newObject('htmltable', 'htmlelements');
//Set Table width
$table->width = '1300px';
$table->border = '0';
 /**
  * Standard block show method. It uses the renderform
  * class to render the login box
  */
 public function show()
 {
     $this->loadClass('label', 'htmlelements');
     $this->loadClass('textinput', 'htmlelements');
     $this->loadClass('button', 'htmlelements');
     $this->loadClass('form', 'htmlelements');
     $this->loadClass('htmlheading', 'htmlelements');
     $this->loadClass('link', 'htmlelements');
     $form = new form('elearnlogin', $this->uri(array('action' => 'login'), 'security'));
     $label = new label($this->objLanguage->languageText('word_username', 'system', 'Username') . ':', 'username');
     $form->addToForm($label->show());
     $username = new textinput('username');
     $form->addToForm('<br />' . $username->show());
     $label = new label($this->objLanguage->languageText('word_password', 'system', 'Password') . ':', 'username');
     $form->addToForm('<br />' . $label->show());
     $password = new textinput('password');
     $password->fldType = 'password';
     $form->addToForm('<br />' . $password->show());
     $button = new button('login', $this->objLanguage->languageText('word_login', 'system', 'Login'));
     $button->setToSubmit();
     $form->addToForm('<br />' . $button->show());
     $str = $form->show();
     $str .= '<hr />';
     if ($this->objSysConfig->getValue('elearnlogin_forgotpassword', 'security', 'true') === 'true') {
         // JOC [[ Forgot your password OK
         $header = new htmlheading();
         $header->type = 5;
         $header->str = $this->objLanguage->languageText('mod_security_forgotyourpassword', 'security', 'Forgot your password') . '?';
         $str .= $header->show();
         // JOC [[ Yes, help me login OK
         $link = new link($this->uri(array('action' => 'needpassword')), 'security');
         $link->link = $this->objLanguage->languageText('mod_security_helpmelogin', 'security', 'Yes, help me login');
         $str .= '<p>' . $link->show() . '</p>';
     }
     return $str;
 }
Beispiel #22
0
$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();
Beispiel #23
0
<?php

$this->setLayoutTemplate = NULL;
$this->loadClass('form', 'htmlelements');
$this->loadClass('textinput', 'htmlelements');
$this->loadClass('label', 'htmlelements');
$this->loadClass('htmlheading', 'htmlelements');
$this->loadClass('htmlarea', 'htmlelements');
$required = '<span class="warning"> * ' . $this->objLanguage->languageText('word_required', 'system', 'Required') . '</span>';
$headerinv = new htmlheading();
$headerinv->type = 1;
$headerinv->str = $this->objLanguage->languageText('phrase_invitemate', 'userregistration') . ' ' . $this->objConfig->getSitename();
$middleColumnContent = NULL;
$middleColumnContent .= $headerinv->show();
// start the form
$form = new form('invite', $this->uri(array('action' => 'sendinvite')));
// add some rules
$form->addRule('friend_firstname', $this->objLanguage->languageText("mod_userregistration_needfriendname", "userregistration"), 'required');
$form->addRule('friend_email', $this->objLanguage->languageText("mod_userregistration_needfriendemail", "userregistration"), 'email');
// form elements
// friend name
$table = $this->newObject('htmltable', 'htmlelements');
$table->startRow();
$friendname = new textinput('friend_firstname');
$friendnameLabel = new label($this->objLanguage->languageText('friendname', 'userregistration') . '&nbsp;', 'input_friendname');
$table->addCell($friendnameLabel->show(), 150, NULL, 'right');
$table->addCell('&nbsp;', 5);
$table->addCell($friendname->show() . $required);
$table->endRow();
// surname
$table->startRow();
Beispiel #24
0
<?php

$objFeatureBox = $this->newObject('featurebox', 'navigation');
$userMenu =& $this->newObject('usermenu', 'toolbar');
$objUser = $this->getObject('user', 'security');
$link = $this->loadClass('href', 'htmlelements');
// Create an instance of the css layout class
$cssLayout =& $this->newObject('csslayout', 'htmlelements');
// Set columns to 2
$cssLayout->setNumColumns(2);
$header = new htmlheading();
$header->type = 1;
$header->str = $this->objLanguage->languageText('mod_errors_heading', 'errors');
// Add Post login menu to left column
$leftSideColumn = '';
if ($objUser->isLoggedIn()) {
    $leftSideColumn = $userMenu->show();
} else {
    $linkhome = new href($this->objConfig->getSiteRoot(), $this->objLanguage->languageText("word_home", 'system', 'Home'));
    $leftSideColumn = $linkhome->show();
}
$midcol = $header->show();
// Add Left column
$cssLayout->setLeftColumnContent($leftSideColumn);
$midcol .= $objFeatureBox->show($this->objLanguage->languageText("word_error", "system"), $this->objLanguage->languagetext("mod_errors_spammeralert", "errors"));
$cssLayout->setMiddleColumnContent($midcol);
echo $cssLayout->show();
Beispiel #25
0
$cssLayout->setNumColumns(2);
$leftMenu = NULL;
$rightSideColumn = NULL;
$leftCol = NULL;
$middleColumn = NULL;
$leftCol .= $objSideBar->show();
$grpName = $groupinfo[0]['group_define_name'];
$grpId = $groupinfo[0]['group_id'];
// set up a heading for the group name
$header = new htmlheading();
$header->type = 1;
$header->str = $this->objLanguage->languageText("mod_groupadmin_lblName", "groupadmin") . ": " . $grpName . " " . $add;
$middleColumn .= $header->show();
// check for an empty group
if (empty($usersin)) {
    $headerempty = new htmlheading();
    $headerempty->type = 3;
    $headerempty->str = "<em>" . $this->objLanguage->languageText("mod_groupadmin_nousers", "groupadmin") . "</em>";
    $middleColumn .= $headerempty->show();
} else {
    $middleColumn .= $usersin;
}
// check if the user would like to add users to this group
if ($adduser === TRUE) {
    // start a form with a selectbox to add the users
    $middleColumn .= $this->objOps->addUserForm($grpId);
}
$cssLayout->setMiddleColumnContent($middleColumn);
$cssLayout->setLeftColumnContent($leftCol);
//$leftMenu->show());
$cssLayout->setRightColumnContent($rightSideColumn);