Example #1
0
/**
* Sub-function to collect events within a period
* @param Date the starting date of the period
* @param Date the ending date of the period
* @param array by-ref an array of links to append new items to
* @param int the length to truncate entries by
* @author Andrew Eddie <*****@*****.**>
*/
function getEventLinks($startPeriod, $endPeriod, &$links, $strMaxLen)
{
    global $AppUI, $event_filter;
    $events = CEvent::getEventsForPeriod($startPeriod, $endPeriod, $event_filter);
    // assemble the links for the events
    foreach ($events as $row) {
        $start = new CDate($row['event_start_date']);
        $end = new CDate($row['event_end_date']);
        $date = $start;
        $date->setTime(0, 0, 0);
        $cwd = explode(',', $GLOBALS['dPconfig']['cal_working_days']);
        for ($i = 0, $x = $end->dateDiff($start); $i <= $x; $i++) {
            // the link
            // optionally do not show events on non-working days
            if ($row['event_cwd'] && in_array($date->getDayOfWeek(), $cwd) || !$row['event_cwd']) {
                $link['href'] = '?m=calendar&a=view&event_id=' . $row['event_id'];
                $link['alt'] = $row['event_description'];
                $link['text'] = dPshowImage(dPfindImage('event' . $row['event_type'] . '.png', 'calendar'), 16, 16) . htmlspecialchars($row['event_title']);
                if ($i == 0) {
                    $link['alt'] .= ' [' . $AppUI->_('START') . ']';
                }
                if ($i == $x) {
                    $link['alt'] .= ' [' . $AppUI->_('END') . ']';
                }
                $links[$date->format(FMT_TIMESTAMP_DATE)][] = $link;
            }
            $date = $date->getNextDay();
        }
    }
}
Example #2
0
/**
* Sub-function to collect events within a period
* @param Date the starting date of the period
* @param Date the ending date of the period
* @param array by-ref an array of links to append new items to
* @param int the length to truncate entries by
* @author Andrew Eddie <*****@*****.**>
*/
function getEventLinks($startPeriod, $endPeriod, &$links, $strMaxLen)
{
    global $event_filter;
    $events = CEvent::getEventsForPeriod($startPeriod, $endPeriod, $event_filter);
    // assemble the links for the events
    foreach ($events as $row) {
        $start = new CDate($row['event_start_date']);
        $end = new CDate($row['event_end_date']);
        $date = $start;
        $cwd = explode(",", $GLOBALS["dPconfig"]['cal_working_days']);
        for ($i = 0; $i <= $start->dateDiff($end); $i++) {
            // the link
            // optionally do not show events on non-working days
            if ($row['event_cwd'] && in_array($date->getDayOfWeek(), $cwd) || !$row['event_cwd']) {
                $url = '?m=calendar&a=view&event_id=' . $row['event_id'];
                $link['href'] = '';
                $link['alt'] = $row['event_description'];
                $link['text'] = '<table cellspacing="0" cellpadding="0" border="0"><tr>' . '<td><a href=' . $url . '>' . dPshowImage(dPfindImage('event' . $row['event_type'] . '.png', 'calendar'), 16, 16, '') . '</a></td>' . '<td><a href="' . $url . '" title="' . $row['event_description'] . '"><span class="event">' . $row['event_title'] . '</span></a>' . '</td></tr></table>';
                $links[$date->format(FMT_TIMESTAMP_DATE)][] = $link;
            }
            $date = $date->getNextDay();
        }
    }
}
Example #3
0
for ($i = 0, $n = ($end - $start) * 60 / $inc; $i < $n; $i++) {
    $html .= "\n<tr>";
    $tm = $this_day->format($tf);
    $html .= "\n\t<td width=\"1%\" align=\"right\" nowrap=\"nowrap\">" . ($this_day->getMinute() ? $tm : "<b>{$tm}</b>") . "</td>";
    $timeStamp = $this_day->format("%H%M%S");
    if (@$events2[$timeStamp]) {
        $count = count($events2[$timeStamp]);
        for ($j = 0; $j < $count; $j++) {
            $row = $events2[$timeStamp][$j];
            $et = new CDate($row['event_end_date']);
            $rows = ($et->getHour() * 60 + $et->getMinute() - ($this_day->getHour() * 60 + $this_day->getMinute())) / $inc;
            $href = "?m=calendar&a=view&event_id=" . $row['event_id'];
            $alt = $row['event_description'];
            $html .= "\n\t<td class=\"event\" rowspan=\"{$rows}\" valign=\"top\">";
            $html .= "\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr>";
            $html .= "\n<td>" . dPshowImage(dPfindImage('event' . $row['event_type'] . '.png', 'calendar'), 16, 16, '');
            $html .= "</td>\n<td>&nbsp;<b>" . $AppUI->_($types[$row['event_type']]) . "</b></td></tr></table>";
            $html .= $href ? "\n\t\t<a href=\"{$href}\" class=\"event\" title=\"{$alt}\">" : '';
            $html .= "\n\t\t{$row['event_title']}";
            $html .= $href ? "\n\t\t</a>" : '';
            $html .= "\n\t</td>";
        }
    } else {
        if (--$rows <= 0) {
            $html .= "\n\t<td></td>";
        }
    }
    $html .= "\n</tr>";
    $this_day->addSeconds(60 * $inc);
}
$html .= '</table>';
         <td colspan="3" align="right" valign="middle">
                <table width="100%" border="0">
                        <tr>
                                <td align="right">
                                <select name="add_users" style="width:200px" size="2" multiple="multiple" class="text"  ondblclick="javascript:chAssignment('.$user_id.', 0, false)">
                                <?php 
                foreach ($userAlloc as $v => $u) {
                    echo "\n\t<option value=\"" . $u['user_id'] . "\">" . dPformSafe($u['userFC']) . "</option>";
                }
                ?>
                                </select>
                                </td>
                                 <td align="center">
                                <?php 
                echo "<a href='javascript:chAssignment({$p['project_id']}, 0, 0);'>" . dPshowImage(dPfindImage('add.png', 'tasks'), 16, 16, 'Assign Users', 'Assign selected Users to selected Tasks') . "</a>";
                echo "&nbsp;<a href='javascript:chAssignment({$p['project_id']}, 1, 1);'>" . dPshowImage(dPfindImage('remove.png', 'tasks'), 16, 16, 'Unassign Users', 'Unassign Users from Task') . "</a>";
                ?>
<br />
                                <?php 
                echo "<select class=\"text\" name=\"percentage_assignment\" title=\"" . $AppUI->_('Assign with Percentage') . "\">";
                for ($i = 0; $i <= 100; $i += 5) {
                    echo "<option " . ($i == 30 ? "selected=\"true\"" : "") . " value=\"" . $i . "\">" . $i . "%</option>";
                }
                ?>
                                </select>
                                </td>
                        </tr>
                </table>
         </td>
         <?php 
            }
