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


PHP menuLink函数代码示例

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


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

示例1: GetNavLinks

 function GetNavLinks()
 {
     global $g_oSec;
     if (($id = @DCL_Sanitize::ToInt($_REQUEST['personnel_id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_CHANGELOG, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $sMethod = explode('.', $_REQUEST['menuAction']);
     $sMethod = $sMethod[1];
     $aRetVal = array();
     array_push($aRetVal, array('link' => menuLink('', 'menuAction=htmlMetrics.show'), 'title' => 'Metrics'));
     array_push($aRetVal, array('link' => menuLink('', 'menuAction=htmlChangeLog.ShowRepositoryCommits&personnel_id=' . $id), 'title' => $this->oPersonnel->short));
     if ($sMethod == 'ShowProjectCommits' || $sMethod == 'ShowFileCommits' || $sMethod == 'ShowVersionCommits') {
         if (($sccs_id = @DCL_Sanitize::ToInt($_REQUEST['dcl_sccs_id'])) === null) {
             trigger_error('Data sanitize failed.');
             return;
         }
         $oRepository = CreateObject('dcl.dbSccsXref');
         $sRepository = $oRepository->ExecuteScalar("select sccs_descr from dcl_sccs where dcl_sccs_id = {$sccs_id}");
         array_push($aRetVal, array('link' => menuLink('', 'menuAction=htmlChangeLog.ShowProjectCommits&dcl_sccs_id=' . $sccs_id . '&personnel_id=' . $id), 'title' => $sRepository));
         if ($sMethod == 'ShowFileCommits' || $sMethod == 'ShowVersionCommits') {
             $sccs_project_path = $_REQUEST['sccs_project_path'];
             array_push($aRetVal, array('link' => menuLink('', 'menuAction=htmlChangeLog.ShowFileCommits&dcl_sccs_id=' . $sccs_id . '&personnel_id=' . $id . '&sccs_project_path=' . rawurlencode($sccs_project_path)), 'title' => $sccs_project_path));
             if ($sMethod == 'ShowVersionCommits') {
                 $sccs_file_name = DCL_Sanitize::IsValidFileName($_REQUEST['sccs_file_name']) ? $_REQUEST['sccs_file_name'] : '';
                 array_push($aRetVal, array('link' => menuLink('', 'menuAction=htmlChangeLog.ShowVersionCommits&dcl_sccs_id=' . $sccs_id . '&personnel_id=' . $id . '&sccs_project_path=' . rawurlencode($sccs_project_path) . '&sccs_file_name=' . rawurlencode($sccs_file_name)), 'title' => $sccs_file_name));
             }
         }
     }
     return $aRetVal;
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:34,代码来源:class.htmlChangeLog.inc.php

示例2: renderDCLMenu

function renderDCLMenu()
{
    global $dcl_info, $g_oSec, $g_oSession;
    $sTemplateSet = GetDefaultTemplateSet();
    include DCL_ROOT . 'templates/' . $sTemplateSet . '/navbar.php';
    $t =& CreateSmarty();
    $t->assign('DIR_IMAGES', 'templates/' . $sTemplateSet . '/img');
    $t->assign('DIR_CSS', 'templates/' . $sTemplateSet . '/css');
    $t->assign('DIR_JS', 'js');
    $t->assign('LNK_LOGOFF', menuLink('logout.php'));
    if ($g_oSec->IsPublicUser()) {
        $t->assign('LNK_HOME', menuLink('', 'menuAction=htmlPublicMyDCL.show'));
    } else {
        $t->assign('LNK_HOME', menuLink('', 'menuAction=htmlMyDCL.show'));
    }
    $t->assign('LNK_PREFERENCES', menuLink('', 'menuAction=htmlPreferences.modify'));
    $t->assign('TXT_WORKORDERS', DCL_MENU_WORKORDERS);
    $t->assign('TXT_TICKETS', DCL_MENU_TICKETS);
    $t->assign('TXT_PROJECTS', DCL_MENU_PROJECTS);
    $t->assign('TXT_HOME', DCL_MENU_HOME);
    $t->assign('TXT_PREFERENCES', DCL_MENU_PREFERENCES);
    $t->assign('TXT_LOGOFF', DCL_MENU_LOGOFF);
    $t->assign('PERM_WORKORDERSEARCH', $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_SEARCH) || $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_VIEW));
    $t->assign('PERM_TICKETSEARCH', $g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_SEARCH) || $g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_VIEW));
    $t->assign('PERM_PROJECTSEARCH', $g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_SEARCH) || $g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_VIEW));
    $t->assign('PERM_PREFS', $g_oSec->HasPerm(DCL_ENTITY_PREFS, DCL_PERM_MODIFY));
    $t->assign('PERM_WORKSPACE', $g_oSec->HasPerm(DCL_ENTITY_WORKSPACE, DCL_PERM_VIEW));
    $t->assign('VAL_WORKSPACE', $g_oSession->Value('workspace'));
    $t->assign('VAL_DCL_MENU', $GLOBALS['DCL_MENU']);
    $oNav = new DCLNavBar();
    $t->assign('NAV_BOXEN', $oNav->getHtml());
    SmartyDisplay($t, 'menu.tpl');
}
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:33,代码来源:menu.php

