| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/www/cj79373/administrator/components/com_sendinblue/controllers/ |
Upload File : |
<?php
/**
* @package Sendinblue
* @subpackage apikey.php
* @version 1.0.9
*
* @author Branislav Gligorov <branislav.gligorov@itsbg.eu>
* @copyright Copyright (C) 2018 Sendinblue, All Rights Reserved
* @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Sendinblue Apikey Controller
*/
class SendinblueControllerApikey extends JControllerLegacy
{
public function __construct($config)
{
parent::__construct($config);
}
public function dashboard()
{
$this->setRedirect(JRoute::_('index.php?option=com_sendinblue', false));
return;
}
public function saveApikey() {
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
$app = \JFactory::getApplication();
$jinput = $app->input;
$data['id'] = trim($jinput->get('id', '', 'INT'));
$data['apikey'] = trim($jinput->get('apikey', '', 'STRING'));
if ($data['apikey'] == '') {
$app->enqueueMessage(JText::_('COM_SENDINBLUE_API_KEY_CAN_NOT_BE_EMPTY'), 'error');
$this->setRedirect(JRoute::_('index.php?option=com_sendinblue&view=apikey', false));
return;
} else {
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_sendinblue/models', 'SendinblueModel');
$model = JModelLegacy::getInstance('Setting', 'SendinblueModel');
if ($data['id'] == '') { // new record
$data['title'] = date("Y-m-d H:i:s");
}
$result = $model->save($data);
if ($result == true) {
$app->enqueueMessage(JText::_('COM_SENDINBLUE_API_KEY_SUCCESSFULLY_SAVED'));
} else {
$app->enqueueMessage(JText::_('COM_SENDINBLUE_ERROR_IN_SAVING_API_KEY'), 'error');
}
}
$this->setRedirect(JRoute::_('index.php?option=com_sendinblue', false));
return;
}
}