コード例 #1
0
ファイル: links_events.php プロジェクト: joly/web2project
/**
 * 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, $minical = false)
{
    global $event_filter;
    $events = CEvent::getEventsForPeriod($startPeriod, $endPeriod, $event_filter);
    $cwd = explode(',', w2PgetConfig('cal_working_days'));
    // 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;
        for ($i = 0, $i_cmp = $start->dateDiff($end); $i <= $i_cmp; $i++) {
            // the link
            // optionally do not show events on non-working days
            if ($row['event_cwd'] && in_array($date->getDayOfWeek(), $cwd) || !$row['event_cwd']) {
                if ($minical) {
                    $link = array();
                } else {
                    $url = '?m=calendar&a=view&event_id=' . $row['event_id'];
                    $link['href'] = '';
                    $link['alt'] = '';
                    $link['text'] = w2PtoolTip($row['event_title'], getEventTooltip($row['event_id']), true) . w2PshowImage('event' . $row['event_type'] . '.png', 16, 16, '', '', 'calendar') . '</a>&nbsp;' . '<a href="' . $url . '"><span class="event">' . $row['event_title'] . '</span></a>' . w2PendTip();
                }
                $links[$date->format(FMT_TIMESTAMP_DATE)][] = $link;
            }
            $date = $date->getNextDay();
        }
    }
}
コード例 #2
0
ファイル: vw_depts.php プロジェクト: eureka2/web2project
function showchilddept_comp(&$a, $level = 0)
{
    global $AppUI;
    $s = '
	<td>
		<a href="./index.php?m=departments&amp;a=addedit&amp;dept_id=' . $a["dept_id"] . '" title="' . $AppUI->_('edit') . '">
			' . w2PshowImage('icons/stock_edit-16.png', 16, 16, '') . '
	</td>
	<td>';
    for ($y = 0; $y < $level; $y++) {
        if ($y + 1 == $level) {
            $s .= '<img src="' . w2PfindImage('corner-dots.gif') . '" width="16" height="12" border="0" alt="">';
        } else {
            $s .= '<img src="' . w2PfindImage('shim.gif') . '" width="16" height="12" border="0" alt="">';
        }
    }
    $s .= '<a href="./index.php?m=departments&a=view&dept_id=' . $a['dept_id'] . '">' . $a['dept_name'] . '</a>';
    $s .= '</td>';
    $s .= '<td align="center">' . ($a['dept_users'] ? $a['dept_users'] : '') . '</td>';
    echo '<tr>' . $s . '</tr>';
}
コード例 #3
0
    ?>
&a=addedit_folder&folder=<?php 
    echo $cfObj->file_folder_id;
    ?>
" title="edit the <?php 
    echo $cfObj->file_folder_name;
    ?>
 folder"><?php 
    echo w2PshowImage('filesaveas.png', '22', '22', 'folder icon', 'edit folder', 'files');
    ?>
</a></li>
                <?php 
}
?>
                <li class="info-text"><?php 
echo w2PshowImage('folder5_small.png', '22', '22', '', '', 'files');
?>
 <strong><?php 
echo isset($cfObj) && $cfObj->file_folder_name ? $cfObj->file_folder_name : "Root";
?>
</strong></li>
                <?php 
if (isset($cfObj) && $cfObj->file_folder_description != '') {
    ?>
                    <li class="info-text"><?php 
    echo w2p_textarea($cfObj->file_folder_description);
    ?>
</li>
                <?php 
}
?>
コード例 #4
0
ファイル: tasks.php プロジェクト: eureka2/web2project
											<td align="right">
												<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'] . '">' . w2PformSafe($u['userFC']) . "</option>\n";
                }
                ?>
												</select>
											</td>
											<td align="center">
												<?php 
                echo '<a href="javascript:chAssignment(' . $p['project_id'] . ', 0, 0);">' . w2PshowImage('add.png', 16, 16, 'Assign Users', 'Assign selected Users to selected Tasks', 'tasks') . "</a>\n";
                echo '<a href="javascript:chAssignment(' . $p['project_id'] . ', 1, 1);">' . w2PshowImage('remove.png', 16, 16, 'Unassign Users', 'Unassign Users from Task', 'tasks') . "</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>
											</td>
									  </tr>
								  </table>
コード例 #5
0
ファイル: post_message.php プロジェクト: eureka2/web2project
            <td>
            </td>
            <td align="left">
                <small><b><?php 
echo $AppUI->_('BBCode Ready');
?>
!</b></small>
                <?php 
echo w2PshowImage('log-info.gif', '', '', 'BBCode Tags Accepted', '
                [b][/b] Bold. Example: [b]<b>This text will be bold</b>[/b]<br />
                [i][/i] Italic. Example: [i]<i>This text will be in italic</i>[/i]<br />
                [u][/u] Underlined. Example: [u]<u>This text will be underlined</u>[/u]<br />
                [s][/s] Scratched. Example: [s]<del>This text will be scratched</del>[/s]<br />
                [sub][/sub] Subscript. Example: [sub]<sub>This text will be subscript</sub>[/sub]<br />
                [sup][/sup] Superscript. Example: [sup]<sup>This text will be superscript</sup>[/sup]<br />
                [email][/email] Email Address. Example: [email]my@mail.net[/email]<br />
                [color=color_name][/color] Colorized Text. Example: [color=blue]I am Blue[/color]<br />
                [size=size_value][/size], [font=font_name][/font] and [align=left|center|right][align] Format Text. Example: [align=right]I am on the Right[/align]<br />
                [url=url_address][/url] Link. Example: [url=http://web2project.net]web2Project[/url]<br />
                [list][/list],[ulist][/ulist] and [li][/li] Lists.<br />
                [quote][/quote] Quoted Text. Example: [quote]<q>This text will be superscript</q>[/quote]<br />
                [code][/code] Text in code format. Example: [code]//This is a code comment;[/code]<br />
                ');
?>
            </td>
        </tr>
        <tr>
            <td>
                <input type="button" value="<?php 
echo $AppUI->_('back');
?>
コード例 #6
0
function showchilddept_comp(&$a, $level = 0)
{
    trigger_error("The showchilddept_comp function has been deprecated and will be removed in v4.0. There is no replacement.", E_USER_NOTICE);
    global $AppUI;
    $s = '
    <td>
        <a href="./index.php?m=departments&amp;a=addedit&amp;dept_id=' . $a["dept_id"] . '" title="' . $AppUI->_('edit') . '">
            ' . w2PshowImage('icons/stock_edit-16.png', 16, 16, '') . '
    </td>
    <td>';
    for ($y = 0; $y < $level; $y++) {
        if ($y + 1 == $level) {
            $s .= '<img src="' . w2PfindImage('corner-dots.gif') . '" width="16" height="12" border="0" alt="">';
        } else {
            $s .= '<img src="' . w2PfindImage('shim.gif') . '" width="16" height="12" border="0" alt="">';
        }
    }
    $s .= '<a href="./index.php?m=departments&a=view&dept_id=' . $a['dept_id'] . '">' . $a['dept_name'] . '</a>';
    $s .= '</td>';
    $s .= '<td align="center">' . ($a['dept_users'] ? $a['dept_users'] : '') . '</td>';
    return '<tr>' . $s . '</tr>';
}
コード例 #7
0
$other_users = false;
$no_modify = false;
$start_date = new CDate('0000-00-00 00:00:00');
$end_date = new CDate('9999-12-31 23:59:59');
// assemble the links for the events
$events = CEvent::getEventsForPeriod($start_date, $end_date, 'all', 0, 0, $company_id);
$start_hour = w2PgetConfig('cal_day_start');
$end_hour = w2PgetConfig('cal_day_end');
$tf = $AppUI->getPref('TIMEFORMAT');
$df = $AppUI->getPref('SHDATEFORMAT');
$types = w2PgetSysVal('EventType');
$html = '<table cellspacing="1" cellpadding="2" border="0" width="100%" class="tbl">';
$html .= '<tr><th>' . $AppUI->_('Date') . '</th><th>' . $AppUI->_('Type') . '</th><th>' . $AppUI->_('Event') . '</th></tr>';
foreach ($events as $row) {
    $html .= '<tr>';
    $start = new CDate($row['event_start_date']);
    $end = new CDate($row['event_end_date']);
    $html .= '<td width="25%" nowrap="nowrap">' . $start->format($df . ' ' . $tf) . '&nbsp;-&nbsp;';
    $html .= $end->format($df . ' ' . $tf) . '</td>';
    $href = '?m=calendar&a=view&event_id=' . $row['event_id'];
    $alt = $row['event_description'];
    $html .= '<td width="10%" nowrap="nowrap">';
    $html .= w2PshowImage('event' . $row['event_type'] . '.png', 16, 16, '', '', 'calendar');
    $html .= '&nbsp;<b>' . $AppUI->_($types[$row['event_type']]) . '</b><td>';
    $html .= $href ? '<a href="' . $href . '" class="event" title="' . $alt . '">' : '';
    $html .= $row['event_title'];
    $html .= $href ? '</a>' : '';
    $html .= '</td></tr>';
}
$html .= '</table>';
echo $html;
コード例 #8
0
ファイル: index.php プロジェクト: viniciusbudines/sisnuss
        print '		<p>w2P Old Queries executed: ' . $w2p_performance_old_dbqueries . ' queries</p>';
        print '		<p>w2P Total Queries executed: ' . (int) ($w2p_performance_old_dbqueries + $w2p_performance_dbqueries) . ' queries</p>';
        printf('		<p><b>Page generated in %.3f seconds</b></p>', array_sum(explode(' ', microtime())) - $w2p_performance_time);
        print '	</td>';
        print '	</tr>';
        print '	</table>';
        print '</td>';
        print '</tr>';
        print '</table>';
    }
    echo '
		<!--AJAX loading messagebox -->
		<div id="loadingMessage" style="alpha(opacity=100);opacity:1;position: fixed; left: 0px; top: 1px;display: none;">
		<table width="80" cellpadding="1" cellspacing="1" border="0">
		<tr>
			<td>';
    echo w2PshowImage('ajax-loader.gif', '', '', 'sisNUSS', 'Server Connection Running, Please wait...');
    echo '
			</td>
			<td>
				<b>' . $AppUI->_('Loading') . '</b>
			</td>
		</tr>
		</table>
		</div>
		<!--End AJAX loading messagebox -->';
    //close the body and html here, instead of on the theme footer.
    echo '</body>
          </html>';
}
ob_end_flush();
コード例 #9
0
ファイル: view_topics.php プロジェクト: joly/web2project
    if ($row["message_parent"] < 0) {
        ?>
<tr>
	<td nowrap="nowrap" align="center" width="1%">
		<input type="checkbox" name="forum_<?php 
        echo $row['message_id'];
        ?>
" <?php 
        echo $row['watch_user'] ? 'checked="checked"' : '';
        ?>
 />
	</td>
	<td>
		<?php 
        if ($row['visit_user'] != $AppUI->user_id || $row['reply_visits'] != $row['replies']) {
            echo w2PshowImage('icons/stock_new_small.png', false, false, 'You have unread posts in this topic');
        }
        ?>
		<span style="font-size:10pt;">
		<a href="?m=forums&a=viewer&forum_id=<?php 
        echo $forum_id . '&message_id=' . $row["message_id"];
        ?>
"><?php 
        echo $row['message_title'];
        ?>
</a>
		</span>
	</td>
	<td bgcolor="#dddddd" width="10%"><?php 
        echo $row['contact_first_name'] . ' ' . $row['contact_last_name'];
        ?>
コード例 #10
0
 /**
  * CMonthCalendar::_drawTitle()
  *
  * { Description }
  *
  */
 private function _drawTitle()
 {
     global $AppUI, $m, $a;
     $url = 'index.php?m=' . $m;
     $url .= $a ? '&amp;a=' . $a : '';
     $url .= isset($_GET['dialog']) ? '&amp;dialog=1' : '';
     $s = '<table border="0" cellspacing="0" cellpadding="3" width="100%" class="' . $this->styleTitle . '">';
     $s .= '<tr>';
     if ($this->showArrows) {
         $href = $url . '&amp;date=' . $this->prev_month->format(FMT_TIMESTAMP_DATE) . ($this->callback ? '&amp;callback=' . $this->callback : '') . (count($this->highlightedDays) > 0 ? '&uts=' . key($this->highlightedDays) : '');
         $s .= '<td align="left">';
         $s .= '<a href="' . $href . '">' . w2PshowImage('prev.gif', 16, 16, $AppUI->_('previous month')) . '</a>';
         $s .= '</td>';
     }
     $s .= '<th width="99%" align="center">';
     if ($this->clickMonth) {
         $s .= '<a href="index.php?m=' . $m . '&amp;date=' . $this->this_month->format(FMT_TIMESTAMP_DATE) . '">';
     }
     setlocale(LC_TIME, 'C');
     $s .= $AppUI->_($this->this_month->format('%B')) . ' ' . $this->this_month->format('%Y') . ($this->clickMonth ? '</a>' : '');
     setlocale(LC_ALL, $AppUI->user_lang);
     $s .= '</th>';
     if ($this->showArrows) {
         $href = $url . '&amp;date=' . $this->next_month->format(FMT_TIMESTAMP_DATE) . ($this->callback ? '&amp;callback=' . $this->callback : '') . (count($this->highlightedDays) > 0 ? '&amp;uts=' . key($this->highlightedDays) : '');
         $s .= '<td align="right">';
         $s .= '<a href="' . $href . '">' . w2PshowImage('next.gif', 16, 16, $AppUI->_('next month')) . '</a>';
         $s .= '</td>';
     }
     $s .= '</tr>';
     $s .= '</table>';
     return $s;
 }
