public static function saison(&$row, $lists, $option) { // Nur CLM-Admin darf hier zugreifen (neue Saison) if (!JFactory::getUser()->authorise('core.manage.clm', 'com_clm')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } CLMViewSaisons::setSaisonToolbar(); JRequest::setVar('hidemainmenu', 1); JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'extrainfo'); ?> <form action="index.php" method="post" name="adminForm" id="adminForm"> <div class="width-50 fltlft"> <fieldset class="adminform"> <legend><?php echo JText::_('SAISON_DETAILS'); ?> </legend> <table class="admintable"> <tr> <td class="key" width="20%" nowrap="nowrap"> <label for="name"><?php echo JText::_('SAISON') . ' : '; ?> </label> </td> <td> <input class="inputbox" type="text" name="name" id="name" size="50" maxlength="60" value="<?php echo $row->name; ?> " /> </td> </tr> <tr> <td class="key" nowrap="nowrap"><label for="published"><?php echo JText::_('JPUBLISHED') . ' : '; ?> </label> </td> <td><fieldset class="radio"> <?php echo $lists['published']; ?> </fieldset></td> </tr> <tr> <td class="key" nowrap="nowrap"><label for="archiv"><?php echo JText::_('SAISON_ARCHIVED') . ' : '; ?> </label> </td> <td><fieldset class="radio"> <?php echo $lists['archiv']; ?> </fieldset></td> </tr> <tr> <td class="key" width="20%" > <label for="datum"><?php echo JText::_('SAISON_DSB_DATE') . ' : '; ?> </label> </td> <td> <?php echo JHtml::_('calendar', $row->datum, 'datum', 'datum', '%Y-%m-%d', array('class' => 'inputbox', 'size' => '32', 'maxlength' => '19')); ?> </td> </tr> </table> </fieldset> </div> <div class="width-50 fltrt"> <fieldset class="adminform"> <legend><?php echo JText::_('REMARKS'); ?> </legend> <table class="adminlist"> <legend><?php echo JText::_('REMARKS_PUBLIC'); ?> </legend> <br> <tr> <td width="100%" valign="top"> <textarea class="inputbox" name="bemerkungen" id="bemerkungen" cols="40" rows="5" style="width:90%"><?php echo str_replace('&', '&', $row->bemerkungen); ?> </textarea> </td> </tr> </table> <table class="adminlist"> <tr><legend><?php echo JText::_('REMARKS_INTERNAL'); ?> </legend> <br> <td width="100%" valign="top"> <textarea class="inputbox" name="bem_int" id="bem_int" cols="40" rows="5" style="width:90%"><?php echo str_replace('&', '&', $row->bem_int); ?> </textarea> </td> </tr> </table> </fieldset> </div> <div class="clr"></div> <input type="hidden" name="section" value="saisons" /> <input type="hidden" name="option" value="com_clm" /> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="task" value="" /> <?php echo JHtml::_('form.token'); ?> </form> <?php }
function edit() { global $mainframe, $option; // Check for request forgeries $db =& JFactory::getDBO(); $user =& JFactory::getUser(); $task = JRequest::getVar('task'); $cid = JRequest::getVar('cid', array(0), '', 'array'); $option = JRequest::getCmd('option'); JArrayHelper::toInteger($cid, array(0)); $row =& JTable::getInstance('saisons', 'TableCLM'); // load the row from the db table // $row->load($cid[0]); if ($task == 'edit') { // do stuff for existing records $row->checkout($user->get('id')); } else { // do stuff for new records // $row->published = 0; } // Archiv $lists['archiv'] = JHTML::_('select.booleanlist', 'archiv', 'class="inputbox"', $row->archiv); $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published); require_once JPATH_COMPONENT . DS . 'views' . DS . 'saisons.php'; CLMViewSaisons::saison($row, $lists, $option); }
function save() { $mainframe = JFactory::getApplication(); $option = JRequest::getCmd('option'); // Check for request forgeries JRequest::checkToken() or die('Invalid Token'); $section = JRequest::getVar('section'); $db = JFactory::getDBO(); $task = JRequest::getVar('task'); $row = JTable::getInstance('saisons', 'TableCLM'); if (!$row->bind(JRequest::get('post'))) { JError::raiseError(500, $row->getError()); } // pre-save checks if (!$row->check()) { JError::raiseError(500, $row->getError()); } if (!$row->id) { $id = -1; } else { $id = $row->id; } $out = clm_core::$api->db_season_save($id, $row->published, $row->archiv, $row->name, $row->bemerkungen, $row->bem_int, $row->datum); if ($task == 'save' && $out[0]) { $link = 'index.php?option=' . $option . '§ion=' . $section; } else { if ($out[0]) { $link = 'index.php?option=' . $option . '§ion=' . $section . '&task=edit&cid[]=' . $out[2]; } else { $message = clm_core::$load->load_view("notification", array($out[1], false)); $message = $message[0]; // array dereferencing fix php 5.3 $mainframe->enqueueMessage($message[0], $message[1]); $option = JRequest::getCmd('option'); $lists['archiv'] = JHtml::_('select.booleanlist', 'archiv', 'class="inputbox"', $row->archiv); $lists['published'] = JHtml::_('select.booleanlist', 'published', 'class="inputbox"', $row->published); require_once JPATH_COMPONENT . DS . 'views' . DS . 'saisons.php'; CLMViewSaisons::saison($row, $lists, $option); return; } } // Log schreiben $clmLog = new CLMLog(); $clmLog->aktion = $aktion; $clmLog->params = array('sid' => $out[2]); $clmLog->write(); $message = clm_core::$load->load_view("notification", array($out[1], false)); $message = $message[0]; // array dereferencing fix php 5.3 $mainframe->redirect($link, $message[0], $message[1]); }
function saison(&$row, $lists, $option) { CLMViewSaisons::setSaisonToolbar(); JRequest::setVar('hidemainmenu', 1); JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'extrainfo'); ?> <form action="index.php" method="post" name="adminForm"> <div class="col width-50"> <fieldset class="adminform"> <legend><?php echo JText::_('SAISON_DETAILS'); ?> </legend> <table class="admintable"> <tr> <td class="key" width="20%" nowrap="nowrap"> <label for="name"><?php echo JText::_('SAISON') . ' : '; ?> </label> </td> <td> <input class="inputbox" type="text" name="name" id="name" size="50" maxlength="60" value="<?php echo $row->name; ?> " /> </td> </tr> <tr> <td class="key" nowrap="nowrap"><label for="published"><?php echo JText::_('PUBLISHED') . ' : '; ?> </label> </td> <td> <?php echo $lists['published']; ?> </td> </tr> <tr> <td class="key" nowrap="nowrap"><label for="archiv"><?php echo JText::_('SAISON_ARCHIVED') . ' : '; ?> </label> </td> <td> <?php echo $lists['archiv']; ?> </td> </tr> <tr> <td class="key" width="20%" > <label for="datum"><?php echo JText::_('SAISON_DSB_DATE') . ' : '; ?> </label> </td> <td> <?php echo JHTML::_('calendar', $row->datum, 'datum', 'datum', '%Y-%m-%d', array('class' => 'inputbox', 'size' => '32', 'maxlength' => '19')); ?> </td> </tr> </table> </fieldset> </div> <div class="col width-50"> <fieldset class="adminform"> <legend><?php echo JText::_('SAISON_BEMERKUNGEN'); ?> </legend> <table class="adminlist"> <legend><?php echo JText::_('SAISON_OEFFENTLICH'); ?> </legend> <br> <tr> <td width="100%" valign="top"> <textarea class="inputbox" name="bemerkungen" id="bemerkungen" cols="40" rows="5" style="width:90%"><?php echo str_replace('&', '&', $row->bemerkungen); ?> </textarea> </td> </tr> </table> <table class="adminlist"> <tr><legend><?php echo JText::_('SAISON_INTERN'); ?> </legend> <br> <td width="100%" valign="top"> <textarea class="inputbox" name="bem_int" id="bem_int" cols="40" rows="5" style="width:90%"><?php echo str_replace('&', '&', $row->bem_int); ?> </textarea> </td> </tr> </table> </fieldset> </div> <div class="clr"></div> <input type="hidden" name="section" value="saisons" /> <input type="hidden" name="option" value="com_clm" /> <input type="hidden" name="id" value="<?php echo $row->id; ?> " /> <input type="hidden" name="cid" value="<?php echo $row->cid; ?> " /> <input type="hidden" name="client_id" value="<?php echo $row->cid; ?> " /> <input type="hidden" name="task" value="" /> <?php echo JHTML::_('form.token'); ?> </form> <?php }