}
$addPwT = $AppUI->getState('addProjWithTasks', 0);
$addPwOiD = $AppUI->getState('addProjWithOwnerInDep', 0);
$extraGet = '&user_id=' . $user_id;
// collect the full projects list data via function in projects.class.php
/*
 *  TODO:  This is a *nasty* *nasty* kludge that should be cleaned up.
 * Unfortunately due to the global variables from dotProject, we're stuck with
 * this mess for now.
 * 
 * May God have mercy on our souls for the atrocity we're about to commit.
 */
$tmpDepartments = $department;
$department = $dept_id;
$project = new CProject();
$projects = projects_list_data($user_id);
$department = $tmpDepartments;
?>

<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tbl">
<tr>
	<td align="right" width="65" nowrap="nowrap">&nbsp;<?php 
echo $AppUI->_('sort by');
?>
:&nbsp;</td>
	<td align="center" width="100%" nowrap="nowrap" colspan="6">&nbsp;</td>
    <td align="right" nowrap="nowrap">
        <form action="?m=departments&a=view&dept_id=<?php 
echo $dept_id;
?>
&tab=<?php 
예제 #2
0
파일: index.php 프로젝트: n2i/xvnkb
$owner = $AppUI->getState('ProjIdxowner') !== NULL ? $AppUI->getState('ProjIdxowner') : 0;
$bufferUser = '******';
$bufferUser .= '<option value="0">' . $AppUI->_('All Users');
$q = new DBQuery();
$q->addTable('users', 'u');
$q->addQuery('user_id,user_username,contact_first_name,contact_last_name');
$q->addJoin('contacts', 'c', 'contact_id = user_contact');
$q->addWhere('user_id <> 1');
$q->addOrder('contact_last_name');
if ($rows = $q->loadList()) {
    foreach ($rows as $row) {
        $bufferUser .= '<option value="' . $row['user_id'] . '" ' . ($owner == $row['user_id'] ? 'selected' : '') . '>' . $row['contact_first_name'] . ' ' . $row['contact_last_name'] . '</option>';
    }
}
// Collect the full projects list data via function in projects.class.php
projects_list_data();
$nolist = array(P_HOLDING, P_COMPLETED, P_ARCHIVED, P_ALL);
if ($AppUI->user_type > 5) {
    // only Manager & upper level can create Template project
    $nolist[] = P_TEMPLATE;
}
// Setup the title block
$titleBlock = new CTitleBlock('Projects');
$titleBlock->addCell($AppUI->_('Owner') . ':');
$titleBlock->addCell($bufferUser, '', '<form action="?m=projects" method="post" name="pickUser">', '</form>');
$titleBlock->addCell($AppUI->_('Company') . '/' . $AppUI->_('Division') . ':');
$titleBlock->addCell($buffer, '', '<form action="?m=projects" method="post" name="pickCompany">', '</form>');
$titleBlock->addCell();
if ($canAuthor) {
    $label = in_array($psfilter, $nolist) ? $pstatus[$psf = P_ACTIVE] : $pstatus[$psf = $psfilter];
    $titleBlock->addButton($AppUI->_('new ' . $label . ' project'), 'index.php?m=projects&a=addedit&project_status=' . $psf);