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


PHP link::link方法代码示例

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


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

示例1: leftMenu

 /**
  * 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);
 }
开发者ID:ookwudili,项目名称:chisimba,代码行数:62,代码来源:logdisplay_class_inc.php

示例2: ucfirst

     $objTable->addCell('&nbsp;', 20, null, 'left', $class);
     $objTable->addCell('&nbsp;', 30, null, 'left', $class);
     $objTable->addCell($desc . '<br />&nbsp;', null, null, 'left', $class, 'colspan="5"');
     $objTable->endRow();
 } else {
     $missingModules = true;
     if (!$connected) {
         $moduleName = ucfirst($moduleId);
         $desc = $this->objLanguage->languageText('mod_modulecatalogue_nodesc', 'modulecatalogue');
         $actions = false;
     } else {
         $doc = simplexml_load_string($this->objRPCClient->getModuleDescription($moduleId));
         if (is_object($doc)) {
             $moduleName = ucfirst((string) $doc->array->data->value[0]->string);
             $desc = (string) $doc->array->data->value[1]->string;
             $alink->link('javascript:;');
             $alink->extra = "onclick = 'javascript:downloadModule(\"{$moduleId}\",\"{$moduleName}\");'";
             $alink->link = $this->objLanguage->languageText('mod_modulecatalogue_dlandinstall', 'modulecatalogue');
             $actions = $alink->show();
             if ($moduleName == '') {
                 $moduleName = ucfirst($moduleId);
                 $desc = $this->objLanguage->languageText('mod_modulecatalogue_nodesc', 'modulecatalogue');
                 $actions = false;
             }
         }
     }
     $rClass = $rClass == 'odd' ? 'even' : 'odd';
     if (!isset($actions)) {
         $actions = '';
     }
     $objRemoteTable->startRow();
开发者ID:ookwudili,项目名称:chisimba,代码行数:31,代码来源:front_tpl.php

示例3: skinRemoter

 public function skinRemoter($skins)
 {
     $path = $this->objConfig->getskinRoot();
     chdir($path);
     $lSkins = NULL;
     foreach (glob('*') as $s) {
         if ($s == NULL) {
             continue;
         } else {
             $lSkins .= $s . "|";
         }
     }
     $lSkins = explode("|", $lSkins);
     $lSkins = array_filter($lSkins);
     foreach ($lSkins as $lskin) {
         if ($lskin == 'CVS' || $lskin == 'CVSROOT' || $lskin == '_common' || $lskin == 'cache.config' || $lskin == 'error_log' || $lskin == 'icons2') {
             unset($lskin);
         }
         if (!empty($lskin)) {
             $skinner[] = $lskin;
         }
     }
     if (empty($skinner)) {
         $skinner = array();
     }
     $lSkin = array_filter($skinner);
     $this->loadClass('checkbox', 'htmlelements');
     $this->loadClass('link', 'htmlelements');
     $objH = $this->getObject('htmlheading', 'htmlelements');
     $objH->type = 2;
     $objH->str = $this->objLanguage->languageText('mod_modulecatalogue_heading', 'modulecatalogue');
     $objH2 = $this->newObject('htmlheading', 'htmlelements');
     $objH2->type = 3;
     $objH2->str = $this->objLanguage->languageText('mod_modulecatalogue_remoteskinheading', 'modulecatalogue');
     $hTable = $this->getObject('htmltable', 'htmlelements');
     $hTable->cellpadding = 2;
     $hTable->id = 'unpadded';
     $hTable->width = '100%';
     $hTable->startRow();
     $hTable->addCell($objH->show());
     $hTable->endRow();
     $hTable->startRow();
     $hTable->addCell($objH2->show());
     $hTable->endRow();
     $hTable->startRow();
     $hTable->addCell('&nbsp;');
     $hTable->endRow();
     sort($skins);
     $objTable = $this->newObject('htmltable', 'htmlelements');
     $objTable->cellpadding = 2;
     $objTable->id = 'unpadded1';
     $objTable->width = '100%';
     $masterCheck = new checkbox('arrayList[]');
     //$masterCheck->extra = 'onclick="javascript:baseChecked(this);"';
     $head = array('&nbsp', '&nbsp;', $this->objLanguage->languageText('mod_modulecatalogue_skinname', 'modulecatalogue'), $this->objLanguage->languageText('mod_modulecatalogue_install', 'modulecatalogue'));
     $objTable->addHeader($head, 'heading', 'align="left"');
     $newMods = array();
     $class = 'odd';
     $link = new link();
     $link->link = $this->objLanguage->languageText('mod_modulecatalogue_dlandinstall', 'modulecatalogue');
     $icon = '&nbsp;';
     //$this->newObject('getIcon','htmlelements');
     foreach ($skins as $skin) {
         if (!in_array($skin, $lSkins)) {
             $link->link('javascript:;');
             $link->extra = "onclick = 'javascript:downloadSkin(\"{$skin}\");'";
             $class = $class == 'even' ? 'odd' : 'even';
             $newMods[] = $skin;
             //$icon->setModuleIcon($module['id']);
             //$modCheck = new checkbox('arrayList[]');
             //$modCheck->cssId = 'checkbox_'.$skin;
             //$modCheck->setValue($skin);
             //$modCheck->extra = 'onclick="javascript:toggleChecked(this);"';
             $objTable->startRow();
             $objTable->addCell('&nbsp;', 20, null, null, $class);
             $objTable->addCell('&nbsp;', 30, null, null, $class);
             $objTable->addCell("<div id='link_{$skin}'><b>{$skin}</b></div>", null, null, null, $class);
             $objTable->addCell("<div id='download_{$skin}'>" . $link->show() . "</div>", '40%', null, null, $class);
             $objTable->endRow();
             /*$objTable->startRow();
               $objTable->addCell('&nbsp;',20,null,'left',$class);
               $objTable->addCell('&nbsp;',30,null,'left',$class);
               $objTable->addCell('&nbsp;'.'<br />&nbsp;',null,null,'left',$class, 'colspan="2"');
               $objTable->endRow();*/
         }
     }
     if (empty($newMods)) {
         $objTable->startRow();
         $objTable->addCell("<span class='empty'>" . $this->objLanguage->languageText('mod_modulecatalogue_noremoteskins', 'modulecatalogue') . '</span>', null, null, 'left', null, 'colspan="4"');
         $objTable->endRow();
     }
     return $hTable->show() . "<br />" . $objTable->show();
 }