Example #5
0
/**
* Sub-function to collect tasks within a period
*
* @param Date the starting date of the period
* @param Date the ending date of the period
* @param array by-ref an array of links to append new items to
* @param int the length to truncate entries by
* @param int the company id to filter by
* @author Andrew Eddie <*****@*****.**>
*/
function getTaskLinks($startPeriod, $endPeriod, &$links, $strMaxLen, $company_id = 0)
{
    global $a, $AppUI, $dPconfig;
    $tasks = CTask::getTasksForPeriod($startPeriod, $endPeriod, $company_id, $AppUI->user_id, true);
    $durnTypes = dPgetSysVal('TaskDurationType');
    $link = array();
    $sid = 3600 * 24;
    // assemble the links for the tasks
    foreach ($tasks as $row) {
        // the link
        $link['href'] = "?m=tasks&a=view&task_id=" . $row['task_id'];
        $link['alt'] = $row['project_name'] . ":\n" . $row['task_name'];
        // the link text
        if (strlen($row['task_name']) > $strMaxLen) {
            $row['task_name'] = substr($row['task_name'], 0, $strMaxLen) . '...';
        }
        $link['text'] = '<span style="color:' . bestColor($row['color']) . ';background-color:#' . $row['color'] . '">' . $row['task_name'] . '</span>';
        // determine which day(s) to display the task
        $start = new CDate($row['task_start_date']);
        $end = $row['task_end_date'] ? new CDate($row['task_end_date']) : null;
        $durn = $row['task_duration'];
        $durnType = $row['task_duration_type'];
        if (($start->after($startPeriod) || $start->equals($startPeriod)) && ($start->before($endPeriod) || $start->equals($endPeriod))) {
            $temp = $link;
            $temp['alt'] = "START [" . $row['task_duration'] . ' ' . $AppUI->_($durnTypes[$row['task_duration_type']]) . "]\n" . $link['alt'];
            if ($a != 'day_view') {
                $temp['text'] = dPshowImage(dPfindImage('block-start-16.png')) . $temp['text'];
            }
            $links[$start->format(FMT_TIMESTAMP_DATE)][] = $temp;
        }
        if ($end && $end->after($startPeriod) && $end->before($endPeriod) && $start->before($end)) {
            $temp = $link;
            $temp['alt'] = "FINISH\n" . $link['alt'];
            if ($a != 'day_view') {
                $temp['text'] .= dPshowImage(dPfindImage('block-end-16.png'));
            }
            $links[$end->format(FMT_TIMESTAMP_DATE)][] = $temp;
        }
        // convert duration to days
        if ($durnType < 24.0) {
            if ($durn > $dPconfig['daily_working_hours']) {
                $durn /= $dPconfig['daily_working_hours'];
            } else {
                $durn = 0.0;
            }
        } else {
            $durn *= $durnType / 24.0;
        }
        // fill in between start and finish based on duration
        // notes:
        // start date is not in a future month, must be this or past month
        // start date is counted as one days work
        // business days are not taken into account
        $target = $start;
        $target->addSeconds($durn * $sid);
        if (Date::compare($target, $startPeriod) < 0) {
            continue;
        }
        if (Date::compare($start, $startPeriod) > 0) {
            $temp = $start;
            $temp->addSeconds($sid);
        } else {
            $temp = $startPeriod;
        }
        // Optimised for speed, AJD.
        while (Date::compare($endPeriod, $temp) > 0 && Date::compare($target, $temp) > 0 && ($end == null || $temp->before($end))) {
            $links[$temp->format(FMT_TIMESTAMP_DATE)][] = $link;
            $temp->addSeconds($sid);
        }
    }
}
Example #6
0
foreach ($ict as $k => $v) {
    $sql = "SELECT item_status, count(item_id)\n          FROM helpdesk_items\n          WHERE item_calltype={$k}\n          AND {$item_perms}\n          GROUP BY item_status";
    $stats[$k] = db_loadHashList($sql);
}
?>
<table cellspacing="1" cellpadding="2" border="0" width="100%" class="tbl">
<tr>
	<th colspan="2"><?php 