コード例 #11
0
 /**
  * createColumn is handy because it can take any input $fieldName and use
  *   its suffix to determine how the field should be displayed.
  *
  * This allows us to treat project_description, task_description,
  *   company_description, or even some_other_crazy_wacky_description in
  *   exactly the same way without additional lines of code or configuration.
  *   If you want to do your own, feel free... but this is probably easier.
  * 
  * Examples: _budget, _date, _name, _owner
  * 
  * This may not work for things like company_type or project_type which are
  *   actually just references to look up tables, ... but should work on
  *   fields like project_company, dept_company because we still have a 
  *   common suffix.
  *
  * @note I'm kind of annoyed about the complexity and sheer number of
  *   paths of this method but overall I think it's laid out reasonably
  *   well. I think the more important part is that I've been able to
  *   encapsulate it all here instead of spreading it all over the modules
  *   and views.
  */
 public function createCell($fieldName, $value, $custom = array())
 {
     $additional = '';
     if ('' == $value) {
         return '<td>-</td>';
     }
     $pieces = explode('_', $fieldName);
     $prefix = $pieces[0];
     $suffix = '_' . end($pieces);
     if ($fieldName == 'project_actual_end_date') {
         $suffix = '_actual';
     }
     switch ($suffix) {
         //BEGIN: object-based linkings
         /*
          * TODO: The following cases are likely to change once we have an approach to 
          *   handle module-level objects and their proper mapping/linkings.
         */
         case '_company':
         case '_contact':
         case '_task':
             $module = substr($suffix, 1);
             $class = 'C' . ucfirst($module);
             $obj = new $class();
             $obj->load($value);
             $link = '?m=' . w2p_pluralize($module) . '&a=view&' . $module . '_id=' . $value;
             $cell = '<a href="' . $link . '">' . $obj->{"{$module}" . '_name'} . '</a>';
             $suffix .= ' _name';
             break;
         case '_department':
             $module = substr($suffix, 1);
             $class = 'C' . ucfirst($module);
             $obj = new $class();
             $obj->load($value);
             /**
              * This is a branch separate from _company, _contact, etc above because although the module is called
              *   departments, the fields are dept_id and dept_name. :(
              *                                                              ~ caseydk, Dec 11 2013
              */
             $link = '?m=' . w2p_pluralize($module) . '&a=view&dept_id=' . $value;
             $cell = '<a href="' . $link . '">' . $obj->dept_name . '</a>';
             $suffix .= ' _name';
             break;
         case '_folder':
             $obj = new CFile_Folder();
             $obj->load($value);
             $foldername = $value ? $obj->file_folder_name : 'Root';
             $image = '<img src="' . w2PfindImage('folder5_small.png', 'files') . '" />';
             $link = '?m=files&tab=4&folder=' . (int) $value;
             $cell = '<a href="' . $link . '">' . $image . ' ' . $foldername . '</a>';
             $suffix .= ' _name';
             break;
         case '_user':
         case '_username':
             $obj = new CContact();
             $obj->findContactByUserid($this->tableRowData['user_id']);
             $link = '?m=users&a=view&user_id=' . $this->tableRowData['user_id'];
             $cell = '<a href="' . $link . '">' . $obj->user_username . '</a>';
             break;
             //END: object-based linkings
             /*
              * TODO: These two prefix adjustments are an ugly hack because our departments 
              *   table doesn't follow the same convention as every other table we have. 
              *   This needs to be fixed in v4.0 - caseydk 13 Feb 2012
              *
              * TODO: And unfortunately, the forums module is screwy using 'viewer' instead 
              *   of our standard 'view' for the page. ~ caseydk 16 Feb 2012
             */
         //END: object-based linkings
         /*
          * TODO: These two prefix adjustments are an ugly hack because our departments 
          *   table doesn't follow the same convention as every other table we have. 
          *   This needs to be fixed in v4.0 - caseydk 13 Feb 2012
          *
          * TODO: And unfortunately, the forums module is screwy using 'viewer' instead 
          *   of our standard 'view' for the page. ~ caseydk 16 Feb 2012
         */
         case '_name':
             $prefix = $prefix == 'project_short' ? 'project' : $prefix;
             $prefix = $prefix == 'dept' ? 'department' : $prefix;
             $page = $prefix == 'forum' || $prefix == 'message' ? 'viewer' : 'view';
             $link = '?m=' . w2p_pluralize($prefix) . '&a=' . $page . '&';
             $link = $prefix == 'message' ? '?m=forums&a=' . $page . '&' : $link;
             $prefix = $prefix == 'department' ? 'dept' : $prefix;
             $link .= $prefix . '_id=' . $this->tableRowData[$prefix . '_id'];
             $link .= $prefix == 'task_log' ? '&tab=1&task_id=' . $this->tableRowData['task_id'] : '';
             $icon = $fieldName == 'file_name' ? '<img src="' . w2PfindImage(getIcon($this->tableRowData['file_type']), 'files') . '" />&nbsp;' : '';
             $cell = '<a href="' . $link . '">' . $icon . $value . '</a>';
             //TODO: task_logs are another oddball..
             $cell = $prefix == 'task_log' ? str_replace('task_logs', 'tasks', $cell) : $cell;
             break;
         case '_author':
         case '_creator':
         case '_owner':
         case '_updator':
             if ((int) $value) {
                 $obj = new CContact();
                 $obj->findContactByUserid($value);
                 $suffix .= ' nowrap';
                 $link = '?m=users&a=view&user_id=' . $value;
                 $cell = '<a href="' . $link . '">' . $obj->contact_display_name . '</a>';
             } else {
                 $cell = $value;
             }
             break;
             // The above are all contact/user display names, the below are numbers.
         // The above are all contact/user display names, the below are numbers.
         case '_count':
         case '_hours':
             $cell = $value;
             break;
         case '_duration':
             $durnTypes = w2PgetSysVal('TaskDurationType');
             $cell = $value . ' ' . $this->AppUI->_($durnTypes[$this->tableRowData['task_duration_type']]);
             break;
         case '_size':
             $cell = file_size($value);
             break;
         case '_budget':
             $cell = w2PgetConfig('currency_symbol');
             $cell .= formatCurrency($value, $this->AppUI->getPref('CURRENCYFORM'));
             break;
         case '_url':
             $value = str_replace(array('"', '"', '<', '>'), '', $value);
             $cell = w2p_url($value);
             break;
         case '_email':
             $cell = w2p_email($value);
             break;
         case '_birthday':
         case '_date':
             $myDate = intval($value) ? new w2p_Utilities_Date($value) : null;
             $cell = $myDate ? $myDate->format($this->df) : '-';
             break;
         case '_actual':
             $end_date = intval($this->tableRowData['project_end_date']) ? new w2p_Utilities_Date($this->tableRowData['project_end_date']) : null;
             $actual_end_date = intval($this->tableRowData['project_actual_end_date']) ? new w2p_Utilities_Date($this->tableRowData['project_actual_end_date']) : null;
             $style = $actual_end_date < $end_date && !empty($end_date) ? 'style="color:red; font-weight:bold"' : '';
             if ($actual_end_date) {
                 $cell = '<a href="?m=tasks&a=view&task_id=' . $this->tableRowData['project_last_task'] . '" ' . $style . '>' . $actual_end_date->format($this->df) . '</a>';
             } else {
                 $cell = '-';
             }
             break;
         case '_created':
         case '_datetime':
         case '_update':
         case '_updated':
             $myDate = intval($value) ? new w2p_Utilities_Date($this->AppUI->formatTZAwareTime($value, '%Y-%m-%d %T')) : null;
             $cell = $myDate ? $myDate->format($this->dtf) : '-';
             break;
         case '_description':
             $cell = w2p_textarea($value);
             break;
         case '_priority':
             $mod = $value > 0 ? '+' : '-';
             $image = '<img src="' . w2PfindImage('icons/priority' . $mod . abs($value) . '.gif') . '" width="13" height="16" alt="">';
             $cell = $value != 0 ? $image : '';
             break;
         case '_complete':
         case '_assignment':
         case '_allocated':
         case '_allocation':
             $cell = round($value) . '%';
             break;
         case '_password':
             $cell = '(' . $this->AppUI->_('hidden') . ')';
             break;
         case '_version':
             $value = (int) (100 * $value);
             $cell = number_format($value / 100, 2);
             break;
         case '_identifier':
             $additional = 'style="background-color:#' . $value . '; color:' . bestColor($value) . '" ';
             $cell = $this->tableRowData['project_percent_complete'] . '%';
             break;
         case '_project':
             $module = substr($suffix, 1);
             $class = 'C' . ucfirst($module);
             $obj = new $class();
             $obj->load($value);
             $color = $obj->project_color_identifier;
             $link = '?m=' . w2p_pluralize($module) . '&a=view&' . $module . '_id=' . $value;
             $cell = '<span style="background-color:#' . $color . '; padding: 3px"><a href="' . $link . '" style="color:' . bestColor($color) . '">' . $obj->{"{$module}" . '_name'} . '</a></span>';
             $suffix .= ' _name';
             break;
         case '_assignees':
             $cell = $value;
             break;
         case '_problem':
             if ($value) {
                 $cell = '<a href="?m=tasks&a=index&f=all&project_id=' . $this->tableRowData['project_id'] . '">';
                 $cell .= w2PshowImage('icons/dialog-warning5.png', 16, 16, 'Problem', 'Problem');
                 $cell .= '</a>';
             } else {
                 $cell = '-';
             }
             break;
         default:
             $value = isset($custom[$fieldName]) ? $custom[$fieldName][$value] : $value;
             $cell = htmlspecialchars($value, ENT_QUOTES);
     }
     $begin = '<td ' . $additional . 'class="' . $suffix . '">';
     $end = '</td>';
     return $begin . $cell . $end;
 }
