コード例 #1
0
 function displayversioninfo()
 {
     global $dcl_info;
     if (!empty($_SERVER)) {
         extract($_SERVER);
     }
     commonHeader();
     $Template = CreateTemplate(array('hForm' => 'htmlVersion.tpl'));
     $Template->set_var('TXT_TITLE', STR_VER_TITLE);
     $Template->set_var('TXT_YOURVER', STR_VER_YOURVER);
     $Template->set_var('TXT_DCL', STR_VER_DCL);
     $Template->set_var('TXT_SERVEROS', STR_VER_SERVEROS);
     $Template->set_var('TXT_SERVERNAME', STR_VER_SERVERNAME);
     $Template->set_var('TXT_WEBSERVER', STR_VER_WEBSERVER);
     $Template->set_var('TXT_PHPVER', STR_VER_PHPVER);
     $Template->set_var('TXT_YOURIP', STR_VER_YOURIP);
     $Template->set_var('TXT_YOURBROWSER', STR_VER_YOURBROWSER);
     $Template->set_var('VAL_DCLVERSION', $dcl_info['DCL_VERSION']);
     $Template->set_var('VAL_SERVERNAME', $SERVER_NAME . '(' . $HTTP_HOST . ')');
     $Template->set_var('VAL_SERVERSOFTWARE', $SERVER_SOFTWARE);
     $Template->set_var('VAL_PHPVERSION', phpversion());
     $Template->set_var('VAL_REMOTEADDR', $REMOTE_ADDR);
     $Template->set_var('VAL_HTTPUSERAGENT', $HTTP_USER_AGENT);
     if (isset($OSTYPE) && isset($HOSTTYPE)) {
         $Template->set_var('VAL_SERVEROS', $OSTYPE . '-' . $HOSTTYPE);
     } elseif (isset($OSTYPE)) {
         $Template->set_var('VAL_SERVEROS', $OSTYPE);
     } elseif (isset($HOSTTYPE)) {
         $Template->set_var('VAL_SERVEROS', $HOSTTYPE);
     } else {
         $Template->set_var('VAL_SERVEROS', '');
     }
     $Template->pparse('out', 'hForm');
 }
コード例 #2
0
 function show($orderBy = 'short')
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ROLE, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $oView = CreateObject('dcl.boView');
     $oView->startrow = 0;
     $oView->numrows = 25;
     $filterActive = '';
     if (isset($_REQUEST['filterActive'])) {
         $filterActive = $_REQUEST['filterActive'];
     }
     $oView->table = 'dcl_role';
     $oView->title = 'Browse Roles';
     $oView->AddDef('columnhdrs', '', array('ID', 'Active', 'Role'));
     $oView->AddDef('columns', '', array('role_id', 'active', 'role_desc'));
     $oView->AddDef('order', '', array('role_desc'));
     if ($filterActive == 'Y' || $filterActive == 'N') {
         $oView->AddDef('filter', 'active', "'{$filterActive}'");
     }
     $oHtml = CreateObject('dcl.htmlRoleBrowse');
     $oHtml->Render($oView);
 }
コード例 #3
0
 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();
 }
コード例 #4
0
 function modify()
 {
     global $dcl_info, $g_oSession, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_PREFS, DCL_PERM_MODIFY)) {
         return PrintPermissionDenied();
     }
     $t =& CreateSmarty();
     $t->assign('PERM_MODIFYCONTACT', $g_oSec->HasPerm(DCL_ENTITY_CONTACT, DCL_PERM_MODIFY) || $g_oSec->HasPerm(DCL_ENTITY_GLOBAL, DCL_PERM_ADMIN));
     $t->assign('VAL_CONTACTID', $g_oSession->Value('contact_id'));
     // Reuse methods from here for lang and template
     $o =& CreateObject('dcl.htmlConfig');
     $t->assign('CMB_DEFAULTTEMPLATESET', $o->GetTemplatesCombo('DCL_PREF_TEMPLATE_SET', GetDefaultTemplateSet()));
     $lang = $dcl_info['DCL_DEFAULT_LANGUAGE'];
     $oPrefs =& CreateObject('dcl.dbPreferences');
     $oPrefs->preferences_data = $g_oSession->Value('dcl_preferences');
     if (isset($oPrefs->preferences_data) && is_array($oPrefs->preferences_data)) {
         if ($oPrefs->Value('DCL_PREF_LANGUAGE') != '') {
             $lang = $oPrefs->Value('DCL_PREF_LANGUAGE');
         }
         $t->assign('VAL_NOTIFYDEFAULT', $oPrefs->Value('DCL_PREF_NOTIFY_DEFAULT'));
         $iOption = $oPrefs->Value('DCL_PREF_CREATED_WATCH_OPTION');
         if ($iOption == '') {
             $iOption = 4;
         }
         $t->assign('VAL_CREATEDWATCHOPTION', $iOption);
     }
     $t->assign('CMB_DEFAULTLANGUAGE', $o->GetLangCombo('DCL_PREF_LANGUAGE', $lang));
     SmartyDisplay($t, 'htmlPreferences.tpl');
 }
