本文整理汇总了PHP中link::show方法的典型用法代码示例。如果您正苦于以下问题:PHP link::show方法的具体用法?PHP link::show怎么用?PHP link::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类link
的用法示例。
在下文中一共展示了link::show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
/**
* 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;
}
示例2: show
/**
* 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 = 'cms';
//$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;
}
示例3: link
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();
示例4: foreach
}
}
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');
示例5: linkItem
/**
*
* 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();
}
示例6: addNavigationRow
/**
* 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();
}
示例7: image
'.$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;
示例8: htmlheading
<?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>';
示例9: htmlheading
$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>";
示例10: htmlheading
$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) {
示例11: generateBreadcrumbsFromUserPath
/**
* 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;
}
示例12: array
$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>';
示例13: showBlock
/**
*
* 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;
}
示例14: showLink
/**
* 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();
}
示例15: htmlHeading
$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();