コード例 #12
0
				<input type="hidden" name="rm" value="0" />
				<input type="hidden" name="store" value="0" />
				<input type="hidden" name="dosql" value="do_task_assign_aed" />
				<input type="hidden" name="user_id" value="' . $user_id . '" />
				<input type="hidden" name="hassign" />
				<input type="hidden" name="htasks" />
				<tr>';
    $tmpuser .= '<td bgcolor="#D0D0D0"><input onclick="javascript:checkAll(' . $user_id . ');" type="checkbox" name="master" value="true"/></td>
				<td colspan="2" align="left" nowrap="nowrap" bgcolor="#D0D0D0">
				<font color="black">
				<b><a href="index.php?m=calendar&a=day_view&user_id=' . $user_id . '&tab=1">' . $AppUI->_('Orphaned Tasks') . '</a></b></font></td>';
    for ($w = 0; $w <= 4 + weekCells($display_week_hours, $sss, $sse); $w++) {
        $tmpuser .= '<td bgcolor="#D0D0D0"></td>';
    }
    $tmpuser .= '<td bgcolor="#D0D0D0"><table width="100%"><tr>';
    $tmpuser .= '<td align="left">' . '<a href="javascript:chAssignment(' . $user_id . ', 0, 0);">' . w2PshowImage('add.png', 16, 16, 'Assign Users', 'Assign selected Users to selected Tasks', 'tasks') . '</a></td>';
    $tmpuser .= '<td align="center"><select class="text" name="percentage_assignment" title="' . $AppUI->_('Assign with Percentage') . '">';
    for ($i = 0; $i <= 100; $i += 5) {
        $tmpuser .= '<option ' . ($i == 30 ? 'selected="true"' : '') . ' value="' . $i . '">' . $i . '%</option>';
    }
    $tmpuser .= '</select></td>';
    $tmpuser .= '<td align="center">' . arraySelect($taskPriority, 'task_priority', 'onchange="javascript:chPriority(' . $user_id . ');" size="1" class="text" title="' . $AppUI->_('Change Priority of selected Tasks') . '"', 0, true);
    $tmpuser .= '</td></tr></table></td>';
    $tmpuser .= '</tr>';
    $orphTasks = array_diff(array_map('getOrphanedTasks', $task_list), array(null));
    $tmptasks = '';
    $actual_date = $start_date;
    $zi = 0;
    foreach ($orphTasks as $task) {
        $tmptasks .= displayTask($orphTasks, $task, 0, $display_week_hours, $sss, $sse, $user_id);
    }