echo $AppUI->_('Type');
?>
</th>
<?php 
$s = '';
foreach ($ist as $k => $v) {
    $s .= "<th width=\"20%\"><a href=\"?m=helpdesk&a=list&item_calltype=-1&item_status={$k}\" class=\"hdr\">" . $AppUI->_($v) . "</a></th>";
}
echo $s;
$s = '';
foreach ($ict as $kct => $vct) {
    $s .= '<tr>';
    $s .= '<td width="15">' . dPshowImage(dPfindImage('ct' . $kct . '.png', $m), 15, 17, $vct) . '</td>';
    $s .= "<td nowrap><a href=\"?m=helpdesk&a=list&item_calltype={$kct}&item_status=-1\">" . $AppUI->_($vct) . "</a></td>";
    foreach ($ist as $kst => $vst) {
        $s .= "<td align=\"center\"><a href=\"?m=helpdesk&a=list&item_calltype={$kct}&item_status={$kst}\">" . @$stats[$kct][$kst] . "</a></td>";
    }
    $s .= '</tr>';
}
echo $s;
?>
</table>
function vw_idx_handler($type)
{
    global $m, $ipr, $ist, $AppUI;
    $where = $date_field_name = $date_field_title = "";
    switch ($type) {
        case 0:
            // Opened
            $date_field_title = $AppUI->_('Opened On');
            $date_field_name = "item_created";
            $where .= "(TO_DAYS(NOW()) - TO_DAYS(hi.item_created) = 0)\n\t\t             AND his.status_code = 0 and hi.item_status <> 2";
            break;
        case 1:
            // Closed
            $date_field_title = $AppUI->_('Closed On');
            $date_field_name = "status_date";
            $where .= "item_status=2\n        \t     AND status_code=11\n        \t     AND (TO_DAYS(NOW()) - TO_DAYS(status_date) = 0)";
            break;
        case 2:
            // Mine
            $date_field_title = $AppUI->_('Opened On');
            $date_field_name = "item_created";
            $where .= "item_assigned_to={$AppUI->user_id}\n                 AND item_status !=2\n                 AND his.status_code = 0";
            break;
        default:
            print "Shouldn't be here (for now)";
            exit(1);
    }
    $df = $AppUI->getPref('SHDATEFORMAT');
    $tf = $AppUI->getPref('TIMEFORMAT');
    $format = $df . " " . $tf;
    /*
     * Unassigned = 0
     * Open = 1
     * Closed = 2
     * On hold = 3
     * Delete = 4
     * Testing = 5
     */
    $item_perms = getItemPerms();
    $sql = "SELECT hi.*,\n          CONCAT(co.contact_first_name,' ',co.contact_last_name) assigned_fullname,\n          co.contact_email as assigned_email,\n          p.project_id,\n          p.project_name,\n          p.project_color_identifier,\n          his.status_date\n          FROM helpdesk_items hi\n          LEFT JOIN helpdesk_item_status his ON his.status_item_id = hi.item_id\n          LEFT JOIN users u ON u.user_id = hi.item_assigned_to\n          LEFT JOIN contacts co ON co.contact_id = u.user_contact\n          LEFT JOIN projects p ON p.project_id = hi.item_project_id\n          WHERE {$where}\n          AND {$item_perms}\n          GROUP BY item_id\n          ORDER BY item_id";
    $items = db_loadList($sql);
    ?>
  <table cellspacing="1" cellpadding="2" border="0" width="100%" class="tbl">
  <tr>
    <th><?php 
    echo $AppUI->_('Number');
    ?>
</th>
    <th><?php 
    echo $AppUI->_('Requestor');
    ?>
</th>
    <th><?php 
    echo $AppUI->_('Title');
    ?>
</th>
    <th nowrap="nowrap"><?php 
    echo $AppUI->_('Assigned To');
    ?>
</th>
    <th><?php 
    echo $AppUI->_('Status');
    ?>
</th>
    <th><?php 
    echo $AppUI->_('Priority');
    ?>
</th>
    <th><?php 
    echo $AppUI->_('Updated');
    ?>
</th>
    <th><?php 
    echo $AppUI->_('Project');
    ?>
</th>
    <th nowrap="nowrap"><?php 
    echo $date_field_title;
    ?>
</th>
  </tr>
  <?php 
    foreach ($items as $row) {
        /* We need to check if the user who requested the item is still in the
           system. Just because we have a requestor id does not mean we'll be
           able to retrieve a full name */
        if ($row[$date_field_name]) {
            $date = new CDate($row[$date_field_name]);
            $tc = $date->format($format);
        } else {
            $tc = '';
        }
        if ($row['status_date']) {
            $datesd = new CDate($row['status_date']);
            $sd = $datesd->format($format);
        } else {
            $sd = ' ';
        }
        ?>
    <tr>
      <td nowrap="nowrap"><b><a href="?m=helpdesk&a=view&item_id=<?php 
        echo $row['item_id'];
        ?>
"><?php 
        echo $row['item_id'];
        ?>
</a></b>
          <?php 
        echo dPshowImage(dPfindImage('ct' . $row["item_calltype"] . '.png', 'helpdesk'), 15, 17, '');
        ?>
</td>
      <td nowrap=\"nowrap\">
      <?php 
        if ($row["item_requestor_email"]) {
            print "<a href=\"mailto: " . $row["item_requestor_email"] . "\">" . $row['item_requestor'] . "</a>";
        } else {
            print $row['item_requestor'];
        }
        ?>
      </td>
      <td width="80%"><a href="?m=helpdesk&a=view&item_id=<?php 
        echo $row['item_id'];
        ?>
"><?php 
        echo $row['item_title'];
        ?>
</a></td>
      <td align="center" nowrap="nowrap">
      <?php 
        if ($row['assigned_email']) {
            print "<a href='mailto:{$row['assigned_email']}'>{$row['assigned_fullname']}</a>";
        } else {
            print $row['assigned_fullname'] ? $row['assigned_fullname'] : "-";
        }
        ?>
      </td>
      <td align="center" nowrap><?php 
        echo $AppUI->_($ist[@$row["item_status"]]);
        ?>
</td>
      <td align="center" nowrap><?php 
        echo $AppUI->_($ipr[@$row["item_priority"]]);
        ?>
</td>
      <td align="center" nowrap><?php 
        echo @$sd;
        ?>
</td>
      <td align="center" style="background-color: #<?php 
        echo $row['project_color_identifier'];
        ?>
;" nowrap>
      <?php 
        if ($row['project_id']) {
            ?>
        <a href="./index.php?m=projects&a=view&project_id=<?php 
            echo $row['project_id'];
            ?>
" style="color: <?php 
            echo bestColor($row["project_color_identifier"]);
            ?>
;"><?php 
            echo $row['project_name'];
            ?>
</a>
      <?php 
        } else {
            ?>
        -
      <?php 
        }
        ?>
      </td>
      <td nowrap="nowrap"><?php 
        print $tc;
        ?>
</td>
    </tr>
  <?php 
    }
    ?>
  </table>
<?php 
}
function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $user_id)
{
    global $AppUI, $df, $durnTypes, $log_userfilter_users, $now, $priority, $system_users;
    global $z, $zi, $x, $userAlloc;
    $zi++;
    $users = $task->task_assigned_users;
    $task->userPriority = $task->getUserSpecificTaskPriority($user_id);
    $projects = $task->getProject();
    $tmp = '<tr>';
    $tmp .= '<td align="center" nowrap="nowrap">';
    $tmp .= '<input type="checkbox" name="selected_task[' . $task->task_id . ']" value="' . $task->task_id . '" />';
    $tmp .= '</td>';
    $tmp .= '<td align="center" nowrap="nowrap">';
    if ($task->userPriority) {
        $tmp .= '<img src="./images/icons/priority';
        $tmp .= $task->userPriority < 0 ? '-' . -$task->userPriority : '+' . $task->userPriority;
        $tmp .= '.gif" width="13" height="16" alt="" />';
    }
    $tmp .= '</td>';
    $tmp .= '<td nowrap="nowrap">';
    for ($i = 0; $i < $level; $i++) {
        $tmp .= '&nbsp;&nbsp;&nbsp;';
    }
    if ($task->task_milestone == true) {
        $tmp .= '<strong>';
    }
    if ($level >= 1) {
        $tmp .= dPshowImage(dPfindImage('corner-dots.gif', 'tasks'), 16, 12, 'Subtask') . "&nbsp;";
    }
    $tmp .= '<a href="?m=tasks&amp;a=view&amp;task_id=' . $task->task_id . '">' . $task->task_name . '</a>';
    if ($task->task_milestone == true) {
        $tmp .= '</strong>';
    }
    if ($task->task_priority) {
        $tmp .= '&nbsp;(<img src="./images/icons/priority';
        $tmp .= $task->task_priority < 0 ? '-' . -$task->task_priority : '+' . $task->task_priority;
        $tmp .= '.gif" width="13" height="16" alt="" />)';
    }
    $tmp .= '</td>';
    $tmp .= '<td align="center">';
    $tmp .= '<a href="?m=projects&amp;a=view&amp;project_id=' . $task->task_project . '" style="background-color:#' . @$projects['project_color_identifier'] . '; color:' . bestColor(@$projects['project_color_identifier']) . '">' . $projects['project_short_name'] . '</a>';
    $tmp .= '</td>';
    $tmp .= '<td align="center" nowrap="nowrap">';
    $tmp .= $task->task_duration . '&nbsp;' . $AppUI->_($durnTypes[$task->task_duration_type]);
    $tmp .= '</td>';
    $tmp .= '<td align="center" nowrap="nowrap">';
    $dt = new CDate($task->task_start_date);
    $tmp .= $dt->format($df);
    $tmp .= '&nbsp;&nbsp;&nbsp;</td>';
    $tmp .= '<td align="center" nowrap="nowrap">';
    $ed = new CDate($task->task_end_date);
    $dt = $now->dateDiff($ed);
    $sgn = $now->compare($ed, $now);
    $tmp .= $dt * $sgn;
    $tmp .= '</td>';
    if ($display_week_hours) {
        $tmp .= displayWeeks($list, $task, $level, $fromPeriod, $toPeriod);
    }
    $tmp .= '<td>';
    $sep = $us = '';
    foreach ($users as $row) {
        if ($row['user_id']) {
            $us .= $sep . '<a href="?m=admin&amp;a=viewuser&amp;user_id=' . $row[0] . '">' . $row['contact_first_name'] . ' ' . $row['contact_last_name'] . '&nbsp;(' . $row['perc_assignment'] . '%)</a>';
            $sep = ', ';
        }
    }
    $tmp .= $us;
    $tmp .= '</td>';
    // create the list of possible assignees
    if ($zi == 1) {
        //	selectbox may not have a size smaller than 2, use 5 here as minimum
        $zz = $z < 5 ? 5 : $z * 1.5;
        $zz = sizeof($users) >= 7 ? $zz * 2 : $zz;
        $zm1 = $z - 2;
        $zm1 = $zm1 <= 0 ? 1 : $zm1;
        $assUser = $userAlloc[$user_id]['userFC'];
        // need to handle orphaned tasks different from tasks with existing assignees
        $zm1 += $user_id == 0 ? 1 : 0;
        $tmp .= '<td valign="top" align="center" nowrap="nowrap" rowspan="' . $zm1 . '">';
        $tmp .= '<select name="add_users" style="width:200px" size="' . ($zz - 1) . '" class="text" multiple="multiple" ondblclick="javascript:chAssignment(' . $user_id . ', 0, false)">';
        foreach ($userAlloc as $v => $u) {
            $tmp .= "\n\t" . '<option value="' . $u['user_id'] . '">' . dPformSafe($u['userFC']) . '</option>';
        }
        $tmp .= '</select>';
        /*
        $tmp .= arraySelect($user_list, 'add_users', 'class="text" style="width: 200px" size="' 
                            . ($zz - 1) . '" multiple="multiple"', NULL);
        */
        $tmp .= '</td>';
    }
    $tmp .= "</tr>\n";
    return $tmp;
}
 public function _drawBirthdays($day)
 {
     global $AppUI;
     $html = '';
     $m = intval(mb_substr($day, 4, 2));
     $d = intval(mb_substr($day, 6, 2));
     $y = intval(substr($day, 0, 4));
     $q = new DBQuery();
     $q->addTable('contacts', 'con');
     $q->addQuery('contact_birthday, contact_last_name, contact_first_name, contact_id');
     if (strlen($d) == 1) {
         $d = '0' . $d;
     }
     if (strlen($m) == 1) {
         $m = '0' . $m;
     }
     $q->addWhere("contact_birthday LIKE '%{$m}-{$d}'");
     $rows = $q->loadList();
     if ($rows) {
         $html .= '<div class="event">';
         foreach ($rows as $row) {
             $years = $y - substr($row['contact_birthday'], 0, 4);
             $html .= dPshowImage(dPfindImage('birthday.png', 'calendar'), 16, 16, '');
             $html .= '<a href="index.php?m=contacts&a=view&contact_id=' . $row['contact_id'] . '">' . $AppUI->___($row["contact_first_name"] . ' ' . $row["contact_last_name"]) . '</a> (' . $years . ')';
         }
         $html .= '</div>';
     }
     return $html;
 }