コード例 #5
0
 function ShowPage($sPage)
 {
     global $g_oSec, $dcl_info;
     commonHeader();
     if (($productid = DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEW, $productid)) {
         return PrintPermissionDenied();
     }
     $this->oProduct =& CreateObject('dcl.dbProducts');
     if ($this->oProduct->Load($productid) == -1) {
         trigger_error('Could not find a product with an id of ' . $productid, E_USER_ERROR);
         return;
     }
     $this->oSmarty->assign('VAL_ID', $this->oProduct->id);
     $this->oSmarty->assign('VAL_NAME', $this->oProduct->name);
     $this->oSmarty->assign('PERM_VIEWWO', $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_VIEW));
     $this->oSmarty->assign('PERM_VIEWTCK', $g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_VIEW));
     $this->oSmarty->assign('PERM_WIKI', $dcl_info['DCL_WIKI_ENABLED'] == 'Y' && $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEWWIKI));
     $this->oSmarty->assign('PERM_EDIT', $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_MODIFY));
     $this->oSmarty->assign('PERM_DELETE', $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_DELETE));
     $this->oSmarty->assign('PERM_VERSIONS', $dcl_info['DCL_BUILD_MANAGER_ENABLED'] == 'Y' && $this->oProduct->is_versioned == 'Y');
     SmartyDisplay($this->oSmarty, $sPage);
 }
コード例 #6
0
 function view()
 {
     global $g_oSec;
     commonHeader();
     if (($iID = @DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEW, $iID)) {
         return PrintPermissionDenied();
     }
     $which = isset($_REQUEST['which']) ? $_REQUEST['which'] : '';
     if ($which != 'workorders' && $which != 'tickets' && $which != 'modules' && $which != 'release' && $which != 'build') {
         $which = null;
     }
     $versionid = null;
     if (isset($_REQUEST['versionid'])) {
         $versionid = @DCL_Sanitize::ToInt($_REQUEST['versionid']);
     }
     $obj =& CreateObject('dcl.htmlProductDetail');
     if ($which !== null) {
         if ($versionid !== null) {
             $obj->Show($iID, $which, $versionid);
         } else {
             $obj->Show($iID, $which);
         }
     } else {
         $obj->Show($iID);
     }
 }
コード例 #7
0
 function ShowSystemConfig()
 {
     global $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $obj =& CreateObject('dcl.htmlAdminMain');
     $obj->Show();
 }
コード例 #8
0
 function show()
 {
     global $g_oSec;
     commonHeader();
     $t =& CreateSmarty();
     $t->assign('PERM_TICKETS', $g_oSec->HasAnyPerm(array(DCL_ENTITY_TICKET => array($g_oSec->PermArray(DCL_PERM_VIEW), $g_oSec->PermArray(DCL_PERM_VIEWACCOUNT), $g_oSec->PermArray(DCL_PERM_VIEWSUBMITTED)))));
     $t->assign('PERM_WORKORDERS', $g_oSec->HasAnyPerm(array(DCL_ENTITY_WORKORDER => array($g_oSec->PermArray(DCL_PERM_VIEW), $g_oSec->PermArray(DCL_PERM_VIEWACCOUNT), $g_oSec->PermArray(DCL_PERM_VIEWSUBMITTED)))));
     $t->assign('PERM_FAQ', $g_oSec->HasPerm(DCL_ENTITY_FAQ, DCL_PERM_VIEW));
     SmartyDisplay($t, 'htmlPublicMyDCL.tpl');
 }
コード例 #9
0
 function Detail()
 {
     global $g_oSession, $g_oSec, $dcl_info;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_SESSION, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     echo '<pre>';
     print_r($g_oSession->session_data);
     echo '</pre>';
 }