コード例 #13
0
ファイル: header.php プロジェクト: joly/web2project
			<tr>
				<td><?php 
    echo $AppUI->_('Welcome') . ' ' . ($AppUI->user_id > 0 ? $AppUI->user_first_name . ' ' . $AppUI->user_last_name . '. ' . $AppUI->_('Server time is') . ' ' . date($df) : $outsider);
    ?>
</td>
			</tr>
			</table>
		</td>
<?php 
    if ($AppUI->user_id > 0) {
        //Just show this stuff if there is a user logged in
        ?>
		<td width="170" valign="middle" nowrap="nowrap"><table><tr><form name="frm_search" action="?m=smartsearch" method="POST" accept-charset="utf-8"><td>
             	     <?php 
        if ($perms->checkModule('smartsearch', 'access')) {
            echo w2PshowImage('search.png');
            ?>
&nbsp;<input class="text" size="20" type="text" id="keyword" name="keyword" value="<?php 
            echo $AppUI->_('Global Search') . '...';
            ?>
" onclick="document.frm_search.keyword.value=''" onblur="document.frm_search.keyword.value='<?php 
            echo $AppUI->_('Global Search') . '...';
            ?>
'" />
             	     <?php 
        } else {
            echo '&nbsp;';
        }
        ?>
 
        </td></form></tr></table></td>
コード例 #14
0
 protected function _buildCells($array = array())
 {
     $cells = '';
     /**
      * Note: We can't refactor the actual td/class stuff out to the return statement because we may have multiple
      *   inserted cells processed together.. and we need them to remain separate cells.
      */
     foreach ($array as $type => $value) {
         switch ($type) {
             case 'edit':
                 // @note This module determination *only* works if you've followed our naming conventions.
                 $pieces = explode('_', $value);
                 $module = w2p_pluralize($pieces[0]);
                 $contents = '<td class="_' . $type . '">';
                 $contents .= '<a href="./index.php?m=' . $module . '&a=addedit&' . $value . '=' . $this->tableRowData[$value] . '">' . w2PshowImage('icons/stock_edit-16.png', '16', '16') . '</a>';
                 $contents .= '</td>';
                 break;
             case 'select':
                 $contents = '<td class="_' . $type . '">';
                 $contents .= '<input type="checkbox" value="' . $this->tableRowData[$value] . '" name="' . $value . '[]" />';
                 $contents .= '</td>';
                 break;
             case 'log':
                 $pieces = explode('_', $value);
                 $module = w2p_pluralize($pieces[0]);
                 $contents = '<td class="_' . $type . '">';
                 $contents .= '<a href="./index.php?m=' . $module . '&a=view&tab=1&' . $value . '=' . $this->tableRowData[$value] . '">' . w2PshowImage('icons/edit_add.png', '16', '16') . '</a>';
                 $contents .= '</td>';
                 break;
             case 'pin':
                 $image = $this->tableRowData['task_pinned'] ? 'pin.gif' : 'unpin.gif';
                 $pieces = explode('_', $value);
                 $module = w2p_pluralize($pieces[0]);
                 $contents = '<td class="_' . $type . '">';
                 $contents .= '<a href="./index.php?m=' . $module . '&pin=1&' . $value . '=' . $this->tableRowData[$value] . '">' . w2PshowImage('icons/' . $image, '16', '16') . '</a>';
                 $contents .= '</td>';
                 break;
             case 'url':
                 $contents = '<td class="_' . $type . '">';
                 $contents .= '<a href="' . $this->tableRowData[$value] . '" target="_blank">' . w2PshowImage('forward.png', '16', '16') . '</a>';
                 $contents .= '</td>';
                 break;
             case 'watch':
                 $contents = '<td class="_' . $type . '">';
                 $contents .= '<input type="checkbox" name="forum_' . $this->tableRowData[$value] . '"' . ($this->tableRowData['watch_user'] ? 'checked="checked"' : '') . ' />';
                 $contents .= '</td>';
                 break;
             default:
                 $contents = '<td></td>';
         }
         $cells .= $contents;
     }
     return $cells;
 }
コード例 #15
0
                $s .= '<a href="?m=projects&a=view&project_id=' . $row['link_project'] . '">' . $row['project_name'] . '</a>';
            } else {
                $s .= $row['project_name'];
            }
            $s .= '</font>';
            $s .= '</td></tr>';
            echo $s;
        }
    }
    $fp = $row['link_project'];
    ?>
<tr>
	<td nowrap="nowrap" width="20">
	<?php 
    if ($canEdit) {
        echo '<a href="./index.php?m=' . $m . '&a=addedit&link_id=' . $row['link_id'] . '">' . w2PshowImage('icons/stock_edit-16.png', '16', '16') . '</a>';
    }
    ?>
	</td>
	<td nowrap="8%">
		<?php 
    echo '<a href="' . $row['link_url'] . '" target="_blank">' . $row['link_name'] . '</a>';
    ?>
	</td>
	<td width="20%"><?php 
    echo $row['link_description'];
    ?>
</td>
        <td width="10%" nowrap="nowrap" align="center"><?php 
    echo $link_types[$row['link_category']];
    ?>
コード例 #16
0
ファイル: vw_usr.php プロジェクト: viniciusbudines/sisnuss
        if (empty($user_display)) {
            $user_display = $row['user_username'];
        }
        ?>
				<a href="javascript:delMe(<?php 
        echo $row['user_id'];
        ?>
, '<?php 
        echo $user_display;
        ?>
')" title="<?php 
        echo $AppUI->_('delete');
        ?>
">
					<?php 
        echo w2PshowImage('icons/stock_delete-16.png', 16, 16, '');
        ?>
				</a>
			</td>
		</tr>
		</table>
