Beispiel #1
0
function showRow($id = 0, $key = 0, $title = '', $value = '')
{
    global $canEdit, $sysval_id, $CR, $AppUI, $keys;
    $s = '<tr>' . $CR;
    if ($sysval_id == $id && $canEdit) {
        // edit form
        $s .= '<form name="sysValFrm" method="post" action="?m=system&u=syskeys&a=do_sysval_aed">' . $CR;
        $s .= '<input type="hidden" name="del" value="0" />' . $CR;
        $s .= '<input type="hidden" name="sysval_id" value="' . $id . '" />' . $CR;
        $s .= '<td>&nbsp;</td>';
        $s .= '<td valign="top">' . arraySelect($keys, 'sysval_key_id', 'size="1" class="text"', $key) . '</td>';
        $s .= '<td valign="top"><input type="text" name="sysval_title" value="' . dPformSafe($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 ? 'edit' : 'add') . '" class="button" /></td>';
        $s .= '<td>&nbsp;</td>';
    } else {
        $s .= '<td width="12" valign="top">';
        if ($canEdit) {
            $s .= '<a href="?m=system&u=syskeys&sysval_id=' . $id . '" title="' . $AppUI->_('edit') . '">' . dPshowImage('./images/icons/stock_edit-16.png', 16, 16, '') . '</a>';
            $s .= '</td>' . $CR;
        }
        $s .= '<td valign="top">' . $keys[$key] . '</td>' . $CR;
        $s .= '<td valign="top">' . dPformSafe($title) . '</td>' . $CR;
        $s .= '<td valign="top" colspan="2">' . nl2br(dPformSafe($value)) . '</td>' . $CR;
        $s .= '<td valign="top" width="16">';
        if ($canEdit) {
            $s .= '<a href="javascript:delIt(' . $id . ', \'' . addslashes(htmlentities($title)) . '\')" title="' . $AppUI->_('delete') . '">' . dPshowImage('./images/icons/stock_delete-16.png', 16, 16, '') . '</a>';
        }
        $s .= '</td>' . $CR;
    }
    $s .= '</tr>' . $CR;
    return $s;
}
Beispiel #2
0
function showRow($id = 0, $key = 0, $title = '', $value = '')
{
    global $canEdit, $sysval_id, $CR, $AppUI, $keys, $locale_char_set;
    $s = '<tr>' . $CR;
    if ($sysval_id == $id && $canEdit) {
        // edit form
        $s .= '<td>' . $CR;
        $s .= '<input type="hidden" name="del" value="0" />' . $CR;
        $s .= '<input type="hidden" name="sysval_id" value="' . $id . '" />' . $CR;
        $s .= '&nbsp;</td>';
        $s .= '<td valign="top">' . arraySelect($keys, 'sysval_key_id', 'size="1" class="text"', $key) . '</td>';
        $s .= '<td valign="top"><input type="text" name="sysval_title" value="' . dPformSafe($title) . '" class="text" /></td>';
        $s .= '<td valign="top"><textarea name="sysval_value" class="small" rows="5" cols="40">' . htmlspecialchars($value, ENT_COMPAT, $locale_char_set) . '</textarea></td>';
        $s .= '<td><input type="submit" value="' . $AppUI->_($id ? 'edit' : 'add') . '" class="button" /></td>';
        $s .= '<td>&nbsp;</td>';
    } else {
        $s .= '<td width="12" valign="top">';
        if ($canEdit) {
            $s .= '<a href="?m=system&amp;u=syskeys&amp;sysval_id=' . $id . '" title="' . $AppUI->_('edit') . '">' . dPshowImage('./images/icons/stock_edit-16.png', 16, 16, '') . '</a>';
            $s .= '</td>' . $CR;
        }
        $s .= '<td valign="top">' . $keys[$key] . '</td>' . $CR;
        $s .= '<td valign="top">' . dPformSafe($title) . '</td>' . $CR;
        $s .= '<td valign="top" colspan="2">' . htmlspecialchars($value, ENT_COMPAT, $locale_char_set) . '</td>' . $CR;
        $s .= '<td valign="top" width="16">';
        if ($canEdit) {
            $s .= '<a href="javascript:delIt(' . $id . ')" title="' . $AppUI->_('delete') . '">' . dPshowImage('./images/icons/stock_delete-16.png', 16, 16, '') . '</a>';
        }
        $s .= '</td>' . $CR;
    }
    $s .= '</tr>' . $CR;
    return $s;
}
Beispiel #3
0
function showRow($id = 0, $name = '', $label = '')
{
    global $canEdit, $syskey_id, $CR, $AppUI;
    $s = '<tr>' . $CR;
    if ($syskey_id == $id && $canEdit) {
        $s .= '<form name="sysKeyFrm" method="post" action="?m=system&u=syskeys&a=do_syskey_aed">' . $CR;
        $s .= '<input type="hidden" name="del" value="0" />' . $CR;
        $s .= '<input type="hidden" name="syskey_id" value="' . $id . '" />' . $CR;
        $s .= '<td>&nbsp;</td>';
        $s .= '<td><input type="text" name="syskey_name" value="' . $name . '" class="text" /></td>';
        $s .= '<td><textarea name="syskey_label" class="small" rows="2" cols="40">' . $label . '</textarea></td>';
        $s .= '<td><input type="submit" value="' . $AppUI->_($id ? 'edit' : 'add') . '" class="button" /></td>';
        $s .= '<td>&nbsp;</td>';
    } else {
        $s .= '<td width="12">';
        if ($canEdit) {
            $s .= '<a href="?m=system&u=syskeys&a=keys&syskey_id=' . $id . '"><img src="./images/icons/pencil.gif" alt="edit" border="0" width="12" height="12"></a>';
            $s .= '</td>' . $CR;
        }
        $s .= '<td>' . $name . '</td>' . $CR;
        $s .= '<td colspan="2">' . nl2br(dPformSafe($label)) . '</td>' . $CR;
        $s .= '<td width="16">';
        if ($canEdit) {
            $s .= '<a href="javascript:delIt(' . $id . ', \'' . addslashes(htmlentities($name)) . '\')"><img align="absmiddle" src="./images/icons/trash.gif" width="16" height="16" alt="' . $AppUI->_('delete') . '" border="0"></a>';
        }
        $s .= '</td>' . $CR;
    }
    $s .= '</tr>' . $CR;
    return $s;
}
Beispiel #4
0
//$canEdit = getPermission($m, 'edit');
// retrieve list of records
$search_string = $AppUI->___($search_string);
$q = new DBQuery();
$q->addTable('users', 'u');
$q->addTable('contacts', 'con');
$q->addQuery('user_id');
$q->addQuery("CONCAT(contact_last_name, ', ', contact_first_name, ' (', user_username, ')')" . ' AS label');
$q->addOrder('contact_last_name');
$q->addWhere('u.user_contact = con.contact_id');
$owner_list = array(-1 => $AppUI->_('All Users', UI_OUTPUT_RAW)) + $q->loadHashList();
//db_loadHashList($sql);
$owner_combo = arraySelect($owner_list, 'owner_filter_id', 'class="text" onchange="javascript:document.searchform.submit()"', $owner_filter_id, false, true);
// setup the title block
$titleBlock = new CTitleBlock('Companies', 'handshake.png', $m, "{$m}.{$a}");
$titleBlock->addCell('<form name="searchform" action="?m=companies&amp;search_string=' . dPformSafe($search_string) . '" method="post">' . "\n" . '<table><tr><td><strong>' . $AppUI->_('Search') . '</strong><input class="text" type="text" name="search_string" value="' . dPformSafe($search_string) . '" /><br />' . '<a href="index.php?m=companies&search_string=-1">' . $AppUI->_('Reset search') . '</a></td><td valign="top"><strong>' . $AppUI->_('Owner filter') . '</strong> ' . $owner_combo . ' </td></tr></table></form>');
$search_string = addslashes($search_string);
if ($canEdit) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new company') . '">', '', '<form action="?m=companies&a=addedit" method="post">', '</form>');
}
$titleBlock->show();
if (isset($_GET['tab'])) {
    $AppUI->setState('CompaniesIdxTab', $_GET['tab']);
}
$companiesTypeTab = defVal($AppUI->getState('CompaniesIdxTab'), 0);
//$tabTypes = array(getCompanyTypeID('Client'), getCompanyTypeID('Supplier'), 0);
$companiesType = $companiesTypeTab;
$tabBox = new CTabBox('?m=companies', DP_BASE_DIR . '/modules/companies/', $companiesTypeTab);
if ($tabbed = $tabBox->isTabbed()) {
    $add_na = true;
    if (isset($types[0])) {
Beispiel #5
0
</td>
  <td><input type='text' size="5" maxlength="5" value='<?php 
if ($obj->resource_max_allocation) {
    echo dPformSafe($obj->resource_max_allocation);
} else {
    echo '100';
}
?>
'
    name='resource_max_allocation'></td></tr>
  <tr><td align='right'><?php 
echo $AppUI->_('Notes');
?>
</td>
  <td><textarea name='resource_note' cols="40" rows="5"><?php 
echo dPformSafe($obj->resource_note);
?>
</textarea>
  </table>
</td>
</tr>
<tr>
  <td>
    <input type="button" value="<?php 
echo $AppUI->_('back');
?>
" 
    class="button" onclick="javascript:history.back(-1);" />
  </td>
  <td align="right">
    <input type="button" value="<?php 
	<?php 
echo arraySelect($tasks, 'task_log_task', 'size="1" class="text" onchange="javascript:task_log_task.value = this.options[this.selectedIndex].value;"', $obj->task_log_task);
?>
    </td>
		
    <td>
	<textarea name="task_log_description" class="textarea" cols="50" rows="6"><?php 
echo $obj->task_log_description;
?>
</textarea>
    </td>
     <td><b><?php 
echo $AppUI->_('End Task?');
?>
 </b><input type=checkbox name="progresso"></td>
    <td>
	<input name="task_log_hours" type="text" id="task_log_hours" value="<?php 
echo dPformSafe($obj->task_log_hours);
?>
" size="10" width="60" />
    </td>
    <td>
	<input class="button" type="submit" name="btnFuseAction" value="<?php 
echo $AppUI->_('update task');
?>
"/>
     </td>
<tr>
</form>
</table>
Beispiel #7
0
echo $AppUI->_('Scale Imported Tasks');
?>
:<br/>
			</td>
			<td colspan="3">
				<input type="checkbox" name="scale_project" id="scale_project" value="1" />
			</td>
		</tr>
		<tr>
			<td colspan="4">
				<?php 
echo $AppUI->_('Description');
?>
<br />
				<textarea name="project_description" cols="50" rows="10" wrap="virtual" class="textarea"><?php 
echo dPformSafe(@$row->project_description);
?>
</textarea>
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td>
		<input class="button" type="button" name="cancel" value="<?php 
echo $AppUI->_('cancel');
?>
" onClick="javascript:if (confirm('Are you sure you want to cancel.')) {location.href = './index.php?m=projects';}" />
	</td>
	<td align="right">
Beispiel #8
0
    $AppUI->setState('TaskIdxProject', $_GET['project_id']);
}
$project_id = $AppUI->getState('TaskIdxProject') ? $AppUI->getState('TaskIdxProject') : 0;
// get CCompany() to filter tasks by company
require_once $AppUI->getModuleClass('companies');
$obj = new CCompany();
$companies = $obj->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$filters2 = arrayMerge(array('all' => $AppUI->_('All Companies', UI_OUTPUT_RAW)), $companies);
// setup the title block
$titleBlock = new CTitleBlock('Tasks', 'applet-48.png', $m, "{$m}.{$a}");
// patch 2.12.04 text to search entry box
if (isset($_POST['searchtext'])) {
    $AppUI->setState('searchtext', $_POST['searchtext']);
}
$search_text = $AppUI->getState('searchtext') ? $AppUI->getState('searchtext') : '';
$search_text = dPformSafe($search_text);
$titleBlock->addCell('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $AppUI->_('Search') . ':');
$titleBlock->addCell('<input type="text" class="text" SIZE="20" name="searchtext"' . ' onChange="document.searchfilter.submit();" value="' . $search_text . '"title="' . $AppUI->_('Search in name and description fields') . '"/><!--<input type="submit" class="button" value=">" title="' . $AppUI->_('Search in name and description fields') . '"/>-->', '', '<form action="?m=tasks" method="post" id="searchfilter">', '</form>');
// Let's see if this user has admin privileges
if (getPermission('admin', 'view')) {
    $titleBlock->addCell();
    $titleBlock->addCell($AppUI->_('User') . ':');
    $q = new DBQuery();
    $q->addTable('users', 'u');
    $q->addTable('contacts', 'con');
    $q->addQuery('user_id');
    $q->addQuery("CONCAT(contact_last_name, ', ', contact_first_name, ' (', user_username, ')')" . ' AS label');
    $q->addOrder('contact_last_name');
    $q->addWhere('u.user_contact = con.contact_id');
    $user_list = $q->loadHashList();
    $titleBlock->addCell(arraySelect($user_list, 'user_id', 'size="1" class="text"' . ' onChange="document.userIdForm.submit();"', $user_id, false, true), '', '<form action="?m=tasks" method="post" name="userIdForm">', '</form>');
" border="0" />
      </a>
    </td>
    <td  width="25%" class="fundoLinha">
	 <?php 
echo arraySelect($tasks, 'task_log_task', 'size="1" style="width:200px;" class="text"', $row->task_log_task ? $row->task_log_task : $AppUI->task_log_task);
?>
    </td>	
    <td  width="37%" class="fundoLinha">
	<textarea name="task_log_description" class="textarea" cols="50" rows="6"><?php 
echo $log->task_log_description;
?>
</textarea>
    </td>
     <td  width="10%" class="fundoLinha"><b><?php 
echo $AppUI->_('End Task?');
?>
 </b><input type=checkbox name="progresso" ></td>
    <td  width="10%" class="fundoLinha">
	<input name="task_log_hours" type="text" id="task_log_hours" value="<?php 
echo dPformSafe($log->task_log_hours);
?>
" size="10" width="60" />
    </td>
	<td  width="3%" class="fundoLinha">
		<img style="cursor:pointer;" title="Adicionar Registro" src="./modules/timesheet/images/inserir.png" onclick="adiciona()" />
	</td>
<tr>
</form>
</table>
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;
}
Beispiel #11
0
</tr>
<?php 
if (!$dialog) {
    // top navigation menu
    $nav = $AppUI->getMenuModules();
    ?>
<tr>
	<td class="nav" align="left">
	<table width="100%" cellpadding="3" cellspacing="0">
	<tr class="nav">
		<td>
		<?php 
    $links = array();
    foreach ($nav as $module) {
        if (getPermission($module['mod_directory'], 'access')) {
            $links[] = '<a href="?m=' . dPformSafe($module['mod_directory'], DP_FORM_URI) . '">' . $AppUI->_($module['mod_ui_name']) . '</a>';
        }
    }
    echo implode(' | ', $links);
    echo "\n";
    ?>
		</td>
        <td nowrap="nowrap" align="right">
		<form name="frm_new" method="get" action="./index.php">
		<table cellpadding="0" cellspacing="0">
		<tr><td>
<?php 
    $newItemPermCheck = array('companies' => 'Company', 'contacts' => 'Contact', 'calendar' => 'Event', 'files' => 'File', 'projects' => 'Project');
    $newItem = array(0 => '- New Item -');
    foreach ($newItemPermCheck as $mod_check => $mod_check_title) {
        if (getPermission($mod_check, 'add')) {
Beispiel #12
0
        $let .= strpos($let, $L['L']) ? '' : $L['L'];
    }
}
$a2z = "\n<table cellpadding=\"2\" cellspacing=\"1\" border=\"0\">";
$a2z .= "\n<tr>";
$a2z .= '<td width="100%" align="right">' . $AppUI->_('Show') . ': </td>';
$a2z .= '<td><a href="./index.php?m=admin&stub=0">' . $AppUI->_('All') . '</a></td>';
for ($c = 65; $c < 91; $c++) {
    $cu = chr($c);
    $cell = strpos($let, "{$cu}") > 0 ? "<a href=\"?m=admin&stub={$cu}\">{$cu}</a>" : "<font color=\"#999999\">{$cu}</font>";
    $a2z .= "\n\t<td>{$cell}</td>";
}
$a2z .= "\n</tr>\n</table>";
// setup the title block
$titleBlock = new CTitleBlock('User Management', 'helix-setup-users.png', $m, "{$m}.{$a}");
$where = dPformSafe($where, true);
$titleBlock->addCell('<input type="text" name="where" class="text" size="10" value="' . $where . '" />' . ' <input type="submit" value="' . $AppUI->_('search') . '" class="button" />', '', '<form action="index.php?m=admin" method="post">', '</form>');
$titleBlock->addCell($a2z);
$titleBlock->show();
?>
<script language="javascript">
<?php 
// security improvement:
// some javascript functions may not appear on client side in case of user not having write permissions
// else users would be able to arbitrarily run 'bad' functions
if ($canDelete) {
    ?>
function delMe( x, y ) {
	if (confirm( "<?php 
    echo $AppUI->_('doDelete', UI_OUTPUT_JS) . ' ' . $AppUI->_('User', UI_OUTPUT_JS);
    ?>
Beispiel #13
0
print "<table class=maintable bgcolor=\"#eeeeee\" width=95%>\n";
print "<tr>\n";
print "<td colspan=\"2\" align=\"center\" bgcolor=#878676 width=100%>\n";
print "<div class=\"heading\">" . $AppUI->_($title) . "</div>\n";
print "</td>\n</tr>\n";
/* field select */
print "<tr>\n";
print "<td align=\"right\"><strong>" . $AppUI->_('Field') . "</strong></td>\n";
print "<td>";
$field_choices = array("author" => $AppUI->_("Author"), "body" => $AppUI->_("Body"), "subject" => $AppUI->_("Subject"));
$field_selectbox = create_selectbox("search_field", $field_choices, $search_field);
print "{$field_selectbox}\n";
print "</td>\n";
print "</tr>\n";
/* pattern select */
$search_pattern = dPformSafe($search_pattern);
print "<tr>\n";
print "<td align=\"right\"><strong>" . $AppUI->_('Pattern') . "</strong></td>\n";
print "<td><input type=\"text\" name=\"search_pattern\" value=\"{$search_pattern}\"></td>\n";
print "</tr>\n";
/* depth select */
print "<tr>\n";
print "<td align=\"right\"><strong>" . $AppUI->_('Depth') . "</strong></td>\n";
print "<td>";
$depth_choices = array("All" => $AppUI->_("All Tickets"), "Open" => $AppUI->_("Open Parents"), "Closed" => $AppUI->_("Closed Parents"), "Deleted" => $AppUI->_("Deleted Parents"), "Child" => $AppUI->_("Followups") . " &amp; " . $AppUI->_("Comments"));
$depth_selectbox = create_selectbox("search_depth", $depth_choices, $search_depth);
print "{$depth_selectbox}\n";
print "</td>\n";
print "</tr>\n";
/* sort select */
print "<tr>\n";
 function parseViewField($key)
 {
     $field_config = unserialize($this->fields_array[$key]);
     $parsed = '<tr id="custom_tr_' . $key . '">';
     $parsed .= $this->_getLabelHTML($field_config);
     switch ($field_config['type']) {
         case 'text':
             $parsed .= '<td class="hilite">' . dPformSafe(isset($this->previous_data[$key]) ? $this->previous_data[$key] : '') . '</td>';
             break;
         case 'href':
             $parsed .= '<td class="hilite"><a href="' . dPformSafe(isset($this->previous_data[$key]) ? $this->previous_data[$key] : '', false, true) . '">' . dPformSafe(isset($this->previous_data[$key]) ? $this->previous_data[$key] : '') . '</a></td>';
             break;
         case 'select':
             $optionarray = explode(',', $field_config['selects']);
             $parsed .= '<td class="hilite" width="300">' . dPformSafe(isset($this->previous_data[$key]) ? $optionarray[$this->previous_data[$key]] : '') . '</td>';
             break;
         case 'textarea':
             $parsed .= '<td valign="top" class="hilite">' . dPformSafe(isset($this->previous_data[$key]) ? $this->previous_data[$key] : '') . '</td>';
             break;
         case 'checkbox':
             $optionarray = explode(',', $field_config['selects']);
             $parsed .= '<td align="left">';
             foreach ($optionarray as $option) {
                 $checked = '';
                 if (isset($this->previous_data[$key]) && array_key_exists($option, array_flip($this->previous_data[$key]))) {
                     $checked = ' checked="checked"';
                 }
                 $parsed .= '<input type="checkbox" value="' . $option . ' name="custom_' . $key . '[]" class="text" style="border:0"' . $checked . ' ' . $field_config['options'] . ' disabled="disabled" />' . $option . '<br />';
             }
             $parsed .= '</td>';
             break;
     }
     $parsed .= '</tr>';
     return $parsed;
 }
Beispiel #15
0
				<input TYPE="RADIO" name="unittest_passed" cols="60" value="0" <?php 
if ($obj->unittest_passed == "0") {
    echo " CHECKED";
}
?>
> Failed<br>
			</td>
		</tr>
		<tr>
			<td align="right" nowrap="nowrap"><?php 
echo $AppUI->_('Actual Results');
?>
</td>
			<td width="100%">
				<textarea name="unittest_actualresult" cols="60" style="height:100px; font-size:8pt"><?php 
echo dPformSafe($obj->unittest_actualresult);
?>
</textarea>
			</td>
		</tr>
<?php 
function build_date_list(&$date_array, $row)
{
    global $tracked_dynamics, $project;
    // if this task_dynamic is not tracked, set end date to proj start date
    $date = new CDate($row['unittest_lasttested']);
    $sdate = $date->format("%d/%m/%Y");
    $shour = $date->format("%H");
    $smin = $date->format("%M");
    $date_array[$row['task_id']] = array($row['task_name'], $sdate, $shour, $smin);
}
Beispiel #16
0
$r = $rn % $carrWidth;
// remainder column height
$t += $r == 0 && $t > 0 ? 0 : 1;
$carr[] = array();
$x = 0;
foreach ($disp_arr as $row) {
    $y = floor($x / $t);
    $carr[$y][] = $row;
    $x++;
}
$tdw = floor(100 / $carrWidth);
/**
* Contact search form
*/
// Let's remove the first '%' that we previously added to ContIdxWhere
$default_search_string = dPformSafe(mb_substr($AppUI->getState('ContIdxWhere'), 1, mb_strlen($AppUI->getState('ContIdxWhere'))), true);
$a2z = "\n" . '<table cellpadding="2" cellspacing="1" border="0">';
$a2z .= "\n<tr>";
$a2z .= '<td width="100%" align="right">' . $AppUI->_('Show') . ': </td>';
$a2z .= '<td><a href="?m=contacts&amp;where=0">' . $AppUI->_('All') . '</a></td>';
for ($c = 65; $c < 91; $c++) {
    $cu = chr($c);
    $cell = mb_strpos($let, "{$cu}") > 0 ? '<a href="?m=contacts&amp;where=' . $cu . '">' . $cu . '</a>' : '<font color="#999999">' . $cu . '</font>';
    $a2z .= "\n\t<td>{$cell}</td>";
}
$a2z .= "\n</tr>\n<tr>" . '<td colspan="28">' . '<form action="./index.php" method="get">' . $AppUI->_('Search for') . '<input type="text" name="search_string" value="' . $default_search_string . '" />' . '<input type="hidden" name="m" value="contacts" /><input type="submit" value=">" />' . '<a href="./index.php?m=contacts&amp;search_string=">' . $AppUI->_('Reset search') . '</a></form></td></tr>' . "\n</table>\n";
// setup the title block
// what purpose is the next line for? Commented out by gregorerhardt, Bug #892912
// $contact_id = $carr[$z][$x]["contact_id"];
$titleBlock = new CTitleBlock('Contacts', 'monkeychat-48.png', $m, "{$m}.{$a}");
$titleBlock->addCell($a2z);
Beispiel #17
0
</tr>
<?php 
if (!$dialog) {
    // top navigation menu
    $nav = $AppUI->getMenuModules();
    ?>
<tr>
	<td class="nav" align="left">
	<table width="100%" cellpadding="3" cellspacing="0">
	<tr class="nav">
		<td>
		<?php 
    $links = array();
    foreach ($nav as $module) {
        if (getPermission($module['mod_directory'], 'access')) {
            $links[] = '<a href="?m=' . dPformSafe($module['mod_directory'], false, true) . '">' . $AppUI->_($module['mod_ui_name']) . '</a>';
        }
    }
    echo implode(' | ', $links);
    echo "\n";
    ?>
		</td>
        <td nowrap="nowrap" align="right">
		<form name="frm_new" method="get" action="./index.php">
		<table cellpadding="0" cellspacing="0">
		<tr><td>
<?php 
    $newItemPermCheck = array('companies' => 'Company', 'contacts' => 'Contact', 'calendar' => 'Event', 'files' => 'File', 'projects' => 'Project');
    $newItem = array(0 => '- New Item -');
    foreach ($newItemPermCheck as $mod_check => $mod_check_title) {
        if (getPermission($mod_check, 'add')) {
Beispiel #18
0
    if ($lang == 'en') {
        if (mb_strlen($langs['english']) < 40) {
            echo "<input type=\"text\" name=\"trans[{$index}][english]\" value=\"{$langs['english']}\" size=\"40\" class=\"text\" />";
        } else {
            $rows = round(mb_strlen($langs['english'] / 35)) + 1;
            echo "<textarea name=\"trans[{$index}][english]\"  cols=\"40\" class=\"small\" rows=\"{$rows}\">" . $langs['english'] . "</textarea>";
        }
    } else {
        echo $langs['english'];
        echo "<input type=\"hidden\" name=\"trans[{$index}][english]\" value=\"" . ($k ? $k : $langs['english']) . "\" size=\"20\" class=\"text\" />";
    }
    ?>
</td>
	<td><?php 
    if ($lang != 'en') {
        $langs['lang'] = dPformSafe(@$langs['lang'], true);
        if (mb_strlen($langs['lang']) < 40) {
            echo "<input type=\"text\" name=\"trans[{$index}][lang]\" value=\"{$langs['lang']}\" size=\"40\" class=\"text\" />";
        } else {
            $rows = round(mb_strlen($langs['lang'] / 35)) + 1;
            echo "<textarea name=\"trans[{$index}][lang]\"  cols=\"40\" class=\"small\" rows=\"{$rows}\">" . $langs['lang'] . "</textarea>";
        }
    }
    ?>
</td>
	<td align="center"><input type="checkbox" name="trans[<?php 
    echo $index;
    ?>
][del]" /></td>
</tr>
<?php 
Beispiel #19
0
: <?php 
echo @$project->project_name;
?>
</strong>
		</font>
	</td>
</tr>

<tr valign="top" width="50%">
	<td>
		<?php 
echo $AppUI->_('Task Name');
?>
 *
		<br /><input type="text" class="text" name="task_name" value="<?php 
echo dPformSafe($obj->task_name);
?>
" size="40" maxlength="255" />
	</td>
	<td>
		<table cellspacing="0" cellpadding="2" border="0" width="100%">
		<tr>
			<td align="right" nowrap="nowrap"><?php 
echo $AppUI->_('Status');
?>
</td>
			<td>
				<?php 
echo arraySelect($status, 'task_status', 'size="1" class="text"', $obj->task_status, true);
?>
			</td>
Beispiel #20
0
function showRow($id = 0, $key = 0, $title = '', $value = '')
{
    global $canEdit, $sysval_id, $AppUI, $keys;
    $s = '<tr id="idValue_' . $id . '" class="second">';
    if ($id == 0 && $canEdit) {
        $s .= '<td valign="top">' . '<a href="javascript:doEditValue(0)"><img src="images/common_add.gif" title="' . $AppUI->_('Add') . '"></a></td>' . '<td colspan="3" data="0"></td><td data=""></td><td data=""></td>';
    } else {
        $s .= '<td valign="top">';
        if ($canEdit) {
            $s .= '<a href="javascript:doEditValue(' . $id . ')" title="' . $AppUI->_('Edit') . '">' . '<img src="images/edit.gif"/>' . '</a>';
            $s .= '</td>';
        }
        $s .= '<td valign="top" data="' . $key . '">' . $keys[$key] . '</td>';
        $s .= '<td valign="top" data="' . rawurlencode(htmlentities($title)) . '">' . dPformSafe($title) . '</td>';
        $s .= '<td valign="top" colspan="2" data="' . rawurlencode(htmlentities($value)) . '">' . str_replace("\n", '<br/>', $value) . '</td>';
        $s .= '<td valign="top">';
        if ($canEdit) {
            $s .= '<a href="javascript:delIt(' . $id . ')" title="' . $AppUI->_('Delete') . '">' . '<img src="images/delete.gif"/>' . '</a>';
        }
        $s .= '</td>';
    }
    $s .= '</tr>';
    return $s;
}
Beispiel #21
0
}
?>
				</a></span>
				<?php 
echo htmlspecialchars(@$obj->company_address1) . ($obj->company_address2 ? '<br />' : '') . htmlspecialchars($obj->company_address2) . ($obj->company_city ? '<br />' : '') . htmlspecialchars($obj->company_city) . ($obj->company_state ? ', ' : '') . htmlspecialchars($obj->company_state) . ($obj->company_zip ? ' ' : '') . htmlspecialchars($obj->company_zip);
?>
			</td>
		</tr>
		<tr>
			<td align="right" nowrap="nowrap"><?php 
echo $AppUI->_('URL');
?>
:</td>
			<td class="hilite">
				<a href="http://<?php 
echo dPformSafe(@$obj->company_primary_url, DP_FORM_URI);
?>
" target="Company"><?php 
echo htmlspecialchars(@$obj->company_primary_url);
?>
</a>
			</td>
		</tr>
		<tr>
			<td align="right" nowrap="nowrap"><?php 
echo $AppUI->_('Type');
?>
:</td>
			<td class="hilite"><?php 
echo $AppUI->_($types[@$obj->company_type]);
?>
		</table>
        </td>
        <?php 
            if ($dPconfig['direct_edit_assignment']) {
                // get Users with all Allocation info (e.g. their freeCapacity)
                $tempoTask = new CTask();
                $userAlloc = $tempoTask->getAllocation("user_id");
                ?>
         <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>";
                }
Beispiel #23
0
    }
}
$q->clear();
$a2z = "\n" . '<table cellpadding="2" cellspacing="1" border="0">';
$a2z .= "\n<tr>";
$a2z .= '<td width="100%" align="right">' . $AppUI->_('Show') . ': </td>';
$a2z .= '<td><a href="?m=admin&amp;stub=0">' . $AppUI->_('All') . '</a></td>';
for ($c = 65; $c < 91; $c++) {
    $cu = chr($c);
    $cell = mb_strpos($let, $cu) > 0 ? '<a href="?m=admin&amp;stub=' . $cu . '">' . $cu . '</a>' : '<font color="#999999">' . $cu . '</font>';
    $a2z .= "\n\t<td>" . $cell . '</td>';
}
$a2z .= "\n</tr>\n</table>";
// setup the title block
$titleBlock = new CTitleBlock('User Management', 'helix-setup-users.png', $m, "{$m}.{$a}");
$where = dPformSafe($where);
$titleBlock->addCell('<form action="index.php?m=admin" method="post">' . '<input type="text" name="where" class="text" size="10" value="' . $where . '" /> <input type="submit" value="' . $AppUI->_('search') . '" class="button" /></form>', '', '', '');
$titleBlock->addCell($a2z);
$titleBlock->show();
?>
<script language="javascript" type="text/javascript">
<?php 
// security improvement:
// some javascript functions may not appear on client side in case of user not having write permissions
// else users would be able to arbitrarily run 'bad' functions
if ($canDelete) {
    ?>
function delMe(x, y) {
	if (confirm("<?php 
    echo $AppUI->_('doDelete', UI_OUTPUT_JS) . ' ' . $AppUI->_('User', UI_OUTPUT_JS);
    ?>
Beispiel #24
0
    $AppUI->setState('TaskIdxProject', $_GET['project_id']);
}
$project_id = $AppUI->getState('TaskIdxProject') ? $AppUI->getState('TaskIdxProject') : 0;
// get CCompany() to filter tasks by company
require_once $AppUI->getModuleClass('companies');
$obj = new CCompany();
$companies = $obj->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$filters2 = arrayMerge(array('all' => $AppUI->_('All Companies', UI_OUTPUT_RAW)), $companies);
// setup the title block
$titleBlock = new CTitleBlock('Tasks', 'applet-48.png', $m, "{$m}.{$a}");
// patch 2.12.04 text to search entry box
if (isset($_POST['searchtext'])) {
    $AppUI->setState('searchtext', $_POST['searchtext']);
}
$search_text = $AppUI->getState('searchtext') ? $AppUI->getState('searchtext') : '';
$search_text = dPformSafe($search_text, true);
$titleBlock->addCell('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $AppUI->_('Search') . ':');
$titleBlock->addCell('<input type="text" class="text" SIZE="20" name="searchtext" onChange="document.searchfilter.submit();" value=' . "'{$search_text}'" . 'title="' . $AppUI->_('Search in name and description fields') . '"/>
       	<!--<input type="submit" class="button" value=">" title="' . $AppUI->_('Search in name and description fields') . '"/>-->', '', '<form action="?m=tasks" method="post" id="searchfilter">', '</form>');
// Let's see if this user has admin privileges
if (!getDenyRead("admin")) {
    $titleBlock->addCell();
    $titleBlock->addCell($AppUI->_("User") . ":");
    $user_list = $perms->getPermittedUsers('tasks');
    $titleBlock->addCell(arraySelect($user_list, "user_id", "size='1' class='text' onChange='document.userIdForm.submit();'", $user_id, false), "", "<form action='?m=tasks' method='post' name='userIdForm'>", "</form>");
}
$titleBlock->addCell();
$titleBlock->addCell($AppUI->_('Company') . ':');
$titleBlock->addCell(arraySelect($filters2, 'f2', 'size=1 class=text onChange="document.companyFilter.submit();"', $f2, false), '', '<form action="?m=tasks" method="post" name="companyFilter">', '</form>');
$titleBlock->addCell();
if ($canEdit && $project_id) {
 function parseViewField($key)
 {
     $field_config = unserialize($this->fields_array[$key]);
     $parsed = "<tr id='custom_tr_{$key}'>";
     $parsed .= $this->_getLabelHTML($field_config);
     switch ($field_config["type"]) {
         case "text":
             $parsed .= "<td class='hilite'>" . dPformSafe(isset($this->previous_data[$key]) ? $this->previous_data[$key] : "") . "</td>";
             break;
         case "select":
             $optionarray = explode(",", $field_config["selects"]);
             $parsed .= "<td class='hilite' width='300'>" . dPformSafe(isset($this->previous_data[$key]) ? $optionarray[$this->previous_data[$key]] : "") . "</td>";
             break;
         case "textarea":
             $parsed .= "<td valign='top' class='hilite'>" . dPformSafe(isset($this->previous_data[$key]) ? $this->previous_data[$key] : "") . "</td>";
             break;
         case "checkbox":
             $optionarray = explode(",", $field_config["selects"]);
             $parsed .= "<td align='left'>";
             foreach ($optionarray as $option) {
                 $checked = "";
                 if (isset($this->previous_data[$key]) && array_key_exists($option, array_flip($this->previous_data[$key]))) {
                     $checked = "checked";
                 }
                 $parsed .= "<input type='checkbox' value='{$option}' name='custom_" . $key . "[]' class='text' locked style='border:0' {$checked} " . $field_config["options"] . " disabled />{$option}<br />";
             }
             $parsed .= "</td>";
             break;
     }
     $parsed .= "</tr>";
     return $parsed;
 }
Beispiel #26
0
print "<table class=maintable bgcolor=\"#eeeeee\" width=95%>\n";
print "<tr>\n";
print "<td colspan=\"2\" align=\"center\" bgcolor=#878676 width=100%>\n";
print "<div class=\"heading\">" . $AppUI->_($title) . "</div>\n";
print "</td>\n</tr>\n";
/* field select */
print "<tr>\n";
print "<td align=\"right\"><strong>" . $AppUI->_('Field') . "</strong></td>\n";
print "<td>";
$field_choices = array("author" => $AppUI->_("Author"), "body" => $AppUI->_("Body"), "subject" => $AppUI->_("Subject"));
$field_selectbox = create_selectbox("search_field", $field_choices, $search_field);
print "{$field_selectbox}\n";
print "</td>\n";
print "</tr>\n";
/* pattern select */
$search_pattern = dPformSafe($search_pattern, true);
print "<tr>\n";
print "<td align=\"right\"><strong>" . $AppUI->_('Pattern') . "</strong></td>\n";
print "<td><input type=\"text\" name=\"search_pattern\" value=\"{$search_pattern}\"></td>\n";
print "</tr>\n";
/* depth select */
print "<tr>\n";
print "<td align=\"right\"><strong>" . $AppUI->_('Depth') . "</strong></td>\n";
print "<td>";
$depth_choices = array("All" => $AppUI->_("All Tickets"), "Open" => $AppUI->_("Open Parents"), "Closed" => $AppUI->_("Closed Parents"), "Deleted" => $AppUI->_("Deleted Parents"), "Child" => $AppUI->_("Followups") . " &amp; " . $AppUI->_("Comments"));
$depth_selectbox = create_selectbox("search_depth", $depth_choices, $search_depth);
print "{$depth_selectbox}\n";
print "</td>\n";
print "</tr>\n";
/* sort select */
print "<tr>\n";
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;
}
    echo $AppUI->_('Name');
    ?>
</th>
	<th><?php 
    echo $AppUI->_('e-mail');
    ?>
</th>
	<th><?php 
    echo $AppUI->_('Department');
    ?>
</th>
</tr>
<?php 
    foreach ($rows as $row) {
        $contact = new CContact();
        $contact->bind($row);
        $dept_detail = $contact->getDepartmentDetails();
        $s .= '<tr><td>';
        $s .= '<a href="?m=contacts&amp;a=view&amp;contact_id=' . dPformSafe($row['contact_id']) . '">' . htmlspecialchars($row['contact_last_name'] . ', ' . $row['contact_first_name']) . '</a>';
        $s .= '<td><a href="mailto:' . dPformSafe($row['contact_email'], DP_FORM_URI) . '">' . htmlspecialchars($row['contact_email']) . '</a></td>';
        $s .= '<td>' . htmlspecialchars($dept_detail['dept_name']) . '</td>';
        $s .= '</tr>';
    }
}
$s .= '<tr><td colspan="3" align="right" valign="top" style="background-color:#ffffff">';
$s .= '<input type="button" class=button value="' . $AppUI->_('new contact') . '" onclick="javascript:window.location=\'./index.php?m=contacts&amp;a=addedit&amp;company_id=' . dPformSafe($company_id) . '&amp;company_name=' . dPformSafe($obj->company_name) . '\'">';
$s .= '</td></tr>';
echo $s;
?>
</table>
Beispiel #29
0
" size=50 maxlength="50" /></td>
	</tr>
	<tr>
		<td align="right"><?php 
echo $AppUI->_('State');
?>
:</td>
		<td><input type="text" class="text" name="company_state" value="<?php 
echo dPformSafe(@$obj->company_state);
?>
" maxlength="50" /></td>
	</tr>
	<tr>
		<td align="right">
			URL http://<A name="x"></a></td><td><input type="text" class="text" value="<?php 
echo dPformSafe(@$obj->company_primary_url);
?>
" name="company_primary_url" size="50" maxlength="255" />
			<a href="#x" onClick="testURL('CompanyURLOne')">[<?php 
echo $AppUI->_('test');
?>
]</a>
		</td>
	</tr>
	
	<tr>
		<td align="right"><?php 
echo $AppUI->_('Company Owner');
?>
:</td>
		<td>
Beispiel #30
0
##
##	Companies: View Archived Projects sub-table
##
global $AppUI, $company_id;
$q = new DBQuery();
$q->addTable('projects');
$q->addQuery('project_id, project_name, project_start_date, project_status, project_target_budget' . ', project_start_date, project_priority, contact_first_name, contact_last_name');
$q->addJoin('users', 'u', 'u.user_id = projects.project_owner');
$q->addJoin('contacts', 'con', 'u.user_contact = con.contact_id');
$q->addWhere('projects.project_company = ' . $company_id);
include_once $AppUI->getModuleClass('projects');
$projObj = new CProject();
$projList = $projObj->getDeniedRecords($AppUI->user_id);
if (count($projList)) {
    $q->addWhere('NOT (project_id IN (' . implode(',', $projList) . '))');
}
$q->addWhere('projects.project_status = 7');
$q->addOrder('project_name');
$s = '';
if (!($rows = $q->loadList())) {
    $s .= $AppUI->_('No data available') . '<br />' . $AppUI->getMsg();
} else {
    $s .= '<tr><th>' . $AppUI->_('Name') . '</th><th>' . $AppUI->_('Owner') . '</th></tr>';
    foreach ($rows as $row) {
        $s .= '<tr><td>';
        $s .= '<a href="?m=projects&a=view&project_id=' . dPformSafe($row['project_id']) . '">' . htmlspecialchars($row['project_name']) . '</a>';
        $s .= '<td>' . htmlspecialchars($row['contact_first_name']) . '&nbsp;' . htmlspecialchars($row['contact_last_name']) . '</td>';
        $s .= '</tr>';
    }
}
echo '<table cellpadding="2" cellspacing="1" border="0" width="100%" class="tbl">' . $s . '</table>';