コード例 #10
0
 function ShowResults()
 {
     global $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_MODIFY)) {
         return PrintPermissionDenied();
     }
     $begindate = @DCL_Sanitize::ToDateTime($_REQUEST['begindate'] . ' 00:00:00.00');
     $enddate = @DCL_Sanitize::ToDateTime($_REQUEST['enddate'] . ' 23:59:59.99');
     $responsible = DCL_Sanitize::ToInt($_REQUEST['responsible']);
     if ($begindate === null || $enddate === null) {
         commonHeader();
         trigger_error(STR_SEC_DATEERR, E_USER_ERROR);
         $this->Show(false);
         return;
     }
     $objDBPer =& CreateObject('dcl.dbPersonnel');
     $objDBSA =& CreateObject('dcl.dbSecAudit');
     $objDB = new DCLDb();
     $sCols = 'SA.id, ' . $objDBSA->ConvertTimestamp('SA.actionon', 'actionon') . ', SA.actiontxt, SA.actionparam';
     $sCols .= ', ' . $objDBPer->SelectAllColumns('Pers.');
     $sQuery = "SELECT {$sCols}\n\t\t\tFROM {$objDBSA->TableName} SA INNER JOIN {$objDBPer->TableName} Pers on \n\t\t\tSA.id = pers.id \n\t\t\tWHERE SA.actionon BETWEEN " . $objDBSA->DisplayToSQL($begindate) . ' and ' . $objDBSA->DisplayToSQL($enddate);
     if ($responsible == 0) {
         $respname = STR_SEC_ALLUSERS;
     } else {
         $objDBPer->Load($responsible);
         $respname = $objDBPer->short;
         $sQuery .= ' AND SA.id=' . $responsible;
     }
     $sQuery .= ' ORDER BY SA.actionon';
     $reportAr = null;
     if ($objDB->Query($sQuery) != -1) {
         if ($objDB->next_record()) {
             $idx = -1;
             do {
                 $idx++;
                 $reportAr[$idx][] = $objDB->f('short');
                 $reportAr[$idx][] = $objDB->FormatTimeStampForDisplay($objDB->f('actionon'));
                 $reportAr[$idx][] = $objDB->f('actiontxt');
                 $reportAr[$idx][] = $objDB->f('actionparam');
             } while ($objDB->next_record());
         } else {
             trigger_error(STR_SEC_RPTNODATA, E_USER_ERROR);
             $this->Show(false);
             return;
         }
     }
     $obj =& CreateObject('dcl.htmlSecAudit');
     if (!$obj->Render($reportAr, $begindate, $enddate, $respname)) {
         trigger_error(STR_SEC_RPTERROR, E_USER_ERROR);
         $this->Show(false);
         return;
     }
 }
