示例#1
0
	<th valign="top" colspan="2"><strong><?php 
echo $AppUI->_($message_id ? 'Edit Message' : 'Add Message');
?>
</strong></th>
</tr>
<?php 
if ($message_parent >= 0) {
    //check if this is a reply-post; if so, printout the original message
    $date = intval($message_info["message_date"]) ? new CDate($message_info["message_date"]) : new CDate();
    ?>

<tr><td align="right"><?php 
    echo $AppUI->_('Author');
    ?>
:</td><td align="left"><?php 
    echo dPgetUsername($message_info['user_username']);
    ?>
 (<?php 
    echo $date->format("{$df} {$tf}");
    ?>
)</td></tr>
<tr><td align="right"><?php 
    echo $AppUI->_('Subject');
    ?>
:</td><td align="left"><?php 
    echo $message_info['message_title'];
    ?>
</td></tr>
<tr><td align="right" valign="top"><?php 
    echo $AppUI->_('Message');
    ?>
示例#2
0
$q->addWhere('project_status != 7');
$q->addGroup('project_id');
$q->addOrder('project_name');
$project->setAllowedSQL($AppUI->user_id, $q);
$projects = $q->loadHashList('project_id');
$q->clear();
##############################################
/* gantt is called now by the todo page, too.
** there is a different filter approach in todo
** so we have to tweak a little bit,
** also we do not have a special project available
*/
$caller = defVal(@$_REQUEST['caller'], null);
if ($caller == 'todo') {
    $user_id = defVal(@$_REQUEST['user_id'], 0);
    $projects[$project_id]['project_name'] = $AppUI->_('Todo for') . ' ' . dPgetUsername($user_id);
    $projects[$project_id]['project_color_identifier'] = 'ff6000';
    $showLabels = dPgetParam($_REQUEST, 'showLabels', false);
    $showPinned = dPgetParam($_REQUEST, 'showPinned', false);
    $showArcProjs = dPgetParam($_REQUEST, 'showArcProjs', false);
    $showHoldProjs = dPgetParam($_REQUEST, 'showHoldProjs', false);
    $showDynTasks = dPgetParam($_REQUEST, 'showDynTasks', false);
    $showLowTasks = dPgetParam($_REQUEST, 'showLowTasks', true);
    $q = new DBQuery();
    $q->addQuery('ta.*');
    $q->addQuery('project_name, project_id, project_color_identifier');
    $q->addQuery('tp.task_pinned');
    $q->addTable('projects', 'pr');
    $q->addTable('tasks', 'ta');
    $q->addTable('user_tasks', 'ut');
    $q->leftJoin('user_task_pin', 'tp', 'tp.task_id = ta.task_id and tp.user_id = ' . $user_id);