public function addFilterCell($label, $field, $values, $value) { $form = 'filter' . $this->count; $this->addCell('<form action="?m=' . $this->module . '" method="post" name="' . $form . '" accept-charset="utf-8">' . arraySelect($values, $field, 'size="1" class="text" onChange="document.' . $form . '.submit();"', $value, false) . '</form>'); $this->addCell($this->_AppUI->_($label) . ':'); $this->count++; }
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> </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> </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; }
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 .= ' </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> </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">' . 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; }
protected function _createCompanySelection($AppUI, $companyInput) { $company = new CCompany(); $companyMatches = $company->getCompanyList($AppUI, -1, $companyInput); $company_id = count($companyMatches) == 1 ? $companyMatches[0]['company_id'] : $AppUI->user_company; $companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name'); $companies = arrayMerge(array('0' => ''), $companies); $output .= '<td>' . arraySelect($companies, 'company_id', ' onChange=this.form.new_company.value=\'\'', $company_id) . '<input type="text" name="new_company" value="' . ($company_id > 0 ? '' : $companyInput) . '" />'; if ($company_id == 0) { $output .= '<br /><em>' . $AppUI->_('compinfo') . '</em>'; } $output .= '</td></tr>'; return $output; }
function arraySelectTree(&$arr, $select_name, $select_attribs, $selected, $translate = false) { global $AppUI; reset($arr); $children = array(); // first pass - collect children foreach ($arr as $k => $v) { $id = $v[0]; $pt = $v[2]; $list = @$children[$pt] ? $children[$pt] : array(); array_push($list, $v); $children[$pt] = $list; } $list = tree_recurse($arr[0][2], '', array(), $children); return arraySelect($list, $select_name, $select_attribs, $selected, $translate); }
$today = $ctoday->format(FMT_TIMESTAMP_DATE); $date = w2PgetParam($_GET, 'date', $today); // get the list of visible companies $company = new CCompany(); $companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name'); $companies = arrayMerge(array('0' => $AppUI->_('All')), $companies); // setup the title block $titleBlock = new CTitleBlock('Monthly Calendar', 'myevo-appointments.png', $m, $m . '.' . $a); $titleBlock->addCrumb('?m=calendar&a=year_view&date=' . $date, 'year view'); $titleBlock->addCrumb('?m=calendar&date=' . $date, 'month view'); $titleBlock->addCrumb('?m=calendar&a=week_view&date=' . $date, 'week view'); $titleBlock->addCrumb('?m=calendar&a=day_view&date=' . $date, 'day view'); $titleBlock->addCell($AppUI->_('Company') . ':'); $titleBlock->addCell(arraySelect($companies, 'company_id', 'onChange="document.pickCompany.submit()" class="text"', $company_id), '', '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickCompany" accept-charset="utf-8">', '</form>'); $titleBlock->addCell($AppUI->_('Event Filter') . ':'); $titleBlock->addCell(arraySelect($event_filter_list, 'event_filter', 'onChange="document.pickFilter.submit()" class="text"', $event_filter, true), '', '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickFilter" accept-charset="utf-8">', '</form>'); $titleBlock->show(); ?> <script language="javascript" type="text/javascript"> function clickDay( uts, fdate ) { window.location = './index.php?m=calendar&a=day_view&date='+uts+'&tab=0'; } function clickWeek( uts, fdate ) { window.location = './index.php?m=calendar&a=week_view&date='+uts; } </script> <table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td> <?php // establish the focus 'date'
/><label for="add_pwoid"><?php echo $AppUI->_('Show Projects whose Owner is Member of the Dep.'); ?> ?</label> </form> </td> <td align="right" nowrap="nowrap"> <form action="?m=departments&a=view&dept_id=<?php echo $dept_id; ?> &tab=<?php echo $tab; ?> " method="post" name="pickProject" accept-charset="utf-8"> <?php echo arraySelect($projFilter, 'proFilter', 'size=1 class=text onChange="document.pickProject.submit()"', $proFilter, true); ?> </form> </td> </tr> </table> <table width="100%" border="0" cellpadding="3" cellspacing="1" class="tbl"> <tr> <?php $fieldList = array('project_color_identifier', 'project_priority', 'project_name', 'company_name', 'project_start_date', 'project_duration', 'project_end_date', 'project_actual_end_date', 'task_log_problem', 'user_username', 'project_task_count', 'project_status'); $fieldNames = array('Color', 'P', 'Project Name', 'Company', 'Start', 'Duration', 'End', 'Actual', 'LP', 'Owner', 'Tasks', 'Status'); $baseUrl = '?m=' . $m . (isset($a) ? '&a=' . $a : '') . (isset($extraGet) ? $extraGet : ''); foreach ($fieldNames as $index => $name) { ?> <th nowrap="nowrap"> <a href="<?php
" /></td></tr> <tr><td align='right'><?php echo $AppUI->_('Resource Name'); ?> </td> <td align='left'><input type='text' size="30" maxlength="255" name="resource_name" value="<?php echo dPformSafe($obj->resource_name); ?> " /></td></tr> <tr><td align='right'><?php echo $AppUI->_('Type'); ?> </td> <td align='left'><?php echo arraySelect($typelist, 'resource_type', 'class=select', $obj->resource_type, true); ?> </td></tr> <tr><td align='right'><?php echo $AppUI->_('Maximum Allocation Percentage'); ?> </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>
<td align="center"> <select class="text" name="percentage_assignment" title="<?php echo $AppUI->_('Assign with Percentage'); ?> "> <?php for ($i = 0; $i <= 100; $i += 5) { $selected = $i == 30 ? ' selected="selected"' : ''; echo "\t\t\t\t\t\t\t" . '<option value="' . $i . '"' . $selected . '>' . $i . '%</option>' . "\n"; } ?> </select> </td> <td align="center"> <?php echo arraySelect($taskPriority, 'user_task_priority', 'onchange="javascript:chPriority(' . $user_id . ');" size="1" class="text" title="' . $AppUI->_('Change User specific Task Priority of selected Tasks') . '"', 0, true); ?> </td> </tr></table> <?php $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); // do we need to get the children? //$tmptasks.=doChildren($orphTasks,$task->task_id,$user_id,1,$max_levels,$display_week_hours,$sss,$sse); } echo $tmptasks . '</form>'; }
<input type='text' class='text' style='width:120px;text-align:right;' id='bulk_move_date' name='bulk_move_date' value='' /> </td> <th width="15%"><?php echo $AppUI->_('Other'); ?> </th> <td width="130"><?php echo arraySelect($sother, 'bulk_task_other', 'style="width:180px" class="text"', ''); ?> </td> <th width="15%"><?php echo $AppUI->_('Project'); ?> </th> <td width="130"><?php echo arraySelect($sprojects, 'bulk_task_project', 'style="width:300px" class="text"', ''); ?> </td> <td width="100%"> </td> </tr> <tr> <td colspan="20" align="right"><input type="button" class="button" value="<?php echo $AppUI->_('update'); ?> " onclick="if (confirm('Are you sure you wish to apply the update(s) to the selected task(s)?')) document.frm_bulk.submit();" /></td> </tr> </table> </form> <?php function getSpaces($amount)
echo $s; } $projectArray[$project_id] = $project_id; } } } if ($none) { echo '<tr><td colspan="12">' . $AppUI->_('No projects available') . '</td></tr>'; } else { ?> <tr> <td colspan="12" align="right"> <?php $s = '<input type="submit" class="button" value="' . $AppUI->_('Update projects status') . '" />'; $s .= '<input type="hidden" name="update_project_status" value="1" />'; $s .= '<input type="hidden" name="m" value="projects" />'; $s .= arraySelect($pstatus, 'project_status', 'size="1" class="text"', $project_status_filter + 1, true); echo $s; // 2 will be the next step ?> </td> </tr> <?php } ?> </table> </form> <?php if ($is_tabbed) { echo buildPaginationNav($AppUI, $m, $currentTabId, $xpg_totalrecs, $xpg_pagesize, $page); }
<form name="frmDel" action="./index.php?m=system" method="post" accept-charset="utf-8"> <input type="hidden" name="dosql" value="do_billingcode_aed" /> <input type="hidden" name="del" value="1" /> <input type="hidden" name="company_id" value="<?php echo $company_id; ?> " /> <input type="hidden" name="billingcode_id" value="" /> </form> <table width="100%" border="0" cellpadding="1" cellspacing="1" class="std"> <tr> <td> <form name="changeMe" action="./index.php?m=system&a=billingcode" method="post" accept-charset="utf-8"> <?php echo arraySelect($company_list, 'company_id', 'size="1" class="text" onchange="changeIt();"', $company_id, false); ?> </form> </td> </tr> <tr> <th width="40"> <form name="changeuser" action="./index.php?m=system" method="post" accept-charset="utf-8"> <input type="hidden" name="dosql" value="do_billingcode_aed" /> <input type="hidden" name="del" value="0" /> <input type="hidden" name="company_id" value="<?php echo $company_id; ?> " /> <input type="hidden" name="billingcode_status" value="0" /> </th>
$titleBlock->addCrumb('?m=system&a=addeditpref', 'default user preferences'); $titleBlock->show(); // prepare the automated form fields based on db system configuration data $output = null; $last_group = ''; foreach ($rs as $c) { $tooltip = $AppUI->_($c['config_name'] . '_tooltip'); // extraparse the checkboxes and the select lists $extra = ''; $value = ''; switch ($c['config_type']) { case 'select': // Build the select list. if ($c['config_name'] == 'system_timezone') { $timezones = w2PgetSysVal('Timezones'); $entry = arraySelect($timezones, 'w2Pcfg[system_timezone]', 'class=text size=1', w2PgetConfig('system_timezone'), true); } else { $entry = '<select class="text" name="w2Pcfg[' . $c['config_name'] . ']">'; // Find the detail relating to this entry. $children = $w2Pcfg->getChildren($c['config_id']); foreach ($children as $child) { $entry .= '<option value="' . $child['config_list_name'] . '"'; if ($child['config_list_name'] == $c['config_value']) { $entry .= ' selected="selected"'; } $entry .= '>' . $AppUI->_($child['config_list_name'] . '_item_title') . '</option>'; } $entry .= '</select>'; } break; case 'checkbox':
<tr> <td align="right"><?php echo $AppUI->_('Postcode') . ' / ' . $AppUI->_('Zip Code'); ?> :</td> <td colspan="2"><input type="text" class="text" name="contact_zip" value="" maxlength="50" size="40" /> </td> </tr> <tr> <td align="right"><?php echo $AppUI->_('Country'); ?> :</td> <td colspan="2"> <?php $countries = array('' => $AppUI->_('(Select a Country)')) + w2PgetSysVal('GlobalCountries'); echo arraySelect($countries, 'contact_country', 'size="1" class="text"', 0); ?> </td> </tr> <tr> <td valign="middle" align="right">* <?php echo $AppUI->_('Anti Spam Security'); ?> :</td> <td valign="middle" width="50"><input type="text" class="text" id="spam" name="spam_check" value="" maxlength="5" size="5" /></td> <td valign="middle" align="left"><img src="<?php echo W2P_BASE_URL; ?> /lib/captcha/CaptchaImage.php?uid=54;<?php echo $uid; ?>
$last_time->setTime(23, 59, 59); $prev_day = new w2p_Utilities_Date(Date_calc::prevDay($dd, $mm, $yy, FMT_TIMESTAMP_DATE)); $next_day = new w2p_Utilities_Date(Date_calc::nextDay($dd, $mm, $yy, FMT_TIMESTAMP_DATE)); // get the list of visible companies $company = new CCompany(); global $companies; $companies = $company->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name'); $companies = arrayMerge(array('0' => $AppUI->_('All')), $companies); // setup the title block $titleBlock = new CTitleBlock('Day View', 'myevo-appointments.png', $m, $m . '.' . $a); $titleBlock->addCrumb('?m=calendar&a=year_view&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'year view'); $titleBlock->addCrumb('?m=calendar&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'month view'); $titleBlock->addCrumb('?m=calendar&a=week_view&date=' . $this_week, 'week view'); $titleBlock->addCrumb('?m=calendar&a=day_view&date=' . $this_day->format(FMT_TIMESTAMP_DATE), 'day view'); $titleBlock->addCell($AppUI->_('Company') . ':'); $titleBlock->addCell(arraySelect($companies, 'company_id', 'onChange="document.pickCompany.submit()" class="text"', $company_id), '', '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickCompany" accept-charset="utf-8">', '</form>'); $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new event') . '">', '', '<form action="?m=calendar&a=addedit&date=' . $this_day->format(FMT_TIMESTAMP_DATE) . '" method="post" accept-charset="utf-8">', '</form>'); $titleBlock->show(); ?> <script language="javascript"> function clickDay( idate, fdate ) { window.location = './index.php?m=calendar&a=day_view&date='+idate+'&tab=0'; } </script> <table class="std" width="100%" cellspacing="0" cellpadding="4"> <tr> <td valign="top"> <table border="0" cellspacing="1" cellpadding="2" width="100%" class="motitle"> <tr> <td>
?> :</td> <td> <?php echo arraySelect($users, 'forum_owner', 'size="1" class="text"', $forum_info['forum_owner'] ? $forum_info['forum_owner'] : $AppUI->user_id); ?> </td> </tr> <tr> <td align="right" nowrap><?php echo $AppUI->_('Moderator'); ?> :</td> <td> <?php echo arraySelect($users, 'forum_moderated', 'size="1" class="text"', $forum_info['forum_moderated']); ?> </td> </tr> <?php if ($forum_id) { ?> <tr> <td align="right"><?php echo $AppUI->_('Created On'); ?> </td> <td bgcolor="#ffffff"><?php echo @$forum_info["forum_create_date"]; ?> </td>
function parseEditField($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 align='left'><input type='text' name='custom_{$key}' class='text' " . $field_config["options"] . " value='" . (isset($this->previous_data[$key]) ? $this->previous_data[$key] : "") . "' /></td>"; break; case "select": $parsed .= "<td align='left'>" . arraySelect(explode(",", $field_config["selects"]), "custom_{$key}", 'size="1" class="text" ' . $field_config["options"], isset($this->previous_data[$key]) ? $this->previous_data[$key] : "") . "</td>"; break; case "textarea": $parsed .= "<td align='left'><textarea name='custom_{$key}' class='textarea'" . $field_config["options"] . ">" . (isset($this->previous_data[$key]) ? $this->previous_data[$key] : "") . "</textarea></td>"; break; case "checkbox": $options_array = explode(",", $field_config["selects"]); $parsed .= "<td align='left'>"; foreach ($options_array 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' style='border:0' {$checked} " . $field_config["options"] . " />{$option}<br />"; $checked = ""; } $parsed .= "</td>"; break; } $parsed .= "</tr>"; return $parsed; }
?> "> <input type="hidden" name="user_name" value="<?php echo $user_name; ?> "> <input type="hidden" name="role_id" value=""> <tr> <th colspan='2'><?php echo $AppUI->_('Add Role'); ?> </th> </tr> <tr> <td colspan='2' width="100%"><?php echo arraySelect($roles_arr, 'user_role', 'size="1" class="text"', '', true); ?> </td> </tr> <tr> <td> <input type="reset" value="<?php echo $AppUI->_('clear'); ?> " class="button" name="sqlaction" onClick="clearIt();"> </td> <td align="right"> <input type="submit" value="<?php echo $AppUI->_('add'); ?> " class="button" name="sqlaction2">
$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" accept-charset="utf-8">', '</form>'); $titleBlock->addCell(); if ($canEdit && $project_id) { $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new task') . '">', '', '<form action="?m=tasks&a=addedit&task_project=' . $project_id . '" method="post" accept-charset="utf-8">', '</form>'); } $titleBlock->show(); if (w2PgetParam($_GET, 'inactive', '') == 'toggle') { $AppUI->setState('inactive', $AppUI->getState('inactive') == -1 ? 0 : -1); } $in = $AppUI->getState('inactive') == -1 ? '' : 'in'; // use a new title block (a new row) to prevent from oversized sites $titleBlock = new w2p_Theme_TitleBlock('', 'shim.gif'); $titleBlock->showhelp = false; $titleBlock->addCell(' ' . $AppUI->_('Task Filter') . ':'); $titleBlock->addCell(arraySelect($filters, 'f', 'size="1" class="text" onChange="document.taskFilter.submit();"', $f, true), '', '<form action="?m=tasks" method="post" name="taskFilter" accept-charset="utf-8">', '</form>'); $titleBlock->addCell(); $titleBlock->addCrumb('?m=tasks&a=todo&user_id=' . $user_id, 'my todo'); if (w2PgetParam($_GET, 'pinned') == 1) { $titleBlock->addCrumb('?m=tasks', 'all tasks'); } else { $titleBlock->addCrumb('?m=tasks&pinned=1', 'my pinned tasks'); } $titleBlock->addCrumb('?m=tasks&inactive=toggle', 'show ' . $in . 'active tasks'); $titleBlock->addCrumb('?m=tasks&a=tasksperuser', 'tasks per user'); if (!$project_id) { if (!isset($query_string)) { $query_string = ''; } $titleBlock->addCell(' <form name="task_list_options" method="post" action="' . $query_string . '" accept-charset="utf-8">
?> " /> </form> <?php $priorities = w2Pgetsysval('TaskPriority'); $types = w2Pgetsysval('TaskType'); $durntype = w2PgetSysVal('TaskDurationType'); global $task_access; $task_access = is_array($task_access) ? $task_access : array(); $extra = array(0 => '(none)', 1 => 'Milestone', 2 => 'Dynamic Task', 3 => 'Inactive Task'); $sel_priorities = arraySelect($priorities, 'add_task_priority0', 'style="width:80px" class="text"', '0'); $sel_types = arraySelect($types, 'add_task_type0', 'style="width:80px" class="text"', ''); $sel_access = arraySelect($task_access, 'add_task_access0', 'style="width:80px" class="text"', ''); $sel_extra = arraySelect($extra, 'add_task_extra0', 'style="width:80px" class="text"', ''); $sel_durntype = arraySelect($durntype, 'add_task_durntype0', 'style="width:80px" class="text"', '', true); ?> <script language="javascript"> // 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 <?php if ($canEdit) { ?> function delIt() { if (confirm( '<?php echo $AppUI->_('doDelete', UI_OUTPUT_JS) . ' ' . $AppUI->_('Project', UI_OUTPUT_JS) . '?'; ?> ' )) { document.frmDelete.submit(); }
?> "> <input type="text" name="log_date" size="10" value="<?php echo $log_date->format($df); ?> " class="text" disabled="disabled"> <a href="#" onClick="popCalendar('log_date')"> <img src="./images/calendar.gif" width="24" height="12" alt="<?php echo $AppUI->_('Calendar'); ?> " border="0" /> </a> </td> <td> <?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
$sprojects[$prj_id] = $idx_companies[$prj_id] . ': ' . $prj_name; } asort($sprojects); $sprojects = array('O' => '(' . $AppUI->_('Move to Project', UI_OUTPUT_RAW) . ')') + array('0' => '(' . $AppUI->_('All Projects', UI_OUTPUT_RAW) . ')') + $sprojects; ?> <tr> <td colspan="50" align="right"> <form name='frm_bulk' method='POST' action='?m=files&a=do_files_bulk_aed'> <input type="hidden" name="redirect" value="<?php echo $current_uri; ?> " /> <table id="tbl_bulk" name="tbl_bulk"> <tr> <td><?php echo arraySelect($sprojects, 'bulk_file_project', 'style="width:180px" class="text"', 'O'); ?> </td> <td><?php echo arraySelectTree($folders, 'bulk_file_folder', 'style="width:180px;" class="text"', 'O'); ?> </td> <td align="right"><input type="button" class="button" value="<?php echo $AppUI->_('Go'); ?> " onclick="if (confirm('Are you sure you wish to apply the options on the selected files?')) document.frm_bulk.submit();" /></td> </tr> </table> </form> </td> </tr>
$project = new CProject(); $extra = array('from' => 'files', 'where' => 'project_id = file_project'); $projects = $project->getAllowedRecords($AppUI->user_id, 'project_id,project_name', 'project_name', null, $extra); $projects = arrayMerge(array('0' => $AppUI->_('All', UI_OUTPUT_RAW)), $projects); // get SQL for allowed projects/tasks and folders $task = new CTask(); $allowedProjects = $project->getAllowedSQL($AppUI->user_id, 'file_project'); $allowedTasks = $task->getAllowedSQL($AppUI->user_id, 'file_task'); $cfObj = new CFileFolder(); $allowedFolders = $cfObj->getAllowedSQL($AppUI->user_id, 'file_folder'); //get permissions for folder tab $canAccess_folders = getPermission('file_folders', 'access'); // setup the title block $titleBlock = new CTitleBlock('Files', 'folder5.png', $m, $m . '.' . $a); $titleBlock->addCell($AppUI->_('Filter') . ':'); $titleBlock->addCell(arraySelect($projects, 'project_id', 'onchange="javascript:document.pickProject.submit()" size="1" class="text"', $project_id), '', '<form name="pickProject" action="?m=files" method="post">', '</form>'); /* * override the file module's $canEdit variable passed from the main index.php * in order to check on file folder permissions */ $canAuthor_folders = getPermission('file_folders', 'add'); if ($canAuthor) { $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '" />', '', '<form action="?m=files&a=addedit&folder=' . $folder . '" method="post">', '</form>'); } if ($canAuthor_folders) { $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new folder') . '" />', '', '<form action="?m=files&a=addedit_folder" method="post">', '</form>'); } $titleBlock->show(); $file_types = dPgetSysVal('FileType'); $fts = $file_types; if ($tab != -1) {
} ?> <form action="index.php?m=public&a=contact_selector&dialog=1<?php echo !is_null($call_back) ? '&call_back=' . $call_back : ''; ?> &company_id=<?php echo $company_id; ?> " method='post' name='frmContactSelect'> <?php $pointer_department = ''; $pointer_company = ''; $companies_names = array(0 => $AppUI->_('Select a company')) + $aCpies; echo arraySelect($companies_names, 'company_id', 'onchange="document.frmContactSelect.contacts_submited.value=0; ' . 'setContactIDs(); document.frmContactSelect.submit();"', 0); ?> <br /> <h4><a href="#" onClick="window.location.href=setContactIDs('GET','dialog=1<?php echo !is_null($call_back) ? '&call_back=' . $call_back : ''; ?> &show_all=1');"> <?php echo $AppUI->_('View all allowed companies'); ?> </a></h4> <hr /> <h2><?php echo $AppUI->_('Contacts for'); ?>
} } // check for requestor filter if ($HELPDESK_CONFIG['search_criteria_requestor']) { if (isset($_GET['requestor'])) { $AppUI->setState('HelpDeskRequestor', $_GET['requestor']); } $requestor = $AppUI->getState('HelpDeskRequestor') !== null ? $AppUI->getState('HelpDeskRequestor') : -1; if (isset($requestor) && strlen($requestor) > 0 && $requestor != '-1') { $tarr[] = "hi.item_requestor='{$requestor}'"; } // retrieve requestor list $sql = "SELECT distinct(item_requestor) as requestor, item_requestor\n\t\t FROM helpdesk_items\n\t\t WHERE " . getCompanyPerms("item_company_id", NULL, PERM_READ) . "\n\t\t ORDER BY item_requestor"; $requestor_list = db_loadHashList($sql); if (!$_REQUEST['project_id']) { $selectors[] = "<td align=\"right\"><label for=\"requestor\">" . $AppUI->_('Requestor') . ":</label></td><td>" . arraySelect(arrayMerge(array('-1' => $AppUI->_('All')), $requestor_list), 'requestor', 'size="1" id="requestor" class="text" onchange="changeList()"', $requestor) . "</td>"; } } $where = getItemPerms(); if (count($tarr)) { $where .= 'AND (' . implode("\n AND ", $tarr) . ') '; } $sql = "SELECT hi.*,\n CONCAT(co.contact_first_name,' ',co.contact_last_name) assigned_fullname,\n co.contact_email as assigned_email,\n p.project_id,\n p.project_name,\n p.project_color_identifier\n FROM helpdesk_items hi\n LEFT JOIN users u2 ON u2.user_id = hi.item_assigned_to\n LEFT JOIN contacts co ON u2.user_contact = co.contact_id\n LEFT JOIN projects p ON p.project_id = hi.item_project_id\n WHERE {$where}\n ORDER BY "; // Do custom order by if needed, default at the end if ($orderby == "project_name") { $sql .= "p.project_name"; } elseif ($orderby == "item_assigned_to") { $sql .= "assigned_fullname"; } elseif ($orderby == "item_updated") { $sql .= "hi.item_updated"; } else {
$s .= $CT . '<input type="checkbox" name="project_id[]" value="' . $row['project_id'] . '" />'; } else { $s .= $CT . ' '; } $s .= $CR . '</td>'; } $s .= $CR . '</tr>'; echo $s; } } if ($none) { echo $CR . '<tr><td colspan="' . $table_cols . '">' . $AppUI->_('No projects available') . '</td></tr>'; } else { ?> <tr> <td colspan="<?php echo $table_cols; ?> " align="right"> <?php echo '<input type="submit" class="button" value="' . $AppUI->_('Update projects status') . '" />'; echo '<input type="hidden" name="update_project_status" value="1" />'; echo '<input type="hidden" name="m" value="projects" />'; echo arraySelect($pstatus, 'project_status', 'size="1" class="text"', 2, true); } ?> </td> </tr> </table> </form>
<a href="<?php echo '?m=planner&date=' . $next_day->format(FMT_TIMESTAMP_DATE); ?> "><img src="<?php echo w2PfindImage('next.gif'); ?> " width="16" height="16" alt="next" border="0"></a> </td> </tr> </table> <?php $html = ' <form action="' . $_SERVER['REQUEST_URI'] . '" method="post" name="pickFilter" accept-charset="utf-8">'; $html .= $AppUI->_('Event Filter') . ':' . arraySelect($event_filter_list, 'event_filter', 'onChange="document.pickFilter.submit()" class="text"', $event_filter, true); if ($other_users) { $html .= $AppUI->_('Show Events for') . ':' . '<select name="show_user_events" onchange="document.pickFilter.submit()" class="text">'; if ($rows = w2PgetUsersList()) { foreach ($rows as $row) { if ($user_id == $row['user_id']) { $html .= '<option value="' . $row['user_id'] . '" selected="selected">' . $row['contact_first_name'] . ' ' . $row['contact_last_name']; } else { $html .= '<option value="' . $row['user_id'] . '">' . $row['contact_first_name'] . ' ' . $row['contact_last_name']; } } } $html .= '</select>'; } $w2p_base_url = W2P_BASE_URL; require_once W2P_BASE_DIR . '/modules/events/links_events.php';
self.close(); </script> <?php } else { ?> <form name="frmSelector" action="./index.php?m=contacts&a=select_contact_company&dialog=1&table_name=<?php echo $table_name . "&{$additional_get_information}"; ?> " method="post"> <table cellspacing="0" cellpadding="3" border="0"> <tr> <td colspan="2"> <?php echo $AppUI->_('Select') . ' ' . $AppUI->_($selection_string) . ':<br />'; echo arraySelect($company_list, $id_field, ' size="10"', $company_id); ?> </td> </tr> <tr> <td> <input type="button" class="button" value="<?php echo $AppUI->_('cancel'); ?> " onclick="window.close()" /> </td> <td align="right"> <input type="checkbox" name="overwrite_address" id="overwrite_address" /> <label for="overwrite_address"><?php echo $AppUI->_("Overwrite contact address information"); ?> </label>
:</td> <td> <?php echo arraySelect($owners, 'company_owner', 'size="1" class="text"', @$obj->company_owner ? $obj->company_owner : $AppUI->user_id); ?> </td> </tr> <tr> <td align="right"><?php echo $AppUI->_('Type'); ?> :</td> <td> <?php echo arraySelect($types, 'company_type', 'size="1" class="text"', @$obj->company_type, true); ?> </td> </tr> <tr> <td align="right" valign=top><?php echo $AppUI->_('Description'); ?> :</td> <td align="left"> <textarea cols="70" rows="10" class="textarea" name="company_description"><?php echo @$obj->company_description; ?> </textarea> </td>
?> </td> </tr> <?php } else { echo '<input type="hidden" name="dept_parent" value="0">'; } ?> <tr> <td align="right"><?php echo $AppUI->_('Owner'); ?> :</td> <td> <?php echo arraySelect($owners, 'dept_owner', 'size="1" class="text"', $drow["dept_owner"]); ?> </td> </tr> <tr> <td align="right" valign="top" nowrap><?php echo $AppUI->_('Description'); ?> :</td> <td align="left"> <textarea cols="70" rows="10" class="textarea" name="dept_desc"><?php echo @$drow["dept_desc"]; ?> </textarea> </td> </tr>