コード例 #11
0
 function modify()
 {
     commonHeader();
     if (($id = DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     $oPersonnel =& CreateObject('dcl.dbPersonnel');
     if ($oPersonnel->Load($id) != -1) {
         $this->ShowEntryForm($oPersonnel);
     }
 }
コード例 #12
0
ファイル: index.php プロジェクト: phpsource/web-gtk
/**
 * Output a page not found message.
 *
 * @access public
 * @return void
 */
function make404()
{
    // Send the HTTP header.
    header('HTTP/1.0 404 Not Found');
    // Output a header for page not found.
    commonHeader('404 Not Found');
    // Output a message telling the user the page was not found.
    echo "<H1>Not Found</H1>\n";
    echo "<P>The page <B>" . htmlspecialchars($_SERVER['REQUEST_URI']) . "</B> could not be found.</P>\n";
    // Output the footer.
    commonFooter();
}
コード例 #13
0
 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');
 }
コード例 #14
0
 function PrintAll($orderBy = 'name')
 {
     global $g_oSec, $g_oSession;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_SAVEDSEARCH, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     if ($g_oSession->IsInWorkspace()) {
         ShowWarning('You are currently in a workspace.  It is possible for results to be mutually exclusive if a search contains a product filter.  If you do not see the results you expect, switch to "No Workspace" or another workspace that has the products contained in the search.', '', '', array());
     }
     $objDB = CreateObject('dcl.dbViews');
     $objDB->Query('SELECT viewid,whoid,ispublic,name,tablename FROM views WHERE whoid=' . $GLOBALS['DCLID'] . " OR ispublic='Y' ORDER BY {$orderBy}");
     $allRecs = $objDB->FetchAllRows();
     $oTable =& CreateObject('dcl.htmlTable');
     $oTable->setCaption(sprintf(STR_VW_TITLE, $orderBy));
     $oTable->addColumn(STR_VW_ID, 'numeric');
     $oTable->addColumn(STR_VW_OWNER, 'string');
     $oTable->addColumn(STR_VW_PUBLIC, 'string');
     $oTable->addColumn(STR_VW_NAME, 'html');
     $oTable->addColumn(STR_VW_TABLE, 'string');
     $oTable->addColumn(STR_CMMN_OPTIONS, 'html');
     $objDBP = CreateObject('dcl.dbPersonnel');
     for ($i = 0; $i < count($allRecs); $i++) {
         $allRecs[$i][3] = sprintf('<a href="%s">%s</a>', menuLink('', sprintf('menuAction=boViews.exec&viewid=%d', $allRecs[$i][0])), $allRecs[$i][3]);
         $options = '';
         if ($allRecs[$i][4] == 'workorders') {
             $options .= '<a href="' . menuLink('', 'menuAction=htmlWOSearches.ShowView&id=' . $allRecs[$i][0]) . '">' . STR_VW_SETUP . '</a>';
         } else {
             if ($allRecs[$i][4] == 'tickets') {
                 $options .= '<a href="' . menuLink('', 'menuAction=htmlTicketSearches.ShowView&id=' . $allRecs[$i][0]) . '">' . STR_VW_SETUP . '</a>';
             }
         }
         if ($allRecs[$i][1] == $GLOBALS['DCLID'] || $g_oSec->HasPerm(DCL_ENTITY_GLOBAL, DCL_PERM_ADMIN)) {
             if ($options != '') {
                 $options .= '&nbsp;|&nbsp;';
             }
             $options .= '<a href="' . menuLink('', 'menuAction=boViews.delete&id=' . $allRecs[$i][0]) . '">' . STR_CMMN_DELETE . '</a>';
         }
         if ($options == '') {
             $options = '&nbsp;';
         }
         $objDBP->Load($allRecs[$i][1]);
         $allRecs[$i][1] = $objDBP->short;
         $allRecs[$i][] = $options;
     }
     $oTable->setData($allRecs);
     $oTable->setShowRownum(true);
     $oTable->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();
 }
 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');
 }