开发者ID:ookwudili,项目名称:chisimba,代码行数:93,代码来源:catalogueconfig_class_inc.php

示例4: array

}
// Engine version check (i.e. classes/core upgrades
$objTable4 = $this->newObject('htmltable', 'htmlelements');
$objTable4->cellpadding = 2;
$objTable4->id = 'unpadded4';
$objTable4->width = '100%';
$masterCheck4 = '&nbsp;';
// new checkbox('arrayList[]');
//$masterCheck->extra = 'onclick="javascript:baseChecked(this);"';
$head4 = array($masterCheck4, '&nbsp;', $this->objLanguage->languageText('mod_modulecatalogue_coreupgrade', 'modulecatalogue'), $this->objLanguage->languageText('mod_modulecatalogue_install', 'modulecatalogue'));
$objTable4->addHeader($head4, 'heading', 'align="left"');
$newMods4 = array();
$class4 = 'odd';
$link4 = new link();
$link4->link = $this->objLanguage->languageText('mod_modulecatalogue_install', 'modulecatalogue');
$link4->link('javascript:;');
$link4->extra = "onclick = 'javascript:downloadCoreUpgrade(\"core\");'";
$icon4 = $this->newObject('getIcon', 'htmlelements');
$iconcheck4 = $this->newObject('getIcon', 'htmlelements');
$iconcheck4->setIcon('greentick');
$iconcheckno4 = $this->newObject('getIcon', 'htmlelements');
$iconcheckno4->setIcon('redcross');
$engCheck = $remEngVer - $localEngVer;
if ($engCheck === 0) {
    $objTable->startRow();
    $objTable4->addCell('');
    //$modCheck3->show(),20,null,null,$class3);
    $objTable4->addCell($iconcheck4->show(), 30, null, null, $class4);
    $objTable4->addCell("<div id='link_noengup'><b>" . $this->objLanguage->languageText("mod_modulecatalogue_nocoreupgrades", "modulecatalogue") . "</b></div>", null, null, null, $class4);
    $objTable->endRow();
} else {
开发者ID:ookwudili,项目名称:chisimba,代码行数:31,代码来源:remote_tpl.php


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