Example #10
0
$time_set = CUtils::getStartOfWeek($time_set, $rollover_day);
//Get list of dates for current timesheet
$timestampArray = CUtils::getListDateOfTheWeek($time_set, $working_days);
//Build week header's string
$header = $AppUI->_('Week from') . " ";
$header .= $AppUI->_(date("l", min($timestampArray))) . ' ' . date("d/m/Y", min($timestampArray));
$header .= ' ' . $AppUI->_('to') . ' ';
$header .= $AppUI->_(date("l", max($timestampArray))) . ' ' . date("d/m/Y", max($timestampArray));
?>

<!-- Display week header with appropriate arrows for prev/next  week-->
<table width="100%" class="motitle" cellspacing="0" cellpadding="3" border="0">
	<tr>
	<?php 
$prev = dPshowImage(dPfindImage('prev.gif'), 16, 16, $AppUI->_('Previous week'), 'Previous week');
$next = dPshowImage(dPfindImage('next.gif'), 16, 16, $AppUI->_('Next week'), 'Next week');
?>

		<td align="left"><a
			href="./index.php?m=activity&a=capture&uid=<?php 
echo $user_id;
?>
&wk=<?php 
echo $wk + 1;
?>
"><?php 
echo $prev;
?>
</a>
		</td>
		<th nowrap="nowrap" colspan="6" align="center"><?php 
Example #11
0
;"><?php 
    echo $hditem["project_name"];
    ?>
</a></td>
      </tr>
    </table>
    </td><td valign="top">
    <table cellspacing="1" cellpadding="2" width="100%">
      <tr>
        <td align="right" nowrap="nowrap"><?php 
    echo $AppUI->_('Call Type');
    ?>
:</td>
        <td class="hilite" width="100%"><?php 
    print $AppUI->_($ict[$hditem["item_calltype"]]) . " ";
    print dPshowImage(dPfindImage('ct' . $hditem["item_calltype"] . '.png', $m), 15, 17, 'align=center');
    ?>
</td>
      </tr>

      <tr>
        <td align="right" nowrap="nowrap"><?php 
    echo $AppUI->_('Call Source');
    ?>
:</td>
        <td class="hilite" width="100%"><?php 
    echo $AppUI->_(@$ics[$hditem["item_source"]]);
    ?>
</td>
      </tr>
<?php

