本文整理汇总了PHP中getPostToForm函数的典型用法代码示例。如果您正苦于以下问题:PHP getPostToForm函数的具体用法?PHP getPostToForm怎么用?PHP getPostToForm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getPostToForm函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: buildTableForm
function buildTableForm($rows, $mod = '')
{
global $odd_bg, $even_bg;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
$cols = sizeof($rows[0]) * 2 + 1;
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_DUPLICATE'] . '</td></tr><tr><td height="20"></td></tr></table>';
$form .= "<form action='index.php' method='post' name='dupFeed'><input type='hidden' name='selectedFeed' value=''>";
$form .= get_form_header($mod_strings['LBL_DUPLICATE'], "", '');
$form .= "<table width='100%' cellpadding='0' cellspacing='0'>\t<tr class='listViewThS1'>\t<td class='listViewThS1'> </td>";
require_once 'include/formbase.php';
$form .= getPostToForm();
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<td scope='col' class='listViewThS1'>" . $mod_strings[$mod_strings['db_' . $key]] . "</td>";
}
}
$form .= "</tr>";
}
$bgcolor = $odd_bg;
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}' bgcolor='{$bgcolor}'>";
$form .= "<td width='1%' bgcolor='{$bgcolor}' nowrap ><a href='#' onClick=\"document.dupFeeds.selectedFeed.value='{$row['id']}';document.dupFeeds.submit() \">[{$app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>";
$wasSet = false;
foreach ($row as $key => $value) {
if ($key != 'id') {
if (!$wasSet) {
$form .= "<td scope='row' class='{$rowColor}' bgcolor='{$bgcolor}'><a target='_blank' href='index.php?module=Feeds&action=DetailView&record={$row['id']}'>{$value}</a></td>";
$wasSet = true;
} else {
$form .= "<td class='{$rowColor}' bgcolor='{$bgcolor}'><a target='_blank' href='index.php?module=Feeds&action=DetailView&record={$row['id']}'>{$value}</a></td>";
}
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
$bgcolor = $odd_bg;
} else {
$rowColor = 'evenListRowS1';
$bgcolor = $even_bg;
}
$form .= "</tr>";
}
$form .= "<tr class='listViewThS1'><td colspan='{$cols}' class='blackline'></td></tr>";
$form .= "</table><br><input type='submit' class='button' name='ContinueFeed' value='{$app_strings['LBL_CREATE_BUTTON_LABEL']} {$mod_strings['LNK_NEW_CONTACT']}'></form>";
return $form;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:54,代码来源:FeedFormBase.php
示例2: buildTableForm
function buildTableForm($rows, $mod = 'Opportunities')
{
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
$cols = sizeof($rows[0]) * 2 + 1;
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_DUPLICATE'] . '</td></tr><tr><td height="20"></td></tr></table>';
$form .= "<form action='index.php' method='post' name='dupOpps'><input type='hidden' name='selectedOpportunity' value=''>";
$form .= "<table width='100%' cellpadding='0' cellspacing='0' class='list view'>";
$form .= "<tr class='pagination'><td colspan='{$cols}'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td><input type='submit' class='button' name='ContinueOpportunity' value='{$mod_strings['LNK_NEW_OPPORTUNITY']}'></td></tr></table></td></tr><tr>";
$form .= "<tr><td scope='col'> </td>";
require_once 'include/formbase.php';
$form .= getPostToForm();
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<td scope='col'>" . $mod_strings[$mod_strings['db_' . $key]] . "</td>";
}
}
$form .= "</tr>";
}
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}'>";
$form .= "<td width='1%' nowrap='nowrap'><a href='#' onclick='document.dupOpps.selectedOpportunity.value=\"{$row['id']}\";document.dupOpps.submit();'>[{$app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>";
$wasSet = false;
foreach ($row as $key => $value) {
if ($key != 'id') {
if (!$wasSet) {
$form .= "<td scope='row'><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record={$row['id']}'>{$value}</a></td>";
$wasSet = true;
} else {
$form .= "<td><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record={$row['id']}'>{$value}</a></td>";
}
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
} else {
$rowColor = 'evenListRowS1';
}
$form .= "</tr>";
}
$form .= "<tr class='pagination'><td colspan='{$cols}'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td><input type='submit' class='button' name='ContinueOpportunity' value='{$mod_strings['LNK_NEW_OPPORTUNITY']}'></td></tr></table></td></tr><tr>";
$form .= "</table><BR></form>";
return $form;
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:51,代码来源:OpportunityFormBase.php
示例3: buildTableForm
function buildTableForm($rows, $mod = 'Quotes')
{
if (!ACLController::checkAccess('Quotes', 'edit', true)) {
return '';
}
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
$cols = sizeof($rows[0]) * 2 + 1;
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_DUPLICATE'] . '</td></tr><tr><td height="20"></td></tr></table>';
$form .= "<form action='index.php' method='post' name='dupOpps'><input type='hidden' name='selectedQuote' value=''>";
$form .= get_form_header($mod_strings['LBL_DUPLICATE'], "", '');
$form .= "<table width='100%' cellpadding='0' cellspacing='0'>\t<tr >\t<td ></TD>";
require_once 'include/formbase.php';
$form .= getPostToForm();
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<td >" . $mod_strings[$mod_strings['db_' . $key]] . "</td>";
}
}
$form .= "</tr>";
}
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}'><td width='1%' nowrap='nowrap'><a href='#' onclick='document.dupOpps.selectedQuote.value=\"{$row['id']}\";document.dupOpps.submit();'>[{$app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>";
foreach ($row as $key => $value) {
if ($key != 'id') {
$form .= "<td><a target='_blank' href='index.php?module=Quotes&action=DetailView&record={$row['id']}'>{$value}</a></td>";
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
} else {
$rowColor = 'evenListRowS1';
}
$form .= "</tr>";
}
$form .= "<tr ><td colspan='{$cols}' class='blackline'></td></tr>";
$form .= "</table><BR><input type='submit' class='button' name='ContinueQuote' value='{$app_strings['LBL_CREATE_BUTTON_LABEL']} {$mod_strings['LNK_NEW_QUOTE']}'></form>";
return $form;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:46,代码来源:QuoteFormBase.php
示例4: buildTableForm
function buildTableForm($rows, $mod = 'Accounts')
{
if (!ACLController::checkAccess('Accounts', 'edit', true)) {
return '';
}
global $action;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
$cols = sizeof($rows[0]) * 2 + 1;
if ($action != 'ShowDuplicates') {
$form = "<form action='index.php' method='post' id='dupAccounts' name='dupAccounts'><input type='hidden' name='selectedAccount' value=''>";
$form .= '<table width="100%"><tr><td>' . $mod_strings['MSG_DUPLICATE'] . '</td></tr><tr><td height="20"></td></tr></table>';
unset($_POST['selectedAccount']);
} else {
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_SHOW_DUPLICATES'] . '</td></tr><tr><td height="20"></td></tr></table>';
}
$form .= "<table width='100%' cellpadding='0' cellspacing='0' class='list view' border='0'><tr class='pagination'><td colspan='{$cols}'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td>";
// handle buttons
if ($action == 'ShowDuplicates') {
$return_action = 'ListView';
// cn: bug 6658 - hardcoded return action break popup -> create -> duplicate -> cancel
$return_action = isset($_REQUEST['return_action']) && !empty($_REQUEST['return_action']) ? $_REQUEST['return_action'] : $return_action;
$form .= "<input type='hidden' name='selectedAccount' id='selectedAccount' value=''><input title='{$app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' {$app_strings['LBL_SAVE_BUTTON_LABEL']} '>\n";
if (!empty($_REQUEST['return_module']) && !empty($_REQUEST['return_action']) && !empty($_REQUEST['return_id'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.module.value='" . $_REQUEST['return_module'] . "';this.form.action.value='" . $_REQUEST['return_action'] . "';this.form.record.value='" . $_REQUEST['return_id'] . "'\" type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
} else {
if (!empty($_POST['return_module']) && !empty($_POST['return_action'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.module.value='" . $_POST['return_module'] . "';this.form.action.value='" . $_POST['return_action'] . "';\" type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
} else {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='ListView';\" type='submit' type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
}
}
} else {
$form .= "<input type='submit' class='button' name='ContinueAccount' value='{$mod_strings['LNK_NEW_ACCOUNT']}'>\n";
}
$form .= "</td></tr></table></td></tr><tr>";
if ($action != 'ShowDuplicates') {
$form .= "<th> </th>";
}
require_once 'include/formbase.php';
if (isset($_POST['return_action']) && $_POST['return_action'] == 'SubPanelViewer') {
$_POST['return_action'] = 'DetailView';
}
if (isset($_POST['return_action']) && $_POST['return_action'] == 'DetailView' && empty($_REQUEST['return_id'])) {
unset($_POST['return_action']);
}
$form .= getPostToForm('/emailAddress(PrimaryFlag|OptOutFlag|InvalidFlag)?[0-9]*?$/', true);
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<th>" . $mod_strings[$mod_strings['db_' . $key]] . "</th>";
}
}
$form .= "</tr>";
}
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}'>";
if ($action != 'ShowDuplicates') {
$form .= "<td width='1%' nowrap><a href='#' onclick='document.dupAccounts.selectedAccount.value=\"{$row['id']}\"; document.dupAccounts.submit(); '>[{$app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>\n";
}
foreach ($row as $key => $value) {
if ($key != 'id') {
if (isset($_POST['popup']) && $_POST['popup'] == true) {
$form .= "<td scope='row'><a href='#' onclick=\"window.opener.location='index.php?module=Accounts&action=DetailView&record={$row['id']}'\">{$value}</a></td>\n";
} else {
$form .= "<td><a target='_blank' href='index.php?module=Accounts&action=DetailView&record={$row['id']}'>{$value}</a></td>\n";
}
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
} else {
$rowColor = 'evenListRowS1';
}
$form .= "</tr>";
}
$form .= "<tr class='pagination'><td colspan='{$cols}'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td>";
// handle buttons
if ($action == 'ShowDuplicates') {
$return_action = 'ListView';
// cn: bug 6658 - hardcoded return action break popup -> create -> duplicate -> cancel
$return_action = isset($_REQUEST['return_action']) && !empty($_REQUEST['return_action']) ? $_REQUEST['return_action'] : $return_action;
$form .= "<input type='hidden' name='selectedAccount' id='selectedAccount' value=''><input title='{$app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' {$app_strings['LBL_SAVE_BUTTON_LABEL']} '>\n";
if (!empty($_REQUEST['return_module']) && !empty($_REQUEST['return_action']) && !empty($_REQUEST['return_id'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.module.value=" . $_REQUEST['return_module'] . ";this.form.action.value=" . $_REQUEST['return_action'] . ";this.form.record.value=" . $_REQUEST['return_id'] . "'\" type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
} else {
if (!empty($_POST['return_module']) && !empty($_POST['return_action'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.module.value=" . $_POST['return_module'] . ";this.form.action.value=" . $_POST['return_action'] . ";'\" type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
} else {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='ListView';\" type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
}
}
} else {
$form .= "<input type='submit' class='button' name='ContinueAccount' value='{$mod_strings['LNK_NEW_ACCOUNT']}'></form>\n";
//.........这里部分代码省略.........
开发者ID:klr2003,项目名称:sourceread,代码行数:101,代码来源:AccountFormBase.php
示例5: buildTableForm
function buildTableForm($rows, $mod = '')
{
global $action;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
$cols = sizeof($rows[0]) * 2 + 1;
if ($action != 'ShowDuplicates') {
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_DUPLICATE'] . '</td></tr><tr><td height="20"></td></tr></table>';
$form .= "<form action='index.php' method='post' name='dupProspects'><input type='hidden' name='selectedProspect' value=''>";
} else {
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_SHOW_DUPLICATES'] . '</td></tr><tr><td height="20"></td></tr></table>';
}
$form .= get_form_header($mod_strings['LBL_DUPLICATE'], "", '');
$form .= "<table width='100%' cellpadding='0' cellspacing='0'>\t<tr >\t";
if ($action != 'ShowDuplicates') {
$form .= "<td > </td>";
}
require_once 'include/formbase.php';
$form .= getPostToForm();
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<td scope='col' >" . $mod_strings[$mod_strings['db_' . $key]] . "</td>";
}
}
$form .= "</tr>";
}
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}'>";
if ($action != 'ShowDuplicates') {
$form .= "<td width='1%' nowrap='nowrap' ><a href='#' onClick=\"document.dupProspects.selectedProspect.value='{$row['id']}';document.dupProspects.submit() \">[{$app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>\n";
}
$wasSet = false;
foreach ($row as $key => $value) {
if ($key != 'id') {
if (!$wasSet) {
$form .= "<td scope='row' ><a target='_blank' href='index.php?module=Prospects&action=DetailView&record={$row['id']}'>{$value}</a></td>\n";
$wasSet = true;
} else {
$form .= "<td><a target='_blank' href='index.php?module=Prospects&action=DetailView&record={$row['id']}'>{$value}</a></td>\n";
}
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
} else {
$rowColor = 'evenListRowS1';
}
$form .= "</tr>";
}
$form .= "<tr ><td colspan='{$cols}' class='blackline'></td></tr>";
if ($action == 'ShowDuplicates') {
$form .= "</table><br><input title='{$app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' {$app_strings['LBL_SAVE_BUTTON_LABEL']} '> <input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='ListView'; this.form.module.value='Prospects';\" type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
} else {
$form .= "</table><br><input type='submit' class='button' name='ContinueProspect' value='{$mod_strings['LNK_NEW_PROSPECT']}'></form>";
}
return $form;
}
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:64,代码来源:ProspectFormBase.php
示例6: buildTableForm
function buildTableForm($rows, $mod = '')
{
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
$cols = sizeof($rows[0]) * 2 + 1;
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_DUPLICATE'] . '</td></tr><tr><td height="20"></td></tr></table>';
$form .= "<form action='index.php' method='post' name='dupLeads'><input type='hidden' name='selectedLead' value=''>";
$form .= get_form_header($mod_strings['LBL_DUPLICATE'], "", '');
$form .= "<table width='100%' cellpadding='0' cellspacing='0'>\t<tr >\t<td ></td>";
require_once 'include/formbase.php';
$form .= getPostToForm();
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<td scope='col' >" . $mod_strings[$mod_strings['db_' . $key]] . "</td>";
}
}
$form .= "</tr>";
}
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}'>";
$form .= "<td width='1%' nowrap='nowrap' align='center'><input type='checkbox' name='selectedLeads[]' value='{$row['id']}'></td>";
$wasSet = false;
foreach ($row as $key => $value) {
if ($key != 'id') {
if (!$wasSet) {
$form .= "<td scope='row'><a target='_blank' href='index.php?module=Leads&action=DetailView&record={$row['id']}'>{$value}</a></td>";
$wasSet = true;
} else {
$form .= "<td><a target='_blank' href='index.php?module=Leads&action=DetailView&record={$row['id']}'>{$value}</a></td>";
}
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
} else {
$rowColor = 'evenListRowS1';
}
$form .= "</tr>";
}
$form .= "<tr ><td colspan='{$cols}' ></td></tr>";
$form .= "</table><br><input type='submit' class='button' name='ContinueLead' value='{$app_strings['LBL_NEXT_BUTTON_LABEL']}'></form>";
return $form;
}
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:50,代码来源:LeadFormBase.php
示例7: getAnyToForm
function getAnyToForm($ignore = '', $usePostAsAuthority = false)
{
$fields = getPostToForm($ignore);
$fields .= getGetToForm($ignore, $usePostAsAuthority);
return $fields;
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:6,代码来源:formbase.php
示例8: buildTableForm
function buildTableForm($rows, $mod = 'Suppliers')
{
if (!ACLController::checkAccess('Suppliers', 'edit', true)) {
return '';
}
global $odd_bg, $even_bg, $action;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
$cols = sizeof($rows[0]) * 2 + 1;
if ($action != 'ShowDuplicates') {
$form = "<form action='index.php' method='post' id='dupSuppliers' name='dupSuppliers'><input type='hidden' name='selectedSupplier' value=''>";
$form .= '<table width="100%"><tr><td>' . $mod_strings['MSG_DUPLICATE'] . '</td></tr><tr><td height="20"></td></tr></table>';
unset($_POST['selectedSupplier']);
} else {
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_SHOW_DUPLICATES'] . '</td></tr><tr><td height="20"></td></tr></table>';
}
$form .= get_form_header($mod_strings['LBL_DUPLICATE'], "", '');
$form .= "<table width='100%' cellpadding='0' cellspacing='0'>\t<tr class='listViewThS1'>\t";
if ($action != 'ShowDuplicates') {
$form .= "<td class='listViewThS1'> </td>";
}
require_once 'include/formbase.php';
$form .= getPostToForm();
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<td class='listViewThS1'>" . $mod_strings[$mod_strings['db_' . $key]] . "</td>";
}
}
$form .= "</tr>";
}
$bgcolor = $odd_bg;
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}' bgcolor='{$bgcolor}'>";
if ($action != 'ShowDuplicates') {
$form .= "<td width='1%' class='{$rowColor}' nowrap><a href='#' onclick='document.dupSuppliers.selectedSupplier.value=\"{$row['id']}\"; document.dupSuppliers.submit(); '>[{$app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>\n";
}
foreach ($row as $key => $value) {
if ($key != 'id') {
$form .= "<td class='{$rowColor}'><a target='_blank' href='index.php?module=Suppliers&action=DetailView&record={$row['id']}'>{$value}</a></td>\n";
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
$bgcolor = $odd_bg;
} else {
$rowColor = 'evenListRowS1';
$bgcolor = $even_bg;
}
$form .= "</tr>";
}
$form .= "<tr class='listViewThS1'><td colspan='{$cols}' class='blackline'></td></tr>";
// handle buttons
if ($action == 'ShowDuplicates') {
$return_action = 'ListView';
// cn: bug 6658 - hardcoded return action break popup -> create -> duplicate -> cancel
$return_action = isset($_REQUEST['return_action']) && !empty($_REQUEST['return_action']) ? $_REQUEST['return_action'] : $return_action;
$form .= "</table><br><input type='hidden' name='selectedSupplier' id='selectedSupplier' value=''><input title='{$app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' {$app_strings['LBL_SAVE_BUTTON_LABEL']} '>";
if (!empty($_REQUEST['return_module']) && !empty($_REQUEST['return_action']) && !empty($_REQUEST['return_id'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=" . $_REQUEST['return_module'] . "&action=" . $_REQUEST['return_action'] . "&record=" . $_REQUEST['return_id'] . "'\" type='button' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
} else {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=Suppliers&action=ListView'\" type='button' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
}
} else {
$form .= "</table><BR><input type='submit' class='button' name='ContinueSupplier' value='{$mod_strings['LNK_NEW_SUPPLIER']}'></form>\n";
}
return $form;
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:74,代码来源:SupplierFormBase.php
示例9: buildTableForm
/**
* buildTableForm
*
* This function creates a table with form data. It is used by the form base code when checking for duplicates
*
* @param $rows Array of duplicate row data
* @return $form The HTML form data
*/
function buildTableForm($rows)
{
global $action;
global $mod_strings;
global $app_strings;
$newLinkLabel = 'LNK_NEW_' . strtoupper($this->objectName);
$cols = sizeof($rows[0]) * 2 + 1;
if ($action != 'ShowDuplicates') {
$duplicateLabel = string_format($app_strings['MSG_DUPLICATE'], array(strtolower($this->objectName), $this->moduleName));
$form = '<table width="100%"><tr><td>' . $duplicateLabel . '</td></tr><tr><td height="20"></td></tr></table>';
$form .= "<form action='index.php' method='post' name='dup{$this->moduleName}'><input type='hidden' name='selected{$this->objectName}' value=''>";
$form .= getPostToForm('/emailAddress(PrimaryFlag|OptOutFlag|InvalidFlag)?[0-9]*?$/', true);
} else {
$duplicateLabel = string_format($app_strings['MSG_SHOW_DUPLICATES'], array(strtolower($this->objectName), $this->moduleName));
$form = '<table width="100%"><tr><td>' . $duplicateLabel . '</td></tr><tr><td height="20"></td></tr></table>';
}
$form .= "<table width='100%' cellpadding='0' cellspacing='0' class='list view' border='0'><tr class='pagination'><td colspan='{$cols}'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td>";
if ($action == 'ShowDuplicates') {
$form .= "<input title='{$app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' {$app_strings['LBL_SAVE_BUTTON_LABEL']} '>\n";
if (!empty($_REQUEST['return_module']) && !empty($_REQUEST['return_action']) && !empty($_REQUEST['return_id'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.module.value='" . $_REQUEST['return_module'] . "';this.form.action.value='" . $_REQUEST['return_action'] . "';this.form.record.value='" . $_REQUEST['return_id'] . "'\" type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
} else {
if (!empty($_POST['return_module']) && !empty($_POST['return_action'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.module.value='" . $_POST['return_module'] . "';this.form.action.value='" . $_POST['return_action'] . "';\" type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
} else {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='ListView';\" type='submit' type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
}
}
} else {
$form .= "<input type='submit' class='button' name='Continue{$this->objectName}' value='{$mod_strings[$newLinkLabel]}'>";
}
$form .= "</td></tr></table></td></tr><tr>";
if ($action != 'ShowDuplicates') {
$form .= "<td scope='col'> </td>";
}
require_once 'include/formbase.php';
if (isset($_POST['return_action']) && $_POST['return_action'] == 'SubPanelViewer') {
$_POST['return_action'] = 'DetailView';
}
if (isset($_POST['return_action']) && $_POST['return_action'] == 'DetailView' && empty($_REQUEST['return_id'])) {
unset($_POST['return_action']);
}
$form .= getPostToForm();
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<td scope='col' >" . $mod_strings[$mod_strings['db_' . $key]] . "</td>";
}
}
$form .= "</tr>";
}
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}'>";
if ($action != 'ShowDuplicates') {
$form .= "<td width='1%' nowrap='nowrap'><a href='#' onClick=\"document.forms['dup{$this->moduleName}'].selected{$this->objectName}.value='{$row['id']}';document.forms['dup{$this->moduleName}'].submit() \">[{$app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>\n";
}
$wasSet = false;
foreach ($row as $key => $value) {
if ($key != 'id') {
if (isset($_POST['popup']) && $_POST['popup'] == true) {
$form .= "<td scope='row'><a href='#' onclick=\"window.opener.location='index.php?module={$this->moduleName}&action=DetailView&record={$row['id']}'\">{$value}</a></td>\n";
} else {
if (!$wasSet) {
$form .= "<td scope='row'><a target='_blank' href='index.php?module={$this->moduleName}&action=DetailView&record={$row['id']}'>{$value}</a></td>\n";
$wasSet = true;
} else {
$form .= "<td><a target='_blank' href='index.php?module={$this->moduleName}&action=DetailView&record={$row['id']}'>{$value}</a></td>\n";
}
}
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
} else {
$rowColor = 'evenListRowS1';
}
$form .= "</tr>";
}
$form .= "<tr class='pagination'><td colspan='{$cols}'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td>";
if ($action == 'ShowDuplicates') {
$form .= "<input title='{$app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' {$app_strings['LBL_SAVE_BUTTON_LABEL']} '>\n";
if (!empty($_REQUEST['return_module']) && !empty($_REQUEST['return_action']) && !empty($_REQUEST['return_id'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.module.value='" . $_REQUEST['return_module'] . "';this.form.action.value='" . $_REQUEST['return_action'] . "';this.form.record.value='" . $_REQUEST['return_id'] . "';\" type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
} else {
if (!empty($_POST['return_module']) && !empty($_POST['return_action'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.module.value='" . $_POST['return_module'] . "';this.form.action.value='" . $_POST['return_action'] . "';\" type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
} else {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='ListView';\" type='submit' type='submit' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
}
}
} else {
//.........这里部分代码省略.........
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:101,代码来源:PersonFormBase.php
示例10: buildTableForm
function buildTableForm($rows, $mod = '')
{
global $action;
if (!empty($mod)) {
global $current_language;
$mod_strings = return_module_language($current_language, $mod);
} else {
global $mod_strings;
}
global $app_strings;
$cols = sizeof($rows[0]) * 2 + 1;
if ($action != 'ShowDuplicates') {
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_DUPLICATE'] . '</td></tr><tr><td height="20"></td></tr></table>';
$form .= "<form action='index.php' method='post' name='dupContacts'>\n\t\t\t\t\t<input type='hidden' name='selectedContact' value=''>";
} else {
$form = '<table width="100%"><tr><td>' . $mod_strings['MSG_SHOW_DUPLICATES'] . '</td></tr><tr><td height="20"></td></tr></table>';
}
$form .= get_form_header($mod_strings['LBL_DUPLICATE'], "", '');
$form .= "<table width='100%' cellpadding='0' cellspacing='0'>\t<tr >\t";
if ($action != 'ShowDuplicates') {
$form .= "<td > </td>";
}
require_once 'include/formbase.php';
if (isset($_POST['return_action']) && $_POST['return_action'] == 'SubPanelViewer') {
$_POST['return_action'] = 'DetailView';
}
if (isset($_POST['return_action']) && $_POST['return_action'] == 'DetailView' && empty($_REQUEST['return_id'])) {
unset($_POST['return_action']);
}
$form .= getPostToForm('/emailAddress(PrimaryFlag|OptOutFlag|InvalidFlag)?[0-9]*?$/', true);
if (isset($rows[0])) {
foreach ($rows[0] as $key => $value) {
if ($key != 'id') {
$form .= "<td scope='col' >" . $mod_strings[$mod_strings['db_' . $key]] . "</td>";
}
}
$form .= "</tr>";
}
$rowColor = 'oddListRowS1';
foreach ($rows as $row) {
$form .= "<tr class='{$rowColor}'>";
if ($action != 'ShowDuplicates') {
$form .= "<td width='1%' nowrap='nowrap'><a href='#' onClick=\"document.forms['dupContacts'].selectedContact.value='{$row['id']}';document.forms['dupContacts'].submit() \">[{$app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>\n";
}
$wasSet = false;
foreach ($row as $key => $value) {
if ($key != 'id') {
if (isset($_POST['popup']) && $_POST['popup'] == true) {
$form .= "<td scope='row'><a href='#' onclick=\"window.opener.location='index.php?module=Contacts&action=DetailView&record={$row['id']}'\">{$value}</a></td>\n";
} else {
if (!$wasSet) {
$form .= "<td scope='row'><a target='_blank' href='index.php?module=Contacts&action=DetailView&record={$row['id']}'>{$value}</a></td>\n";
$wasSet = true;
} else {
$form .= "<td><a target='_blank' href='index.php?module=Contacts&action=DetailView&record={$row['id']}'>{$value}</a></td>\n";
}
}
}
}
if ($rowColor == 'evenListRowS1') {
$rowColor = 'oddListRowS1';
} else {
$rowColor = 'evenListRowS1';
}
$form .= "</tr>";
}
$form .= "<tr ><td colspan='{$cols}' class='blackline'></td></tr>";
if ($action == 'ShowDuplicates') {
$form .= "</table><br> <input title='{$app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' {$app_strings['LBL_SAVE_BUTTON_LABEL']} '> ";
if (!empty($_POST['return_module']) && !empty($_POST['return_action']) && !empty($_POST['return_id'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=" . $_POST['return_module'] . "&action=" . $_POST['return_action'] . "&record=" . $_REQUEST['return_id'] . "'\" type='button' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
} else {
if (!empty($_POST['return_module']) && !empty($_POST['return_action'])) {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=" . $_POST['return_module'] . "&action=" . $_POST['return_action'] . "'\" type='button' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
} else {
$form .= "<input title='{$app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='{$app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"location.href='index.php?module=Contacts&action=ListView'\" type='button' name='button' value=' {$app_strings['LBL_CANCEL_BUTTON_LABEL']} '></form>";
}
}
} else {
$form .= "</table><br><input type='submit' class='button' name='ContinueContact' value='{$mod_strings['LNK_NEW_CONTACT']}'></form>";
}
return $form;
}
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:83,代码来源:ContactFormBase.php
示例11: getAnyToForm
function getAnyToForm($ignore = '')
{
$fields = getPostToForm($ignore);
$fields .= getGetToForm($ignore);
return $fields;
}
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:6,代码来源:formbase.php
注:本文中的getPostToForm函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论