function editDocumentForm(&$row, &$lists, $last, $created, &$params) { global $Itemid; global $_DOCMAN, $_DMUSER; require_once JPATH_SITE . '/includes/HTML_toolbar.php'; JFilterOutput::objectHTMLSafe($row); ob_start(); ?> <form action="<?php echo JRoute::_('index.php?option=com_docman'); ?> " method="post" name="adminForm" onsubmit="javascript:setgood();" id="dm_frmedit" class="dm_form"> <fieldset class="dm_adminform"> <legend><?php echo _DML_DESCRIPTION; ?> </legend> <table class="dm_admintable"> <tr> <td class="dm_key"> <label><?php echo _DML_TITLE; ?> </label> </td> <td> <input class="inputbox" type="text" name="dmname" size="50" maxlength="100" value="<?php echo $row->dmname; ?> " /> </td> </tr> <tr> <td class="dm_key"> <label for="catid"><?php echo _DML_CATEGORY; ?> </label> </td> <td> <?php echo $lists['catid']; ?> </td> </tr> <?php if (!$row->approved && $_DMUSER->canApprove()) { ?> <tr> <td class="dm_key"> <label><?php echo _DML_APPROVED; ?> </label> </td> <td> <?php echo $lists['approved']; ?> </td> </tr> <?php } ?> <?php if ($row->approved && $_DMUSER->canPublish()) { ?> <tr> <td class="dm_key"> <label><?php echo _DML_PUBLISHED; ?> </label> </td> <td> <?php echo $lists['published']; ?> </td> </tr> <?php } ?> <tr> <td class="dm_key"> <label><?php echo _DML_DESCRIPTION; ?> </label> </td> <td> <?php // parameters : areaname, content, hidden field, width, height, rows, cols DOCMAN_Compat::editorArea('editor1', $row->dmdescription, 'dmdescription', '100%', '250', '50', '10'); ?> </td> </tr> </table> </fieldset> <?php jimport('joomla.html.pane'); $tabs = JPane::getInstance('tabs', array('useCookies' => false)); echo $tabs->startPane("content-pane"); echo $tabs->startPanel(_DML_DOCUMENT, "document-page"); HTML_DMDocuments::_showTabDocument($row, $lists, $last, $created); echo $tabs->endPanel(); echo $tabs->startPanel(_DML_TAB_PERMISSIONS, "permissions-page"); HTML_DMDocuments::_showTabPermissions($row, $lists, $last, $created); echo $tabs->endPanel(); echo $tabs->startPanel(_DML_TAB_LICENSE, "license-page"); HTML_DMDocuments::_showTabLicense($row, $lists, $last, $created); if (isset($params)) { echo $tabs->endPanel(); echo $tabs->startPanel(_DML_TAB_DETAILS, "details-page"); HTML_DMDocuments::_showTabDetails($row, $lists, $last, $created, $params); } echo $tabs->endPanel(); echo $tabs->endPane(); ?> <input type="hidden" name="goodexit" value="0" /> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="option" value="com_docman" /> <input type="hidden" name="task" value="doc_save" /> <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?> " /> <input type="hidden" name="dmcounter" value="<?php echo $row->dmcounter; ?> " /> <?php echo DOCMAN_token::render(); ?> </form> <?php $html = ob_get_contents(); ob_end_clean(); return $html; }
function editDocumentForm(&$row, &$lists, $last, $created, &$params) { global $Itemid; global $_DOCMAN, $_DMUSER; require_once $GLOBALS['mosConfig_absolute_path'] . '/includes/HTML_toolbar.php'; mosMakeHtmlSafe($row); ob_start(); ?> <form action="index.php" method="post" name="adminForm" onsubmit="javascript:setgood();" id="dm_frmedit" class="dm_form"> <?php $tabs = new dmTabs(0); echo $tabs->startPane("content-pane"); echo $tabs->startTab(_DML_DOCUMENT, "document-page"); HTML_DMDocuments::_showTabDocument($row, $lists, $last, $created); echo $tabs->endTab(); echo $tabs->startTab(_DML_TAB_PERMISSIONS, "permissions-page"); HTML_DMDocuments::_showTabPermissions($row, $lists, $last, $created); echo $tabs->endTab(); echo $tabs->startTab(_DML_TAB_LICENSE, "license-page"); HTML_DMDocuments::_showTabLicense($row, $lists, $last, $created); if (isset($params)) { echo $tabs->endTab(); echo $tabs->startTab(_DML_TAB_DETAILS, "details-page"); HTML_DMDocuments::_showTabDetails($row, $lists, $last, $created, $params); } echo $tabs->endTab(); echo $tabs->endPane(); ?> <br /> <p> <label class="nofloat" for="dmdescription"><?php echo _DML_DESCRIPTION; ?> </label><br /> <?php // parameters : areaname, content, hidden field, width, height, rows, cols DOCMAN_Compat::editorArea('editor1', $row->dmdescription, 'dmdescription', '550', '250', '50', '10'); ?> </p> <input type="hidden" name="goodexit" value="0" /> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="option" value="com_docman" /> <input type="hidden" name="task" value="doc_save" /> <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?> " /> <input type="hidden" name="dmcounter" value="<?php echo $row->dmcounter; ?> " /> <?php echo DOCMAN_token::render(); ?> </form> <?php $html = ob_get_contents(); ob_end_clean(); return $html; }
function _showTabBasic(&$row, &$lists, &$last, &$created) { ?> <tr> <td width="250" align="right"><?php echo _DML_NAME; ?> </td> <td colspan="2"> <input class="inputbox" type="text" name="dmname" size="50" maxlength="100" value="<?php echo $row->dmname; ?> " /> </td> </tr> <tr> <td align="right"><?php echo _DML_CAT; ?> </td> <td><?php echo $lists['catid']; ?> </td> </tr> <?php if (!$row->approved) { ?> <tr> <td valign="top" align="right"><?php echo _DML_APPROVED; ?> </td> <td><?php echo $lists['approved']; echo DOCMAN_Utils::mosToolTip(_DML_APPROVED_TOOLTIP . '.</span>', _DML_APPROVED); ?> </td> </tr> <?php } ?> <tr> <td valign="top" align="right"><?php echo _DML_PUBLISHED; ?> </td> <td> <?php echo $lists['published']; // echo DOCMAN_Utils::mosToolTip(_PUBLISHED_TOOLTIP.'.</span>', _DML_PUBLISHED); ?> </td> </tr> <tr> <td valign="top"><?php echo _DML_DESCRIPTION; ?> </td> <td colspan="2"> <?php // parameters : areaname, content, hidden field, width, height, rows, cols DOCMAN_Compat::editorArea('editor1', $row->dmdescription, 'dmdescription', '500', '200', '50', '5'); ?> </td> </tr> <?php }
/** * Writes the edit form for new and existing categories * * @param mosCategory $ The category object * @param string $ * @param array $ */ function edit(&$row, $section, &$lists, $redirect) { global $mosConfig_live_site, $mosConfig_absolute_path; if ($row->image == "") { $row->image = 'blank.png'; } mosMakeHtmlSafe($row, ENT_QUOTES, 'description'); ?> <script language="javascript" type="text/javascript"> function submitbutton(pressbutton, section) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } if ( form.name.value == "" ) { alert('<?php echo _DML_CAT_MUST_SELECT_NAME; ?> '); } else { <?php getEditorContents('editor1', 'description'); ?> submitform(pressbutton); } } </script> <form action="index2.php" method="post" name="adminForm"> <?php $tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_CAT . ' ' . $row->name; dmHTML::adminHeading($tmp, 'categories'); ?> <table width="100%"> <tr> <td valign="top"> <table class="adminform"> <tr> <th colspan="3"> <?php echo _DML_CATDETAILS; ?> </th> <tr> <tr> <td> <?php echo _DML_CATTITLE; ?> : </td> <td colspan="2"> <input class="text_area" type="text" name="title" value="<?php echo $row->title; ?> " size="50" maxlength="50" title="A short name to appear in menus" /> </td> </tr> <tr> <td> <?php echo _DML_CATNAME; ?> : </td> <td colspan="2"> <input class="text_area" type="text" name="name" value="<?php echo $row->name; ?> " size="50" maxlength="255" title="<?php echo _DML_LONGNAME; ?> " /> </td> </tr> <tr> <td align="right"><?php echo _DML_PARENTITEM; ?> :</td> <td> <?php echo $lists['parent']; ?> </td> </tr> <tr> <td> <?php echo _DML_IMAGE; ?> : </td> <td> <?php echo $lists['image']; ?> </td> <td rowspan="4" width="50%"> <script language="javascript" type="text/javascript"> if (document.forms[0].image.options.value!=''){ jsimg='../images/stories/' + getSelectedValue( 'adminForm', 'image' ); } else { jsimg='../images/M_images/blank.png'; } document.write('<img src=' + jsimg + ' name="imagelib" width="80" height="80" border="2" alt="<?php echo _DML_PREVIEW; ?> " />'); </script> </td> </tr> <tr> <td> <?php echo _DML_IMAGEPOS; ?> : </td> <td> <?php echo $lists['image_position']; ?> </td> </tr> <tr> <td> <?php echo _DML_ORDERING; ?> : </td> <td> <?php echo $lists['ordering']; ?> </td> </tr> <tr> <td> <?php echo _DML_ACCESSLEVEL; ?> : </td> <td> <?php echo $lists['access']; ?> </td> </tr> <tr> <td> <?php echo _DML_PUBLISHED; ?> : </td> <td> <?php echo $lists['published']; ?> </td> </tr> <tr> <td valign="top"> <?php echo _DML_DESCRIPTION; ?> : </td> <td colspan="2"> <?php // parameters : areaname, content, hidden field, width, height, rows, cols DOCMAN_Compat::editorArea('editor1', $row->description, 'description', '500', '200', '50', '5'); ?> </td> </tr> </table> </td> </tr> </table> <input type="hidden" name="option" value="com_docman" /> <input type="hidden" name="section" value="categories" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="oldtitle" value="<?php echo $row->title; ?> " /> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="sectionid" value="com_docman" /> <input type="hidden" name="redirect" value="<?php echo $redirect; ?> " /> <?php echo DOCMAN_token::render(); ?> </form> <?php include_once $mosConfig_absolute_path . "/components/com_docman/footer.php"; }
function _showTabBasic(&$row, &$lists, &$last, &$created) { ?> <tr> <td class="key"><?php echo _DML_NAME; ?> </td> <td colspan="2"> <input class="inputbox" type="text" name="dmname" size="50" maxlength="100" value="<?php echo $row->dmname; ?> " /> </td> </tr> <tr> <td class="key"><?php echo _DML_CAT; ?> </td> <td><?php echo $lists['catid']; ?> </td> </tr> <?php if (!$row->approved) { ?> <tr> <td class="key"> <label class="hasTip" title="<?php echo _DML_APPROVED . '::' . _DML_APPROVED_TOOLTIP; ?> "><?php echo _DML_APPROVED; ?> </label> </td> <td> <?php echo $lists['approved']; ?> </td> </tr> <?php } else { ?> <input type="hidden" value="<?php echo $row->approved; ?> " name="approved" /> <?php } ?> <tr> <td class="key"> <label class="hasTip" title="<?php echo _DML_PUBLISHED; ?> "><?php echo _DML_PUBLISHED; ?> </label> </td> <td> <?php echo $lists['published']; ?> </td> </tr> <tr> <td class="key"><?php echo _DML_DESCRIPTION; ?> </td> <td colspan="2"> <?php // parameters : areaname, content, hidden field, width, height, rows, cols DOCMAN_Compat::editorArea('editor1', $row->dmdescription, 'dmdescription', '500', '200', '50', '5'); ?> </td> </tr> <?php }
function editLicense($option, &$row) { global $mosConfig_absolute_path; mosMakeHtmlSafe($row); ?> <script language="javascript" type="text/javascript"> function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } if (form.name.value == "") { alert ( "<?php echo _E_WARNTITLE; ?> " ); } else { <?php getEditorContents('editor1', 'license'); ?> submitform( pressbutton ); } } </script> <form action="index2.php" method="post" name="adminForm" id="adminForm"> <?php $tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_LICENSES; dmHTML::adminHeading($tmp, 'licenses'); ?> <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform"> <tr> <td width="20%" align="right"><?php echo _DML_NAME; ?> :</td> <td width="80%"> <input class="inputbox" type="text" name="name" size="50" maxlength="100" value="<?php echo $row->name; ?> " /> </td> </tr> <tr> <td valign="top" align="right"><?php echo _DML_LICENSE_TEXT; ?> :</td> <td> <?php DOCMAN_Compat::editorArea('editor1', $row->license, 'license', '700', '600', '60', '30'); ?> </td> </tr> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="option" value="com_docman" /> <input type="hidden" name="section" value="licenses" /> <input type="hidden" name="task" value="" /> <?php echo DOCMAN_token::render(); ?> </form> </table> <?php include_once $mosConfig_absolute_path . "/components/com_docman/footer.php"; }
function editLicense($option, &$row) { JFilterOutput::objectHTMLSafe($row); ?> <script language="javascript" type="text/javascript"> function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } <?php jimport('joomla.html.editor'); $editor =& JFactory::getEditor(); echo $editor->save('license'); ?> submitform( pressbutton ); } </script> <form action="index.php" method="post" name="adminForm" id="adminForm"> <?php $tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_LICENSES; dmHTML::adminHeading($tmp, 'licenses'); ?> <fieldset class="adminform"> <legend><?php echo _DML_LICENSE; ?> </legend> <table class="admintable"> <tr> <td class="key"><?php echo _DML_NAME; ?> :</td> <td> <input class="inputbox" type="text" name="name" size="50" maxlength="100" value="<?php echo $row->name; ?> " /> </td> </tr> <tr> <td class="key"><?php echo _DML_LICENSE_TEXT; ?> :</td> <td> <?php DOCMAN_Compat::editorArea('editor1', $row->license, 'license', '700', '600', '60', '30'); ?> </td> </tr> </table> </fieldset> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="option" value="com_docman" /> <input type="hidden" name="section" value="licenses" /> <input type="hidden" name="task" value="" /> <?php echo DOCMAN_token::render(); ?> </form> <?php include_once JPATH_SITE . DS . 'components' . DS . 'com_docman' . DS . 'footer.php'; }
/** * Writes the edit form for new and existing categories * * @param mosCategory $ The category object * @param string $ * @param array $ */ function edit(&$row, $section, &$lists, $redirect) { if ($row->image == "") { $row->image = 'blank.png'; } JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'description'); jimport('joomla.html.editor'); $editor =& JFactory::getEditor(); ?> <script language="javascript" type="text/javascript"> function submitbutton(pressbutton, section) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } if ( form.name.value == "" || form.title.value == "") { alert('<?php echo _DML_CAT_MUST_SELECT_NAME; ?> '); } else { <?php echo $editor->save('description'); ?> submitform(pressbutton); } } </script> <form action="index.php" method="post" name="adminForm"> <?php $tmp = ($row->id ? _DML_EDIT : _DML_ADD) . ' ' . _DML_CAT . ' ' . $row->name; dmHTML::adminHeading($tmp, 'categories'); ?> <div class="col width-50"> <fieldset class="adminform"> <legend><?php echo _DML_CATDETAILS; ?> </legend> <table class="admintable"> <tr> <td class="key"><label><?php echo _DML_CATTITLE; ?> :</label></td> <td colspan="2"> <input class="text_area" type="text" name="title" value="<?php echo $row->title; ?> " size="50" maxlength="50" title="A short name to appear in menus" /> </td> </tr> <tr> <td class="key"><?php echo _DML_CATNAME; ?> :</td> <td colspan="2"> <input class="text_area" type="text" name="name" value="<?php echo $row->name; ?> " size="50" maxlength="255" title="<?php echo _DML_LONGNAME; ?> " /> </td> </tr> <tr> <td class="key"><?php echo _DML_PARENTITEM; ?> :</td> <td><?php echo $lists['parent']; ?> </td> </tr> <tr> <td class="key"><?php echo _DML_IMAGE; ?> :</td> <td><?php echo $lists['image']; ?> <br /><br /> <script language="javascript" type="text/javascript"> if (document.forms[0].image.options.value!=''){ jsimg='../images/stories/' + getSelectedValue( 'adminForm', 'image' ); } else { jsimg='../images/M_images/blank.png'; } document.write('<img src=' + jsimg + ' name="imagelib" width="80" height="80" border="2" alt="<?php echo _DML_PREVIEW; ?> " />'); </script> </td> </tr> <tr> <td class="key"><?php echo _DML_IMAGEPOS; ?> :</td> <td><?php echo $lists['image_position']; ?> </td> </tr> <tr> <td class="key"><?php echo _DML_ORDERING; ?> :</td> <td><?php echo $lists['ordering']; ?> </td> </tr> <tr> <td class="key"><?php echo _DML_ACCESSLEVEL; ?> :</td> <td><?php echo $lists['access']; ?> </td> </tr> <tr> <td class="key"><?php echo _DML_PUBLISHED; ?> :</td> <td><?php echo $lists['published']; ?> </td> </tr> </table> </fieldset> </div> <div class="col width-50"> <fieldset class="adminform"> <legend><?php echo _DML_DESCRIPTION; ?> </legend> <?php // parameters : areaname, content, hidden field, width, height, rows, cols DOCMAN_Compat::editorArea('editor1', $row->description, 'description', '440', '282', '50', '5'); ?> </fieldset> </div> <div style="clear: both;"></div> <input type="hidden" name="option" value="com_docman" /> <input type="hidden" name="section" value="categories" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="oldtitle" value="<?php echo $row->title; ?> " /> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="sectionid" value="com_docman" /> <input type="hidden" name="redirect" value="<?php echo $redirect; ?> " /> <?php echo DOCMAN_token::render(); ?> </form> <?php include_once JPATH_ROOT . "/components/com_docman/footer.php"; }