// check access to files module
global $AppUI, $m, $obj, $task_id, $dPconfig;
if (!getDenyRead('files')) {
    if (!getDenyEdit('files')) {
        echo dPshowImage(dPfindImage('stock_attach-16.png', $m), 16, 16, '') . '<a href="./index.php?m=files&a=addedit&project_id=' . $obj->task_project . '&file_task=' . $task_id . '">' . $AppUI->_('Attach a file') . '</a>';
    }
    $showProject = false;
    $project_id = $obj->task_project;
    include $dPconfig['root_dir'] . '/modules/files/index_table.php';
}
Example #13
0
	<select name="add_users" style="width:200px" size="2" multiple="multiple" class="text" 
	 ondblclick="javascript:chAssignment(<?php 
                echo $p['project_id'];
                ?>
, 0, false)">
<?php 
                foreach ($userAlloc as $v => $u) {
                    echo '	  <option value="' . $u['user_id'] . '">' . dPformSafe($u['userFC']) . "</option>\n";
                }
                ?>
	</select>
	</td>
	<td align="center">
<?php 
                echo ' <a href="javascript:chAssignment(' . $p['project_id'] . ', 0, 0);">' . dPshowImage(dPfindImage('add.png', 'tasks'), 16, 16, 'Assign Users', 'Assign selected Users to selected Tasks') . "</a>\n";
                echo ' <a href="javascript:chAssignment(' . $p['project_id'] . ', 1, 1);">' . dPshowImage(dPfindImage('remove.png', 'tasks'), 16, 16, 'Unassign Users', 'Unassign Users from Task') . "</a>\n";
                ?>
	<br />

	<select class="text" name="percentage_assignment" title="<?php 
                echo $AppUI->_('Assign with Percentage');
                ?>
" >
<?php 
                for ($i = 0; $i <= 100; $i += 5) {
                    echo "\t<option " . ($i == 30 ? 'selected="true"' : '') . ' value="' . $i . '">' . $i . '%</option>';
                }
                ?>
	</select>
<?php 
            }
Example #14
0
File: view.php Project: n2i/xvnkb
<form name="frmDelete" action="index.php?m=calendar" method="post">
	<input type="hidden" name="dosql" value="do_event_aed" />
	<input type="hidden" name="del" value="1" />
	<input type="hidden" name="event_id" value="<?php 
echo $event_id;
?>
" />
</form>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr title="<?php 
echo $AppUI->_($types[$obj->event_type]);
?>
"><td class="tabon">
	<?php 
echo '<img class="ico" src="' . dPfindImage('event' . $obj->event_type . '.png', 'calendar') . '">&nbsp;' . $obj->event_title;
?>
	</td><td width="100%">&nbsp;</td></tr>
</table>
<table border="0" cellpadding="7" cellspacing="0" width="100%" class="infopanel">
<tr>
	<td width="100%">
	<?php 
if ($canEdit) {
    showButton('edit this event', 'index.php?m=calendar&a=addedit&event_id=' . $event_id);
    echo '&nbsp;';
    if ($canDelete) {
        showButton('delete event', 'js:delIt()');
    }
}
?>
Example #15
0
    if (isset($risk['risk_project'])) {
        $q->clear();
        $q->addQuery('task_id, task_name');
        $q->addTable('tasks');
        $q->addWhere('task_project = ' . $risk['risk_project']);
        $tasks = $q->loadHashList();
    } else {
        $tasks = array();
    }
    // setup the title block
    $ttl = $risk_id > 0 ? "Edit Risk" : "Add Risk";
    $titleBlock = new CTitleBlock($ttl, 'folder5.png', $m, "{$m}.{$a}");
    $titleBlock->addCrumb("?m=risks", "risks list");
    $titleBlock->addCrumb("?m=risks&a=view&risk_id={$risk_id}", "View Risk");
    if ($canDelete) {
        $titleBlock->addCrumbRight('<a href="javascript:delIt()">' . '<img align="absmiddle" src="' . dPfindImage('trash.gif', $m) . '" width="16" height="16" alt="" border="0" />&nbsp;' . $AppUI->_('delete risk') . '</a>');
    }
    $titleBlock->show();
    ?>