<?php 
    }
    ?>
	</td>
	<?php 
    if (w2PgetParam($_REQUEST, 'tab', 0) == 0) {
        ?>
	<td>
	       <?php 
        $q = new w2p_Database_Query();
コード例 #17
0
function showRow($id = '', $key = 0, $title = '', $value = '')
{
    global $canEdit, $sysval_id, $AppUI, $keys;
    global $fixedSysVals;
    $s = '';
    if ($sysval_id == $title && $canEdit) {
        // edit form
        $s .= '<tr><td><input type="hidden" name="sysval_id" value="' . $title . '" />&nbsp;</td>';
        $s .= '<td valign="top"><a name="' . $title . '"> </a>' . arraySelect($keys, 'sysval_key_id', 'size="1" class="text"', $key) . '</td>';
        $s .= '<td valign="top"><input type="text" name="sysval_title" value="' . w2PformSafe($title) . '" class="text" /></td>';
        $s .= '<td valign="top"><textarea name="sysval_value" class="small" rows="5" cols="40">' . $value . '</textarea></td>';
        $s .= '<td><input type="submit" value="' . $AppUI->_($id ? 'save' : 'add') . '" class="button" /></td><td>&nbsp;</td>';
    } else {
        $s = '<tr><td width="12" valign="top">';
        if ($canEdit) {
            $s .= '<a href="?m=system&u=syskeys&sysval_id=' . $title . '#' . $title . '" title="' . $AppUI->_('edit') . '">' . w2PshowImage('icons/stock_edit-16.png', 16, 16, '') . '</a></td>';
        }
        $s .= '<td valign="top">' . $keys[$key] . '</td>';
        $s .= '<td valign="top">' . w2PformSafe($title) . '</td>';
        $s .= '<td valign="top" colspan="2">' . $value . '</td>';
        $s .= '<td valign="top" width="16">';
        if ($canEdit && !in_array($title, $fixedSysVals)) {
            $s .= '<a href="javascript:delIt(\'' . $title . '\')" title="' . $AppUI->_('delete') . '">' . w2PshowImage('icons/stock_delete-16.png', 16, 16, '') . '</a>';
        }
        $s .= '</td>';
    }
    $s .= '</tr>';
    return $s;
}
コード例 #18
0
 /**
  * The drawing function
  */
 public function show()
 {
     global $AppUI, $a, $m, $tab, $infotab;
     $this->loadExtraCrumbs($m, $a);
     $uistyle = $AppUI->getPref('UISTYLE') ? $AppUI->getPref('UISTYLE') : $w2Pconfig['host_style'];
     if (!$uistyle) {
         $uistyle = 'web2project';
     }
     $s = '<table width="100%" border="0" cellpadding="1" cellspacing="1"><tr>';
     if ($this->icon) {
         $s .= '<td width="42">';
         $s .= w2PshowImage($this->icon, '', '', '', '', $this->module);
         $s .= '</td>';
     }
     $s .= '<td align="left" width="100%" nowrap="nowrap"><h1>' . $AppUI->_($this->title) . '</h1></td>';
     foreach ($this->cells1 as $c) {
         $s .= $c[2] ? $c[2] : '';
         $s .= '<td align="right" nowrap="nowrap"' . ($c[0] ? ' ' . $c[0] : '') . '>';
         $s .= $c[1] ? $c[1] : '&nbsp;';
         $s .= '</td>';
         $s .= $c[3] ? $c[3] : '';
     }
     $s .= '</tr></table>';
     if (count($this->crumbs) || count($this->cells2)) {
         $crumbs = array();
         $class = 'crumb';
         foreach ($this->crumbs as $k => $v) {
             $t = $v[1] ? '<img src="' . w2PfindImage($v[1], $this->module) . '" border="" alt="" />&nbsp;' : '';
             $t .= $AppUI->_($v[0]);
             $crumbs[] = '<li><a href="' . $k . '"><span>' . $t . '</span></a></li>';
         }
         $s .= '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>';
         $s .= '<td height="20" nowrap="nowrap"><div class="' . $class . '"><ul>';
         $s .= implode('', $crumbs);
         $s .= '</ul></div></td>';
         foreach ($this->cells2 as $c) {
             $s .= $c[2] ? $c[2] : '';
             $s .= '<td align="right" nowrap="nowrap" ' . ($c[0] ? " {$c['0']}" : '') . '>';
             $s .= $c[1] ? $c[1] : '&nbsp;';
             $s .= '</td>';
             $s .= $c[3] ? $c[3] : '';
         }
         $s .= '</tr></table>';
     }
     echo '' . $s;
     if (($a != 'index' || $m == 'system' || $m == 'calendar' || $m == 'smartsearch') && !$AppUI->boxTopRendered && function_exists('styleRenderBoxTop')) {
         echo styleRenderBoxTop();
         $AppUI->boxTopRendered = true;
     }
 }
コード例 #19
0
ファイル: tasks.class.php プロジェクト: joly/web2project
function showtask(&$arr, $level = 0, $is_opened = true, $today_view = false, $hideOpenCloseLink = false, $allowRepeat = false)
{
    global $AppUI, $query_string, $durnTypes, $userAlloc, $showEditCheckbox;
    global $m, $a, $history_active, $expanded;
    //Check for Tasks Access
    $canAccess = canTaskAccess($arr['task_id'], $arr['task_access'], $arr['task_owner']);
    if (!$canAccess) {
        return false;
    }
    $now = new CDate();
    $tf = $AppUI->getPref('TIMEFORMAT');
    $df = $AppUI->getPref('SHDATEFORMAT');
    $perms =& $AppUI->acl();
    $fdf = $df . ' ' . $tf;
    $show_all_assignees = w2PgetConfig('show_all_task_assignees', false);
    $start_date = intval($arr['task_start_date']) ? new CDate($arr['task_start_date']) : null;
    $end_date = intval($arr['task_end_date']) ? new CDate($arr['task_end_date']) : null;
    $last_update = isset($arr['last_update']) && intval($arr['last_update']) ? new CDate($arr['last_update']) : null;
    // prepare coloured highlight of task time information
    $sign = 1;
    $style = '';
    if ($start_date) {
        if (!$end_date) {
            /*
             ** end date calc has been moved to calcEndByStartAndDuration()-function
             ** called from array_csort and tasks.php
             ** perhaps this fallback if-clause could be deleted in the future,
             ** didn't want to remove it shortly before the 2.0.2
             */
            $end_date = new CDate('0000-00-00 00:00:00');
        }
        if ($now->after($start_date) && $arr['task_percent_complete'] == 0) {
            $style = 'background-color:#ffeebb';
        } elseif ($now->after($start_date) && $arr['task_percent_complete'] < 100) {
            $style = 'background-color:#e6eedd';
        }
        if ($now->after($end_date)) {
            $sign = -1;
            $style = 'background-color:#cc6666;color:#ffffff';
        }
        if ($arr['task_percent_complete'] == 100) {
            $style = 'background-color:#aaddaa; color:#00000';
        }
        $days = $now->dateDiff($end_date) * $sign;
    }
    //     $s = "\n<tr id=\"project_".$arr['task_project'].'_level>'.$level.'<task_'.$arr['task_id']."_\" ".((($level>0 && !($m=='tasks' && $a=='view')) || ($m=='tasks' && ($a=='' || $a=='index'))) ? 'style="display:none"' : '').'>';
    if ($expanded) {
        $s = '<tr id="project_' . $arr['task_project'] . '_level>' . $level . '<task_' . $arr['task_id'] . '_" >';
    } else {
        $s = '<tr id="project_' . $arr['task_project'] . '_level>' . $level . '<task_' . $arr['task_id'] . '_" ' . ($level > 0 && !($m == 'tasks' && $a == 'view') ? 'style="display:none"' : '') . '>';
    }
    // edit icon
    $s .= '<td align="center">';
    $canEdit = true;
    $canViewLog = true;
    if ($canEdit) {
        $s .= w2PtoolTip('edit task', 'click to edit this task') . '<a href="?m=tasks&a=addedit&task_id=' . $arr['task_id'] . '">' . w2PshowImage('icons/pencil.gif', 12, 12) . '</a>' . w2PendTip();
    }
    $s .= '</td>';
    // pinned
    $pin_prefix = $arr['task_pinned'] ? '' : 'un';
    $s .= '<td align="center"><a href="?m=tasks&pin=' . ($arr['task_pinned'] ? 0 : 1) . '&task_id=' . $arr['task_id'] . '">' . w2PtoolTip('Pin', 'pin/unpin task') . '<img src="' . w2PfindImage('icons/' . $pin_prefix . 'pin.gif') . '" border="0" />' . w2PendTip() . '</a></td>';
    // New Log
    if ($arr['task_log_problem'] > 0) {
        $s .= '<td align="center" valign="middle"><a href="?m=tasks&a=view&task_id=' . $arr['task_id'] . '&tab=0&problem=1">' . w2PshowImage('icons/dialog-warning5.png', 16, 16, 'Problem', 'Problem!') . '</a></td>';
    } elseif ($canViewLog && $arr['task_dynamic'] != 1) {
        $s .= '<td align="center"><a href="?m=tasks&a=view&task_id=' . $arr['task_id'] . '&tab=1">' . w2PtoolTip('Add Log', 'create a new log record against this task') . w2PshowImage('edit_add.png') . w2PendTip() . '</a></td>';
    } else {
        $s .= '<td align="center">' . $AppUI->_('-') . '</td>';
    }
    // percent complete and priority
    $s .= '<td align="right">' . intval($arr['task_percent_complete']) . '%</td><td align="center" nowrap="nowrap">';
    if ($arr['task_priority'] < 0) {
        $s .= '<img src="' . w2PfindImage('icons/priority-' . -$arr['task_priority'] . '.gif') . '" />';
    } elseif ($arr['task_priority'] > 0) {
        $s .= '<img src="' . w2PfindImage('icons/priority+' . $arr['task_priority'] . '.gif') . '" />';
    }
    $s .= ($arr['file_count'] > 0 ? '<img src="' . w2PfindImage('clip.png') . '" alt="F" />' : '') . '</td>';
    // dots
    $s .= '<td width="' . ($today_view ? '50%' : '90%') . '">';
    //level
    if ($level == -1) {
        $s .= '...';
    }
    for ($y = 0; $y < $level; $y++) {
        if ($y + 1 == $level) {
            $s .= '<img src="' . w2PfindImage('corner-dots.gif') . '" width="16" height="12" border="0">';
        } else {
            $s .= '<img src="' . w2PfindImage('shim.gif') . '" width="16" height="12"  border="0">';
        }
    }
    if ($arr['task_description']) {
        $s .= w2PtoolTip('Task Description', $arr['task_description'], true);
    }
    $open_link = '<a href="javascript: void(0);"><img onclick="expand_collapse(\'project_' . $arr['task_project'] . '_level>' . $level . '<task_' . $arr['task_id'] . '_\', \'tblProjects\',\'\',' . ($level + 1) . ');" id="project_' . $arr['task_project'] . '_level>' . $level . '<task_' . $arr['task_id'] . '__collapse" src="' . w2PfindImage('icons/collapse.gif') . '" border="0" align="center" ' . (!$expanded ? 'style="display:none"' : '') . ' /><img onclick="expand_collapse(\'project_' . $arr['task_project'] . '_level>' . $level . '<task_' . $arr['task_id'] . '_\', \'tblProjects\',\'\',' . ($level + 1) . ');" id="project_' . $arr['task_project'] . '_level>' . $level . '<task_' . $arr['task_id'] . '__expand" src="' . w2PfindImage('icons/expand.gif') . '" border="0" align="center" ' . ($expanded ? 'style="display:none"' : '') . ' /></a>';
    if ($arr['task_nr_of_children']) {
        $is_parent = true;
    } else {
        $is_parent = false;
    }
    if ($arr['task_milestone'] > 0) {
        $s .= '&nbsp;<a href="./index.php?m=tasks&a=view&task_id=' . $arr['task_id'] . '" ><b>' . $arr['task_name'] . '</b></a> <img src="' . w2PfindImage('icons/milestone.gif') . '" border="0" /></td>';
    } elseif ($arr['task_dynamic'] == '1' || $is_parent) {
        if (!$today_view) {
            $s .= $open_link;
        }
        if ($arr['task_dynamic'] == '1') {
            $s .= '&nbsp;<a href="./index.php?m=tasks&a=view&task_id=' . $arr['task_id'] . '" ><b><i>' . $arr['task_name'] . '</i></b></a></td>';
        } else {
            $s .= '&nbsp;<a href="./index.php?m=tasks&a=view&task_id=' . $arr['task_id'] . '" >' . $arr['task_name'] . '</a></td>';
        }
    } else {
        $s .= '&nbsp;<a href="./index.php?m=tasks&a=view&task_id=' . $arr['task_id'] . '" >' . $arr['task_name'] . '</a></td>';
    }
    if ($arr['task_description']) {
        $s .= w2PendTip();
    }
    if ($today_view) {
        // Show the project name
        $s .= '<td width="50%"><a href="./index.php?m=projects&a=view&project_id=' . $arr['task_project'] . '">' . '<span style="padding:2px;background-color:#' . $arr['project_color_identifier'] . ';color:' . bestColor($arr['project_color_identifier']) . '">' . $arr['project_name'] . '</span>' . '</a></td>';
    }
    // task owner
    if (!$today_view) {
        $s .= '<td nowrap="nowrap" align="center">' . '<a href="?m=admin&a=viewuser&user_id=' . $arr['user_id'] . '">' . $arr['owner'] . '</a>' . '</td>';
    }
    if (isset($arr['task_assigned_users']) && ($assigned_users = $arr['task_assigned_users'])) {
        $a_u_tmp_array = array();
        if ($show_all_assignees) {
            $s .= '<td align="center">';
            foreach ($assigned_users as $val) {
                $a_u_tmp_array[] = '<a href="?m=admin&a=viewuser&user_id=' . $val['user_id'] . '"' . 'title="' . (w2PgetConfig('check_overallocation') ? $AppUI->_('Extent of Assignment') . ':' . $userAlloc[$val['user_id']]['charge'] . '%; ' . $AppUI->_('Free Capacity') . ':' . $userAlloc[$val['user_id']]['freeCapacity'] . '%' : '') . '">' . $val['assignee'] . ' (' . $val['perc_assignment'] . '%)</a>';
            }
            $s .= join(', ', $a_u_tmp_array) . '</td>';
        } else {
            $s .= '<td align="center" nowrap="nowrap">' . '<a href="?m=admin&a=viewuser&user_id=' . $assigned_users[0]['user_id'] . '" title="' . (w2PgetConfig('check_overallocation') ? $AppUI->_('Extent of Assignment') . ':' . $userAlloc[$assigned_users[0]['user_id']]['charge'] . '%; ' . $AppUI->_('Free Capacity') . ':' . $userAlloc[$assigned_users[0]['user_id']]['freeCapacity'] . '%' : '') . '">' . $assigned_users[0]['assignee'] . ' (' . $assigned_users[0]['perc_assignment'] . '%)</a>';
            if ($arr['assignee_count'] > 1) {
                $s .= ' <a href="javascript: void(0);" onclick="toggle_users(' . "'users_" . $arr['task_id'] . "'" . ');" title="' . join(', ', $a_u_tmp_array) . '">(+' . ($arr['assignee_count'] - 1) . ')</a>' . '<span style="display: none" id="users_' . $arr['task_id'] . '">';
                $a_u_tmp_array[] = $assigned_users[0]['assignee'];
                for ($i = 1, $i_cmp = count($assigned_users); $i < $i_cmp; $i++) {
                    $a_u_tmp_array[] = $assigned_users[$i]['assignee'];
                    $s .= '<br /><a href="?m=admin&a=viewuser&user_id=' . $assigned_users[$i]['user_id'] . '" title="' . (w2PgetConfig('check_overallocation') ? $AppUI->_('Extent of Assignment') . ':' . $userAlloc[$assigned_users[$i]['user_id']]['charge'] . '%; ' . $AppUI->_('Free Capacity') . ':' . $userAlloc[$assigned_users[$i]['user_id']]['freeCapacity'] . '%' : '') . '">' . $assigned_users[$i]['assignee'] . ' (' . $assigned_users[$i]['perc_assignment'] . '%)</a>';
                }
                $s .= '</span>';
            }
            $s .= '</td>';
        }
    } elseif (!$today_view) {
        // No users asigned to task
        $s .= '<td align="center">-</td>';
    }
    // duration or milestone
    $s .= '<td nowrap="nowrap" align="center" style="' . $style . '">' . ($start_date ? $start_date->format($fdf) : '-') . '</td>' . '<td align="right" nowrap="nowrap" style="' . $style . '">' . $arr['task_duration'] . ' ' . mb_substr($AppUI->_($durnTypes[$arr['task_duration_type']]), 0, 1) . '</td>' . '<td nowrap="nowrap" align="center" style="' . $style . '">' . ($end_date ? $end_date->format($fdf) : '-') . '</td>';
    if ($today_view) {
        $s .= '<td nowrap="nowrap" align="center" style="' . $style . '">' . $arr['task_due_in'] . '</td>';
    } elseif ($history_active) {
        $s .= '<td nowrap="nowrap" align="center" style="' . $style . '">' . ($last_update ? $last_update->format($fdf) : '-') . '</td>';
    }
    // Assignment checkbox
    if ($showEditCheckbox) {
        $s .= '<td align="center">' . '<input type="checkbox" name="selected_task[' . $arr['task_id'] . ']" value="' . $arr['task_id'] . '"/></td>';
    }
    $s .= '</tr>';
    echo $s;
}
コード例 #20
0
function showtask_pr_ed(&$arr, $level = 0, $today_view = false)
{
    global $AppUI, $done;
    //Check for Tasks Access
    $tmpTask = new CTask();
    $tmpTask->load($arr['task_id']);
    $canAccess = $tmpTask->canAccess();
    if (!$canAccess) {
        return false;
    }
    $htmlHelper = new w2p_Output_HTMLHelper($AppUI);
    $htmlHelper->df .= ' ' . $AppUI->getPref('TIMEFORMAT');
    $done[] = $arr['task_id'];
    $s = '<tr>';
    // dots
    $s .= '<td style="width: ' . ($today_view ? '20%' : '50%') . '" class="data _name">';
    for ($y = 0; $y < $level; $y++) {
        if ($y + 1 == $level) {
            $image = w2PfindImage('corner-dots.gif', $m);
        } else {
            $image = w2PfindImage('shim.gif', $m);
        }
        $s .= '<img src="' . $image . '" width="16" height="12"  border="0" alt="" />';
    }
    // name link
    $alt = mb_strlen($arr['task_description']) > 80 ? mb_substr($arr['task_description'], 0, 80) . '...' : $arr['task_description'];
    // instead of the statement below
    $alt = mb_str_replace('"', "&quot;", $alt);
    $alt = mb_str_replace("\r", ' ', $alt);
    $alt = mb_str_replace("\n", ' ', $alt);
    $open_link = w2PshowImage('collapse.gif');
    if ($arr['task_milestone'] > 0) {
        $s .= '&nbsp;<b>' . $arr["task_name"] . '</b><!--</a>--> <img src="' . w2PfindImage('icons/milestone.gif', $m) . '" border="0" alt="" />';
    } elseif ($arr['task_dynamic'] == '1') {
        $s .= $open_link;
        $s .= '<strong>' . $arr['task_name'] . '</strong>';
    } else {
        $s .= $arr['task_name'];
    }
    $s .= '</td>';
    $s .= $htmlHelper->createCell('task_percent_complete', $arr['task_percent_complete']);
    $s .= $htmlHelper->createCell('task_start_date', $arr['task_start_date']);
    $s .= $htmlHelper->createCell('task_end_date', $arr['task_end_date']);
    $s .= $htmlHelper->createCell('last_update', $arr['last_update']);
    $s .= '</tr>';
    return $s;
}
コード例 #21
0
        $perm_type = array();
        if (is_array($permission['aco'])) {
            foreach ($permission['aco'] as $key => $section) {
                foreach ($section as $value) {
                    $perm = $perms->get_object_full($value, $key, 1, 'aco');
                    $perm_type[] = $AppUI->_($perm['name']);
                }
            }
        }
        $buf .= implode('<br />', $perm_type);
        $buf .= '</td>';
        // Allow or deny
        $buf .= '<td>' . $AppUI->_($permission['allow'] ? 'allow' : 'deny') . '</td>';
        $buf .= '<td nowrap="nowrap">';
        if ($canDelete) {
            $buf .= "<a href=\"javascript:delIt({$acl});\" title=\"" . $AppUI->_('delete') . "\">" . w2PshowImage('icons/stock_delete-16.png', 16, 16, '') . "</a>";
        }
        $buf .= '</td>';
        echo '<tr>' . $buf . '</tr>';
    }
}
?>
            </table>
        </td>
        <td width="50%" valign="top">
            <?php 