示例3: show

 function show()
 {
     global $dcl_info;
     commonHeader();
     $this->oDB->query("select a.id, a.short, count(*) from personnel a join dcl_sccs_xref b on a.id = b.personnel_id group by a.id, a.short order by 3 desc");
     $aRecords = $this->oDB->FetchAllRows();
     $oTable =& CreateObject('dcl.htmlTable');
     $oTable->setCaption('ChangeLog Entries');
     $oTable->addColumn(STR_CMMN_ID, 'numeric');
     $oTable->addColumn('User', 'html');
     $oTable->addColumn('Commits', 'numeric');
     for ($i = 0; $i < count($aRecords); $i++) {
         $aRecords[$i][1] = '<a href="' . menuLink('', 'menuAction=htmlChangeLog.ShowRepositoryCommits&personnel_id=' . $aRecords[$i][0]) . '">' . $aRecords[$i][1] . '</a>';
     }
     $oTable->setData($aRecords);
     $oTable->setShowRownum(true);
     $oTable->render();
     $this->oDB->FreeResult();
     $aTables = array('Personnel' => 'personnel', 'Organizations' => 'dcl_org', 'Contacts' => 'dcl_contact', 'Work Orders' => 'workorders', 'Time Cards' => 'timecards', 'Tickets' => 'tickets', 'Ticket Resolutions' => 'ticketresolutions', 'Projects' => 'dcl_projects', 'Products' => 'products', 'ChangeLog' => 'dcl_sccs_xref');
     $oTable =& CreateObject('dcl.htmlTable');
     $oTable->setCaption('Table Record Counts');
     $oTable->addColumn('Table', 'string');
     $oTable->addColumn('Records', 'numeric');
     $oTable->setShowRownum(true);
     foreach ($aTables as $sName => $sTable) {
         $this->oDB->query("select '{$sName}', count(*) from {$sTable}");
         if ($this->oDB->next_record()) {
             $oTable->addRow(array($this->oDB->f(0), $this->oDB->f(1)));
         }
         $this->oDB->FreeResult();
     }
     $oTable->render();
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:33,代码来源:class.htmlMetrics.inc.php

示例4: ShowUploadFileForm

 function ShowUploadFileForm($obj)
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_ATTACHFILE, $obj->ticketid)) {
         return PrintPermissionDenied();
     }
     $t = CreateSmarty();
     $t->assign('VAL_MAXUPLOADFILESIZE', $dcl_info['DCL_MAX_UPLOAD_FILE_SIZE']);
     $t->assign('VAL_TICKETID', $obj->ticketid);
     $t->assign('LNK_CANCEL', menuLink('', 'menuAction=boTickets.view&ticketid=' . $obj->ticketid));
     SmartyDisplay($t, 'htmlTicketAddAttachment.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:12,代码来源:class.htmlTickets.inc.php

示例5: show

 function show()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_REPORT)) {
         return PrintPermissionDenied();
     }
     if (($type = DCL_Sanitize::ToInt($_REQUEST['type'])) === null || ($id = DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     $oSmarty =& CreateSmarty();
     $oAudit =& CreateObject('dcl.boAudit');
     switch ($type) {
         case DCL_ENTITY_WORKORDER:
             if (($id2 = DCL_Sanitize::ToInt($_REQUEST['id2'])) === null) {
                 trigger_error('Data sanitize failed.');
                 return;
             }
             $this->aAudit = $oAudit->LoadDiff('dbWorkorders', array('jcn' => $id, 'seq' => $id2));
             $oSmarty->assign('VAL_ID', sprintf('%d-%d', $id, $id2));
             $oSmarty->assign('VAL_SUMMARY', $this->oMeta->GetWorkOrder($id, $id2));
             $oSmarty->assign('LNK_BACK', menuLink('', "menuAction=boWorkorders.viewjcn&jcn={$id}&seq={$id2}"));
             $oAccount =& CreateObject('dcl.dbWorkOrderAccount');
             $this->aAuditAccount = $oAccount->AuditWorkOrderList($id, $id2);
             $oProject =& CreateObject('dcl.dbProjectmap');
             $this->aAuditProject = $oProject->AuditWorkOrderList($id, $id2);
             break;
         case DCL_ENTITY_PROJECT:
             $this->aAudit = $oAudit->LoadDiff('dbProjects', array('projectid' => $id));
             $oSmarty->assign('VAL_ID', $id);
             $oSmarty->assign('VAL_SUMMARY', $this->oMeta->GetProject($id));
             $oSmarty->assign('LNK_BACK', menuLink('', "menuAction=boProjects.viewproject&wostatus=0&project={$id}"));
             $oProject =& CreateObject('dcl.dbProjectmap');
             $this->aAuditWorkOrder = $oProject->AuditProjectList($id);
             break;
         case DCL_ENTITY_TICKET:
             $this->aAudit = $oAudit->LoadDiff('dbTickets', array('ticketid' => $id));
             $oSmarty->assign('VAL_ID', $id);
             $oSmarty->assign('VAL_SUMMARY', $this->oMeta->GetTicket($id));
             $oSmarty->assign('LNK_BACK', menuLink('', "menuAction=boTickets.view&ticketid={$id}"));
             break;
     }
     $this->prepareForDisplay();
     $oSmarty->assign_by_ref('VAL_AUDITTRAIL', $this->aAudit);
     $oSmarty->assign_by_ref('VAL_AUDITACCOUNT', $this->aAuditAccount);
     $oSmarty->assign_by_ref('VAL_AUDITPROJECT', $this->aAuditProject);
     $oSmarty->assign_by_ref('VAL_AUDITWORKORDER', $this->aAuditWorkOrder);
     SmartyDisplay($oSmarty, 'htmlAuditTrail.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:50,代码来源:class.htmlAudit.inc.php

示例6: smarty_modifier_escape

/**
 * Smarty escape modifier plugin
 *
 * Type:     modifier<br>
 * Name:     escape<br>
 * Purpose:  Escape the string according to escapement type
 * @link http://smarty.php.net/manual/en/language.modifier.escape.php
 *          escape (Smarty online manual)
 * @param string
 * @param html|htmlall|url|quotes|hex|hexentity|javascript
 * @return string
 */
function smarty_modifier_escape($string, $esc_type = 'html')
{
    switch ($esc_type) {
        case 'html':
            return htmlspecialchars($string, ENT_QUOTES);
        case 'htmlall':
            return htmlentities($string, ENT_QUOTES);
        case 'link':
            $sText = nl2br(htmlspecialchars($string));
            $sRetVal = eregi_replace('(http|ftp|telnet|irc|https)://[^<>[:space:]]+[[:alnum:]/]', '<a target="_blank" href="\\0">\\0</a>', $sText);
            // Pseudo stuff
            $sRetVal = eregi_replace('dcl://workorders/([0-9]+)[-]([0-9]+)', '<a href="' . menuLink() . '?menuAction=boWorkorders.viewjcn&jcn=\\1&seq=\\2">\\0</a>', $sRetVal);
            $sRetVal = eregi_replace('dcl://tickets/([0-9]+)', '<a href="' . menuLink() . '?menuAction=boTickets.view&ticketid=\\1">\\0</a>', $sRetVal);
            $sRetVal = eregi_replace('dcl://projects/([0-9]+)', '<a href="' . menuLink() . '?menuAction=boProjects.viewproject&wostatus=0&project=\\1">\\0</a>', $sRetVal);
            return $sRetVal;
        case 'url':
            return urlencode($string);
        case 'date':
            $o = new dclDB();
            return $o->FormatDateForDisplay($string);
        case 'timestamp':
            $o = new dclDB();
            return $o->FormatTimeStampForDisplay($string);
        case 'rawurl':
            return rawurlencode($string);
        case 'quotes':
            // escape unescaped single quotes
            return preg_replace("%(?<!\\\\)'%", "\\'", $string);
        case 'utf8xml':
            return utf8_encode(htmlspecialchars($string, ENT_NOQUOTES));
        case 'hex':
            // escape every character into hex
            $return = '';
            for ($x = 0; $x < strlen($string); $x++) {
                $return .= '%' . bin2hex($string[$x]);
            }
            return $return;
        case 'hexentity':
            $return = '';
            for ($x = 0; $x < strlen($string); $x++) {
                $return .= '&#x' . bin2hex($string[$x]) . ';';
            }
            return $return;
        case 'javascript':
            // escape quotes and backslashes and newlines
            return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n'));
        default:
            return $string;
    }
}
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:62,代码来源:modifier.escape.php

示例7: ShowAll

 function ShowAll($orderBy = 'contact_type_name')
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_CONTACTTYPE, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $o = CreateObject('dcl.boView');
     $o->table = 'dcl_contact_type';
     $o->title = STR_ADMIN_CONTACTTYPES;
     $o->AddDef('columns', '', array('contact_type_id', 'contact_type_name', 'contact_type_is_main'));
     $o->AddDef('columnhdrs', '', array(STR_CMMN_ID, STR_CMMN_NAME, 'Main'));
     $o->AddDef('order', '', $orderBy);
     $oDB = CreateObject('dcl.dbContactType');
     if ($oDB->query($o->GetSQL()) == -1) {
         return;
     }
     $allRecs = $oDB->FetchAllRows();
     $oTable =& CreateObject('dcl.htmlTable');
     $oTable->setCaption(sprintf(STR_ADMIN_CONTACTTYPES, $orderBy));
     $oTable->addColumn(STR_CMMN_ID, 'numeric');
     $oTable->addColumn(STR_CMMN_NAME, 'string');
     $oTable->addColumn('Main', 'string');
     if ($g_oSec->HasPerm(DCL_ENTITY_CONTACTTYPE, DCL_PERM_ADD)) {
         $oTable->addToolbar(menuLink('', 'menuAction=htmlContactType.add'), STR_CMMN_NEW);
     }
     if ($g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_VIEW)) {
         $oTable->addToolbar(menuLink('', 'menuAction=boAdmin.ShowSystemConfig'), DCL_MENU_SYSTEMSETUP);
     }
     if (count($allRecs) > 0 && $g_oSec->HasAnyPerm(array(DCL_ENTITY_CONTACTTYPE => array($g_oSec->PermArray(DCL_PERM_MODIFY), $g_oSec->PermArray(DCL_PERM_DELETE))))) {
         $oTable->addColumn(STR_CMMN_OPTIONS, 'html');
         for ($i = 0; $i < count($allRecs); $i++) {
             $options = '';
             if ($g_oSec->HasPerm(DCL_ENTITY_CONTACTTYPE, DCL_PERM_MODIFY)) {
                 $options = '<a href="' . menuLink('', 'menuAction=htmlContactType.modify&contact_type_id=' . $allRecs[$i][0]) . '">' . STR_CMMN_EDIT . '</a>';
             }
             if ($g_oSec->HasPerm(DCL_ENTITY_CONTACTTYPE, DCL_PERM_DELETE)) {
                 if ($options != '') {
                     $options .= '&nbsp;|&nbsp;';
                 }
                 $options .= '<a href="' . menuLink('', 'menuAction=htmlContactType.delete&contact_type_id=' . $allRecs[$i][0]) . '">' . STR_CMMN_DELETE . '</a>';
             }
             $allRecs[$i][] = $options;
         }
     }
     $oTable->setData($allRecs);
     $oTable->setShowRownum(true);
     $oTable->render();
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:49,代码来源:class.htmlContactType.inc.php

示例8: _DisplayOptions

 function _DisplayOptions()
 {
     global $dcl_info, $g_oSec;
     $this->_SetVar('hDetailColumnLinkSetLinks', '');
     $id = $this->oDB->f('entity_source_id');
     if ($g_oSec->HasPerm(DCL_ENTITY_SOURCE, DCL_PERM_MODIFY)) {
         $this->_AddDisplayOption(STR_CMMN_EDIT, menuLink('', 'menuAction=htmlEntitySource.modify&entity_source_id=' . $id), false);
     }
     if ($g_oSec->HasPerm(DCL_ENTITY_SOURCE, DCL_PERM_DELETE)) {
         $this->_AddDisplayOption(STR_CMMN_DELETE, menuLink('', 'menuAction=htmlEntitySource.delete&entity_source_id=' . $id), true);
     }
     $this->Template->parse('hDetailColumnLinkSet', 'detailColumnLinkSet');
     $this->Template->parse('hDetailCells', 'detailCells', true);
     // this avoids repeating cells
     $this->_ResetDetailCells();
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:16,代码来源:class.htmlEntitySourceView.inc.php

示例9: _DisplayOptions

 function _DisplayOptions()
 {
     global $dcl_info, $g_oSec;
     $this->_SetVar('hDetailColumnLinkSetLinks', '');
     $id = $this->oDB->f('product_module_id');
     if ($g_oSec->HasPerm(DCL_ENTITY_PRODUCTMODULE, DCL_PERM_MODIFY)) {
         $this->_AddDisplayOption(STR_CMMN_EDIT, menuLink('', 'menuAction=htmlProductModules.modify&product_module_id=' . $id));
     }
     if ($g_oSec->HasPerm(DCL_ENTITY_PRODUCTMODULE, DCL_PERM_DELETE)) {
         $this->_AddDisplayOption(STR_CMMN_DELETE, menuLink('', 'menuAction=htmlProductModules.delete&product_module_id=' . $id), true);
     }
     $this->Template->parse('hDetailColumnLinkSet', 'detailColumnLinkSet');
     $this->Template->parse('hDetailCells', 'detailCells', true);
     // this avoids repeating cells
     $this->_ResetDetailCells();
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:16,代码来源:class.htmlProductModuleView.inc.php

示例10: adminMenu

function adminMenu()
{
    global $adminlevel, $config;
    if ($adminlevel == "superuser") {
        $html .= menuLink("admins", "administrators");
        $html .= menuLink("groups", "groups");
        $html .= menuLink("users", "users");
        $html .= menuLink("userattributes", "user attributes");
        $req = Sql_Query('select * from attribute where type = "select" or type = "radio" or type = "checkboxgroup"');
        while ($row = Sql_Fetch_Array($req)) {
            $html .= menuLink("editattributes&id=" . $row["id"], "&gt;&nbsp;" . $row["name"]);
        }
        $html .= menuLink("branches", "branch fields", "option=branchfields");
        $html .= menuLink("templates", "templates");
    }
    return $html;
}
开发者ID:alancohen,项目名称:alancohenexperience-com,代码行数:17,代码来源:editattributes.php

示例11: Render

 function Render($oView)
 {
     global $dcl_info, $g_oSec, $g_oSession;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_BUILDMANAGER, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $oDB = CreateObject('dcl.dbBuildManager');
     if ($oDB->query($oView->GetSQL()) == -1) {
         return;
     }
     $allRecs = $oDB->FetchAllRows();
     $oTable =& CreateObject('dcl.htmlTable');
     $oTable->setCaption($oView->title);
     $oTable->addColumn(STR_CMMN_ID, 'numeric');
     $oTable->addColumn(STR_BM_RELEASE_ALIAS_TITLE, 'string');
     $oTable->addColumn(STR_CMMN_ACTIVE, 'string');
     $oTable->addColumn(STR_BM_RELEASEDATE_DESC, 'string');
     $oTable->addColumn('Target Date', 'date');
     $oTable->addColumn('Actual Date', 'date');
     if (isset($this->ModNav) && ($this->ModNav == 'WO' || $this->ModNav == 'showfiles')) {
         $oTable->addToolbar(menuLink('', 'menuAction=boProducts.viewRelease&id=' . $this->id), 'Back');
     } else {
         $oTable->addToolbar(menuLink('', 'menuAction=boBuildManager.add&which=release&product_id=' . $this->productid . '&add=1'), STR_CMMN_NEW);
     }
     if (count($allRecs) > 0 && $g_oSec->HasPerm(DCL_ENTITY_GLOBAL, DCL_ENTITY_ADMIN)) {
         $oTable->addColumn(STR_CMMN_OPTIONS, 'html');
         for ($i = 0; $i < count($allRecs); $i++) {
             $options = '';
             if (isset($this->ModNav)) {
                 $options = '<a href="' . menuLink('', 'menuAction=boWorkorders.viewjcn&jcn=' . $allRecs[$i][1] . '&seq=' . $allRecs[$i][2]) . '">' . STR_CMMN_VIEW . '</a>';
             } else {
                 $versionid = $allRecs[$i][0];
                 $options = '<a href="' . menuLink('', 'menuAction=boProducts.viewBuild&product_version_id=' . $versionid . '&product_id=' . $this->productid) . '">' . STR_CMMN_VIEW . '</a>';
                 $options .= '&nbsp;|&nbsp;<a href="' . menuLink('', 'menuAction=htmlBuildManagerReleaseForm.Show&product_version_id=' . $versionid . '&product_id=' . $this->productid . '&which=release') . '">' . STR_CMMN_EDIT . '</a>';
                 $options .= '&nbsp;|&nbsp;<a href="' . menuLink('', 'menuAction=boBuildManager.ShowWorkOrders&product_version_id=' . $versionid . '&product_id=' . $this->productid . '&from=version') . '">' . STR_CMMN_SHOWVERSION . '</a>';
                 $options .= '&nbsp;|&nbsp;<a href="' . menuLink('', 'menuAction=boBuildManager.ShowFiles&product_version_id=' . $versionid . '&product_id=' . $this->productid . '&from=version') . '">' . STR_CMMN_SHOWFILES . '</a>';
             }
             $allRecs[$i][6] = $options;
         }
     }
     $oTable->setData($allRecs);
     $oTable->setShowRownum(true);
     $oTable->render();
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:45,代码来源:class.htmlBuildManagerVersionView.inc.php

示例12: Show

 function Show()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_BUILDMANAGER, DCL_PERM_MODIFY)) {
         return PrintPermissionDenied();
     }
     if (($product_id = DCL_Sanitize::ToInt($_REQUEST['product_id'])) === null) {
         return PrintPermissionDenied();
     }
     if (($version_id = DCL_Sanitize::ToInt($_REQUEST['product_version_id'])) === null) {
         return PrintPermissionDenied();
     }
     $oProduct = CreateObject('dcl.dbProducts');
     $oProduct->Load($product_id);
     $oPV = CreateObject('dcl.dbProductVersion');
     if ($oPV->Load(array('product_version_id' => $version_id)) == -1) {
         ShowError('Failed to load version ID ' . $version_id, 'Error');
         return;
     }
     $this->oSmarty->assign('VAL_JSDATEFORMAT', GetJSDateFormat());
     $this->oSmarty->assign('VAL_FORMACTION', menuLink());
     if (isset($GLOBALS['add'])) {
         $this->oSmarty->assign('VAL_MENUACTION', 'boBuildManager.addRelease');
     } else {
         $this->oSmarty->assign('VAL_MENUACTION', 'boBuildManager.modifyRelease');
     }
     $this->oSmarty->assign('TXT_BM_ADD_RELEASE', STR_BM_MOD_RELEASE);
     $this->oSmarty->assign('TXT_BM_PRODUCT', STR_BM_PRODUCT);
     $this->oSmarty->assign('TXT_BM_RELEASE_ALIAS_TITLE', STR_BM_RELEASE_ALIAS_TITLE);
     $this->oSmarty->assign('TXT_BM_RELEASEDATE_DESC', STR_BM_RELEASEDATE_DESC);
     $this->oSmarty->assign('TXT_BM_RELEASEDATE', STR_BM_RELEASEDATE);
     $this->oSmarty->assign('VAL_PRODUCTNAME', $oProduct->name);
     $this->oSmarty->assign('VAL_PRODUCTID', $oProduct->id);
     $this->oSmarty->assign('VAL_VERSIONID', $version_id);
     $this->oSmarty->assign('VAL_VERSIONTEXT', $oPV->product_version_text);
     $this->oSmarty->assign('VAL_VERSIONDESCR', $oPV->product_version_descr);
     $this->oSmarty->assign('VAL_ACTIVE', $oPV->active);
     $this->oSmarty->assign('VAL_VERSIONACTUALDATE', $oPV->product_version_actual_date);
     $this->oSmarty->assign('VAL_VERSIONTARGETDATE', $oPV->product_version_target_date);
     $this->oSmarty->assign('date', $oPV->product_version_target_date);
     $this->oSmarty->assign('VAL_DATEELEMENT', 'product_version_target_date');
     $this->oSmarty->assign('VAL_WHICH', $GLOBALS['which']);
     SmartyDisplay($this->oSmarty, 'htmlBuildManagerReleaseForm.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:45,代码来源:class.htmlBuildManagerReleaseForm.inc.php

示例13: PrintAll

 function PrintAll($orderBy = 'name')
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_PRIORITY, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $objDBPriority = CreateObject('dcl.dbPriorities');
     $objDBPriority->Query("SELECT id,active,short,name,weight FROM priorities ORDER BY {$orderBy}");
     $allRecs = $objDBPriority->FetchAllRows();
     $oTable =& CreateObject('dcl.htmlTable');
     $oTable->setCaption(sprintf(STR_PRIO_TABLETITLE, $orderBy));
     $oTable->addColumn(STR_PRIO_ID, 'numeric');
     $oTable->addColumn(STR_PRIO_ACTIVE, 'string');
     $oTable->addColumn(STR_PRIO_SHORT, 'string');
     $oTable->addColumn(STR_PRIO_NAME, 'string');
     $oTable->addColumn(STR_PRIO_WEIGHT, 'numeric');
     if ($g_oSec->HasPerm(DCL_ENTITY_PRIORITY, DCL_PERM_ADD)) {
         $oTable->addToolbar(menuLink('', 'menuAction=boPriorities.add'), STR_CMMN_NEW);
     }
     if ($g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_VIEW)) {
         $oTable->addToolbar(menuLink('', 'menuAction=boAdmin.ShowSystemConfig'), DCL_MENU_SYSTEMSETUP);
     }
     if (count($allRecs) > 0 && $g_oSec->HasAnyPerm(array(DCL_ENTITY_PRIORITY => array($g_oSec->PermArray(DCL_PERM_MODIFY), $g_oSec->PermArray(DCL_PERM_DELETE))))) {
         $oTable->addColumn(STR_PRIO_OPTIONS, 'html');
         $allName[] = STR_PRIO_OPTIONS;
         for ($i = 0; $i < count($allRecs); $i++) {
             $options = '';
             if ($g_oSec->HasPerm(DCL_ENTITY_PRIORITY, DCL_PERM_MODIFY)) {
                 $options = '<a href="' . menuLink('', 'menuAction=boPriorities.modify&id=' . $allRecs[$i][0]) . '">' . htmlentities(STR_CMMN_EDIT) . '</a>';
             }
             if ($g_oSec->HasPerm(DCL_ENTITY_PRIORITY, DCL_PERM_DELETE)) {
                 if ($options != '') {
                     $options .= '&nbsp;|&nbsp;';
                 }
                 $options .= '<a href="' . menuLink('', 'menuAction=boPriorities.delete&id=' . $allRecs[$i][0]) . '">' . htmlentities(STR_CMMN_DELETE) . '</a>';
             }
             $allRecs[$i][] = $options;
         }
     }
     $oTable->setData($allRecs);
     $oTable->setShowRownum(true);
     $oTable->render();
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:43,代码来源:class.htmlPriorities.inc.php

示例14: PrintAll

 function PrintAll($orderBy = 'name')
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_STATUS, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $objDBStatus = CreateObject('dcl.dbStatuses');
     $objDBStatus->Query("SELECT a.id,a.active,a.short,a.name,b.dcl_status_type_name FROM statuses a,dcl_status_type b WHERE b.dcl_status_type_id=a.dcl_status_type ORDER BY a.{$orderBy}");
     $allRecs = $objDBStatus->FetchAllRows();
     $oTable =& CreateObject('dcl.htmlTable');
     $oTable->setCaption(sprintf(STR_STAT_TABLETITLE, $orderBy));
     $oTable->addColumn(STR_STAT_ID, 'numeric');
     $oTable->addColumn(STR_STAT_ACTIVE, 'string');
     $oTable->addColumn(STR_STAT_SHORT, 'string');
     $oTable->addColumn(STR_STAT_NAME, 'string');
     $oTable->addColumn(STR_STAT_TYPE, 'string');
     if ($g_oSec->HasPerm(DCL_ENTITY_STATUS, DCL_PERM_ADD)) {
         $oTable->addToolbar(menuLink('', 'menuAction=boStatuses.add'), STR_CMMN_NEW);
     }
     if ($g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_VIEW)) {
         $oTable->addToolbar(menuLink('', 'menuAction=boAdmin.ShowSystemConfig'), DCL_MENU_SYSTEMSETUP);
     }
     if (count($allRecs) > 0 && $g_oSec->HasAnyPerm(array(DCL_ENTITY_STATUS => array($g_oSec->PermArray(DCL_PERM_MODIFY), $g_oSec->PermArray(DCL_PERM_DELETE))))) {
         $oTable->addColumn(STR_CMMN_OPTIONS, 'html');
         for ($i = 0; $i < count($allRecs); $i++) {
             $options = '';
             if ($g_oSec->HasPerm(DCL_ENTITY_STATUS, DCL_PERM_MODIFY)) {
                 $options = '<a href="' . menuLink('', 'menuAction=boStatuses.modify&id=' . $allRecs[$i][0]) . '">' . STR_CMMN_EDIT . '</a>';
             }
             if ($g_oSec->HasPerm(DCL_ENTITY_STATUS, DCL_PERM_DELETE)) {
                 if ($options != '') {
                     $options .= '&nbsp;|&nbsp;';
                 }
                 $options .= '<a href="' . menuLink('', 'menuAction=boStatuses.delete&id=' . $allRecs[$i][0]) . '">' . STR_CMMN_DELETE . '</a>';
             }
             $allRecs[$i][] = $options;
         }
     }
     $oTable->setData($allRecs);
     $oTable->setShowRownum(true);
     $oTable->render();
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:42,代码来源:class.htmlStatuses.inc.php

示例15: Show

 function Show($obj)
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_ATTRIBUTESETS, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     if (!is_object($obj)) {
         trigger_error('[htmlAttributesets::Show] ' . STR_ATTR_OBJECTNOTPASSED);
         return;
     }
     $t = CreateSmarty();
     $t->assign('VAL_ATTRIBUTESETNAME', $obj->name);
     SmartyDisplay($t, 'htmlAttributesetdetail.tpl');
     $objA = CreateObject('dcl.dbActions');
     $theAttributes = array('actions', 'priorities', 'severities', 'statuses');
     $aTitles = array('actions' => STR_ATTR_ACTIONS, 'priorities' => STR_ATTR_PRIORITIES, 'severities' => STR_ATTR_SEVERITIES, 'statuses' => STR_ATTR_STATUSES);
     for ($cnt = 0; $cnt < count($theAttributes); $cnt++) {
         $typeid = $cnt + 1;
         $section = $theAttributes[$cnt];
         $query = 'SELECT a.name FROM ' . $section . ' a, attributesetsmap b WHERE a.id=b.keyid ';
         $query .= ' AND b.setid=' . $obj->id;
         $query .= ' AND b.typeid=' . $typeid;
         $query .= ' ORDER BY ';
         if ($section == 'priorities' || $section == 'severities') {
             $query .= 'b.weight';
         } else {
             $query .= 'a.name';
         }
         if ($objA->Query($query) != -1) {
             $oTable = CreateObject('dcl.htmlTable');
             $oTable->setCaption($aTitles[$theAttributes[$cnt]]);
             $oTable->setInline(true);
             $oTable->addToolbar(menuLink('', 'menuAction=boAttributesets.showall'), STR_ATTR_ATTRIBUTESET);
             if ($g_oSec->HasPerm(DCL_ENTITY_ATTRIBUTESETS, DCL_PERM_MODIFY)) {
                 $oTable->addToolbar(menuLink('', 'menuAction=boAttributesets.showmapping&setid=' . $obj->id . '&typeid=' . $typeid), STR_ATTR_MAP);
             }
             $oTable->setData($objA->FetchAllRows());
             $oTable->addColumn(STR_CMMN_NAME, 'string');
             $oTable->render();
         }
     }
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:42,代码来源:class.htmlAttributesetdetail.inc.php


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