コード例 #17
0
 function submitModify()
 {
     global $g_oSec;
     commonHeader();
     if (($id = DCL_Sanitize::ToInt($_REQUEST['contact_id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_CONTACT, DCL_PERM_MODIFY, $id)) {
         return PrintPermissionDenied();
     }
     CleanArray($_REQUEST);
     $aOrgs = @DCL_Sanitize::ToIntArray($_REQUEST['org_id']);
     $oDbContact = CreateObject('dcl.dbOrgContact');
     $oDbContact->updateOrgs($id, $aOrgs);
     $oContact = CreateObject('dcl.htmlContactDetail');
     $oContact->show();
 }
コード例 #18
0
 function Page()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ROLE, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $oView = CreateObject('dcl.boView');
     $oView->SetFromURL();
     if ((isset($_REQUEST['btnNav']) || isset($_REQUEST['jumptopage'])) && isset($_REQUEST['startrow']) && isset($_REQUEST['numrows'])) {
         if (isset($_REQUEST['btnNav']) && $_REQUEST['btnNav'] == '<<') {
             $oView->startrow = (int) $_REQUEST['startrow'] - (int) $_REQUEST['numrows'];
         } else {
             if (isset($_REQUEST['btnNav']) && $_REQUEST['btnNav'] == '>>') {
                 $oView->startrow = (int) $_REQUEST['startrow'] + (int) $_REQUEST['numrows'];
             } else {
                 $iPage = (int) $_REQUEST['jumptopage'];
                 if ($iPage < 1) {
                     $iPage = 1;
                 }
                 $oView->startrow = ($iPage - 1) * (int) $_REQUEST['numrows'];
             }
         }
         if ($oView->startrow < 0) {
             $oView->startrow = 0;
         }
         $oView->numrows = (int) $_REQUEST['numrows'];
     } else {
         $oView->numrows = 25;
         $oView->startrow = 0;
     }
     $filterActive = '0';
     if (isset($_REQUEST['filterActive'])) {
         $filterActive = $_REQUEST['filterActive'];
     }
     if ($filterActive != '0') {
         $oView->ReplaceDef('filter', 'active', "'{$filterActive}'");
     } else {
         $oView->RemoveDef('filter', 'active');
     }
     $this->sColumnTitle = STR_CMMN_OPTIONS;
     $this->bShowPager = true;
     $this->Render($oView);
 }
コード例 #19
0
 function PrintAll($orderBy = 'name')
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ACTION, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $objDBActions = CreateObject('dcl.dbActions');
     $objDBActions->Query("SELECT id,active,short,name FROM actions ORDER BY {$orderBy}");
     $allRecs = $objDBActions->FetchAllRows();
     $oTable =& CreateObject('dcl.htmlTable');
     $oTable->setCaption(sprintf(STR_ACTN_TABLETITLE, $orderBy));
     $oTable->addColumn(STR_ACTN_ID, 'numeric');
     $oTable->addColumn(STR_ACTN_ACTIVEABB, 'string');
     $oTable->addColumn(STR_ACTN_SHORT, 'string');
     $oTable->addColumn(STR_ACTN_NAME, 'string');
     if ($g_oSec->HasPerm(DCL_ENTITY_ACTION, DCL_PERM_ADD)) {
         $oTable->addToolbar(menuLink('', 'menuAction=boActions.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_ACTION => array($g_oSec->PermArray(DCL_PERM_MODIFY), $g_oSec->PermArray(DCL_PERM_DELETE))))) {
         $oTable->addColumn(STR_ACTN_OPTIONS, 'html');
         for ($i = 0; $i < count($allRecs); $i++) {
             $options = '';
             if ($g_oSec->HasPerm(DCL_ENTITY_ACTION, DCL_PERM_MODIFY)) {
                 $options = '<a href="' . menuLink('', 'menuAction=boActions.modify&id=' . $allRecs[$i][0]) . '">' . STR_CMMN_EDIT . '</a>';
             }
             if ($g_oSec->HasPerm(DCL_ENTITY_ACTION, DCL_PERM_DELETE)) {
                 if ($options != '') {
                     $options .= '&nbsp;|&nbsp;';
                 }
                 $options .= '<a href="' . menuLink('', 'menuAction=boActions.delete&id=' . $allRecs[$i][0]) . '">' . STR_CMMN_DELETE . '</a>';
             }
             $allRecs[$i][] = $options;
         }
     }
     $oTable->setData($allRecs);
     $oTable->setShowRownum(true);
     $oTable->render();
 }
コード例 #20
0
 function dbmodify()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_MODIFY)) {
         return PrintPermissionDenied();
     }
     $aCheckboxes = array('DCL_AUTO_DATE', 'DCL_PROJECT_XML_TEMPLATES', 'DCL_SMTP_ENABLED', 'DCL_GATEWAY_TICKET_ENABLED', 'DCL_GATEWAY_TICKET_AUTORESPOND', 'DCL_GATEWAY_TICKET_REPLY', 'DCL_PROJECT_INCLUDE_CHILD_STATS', 'DCL_PROJECT_INCLUDE_PARENT_STATS', 'DCL_PROJECT_BROWSE_PARENTS_ONLY', 'DCL_WO_NOTIFICATION_HTML', 'DCL_TCK_NOTIFICATION_HTML', 'DCL_GATEWAY_WO_ENABLED', 'DCL_GATEWAY_WO_AUTORESPOND', 'DCL_GATEWAY_WO_REPLY', 'DCL_WO_SECONDARY_ACCOUNTS_ENABLED', 'DCL_WIKI_ENABLED', 'DCL_SCCS_ENABLED', 'DCL_SMTP_AUTH_REQUIRED', 'DCL_BUILD_MANAGER_ENABLED', 'DCL_SEC_AUDIT_ENABLED', 'DCL_SEC_AUDIT_LOGIN_ONLY', 'DCL_FORCE_SECURE_GRAVATAR');
     // get all of the settings except for DCL_VERSION and LAST_CONFIG_UPDATE and update
     // the ones that have changed.
     $bHasUpdates = false;
     $oConfig =& CreateObject('dcl.dbConfig');
     $oConfig->LoadForModify();
     while ($oConfig->next_record()) {
         $oConfig->GetRow();
         if (isset($_REQUEST[$oConfig->dcl_config_name])) {
             $_REQUEST[$oConfig->dcl_config_name] = $oConfig->GPCStripSlashes($_REQUEST[$oConfig->dcl_config_name]);
         }
         // checkboxes need special handling
         if (in_array($oConfig->dcl_config_name, $aCheckboxes)) {
             $newVal = isset($_REQUEST[$oConfig->dcl_config_name]) && $_REQUEST[$oConfig->dcl_config_name] == 'Y' ? 'Y' : 'N';
             if ($newVal != $dcl_info[$oConfig->dcl_config_name]) {
                 $oConfig->{$oConfig->dcl_config_field} = $newVal;
                 $oConfigTemp = $oConfig;
                 $oConfigTemp->Edit();
                 $dcl_info[$oConfig->dcl_config_name] = $newVal;
                 $bHasUpdates = true;
             }
         } elseif (isset($_REQUEST[$oConfig->dcl_config_name]) && $dcl_info[$oConfig->dcl_config_name] != $_REQUEST[$oConfig->dcl_config_name]) {
             $oConfig->{$oConfig->dcl_config_field} = $_REQUEST[$oConfig->dcl_config_name];
             $oConfigTemp = $oConfig;
             $oConfigTemp->Edit();
             $dcl_info[$oConfig->dcl_config_name] = $_REQUEST[$oConfig->dcl_config_name];
             $bHasUpdates = true;
         }
     }
     if ($bHasUpdates) {
         $oConfigTemp->UpdateTimeStamp();
     }
     $obj =& CreateObject('dcl.htmlAdminMain');
     $obj->Show();
 }
 function Show()
 {
     global $g_oSec;
     commonHeader();
     if (($id = DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_HOTLIST, DCL_PERM_VIEW, $id)) {
         return PrintPermissionDenied();
     }
     $this->hotlist =& CreateObject('dcl.dbHotlist');
     if ($this->hotlist->Load($id) == -1) {
         trigger_error('Could not find a hotlist with an id of ' . $id, E_USER_ERROR);
         return;
     }
     $this->oSmarty->assign('VAL_HOTLISTID', $id);
     $this->oSmarty->assign('VAL_NAME', $this->hotlist->hotlist_desc);
     SmartyDisplay($this->oSmarty, 'htmlHotlistProjectDashboard.tpl');
 }
