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); }
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'); }
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'); }
function show() { global $dcl_info, $g_oSec; if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_MODIFY)) { return PrintPermissionDenied(); } $objPersonnel = CreateObject('dcl.htmlPersonnel'); $oDBPersonnel = CreateObject('dcl.dbPersonnel'); if ($oDBPersonnel->Load($GLOBALS['DCLID']) == -1) { return; } $t =& CreateSmarty(); $oSelect = CreateObject('dcl.htmlSelect'); $t->assign('CMB_USERS', $objPersonnel->GetCombo(0, 'responsible', 'lastfirst', 0, false)); $begindate = @DCL_Sanitize::ToDate($_REQUEST['begindate']); if ($begindate !== null) { $t->assign('VAL_BEGINDATE', $begindate); } else { $t->assign('VAL_BEGINDATE', ''); } $enddate = @DCL_Sanitize::ToDate($_REQUEST['enddate']); if ($enddate !== null) { $t->assign('VAL_ENDDATE', $enddate); } else { $t->assign('VAL_ENDDATE', ''); } SmartyDisplay($t, 'htmlSecAuditBrowse.tpl'); }
function ShowAggNav() { global $dcl_info; $t =& CreateSmarty(); $t->assign('TXT_AGGREGATE', 'Aggregate'); $t->assign('TXT_BY', STR_CMMN_BY); $t->assign('TXT_FORDATES', 'For Dates'); $aGroups = array(); foreach ($this->_aTypeInfo as $key => $val) { array_push($aGroups, array('key' => $key, 'desc' => $val['__title__'])); } $t->assign('groups', $aGroups); $t->assign('group', isset($_REQUEST['group']) ? $_REQUEST['group'] : ''); $aSubGroups = array(); foreach ($this->_aTypeInfo['workorders'] as $key => $val) { if ($key == '__title__') { continue; } array_push($aSubGroups, array('key' => $key, 'desc' => $val[1])); } $t->assign('subgroups', $aSubGroups); $t->assign('subgroup', isset($_REQUEST['sub']) ? $_REQUEST['sub'] : ''); if (isset($_REQUEST['chkLimitByDate']) && $_REQUEST['chkLimitByDate'] == 1) { $t->assign('VAL_DATEFROM', DCL_Sanitize::ToDate($_REQUEST['dateFrom'])); $t->assign('VAL_DATETO', DCL_Sanitize::ToDate($_REQUEST['dateTo'])); $t->assign('VAL_CHKLIMIT', ' checked'); } else { $aFewDaysAgo = mktime(0, 0, 0, date('m'), date('d') - 1, date('Y')); $t->assign('VAL_DATEFROM', date($dcl_info['DCL_DATE_FORMAT'], $aFewDaysAgo)); $t->assign('VAL_DATETO', date($dcl_info['DCL_DATE_FORMAT'])); $t->assign('VAL_CHKLIMIT', ''); } SmartyDisplay($t, 'htmlAggNav.tpl'); }
function ShowEntryForm($obj = '') { global $dcl_info, $g_oSec; $isEdit = is_object($obj); if (!$g_oSec->HasPerm(DCL_ENTITY_PERSONNEL, $isEdit ? DCL_PERM_MODIFY : DCL_PERM_ADD)) { return PrintPermissionDenied(); } $Template =& CreateSmarty(); $Template->assign('IS_EDIT', $isEdit); $oUserRole = CreateObject('dcl.dbUserRole'); $oDept = CreateObject('dcl.htmlDepartments'); if ($isEdit) { $Template->assign('VAL_PERSONNELID', $obj->id); $Template->assign('VAL_ACTIVE', $obj->active); $Template->assign('VAL_SHORT', $obj->short); $Template->assign('VAL_REPORTTO', $obj->reportto); $Template->assign('VAL_DEPARTMENT', $obj->department); $Template->assign('Roles', $oUserRole->GetGlobalRoles($obj->id)); $oMeta =& CreateObject('dcl.DCL_MetadataDisplay'); $aContact =& $oMeta->GetContact($obj->contact_id); $Template->assign('VAL_CONTACTID', $obj->contact_id); $Template->assign('VAL_CONTACTNAME', $aContact['name']); } else { $Template->assign('VAL_ACTIVE', 'Y'); $Template->assign('VAL_REPORTTO', $GLOBALS['DCLID']); $Template->assign('VAL_DEPARTMENT', 0); $Template->assign('VAL_SHORT', ''); $Template->assign('Roles', $oUserRole->GetGlobalRoles()); } SmartyDisplay($Template, 'htmlPersonnelForm.tpl'); }
function EndPage() { if (isset($_REQUEST['bNoHeader'])) { return; } $t =& CreateSmarty(); SmartyDisplay($t, 'footer.tpl'); }
function Show() { $this->sUUID = md5(uniqid(rand(), true)); $this->t->assign_by_ref('MESSAGE', $this); if (!defined('__DCL_MESSAGE__')) { define('__DCL_MESSAGE__', 1); } SmartyDisplay($this->t, $this->sTemplate); }
function DisplayGraphForm() { global $dcl_info; $t =& CreateSmarty(); $t->assign('CMB_DAYS', '<select id="days" name="days"><option value="7">7 ' . STR_WO_DAYS . '</option><option value="14">14 ' . STR_WO_DAYS . '</option></select>'); $t->assign('VAL_TODAY', date($dcl_info['DCL_DATE_FORMAT'])); $o = CreateObject('dcl.htmlProducts'); $t->assign('CMB_PRODUCTS', $o->GetCombo(0, 'product', 'name', 0, 0, false)); SmartyDisplay($t, 'htmlTicketGraph.tpl'); }
function Refresh($toHere = 'index.php', $session_id = '', $domain = 'default') { $oSmarty =& CreateSmarty(); if (isset($_REQUEST['refer_to']) && $_REQUEST['refer_to'] != '') { $toHere .= sprintf('%srefer_to=%s', strpos($toHere, '?') > 0 ? '&' : '?', urlencode(urldecode($_REQUEST['refer_to']))); } $oSmarty->assign('URL', $toHere); SmartyDisplay($oSmarty, 'logout.tpl'); exit; }
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'); }
function ShowUserVsProductStatusForm() { global $dcl_info; commonHeader(); $objPersonnel = CreateObject('dcl.htmlPersonnel'); $objProducts = CreateObject('dcl.htmlProducts'); $t = CreateSmarty(); $t->assign('CMB_PEOPLE', $objPersonnel->GetCombo(0, 'people', 'lastfirst', 8, false)); $t->assign('CMB_PRODUCTS', $objProducts->GetCombo(0, 'products', 'name', 0, 8, false)); SmartyDisplay($t, 'htmlTicketStatisticsForm.tpl'); }
function Show() { global $dcl_info, $g_oSec; if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_VIEW)) { return PrintPermissionDenied(); } $oSmarty =& CreateSmarty(); $oSmarty->assign('TXT_SETUPDESC', STR_ADMIN_SETUPDESC); $oSmarty->assign('TXT_SETUPTITLE', STR_ADMIN_SETUPTITLE); $oSmarty->assign('VAL_OPTIONS', $this->GetOptions()); SmartyDisplay($oSmarty, 'htmlAdminMain.tpl'); }
function displayPasswdForm() { global $dcl_info, $g_oSec; if (!$g_oSec->HasPerm(DCL_ENTITY_PREFS, DCL_PERM_PASSWORD)) { return PrintPermissionDenied(); } $oSmarty =& CreateSmarty(); $oSmarty->assign('PERM_ADMIN', $g_oSec->HasPerm(DCL_ENTITY_GLOBAL, DCL_PERM_ADMIN)); $oSmarty->assign('VAL_USERID', $GLOBALS['DCLID']); $oSmarty->assign('VAL_USERNAME', $GLOBALS['DCLNAME']); SmartyDisplay($oSmarty, 'htmlPersonnelPasswdForm.tpl'); }
function ShowUserVsProductStatusForm() { global $dcl_info, $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_VIEW)) { return PrintPermissionDenied(); } $objPersonnel = CreateObject('dcl.htmlPersonnel'); $objProducts = CreateObject('dcl.htmlProducts'); $t =& CreateSmarty(); $t->assign('CMB_PEOPLE', $objPersonnel->GetCombo(0, 'people', 'lastfirst', 8, false)); $t->assign('CMB_PRODUCTS', $objProducts->GetCombo(0, 'products', 'name', 0, 8, false)); SmartyDisplay($t, 'htmlWOStatisticsForm.tpl'); }
function _display($jcn, $seq, $menuAction, $sFunction) { global $dcl_info, $g_oSec; if (!$g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_ADDTASK)) { return PrintPermissionDenied(); } $objProject = CreateObject('dcl.htmlProjects'); $t =& CreateSmarty(); $t->assign('TXT_FUNCTION', $sFunction); $t->assign('menuAction', $menuAction); $t->assign('CMB_PROJECT', $objProject->GetCombo(0, 'projectid', 0, 0, -1, true)); $t->assign('jcn', $jcn); $t->assign('seq', $seq); SmartyDisplay($t, 'htmlProjectmapForm.tpl'); }
function getparameters($needHdr = true) { global $dcl_info; if ($needHdr == true) { commonHeader(); } $oProducts = CreateObject('dcl.htmlProducts'); $oProjects = CreateObject('dcl.htmlProjects'); $oSmarty = CreateSmarty(); $oSmarty->assign('VAL_FORMACTION', menuLink()); $oSmarty->assign('CMB_PRODUCTS', $oProducts->GetCombo(isset($_REQUEST['products']) ? DCL_Sanitize::ToInt($_REQUEST['products']) : 0, 'products', 'name', 0, 8, false)); $oSmarty->assign('CMB_PROJECTS', $oProjects->GetCombo(isset($_REQUEST['projects']) ? DCL_Sanitize::ToInt($_REQUEST['projects']) : 0, 'projects', 0, 8)); $oSmarty->assign('VAL_BEGINDATE', isset($_REQUEST['begindate']) ? DCL_Sanitize::ToDate($_REQUEST['begindate']) : ''); $oSmarty->assign('VAL_ENDDATE', isset($_REQUEST['enddate']) ? DCL_Sanitize::ToDate($_REQUEST['enddate']) : ''); SmartyDisplay($oSmarty, 'htmlMetricsWorkOrders.tpl'); }
function Show($projectid, $wostatus, $woresponsible) { global $dcl_info, $dcl_domain_info, $dcl_domain, $g_oSec; if (!isset($_REQUEST['wogroupby'])) { $_REQUEST['wogroupby'] = 'none'; } $bIsGrouping = $_REQUEST['wogroupby'] != 'none'; if (!$g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_VIEW, $projectid)) { return PrintPermissionDenied(); } $this->oProject =& CreateObject('dcl.dbProjects'); if ($this->oProject->Load($projectid) == -1) { trigger_error('Could not find a project with an id of ' . $projectid, E_USER_ERROR); return; } $oMeta =& CreateObject('dcl.DCL_MetadataDisplay'); $this->oSmarty->assign('VAL_PROJECTID', $this->oProject->projectid); $this->oSmarty->assign('VAL_REPORTTO', $oMeta->GetPersonnel($this->oProject->reportto)); $this->oSmarty->assign('VAL_WATCHTYPE', '2'); $this->oSmarty->assign('VAL_NAME', $this->oProject->name); $this->oSmarty->assign('VAL_PROJECTDEADLINE', $this->oProject->projectdeadline); $this->oSmarty->assign('VAL_CREATEDON', $this->oProject->createdon); $this->oSmarty->assign('VAL_LASTACTIVITY', $this->oProject->lastactivity); $this->oSmarty->assign('VAL_FINALCLOSE', $this->oProject->finalclose); $this->oSmarty->assign('VAL_DESCRIPTION', $this->oProject->description); $this->oSmarty->assign('VAL_WIKITYPE', 1); // 1 = DCL_WIKI_PROJECT $this->oSmarty->assign('VAL_CREATEDBY', $oMeta->GetPersonnel($this->oProject->createdby)); $this->oSmarty->assign('VAL_STATUS', $oMeta->GetStatus($this->oProject->status)); $this->oSmarty->assign('VAL_FILTERSTATUS', $wostatus); $this->oSmarty->assign('VAL_FILTERRESPONSIBLE', $woresponsible); $this->oSmarty->assign('VAL_FILTERGROUPBY', $_REQUEST['wogroupby']); $this->oSmarty->assign('OPT_GROUPBY', array('none' => STR_CMMN_SELECTONE, '3' => STR_WO_RESPONSIBLE, '7' => STR_WO_STATUS, '4' => STR_WO_PRODUCT, '5' => STR_CMMN_MODULE, '2' => STR_WO_TYPE)); $this->oSmarty->assign('PERM_AUDIT', $g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_AUDIT)); $this->oSmarty->assign('PERM_ATTACHFILE', $g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_ATTACHFILE)); $this->oSmarty->assign('PERM_REMOVEFILE', $g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_REMOVEFILE)); $this->SetStatistics(); $this->SetChildProjects(); $this->SetTasks($wostatus, $woresponsible, $bIsGrouping); if ($g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_VIEWFILE)) { $oAttachments =& CreateObject('dcl.boFile'); $this->oSmarty->assign('VAL_ATTACHMENTS', $oAttachments->GetAttachments(DCL_ENTITY_PROJECT, $this->oProject->projectid)); } $oProjects =& CreateObject('dcl.boProjects'); $this->oSmarty->assign('VAL_PROJECTS', $oProjects->GetParentProjectPath($this->oProject->projectid)); SmartyDisplay($this->oSmarty, 'htmlProjectsDetail.tpl'); }
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'); }
function GetCriteria() { global $dcl_info; commonHeader(); if (($id = DCL_Sanitize::ToInt($_REQUEST['projectid'])) === null) { return PrintPermissionDenied(); } $oMeta =& CreateObject('dcl.DCL_MetadataDisplay'); $t = CreateSmarty(); $t->assign('VAL_PROJECTNAME', $oMeta->GetProject($id)); $t->assign('VAL_PROJECTID', $id); $t->assign('VAL_DAYS', 7); $t->assign('VAL_ENDON', date($dcl_info['DCL_DATE_FORMAT'])); $t->assign('VAL_SCOPE', true); $t->assign('VAL_TIMECARDS', true); $t->assign('VAL_CODE', true); SmartyDisplay($t, 'htmlProjectTimelineForm.tpl'); }
function showForm($obj = '') { global $g_oSec; $isEdit = is_object($obj); if (!$g_oSec->HasPerm(DCL_ENTITY_FORMTEMPLATES, $isEdit ? DCL_PERM_MODIFY : DCL_PERM_ADD)) { return PrintPermissionDenied(); } $t = CreateSmarty(); if ($isEdit) { $t->assign('VAL_MENUACTION', 'boChecklistTpl.dbmodify'); $t->assign('CMB_ACTIVE', GetYesNoCombo($obj->dcl_chklst_tpl_active, 'dcl_chklst_tpl_active', 0, false)); $t->assign('VAL_NAME', $obj->dcl_chklst_tpl_name); $t->assign('VAL_ID', $obj->dcl_chklst_tpl_id); } else { $t->assign('VAL_MENUACTION', 'boChecklistTpl.dbadd'); $t->assign('CMB_ACTIVE', GetYesNoCombo('Y', 'dcl_chklst_tpl_active', 0, false)); } SmartyDisplay($t, 'htmlChklstTplAdd.tpl'); }
function GetCriteria() { global $dcl_info; commonHeader(); if (($id = DCL_Sanitize::ToInt($_REQUEST['id'])) === null) { return PrintPermissionDenied(); } $hotlist = CreateObject('dcl.dbHotlist'); $hotlist->Load($id); $t = CreateSmarty(); $t->assign('VAL_HOTLISTNAME', $hotlist->hotlist_desc); $t->assign('VAL_HOTLISTID', $id); $t->assign('VAL_DAYS', 7); $t->assign('VAL_ENDON', date($dcl_info['DCL_DATE_FORMAT'])); $t->assign('VAL_SCOPE', true); $t->assign('VAL_TIMECARDS', true); $t->assign('VAL_CODE', true); SmartyDisplay($t, 'htmlHotlistProjectTimelineForm.tpl'); }
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(); } } }
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'); }
function getparameters($needHdr = true) { global $dcl_info; if ($needHdr == true) { commonHeader(); } $objPersonnel = CreateObject('dcl.htmlPersonnel'); $t = CreateSmarty(); $t->assign('CMB_RESPONSIBLE', $objPersonnel->GetCombo($GLOBALS['DCLID'], 'responsible', 'lastfirst', 0, false)); if (isset($_REQUEST['begindate']) && ($beginDate = DCL_Sanitize::ToDate($_REQUEST['begindate'])) !== null) { $t->assign('VAL_BEGINDATE', $begindate); } else { $t->assign('VAL_BEGINDATE', ''); } if (isset($_REQUEST['enddate']) && ($beginDate = DCL_Sanitize::ToDate($_REQUEST['enddate'])) !== null) { $t->assign('VAL_ENDDATE', $enddate); } else { $t->assign('VAL_ENDDATE', ''); } SmartyDisplay($t, 'htmlTicketActivity.tpl'); }
function Show($id, $which = 'summary', $version = 0) { global $dcl_info, $g_oSec; $id = (int) $id; if (!$g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEW, $id)) { return PrintPermissionDenied(); } $this->id = $id; $this->sView = $which; $this->iVersion = $version; if ($this->oProduct->Load($id) == -1) { return; } $objPers = CreateObject('dcl.dbPersonnel'); $this->t->assign('VAL_ID', $id); $this->t->assign('VAL_NAME', $this->oProduct->name); $this->t->assign('VAL_ACTIVE', $this->oProduct->active); $this->t->assign('VAL_PUBLIC', $this->oProduct->is_public); $this->t->assign('VAL_ISPROJECTREQUIRED', $this->oProduct->is_project_required); $objPers->Load($this->oProduct->reportto); $this->t->assign('VAL_REPORTTO', $objPers->short); $objPers->Load($this->oProduct->ticketsto); $this->t->assign('VAL_TICKETSTO', $objPers->short); $this->t->assign('PERM_VIEWWO', $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_VIEW)); $this->t->assign('PERM_VIEWTCK', $g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_VIEW)); $this->t->assign('PERM_WIKI', $dcl_info['DCL_WIKI_ENABLED'] == 'Y' && $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEWWIKI)); $this->t->assign('PERM_EDIT', $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_MODIFY)); $this->t->assign('PERM_DELETE', $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_DELETE)); $this->t->assign('PERM_VERSIONS', $dcl_info['DCL_BUILD_MANAGER_ENABLED'] == 'Y' && $this->oProduct->is_versioned == 'Y'); SmartyDisplay($this->t, 'htmlProductsDetail.tpl'); if ($this->sView == 'summary') { $oMetrics = CreateObject('dcl.htmlMetricsWorkOrders'); $_REQUEST['products'] = $id; $_REQUEST['begindate'] = date($dcl_info['DCL_DATE_FORMAT'], time() - 86400 * 7); $_REQUEST['enddate'] = date($dcl_info['DCL_DATE_FORMAT']); $oMetrics->showAll(); } $this->_ShowProductItem(); }
function DisplayForm($obj = '') { global $dcl_info, $g_oSec; $isEdit = is_object($obj); if (!$g_oSec->HasPerm(DCL_ENTITY_FAQANSWER, $isEdit ? DCL_PERM_MODIFY : DCL_PERM_ADD)) { return PrintPermissionDenied(); } $t =& CreateSmarty(); $t->assign('IS_EDIT', $isEdit); if ($isEdit) { $t->assign('VAL_ANSWERTEXT', $obj->answertext); $t->assign('VAL_ANSWERID', $obj->answerid); $t->assign('VAL_QUESTIONID', $obj->questionid); } else { if (($id = DCL_Sanitize::ToInt($_REQUEST['questionid'])) === null) { trigger_error('Data sanitize failed.'); return; } $t->assign('VAL_ANSWERTEXT', ''); $t->assign('VAL_QUESTIONID', $id); } SmartyDisplay($t, 'htmlFaqanswersForm.tpl'); }
function Show($obj = '') { global $dcl_info, $g_oSec; $isEdit = is_object($obj); if (!$g_oSec->HasPerm(DCL_ENTITY_PROJECT, $isEdit ? DCL_PERM_MODIFY : DCL_PERM_ADD)) { return PrintPermissionDenied(); } $t = CreateSmarty(); $objPrj = CreateObject('dcl.htmlProjects'); $objHTMLPersonnel = CreateObject('dcl.htmlPersonnel'); $oStatus = CreateObject('dcl.htmlStatuses'); if ($isEdit) { $t->assign('VAL_PROJECTID', $obj->projectid); $t->assign('VAL_NAME', $obj->name); $t->assign('CMB_PARENTPRJ', $objPrj->GetCombo($obj->parentprojectid, 'parentprojectid', 0, 0, $obj->projectid)); $t->assign('CMB_REPORTTO', $objHTMLPersonnel->GetCombo($obj->reportto, 'reportto')); $t->assign('CMB_STATUS', $oStatus->GetCombo($obj->status)); $t->assign('VAL_PROJECTDEADLINE', $obj->projectdeadline); $t->assign('VAL_DESCRIPTION', $obj->description); } else { $t->assign('VAL_NAME', ''); $t->assign('CMB_PARENTPRJ', $objPrj->GetCombo(0, 'parentprojectid')); $t->assign('CMB_REPORTTO', $objHTMLPersonnel->GetCombo($GLOBALS['DCLID'], 'reportto')); $t->assign('CMB_STATUS', $oStatus->GetCombo(1)); $t->assign('VAL_PROJECTDEADLINE', ''); $t->assign('VAL_DESCRIPTION', ''); } $t->assign('IS_EDIT', $isEdit); if ($dcl_info['DCL_PROJECT_XML_TEMPLATES'] == 'Y' && !$isEdit) { $objXMLProject = CreateObject('dcl.xmlProjects'); $objXMLProject->createCombo(); $t->assign('CMB_XMLPROJECTS', $objXMLProject->comboHTML); $t->assign('XML_TEMPLATES', true); $t->assign('JS_TEMPLATE', $objXMLProject->comboJS); } SmartyDisplay($t, 'htmlProjectsForm.tpl'); }
function showBrowseFrame() { global $dcl_info, $g_oSec; if (!$g_oSec->HasPerm(DCL_ENTITY_PERSONNEL, DCL_PERM_VIEW)) { return PrintPermissionDenied(); } $filterActive = ''; if (isset($_REQUEST['filterActive'])) { $filterActive = $_REQUEST['filterActive']; } $filterStartsWith = ''; if (isset($_REQUEST['filterStartsWith'])) { $filterStartsWith = $_REQUEST['filterStartsWith']; } $filterSearch = ''; if (isset($_REQUEST['filterSearch'])) { $filterSearch = $_REQUEST['filterSearch']; } $filterID = ''; if (isset($_REQUEST['filterID'])) { if (ereg('^[0-9]+([,][0-9]+)*$', $_REQUEST['filterID'])) { $filterID = explode(',', $_REQUEST['filterID']); } } $aColumnHeaders = array('ID', 'Active', 'User ID', 'Last Name', 'First Name'); $aColumns = array('id', 'active', 'short', 'dcl_contact.last_name', 'dcl_contact.first_name'); $iPage = 1; $this->oView->startrow = 0; $this->oView->numrows = 15; if (isset($_REQUEST['page']) && DCL_Sanitize::ToInt($_REQUEST['page']) !== null) { $iPage = (int) $_REQUEST['page']; if ($iPage < 1) { $iPage = 1; } $this->oView->startrow = ($iPage - 1) * $this->oView->numrows; if ($this->oView->startrow < 0) { $this->oView->startrow = 0; } } $this->oView->table = 'personnel'; $this->oView->AddDef('columnhdrs', '', $aColumnHeaders); $this->oView->AddDef('columns', '', $aColumns); $this->oView->AddDef('order', '', array('short')); if ($filterActive == 'Y' || $filterActive == 'N') { $this->oView->AddDef('filter', 'active', "'{$filterActive}'"); } if ($filterSearch != '') { $this->oView->AddDef('filterlike', 'short', $filterSearch); } if ($filterStartsWith != '') { $this->oView->AddDef('filterstart', 'short', $filterStartsWith); } if (is_array($filterID)) { $this->oView->AddDef('filter', 'id', $filterID); } if ($this->oDB->Query($this->oView->GetSQL(true)) == -1 || !$this->oDB->next_record()) { exit; } $iRecords = (int) $this->oDB->f(0); $this->oSmarty->assign('VAL_COUNT', $iRecords); $this->oSmarty->assign('VAL_PAGE', $iPage); $this->oSmarty->assign('VAL_MAXPAGE', ceil($iRecords / $this->oView->numrows)); $this->oDB->FreeResult(); if ($this->oDB->LimitQuery($this->oView->GetSQL(), $this->oView->startrow, $this->oView->numrows) != -1) { $aUsers = array(); while ($this->oDB->next_record()) { $aUsers[] = $this->oDB->Record; } $this->oDB->FreeResult(); $this->oSmarty->assign_by_ref('VAL_USERS', $aUsers); $this->oSmarty->assign('VAL_HEADERS', $aColumnHeaders); $this->oSmarty->assign('VAL_MULTISELECT', isset($_REQUEST['multiple']) && $_REQUEST['multiple'] == 'true'); SmartyDisplay($this->oSmarty, 'htmlPersonnelSelectorBrowse.tpl'); } exit; }
function show($id, $file, $bIsView = false) { global $g_oSec; commonHeader(); if (!$g_oSec->HasPerm(DCL_ENTITY_FORMS, DCL_PERM_VIEW)) { return PrintPermissionDenied(); } $this->xml = CreateObject('dcl.xmlDoc'); $this->xml->ParseFile($file); $t =& CreateSmarty(); $t->assign_by_ref('root', $this->xml->root); SmartyDisplay($t, 'htmlChecklistForm.tpl'); echo '<form class="styled" method="post" action="' . menuLink() . '">'; if (!$bIsView) { echo GetHiddenVar('menuAction', 'boChecklists.dbmodify'); echo GetHiddenVar('dcl_chklst_id', $id); } $this->bFirstState = true; $this->bIsView = $bIsView; $this->RenderNode($this->xml->root); if (!$this->bFirstState) { echo '</fieldset>'; } echo '<fieldset><div class="submit">'; if (!$bIsView) { echo '<input type="submit" value="' . STR_CMMN_SAVE . '">'; } echo '<input type="button" value="' . STR_CMMN_CANCEL . '" onclick="location.href=\'' . menuLink('', 'menuAction=boChecklists.show') . '\';"></div></fieldset></form>'; }