Example #1
0
} else {
    $AppUI->savePlace();
}
// load the event types
$types = dPgetSysVal('EventType');
// load the event recurs types
$recurs = array('Never', 'Hourly', 'Daily', 'Weekly', 'Bi-Weekly', 'Every Month', 'Quarterly', 'Every 6 months', 'Every Year');
$assigned = $obj->getAssigned();
if ($obj->event_owner != $AppUI->user_id && !getPermission('admin', 'view')) {
    $canEdit = false;
}
$df = $AppUI->getPref('SHDATEFORMAT');
$tf = $AppUI->getPref('TIMEFORMAT');
$start_date = $obj->event_start_date ? new CDate($obj->event_start_date) : null;
$end_date = $obj->event_end_date ? new CDate($obj->event_end_date) : null;
$event_project = db_LoadResult('SELECT project_name FROM projects where project_id=' . $obj->event_project);
// setup the title block
$titleBlock = new CTitleBlock('View Event', 'myevo-appointments.png', $m, "{$m}.{$a}");
if ($canAuthor) {
    $titleBlock->addCell();
    $titleBlock->addCell('<form action="?m=calendar&amp;a=addedit" method="post">' . '<input type="submit" class="button" value="' . $AppUI->_('new event') . '" /></form>', '', '', '');
}
$titleBlock->addCrumb('?m=calendar&amp;date=' . $start_date->format(FMT_TIMESTAMP_DATE), 'month view');
$titleBlock->addCrumb('?m=calendar&amp;a=day_view&amp;date=' . $start_date->format(FMT_TIMESTAMP_DATE) . '&amp;tab=0', 'day view');
if ($canEdit) {
    $titleBlock->addCrumb('?m=calendar&amp;a=addedit&amp;event_id=' . $event_id, 'edit this event');
    if ($canDelete) {
        $titleBlock->addCrumbDelete('delete event', $canDelete, $msg);
    }
}
$titleBlock->show();
ina
*/
$taskLogReference = dPgetSysVal('TaskLogReference');
// Task Update Form
$df = $AppUI->getPref('SHDATEFORMAT');
$log_date = new CDate($log->task_log_date);
$sq = "select max(task_log_date) from task_log where task_log_task={$task_id}";
?>
<!-- TIMER RELATED SCRIPTS -->
<script language="JavaScript">
	// please keep these lines on when you copy the source
	// made by: Nicolas - http://www.javascript-page.com
	// adapted by: Juan Carlos Gonzalez jcgonz@users.sourceforge.net
	
	var ultimaFecha = parseInt(<?php 
echo substr(str_replace('-', '', db_LoadResult($sq)), 0, 8);
?>
);
	var fecha_max = <?php 
$k = $task->task_start_date_ir;
$k = substr($k, 0, 10);
$k = str_replace('-', '', $k);
echo $k;
?>
;
					
	var timerID       = 0;
	var tStart        = null;
    var total_minutes = -1;
	
	function UpdateTimer() {
Example #3
0
    $companies[$row['item_company_id']] = $row['company_name'];
}
//echo '<pre>';print_r($companies);echo '</pre>';
//echo '<pre>';print_r($helpdeskItemTask['item_company_id']);echo '</pre>';
if ($helpdeskItemTask_found) {
    // need to add the entry for the helpdesk itself as that was not found
    $helpdeskItemTasks[$helpdeskItemTask['item_id']] = "[{$helpdeskItemTask['item_project_id']}, {$helpdeskItemTask['item_id']}, '{$helpdeskItemTask['item_title']}', {$helpdeskItemTask['item_company_id']}]";
    // get the project name
    $sql = "SELECT project_name FROM projects WHERE project_id = " . $helpdeskItemTask['item_project_id'];
    $itemCompanyName = db_LoadResult($sql);
    // collect projects in js format
    $projects[$helpdeskItemTask['item_project_id']] = "[{$helpdeskItemTask['item_company_id']},{$helpdeskItemTask['item_project_id']}, '{$itemCompanyName}']";
    // get the company name
    $sql = "SELECT company_name FROM companies WHERE company_id = " . $helpdeskItemTask['item_company_id'];
    // collect companies in normal format
    $companies[$helpdeskItemTask['item_company_id']] = db_LoadResult($sql);
}
// pull in the companies
//$sql = "SELECT company_id, company_name FROM companies ORDER BY company_name";
//$companies = arrayMerge( array( '0'=>'' ), db_loadHashList( $sql ) );
##
## Set up JavaScript arrays
##
$ua = $_SERVER['HTTP_USER_AGENT'];
$isMoz = strpos($ua, 'Gecko') !== false;
if (isset($projects)) {
    $projects = array_unique($projects);
    reset($projects);
} else {
    $projects = array();
}
Example #4
0
    // collect tasks in js format
    $tasks[] = "[" . $row['task_project'] . "," . $row['task_id'] . ",'" . addslashes($row['task_name']) . "','" . $row['task_percent_complete'] . "']";
    // collect projects in js format
    $projects[] = "[" . $row['project_company'] . "," . $row['task_project'] . ",'" . addslashes($row['project_name']) . "']";
    // collect companies in normal format
    $companies[$row['project_company']] = $row['company_name'];
}
if ($task_found) {
    // need to add the entry for the task itself as that was not found
    $tasks[$task['task_log_task']] = "[{$task['task_project']}, {$task['task_log_task']}, '{$task['task_name']}', '{$task['task_percent_complete']}']";
    // collect projects in js format
    $projects[$task['task_project']] = "[{$task['project_company']},{$task['task_project']}, '{$task['project_name']}']";
    // get the company name
    $sql = "SELECT company_name FROM companies WHERE company_id = " . $task['project_company'];
    // collect companies in normal format
    $companies[$task['project_company']] = db_LoadResult($sql);
}
// pull in the companies
//$sql = "SELECT company_id, company_name FROM companies ORDER BY company_name";
//$companies = arrayMerge( array( '0'=>'' ), db_loadHashList( $sql ) );
//***START MOD trimble 20050609
// Lets check which cost codes have been used before
/*$sql = "select distinct task_log_costcode
from task_log
where task_log_costcode != ''
order by task_log_costcode";
$task_log_costcodes = array(""); // Let's add a blank default option
$task_log_costcodes = array_merge($task_log_costcodes, db_loadColumn($sql));
*/
$proj =& new CProject();
$proj->load($obj->task_project);