本文整理汇总了PHP中dPgetSysVal函数的典型用法代码示例。如果您正苦于以下问题:PHP dPgetSysVal函数的具体用法?PHP dPgetSysVal怎么用?PHP dPgetSysVal使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dPgetSysVal函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _fetchCustomRecordTypes
function _fetchCustomRecordTypes()
{
switch ($this->custom_record_type) {
case "TaskCustomFields":
$field_types = "TaskType";
break;
case "CompanyCustomFields":
$field_types = "CompanyType";
break;
}
$this->custom_record_types = dPgetSysVal($field_types);
}
示例2: define
// Make sure we can read the module
if (getDenyRead($m)) {
$AppUI->redirect("m=public&a=access_denied");
}
// Define log types
define("STATUS_LOG", 1);
define("TASK_LOG", 2);
// Pull in some standard arrays
$ict = dPgetSysVal('HelpDeskCallType');
$ics = dPgetSysVal('HelpDeskSource');
$ios = dPgetSysVal('HelpDeskOS');
$iap = dPgetSysVal('HelpDeskApplic');
$ipr = dPgetSysVal('HelpDeskPriority');
$isv = dPgetSysVal('HelpDeskSeverity');
$ist = dPgetSysVal('HelpDeskStatus');
$isa = dPgetSysVal('HelpDeskAuditTrail');
$field_event_map = array(1 => "item_title", 2 => "item_requestor", 3 => "item_requestor_email", 4 => "item_requestor_phone", 5 => "item_assigned_to", 6 => "item_notify", 7 => "item_company_id", 8 => "item_project_id", 9 => "item_calltype", 10 => "item_source", 11 => "item_status", 12 => "item_priority", 13 => "item_severity", 14 => "item_os", 15 => "item_application", 16 => "item_summary");
// Help Desk class
class CHelpDeskItem extends CDpObject
{
var $item_id = NULL;
var $item_title = NULL;
var $item_summary = NULL;
var $item_calltype = NULL;
var $item_source = NULL;
var $item_os = NULL;
var $item_application = NULL;
var $item_priority = NULL;
var $item_severity = NULL;
var $item_status = NULL;
var $item_project_id = NULL;
示例3: ini_set
ini_set('memory_limit', $dPconfig['reset_memory_limit']);
include $AppUI->getLibraryClass('jpgraph/src/jpgraph');
include $AppUI->getLibraryClass('jpgraph/src/jpgraph_gantt');
// get the prefered date format
$df = $AppUI->getPref('SHDATEFORMAT');
$user_id = intval(dPgetParam($_REQUEST, 'user_id', $AppUI->user_id));
$proFilter = dPgetParam($_REQUEST, 'proFilter', '-1');
$company_id = intval(dPgetParam($_REQUEST, 'company_id', 0));
$department = intval(dPgetParam($_REQUEST, 'department', 0));
$showLabels = dPgetParam($_REQUEST, 'showLabels', 0);
$showInactive = dPgetParam($_REQUEST, 'showInactive', 0);
$sortTasksByName = dPgetParam($_REQUEST, 'sortTasksByName', 0);
$addPwOiD = dPgetParam($_REQUEST, 'addPwOiD', 0);
$m_orig = dPgetParam($_REQUEST, 'm_orig', $m);
$a_orig = dPgetParam($_REQUEST, 'a_orig', $a);
$projectStatus = dPgetSysVal('ProjectStatus');
$projectStatus = arrayMerge(array('-2' => $AppUI->_('All w/o in progress'), '-3' => $AppUI->_($AppUI->user_id == $user_id ? 'My projects' : "User's projects")), $projectStatus);
$pjobj =& new CProject();
$working_hours = $dPconfig['daily_working_hours'];
$q = new DBQuery();
/*
* Load department info for the case where one
* wants to see the ProjectsWithOwnerInDeparment (PwOiD)
* instead of the projects related to the given department.
*/
$owner_ids = array();
if ($addPwOiD && $department > 0) {
$q->addTable('users');
$q->addQuery('user_id');
$q->addJoin('contacts', 'c', 'c.contact_id = user_contact');
$q->addWhere('c.contact_department = ' . $department);
示例4: CTitleBlock
$titleBlock = new CTitleBlock('Files', 'folder5.png', $m, $m . '.' . $a);
$titleBlock->addCell($AppUI->_('Filter') . ':');
$titleBlock->addCell(arraySelect($projects, 'project_id', 'onchange="javascript:document.pickProject.submit()" size="1" class="text"', $project_id), '', '<form name="pickProject" action="?m=files" method="post">', '</form>');
/*
* override the file module's $canEdit variable passed from the main index.php
* in order to check on file folder permissions
*/
$canAuthor_folders = getPermission('file_folders', 'add');
if ($canAuthor) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '" />', '', '<form action="?m=files&a=addedit&folder=' . $folder . '" method="post">', '</form>');
}
if ($canAuthor_folders) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new folder') . '" />', '', '<form action="?m=files&a=addedit_folder" method="post">', '</form>');
}
$titleBlock->show();
$file_types = dPgetSysVal('FileType');
$fts = $file_types;
if ($tab != -1) {
array_unshift($file_types, 'All Files');
}
$tabBox = new CTabBox('?m=files', DP_BASE_DIR . '/modules/files/', $tab);
$tabbed = $tabBox->isTabbed();
$i = 0;
foreach ($file_types as $file_type) {
$tabBox->add('index_table', $file_type);
++$i;
}
if ($canAccess_folders) {
$tabBox->add('folders_table', 'Folder Explorer');
}
$tabBox->show();
示例5: intval
}
$tab = $AppUI->getState('LinkIdxTab') !== NULL ? $AppUI->getState('LinkIdxTab') : 0;
$active = intval(!$AppUI->getState('LinkIdxTab'));
require_once $AppUI->getModuleClass('projects');
// get the list of visible companies
$extra = array('from' => 'links', 'where' => 'project_id = link_project');
$project = new CProject();
$projects = $project->getAllowedRecords($AppUI->user_id, 'project_id,project_name', 'project_name', null, $extra);
$projects = arrayMerge(array('0' => $AppUI->_('All', UI_OUTPUT_JS)), $projects);
// setup the title block
$titleBlock = new CTitleBlock('Links', 'folder5.png', $m, "{$m}.{$a}");
$titleBlock->addCell($AppUI->_('Search') . ':');
$titleBlock->addCell('<input type="text" class="text" size="10" name="search" onchange="javascript:document.searchfilter.submit();" value=' . "'{$search}'" . 'title="' . $AppUI->_('Search in name and description fields', UI_OUTPUT_JS) . '"/>', '', '<form action="?m=links" method="post" id="searchfilter">', '</form>');
$titleBlock->addCell($AppUI->_('Filter') . ':');
$titleBlock->addCell(arraySelect($projects, 'project_id', 'onchange="javascript:document.pickProject.submit()" size="1" class="text"', $project_id), '', '<form name="pickProject" action="?m=links" method="post">', '</form>');
if ($canEdit) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new link') . '" />', '', '<form action="?m=links&a=addedit" method="post">', '</form>');
}
$titleBlock->show();
$link_types = dPgetSysVal('LinkType');
if ($tab != -1) {
array_unshift($link_types, 'All Links');
}
array_map(array($AppUI, '_'), $link_types);
$tabBox = new CTabBox('?m=links', DP_BASE_DIR . '/modules/links/', $tab);
$i = 0;
foreach ($link_types as $link_type) {
$tabBox->add('index_table', $link_type);
++$i;
}
$tabBox->show();
示例6: CProject
}
$tab = $AppUI->getState('ProjVwTab') !== NULL ? $AppUI->getState('ProjVwTab') : 0;
// check if this record has dependencies to prevent deletion
$msg = '';
$obj = new CProject();
// Now check if the proect is editable/viewable.
$denied = $obj->getDeniedRecords($AppUI->user_id);
if (in_array($project_id, $denied)) {
$AppUI->redirect("m=public&a=access_denied");
}
$canDelete = $obj->canDelete($msg, $project_id);
// get critical tasks (criteria: task_end_date)
$criticalTasks = $project_id > 0 ? $obj->getCriticalTasks($project_id) : NULL;
// get ProjectPriority from sysvals
$projectPriority = dPgetSysVal('ProjectPriority');
$projectPriorityColor = dPgetSysVal('ProjectPriorityColor');
$working_hours = $dPconfig['daily_working_hours'] ? $dPconfig['daily_working_hours'] : 8;
$q = new DBQuery();
//check that project has tasks; otherwise run seperate query
$q->addTable('tasks');
$q->addQuery("COUNT(distinct tasks.task_id) AS total_tasks");
$q->addWhere('task_project = ' . $project_id);
$hasTasks = $q->loadResult();
$q->clear();
// load the record data
// GJB: Note that we have to special case duration type 24 and this refers to the hours in a day, NOT 24 hours
if ($hasTasks) {
$q->addTable('projects');
$q->addQuery("company_name, CONCAT_WS(', ',contact_last_name,contact_first_name) user_name, projects.*," . " SUM(t1.task_duration * t1.task_percent_complete" . " * IF(t1.task_duration_type = 24, {$working_hours}, t1.task_duration_type))" . " / SUM(t1.task_duration * IF(t1.task_duration_type = 24, {$working_hours}, t1.task_duration_type))" . " AS project_percent_complete");
$q->addJoin('companies', 'com', 'company_id = project_company');
$q->addJoin('users', 'u', 'user_id = project_owner');
示例7: notify
function notify($assignees, $update = false, $clash = false)
{
global $AppUI, $locale_char_set, $dPconfig;
$mail_owner = $AppUI->getPref('MAILALL');
$assignee_list = explode(",", $assignees);
$owner_is_assigned = in_array($this->event_owner, $assignee_list);
if ($mail_owner && !$owner_is_assigned && $this->event_owner) {
array_push($assignee_list, $this->event_owner);
}
// Remove any empty elements otherwise implode has a problem
foreach ($assignee_list as $key => $x) {
if (!$x) {
unset($assignee_list[$key]);
}
}
if (!count($assignee_list)) {
return;
}
$q = new DBQuery();
$q->addTable('users', 'u');
$q->addTable('contacts', 'con');
$q->addQuery('user_id, contact_first_name,contact_last_name, contact_email');
$q->addWhere('u.user_contact = con.contact_id');
$q->addWhere("user_id in (" . implode(',', $assignee_list) . ")");
$users = $q->loadHashList('user_id');
$date_format = $AppUI->getPref('SHDATEFORMAT');
$time_format = $AppUI->getPref('TIMEFORMAT');
$fmt = $date_format . ' ' . $time_format;
$start_date =& new CDate($this->event_start_date);
$end_date =& new CDate($this->event_end_date);
$mail =& new Mail();
$type = $update ? $AppUI->_('Updated') : $AppUI->_('New');
$subject_title = $clash ? $AppUI->_('Requested Event') : $type . " " . $AppUI->_('Event');
$mail->Subject($subject_title . ": " . $this->event_title, $locale_char_set);
$mail->From('"' . $AppUI->user_first_name . " " . $AppUI->user_last_name . '" <' . $AppUI->user_email . '>');
$body = '';
if ($clash) {
$body .= 'You have been invited to an event by ' . $AppUI->user_first_name . ' ' . $AppUI->user_last_name . "\n";
$body .= 'However, either you or another intended invitee has a competing event' . "\n";
$body .= $AppUI->user_first_name . ' ' . $AppUI->user_last_name . ' has requested that you reply to this message' . "\n";
$body .= 'and confirm if you can or can not make the requested time.' . "\n\n";
}
$body .= $AppUI->_('Event') . ":\t" . $this->event_title . "\n";
if (!$clash) {
$body .= $AppUI->_('URL') . ":\t" . $dPconfig['base_url'] . "/index.php?m=calendar&a=view&event_id=" . $this->event_id . "\n";
}
$body .= $AppUI->_('Starts') . ":\t" . $start_date->format($fmt) . "\n";
$body .= $AppUI->_('Ends') . ":\t" . $end_date->format($fmt) . "\n";
// Find the project name.
if ($this->event_project) {
$prj = array();
$q = new DBQuery();
$q->addTable('projects', 'p');
$q->addQuery('project_name');
$q->addWhere('p.project_id =' . $this->event_project);
$sql = $q->prepare();
$q->clear();
if (db_loadHash($sql, $prj)) {
$body .= $AppUI->_('Project') . ":\t" . $prj['project_name'] . "\n";
}
}
$types = dPgetSysVal('EventType');
$body .= $AppUI->_('Type') . ":\t" . $AppUI->_($types[$this->event_type]) . "\n";
$body .= $AppUI->_('Attendees') . ":\t";
$body_attend = '';
foreach ($users as $user) {
$body_attend .= ($body_attend ? ', ' : '') . $user['contact_first_name'] . ' ' . $user['contact_last_name'];
}
$body .= $body_attend . "\n\n" . $this->event_description . "\n";
$mail->Body($body, $locale_char_set);
foreach ($users as $user) {
if (!$mail_owner && $user['user_id'] == $this->event_owner) {
continue;
}
$mail->To($user['contact_email'], true);
$mail->Send();
}
}
示例8: CProject
//for getting permissions for records related to projects
$obj_project = new CProject();
// collect the full (or filtered) projects list data via function in projects.class.php
projects_list_data();
// setup the title block
$titleBlock = new CTitleBlock('Projects', 'applet3-48.png', $m, $m . '.' . $a);
$titleBlock->addCell($AppUI->_('Owner') . ':');
$titleBlock->addCell('<form action="?m=projects" method="post" name="pickUser">' . "\n" . $bufferUser . "\n" . '</form>' . "\n");
$titleBlock->addCell($AppUI->_('Company') . '/' . $AppUI->_('Division') . ':');
$titleBlock->addCell('<form action="?m=projects" method="post" name="pickCompany">' . "\n" . $cBuffer . "\n" . '</form>' . "\n");
$titleBlock->addCell();
if ($canAuthor) {
$titleBlock->addCell('<form action="?m=projects&a=addedit" method="post">' . "\n" . '<input type="submit" class="button" value="' . $AppUI->_('new project') . '" />' . "\n" . '</form>' . "\n");
}
$titleBlock->show();
$project_types = dPgetSysVal('ProjectStatus');
// count number of projects per project_status
$q->addTable('projects', 'p');
$q->addQuery('p.project_status, COUNT(p.project_id) as count');
$obj_project->setAllowedSQL($AppUI->user_id, $q, null, 'p');
if ($owner > 0) {
$q->addWhere('p.project_owner = ' . $owner);
}
if (isset($department)) {
$q->addJoin('project_departments', 'pd', 'pd.project_id = p.project_id');
if (!$addPwOiD) {
$q->addWhere('pd.department_id in (' . implode(',', $dept_ids) . ')');
}
} else {
if ($company_id && !$addPwOiD) {
$q->addWhere('p.project_company = ' . $company_id);
示例9: CProject
// check if this record has dependencies to prevent deletion
$msg = '';
$obj = new CProject();
// Now check if the project is editable/viewable.
$denied = $obj->getDeniedRecords($AppUI->user_id);
if (in_array($project_id, $denied)) {
$AppUI->redirect("m=public&a=access_denied");
}
$canDeleteProject = $obj->canDelete($msg, $project_id);
// get critical tasks (criteria: task_end_date)
$criticalTasks = $project_id > 0 ? $obj->getCriticalTasks($project_id) : NULL;
// get ProjectPriority from sysvals
$projectPriority = dPgetSysVal('ProjectPriority');
$projectPriorityColor = dPgetSysVal('ProjectPriorityColor');
$pstatus = dPgetSysVal('ProjectStatus');
$ptype = dPgetSysVal('ProjectType');
$working_hours = $dPconfig['daily_working_hours'] ? $dPconfig['daily_working_hours'] : 8;
$q = new DBQuery();
//check that project has tasks; otherwise run seperate query
$q->addTable('tasks');
$q->addQuery("COUNT(distinct tasks.task_id) AS total_tasks");
$q->addWhere('task_project = ' . $project_id);
$hasTasks = $q->loadResult();
$q->clear();
// load the record data
// GJB: Note that we have to special case duration type 24 and this refers to the hours in a day, NOT 24 hours
if ($hasTasks) {
$q->addTable('projects');
$q->addQuery("company_name, CONCAT_WS(' ',contact_first_name,contact_last_name) user_name, projects.*," . " SUM(t1.task_duration * t1.task_percent_complete" . " * IF(t1.task_duration_type = 24, {$working_hours}, t1.task_duration_type))" . " / SUM(t1.task_duration * IF(t1.task_duration_type = 24, {$working_hours}, t1.task_duration_type))" . " AS project_percent_complete");
$q->addJoin('companies', 'com', 'company_id = project_company');
$q->addJoin('users', 'u', 'user_id = project_owner');
示例10: dPgetSysVal
if ($canEdit) {
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new task') . '">', '', '<form action="?m=tasks&a=addedit&task_project=' . $obj->task_project . '&task_parent=' . $task_id . '" method="post">', '</form>');
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '">', '', '<form action="?m=files&a=addedit&project_id=' . $obj->task_project . '&file_task=' . $obj->task_id . '" method="post">', '</form>');
}
$titleBlock->addCrumb("?m=tasks", "tasks list");
if ($canReadProject) {
$titleBlock->addCrumb("?m=projects&a=view&project_id={$obj->task_project}", "view this project");
}
if ($perms->checkModule('tasks', 'edit')) {
$titleBlock->addCrumb("?m=tasks&a=addedit&task_id={$task_id}", "edit this task");
}
if ($canDelete) {
$titleBlock->addCrumbDelete('delete task', $canDelete, $msg);
}
$titleBlock->show();
$task_types = dPgetSysVal("TaskType");
?>
<script language="JavaScript">
var calendarField = '';
function popCalendar( field ){
calendarField = field;
idate = eval( 'document.editFrm.task_' + field + '.value' );
window.open( 'index.php?m=public&a=calendar&dialog=1&callback=setCalendar&date=' + idate, 'calwin', 'width=250, height=220, scollbars=false' );
}
/**
* @param string Input date in the format YYYYMMDD
* @param string Formatted date
*/
示例11: foreach
foreach ($ar_mold as $ar) {
$buf .= '<option value = ' . $ar["company_id"] . ' ';
if ($ar["company_id"] == $fcliente) {
$buf .= ' selected ';
}
$buf .= '>' . $ar["company_name"] . '</option>';
}
$titleBlock->addCell($buf, "", "", "");
$buf = '<input type="text" name="alias_string" size=12 value="' . $alias_string . '" class="text">
';
$titleBlock->addCell($AppUI->_('etiq_Referencia') . ':');
$titleBlock->addCell($buf, '', '', '');
$titleBlock->show();
echo "</td></tr></table>";
echo "<div align=right><input type=button onClick='document.pickCompany.submit()' class='button' value='Buscar'></form></div>";
$project_types = dPgetSysVal("ProjectStatus");
$active = 0;
$complete = 0;
$archive = 0;
$proposed = 0;
foreach ($project_types as $key => $value) {
$counter[$key] = 0;
if (is_array($projects)) {
foreach ($projects as $p) {
if ($p['project_status'] == $key && $p['project_active'] > 0) {
++$counter[$key];
}
}
}
$project_types[$key] = $AppUI->_($project_types[$key], UI_OUTPUT_RAW) . ' (' . $counter[$key] . ')';
}
示例12: dPgetSysVal
<br /><?php
echo $AppUI->_('Web Address');
?>
<br /><input type="text" class="text" name="task_related_url" value="<?php
echo @$obj->task_related_url;
?>
" size="40" maxlength="255" />
</td>
<td valign='top'>
<?php
echo $AppUI->_("Task Type");
?>
<br />
<?php
$task_types = dPgetSysVal('TaskType');
echo arraySelect($task_types, "task_type", "class='text'", $obj->task_type, false);
?>
<br /><br />
<?php
if ($AppUI->isActiveModule('contacts') && $perms->checkModule('contacts', 'view')) {
echo "<input type='button' class='button' value='" . $AppUI->_("Select contacts...") . "' onclick='javascript:popContacts();' />";
}
// Let's check if the actual company has departments registered
if ($department_selection_list != "") {
?>
<br />
<?php
echo $AppUI->_("Departments");
?>
<br />
示例13: die
if (!defined('DP_BASE_DIR')) {
die('You should not access this file directly.');
}
$callback = dPgetCleanParam($_GET, 'callback', '');
?>
<script language="javascript">
function setClose(color) {
window.opener.<?php
echo $callback;
?>
(color);
window.close();
}
</script>
<?php
$colors = dPgetSysVal('ProjectColors');
if ($dPconfig['restrict_color_selection']) {
?>
<table border="0" cellpadding="1" cellspacing="2" width="292" align="center">
<tr>
<td valign="top" colspan="2">
<strong><?php
echo $AppUI->_('Color Selector');
?>
</strong>
</td>
</tr>
<?php
foreach ($colors as $key => $value) {
?>
<tr>
示例14: die
<?php
if (!defined('DP_BASE_DIR')) {
die('You should not access this file directly.');
}
// user types
$utypes = dPgetSysVal('UserType');
##
## NOTE: the user_type field in the users table must be changed to a TINYINT
##
示例15: isset
global $this_day, $event_filter, $event_filter_list;
require_once $AppUI->getModuleClass('calendar');
$perms =& $AppUI->acl();
$user_id = $AppUI->user_id;
$other_users = false;
$no_modify = false;
$start_date = isset($start_date) ? $start_date : new CDate('0000-00-00 00:00:00');
$end_date = isset($end_date) ? $end_date : new CDate('9999-12-31 23:59:59');
// assemble the links for the events
$events = CEvent::getEventsForPeriod($start_date, $end_date, 'all', null, $project_id);
//echo '<pre>' . print_r($events, true) . '</pre>';
$start_hour = dPgetConfig('cal_day_start');
$end_hour = dPgetConfig('cal_day_end');
$tf = $AppUI->getPref('TIMEFORMAT');
$df = $AppUI->getPref('SHDATEFORMAT');
$types = dPgetSysVal('EventType');
?>
<table cellspacing="1" cellpadding="2" border="0" width="100%" class="tbl">
<tr>
<th><?php
echo $AppUI->_('Date');
?>
</th>
<th><?php
echo $AppUI->_('Type');
?>
</th>
<th><?php
echo $AppUI->_('Event');
?>
</th>