if ($canEdit) {
    ?>
            <form name="frmPerms" method="post" action="?m=system&amp;u=roles" accept-charset="utf-8">
                <input type="hidden" name="del" value="0" />
                <input type="hidden" name="dosql" value="do_perms_aed" />
コード例 #22
0
     if ($canEdit || $AppUI->user_id == $row['forum_moderated'] || $AppUI->user_id == $row['message_author'] || $canAdminEdit) {
         $tableOpened = true;
         $s .= '<table cellspacing="0" cellpadding="0" border="0"><tr>';
         // edit message
         $s .= '<td><a href="./index.php?m=forums&a=viewer&post_message=1&forum_id=' . $row['message_forum'] . '&message_parent=' . $row['message_parent'] . '&message_id=' . $row["message_id"] . '" title="' . $AppUI->_('Edit') . ' ' . $AppUI->_('Message') . '">';
         $s .= w2PshowImage('icons/stock_edit-16.png', '16', '16');
         $s .= '</td>';
     }
     if ($canDelete || $AppUI->user_id == $row['forum_moderated'] || $AppUI->user_id == $row['message_author'] || $canAdminEdit) {
         $tableClosed = true;
         if (!$tableOpened) {
             $s .= '<table cellspacing="0" cellpadding="0" border="0"><tr>';
         }
         // delete message
         $s .= '<td><a href="javascript:delIt(' . $row['message_id'] . ')" title="' . $AppUI->_('delete') . '">';
         $s .= w2PshowImage('icons/stock_delete-16.png', '16', '16');
         $s .= '</a>';
         $s .= '</td></tr></table>';
     }
     if ($tableOpened and !$tableClosed) {
         $s .= '</tr></table>';
     }
     $s .= '</td>';
     $s .= '</tr>';
 } else {
     if ($viewtype == 'short') {
         $s .= "<tr>";
         $s .= '<td valign="top" style="' . $style . '" >';
         $s .= '<a href="mailto:' . $row['contact_email'] . '">';
         $s .= '<font size="2">' . $row['contact_name'] . ' ' . $row['contact_name'] . '</font></a>';
         $s .= ' (' . $AppUI->formatTZAwareTime($row['message_date'], $df . ' ' . $tf) . ') ';
コード例 #23
0
            if (strpos($c['config_name'], '_pass') !== false) {
                $c['config_type'] = 'password';
                $value = str_repeat('x', strlen($value));
                $entry = '<input class="text" type="password" name="w2Pcfg[' . $c['config_name'] . ']" value="' . $value . '" ' . $extra . ' onClick="document.getElementById(\'' . $c['config_name'] . '_mod\').value=\'1\';" />';
                $entry .= '<input type="hidden" name="' . $c['config_name'] . '_mod" id="' . $c['config_name'] . '_mod" value="" />';
            } else {
                $entry = '<input class="text" type="' . $c['config_type'] . '" name="w2Pcfg[' . $c['config_name'] . ']" id="w2Pcfg[' . $c['config_name'] . ']" value="' . $value . '" ' . $extra . '/>';
            }
            break;
    }
    if ($c['config_group'] != $last_group) {
        $output .= '<tr><td colspan="2"><b>' . $AppUI->_($c['config_group'] . '_group_title') . '</b></td></tr>';
        $last_group = $c['config_group'];
    }
    $output .= '<tr>
                    <td class="item" width="20%"><a name="' . $c['config_name'] . '"> </a>' . $AppUI->_($c['config_name'] . '_title') . '</td>' . '<td align="left" width="5%">' . $entry . '<input class="button" type="hidden"  name="w2PcfgId[' . $c['config_name'] . ']" value="' . $c['config_id'] . '" />' . '</td>' . '<td align="left" width="16">' . w2PtoolTip($AppUI->_($c['config_name'] . '_title'), $tooltip, true) . w2PshowImage('log-info.gif') . w2PendTip() . '</td>
                    <td align="left" width="100%">&nbsp;</td>
                </tr>';
}
?>
<form name="cfgFrm" action="index.php?m=system&a=systemconfig" method="post" accept-charset="utf-8">
	<input type="hidden" name="dosql" value="do_systemconfig_aed" />
	<table cellspacing="0" cellpadding="3" border="0" class="std" width="100%" align="center">
		<tr><td colspan="4"><?php 