コード例 #22
0
 function View()
 {
     global $g_oSec;
     commonHeader();
     if (($id = @DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if ($id > 0) {
         if (!$g_oSec->HasPerm(DCL_ENTITY_HOTLIST, DCL_PERM_VIEW, $id)) {
             return PrintPermissionDenied();
         }
         $status = 0;
         $responsible = 0;
         if (($status = @DCL_Sanitize::ToSignedInt($_REQUEST['wostatus'])) === null) {
             $status = 0;
         }
         if (($responsible = @DCL_Sanitize::ToInt($_REQUEST['woresponsible'])) === null) {
             $responsible = 0;
         }
         $this->show($id, $status, $responsible);
     }
 }
コード例 #23
0
 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->addColumn(STR_CMMN_ID, 'numeric');
     $oTable->addColumn('Version ID', 'numeric');
     $oTable->addColumn(STR_BM_RELEASEDATE_DESC, 'string');
     $oMeta =& CreateObject('dcl.DCL_MetadataDisplay');
     $oProductVersion = CreateObject('dcl.dbProductVersion');
     $oProductVersion->Load(array('product_version_id' => $this->product_version_id));
     $oTable->setCaption($oView->title . ': ' . $oProductVersion->product_version_text);
     $oTable->addToolbar(menuLink('', 'menuAction=boBuildManager.add&which=build&product_id=' . $this->productid . '&product_version_id=' . $this->product_version_id), STR_CMMN_NEW);
     $oTable->addToolbar(menuLink('', 'menuAction=boProducts.viewRelease&id=' . $this->productid), $oMeta->GetProduct($this->productid));
     $oTable->addToolbar(menuLink('', 'menuAction=boProducts.viewBuild&product_version_id=' . $this->product_version_id . '&product_id=' . $this->productid), STR_CMMN_REFRESH);
     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++) {
             $buildid = $allRecs[$i][0];
             $versionid = $allRecs[$i][1];
             $options = '<a href="' . menuLink('', 'menuAction=htmlBuildManager.ShowWOByBuild&product_build_id=' . $buildid . '&product_id=' . $this->productid) . '">' . STR_CMMN_VIEW . '</a>';
             $options .= '&nbsp;|&nbsp;<a href="' . menuLink('', 'menuAction=htmlBuildManager.ModifyBuildInfo&buildid=' . $buildid . '&product_id=' . $this->productid . '&product_version_id=' . $versionid . '&which=build') . '">' . STR_CMMN_EDIT . '</a>';
             $allRecs[$i][3] = $options;
         }
     }
     $oTable->setData($allRecs);
     $oTable->setShowRownum(true);
     $oTable->render();
 }
