| Server IP : 87.98.154.146 / Your IP : 216.73.216.101 Web Server : Apache System : Linux webm005.cluster126.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : bsiadvisil ( 110003) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/bsiadvisil/www/administrator/components/com_rsform/controllers/ |
Upload File : |
<?php
/**
* @package RSForm! Pro
* @copyright (C) 2007-2014 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/
defined('_JEXEC') or die('Restricted access');
class RsformControllerEmails extends RsformController
{
function __construct()
{
parent::__construct();
$this->registerTask('apply', 'save');
$this->_db = JFactory::getDbo();
}
function save()
{
$model = $this->getModel('forms');
$row = $model->saveemail();
$type = JFactory::getApplication()->input->getCmd('type','additional');
if ($this->getTask() == 'apply')
return $this->setRedirect('index.php?option=com_rsform&task=forms.emails&type='.$type.'&cid='.$row->id.'&formId='.$row->formId.'&tmpl=component&update=1');
$document = JFactory::getDocument();
$document->addScriptDeclaration('window.opener.updateemails('.$row->formId.',\''.JFactory::getApplication()->input->getCmd('type','additional').'\');window.close();');
}
function remove()
{
$db = JFactory::getDbo();
$cid = JFactory::getApplication()->input->getInt('cid');
$formId = JFactory::getApplication()->input->getInt('formId');
$type = JFactory::getApplication()->input->getCmd('type','additional');
$view = $type == 'additional' ? 'forms' : 'directory';
if ($cid)
{
$db->setQuery("DELETE FROM #__rsform_emails WHERE id = ".$cid." ");
$db->execute();
$db->setQuery("DELETE FROM #__rsform_translations WHERE reference_id IN ('".$cid.".fromname','".$cid.".subject','".$cid.".message') ");
$db->execute();
}
JFactory::getApplication()->input->set('view', $view);
JFactory::getApplication()->input->set('layout', 'edit_emails');
JFactory::getApplication()->input->set('tmpl', 'component');
JFactory::getApplication()->input->set('formId', $formId);
JFactory::getApplication()->input->set('type', $type);
parent::display();
jexit();
}
function update()
{
$formId = JFactory::getApplication()->input->getInt('formId');
$view = JFactory::getApplication()->input->getCmd('type','additional') == 'additional' ? 'forms' : 'directory';
JFactory::getApplication()->input->set('view', $view);
JFactory::getApplication()->input->set('layout', 'edit_emails');
JFactory::getApplication()->input->set('tmpl', 'component');
JFactory::getApplication()->input->set('formId', $formId);
parent::display();
jexit();
}
}