本文整理汇总了PHP中XoopsFormButton::render方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsFormButton::render方法的具体用法?PHP XoopsFormButton::render怎么用?PHP XoopsFormButton::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsFormButton
的用法示例。
在下文中一共展示了XoopsFormButton::render方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: chronolabs_inline
echo "<tr class='odd' align='left'>";
echo "<td>" . _AM_XFORUM_REPORTPOST . ': ' . $post_link . "</td>";
echo "<td align='center'>" . $report['report_id'] . "</td>";
echo "</tr>";
echo "<tr class='odd' align='left'>";
echo "<td>" . _AM_XFORUM_REPORTTEXT . ': ' . $myts->htmlSpecialChars($report['report_text']) . "</td>";
$uid = intval($report['reporter_uid']);
$reporter_name = forum_getUnameFromId($uid, $xoopsModuleConfig['show_realname']);
$reporter = !empty($uid) ? "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $uid . "'>" . $reporter_name . "</a><br />" : "";
echo "<td align='center'>" . $reporter . long2ip($report['reporter_ip']) . "</td>";
echo "</tr>";
echo "<tr class='odd' align='left'>";
echo "<td>" . _AM_XFORUM_REPORTMEMO . ': ' . $memo . "</td>";
echo "<td align='center' >" . $checkbox . "</td>";
echo "</tr>";
echo "<tr colspan='2'><td height='2'></td></tr>";
}
$submit = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
echo "<tr colspan='2'><td align='center'>" . $submit->render() . "</td></tr>";
$hidden =& new XoopsFormHidden('op', 'save');
echo $hidden->render();
$hidden =& new XoopsFormHidden('item', $item);
echo $hidden->render() . "</form>";
echo "</table>";
$nav = new XoopsPageNav($report_handler->getCount(new Criteria("report_result", $process_result)), $limit, $start, "start", "item=" . $item);
echo $nav->renderNav(4);
echo "</fieldset>";
break;
}
echo chronolabs_inline(false);
xoops_cp_footer();
示例2: addSubmitButton
function addSubmitButton($form, $subButtonText, $go_back = "", $currentURL, $button_text, $settings, $entry, $fids, $formframe, $mainform, $cur_entry, $profileForm, $elements_allowed = "", $allDoneOverride = false, $printall = 0, $screen = null)
{
//nmc 2007.03.24 - added $printall
if ($printall == 2) {
// 2 is special setting in multipage screens that means do not include any printable buttons of any kind
return $form;
}
if (strstr($currentURL, "printview.php")) {
// don't do anything if we're on the print view
return $form;
} else {
drawGoBackForm($go_back, $currentURL, $settings, $entry);
if (!$button_text or $button_text == "{NOBUTTON}" and $go_back['form'] > 0) {
// presence of a goback form (ie: parent form) overrides {NOBUTTON} -- assumption is the save button will not also be overridden at the same time
$button_text = _formulize_DONE;
} elseif (is_array($button_text)) {
if (!$button_text[0]) {
$done_text_temp = _formulize_DONE;
} else {
$done_text_temp = $button_text[0];
}
if (!$button_text[1]) {
$save_text_temp = _formulize_SAVE;
} else {
$save_text_temp = $button_text[1];
}
}
// override -- the "no-all-done-button" config option turns off the all done button and changes save into a save-and-leave button
// need to grab the $nosubforms variable created by the multiple page function, so we know to put the printable view button (and nothing else) on the screen for multipage forms
global $nosubforms;
if (!$profileForm and ($save_text_temp != "{NOBUTTON}" or $nosubforms)) {
// do not use printable button for profile forms, or forms where there is no Save button (ie: a non-standard saving process is in use and access to the normal printable option may be prohibited)
$printbutton = new XoopsFormButton('', 'printbutton', _formulize_PRINTVIEW, 'button');
if (is_array($elements_allowed)) {
$ele_allowed = implode(",", $elements_allowed);
}
$printbutton->setExtra("onclick='javascript:PrintPop(\"{$ele_allowed}\");'");
$rendered_buttons = $printbutton->render();
// nmc 2007.03.24 - added
if ($printall) {
// nmc 2007.03.24 - added
$printallbutton = new XoopsFormButton('', 'printallbutton', _formulize_PRINTALLVIEW, 'button');
// nmc 2007.03.24 - added
$printallbutton->setExtra("onclick='javascript:PrintAllPop();'");
// nmc 2007.03.24 - added
$rendered_buttons .= " " . $printallbutton->render();
// nmc 2007.03.24 - added
}
$buttontray = new XoopsFormElementTray($rendered_buttons, " ");
// nmc 2007.03.24 - amended [nb: FormElementTray 'caption' is actually either 1 or 2 buttons]
} else {
$buttontray = new XoopsFormElementTray("", " ");
}
$buttontray->setClass("no-print");
if ($subButtonText == _formulize_SAVE) {
// _formulize_SAVE is passed only when the save button is allowed to be drawn
if ($save_text_temp) {
$subButtonText = $save_text_temp;
}
if ($subButtonText != "{NOBUTTON}") {
$saveButton = new XoopsFormButton('', 'submitx', trans($subButtonText), 'button');
// doesn't use name submit since that conflicts with the submit javascript function
$saveButton->setExtra("onclick=javascript:validateAndSubmit();");
$buttontray->addElement($saveButton);
// also add in the save and leave button
$saveAndLeaveButton = new XoopsFormButton('', 'submit_save_and_leave', trans(_formulize_SAVE_AND_LEAVE), 'button');
$saveAndLeaveButton->setExtra("onclick=javascript:validateAndSubmit('leave');");
$buttontray->addElement($saveAndLeaveButton);
}
}
if (($button_text != "{NOBUTTON}" and !$done_text_temp or isset($done_text_temp) and $done_text_temp != "{NOBUTTON}") and !$allDoneOverride) {
if ($done_text_temp) {
$button_text = $done_text_temp;
}
$donebutton = new XoopsFormButton('', 'donebutton', trans($button_text), 'button');
$donebutton->setExtra("onclick=javascript:verifyDone();");
$buttontray->addElement($donebutton);
}
if (!$profileForm) {
// do not use printable button for profile forms
$newcurrentURL = XOOPS_URL . "/modules/formulize/printview.php";
print "<form name='printview' action='" . $newcurrentURL . "' method=post target=_blank>\n";
// add security token
if (isset($GLOBALS['xoopsSecurity'])) {
print $GLOBALS['xoopsSecurity']->getTokenHTML();
}
$currentPage = "";
$screenid = "";
if ($screen) {
$screenid = $screen->getVar('sid');
// check for a current page setting
if (isset($settings['formulize_currentPage'])) {
$currentPage = $settings['formulize_currentPage'];
}
}
print "<input type=hidden name=screenid value='" . $screenid . "'>";
print "<input type=hidden name=currentpage value='" . $currentPage . "'>";
print "<input type=hidden name=lastentry value=" . $cur_entry . ">";
if ($go_back['form']) {
// we're on a sub, so display this form only
//.........这里部分代码省略.........
示例3: XoopsFormButton
$reporter_name = newbb_getUnameFromId($uid, $xoopsModuleConfig['show_realname']);
$reporter = !empty($uid) ? "<a href='" . XOOPS_URL . "/userinfo.php?uid=" . $uid . "'>" . $reporter_name . "</a><br />" : "";
echo "<td align='center'>" . $reporter . long2ip($report['reporter_ip']) . "</td>";
echo "</tr>";
echo "<tr class='odd' align='left'>";
echo "<td>" . _AM_NEWBB_REPORTMEMO . ': ' . $memo . "</td>";
echo "<td align='center' >" . $checkbox . "</td>";
echo "</tr>";
echo "<tr colspan='2'><td height='2'></td></tr>";
}
$buttons = "";
if ($item != 'processed') {
$submit = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
$buttons .= $submit->render() . " ";
}
$delete = new XoopsFormButton('', 'delete', _DELETE, 'submit');
$buttons .= $delete->render() . " ";
$cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'reset');
$buttons .= $cancel->render();
echo "<tr colspan='2'><td align='center'>{$buttons}</td></tr>";
$hidden = new XoopsFormHidden('start', $start);
echo $hidden->render();
$hidden = new XoopsFormHidden('item', $item);
echo $hidden->render() . "</form>";
echo "</table>";
$nav = new XoopsPageNav($report_handler->getCount(new Criteria("report_result", $process_result)), $limit, $start, "start", "item=" . $item);
echo $nav->renderNav(4);
echo "</fieldset>";
break;
}
xoops_cp_footer();
示例4: isset
$smarty->assign("dataset`Method", $ds['method']);
$smarty->assign("score", isset($_POST['score']) ? $_POST['score'] : 0.5);
$docs = getDocuments($iddataset);
$smarty->assign("documents", $docs);
$urlsinativas = new XoopsFormSelect("", "iurls", null, 20);
$urlsinativas->_class = "SelectList";
$urlsinativas->addOptionArray(pegaUrlsInativas($iddataset));
$smarty->assign("lstUrlsInativas", $urlsinativas->render());
$urlsativas = new XoopsFormSelect("", "aurls", null, 20);
$urlsativas->_class = "SelectList";
$urlsativas->addOptionArray(pegaUrlsAtivas($iddataset));
$smarty->assign("lstUrlsAtivas", $urlsativas->render());
$adicionarCoordenador = new XoopsFormButton("", "adicionarurl", ">", "submit");
$smarty->assign("adicionarurl", $adicionarCoordenador->render());
$removerCoordenador = new XoopsFormButton("", "removerurl", "<", "submit");
$smarty->assign("removerurl", $removerCoordenador->render());
$smarty->assign("display_conteudo", "modulo_dataset_urls");
finaliza_request();
break;
case "finalizar":
$iddataset = $_GET["iddataset"];
$sql = sprintf("UPDATE dataset set\r\n\t\t\t\t\t\t\t\tstatus = 'F', \r\n\t\t\t\t\t\t\t\tfinalization_datetime = now()\r\n\t\t\t\t\t\tWHERE id = %s ", $iddataset);
if ($db->query($sql)) {
$smarty->assign("mensagem", "Dataset finalized successfully.");
} else {
$smarty->assign("mensagem", "Error finalizing dataset.");
echo $sql . $db->error();
}
break;
default:
}
示例5: XoopsFormButton
echo "<td class='even' align='center' title='" . $order . "'>";
}
echo "<a href=updown.php?id=" . $id . "&ide=" . $ide . "&pos=" . $order . "&op=ele_down><img src=" . XOOPS_URL . "/modules/" . $xoopsModule->dirname() . "/images/down.gif /></a></td><td class='even' align='center'>" . $text_order->render() . "</td>";
// $order = $i->getVar('ele_order');
echo "</td>";
echo '<td class="even" align="center">' . $check_display->render() . $hidden_id->render() . "</td>\n";
echo '<td class="even" align="center"><a href="elements.php?id=' . $id . '&op=edit&ele_id=' . $ide . '"><img src=' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/images/edit.gif alt="" onMouseOver="stm(Text[1],Style[1])" onMouseOut="htm()" /></a></td>';
echo '<td class="even" align="center"><a href="elements.php?id=' . $id . '&op=edit&ele_id=' . $ide . '&clone=1"><img src=' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/images/cloner.gif alt="" onMouseOver="stm(Text[2],Style[1])" onMouseOut="htm()"/></a></td>';
echo '<td class="even" align="center"><a href="elements.php?id=' . $id . '&op=delete&ele_id=' . $ide . '"><img src=' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/images/delete.gif alt="" onMouseOver="stm(Text[3],Style[1])" onMouseOut="htm()"/></a></td>';
echo '</tr>';
}
$submit = new XoopsFormButton('', 'submit', _AM_REORD, 'submit');
echo '
<tr>
<td class="foot" colspan="3"></td>
<td class="foot" colspan="2" align="center">' . $submit->render() . '</td>
<td class="foot" colspan="4"></td>
</tr>
</table>
';
$hidden_op = new XoopsFormHidden('op', 'save');
echo $hidden_op->render();
echo '</form>';
} else {
xoops_cp_header();
form_adminMenu(2, _AM_FORMS);
extract($_POST);
$error = '';
foreach ($ele_id as $ide) {
$element =& $formulaire_mgr->get($ide);
$req = !empty($ele_req[$ide]) ? 1 : 0;