echo $AppUI->_('syscfg_intro');
?>
</td></tr>
		<?php 
echo $output;
?>
		<tr>
コード例 #24
0
 /**
  * Display the formatted message and icon
  * @param boolean If true the current message state is cleared.
  */
 public function getMsg($reset = true)
 {
     $msg = $this->msg;
     $class = 'message';
     switch ($this->msgNo) {
         case UI_MSG_ALERT:
             $img = w2PshowImage('rc-gui-status-downgr.png');
             break;
         case UI_MSG_WARNING:
             $img = w2PshowImage('rc-gui-status-downgr.png');
             $class = 'warning';
             break;
         case UI_MSG_ERROR:
             $img = w2PshowImage('stock_cancel-16.png');
             $class = 'error';
             break;
         case UI_MSG_OK:
         default:
             $img = w2PshowImage('stock_ok-16.png');
             break;
     }
     if ($reset) {
         $this->msg = '';
         $this->msgNo = 0;
     }
     return $msg ? '<table cellspacing="0" cellpadding="1" border="0"><tr>' . '<td>' . $img . '</td>' . '<td class="' . $class . '">' . $msg . '</td>' . '</tr></table>' : '';
 }
コード例 #25
0
ファイル: index.php プロジェクト: viniciusbudines/sisnuss
        ?>
" style="float: right;"><?php 
        echo w2PtoolTip($m, 'edit this contact') . w2PshowImage('icons/pencil.gif') . w2PendTip();
        ?>
</a>
													<?php 
        $projectList = CContact::getProjects($contactid);
        $df = $AppUI->getPref('SHDATEFORMAT');
        $df .= ' ' . $AppUI->getPref('TIMEFORMAT');
        $contact_updatekey = $carr[$z][$x]['contact_updatekey'];
        $contact_lastupdate = $carr[$z][$x]['contact_lastupdate'];
        $contact_updateasked = $carr[$z][$x]['contact_updateasked'];
        $last_ask = new w2p_Utilities_Date($contact_updateasked);
        $lastAskFormatted = $last_ask->format($df);
        if (count($projectList) > 0) {
            echo '<a href="" onclick="	window.open(\'./index.php?m=public&a=selector&dialog=1&callback=goProject&table=projects&user_id=' . $carr[$z][$x]['contact_id'] . '\', \'selector\', \'left=50,top=50,height=250,width=400,resizable\');return false;">' . w2PshowImage('projects.png', '', '', $m, 'click to view projects associated with this contact') . '</a>';
        }
        if ($contact_updateasked && (!$contact_lastupdate || $contact_lastupdate == 0) && $contact_updatekey) {
            echo w2PtoolTip('info', 'Waiting for Contact Update Information. (Asked on: ' . $lastAskFormatted . ')') . '<img src="' . w2PfindImage('log-info.gif') . '" style="float: right;">' . w2PendTip();
        } elseif ($contact_updateasked && (!$contact_lastupdate || $contact_lastupdate == 0) && !$contact_updatekey) {
            echo w2PtoolTip('info', 'Waiting for too long! (Asked on ' . $lastAskFormatted . ')') . '<img src="' . w2PfindImage('log-error.gif') . '" style="float: right;">' . w2PendTip();
        } elseif ($contact_updateasked && !$contact_updatekey) {
            $last_ask = new w2p_Utilities_Date($contact_lastupdate);
            echo w2PtoolTip('info', 'Update sucessfully done on: ' . $last_ask->format($df) . '') . '<img src="' . w2PfindImage('log-notice.gif') . '" style="float: right;">' . w2PendTip();
        }
        ?>
                                                    </span>
												</th>
											</table>
										</td>
									</tr>