コード例 #24
0
 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->addColumn(STR_WO_JCN, 'html');
     $oTable->addColumn(STR_WO_SEQ, 'html');
     $oTable->addColumn(STR_WO_SUMMARY, 'string');
     $oTable->addColumn(STR_WO_STATUS, 'string');
     $oTable->setCaption($oView->title);
     if (!$this->buildid) {
         $menuAction = 'menuAction=boproducts.viewRelease&id=' . $this->productid;
     } else {
         $menuAction = 'menuAction=boProducts.viewBuild&product_version_id=' . $this->versionid . '&product_id=' . $this->productid;
     }
     $oTable->addToolbar(menuLink('', $menuAction), 'Back');
     if (count($allRecs) > 0 && $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_VIEW)) {
         for ($i = 0; $i < count($allRecs); $i++) {
             $jcn = $allRecs[$i][0];
             $seq = $allRecs[$i][1];
             $allRecs[$i][0] = '<a href="' . menuLink('', 'menuAction=boWorkorders.viewjcn&jcn=' . $jcn . '&seq=' . $seq) . '">' . $jcn . '</a>';
             $allRecs[$i][1] = '<a href="' . menuLink('', 'menuAction=boWorkorders.viewjcn&jcn=' . $jcn . '&seq=' . $seq) . '">' . $seq . '</a>';
         }
     }
     $oTable->setData($allRecs);
     $oTable->setShowRownum(true);
     $oTable->render();
 }
コード例 #25
0
ファイル: test.php プロジェクト: geldarr/hack-space
<?php

define('GLPI_ROOT', '../..');
include GLPI_ROOT . "/inc/includes.php";
commonHeader($LANG['plugin_hreporting']["name"], '', "plugins", "hreporting");
?>

<link href="lib/protovis/examples/ex.css" rel="stylesheet" type="text/css">
<script src="lib/protovis/protovis.min.js" type="text/javascript"></script>
<script src="lib/protovis/examples/crimea/crimea.js" type="text/javascript"></script>
<style type="text/css">
#fig {
width: 600px;
height: 300px;
}
</style>
<div class="center"><div id="fig">
    <script type="text/javascript+protovis">

var w = 545,
    h = 280,
    x = pv.Scale.ordinal(crimea, function(d) d.date).splitBanded(0, w, 4 / 5),
    y = pv.Scale.linear(0, 1500).range(0, h),
    k = x.range().band / causes.length,
    format = pv.Format.date("%b");

var vis = new pv.Panel()
    .width(w)
    .height(h)
    .margin(19.5)
    .right(40);
コード例 #26
0
  @package   Plugin Monitoring for GLPI
  @author    David Durieux
  @co-author 
  @comment   
  @copyright Copyright (c) 2011-2012 Plugin Monitoring for GLPI team
  @license   AGPL License 3.0 or (at your option) any later version
             http://www.gnu.org/licenses/agpl-3.0-standalone.html
  @link      https://forge.indepnet.net/projects/monitoring/
  @since     2011

  ------------------------------------------------------------------------
