本文整理汇总了PHP中w2PformSafe函数的典型用法代码示例。如果您正苦于以下问题:PHP w2PformSafe函数的具体用法?PHP w2PformSafe怎么用?PHP w2PformSafe使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了w2PformSafe函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: foreach
</table>
</td>
<?php
if ($w2Pconfig['direct_edit_assignment']) {
?>
<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(<?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
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:tasks.php
示例2: w2PgetParam
}
$tab = $AppUI->processIntState('UserIdxTab', $_GET, 'tab', 0);
$perms =& $AppUI->acl();
if (!canView('users')) {
$AppUI->redirect(ACCESS_DENIED);
}
if (isset($_GET['stub'])) {
$AppUI->setState('UserIdxStub', w2PgetParam($_GET, 'stub', null));
$AppUI->setState('UserIdxWhere', '');
} elseif (isset($_POST['search_string'])) {
$AppUI->setState('UserIdxWhere', $_POST['search_string']);
$AppUI->setState('UserIdxStub', '');
}
$stub = $AppUI->getState('UserIdxStub');
$where = $AppUI->getState('UserIdxWhere');
$where = w2PformSafe($where, true);
if (isset($_GET['orderby'])) {
$AppUI->setState('UserIdxOrderby', w2PgetParam($_GET, 'orderby', null));
}
$orderby = $AppUI->getState('UserIdxOrderby') ? $AppUI->getState('UserIdxOrderby') : 'user_username';
$orderby = $tab == 3 || $orderby != 'date_time_in' && $orderby != 'user_ip' ? $orderby : 'user_username';
// Pull First Letters
$letters = CUser::getFirstLetters();
$letters = $letters . CContact::getFirstLetters($AppUI->user_id, true);
$a2z = '<a href="./index.php?m=users&stub=0">' . $AppUI->_('All') . '</a> ';
for ($c = 65; $c < 91; $c++) {
$cu = chr($c);
$cell = !(mb_strpos($letters, $cu) === false) ? '<a href="?m=users&stub=' . $cu . '">' . $cu . '</a>' : '<font color="#999999">' . $cu . '</font>';
$a2z .= $cell . ' ';
}
// setup the title block
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:index.php
示例3: while
$i = 0;
for ($y = 0; $y <= $carrWidth; $y++) {
$x = 0;
while ($x < $t && isset($rows[$i]) && ($row = $rows[$i])) {
$carr[$y][] = $row;
$x++;
$i++;
}
}
}
$tdw = floor(100 / $carrWidth);
/**
* Contact search form
*/
// Let's remove the first '%' that we previously added to ContIdxWhere
$default_search_string = w2PformSafe(substr($AppUI->getState('ContIdxWhere'), '', strlen($AppUI->getState('ContIdxWhere'))), true);
$form = '<form action="./index.php" method="get" accept-charset="utf-8">' . $AppUI->_('Search for') . '
<input type="text" class="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&search_string=0">' . $AppUI->_('Reset search') . '</a>
</form>';
// En of contact search form
$a2z = '<table cellpadding="2" cellspacing="1" border="0">';
$a2z .= '<tr>';
$a2z .= '<td width="100%" align="right">' . $AppUI->_('Show') . ': </td>';
$a2z .= '<td><a href="./index.php?m=contacts&where=0">' . $AppUI->_('All') . '</a></td>';
// Pull First Letters
$letters = CContact::getFirstLetters($AppUI->user_id);
for ($c = 65; $c < 91; $c++) {
$cu = chr($c);
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:index.php
示例4: die
<?php
if (!defined('W2P_BASE_DIR')) {
die('You should not access this file directly.');
}
$tab = $AppUI->processIntState('ProjIdxTab', $_GET, 'tab', 5);
$project = new CProject();
$structprojs = $project->getProjects();
$search_string = w2PgetParam($_POST, 'search_string', '');
$AppUI->setState($m . '_search_string', $search_string);
$search_string = w2PformSafe($search_string, true);
$canCreate = $project->canCreate();
$company_id = w2PgetConfig('company_filter_default', 'user') == 'user' ? $AppUI->user_company : '-1';
$orderby = isset($_GET['orderby']) && property_exists('CProject', $_GET['orderby']) ? $_GET['orderby'] : 'project_name';
$project_type = $AppUI->processIntState('ProjIdxType', $_POST, 'project_type', -1);
$owner = $AppUI->processIntState('ProjIdxowner', $_POST, 'project_owner', -1);
$orderdir = $AppUI->getState('ProjIdxOrderDir') ? $AppUI->getState('ProjIdxOrderDir') : 'asc';
if (isset($_GET['orderby'])) {
if ($AppUI->getState('ProjIdxOrderDir') == 'asc') {
$orderdir = 'desc';
} else {
$orderdir = 'asc';
}
}
$AppUI->setState('ProjIdxOrderDir', $orderdir);
// collect the full projects list data via function in projects.class.php
$search_text = $search_string;
// @note this is only because the projects_list_data function takes a bunch of globals
//$projects = projects_list_data();
$oCompany = new CCompany();
$allowedCompanies[-1] = $AppUI->_('all');
开发者ID:victorrod,项目名称:web2project,代码行数:31,代码来源:index.php
示例5: w2PformSafe
if ($obj->resource_max_allocation) {
echo w2PformSafe($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="60" rows="7"><?php
echo w2PformSafe($obj->resource_note);
?>
</textarea></td>
</tr>
</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
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:addedit.php
示例6: parseViewField
public 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">' . w2PformSafe(isset($this->previous_data[$key]) ? $this->previous_data[$key] : '') . '</td>';
break;
case 'href':
$parsed .= '<td class="hilite"><a href="' . w2PformSafe(isset($this->previous_data[$key]) ? $this->previous_data[$key] : '') . '">' . w2PformSafe(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">' . w2PformSafe(isset($this->previous_data[$key]) ? $optionarray[$this->previous_data[$key]] : '') . '</td>';
break;
case 'textarea':
$parsed .= '<td valign="top" class="hilite">' . w2PformSafe(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;
}
开发者ID:illuminate3,项目名称:web2project,代码行数:35,代码来源:CustomFieldsParser.class.php
示例7: showRow
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 . '" /> </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> </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;
}
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:29,代码来源:cleanup_functions.php
示例8: getProjects
$AppUI->savePlace();
$structprojs = getProjects();
// Let's update project status!
if (isset($_GET['update_project_status']) && isset($_GET['project_status']) && isset($_GET['project_id'])) {
$projects_id = w2PgetParam($_GET, 'project_id', array());
// This must be an array
$statusId = w2PgetParam($_GET, 'project_status', 0);
$project = new CProject();
foreach ($projects_id as $project_id) {
$project->load($project_id);
$project->project_status = $statusId;
$project->store($AppUI);
}
}
if (isset($_POST['projsearchtext'])) {
$AppUI->setState('projsearchtext', w2PformSafe($_POST['projsearchtext'], true));
}
$search_text = $AppUI->getState('projsearchtext') !== null ? $AppUI->getState('projsearchtext') : '';
$projectDesigner = $AppUI->getState('ProjIdxProjectDesigner') !== null ? $AppUI->getState('ProjIdxProjectDesigner') : 0;
$tab = $AppUI->processIntState('ProjIdxTab', $_GET, 'tab', 1);
$currentTabId = $tab;
$active = intval(!$AppUI->getState('ProjIdxTab'));
$oCompany = new CCompany();
$allowedCompanies = $oCompany->getAllowedRecords($AppUI->user_id, 'company_id,company_name');
if (isset($_POST['company_id'])) {
$AppUI->setState('ProjIdxCompany', intval($_POST['company_id']));
}
$company_id = $AppUI->getState('ProjIdxCompany') !== null ? $AppUI->getState('ProjIdxCompany') : (isset($allowedCompanies[$AppUI->user_company]) ? $AppUI->user_company : 0);
$company_prefix = 'company_';
if (isset($_POST['department'])) {
$AppUI->setState('ProjIdxDepartment', $_POST['department']);
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:index.php
示例9: projectSelectWithOptGroup
:<br/>
</td>
<td colspan="3">
<?php
echo projectSelectWithOptGroup($AppUI->user_id, 'import_tasks_from', 'size="1" class="text"', false, $project_id);
?>
</td>
</tr>
<tr>
<td colspan="4">
<?php
echo $AppUI->_('Description');
?>
<br />
<textarea name="project_description" cols="50" rows="10" class="textarea"><?php
echo w2PformSafe($project->project_description);
?>
</textarea>
</td>
</tr>
<tr valign="middle">
<table cellspacing="0" cellpadding="2" border="0" width="100%">
<tr>
<td valign="middle"><?php
echo $AppUI->_('Notify by Email');
?>
:
<input type="checkbox" name="email_project_owner_box" id="email_project_owner_box" <?php
echo $tt ? 'checked="checked"' : '';
?>
/>
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:addedit.php
示例10: w2PformSafe
$s .= '</td><td>';
$langs['english'] = w2PformSafe($langs['english'], true);
if ($lang == 'en') {
if (mb_strlen($langs['english']) < 40) {
$s .= '<input type="text" name="trans[' . $index . '][english]" value="' . $langs['english'] . '" size="40" class="text" />';
} else {
$rows = round(mb_strlen($langs['english'] / 35)) + 1;
$s .= '<textarea name="trans[' . $index . '][english]" cols="40" class="small" rows="' . $rows . '">' . $langs['english'] . '</textarea>';
}
} else {
$s .= $langs['english'];
$s .= '<input type="hidden" name="trans[' . $index . '][english]" value="' . ($k ? $k : $langs['english']) . '" size="20" class="text" />';
}
$s .= '</td><td>';
if ($lang != 'en') {
$langs['lang'] = w2PformSafe($langs['lang'], true);
if (mb_strlen($langs['lang']) < 40) {
$s .= '<input type="text" name="trans[' . $index . '][lang]" value="' . $langs['lang'] . '" size="40" class="text" />';
} else {
$rows = round(mb_strlen($langs['lang'] / 35)) + 1;
$s .= '<textarea name="trans[' . $index . '][lang]" cols="40" class="small" rows="' . $rows . '">' . $langs['lang'] . '</textarea>';
}
}
$s .= '</td><td align="center"><input type="checkbox" name="trans[' . $index . '][del]" /></td></tr>';
$index++;
}
echo $s;
?>
<tr>
<td colspan="4" align="right">
<input type="submit" value="<?php
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:translate.php
示例11: while
$i = 0;
for ($y = 0; $y <= $carrWidth; $y++) {
$x = 0;
while ($x < $t && isset($rows[$i]) && ($row = $rows[$i])) {
$carr[$y][] = $row;
$x++;
$i++;
}
}
}
$tdw = floor(100 / $carrWidth);
/**
* Contact search form
*/
// Let's remove the first '%' that we previously added to ContIdxWhere
$default_search_string = w2PformSafe($AppUI->getState('ContIdxWhere'), true);
$form = '<form action="./index.php" method="get" accept-charset="utf-8">' . $AppUI->_('Search for') . '
<input type="text" class="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&search_string=0">' . $AppUI->_('Reset search') . '</a>
</form>';
// En of contact search form
$a2z = '<table cellpadding="2" cellspacing="1" border="0">';
$a2z .= '<tr>';
$a2z .= '<td width="100%" align="right">' . $AppUI->_('Show') . ': </td>';
$a2z .= '<td><a href="./index.php?m=contacts&where=0">' . $AppUI->_('All') . '</a></td>';
// Pull First Letters
$letters = CContact::getFirstLetters($AppUI->user_id);
for ($c = 65; $c < 91; $c++) {
$cu = chr($c);
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:index.php
示例12: displayTask
function displayTask($list, $task, $level, $display_week_hours, $fromPeriod, $toPeriod, $user_id)
{
global $AppUI, $df, $durnTypes, $log_userfilter_users, $now, $priority, $system_users, $z, $zi, $x, $userAlloc, $projects;
//if the user has no permission to the project don't show the tasks
if (!key_exists($task->task_project, $projects)) {
return;
}
$zi++;
$users = $task->task_assigned_users;
$task->userPriority = $task->getUserSpecificTaskPriority($user_id);
$project = $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 < 0) {
$tmp .= '<img src="' . w2PfindImage('icons/priority-' . -$task->userPriority . '.gif') . '" width="13" height="16">';
} elseif ($task->userPriority > 0) {
$tmp .= '<img src="' . w2PfindImage('icons/priority+' . $task->userPriority . '.gif') . '" width="13" height="16">';
}
$tmp .= '</td>';
$tmp .= '<td>';
for ($i = 0; $i < $level; $i++) {
$tmp .= ' ';
}
if ($task->task_milestone == true) {
$tmp .= '<b>';
}
if ($level >= 1) {
$tmp .= w2PshowImage('corner-dots.gif', 16, 12, 'Subtask', '', 'tasks') . ' ';
}
$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 .= ' (<img src="' . w2PfindImage('icons/priority-' . -$task->task_priority . '.gif') . '" width="13" height="16" />)';
} elseif ($task->task_priority > 0) {
$tmp .= ' (<img src="' . w2PfindImage('icons/priority+' . $task->task_priority . '.gif') . '" width="13" height="16" />)';
}
$tmp .= '</td>';
$tmp .= '<td align="left">';
$tmp .= '<a href="?m=projects&a=view&project_id=' . $task->task_project . '" style="background-color:#' . $project['project_color_identifier'] . '; color:' . bestColor($project['project_color_identifier']) . '">' . $project['project_short_name'] . '</a>';
$tmp .= '</td>';
$tmp .= '<td align="right" nowrap="nowrap">';
$tmp .= $task->task_duration . ' ' . mb_substr($AppUI->_($durnTypes[$task->task_duration_type]), 0, 1);
$tmp .= '</td>';
$tmp .= '<td align="center" nowrap="nowrap">';
$dt = new CDate($task->task_start_date);
$tmp .= $dt->format($df);
$tmp .= '   </td>';
$tmp .= '<td align="right" 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 $key => $row) {
if ($row['user_id']) {
$us .= '<a href="?m=admin&a=viewuser&user_id=' . $row[0] . '">' . $sep . $row['contact_first_name'] . ' ' . $row['contact_last_name'] . ' (' . $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;
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++;
}
$tmp .= '<td valign="top" align="center" nowrap="nowrap">';
$tmp .= '<select name="add_users" style="width:200px" size="10" class="text" multiple="multiple" ondblclick="javascript:chAssignment(' . $user_id . ', 0, false)">';
foreach ($userAlloc as $v => $u) {
$tmp .= '<option value="' . $u['user_id'] . '">' . w2PformSafe($u['userFC']) . '</option>';
}
$tmp .= '</select>';
$tmp .= '</td>';
}
$tmp .= '</tr>';
return $tmp;
}
开发者ID:joly,项目名称:web2project,代码行数:98,代码来源:tasksperuser_sub.php
示例13: arraySelect
</tr>
<tr>
<td align="right"><?php
echo $AppUI->_('Country');
?>
:</td>
<td>
<?php
echo arraySelect($countries, 'company_country', 'size="1" class="text"', $company->company_country ? $company->company_country : 0);
?>
</td>
</tr>
<tr>
<td align="right">
URL http://<a name="x"></a></td><td><input type="text" class="text" value="<?php
echo w2PformSafe($company->company_primary_url);
?>
" name="company_primary_url" size="50" maxlength="255" />
<a href="javascript: void(0);" onclick="testURL('CompanyURLOne')">[<?php
echo $AppUI->_('test');
?>
]</a>
</td>
</tr>
<tr>
<td align="right"><?php
echo $AppUI->_('Company Owner');
?>
:</td>
<td>
<?php
开发者ID:joly,项目名称:web2project,代码行数:31,代码来源:addedit.php
示例14: addField
public function addField($fieldName, $fieldValue, $options = array(), $values = array())
{
$pieces = explode('_', $fieldName);
$suffix = end($pieces);
$params = '';
foreach ($options as $key => $value) {
$params .= $key . '="' . $value . '" ';
}
switch ($suffix) {
case 'company':
$class = 'C' . ucfirst($suffix);
$obj = new $class();
$obj->load($fieldValue);
$link = '?m=' . w2p_pluralize($suffix) . '&a=view&' . $suffix . '_id=' . $fieldValue;
$output = '<a href="' . $link . '">' . $obj->{"{$suffix}" . '_name'} . '</a>';
break;
case 'desc':
// @todo This is a special case because department->dept_notes should be renamed department->dept_description
// @todo This is a special case because department->dept_notes should be renamed department->dept_description
case 'note':
// @todo This is a special case because resource->resource_note should be renamed resource->resource_description
// @todo This is a special case because resource->resource_note should be renamed resource->resource_description
case 'notes':
// @todo This is a special case because contact->contact_notes should be renamed contact->contact_description
// @todo This is a special case because contact->contact_notes should be renamed contact->contact_description
case 'signature':
// @todo This is a special case because user->user_signature should be renamed to something else..?
// @todo This is a special case because user->user_signature should be renamed to something else..?
case 'description':
$output = '<textarea name="' . $fieldName . '" class="' . $suffix . '">' . w2PformSafe($fieldValue) . '</textarea>';
break;
case 'birthday':
// @todo This is a special case because contact->contact_birthday should be renamed contact->contact_birth_date
$myDate = intval($fieldValue) ? new w2p_Utilities_Date($fieldValue) : null;
$date = $myDate ? $myDate->format('%Y-%m-%d') : '-';
$output = '<input type="text" class="text ' . $suffix . '" ';
$output .= 'name="' . $fieldName . '" value="' . w2PformSafe($date) . '" ' . $params . ' />';
break;
case 'date':
$date = $fieldValue ? new w2p_Utilities_Date($fieldValue) : null;
unset($pieces[0]);
$datename = implode('_', $pieces);
$output = '<input type="hidden" name="' . $fieldName . '" id="' . $fieldName . '" value="' . ($date ? $date->format(FMT_TIMESTAMP_DATE) : '') . '" />';
$output .= '<input type="text" name="' . $datename . '" id="' . $datename . '" onchange="setDate_new(\'editFrm\', \'' . $datename . '\');" value="' . ($date ? $date->format($this->df) : '') . '" class="text" />';
$output .= '<a href="javascript: void(0);" onclick="return showCalendar(\'' . $datename . '\', \'' . $this->df . '\', \'editFrm\', null, true, true)">';
$output .= '<img src="' . w2PfindImage('calendar.gif') . '" alt="' . $this->AppUI->_('Calendar') . '" />';
$output .= '</a>';
break;
case 'private':
case 'updateask':
// @todo This is unique to the contacts module
$output = '<input type="checkbox" value="1" class="text ' . $suffix . '" ';
$output .= 'name="' . $fieldName . '" ' . $params . ' />';
break;
case 'parent':
// @note This drops through on purpose
$suffix = 'department';
case 'allocation':
case 'category':
case 'country':
case 'owner':
case 'priority':
case 'project':
case 'status':
case 'type':
$output = arraySelect($values, $fieldName, 'size="1" class="text ' . $suffix . '"', $fieldValue);
break;
case 'url':
$output = 'http://<input type="text" class="text ' . $suffix . '" ';
$output .= 'name="' . $fieldName . '" value="' . w2PformSafe($fieldValue) . '" ' . $params . ' />';
$output .= '<a href="javascript: void(0);" onclick="testURL()">[' . $this->AppUI->_('test') . ']</a>';
break;
/**
* This handles the default input text input box. It currently covers these fields:
* all names, email, phone1, phone2, url, address1, address2, city, state, zip, fax, title, job
*/
/**
* This handles the default input text input box. It currently covers these fields:
* all names, email, phone1, phone2, url, address1, address2, city, state, zip, fax, title, job
*/
default:
$output = '<input type="text" class="text ' . $suffix . '" ';
$output .= 'name="' . $fieldName . '" value="' . w2PformSafe($fieldValue) . '" ' . $params . ' />';
}
return $output;
}
开发者ID:illuminate3,项目名称:web2project,代码行数:86,代码来源:FormHelper.class.php
注:本文中的w2PformSafe函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论