コード例 #26
0
    foreach ($logs as $row) {
        $s .= '<tr bgcolor="white" valign="top"><td>';
        if ($canEdit) {
            $s .= '<a href="?m=tasks&a=view&task_id=' . $task_id . '&tab=';
            $s .= $tab == -1 ? $AppUI->getState('TaskLogVwTab') : '1';
            $s .= '&task_log_id=' . $row['task_log_id'] . '">' . w2PshowImage('icons/stock_edit-16.png', 16, 16, '') . '</a>';
        }
        $s .= '<a name="tasklog' . $row['task_log_id'] . '"></a>';
        $s .= '</td>';
        $htmlHelper->stageRowData($row);
        foreach ($fieldList as $index => $column) {
            $s .= $htmlHelper->createCell($fieldList[$index], $row[$fieldList[$index]], $customLookups);
        }
        $s .= '<td>';
        if ($canDelete) {
            $s .= '<a href="javascript:delIt2(' . $row['task_log_id'] . ');" title="' . $AppUI->_('delete log') . '">' . w2PshowImage('icons/stock_delete-16.png', 16, 16, '') . '</a>';
        }
        $s .= '</td></tr>';
        $hrs += (double) $row['task_log_hours'];
    }
}
$s .= '<tr bgcolor="white" valign="top">';
$s .= '<td colspan="6" align="right">' . $AppUI->_('Total Hours') . ' =</td>';
$s .= $htmlHelper->createCell('total_duration', sprintf('%.2f', $hrs));
$s .= '<td align="right" colspan="3">';
if ($perms->checkModuleItem('tasks', 'edit', $task_id)) {
    $s .= '<form action="?m=tasks&a=view&tab=1&task_id=' . $task_id . '" method="post" accept-charset="utf-8">';
    $s .= '<input type="submit" class="button" value="' . $AppUI->_('new log') . '"></form>';
}
$s .= '</td></tr>';
echo $s;
コード例 #27
0
ファイル: index.php プロジェクト: viniciusbudines/sisnuss
?>
    </td>
  </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 w2PshowImage('main-settings.png', 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');
?>
</a><br />
コード例 #28
0
ファイル: index.php プロジェクト: illuminate3/web2project
<?php

if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
$perms = $AppUI->acl();
// let's see if the user has sys access
if (!canEdit('system')) {
    $AppUI->redirect(ACCESS_DENIED);
}
$titleBlock = new w2p_Theme_TitleBlock($AppUI->_('Upgrade System'), 'control-center.png', $m);
$titleBlock->addCrumb('?m=system', 'system admin');
$titleBlock->show();
$failedImg = w2PshowImage('log-error.gif', 16, 16, $AppUI->_('Failed'));
$okImg = w2PshowImage('log-notice.gif', 16, 16, $AppUI->_('OK'));
$continue = true;
?>
<style>
.update td {
    font-size: medium;
}
.update img {
    float: left;
}
</style>
<table class="tbl update">
	<tr>
		<td class="title" colspan="2">Step 1: Check System Settings</td>
	</tr>
	<tr>
		<td colspan="2">
コード例 #29
0
        } elseif ($row['project_priority'] > 0) {
            $s .= '<img src="' . w2PfindImage('icons/priority+' . $row['project_priority'] . '.gif') . '"  width="13" height="16" alt="">';
        }
        $s .= '</td><td width="40%"><a href="?m=projects&a=view&project_id=' . $row['project_id'] . '" ><span title="' . (nl2br(htmlspecialchars($row['project_description'])) ? htmlspecialchars($row['project_name'], ENT_QUOTES) . '::' . nl2br(htmlspecialchars($row['project_description'])) : '') . '" >' . htmlspecialchars($row['project_name'], ENT_QUOTES) . '</span></a></td>';
        $s .= '<td width="30%"><a href="?m=companies&a=view&company_id=' . $row['project_company'] . '" ><span title="' . (nl2br(htmlspecialchars($row['company_description'])) ? htmlspecialchars($row['company_name'], ENT_QUOTES) . '::' . nl2br(htmlspecialchars($row['company_description'])) : '') . '" >' . htmlspecialchars($row['company_name'], ENT_QUOTES) . '</span></a></td>';
        $s .= '<td nowrap="nowrap" align="center">' . ($start_date ? $start_date->format($df) : '-') . '</td>';
        $s .= '<td nowrap="nowrap" align="right">' . $project->getTotalProjectHours() . $AppUI->_('h') . '</td>';
        $s .= '<td nowrap="nowrap" align="center" nowrap="nowrap" style="background-color:' . $priority[$row['project_priority']]['color'] . '">';
        $s .= $end_date ? $end_date->format($df) : '-';
        $s .= '</td><td nowrap="nowrap" align="center">';
        $s .= $actual_end_date ? '<a href="?m=tasks&a=view&task_id=' . $row['critical_task'] . '">' : '';
        $s .= $actual_end_date ? '<span ' . $style . '>' . $actual_end_date->format($df) . '</span>' : '-';
        $s .= $actual_end_date ? '</a>' : '';
        $s .= '</td><td align="center">';
        $s .= $row['task_log_problem'] ? '<a href="?m=tasks&a=index&f=all&project_id=' . $row['project_id'] . '">' : '';
        $s .= $row['task_log_problem'] ? w2PshowImage('icons/dialog-warning5.png', 16, 16, 'Problem', 'Problem') : '-';
        $s .= $row['task_log_problem'] ? '</a>' : '';
        $s .= '</td><td align="center" nowrap="nowrap">' . htmlspecialchars($row['owner_name'], ENT_QUOTES) . '</td>';
        $s .= '<td align="center" nowrap="nowrap">';
        $s .= $row['project_task_count'];
        $s .= '</td><td align="left" nowrap="nowrap">' . $AppUI->_($pstatus[$row['project_status']]) . '</td></tr>';
        echo $s;
    }
}
if ($none) {
    echo '<tr><td colspan="12">' . $AppUI->_('No projects available') . '</td></tr>';
}
?>
<tr>
	<td colspan="12">&nbsp;</td>
</tr>
コード例 #30
0
ファイル: vw_sub_projects.php プロジェクト: joly/web2project
    if ($line['project_id']) {
        $s_project = new CProject();
        $s_project->load($line['project_id']);
        $s_company = new CCompany();
        $s_company->load($s_project->project_company);
        $start_date = intval($s_project->project_start_date) ? new CDate($s_project->project_start_date) : null;
        $end_date = intval($s_project->project_end_date) ? new CDate($s_project->project_end_date) : null;
        $actual_end_date = intval($s_project->project_actual_end_date) ? new CDate($s_project->project_actual_end_date) : null;
        $style = $actual_end_date > $end_date && !empty($end_date) ? 'style="color:red; font-weight:bold"' : '';
        $x++;
        $row_class = $x % 2 ? 'style="background:#fff;"' : 'style="background:#f0f0f0;"';
        $row_classr = $x % 2 ? 'style="background:#fff;text-align:right;"' : 'style="background:#f0f0f0;text-align:right;"';
        $s .= '<tr><td ' . $row_class . ' align="center"><a href="./index.php?m=projects&a=addedit&project_id=' . $line['project_id'] . '"><img src="' . w2PfindImage('icons/' . ($project_id == $line['project_id'] ? 'pin' : 'pencil') . '.gif') . '" border=0 /></b></a></td>';
        $s .= '<td ' . $row_classr . ' nowrap="nowrap">' . $line['project_id'] . '</td>';
        if ($level) {
            $sd = str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;', $level - 1) . w2PshowImage('corner-dots.gif', 16, 12) . '&nbsp;' . '<a href="./index.php?m=projects&a=view&project_id=' . $line['project_id'] . '">' . $line['project_name'] . '</a>';
        } else {
            $sd = '<a href="./index.php?m=projects&a=view&project_id=' . $line['project_id'] . '">' . $line['project_name'] . '</a>';
        }
        $s .= '<td ' . $row_class . '>' . $sd . '</td>';
        $s .= '<td ' . $row_class . '><a href="./index.php?m=companies&a=view&company_id=' . $s_project->project_company . '">' . $s_company->company_name . '</a></td>';
        $s .= '<td ' . $row_class . ' align="center">' . ($start_date ? $start_date->format($df) : '-') . '</td>';
        $s .= '<td ' . $row_class . ' align="center">' . ($end_date ? $end_date->format($df) : '-') . '</td>';
        $s .= '<td ' . $row_class . ' align="center">' . $projectPriority[$s_project->project_priority] . '</td>';
        $s .= '<td ' . $row_class . ' align="center">' . $projectStatus[$s_project->project_status] . '</td></tr>';
    }
}
echo $s;
?>
</table>
<table width="100%" border="0" cellpadding="5" cellspacing="1">