*/
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
PluginMonitoringProfile::checkRight("config", "w");
commonHeader($LANG['plugin_monitoring']['title'][0], $_SERVER["PHP_SELF"], "plugins", "monitoring", "config");
$pmConfig = new PluginMonitoringConfig();
if (isset($_POST["update"])) {
    $pmConfig->update($_POST);
    glpi_header($_SERVER['HTTP_REFERER']);
} else {
    if (isset($_POST['timezones_add'])) {
        $input = array();
        $pmConfig->getFromDB($_POST['id']);
        $input['id'] = $_POST['id'];
        $a_timezones = importArrayFromDB($pmConfig->fields['timezones']);
        foreach ($_POST['timezones_to_add'] as $timezone) {
            $a_timezones[] = $timezone;
        }
        $input['timezones'] = exportArrayToDB($a_timezones);
        $pmConfig->update($input);
コード例 #27
0
  You should have received a copy of the GNU General Public License
  along with GLPI; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  ------------------------------------------------------------------------
*/
// Original Author of file: DURIEUX David
// Purpose of file:
// ----------------------------------------------------------------------
//Options for GLPI 0.71 and newer : need slave db to access the report
$USEDBREPLICATE = 1;
$DBCONNECTION_REQUIRED = 0;
$NEEDED_ITEMS = array("search", "computer", "networking");
define('GLPI_ROOT', '../../..');
include GLPI_ROOT . "/inc/includes.php";
PluginFusioninventoryAuth::checkRight("reports", "r");
commonHeader($LANG['plugin_fusioninventory']["title"][0], $_SERVER['PHP_SELF'], "utils", "report");
if (isset($_GET["reset_search"])) {
    resetSearch();
}
if (!isset($_GET["start"])) {
    $_GET["start"] = 0;
}
$_GET = getValues($_GET, $_POST);
displaySearchForm();
manageGetValuesInSearch(PLUGIN_FUSIONINVENTORY_SNMP_NETWORKING_PORTS2);
if (isset($_POST["dropdown_calendar"]) && isset($_POST["dropdown_sup_inf"])) {
    $_GET["field"][0] = 3;
    $_GET["contains"][0] = getContainsArray($_POST);
    $_GET["field"][1] = 2;
    $_GET["contains"][1] = $_POST['location'];
    $_GET["link"][1] = "AND";
コード例 #28
0
ファイル: authldap.php プロジェクト: ryukansent/Thesis-SideB
-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GLPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
checkRight("config", "r");
commonHeader($LANG['login'][2], $_SERVER['PHP_SELF'], "config", "extauth", "ldap");
Search::show('AuthLDAP');
commonFooter();
コード例 #29
0
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with GLPI; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  ------------------------------------------------------------------------
*/
// Original Author of file: David DURIEUX
// Purpose of file:
// ----------------------------------------------------------------------
if (!defined('GLPI_ROOT')) {
    define('GLPI_ROOT', '../../..');
}
$NEEDED_ITEMS = array("fusioninventory", "search");
include GLPI_ROOT . "/inc/includes.php";
commonHeader($LANG['plugin_fusioninventory']["title"][0], $_SERVER["PHP_SELF"], "plugins", "fusioninventory");
PluginFusioninventoryAuth::checkRight("reports", "r");
PluginFusioninventoryDisplay::mini_menu();
echo "<table class='tab_cadre'>";
echo "<th align='center'>" . $LANG["Menu"][6] . "</th>";
echo "<tr class='tab_bg_1'>";
echo "<td align='center'>";
echo "<a href='" . GLPI_ROOT . "/plugins/fusioninventory/report/switch_ports.history.php'>" . $LANG['plugin_fusioninventory']["menu"][5] . "</a>";
echo "</td>";
echo "</tr>";
echo "<tr class='tab_bg_1'>";
echo "<td align='center'>";
echo "<a href='" . GLPI_ROOT . "/plugins/fusioninventory/report/ports_date_connections.php'>" . $LANG['plugin_fusioninventory']["menu"][6] . "</a>";
echo "</td>";
echo "</tr>";
/*
コード例 #30
0
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
commonHeader($LANG['Menu'][13], '', "maintain", "stat");
checkRight("statistic", "1");
if (empty($_REQUEST["type"])) {
    $_REQUEST["type"] = "user";
}
if (empty($_REQUEST["showgraph"])) {
    $_REQUEST["showgraph"] = 0;
}
if (empty($_REQUEST["date1"]) && empty($_REQUEST["date2"])) {
    $year = date("Y") - 1;
    $_REQUEST["date1"] = date("Y-m-d", mktime(1, 0, 0, date("m"), date("d"), $year));
    $_REQUEST["date2"] = date("Y-m-d");
}
if (!empty($_REQUEST["date1"]) && !empty($_REQUEST["date2"]) && strcmp($_REQUEST["date2"], $_REQUEST["date1"]) < 0) {
    $tmp = $_REQUEST["date1"];
    $_REQUEST["date1"] = $_REQUEST["date2"];