function Joom_Comments(&$func, &$id) { $user =& JFactory::getUser(); // anstatt global $my; include_once JPATH_COMPONENT . DS . 'includes' . DS . 'html' . DS . 'joom.comments.html.php'; $this->jg_code = Joom_FixUserEntrie2(Joom_mosGetParam('jg_code', '', 'post')); $this->cmtname = Joom_FixUserEntrie(Joom_mosGetParam('cmtname', '', 'post')); $this->cmttext = Joom_FixUserEntrie(Joom_mosGetParam('cmttext', '', 'post')); $this->jg_captcha_id = JRequest::getInt('jg_captcha_id', '', 'post'); $this->cmtid = JRequest::getInt('cmtid', 0); $this->userid = $user->get('id'); // do not save username when registered user: if ($this->userid > 0) { $this->cmtname = ''; } $this->cmtpic = JRequest::getInt('cmtpic', 0, 'post'); if ($this->cmtpic == '') { $this->cmtpic = JRequest::getInt('cmtpic', ''); } switch ($func) { case 'commentpic': $this->Joom_CommentPic($id); break; case 'deletecomment': $this->Joom_DeleteComment(); break; } }
/** * Constructor * * @param string $task type of upload * @param int $catid destination category * @return Joom_Upload */ function Joom_Upload($task, $catid) { $database =& JFactory::getDBO(); $user =& JFactory::getUser(); jimport('joomla.filesystem.file'); $this->debug = JRequest::getInt('debug', 0); $this->batchul = JRequest::getInt('batchul', 0); $this->subdirectory = Joom_mosGetParam('subdirectory', DS, 'post'); $this->gentitle = Joom_mosGetParam('gentitle', '', 'post'); $this->gendesc = Joom_FixUserEntrie(Joom_mosGetParam('gendesc', '')); $this->photocred = Joom_FixUserEntrie(Joom_mosGetParam('photocred', '')); $this->filecounter = Joom_mosGetParam('filecounter', '', 'post'); $this->file_delete = Joom_mosGetParam('file_delete', '', 'post'); $this->original_delete = Joom_mosGetParam('original_delete', '', 'post'); $this->create_special_gif = Joom_mosGetParam('create_special_gif', '', 'post'); $this->arrscreenshot = Joom_mosGetParam('arrscreenshot', '', 'files'); $this->zippack = Joom_mosGetParam('zippack', '', 'files'); $this->ftpfiles = Joom_mosGetParam('ftpfiles', '', 'post'); $this->imgname_separator = '_'; switch ($task) { //Single upload case 'uploadhandler': $this->Upload_Singles_Backend($catid); break; //ZIP upload //ZIP upload case 'batchuploadhandler': $this->Upload_Batch($catid); break; //FTP upload //FTP upload case 'ftpuploadhandler': $this->Upload_FTP($catid); break; //JAVA upload //JAVA upload case 'juploadhandler_receive': $this->Upload_AppletReceive_Backend($catid); break; default: jexit('Wrong Task'); break; } }
/** * New Category * * @param string $publist * @param string $glist * @param string $Lists * @param string $orderlist * @param string $jg_wrongvaluecolor */ function Joom_ShowNewCategory_HTML(&$publist, $glist, $Lists, $orderlist, $jg_wrongvaluecolor) { //TODO need of this values? $name = Joom_FixUserEntrie(Joom_mosGetParam('name', '')); $description = Joom_mosGetParam('description', ''); ?> <script language="javascript" type="text/javascript"> function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancelcatg') { submitform(pressbutton); return; } // do field validation form.name.style.backgroundColor = ''; var ffwrong = '<?php echo $jg_wrongvaluecolor; ?> '; try { document.adminForm.onsubmit(); } catch(e){} if (form.name.value == '' || form.name.value == null) { alert('<?php echo JText::_('JGA_ALERT_CATEGORY_MUST_HAVE_TITLE', true); ?> '); form.name.style.backgroundColor = ffwrong; form.name.focus(); } else { <?php $editor =& JFactory::getEditor(); echo $editor->getContent('description'); ?> submitform(pressbutton); } } </script> <form action="index.php" method="post" name="adminForm"> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminform"> <tr class="row0"> <td width="200"> <?php echo JText::_('JGA_TITLE') . ':'; ?> </td> <td> <input class="inputbox" type="text" name="name" size="25" value="<?php echo $name; ?> " /> </td> </tr> <tr class="row1"> <td valign="top" > <?php echo JText::_('JGA_PARENT_CATEGORY') . ':'; ?> </td> <td nowrap > <?php echo $Lists["catgs"]; ?> </td> </tr> <tr class="row0"> <td valign="top"> <?php echo JText::_('JGA_DESCRIPTION') . ':'; ?> </td> <td> <?php // parameters : areaname, content, hidden field, width, height, rows, cols echo $editor->display('description', str_replace('&', '&', $description), '620', '200', '70', '10', false); ?> </td> </tr> <tr class="row1"> <td valign="top" > <?php echo JText::_('JGA_HIT') . ':'; ?> </td> <td nowrap> <?php echo $glist; ?> </td> </tr> <tr class="row0"> <td valign="top" > <?php echo JText::_('JGA_PUBLISHED') . ':'; ?> </td> <td nowrap> <?php echo $publist; ?> </td> </tr> <tr class="row1"> <td valign="top" > <?php echo JText::_('JGA_ORDERING') . ':'; ?> </td> <td nowrap > <?php echo $orderlist; ?> </td> </tr> </table> <input type="hidden" name="task" value="" /> <input type="hidden" name="option" value="<?php echo _JOOM_OPTION; ?> " /> <input type="hidden" name="catimage" value="" /> </form> <?php }