<script language="javascript">
function delIt(){
	var form = document.changecontact;
	if(confirm( "<?php 
    echo $AppUI->_('risksDelete');
    ?>
" )) {
		form.del.value = "<?php 
    echo $risk_id;
    ?>
";
		form.submit();
Example #16
0
	<td valign="top">
<?php 
if (!$dialog) {
    // left side navigation menu
    ?>
		<table cellspacing=0 cellpadding=2 border=0 height="600">
		<tr>
			<td><img src="images/shim.gif" width="70" height="3" alt="" /></td>
			<td rowspan="100"><img src="images/shim.gif" width="10" height="100" alt="" /></td>
		</tr>
	<?php 
    $nav = $AppUI->getMenuModules();
    $s = '';
    foreach ($nav as $module) {
        if (getPermission($module['mod_directory'], 'access')) {
            $s .= '<tr><td align="center" valign="middle" class="nav">' . '<a href="?m=' . $module['mod_directory'] . '">' . '<table cellspacing=0 cellpadding=0 border=0><tr><td class="clsBtnOff">' . '<img src="' . dPfindImage($module['mod_ui_icon'], $module['mod_directory']) . '" alt="" border="0" width="30" height="30" /></td></tr></table>' . $AppUI->_($module['mod_ui_name']) . "</a></td></tr>\n";
        }
    }
    echo $s;
    ?>
		<tr height="100%">
			<td>&nbsp;<img src="images/shim.gif" width="7" height="10" alt="" /></td>
		</tr>
		</table>	
<?php 
}
// END DIALOG
?>
	</td>
<td valign="top" align="left" width="100%">
<?php 
foreach ($events as $row) {
    $start = new CDate($row['event_start_date']);
    $end = new CDate($row['event_end_date']);
    ?>
	<tr>
		<td width="25%" nowrap="nowrap">
			<?php 
    echo $start->format($df . ' ' . $tf);
    ?>
 - <?php 
    echo $end->format($df . ' ' . $tf);
    ?>
		</td>
		<td width="10%" nowrap="nowrap">
			<?php 
    echo dPshowImage(dPfindImage('event' . $row['event_type'] . '.png', 'calendar'), 16, 16, '');
    ?>
			<b><?php 
    echo $AppUI->_($types[$row['event_type']]);
    ?>
</b>
		<td>
			<a href="?m=calendar&a=view&event_id=<?php 
    echo $row['event_id'];
    ?>
" class="event" title="<?php 
    echo $row['event_description'];
    ?>
">
			<?php 
    echo $row['event_title'];
Example #18
0
 /**
 * The drawing function
 * array($attribs, $data, $prefix, $suffix);
 */
 function show()
 {
     global $AppUI;
     $CR = "\n";
     $CT = "\n\t";
     $s = $CR . '<table width="100%" border="0" cellpadding="1" cellspacing="1">';
     $s .= $CR . '<tr>';
     if ($this->icon) {
         $s .= $CR . '<td width="42">';
         $s .= dPshowImage(dPFindImage($this->icon, $this->module));
         $s .= '</td>';
     }
     $s .= $CR . '<td align="left" width="100%" nowrap="nowrap"><h1>' . $AppUI->_($this->title) . '</h1></td>';
     foreach ($this->cells1 as $c) {
         $s .= $c[2] ? $CR . $c[2] : '';
         $s .= $CR . '<td align="right" nowrap="nowrap"' . ($c[0] ? ' ' . $c[0] : '') . '>';
         $s .= $c[1] ? $CT . $c[1] : '&nbsp;';
         $s .= $CR . '</td>';
         $s .= $c[3] ? $CR . $c[3] : '';
     }
     if ($this->showhelp) {
         $s .= '<td nowrap="nowrap" width="20" align="right">';
         //$s .= $CT . contextHelp('<img src="./images/obj/help.gif" width="14" height="16" border="0" alt="'.$AppUI->_('Help').'" />', $this->helpref);
         $s .= "\n\t<a href=\"#" . $this->helpref . "\" onClick=\"javascript:window.open('?m=help&dialog=1&hid=" . $this->helpref . "', 'contexthelp', 'width=400, height=400, left=50, top=50, scrollbars=yes, resizable=yes')\" title=\"" . $AppUI->_('Help') . "\">";
         $s .= "\n\t\t" . dPshowImage('./images/icons/stock_help-16.png', '16', '16', $AppUI->_('Help'));
         $s .= "\n\t</a>";
         $s .= "\n</td>";
     }
     $s .= "\n</tr>";
     $s .= "\n</table>";
     if (count($this->crumbs) || count($this->cells2)) {
         $crumbs = array();
         foreach ($this->crumbs as $k => $v) {
             $t = $v[1] ? '<img src="' . dPfindImage($v[1], $this->module) . '" border="" alt="" />&nbsp;' : '';
             $t .= $AppUI->_($v[0]);
             $crumbs[] = "<a href=\"{$k}\">{$t}</a>";
         }
         $s .= "\n<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" width=\"100%\">";
         $s .= "\n<tr>";
         $s .= "\n\t<td nowrap=\"nowrap\">";
         $s .= "\n\t\t" . '<strong>' . implode(' : ', $crumbs) . '</strong>';
         $s .= "\n\t</td>";
         foreach ($this->cells2 as $c) {
             $s .= $c[2] ? "\n{$c['2']}" : '';
             $s .= "\n\t<td align=\"right\" nowrap=\"nowrap\"" . ($c[0] ? " {$c['0']}" : '') . '>';
             $s .= $c[1] ? "\n\t{$c['1']}" : '&nbsp;';
             $s .= "\n\t</td>";
             $s .= $c[3] ? "\n\t{$c['3']}" : '';
         }
         $s .= "\n</tr>\n</table>";
     }
     echo "{$s}";
 }
Example #19
0
    $q->addWhere("project_company = {$company_id}");
}
$projects = array('0' => '') + $q->loadHashList();
echo db_error();
if (!in_array($forum_project, array_keys($projects))) {
    $forum_project = 0;
}
$perms =& $AppUI->acl();
$permittedUsers =& $perms->getPermittedUsers();
$users = array('0' => '') + $permittedUsers;
// setup the title block
$ttl = $forum_id > 0 ? "Edit Forum" : "Add Forum";
$titleBlock = new CTitleBlock($ttl, 'support.png', $m, "{$m}.{$a}");
$titleBlock->addCrumb("?m=forums", "forums list");
if ($canDelete) {
    $titleBlock->addCrumbRight('<a href="javascript:delIt()"><img align="absmiddle" src="' . dPfindImage('stock_delete-16.png', $m) . '" width="16" height="16" alt="" border="0" />&nbsp;' . $AppUI->_('delete forum') . '</a>');
}
$titleBlock->show();
?>
<script language="javascript">
function submitIt() {
	var form = document.changeforum;
	if (form.forum_name.value.search(/^\s*$/) >= 0) {
		alert("<?php 
echo $AppUI->_('forumName', UI_OUTPUT_JS);
?>
");
		form.forum_name.focus();
	} else if (form.forum_project.selectedIndex < 1) {
		alert("<?php 
echo $AppUI->_('forumSelectProject', UI_OUTPUT_JS);
Example #20
0
 $html .= '<tr class="' . ($min ? 'second' : 'first') . '">';
 $tm = $this_day->format($min ? '%M' : $tf);
 $html .= '<td width="1%" align="right" nowrap="nowrap">' . ($min ? $tm : "<b>{$tm}</b>") . '</td>';
 $timeStamp = $this_day->format("%H%M%S");
 if (@$events2[$timeStamp]) {
     $count = count($events2[$timeStamp]);
     for ($j = 0; $j < $count; $j++) {
         $row = $events2[$timeStamp][$j];
         $et = new CDate($row['event_end_date']);
         $rows = ($et->getHour() * 60 + $et->getMinute() - ($this_day->getHour() * 60 + $this_day->getMinute())) / $inc;
         $href = '?m=calendar&a=view&event_id=' . $row['event_id'];
         $alt = $row['event_description'];
         $html .= '<td class="event" rowspan="' . $rows . '" valign="top">';
         $link = ($href ? '<a href="' . $href . '" class="event" title="' . $alt . '">' : '') . $row['event_title'] . ($href ? '</a>' : '');
         $html .= '<table cellspacing="0" cellpadding="0" border="0"><tr>';
         $html .= '<td class="internal"><img src="' . dPfindImage('event' . $row['event_type'] . '.png', 'calendar') . '">';
         //$html .= '</td><td class="internal">&nbsp;<b>' . $types[$row['event_type']] . '</b></td></tr></table>';
         $html .= '</td><td class="internal">&nbsp;<b>' . $link . '</b></td></tr></table>';
         /*
         $html .= $href ? '<a href="'.$href.'" class="event" title="'.$alt.'">' : '';
         $html .= $row['event_title'];
         $html .= $href ? '</a>' : '';
         */
         $html .= '</td>';
     }
 } else {
     if (--$rows <= 0) {
         $html .= "\n\t<td></td>";
     }
 }
 $html .= "\n</tr>";
Example #21
0
File: index.php Project: n2i/xvnkb
</tr>

<tr>
	<td>&nbsp;</td>
	<td align="left">
		<a href="?m=system&a=viewmods"><?php 
echo $AppUI->_('View Modules');
?>
</a>
	</td>
</tr>

<tr>
	<td>
		<?php 
echo dPshowImage(dPfindImage('advancedsettings32.png', $m), 32, 32, '');
?>
	</td>
	<td align="left" class="subtitle">
		<?php 
echo $AppUI->_('Administration');
?>
	</td>
</tr>

<tr>
	<td>&nbsp;</td>
	<td align="left">
		<a href="?m=system&u=roles"><?php 
echo $AppUI->_('User Roles');
?>
</tr>

<tr>
	<td>&nbsp;</td>
	<td align="left">
		<a href="?m=system&a=viewmods"><?php 
echo $AppUI->_('View Modules');
?>
</a>
	</td>
</tr>

<tr>
	<td>
		<?php 
echo dPshowImage(dPfindImage('main-settings.png', $m), 42, 42, '');
?>
	</td>
	<td align="left" class="subtitle">
		<?php 
echo $AppUI->_('Administration');
?>
	</td>
</tr>

<tr>
	<td>&nbsp;</td>
	<td align="left">
		<a href="?m=system&u=roles"><?php 
echo $AppUI->_('User Roles');
?>
Example #23
0
?>
		</a>
	</td>
	<th width="100%">
		<span style="font-size:12pt"><?php 
echo $AppUI->_('Week') . ' ' . htmlentities($week_time->format('%V - %Y'), ENT_COMPAT, $locale_char_set);
?>
</span>
	</th>
	<td>
		<a href="<?php 
echo '?m=calendar&amp;a=week_view&amp;date=' . $next_week->format(FMT_TIMESTAMP_DATE);
?>
">
		<?php 
echo dPshowImage(dPfindImage('next.gif'), 16, 16, $AppUI->_('next week'));
?>
		</a>
	</td>
</tr>
</table>

<table border="0" cellspacing="1" cellpadding="2" width="100%" style="margin-width:4px;background-color:white">
<?php 
$column = 0;
$show_day = $this_week;
$today = new CDate();
$today = $today->format(FMT_TIMESTAMP_DATE);
for ($i = 0; $i < 7; $i++) {
    $dayStamp = $show_day->format(FMT_TIMESTAMP_DATE);
    $day = $show_day->getDay();
Example #24
0
 /**
  * CMonthCalendar::_drawWeek()
  *
  * { Description }
  *
  */
 function _drawWeek($dateObj)
 {
     global $AppUI;
     $w = "\t\t" . '<td class="week">';
     if ($this->dayFunc) {
         $w .= '<a href="javascript:' . $this->weekFunc . "(" . $dateObj->getTimestamp() . ",'" . $dateObj->toString() . "')" . '">';
     }
     $w .= dPshowImage(dPfindImage('view.week.gif'), 16, 15, $AppUI->_('Week View'));
     $w .= $this->dayFunc ? '</a>' : '';
     $w .= "</td>\n";
     return $w;
 }
Example #25
0
        } else {
            log_error("task has not fixed dependencies");
        }
    } else {
        // task has no dependencies
        log_info("no dependencies => ");
        fixate_task($i, time(), "");
    }
    log_info("</div><br />\n");
}
?>

<table name="table" cellspacing="1" cellpadding="1" border="0" width="100%">
<tr>
	<td><?php 
echo dPshowImage(dPfindImage('applet-48.png', $m), 16, 16, '');
?>
</td>
	<td nowrap><h1><?php 
echo $AppUI->_('Tasks Organizer Wizard');
?>
</h1></td>
	<td nowrap><img src="./images/shim.gif" width="16" height="16" alt="" border="0"></td>
	<td valign="top" align="right" width="100%"></td>
</tr>
</table>

<?php 
/*** Process updates ***/
// update tasks duration
if ($set_duration) {
Example #26
0
global $AppUI, $project_id, $task_id, $deny, $canRead, $canEdit, $dPconfig, $cfObj, $m, $obj;
require_once $AppUI->getModuleClass('files');
global $allowed_folders_ary, $denied_folders_ary, $limited;
$cfObj = new CFileFolder();
$allowed_folders_ary = $cfObj->getAllowedRecords($AppUI->user_id);
$denied_folders_ary = $cfObj->getDeniedRecords($AppUI->user_id);
$limited = count($allowed_folders_ary) < $cfObj->countFolders() ? true : false;
if (!$limited) {
    $canEdit = true;
} else {
    if ($limited && array_key_exists($folder, $allowed_folders_ary)) {
        $canEdit = true;
    } else {
        $canEdit = false;
    }
}
$showProject = false;
$project_id = $obj->task_project;
if (getPermission('files', 'edit')) {
    echo '<a href="?m=files&amp;a=addedit&amp;project_id=' . $project_id . '&amp;file_task=' . $task_id . '">' . $AppUI->_('Attach a file') . '</a>';
    echo dPshowImage(dPfindImage('stock_attach-16.png', $m), 16, 16, '');
}
$canAccess_folders = getPermission('file_folders', 'access');
if ($canAccess_folders) {
    $folder = (int) dPgetParam($_GET, 'folder', 0);
    require DP_BASE_DIR . '/modules/files/folders_table.php';
} else {
    if (getPermission('files', 'view')) {
        require DP_BASE_DIR . '/modules/files/index_table.php';
    }
}
function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $user_id, $canEditINA)
{
    global $AppUI, $df, $durnTypes, $log_userfilter_users, $priority, $system_users, $z, $zi, $x, $userAlloc;
    $zi++;
    $users = $task->task_assigned_users;
    $task->userPriority = $task->getUserSpecificTaskPriority($user_id);
    $projects = $task->getProject();
    $tmp = "<tr>";
    $tmp .= "<td align=\"center\" nowrap=\"nowrap\">";
    $tmp .= "<input type=\"checkbox\" name=\"selected_task[{$task->task_id}]\" value=\"{$task->task_id}\"/>";
    $tmp .= "</td>";
    /*ina
     */
    $tmp .= "<td>";
    for ($i = 0; $i < $level; $i++) {
        $tmp .= "&#160";
    }
    if ($task->task_milestone == true) {
        $tmp .= "<B>";
    }
    if ($level >= 1) {
        $tmp .= dPshowImage(dPfindImage('corner-dots.gif', 'tasks'), 16, 12, 'Subtask') . "&nbsp;";
    }
    $tmp .= "<a href='?m=tasks&a=view&task_id={$task->task_id}'>" . $task->task_name . "</a>";
    if ($task->task_milestone == true) {
        $tmp .= "</B>";
    }
    if ($task->task_priority < 0) {
        $tmp .= "&nbsp;(<img src=\"./images/icons/priority-" . -$task->task_priority . ".gif\" width=13 height=16>)";
    } elseif ($task->task_priority > 0) {
        $tmp .= "&nbsp;(<img src=\"./images/icons/priority+" . $task->task_priority . ".gif\" width=13 height=16>)";
    }
    $tmp .= "</td>";
    $tmp .= "<td align=\"center\">";
    $tmp .= "<a href='?m=projects&a=view&project_id={$task->task_project}' style='background-color:#" . @$projects["project_color_identifier"] . "; color:" . bestColor(@$projects['project_color_identifier']) . "'>" . $projects['project_short_name'] . "</a>";
    $tmp .= "</td>";
    $tmp .= "<td align=\"center\" nowrap=\"nowrap\">";
    $tmp .= $task->task_duration . "&nbsp;" . $AppUI->_($durnTypes[$task->task_duration_type]);
    $tmp .= "</td>";
    $tmp .= "<td align=\"center\" nowrap=\"nowrap\">";
    $dt = new CDate($task->task_start_date);
    $tmp .= $dt->format($df);
    $tmp .= "&#160&#160&#160</td>";
    $tmp .= "<td align=\"center\" nowrap=\"nowrap\">";
    $ed = new CDate($task->task_end_date);
    $now = new CDate();
    $dt = $now->dateDiff($ed);
    $sgn = $now->compare($ed, $now);
    $tmp .= $dt * $sgn;
    $tmp .= "</td>";
    if ($display_week_hours) {
        $tmp .= displayWeeks($list, $task, $level, $fromPeriod, $toPeriod);
    }
    $tmp .= "<td>";
    $sep = $us = "";
    foreach ($users as $row) {
        if ($row["user_id"]) {
            if ($canEditINA) {
                $us .= "<a href='?m=admin&a=viewuser&user_id={$row['0']}'>" . $sep . $row['contact_last_name'] . "&nbsp;\n                        \t(" . $row['perc_assignment'] . "%)</a>";
            } else {
                $us .= $sep . $row['contact_last_name'] . "&nbsp;(" . $row['perc_assignment'] . "%)";
            }
            /*ina*/
            $sep = ", ";
        }
    }
    $tmp .= $us;
    $tmp .= "</td>";
    // create the list of possible assignees
    if ($zi == 1) {
        //  selectbox may not have a size smaller than 2, use 5 here as minimum
        $zz = $z < 5 ? 5 : $z * 1.5;
        if (sizeof($users) >= 7) {
            $zz = $zz * 2;
        }
        $zm1 = $z - 2;
        if ($zm1 == 0) {
            $zm1 = 1;
        }
        $assUser = $userAlloc[$user_id]['userFC'];
        if ($user_id == 0) {
            // need to handle orphaned tasks different from tasks with existing assignees
            $zm1++;
        }
        if ($canEditINA) {
            $tmp .= "<td valign=\"top\" align=\"center\" nowrap=\"nowrap\" rowspan=\"{$zm1}\">";
            $tmp .= '<select name="add_users" style="width:200px" size="' . ($zz - 1) . '" class="text" multiple="multiple" ondblclick="javascript:chAssignment(' . $user_id . ', 0, false)">';
            foreach ($userAlloc as $v => $u) {
                $tmp .= "\n\t<option value=\"" . $u['user_id'] . "\">" . dPformSafe($u['userFC']) . "</option>";
            }
            $tmp .= '</select>';
            //$tmp.= arraySelect( $user_list, 'add_users', 'class="text" STYLE="width: 200px" size="'.($zz-1).'" multiple="multiple"',NULL );
            $tmp .= "</td>";
        }
    }
    $tmp .= "</tr>\n";
    return $tmp;
}
Example #28
0
</tr>
<?php 
$s = '';
foreach ($rows as $row) {
    $canEdit = hditemEditable($row);
    /* We need to check if the user who requested the item is still in the
       system. Just because we have a requestor id does not mean we'll be
       able to retrieve a full name */
    $s .= $CR . '<form method="post">';
    $s .= $CR . '<tr>';
    $s .= $CR . '<td align="right" nowrap>';
    if ($canEdit) {
        $s .= $CR . '<a href="?m=helpdesk&a=addedit&item_id=' . $row["item_id"] . '">' . dPshowImage("./images/icons/pencil.gif", 12, 12, "edit") . '</a>&nbsp;';
    }
    $s .= $CR . '</td>';
    $s .= $CR . '<td nowrap="nowrap"><a href="./index.php?m=helpdesk&a=view&item_id=' . $row["item_id"] . '">' . '<strong>' . $row["item_id"] . '</strong></a> ' . dPshowImage(dPfindImage('ct' . $row["item_calltype"] . '.png', 'helpdesk'), 15, 17, '') . '</td>';
    $date = new CDate($row['item_created']);
    $s .= $CR . "<td nowrap>" . $date->format($format) . "</td>";
    $s .= $CR . "<td nowrap align=\"center\">";
    if ($row["item_requestor_email"]) {
        $s .= $CR . "<a href=\"mailto:" . $row["item_requestor_email"] . "\">" . $row['item_requestor'] . "</a>";
    } else {
        $s .= $CR . $row['item_requestor'];
    }
    $s .= $CR . "</td>";
    $s .= $CR . '<td width="99%"><a href="?m=helpdesk&a=view&item_id=' . $row["item_id"] . '">' . $row["item_title"] . '</a></td>';
    $s .= $CR . "<td nowrap align=\"center\">";
    if ($row["assigned_email"]) {
        $s .= $CR . "<a href=\"mailto:" . $row["assigned_email"] . "\">" . $row['assigned_fullname'] . "</a>";
    } else {
        $s .= $CR . $row['assigned_fullname'];
Example #29
0
      <td class="hilite" nowrap="nowrap" width="1%"><?php 
        echo $time;
        ?>
</td>
      <td class="hilite" nowrap="nowrap" width="1%"><?php 
        echo $log['email'] ? "<a href=\"mailto: {$log['email']}\">{$log['modified_by']}</a>" : $log['modified_by'];
        ?>
</td>
      <td class="hilite" width="98%"><?php 
        if ($log['status_code'] == 0 || $log['status_code'] == 17) {
            // Created or Deleted
            print $AppUI->_($isa[$log['status_code']]);
        } else {
            if ($log['status_code'] == 16) {
                // Comment
                print "<a href=\"javascript:void(0);\"\n                    onClick=\"toggle_comment('{$log['status_id']}_short');\n                              toggle_comment('{$log['status_id']}_long');\">" . dPshowImage(dPfindImage('toggle.png', $m), 16, 16, '') . "</a>";
                print "<span style='display: inline' id='{$log['status_id']}_short'> " . $AppUI->_($isa[$log['status_code']]) . " " . htmlspecialchars(substr($log['status_comment'], 0, 8)) . "</span><span style='display: none' id='{$log['status_id']}_long'> " . $AppUI->_($isa[$log['status_code']]) . " " . htmlspecialchars($log['status_comment']) . "</span>";
            } else {
                // Everything else
                print $AppUI->_($isa[$log['status_code']]) . " " . $log['status_comment'];
            }
        }
        ?>
</td>
    </tr>
    <?php 
    }
}
?>
</table>