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();
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 print "<input type=hidden name=formframe value=" . $fids[0] . ">"; } else { // otherwise, display like normal print "<input type=hidden name=formframe value='" . $formframe . "'>"; print "<input type=hidden name=mainform value='" . $mainform . "'>"; } if (is_array($elements_allowed)) { $ele_allowed = implode(",", $elements_allowed); print "<input type=hidden name=elements_allowed value='" . $ele_allowed . "'>"; } else { print "<input type=hidden name=elements_allowed value=''>"; } print "</form>"; //added by Cory Aug 27, 2005 to make forms printable } $trayElements = $buttontray->getElements(); if (count($trayElements) > 0 or $nosubforms) { $form->addElement($buttontray); } return $form; } }
$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();
$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: }
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;