Spade
Mini Shell
ajax.json.php000064400000022366151171561530007166 0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage ajax.json.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Reservation Ajax Controller
*/
class ReservationControllerAjax extends JControllerLegacy
{
public function __construct($config)
{
parent::__construct($config);
// make sure all json stuff are set
JFactory::getDocument()->setMimeEncoding( 'application/json'
);
JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"');
JResponse::setHeader("Access-Control-Allow-Origin",
"*");
// load the tasks
$this->registerTask('saveChat', 'ajax');
$this->registerTask('conversation', 'ajax');
$this->registerTask('ajaxReadMessage', 'ajax');
$this->registerTask('deleteChat', 'ajax');
$this->registerTask('goToClass', 'ajax');
$this->registerTask('getCatLevelOne', 'ajax');
$this->registerTask('getCatLevelTwo', 'ajax');
}
public function ajax()
{
$user = JFactory::getUser();
$jinput = JFactory::getApplication()->input;
// Check Token!
$token = JSession::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token ===
$call_token)
{
$task = $this->getTask();
switch($task)
{
case 'saveChat':
try
{
$returnRaw = $jinput->get('raw', false,
'BOOLEAN');
$messageValue = $jinput->get('message', NULL,
'RAW');
$fromValue = $jinput->get('from', NULL,
'STRING');
$toValue = $jinput->get('to', NULL, 'STRING');
$seidValue = $jinput->get('seid', NULL,
'INT');
$pidValue = $jinput->get('pid', NULL, 'INT');
$replyidValue = $jinput->get('replyid', 0,
'INT');
$pmidValue = $jinput->get('pmid', 0, 'INT');
if($messageValue && $user->id != 0 && $fromValue
&& $toValue && $seidValue && $pidValue)
{
$result =
$this->getModel('ajax')->saveChat($messageValue,
$fromValue, $toValue, $seidValue, $pidValue, $replyidValue, $pmidValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'conversation':
try
{
$returnRaw = $jinput->get('raw', false,
'BOOLEAN');
$user1Value = $jinput->get('user1', NULL,
'INT');
$user2Value = $jinput->get('user2', NULL,
'INT');
$seidValue = $jinput->get('seid', NULL,
'INT');
$pidValue = $jinput->get('pid', NULL, 'INT');
if($user1Value && $user->id != 0 && $user2Value
&& $seidValue && $pidValue)
{
$result =
$this->getModel('ajax')->conversation($user1Value,
$user2Value, $seidValue, $pidValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'ajaxReadMessage':
try
{
$returnRaw = $jinput->get('raw', false,
'BOOLEAN');
$midValue = $jinput->get('mid', NULL, 'INT');
$seidValue = $jinput->get('seid', NULL,
'INT');
if($midValue && $user->id != 0 && $seidValue)
{
$result =
$this->getModel('ajax')->ajaxReadMessage($midValue,
$seidValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'deleteChat':
try
{
$returnRaw = $jinput->get('raw', false,
'BOOLEAN');
$midValue = $jinput->get('mid', NULL, 'INT');
if($midValue && $user->id != 0)
{
$result =
$this->getModel('ajax')->deleteChat($midValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'goToClass':
try
{
$returnRaw = $jinput->get('raw', false,
'BOOLEAN');
$user1Value = $jinput->get('user1', NULL,
'INT');
$user2Value = $jinput->get('user2', NULL,
'INT');
$seidValue = $jinput->get('seid', NULL,
'INT');
$pidValue = $jinput->get('pid', NULL, 'INT');
if($user1Value && $user->id != 0 && $user2Value
&& $seidValue && $pidValue)
{
$result =
$this->getModel('ajax')->goToClass($user1Value,
$user2Value, $seidValue, $pidValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getCatLevelOne':
try
{
$returnRaw = $jinput->get('raw', false,
'BOOLEAN');
$extensionValue = $jinput->get('extension', NULL,
'STRING');
if($extensionValue)
{
$result =
$this->getModel('ajax')->getCatLevelOne($extensionValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'getCatLevelTwo':
try
{
$returnRaw = $jinput->get('raw', false,
'BOOLEAN');
$catIdLevel1Value = $jinput->get('catIdLevel1', NULL,
'INT');
if($catIdLevel1Value)
{
$result =
$this->getModel('ajax')->getCatLevelTwo($catIdLevel1Value);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
}
}
else
{
if($callback = $jinput->get('callback', null,
'CMD'))
{
echo $callback."(".json_encode(false).");";
}
else
{
echo "(".json_encode(false).");";
}
}
}
}
comment.php000064400000011243151171561530006725 0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage comment.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Reservation Comment Controller
*/
class ReservationControllerComment extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'login'; // safeguard for setting the
return view listing to the default site view.
parent::__construct($config);
}
/***[JCBGUI.site_view.php_controller.32.$$$$]***/
public function save($key = NULL, $urlVar = NULL)
{
$app= JFactory::getApplication();
$data=
$app->input->get('jform',array(),'array');
$uid= $app->input->get('uid', 0);
$userid= JFactory::getUser()->get('id', 0);
$seid= $app->input->get('seid', 0);
$currentUrl= (string)JUri::getInstance();
\JPluginHelper::importPlugin('reservation');
$dispatcher = \JEventDispatcher::getInstance();
$result=
$dispatcher->trigger('onBeforeSaveComment',array($uid,$userid,$seid));
$data['seid']= $seid;
$data['sickid']= $result[0]['sickid'];
$data['consultantid']= $result[0]['consultantid'];
$data['token']= md5(uniqid(rand(), true));
JLoader::register('ReservationModelComment',JPATH_COMPONENT_ADMINISTRATOR.'/models/comment.php');
$commentModel= new ReservationModelComment();
\JForm::addFormPath(JPATH_COMPONENT_ADMINISTRATOR .
'/models/forms');
$form= $commentModel->getForm($data,false);
$filterData= $form->filter($data);
$filterData['published']= 0;
$validData= $commentModel->validate($form,$filterData);
if ($validData === false)
{
$errors= $commentModel->getErrors();
foreach ($errors as $error) {
$app->enqueueMessage($error->getMessage(),'warning');
}
$app->setUserState('comment.data',$filterData);
$app->redirect($currentUrl);
}
if($commentModel->save($filterData))
{
$app->setUserState('status',1);
$app->setUserState('comment.data','');
$app->redirect($currentUrl);
}
}/***[/JCBGUI$$$$]***/
/**
* Method to check if you can edit an existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key;
default is id.
*
* @return boolean
*
* @since 12.2
*/
protected function allowEdit($data = array(), $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// to insure no other tampering
return false;
}
/**
* Method to check if you can save a new or existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 12.2
*/
protected function allowSave($data, $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 12.2
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
}
}
consultantsignup.php000064400000016352151171561530010711 0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage consultantsignup.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Reservation Consultantsignup Controller
*/
class ReservationControllerConsultantsignup extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'login'; // safeguard for setting the
return view listing to the default site view.
parent::__construct($config);
}
/***[JCBGUI.site_view.php_controller.31.$$$$]***/
public function signup()
{
$app= JFactory::getApplication();
if(!JFactory::getUser()->guest)
{
$app->enqueueMessage('برای ساخت حساب جدید
ابتدا از حساب فعلی خود خارج
شوید','warning');
$app->redirect(JUri::root());
}
$uri = (string)JUri::getInstance();
JLoader::register('ReservationModelConsultant',
JPATH_COMPONENT_ADMINISTRATOR.'/models/consultant.php');
\JForm::addFormPath(JPATH_COMPONENT_ADMINISTRATOR .
'/models/forms');
$data=
JFactory::getApplication()->input->get('jform',array(),'array');
$consultantModel= new ReservationModelConsultant;
$form = $consultantModel->getForm($data, false);
$xml = new SimpleXMLElement('<field name="password"
validate="password"/>');
$form->setField($xml);
// $rule= JFormHelper::loadRuleType('password');
// $res= $rule->test($xml,$data['password']);
// $filteredData = $form->filter($data);
$filter= JFilterInput::getInstance();
$data['name']= preg_replace('/[0-9]+/',
'', $data['name']);
$data['capital']= preg_replace('/[0-9]+/',
'', $data['capital']);
$data['msn']= $filter->clean( $data['msn'],
'int');
$data['nationalnumber']= $filter->clean(
$data['nationalnumber'], 'int');
$data['experience']= $filter->clean(
$data['experience'], 'int');
$model= $this->getModel();
if($model->checkPhoneExist($data['phonenumber']))
{
$app->enqueueMessage('این شماره تلفن قبلا
در این سامانه ثبت شده است لطفا با شماره
تلفن دیگری ثبت نام کنید','warning');
$app->setUserState('consultant.data',$data);
$app->redirect($uri);
}
$validData = $consultantModel->validate($form, $data);
if ($validData === false)
{
$errors = $consultantModel->getErrors();
foreach ($errors as $error) {
$app->enqueueMessage($error->getMessage(),'warning');
}
$app->setUserState('consultant.data',$data);
$app->redirect($uri);
}
else{
$userdata = array(
"name"=> $data['name'],
"username"=> $data['phonenumber'],
"password"=> $data['password'],
"password2"=> $data['password'],
"email"=>
'R_'.$data['phonenumber'].'@gmail.com',
"block"=> 0,
);
jimport('joomla.user.helper');
$params= $app->getparams('com_reservation');
$userGroup= $params->get('consultantgroup');
if(!isset($userGroup))
$userGroup = 2;
$userdata["groups"] = $userGroup;
$user = new JUser;
if(!$user->bind($userdata)) {
$app->enqueueMessage($user->getError(),
'warning');
$app->redirect($uri);
return false;
}
if (!$user->save()) {
$app->enqueueMessage($user->getError(),
'warning');
$app->redirect($uri);
return false;
}
$app->setUserState('consultant.data',$data);
$userId= $user->id;
$consultantInfo= array(
'userid'=> $userId,
'msn' => $data['msn'],
'nationalnumber' =>
$data['nationalnumber'],
'catid' => $data['catid'],
'capital' => $data['capital'],
'phonenumber' => $data['phonenumber'],
'experience' => $data['experience']
);
if(!$consultantModel->save($consultantInfo))
{
$app->enqueueMessage('اطلاعات خود را
تصحیح کرده و سپس وارد نمایید',
'warning');
$app->redirect($uri);
}
$app->setUserState('consultant.data','');
echo 'user saved successfully';
}
$credentials = array();
$credentials['username'] = $data['phonenumber'];
$credentials['password'] = $data['password'];
$login_site = JFactory::getApplication('site');
$login_site->login($credentials, $options=array());
$redirect = JUri::root();
$login_site->redirect($redirect);
}/***[/JCBGUI$$$$]***/
/**
* Method to check if you can edit an existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key;
default is id.
*
* @return boolean
*
* @since 12.2
*/
protected function allowEdit($data = array(), $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// to insure no other tampering
return false;
}
/**
* Method to check if you can save a new or existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 12.2
*/
protected function allowSave($data, $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 12.2
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
}
}
consultant_plan.php000064400000014344151171561530010474 0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage consultant_plan.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Reservation Consultant_plan Controller
*/
class ReservationControllerConsultant_plan extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'login'; // safeguard for setting the
return view listing to the default site view.
parent::__construct($config);
}
/***[JCBGUI.site_view.php_controller.37.$$$$]***/
public function delete($key = NULL, $urlVar = NULL)
{
$app= JFactory::getApplication();
$uri= (string)JUri::getInstance();
$user= JFactory::getUser();
$jform=
$app->input->get('jform',array(),'array');
$consultant=
ReservationHelper::getConsultant($jform['consultantid']);
if ($consultant->userid != $user->get('id', 0))
$app->redirect(JUri::root());
$filename = __DIR__ . '/delete.txt';
$plans = array_keys($jform['plans']);
$plans = array_map(function ($a) { return intval(substr($a, 5)); },
$plans);
// file_put_contents($filename, 'plans = ' . print_r($plans,
true) . "\n" , FILE_APPEND);
JLoader::register('ReservationModelPlan', JPATH_ADMINISTRATOR
. '/components/com_reservation/models/plan.php');
JLoader::register('ReservationTablePlan', JPATH_ADMINISTRATOR
. '/components/com_reservation/tables/plan.php');
JPluginHelper::importPlugin('reservation');
$dispatcher = JEventDispatcher::getInstance();
foreach($plans as $pid)
{
$db = JFactory::getDbo();
$planmodel = new ReservationTablePlan($db);
$pkco = array(
'id' => $pid
);
$planmodel->publish($pkco, -2);
$pks = array($pid);
$dispatcher->trigger('onReservationPlanStateChanged',
array($pks, -2));
$planmodel->delete($pkco);
}
$app->redirect($uri);
}
public function save($key = NULL, $urlVar = NULL)
{
$filename = __DIR__ . '/save.txt';
// file_put_contents($filename, 'key = ' . print_r($key,
true) . "\n" , FILE_APPEND);
$uri= (string)JUri::getInstance();
$user= JFactory::getUser();
$app= JFactory::getApplication();
$jform=
$app->input->get('jform',array(),'array');
$consultant=
ReservationHelper::getConsultant($jform['consultantid']);
if ($consultant->userid != $user->get('id', 0))
$app->redirect(JUri::root());
JLoader::register('ReservationModelPlan',
JPATH_ADMINISTRATOR.'/components/com_reservation/models/plan.php');
if(isset($jform['planid']) &&
$jform['planid'])
{
$jform['id'] = $jform['planid'];
$planmodel = new ReservationModelPlan();
$planObj = $planmodel->getItem($jform['id']);
$consultant=
ReservationHelper::getConsultant($planObj->consultantid);
if ($consultant->userid != $user->get('id', 0))
$app->redirect(JUri::root());
}
unset($jform['planid']);
// file_put_contents($filename, 'jform = ' . print_r($jform,
true) . "\n" , FILE_APPEND);
$planmodel= new ReservationModelPlan;
if (!$planmodel->save($jform))
{
$app->enqueueMessage(JText::_('COM_RESERVATION_FAILED_TO_SAVE_PLAN',
'danger')); // failed to save plan
$app->redirect($uri);
}
$validData = (array)$planmodel->getItem();
JPluginHelper::importPlugin('reservation');
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onReservationPlanCreated',
array($validData));
$app->enqueueMessage(JText::_('COM_RESERVATION_PLAN_SAVED_SUCCESSFULLY',
'success')); // plan saved successfully
$app->redirect($uri);
}
/***[/JCBGUI$$$$]***/
/**
* Method to check if you can edit an existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key;
default is id.
*
* @return boolean
*
* @since 12.2
*/
protected function allowEdit($data = array(), $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// to insure no other tampering
return false;
}
/**
* Method to check if you can save a new or existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 12.2
*/
protected function allowSave($data, $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 12.2
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
}
}
doctors.php000064400000010162151171561530006737 0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.22
@build 1st March, 2021
@created 17th December, 2020
@package Reservation
@subpackage doctors.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Reservation Doctors Controller
*/
class ReservationControllerDoctors extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'doctor'; // safeguard for setting the
return view listing to the default site view.
parent::__construct($config);
}
/***[JCBGUI.site_view.php_controller.33.$$$$]***/
public function check()
{
$app= JFactory::getApplication();
$uid= $app->input->get('uid');
$params= $app->getparams('com_reservation');
$userGroups= !empty($params->get('doctorgroup'))?
$params->get('doctorgroup'): [0];
$db= JFactory::getDbo();
$query= $db->getQuery(true)
->select($db->quoteName('d.id'))
->from($db->quoteName('#__reservation_doctor','d'))
->join('inner',$db->quoteName('#__user_usergroup_map','uu').'on'.$db->quoteName('uu.user_id').'='.$db->quoteName('d.userid'))
->where($db->quoteName('d.userid').'='.$db->quote($uid))
->where($db->quoteName('uu.group_id').'IN('.implode(',',$userGroups).')');
$db->setQuery($query);
$result= $db->loadObject();
if (empty($result))
$app->redirect(JUri::root());
$app->redirect(JRoute::_('index.php?option=com_reservation&view=doctor&uid'.$uid,false));
}/***[/JCBGUI$$$$]***/
/**
* Method to check if you can edit an existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key;
default is id.
*
* @return boolean
*
* @since 12.2
*/
protected function allowEdit($data = array(), $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// to insure no other tampering
return false;
}
/**
* Method to check if you can save a new or existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 12.2
*/
protected function allowSave($data, $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 12.2
*/
protected function postSaveHook(JModelLegacy $model, $validData =
array())
{
}
}
doctorsignup.php000064400000016121151171561530010003 0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage doctorsignup.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Reservation Doctorsignup Controller
*/
class ReservationControllerDoctorsignup extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'login'; // safeguard for setting the
return view listing to the default site view.
parent::__construct($config);
}
/***[JCBGUI.site_view.php_controller.34.$$$$]***/
public function signup()
{
$app= JFactory::getApplication();
if(!JFactory::getUser()->guest)
{
$app->enqueueMessage('برای ساخت حساب
جدید ابتدا از حساب فعلی خود خارج
شوید','warning');
$app->redirect(JUri::root());
}
$uri = (string)JUri::getInstance();
JLoader::register('ReservationModelDoctor',
JPATH_COMPONENT_ADMINISTRATOR.'/models/doctor.php');
\JForm::addFormPath(JPATH_COMPONENT_ADMINISTRATOR .
'/models/forms');
$data=
JFactory::getApplication()->input->get('jform',array(),'array');
$doctorsModel= new ReservationModelDoctor;
$form = $doctorsModel->getForm($data, false);
$xml = new SimpleXMLElement('<field
name="password" validate="password"/>');
$form->setField($xml);
// $rule= JFormHelper::loadRuleType('password');
// $res= $rule->test($xml,$data['password']);
// $filteredData = $form->filter($data);
$filter= JFilterInput::getInstance();
$data['name']= preg_replace('/[0-9]+/',
'', $data['name']);
$data['msn']= $filter->clean( $data['msn'],
'int');
$model= $this->getModel();
if($model->checkPhoneExist($data['phonenumber']))
{
$app->enqueueMessage('این شماره تلفن
قبلا در این سامانه ثبت شده است لطفا با
شماره تلفن دیگری ثبت نام
کنید','warning');
$app->setUserState('doctor.data',$data);
$app->redirect($uri);
}
$validData = $doctorsModel->validate($form, $data);
if ($validData === false)
{
$errors = $doctorsModel->getErrors();
foreach ($errors as $error) {
$app->enqueueMessage($error->getMessage(),'warning');
}
$app->setUserState('doctor.data',$data);
$app->redirect($uri);
}
else{
$userdata = array(
"name"=> $data['name'],
"username"=> $data['phonenumber'],
"password"=> $data['password'],
"password2"=> $data['password'],
"email"=>
'R_'.$data['phonenumber'].'@gmail.com',
"block"=> 0,
);
$userGroup = 2;
$userdata["groups"] = array($userGroup);
$user = new JUser;
if(!$user->bind($userdata)) {
$app->enqueueMessage($user->getError(),
'warning');
$app->redirect($uri);
}
if (!$user->save()) {
$app->enqueueMessage($user->getError(),
'warning');
$app->redirect($uri);
}
$app->setUserState('doctor.data',$data);
$userId= $user->id;
$doctorInfo= array(
'userid'=> $userId,
'msn' => $data['msn'],
'catid' => $data['catid'],
'capitalid' => $data['capitalid'],
'cityid' => $data['cityid'],
'phonenumber' =>
$data['phonenumber'],
'officephone' =>
$data['officephone'],
'address' => $data['address'],
);
if(!$doctorsModel->save($doctorInfo))
{
$app->enqueueMessage('اطلاعات خود را
تصحیح کرده و سپس وارد نمایید',
'warning');
$app->redirect($uri);
}
$app->setUserState('doctor.data','');
echo 'user saved successfully';
}
$credentials = array();
$credentials['username'] =
$data['phonenumber'];
$credentials['password'] = $data['password'];
$login_site = JFactory::getApplication('site');
$login_site->login($credentials, $options=array());
$redirect = JUri::root();
$login_site->redirect($redirect);
}/***[/JCBGUI$$$$]***/
/**
* Method to check if you can edit an existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key;
default is id.
*
* @return boolean
*
* @since 12.2
*/
protected function allowEdit($data = array(), $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// to insure no other tampering
return false;
}
/**
* Method to check if you can save a new or existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 12.2
*/
protected function allowSave($data, $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 12.2
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
}
}
fileupload.php000064400000005636151171561530007420 0ustar00<?php
define('_JEXEC', 1);
define('JPATH_BASE',
dirname(dirname(dirname(dirname(__FILE__)))));
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
$app = JFactory::getApplication('site');
use Joomla\CMS\Filesystem\File;
// var_dump(function_exists('gd_info')); // check GD extension
installed and enabled on php
// var_dump(function_exists('getimagesize'));
// die();
$filename = __DIR__ . '/log.txt';
// file_put_contents($filename, '$_FILES = ' . print_r($_FILES,
True) . "\n", FILE_APPEND);
// file_put_contents($filename, '$_POST = ' . print_r($_POST,
True) . "\n", FILE_APPEND);
// file_put_contents($filename, '$_req = ' . file_get_contents(
'php://input' ) . "\n", FILE_APPEND);
// file_put_contents($filename, 'input files = ' .
print_r($app->input->files->get('atachedfile'), True) .
"\n", FILE_APPEND);
function getName($n)
{
$characters = '0123456789abcdefghijklmnopqrstuvwxyz';
$randomString = '';
for ($i = 0; $i < $n; $i++)
{
$index = rand(0, strlen($characters) - 1);
$randomString .= $characters[$index];
}
return $randomString;
}
$file = $app->input->files->get('atachedfile');
$info = pathinfo($file['name']);
if(isset($info['extension']))
{
$ext = $info['extension']; // get the extension of the file
$newname = getName(10) . ".$ext";
$target = dirname(dirname(__FILE__)) . '/files/' . $newname;
$allowUnsafe = false;
// if (move_uploaded_file($file['tmp_name'], $target))
if(JFile::upload($file['tmp_name'], $target, false,
$allowUnsafe))
{
if(function_exists('gd_info') &&
!function_exists('compress_image'))
{
function compress_image($src, $dest , $quality)
{
$info = getimagesize($src);
if ($info['mime'] == 'image/jpeg')
{
$image = imagecreatefromjpeg($src);
}
elseif ($info['mime'] == 'image/gif')
{
$image = imagecreatefromgif($src);
}
elseif ($info['mime'] == 'image/png')
{
$image = imagecreatefrompng($src);
}
else
{
die('Unknown image file format');
}
//compress and save file to jpg
imagejpeg($image, $dest, $quality);
//return destination file
return $dest;
}
compress_image($target, $target, 30);
}
echo $newname;
// file_put_contents($filename, 'File is valid, and was
successfully uploaded'. "\n", FILE_APPEND);
}
else
{
// file_put_contents($filename, 'Upload failed'.
"\n", FILE_APPEND);
}
}
?>firstqst.php000064400000021213151171561530007140 0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage firstqst.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Reservation Firstqst Controller
*/
class ReservationControllerFirstqst extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'login'; // safeguard for setting the
return view listing to the default site view.
parent::__construct($config);
}
/***[JCBGUI.site_view.php_controller.30.$$$$]***/
public function save($key = NULL, $urlVar = NULL){
$app = JFactory::getApplication();
$input = $app->input;
$firsttext = $input->get('chatMessage', '',
'string');
$pid = $input->get('pid', 0);
// $uid = $app->input->get('uid', 0);
$app->setUserState('first_chatMessage', $firsttext);
// $app->setUserState('pid', $pid);
// $app->setUserState('uid', $uid);
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('product_id');
$query->from($db->quoteName('#__hikashop_product'));
$query->where($db->quoteName('product_code') . '=
"reserve' . $pid.'"');
$db->setQuery($query);
$product_id = $db->loadResult();
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('id');
$query->from($db->quoteName('#__reservation_sick'));
$query->where($db->quoteName('userid') . '='
. $db->quote(JFactory::getUser()->id));
$db->setQuery($query);
$sick_id = $db->loadResult();
JLoader::register('ReservationModelSession',
JPATH_ADMINISTRATOR.'/components/com_reservation/models/session.php');
$data = array(
'sickid' => $sick_id,
'planid' => $pid,
'firsttext' => $firsttext,
'channel_token' => JUserHelper::genRandomPassword(16)
);
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select(array('id', 'channel_token'));
$query->from($db->quoteName('#__reservation_session'));
$query->where($db->quoteName('planid') . '='
. $db->quote($pid));
$query->where($db->quoteName('sickid') . '='
. $db->quote($sick_id));
$query->where($db->quoteName('published') . '=
1');
$db->setQuery($query);
$session = $db->loadAssoc();
if($session)
{
$data['id'] = $session['id'];
$data['channel_token'] =
$session['channel_token'];
}
$session_model = new ReservationModelSession();
$session_model->save($data);
//
$app->redirect(JRoute::_('index.php?option=com_reservation&view=payment&seid='.$sessionId));
$app->redirect(JRoute::_('index.php?option=com_hikashop&ctrl=product&task=show&cid='
. $product_id));
}
public function createSession($pid)
{
require_once
JPATH_SITE.'/components/com_reservation/helpers/reservation.php';
$app= JFactory::getApplication();
$firsttext=
$app->getUserState('first_chatMessage',0,'string');
// $pid= $app->getUserState('pid',0);
// $uid= $app->getUserState('uid',0);
$user_id= JFactory::getUser()->get('id',0);
//$consultantid=
ReservationHelper::exist('#__reservation_consultant',
'userid', JFactory::getUser()->get('id', 0));
if (!$user_id)
{
$app->enqueueMessage('برای رزرو نوبت مشاوره
وارد حساب کاربری مخصوص کاربران عادی خود
شوید','warning');
$app->redirect(JUri::root());
}
// if (!$pid || !$uid)
// {
// $app->enqueueMessage('مراحل خرید به
درستی طی نشده است ، لطفا مراحل را مجدد
تکرار کنید','warning');
// $app->redirect(JUri::root());
// }
$db = JFactory::getDbo();
$query= $db->getQuery(true)
->select('s.id')
->from($db->quoteName('#__reservation_sick','s'))
->where($db->quoteName('s.userid').'='.$user_id);
$db->setQuery($query);
$res= $db->loadObject();
// $db = JFactory::getDbo();
// $query= $db->getQuery(true)
// ->select('c.id')
//
->from($db->quoteName('#__reservation_consultant','c'))
//
->where($db->quoteName('c.userid').'='.$uid)
//
->where('('.$db->quoteName('c.account').'='.$db->quote('consultant').'
or
'.$db->quoteName('c.account').'='.$db->quote('both').')');
//
// $db->setQuery($query);
//
// $res2= $db->loadObject();
if(empty($res)) {
$app->enqueueMessage('برای رزرو نوبت مشاوره
وارد حساب کاربری مخصوص کاربران عادی خود
شوید','warning');
JFactory::getApplication()->redirect(JUri::root());
}
$sickid = (int)$res->id;
// $cid = (int)$res2->id;
//
//
// $db = JFactory::getDbo();
// $query= $db->getQuery(true)
// ->select('p.id')
//
->from($db->quoteName('#__reservation_plan','p'))
//
->where($db->quoteName('p.id').'='.$pid)
//
->where($db->quoteName('p.consultantid').'='.$db->quote($cid));
//
// $db->setQuery($query);
// $res= $db->loadObject();
//
// if (empty($res)) {
//
// $app->enqueueMessage('از پارامتر های
معتبر استفاده کنید','warning');
// JFactory::getApplication()->redirect(JUri::root());
// }
$data= [
'firsttext'=> $firsttext,
'planid'=> $pid,
'sickid'=> $sickid,
'pay' => 0,
'finish' => 0
];
require_once
JPATH_ADMINISTRATOR.'/components/com_reservation/models/session.php';
$adminSessionModel= new ReservationModelSession;
if (!$adminSessionModel->save($data))
{
$app->enqueueMessage('از پارامتر های معتبر
استفاده کنید','warning');
JFactory::getApplication()->redirect(JUri::root());
}
$sessionId=$adminSessionModel->getState('session.id');
return $sessionId;
}/***[/JCBGUI$$$$]***/
/**
* Method to check if you can edit an existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key;
default is id.
*
* @return boolean
*
* @since 12.2
*/
protected function allowEdit($data = array(), $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// to insure no other tampering
return false;
}
/**
* Method to check if you can save a new or existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 12.2
*/
protected function allowSave($data, $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 12.2
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
}
}
index.html000064400000000054151171561530006545 0ustar00<html><body
bgcolor="#FFFFFF"></body></html>log23.txt000064400000131353151171561530006246
0ustar00messageValue = fgdagfag
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 11:37:54
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = test
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:01:53
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = aaaaa
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:01:53
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = test
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:01:53
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = testes
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:01:53
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = tttt
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:01:53
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = yrtyrdeyr
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:01:53
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = kkkkkk
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 68
[name] => komeil abasi
[username] => komeil
[email] => komeil@gmal.com
[password] =>
$2y$10$u0BC/UQlWaxID7o.OY8PTOS72n6btXRLsFrrcf3ntOPVpkNnmqEh6
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:13
[lastvisitDate] => 2023-02-22 11:41:01
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 68
toValue = 70
seidValue = 49
pidValue = 5
result = 23
messageValue = jjjj
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:01:53
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 68
seidValue = 49
pidValue = 5
result = 23
messageValue = testtttt
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 78
[name] => mahdi
[username] => mahdi
[email] => mahdi@gmail.com
[password] =>
$2y$10$5hti/TLYaz4pcqgqtBwFSOvpkaquJ93nPABi5jPNrebaLzXpLxjV2
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-06-20 05:23:52
[lastvisitDate] => 2023-02-22 11:54:18
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 78
toValue = 70
seidValue = 50
pidValue = 1
result = 23
messageValue = salam
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:01:53
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue =
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 78
[name] => mahdi
[username] => mahdi
[email] => mahdi@gmail.com
[password] =>
$2y$10$5hti/TLYaz4pcqgqtBwFSOvpkaquJ93nPABi5jPNrebaLzXpLxjV2
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-06-20 05:23:52
[lastvisitDate] => 2023-02-22 11:54:18
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 78
toValue = 70
seidValue = 50
pidValue = 1
messageValue = <img
src="/components/com_reservation/files/IMG_2058.JPG">
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 78
[name] => mahdi
[username] => mahdi
[email] => mahdi@gmail.com
[password] =>
$2y$10$5hti/TLYaz4pcqgqtBwFSOvpkaquJ93nPABi5jPNrebaLzXpLxjV2
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-06-20 05:23:52
[lastvisitDate] => 2023-02-22 11:54:18
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 78
toValue = 70
seidValue = 50
pidValue = 1
result = 23
messageValue =
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 78
[name] => mahdi
[username] => mahdi
[email] => mahdi@gmail.com
[password] =>
$2y$10$5hti/TLYaz4pcqgqtBwFSOvpkaquJ93nPABi5jPNrebaLzXpLxjV2
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-06-20 05:23:52
[lastvisitDate] => 2023-02-22 11:54:18
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 78
toValue = 70
seidValue = 50
pidValue = 1
messageValue = <img
src="/components/com_reservation/files/irnicverif.jpg">
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 78
[name] => mahdi
[username] => mahdi
[email] => mahdi@gmail.com
[password] =>
$2y$10$5hti/TLYaz4pcqgqtBwFSOvpkaquJ93nPABi5jPNrebaLzXpLxjV2
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-06-20 05:23:52
[lastvisitDate] => 2023-02-22 11:54:18
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 78
toValue = 70
seidValue = 50
pidValue = 1
result = 23
messageValue =
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 78
[name] => mahdi
[username] => mahdi
[email] => mahdi@gmail.com
[password] =>
$2y$10$5hti/TLYaz4pcqgqtBwFSOvpkaquJ93nPABi5jPNrebaLzXpLxjV2
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-06-20 05:23:52
[lastvisitDate] => 2023-02-22 11:54:18
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 78
toValue = 70
seidValue = 50
pidValue = 1
messageValue = <img
src="/components/com_reservation/files/laseronconvayer.jpg">
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 78
[name] => mahdi
[username] => mahdi
[email] => mahdi@gmail.com
[password] =>
$2y$10$5hti/TLYaz4pcqgqtBwFSOvpkaquJ93nPABi5jPNrebaLzXpLxjV2
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-06-20 05:23:52
[lastvisitDate] => 2023-02-22 11:54:18
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 78
toValue = 70
seidValue = 50
pidValue = 1
result = 23
messageValue = test
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:01:53
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = t
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:01:53
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = t
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:31:21
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = tt
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:31:21
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = ttt
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:31:21
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = ttttt
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:31:21
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = aaaaa
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:31:21
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = qqqq
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 70
[name] => فرهاد پاشایی
[username] => 09212428467
[email] => fa@g.com
[password] =>
$2y$10$hiXCMTOadhf3gDxYAtDo0ObemDVavHAYYG/PXpiTRgYosgIyMxfAm
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:55
[lastvisitDate] => 2023-02-22 12:31:21
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 70
toValue = 78
seidValue = 50
pidValue = 1
result = 23
messageValue = تست
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 78
[name] => mahdi
[username] => mahdi
[email] => mahdi@gmail.com
[password] =>
$2y$10$5hti/TLYaz4pcqgqtBwFSOvpkaquJ93nPABi5jPNrebaLzXpLxjV2
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-06-20 05:23:52
[lastvisitDate] => 2023-02-22 11:54:18
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 78
toValue = 70
seidValue = 50
pidValue = 1
result = 23
messageValue = تست جدید
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 78
[name] => mahdi
[username] => mahdi
[email] => mahdi@gmail.com
[password] =>
$2y$10$5hti/TLYaz4pcqgqtBwFSOvpkaquJ93nPABi5jPNrebaLzXpLxjV2
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-06-20 05:23:52
[lastvisitDate] => 2023-02-22 11:54:18
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 78
toValue = 70
seidValue = 50
pidValue = 1
result = 23
messageValue = تست
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 68
[name] => komeil abasi
[username] => komeil
[email] => komeil@gmal.com
[password] =>
$2y$10$u0BC/UQlWaxID7o.OY8PTOS72n6btXRLsFrrcf3ntOPVpkNnmqEh6
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:13
[lastvisitDate] => 2023-02-22 11:41:01
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 68
toValue = 70
seidValue = 49
pidValue = 5
result = 23
messageValue = کلام جدید
user = Joomla\CMS\User\User Object
(
[isRoot:protected] =>
[id] => 68
[name] => komeil abasi
[username] => komeil
[email] => komeil@gmal.com
[password] =>
$2y$10$u0BC/UQlWaxID7o.OY8PTOS72n6btXRLsFrrcf3ntOPVpkNnmqEh6
[password_clear] =>
[block] => 0
[sendEmail] => 0
[registerDate] => 2021-02-23 04:37:13
[lastvisitDate] => 2023-02-22 11:41:01
[activation] =>
[params] =>
{"admin_style":"","admin_language":"","language":"","editor":"","timezone":""}
[groups] => Array
(
[2] => 2
)
[guest] => 0
[lastResetTime] => 0000-00-00 00:00:00
[resetCount] => 0
[requireReset] => 0
[_params:protected] => Joomla\Registry\Registry Object
(
[data:protected] => stdClass Object
(
[admin_style] =>
[admin_language] =>
[language] =>
[editor] =>
[timezone] =>
)
[initialized:protected] => 1
[separator] => .
)
[_authGroups:protected] =>
[_authLevels:protected] => Array
(
[0] => 1
[1] => 1
[2] => 2
)
[_authActions:protected] =>
[_errorMsg:protected] =>
[userHelper:protected] => Joomla\CMS\User\UserWrapper Object
(
)
[_errors:protected] => Array
(
)
[otpKey] =>
[otep] =>
)
fromValue = 68
toValue = 70
seidValue = 49
pidValue = 5
result = 23
login.php000064400000033323151171561530006376 0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage login.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Reservation Login Controller
*/
class ReservationControllerLogin extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'login'; // safeguard for setting the
return view listing to the default site view.
parent::__construct($config);
}
/***[JCBGUI.site_view.php_controller.43.$$$$]***/
public function loginRegister()
{
$app = JFactory::getApplication();
$phoneNumber = $app->input->get('phonenumber', 0);
$uri = (string)JUri::getInstance();
$info= [
'phonenumber' => $phoneNumber,
'userExist' => false,
'table' => false,
'validate' => false
];
$app->setUserState('info',$info );
Joomla\CMS\Form\Form::addRulePath('administrator/components/com_reservation/models/rules');
$xml = new SimpleXMLElement('<field
name="phonenumber" validate="mobile"/>');
$rule = JFormHelper::loadRuleType('mobile');
$validate = $rule->test($xml, $phoneNumber);
if (!$validate) {
$app->enqueueMessage('شماره موبایل معتبر
وارد نمایید', 'warning');
$app->redirect($uri);
}
// $view = $this->getView('login', 'html');
$model= $this->getModel();
list($userExist, $table)= $model->userExist($phoneNumber);
// $userExist= $model->userExist($phoneNumber)[0];
// $table= $model->userExist($phoneNumber)[1];
$info= [
'phonenumber' => $phoneNumber,
'userExist' => $userExist,
'table' => $table,
'validate' => $validate,
];
$app->setUserState('info',$info );
if(!$userExist)
{
ReservationHelper::setExpireTime();
$verify= ReservationHelper::setVerifyCode();
\JPluginHelper::importPlugin('ejra');
$dispatcher = \JEventDispatcher::getInstance();
$dispatcher->trigger('onAfterMobileValidate',array($phoneNumber,
$verify));
$app->redirect(JRoute::_('index.php?option=com_reservation&view=login&layout=default_register',false));
}
else
{
$app->setUserState('loginWith', 'password');
$app->redirect(JRoute::_('index.php?option=com_reservation&view=login&layout=default_password',false));
}
}
public function register()
{
$app= JFactory::getApplication();
$data=
$app->input->get('jform',array(),'array');
$info= $app->getUserState('info');
if (!$info['phonenumber'] || !$info['validate'] ||
$info['userExist'] || !JFactory::getUser()->guest)
$app->redirect(JRoute::_('index.php?option=com_reservation&view=login',false));
$app->setUserState('owner.data',$data);
$xml = new SimpleXMLElement('<field name="password"
type="text" required="true"
validate="password" minimum_length="4"
message="رمز عبور حداقل باید 4 کاراکتر
باشد" />');
$rule = JFormHelper::loadRuleType('password');
$validate = $rule->test($xml, $data['password']);
if (empty($data['name']) || !$validate)
{
$app->enqueueMessage('اطلاعات خود را به
درستی وارد نمایید','warning');
$app->redirect(JRoute::_('index.php?option=com_reservation&view=login&layout=default_register',false));
}
date_default_timezone_set('asia/tehran');
$verify= $app->getUserState('verify');
$expire= $app->getUserState('expire');
if (strtotime($expire) < time())
{
$app->enqueueMessage('زمان کد تایید به
پایان رسیده لطفا بر روی ارسال مجدد کد
کلیک نمایید','warning');
$app->redirect(JRoute::_('index.php?option=com_reservation&view=login&layout=default_register',false));
}
if ($data['verify'] != $verify)
{
$app->enqueueMessage('کد تایید را به درستی
وارد کنید','warning');
$app->redirect(JRoute::_('index.php?option=com_reservation&view=login&layout=default_register',false));
}
$userdata = array(
"name"=> $data['name'],
"username"=> $info['phonenumber'],
"password"=> $data['password'],
"password2"=> $data['password'],
"email"=>
'E_'.$info['phonenumber'].'@gmail.com',
"block"=> 0,
);
jimport('joomla.user.helper');
$params= $app->getparams('com_Reservation');
// $userGroup= $params->get('ownerrgroup');
$userGroup= 2;
// if(!isset($userGroup))
// $userGroup = 2;
// $userdata["groups"] = [$userGroup];
// $user = new JUser;
// if(!$user->bind($userdata)) {
// $app->enqueueMessage($user->getError(), 'warning');
//
$app->redirect(JRoute::_('index.php?option=com_Reservation&view=login',false));
// }
// if (!$user->save()) {
// $app->enqueueMessage($user->getError(), 'warning');
//
$app->redirect(JRoute::_('index.php?option=com_Reservation&view=login',false));
// }
if ( ( ! file_exists( JPATH_SITE .
'/libraries/CBLib/CBLib/Core/CBLib.php' ) ) || ( ! file_exists(
JPATH_ADMINISTRATOR .
'/components/com_comprofiler/plugin.foundation.php' ) ) ) {
echo 'CB not installed';
return;
}
include_once( JPATH_ADMINISTRATOR .
'/components/com_comprofiler/plugin.foundation.php' );
cbimport( 'cb.html' );
global $_CB_framework, $_PLUGINS, $ueConfig;
$_PLUGINS->loadPluginGroup($data["username"]); // for
using cb trigering
jimport('joomla.user.helper');
$post = isset($data["post"]) ? $data["post"] :
$data;
$post["name"] = $post["firstname"] . " "
. $post["lastname"];
$_PLUGINS->loadPluginGroup( 'user' );
$user = new \CB\Database\Table\UserTable();
$user->set( 'username', $userdata['username']
);
$user->set( 'email', $userdata["email"] );
// /* $user->set( 'firstName',
$post["firstname"] );*/
// /* $user->set( 'lastName', $post["lastname"]
);*/
$user->set( 'name', $userdata['name'] );
$user->set( 'gids', array($userGroup) );
$user->set( 'sendEmail', 0 );
$user->set( 'registerDate',
$_CB_framework->getUTCDate() );
$user->set( 'password',
$user->hashAndSaltPassword($userdata["password"]) );
$user->set( 'approved', 1 );
$user->set( 'confirmed', 1 );
$user->set( 'block', 0 );
if ( $user->store() ) {
if ( $user->get( 'confirmed' ) == 0 ) {
$user->store();
}
}
// dump($user, 'user');
// dump($userdata, 'userdata');
$userId= $user->id;
$sickInfo= array(
'userid'=> $userId,
'phonenumber' => $info['phonenumber'],
);
JLoader::register('ReservationModelSick',
JPATH_COMPONENT_ADMINISTRATOR.'/models/sick.php');
$sickModel= new ReservationModelSick();
if(!$sickModel->save($sickInfo))
{
$app->enqueueMessage('اطلاعات خود را تصحیح
کرده و سپس وارد نمایید', 'warning');
$app->redirect(JRoute::_('index.php?option=com_Reservation&view=login',false));
}
$app->setUserState('info','');
$credentials = array();
$credentials['username'] = $info['phonenumber'];
$credentials['password'] = $data['password'];
$login_site = JFactory::getApplication('site');
$login_site->login($credentials, $options=array());
$redirect = JUri::root();
$login_site->redirect($redirect);
}
public function resetExpireTime()
{
$app= JFactory::getApplication();
$uri= (string)JUri::getInstance();
$data=
$app->input->get('jform',array(),'array');
$app->setUserState('owner.data',$data);
date_default_timezone_set('asia/tehran');
$expire= $app->getUserState('expire');
if (strtotime($expire) < time())
{
ReservationHelper::setExpireTime();
$verify= ReservationHelper::setVerifyCode();
$phoneNumber=
$app->getUserState('info')['phonenumber'];
\JPluginHelper::importPlugin('ejra');
$dispatcher = \JEventDispatcher::getInstance();
$dispatcher->trigger('onAfterMobileValidate',array($phoneNumber,
$verify));
}
$app->redirect($uri);
}
public function login()
{
$app= JFactory::getApplication();
$info= $app->getUserState('info');
if (!$info['phonenumber'] || !$info['validate'] ||
!$info['userExist'] || !JFactory::getUser()->guest)
{
$this->app->redirect(JRoute::_('index.php?option=com_reservation&view=login',false));
}
$loginWith= $app->getUserState('loginWith');
$phoneNumber=
$app->getUserState('info')['phonenumber'];
$data=
$app->input->get('jform',array(),'array');
$credentials = array();
if ($loginWith== 'password')
{
$credentials['username'] = $phoneNumber;
$credentials['password'] = $data['password'];
$credentials['loginWith'] = 'password';
$login_site = JFactory::getApplication('site');
}
elseif($loginWith== 'verifyCode')
{
date_default_timezone_set('asia/tehran');
$verify= $app->getUserState('verify');
$expire= $app->getUserState('expire');
if (strtotime($expire) < time())
{
$app->enqueueMessage('زمان کد تایید به
پایان رسیده لطفا بر روی ارسال مجدد کد
کلیک نمایید','warning');
$app->redirect(JRoute::_('index.php?option=com_reservation&view=login&layout=default_password',false));
}
if ($data['password'] != $verify)
{
$app->enqueueMessage('کد تایید را به درستی
وارد کنید','warning');
$app->redirect(JRoute::_('index.php?option=com_reservation&view=login&layout=default_password',false));
}
$model= $this->getModel();
$table= $app->getUserState('info')['table'];
$userid= $model->getUserId($table, $phoneNumber);
$credentials['username'] = $phoneNumber;
$credentials['password'] = $data['password'];
$credentials['userid'] = $userid;
$credentials['loginWith'] = 'verifyCode';
$login_site = JFactory::getApplication('site');
}
$result= $login_site->login($credentials, $options=array());
if(!$result)
$login_site->redirect(JRoute::_('index.php?option=com_reservation&view=login&layout=default_password',false));
$redirect = JUri::root();
$app->redirect($redirect);
}
public function verifyCode()
{
$app= JFactory::getApplication();
$app->setUserState('loginWith', 'verifyCode');
ReservationHelper::setExpireTime();
$verify= ReservationHelper::setVerifyCode();
$phoneNumber=
$app->getUserState('info')['phonenumber'];
\JPluginHelper::importPlugin('ejra');
$dispatcher = \JEventDispatcher::getInstance();
$dispatcher->trigger('onAfterMobileValidate',array($phoneNumber,
$verify));
$app->redirect(JRoute::_('index.php?option=com_reservation&view=login&layout=default_password',false));
}
public function password()
{
$app= JFactory::getApplication();
$app->setUserState('loginWith', 'password');
$app->redirect(JRoute::_('index.php?option=com_reservation&view=login&layout=default_password',false));
}
/***[/JCBGUI$$$$]***/
/**
* Method to check if you can edit an existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key;
default is id.
*
* @return boolean
*
* @since 12.2
*/
protected function allowEdit($data = array(), $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// to insure no other tampering
return false;
}
/**
* Method to check if you can save a new or existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 12.2
*/
protected function allowSave($data, $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 12.2
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
}
}
plan.php000064400000021111151171561530006210 0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage plan.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Plan Controller
*/
class ReservationControllerPlan extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$this->view_list = 'login'; // safeguard for setting the
return view listing to the default site view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// Get user object.
$user = JFactory::getUser();
// Access check.
$access = $user->authorise('plan.access',
'com_reservation');
if (!$access)
{
return false;
}
// In the absense of better information, revert to the component
permissions.
return parent::allowAdd($data);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = array(), $key = 'id')
{
// get user object.
$user = JFactory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('core.edit',
'com_reservation.plan.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('core.edit.own',
'com_reservation.plan.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ?
$data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('core.edit.own',
'com_reservation'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return parent::allowEdit($data, $key);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar =
'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string)$ref .
'&refid='. (int)$refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string)$ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal
error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Plan', '', array());
// Preset the redirect
$this->setRedirect(JRoute::_('index.php?option=com_reservation&view=plans'
. $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0,
'word');
$this->refid = $this->input->get('refid', 0,
'int');
// Check if there is a return value
$return = $this->input->get('return', null,
'base64');
$cancel = parent::cancel($key);
if (!is_null($return) &&
JUri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref .
'&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL
variable.
* @param string $urlVar The name of the URL variable if different
from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0,
'word');
$this->refid = $this->input->get('refid', 0,
'int');
// Check if there is a return value
$return = $this->input->get('return', null,
'base64');
$canReturn = (!is_null($return) &&
JUri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
JRoute::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref .
'&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
/***[JCBGUI.admin_view.php_postsavehook.112.$$$$]***/
$id = $model->getState()->{'plan.id'};
$validData['id'] = $id;
JPluginHelper::importPlugin('reservation');
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onReservationPlanCreated',
array($validData));/***[/JCBGUI$$$$]***/
return;
}
}
reserve.php000064400000013156151171561530006743 0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.32
@build 14th June, 2021
@created 17th December, 2020
@package Reservation
@subpackage reserve.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Reservation Reserve Controller
*/
class ReservationControllerReserve extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'reserve'; // safeguard for setting the
return view listing to the default site view.
parent::__construct($config);
}
/***[JCBGUI.site_view.php_controller.36.$$$$]***/
public function default_personalinfo()
{
$function_to_be_executed= $this->check(__FUNCTION__);
echo '<pre>';
var_dump($function_to_be_executed);
echo '</pre>';
exit();
}
public function check($funcname)
{
JSession::checkToken('post') or die;
$uri= (string)JUri::getInstance();
$app= JFactory::getApplication();
$params= JComponentHelper::getParams('com_reservation');
$chekout= $params->get('checkout');
$function_to_be_executed=
$app->getUserState('function_to_be_executed',0);
$step= 'checkout'.$function_to_be_executed;
$layout= $chekout->$step->reservetemplate;
$layout= preg_replace('/\.php$/','',$layout);
if ($layout != $funcname)
{
$app->setUserState('function_to_be_executed',0);
$app->redirect($uri);
}
return ++$function_to_be_executed;
}
public function reserve()
{
require
JPATH_SITE.'/components/com_reservation/helpers/reserve.php';
$reserve= new reserve();
}
public function reordering($checkout)
{
$checkout= (array) $checkout;
$reordering= [];
foreach ($checkout as $item) {
$reordering[]= $item;
}
return $reordering;
}
public function getLayout()
{
$app= JFactory::getApplication();
$params= JComponentHelper::getParams('com_reservation');
$chekout= $params->get('checkout');
$chekout= $this->reordering($chekout);
$function_to_be_executed=
$app->getUserState('function_to_be_executed',0);
$layout= $chekout[$function_to_be_executed]->reservetemplate;
$layout= preg_replace('/\.php$/','',$layout);
return $layout;
}
public function back()
{
JSession::checkToken('post') or die;
$app= JFactory::getApplication();
$function_to_be_executed=
$app->getUserState('function_to_be_executed',0);
$app->setUserState('function_to_be_executed',--$function_to_be_executed);
$app->redirect(JUri::getInstance());
}/***[/JCBGUI$$$$]***/
public function payment()
{
require_once
JPATH_SITE.'/components/com_reservation/helpers/payment.php';
$obj= new strategy();
$obj->do_request();
}
public function paymentverify()
{
require_once
JPATH_SITE.'/components/com_reservation/helpers/payment.php';
$obj= new strategy();
$obj->do_verify();
}
/**
* Method to check if you can edit an existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key;
default is id.
*
* @return boolean
*
* @since 12.2
*/
protected function allowEdit($data = array(), $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// to insure no other tampering
return false;
}
/**
* Method to check if you can save a new or existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 12.2
*/
protected function allowSave($data, $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 12.2
*/
protected function postSaveHook(JModelLegacy $model, $validData =
array())
{
}
}
reserve_appointment.php000064400000012622151171561530011356
0ustar00<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.39
@build 4th April, 2023
@created 17th December, 2020
@package Reservation
@subpackage reserve_appointment.php
@author farhad shahbazi <http://farhad.com>
@copyright Copyright (C) 2015. 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');
use Joomla\Utilities\ArrayHelper;
/**
* Reservation Reserve_appointment Controller
*/
class ReservationControllerReserve_appointment extends JControllerForm
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
public function __construct($config = array())
{
$this->view_list = 'login'; // safeguard for setting the
return view listing to the default site view.
parent::__construct($config);
}
/***[JCBGUI.site_view.php_controller.36.$$$$]***/
public function default_personalinfo()
{
$function_to_be_executed= $this->check(__FUNCTION__);
echo '<pre>';
var_dump($function_to_be_executed);
echo '</pre>';
exit();
}
public function check($funcname)
{
JSession::checkToken('post') or die;
$uri= (string)JUri::getInstance();
$app= JFactory::getApplication();
$params= JComponentHelper::getParams('com_reservation');
$chekout= $params->get('checkout');
$function_to_be_executed=
$app->getUserState('function_to_be_executed',0);
$step= 'checkout'.$function_to_be_executed;
$layout= $chekout->$step->reservetemplate;
$layout= preg_replace('/\.php$/','',$layout);
if ($layout != $funcname)
{
$app->setUserState('function_to_be_executed',0);
$app->redirect($uri);
}
return ++$function_to_be_executed;
}
public function reserve()
{
require
JPATH_SITE.'/components/com_reservation/helpers/reserve.php';
$reserve= new reserve();
}
public function reordering($checkout)
{
$checkout= (array) $checkout;
$reordering= [];
foreach ($checkout as $item) {
$reordering[]= $item;
}
return $reordering;
}
public function getLayout()
{
$app= JFactory::getApplication();
$params= JComponentHelper::getParams('com_reservation');
$chekout= $params->get('checkout');
$chekout= $this->reordering($chekout);
$function_to_be_executed=
$app->getUserState('function_to_be_executed',0);
$layout= $chekout[$function_to_be_executed]->reservetemplate;
$layout= preg_replace('/\.php$/','',$layout);
return $layout;
}
public function back()
{
JSession::checkToken('post') or die;
$app= JFactory::getApplication();
$function_to_be_executed=
$app->getUserState('function_to_be_executed',0);
$app->setUserState('function_to_be_executed',--$function_to_be_executed);
$app->redirect(JUri::getInstance());
}
public function reset()
{
$uri= JUri::getInstance();
$app= JFactory::getApplication();
$app->setUserState('function_to_be_executed',0);
$uri->delVar('start');
$app->redirect((string)$uri);
}/***[/JCBGUI$$$$]***/
/**
* Method to check if you can edit an existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key;
default is id.
*
* @return boolean
*
* @since 12.2
*/
protected function allowEdit($data = array(), $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = array())
{
// to insure no other tampering
return false;
}
/**
* Method to check if you can save a new or existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 12.2
*/
protected function allowSave($data, $key = 'id')
{
// to insure no other tampering
return false;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param JModelLegacy $model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 12.2
*/
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
}
}
profile.php000064400000013641151171652560006733 0ustar00<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('UsersController', JPATH_COMPONENT .
'/controller.php');
/**
* Profile controller class for Users.
*
* @since 1.6
*/
class UsersControllerProfile extends UsersController
{
/**
* Method to check out a user for editing and redirect to the edit form.
*
* @return boolean
*
* @since 1.6
*/
public function edit()
{
$app = JFactory::getApplication();
$user = JFactory::getUser();
$loginUserId = (int) $user->get('id');
// Get the previous user id (if any) and the current user id.
$previousId = (int)
$app->getUserState('com_users.edit.profile.id');
$userId = $this->input->getInt('user_id');
// Check if the user is trying to edit another users profile.
if ($userId != $loginUserId)
{
$app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'),
'error');
$app->setHeader('status', 403, true);
return false;
}
$cookieLogin = $user->get('cookieLogin');
// Check if the user logged in with a cookie
if (!empty($cookieLogin))
{
// If so, the user must login to edit the password and other data.
$app->enqueueMessage(JText::_('JGLOBAL_REMEMBER_MUST_LOGIN'),
'message');
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login',
false));
return false;
}
// Set the user id for the user to edit in the session.
$app->setUserState('com_users.edit.profile.id', $userId);
// Get the model.
$model = $this->getModel('Profile', 'UsersModel');
// Check out the user.
if ($userId)
{
$model->checkout($userId);
}
// Check in the previous user.
if ($previousId)
{
$model->checkin($previousId);
}
// Redirect to the edit screen.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=profile&layout=edit',
false));
return true;
}
/**
* Method to save a user's profile data.
*
* @return void
*
* @since 1.6
*/
public function save()
{
// Check for request forgeries.
$this->checkToken();
$app = JFactory::getApplication();
$model = $this->getModel('Profile',
'UsersModel');
$user = JFactory::getUser();
$userId = (int) $user->get('id');
// Get the user data.
$requestData = $app->input->post->get('jform',
array(), 'array');
// Force the ID to this user.
$requestData['id'] = $userId;
// Validate the posted data.
$form = $model->getForm();
if (!$form)
{
JError::raiseError(500, $model->getError());
return false;
}
// Send an object which can be modified through the plugin event
$objData = (object) $requestData;
$app->triggerEvent(
'onContentNormaliseRequestData',
array('com_users.user', $objData, $form)
);
$requestData = (array) $objData;
// Validate the posted data.
$data = $model->validate($form, $requestData);
// Check for errors.
if ($data === false)
{
// Get the validation messages.
$errors = $model->getErrors();
// Push up to three validation messages out to the user.
for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
{
if ($errors[$i] instanceof Exception)
{
$app->enqueueMessage($errors[$i]->getMessage(),
'warning');
}
else
{
$app->enqueueMessage($errors[$i], 'warning');
}
}
// Unset the passwords.
unset($requestData['password1'],
$requestData['password2']);
// Save the data in the session.
$app->setUserState('com_users.edit.profile.data',
$requestData);
// Redirect back to the edit screen.
$userId = (int)
$app->getUserState('com_users.edit.profile.id');
$this->setRedirect(JRoute::_('index.php?option=com_users&view=profile&layout=edit&user_id='
. $userId, false));
return false;
}
// Attempt to save the data.
$return = $model->save($data);
// Check for errors.
if ($return === false)
{
// Save the data in the session.
$app->setUserState('com_users.edit.profile.data', $data);
// Redirect back to the edit screen.
$userId = (int)
$app->getUserState('com_users.edit.profile.id');
$this->setMessage(JText::sprintf('COM_USERS_PROFILE_SAVE_FAILED',
$model->getError()), 'warning');
$this->setRedirect(JRoute::_('index.php?option=com_users&view=profile&layout=edit&user_id='
. $userId, false));
return false;
}
// Redirect the user and adjust session state based on the chosen task.
switch ($this->getTask())
{
case 'apply':
// Check out the profile.
$app->setUserState('com_users.edit.profile.id', $return);
$model->checkout($return);
// Redirect back to the edit screen.
$this->setMessage(JText::_('COM_USERS_PROFILE_SAVE_SUCCESS'));
$redirect =
$app->getUserState('com_users.edit.profile.redirect');
// Don't redirect to an external URL.
if (!JUri::isInternal($redirect))
{
$redirect = null;
}
if (!$redirect)
{
$redirect =
'index.php?option=com_users&view=profile&layout=edit&hidemainmenu=1';
}
$this->setRedirect(JRoute::_($redirect, false));
break;
default:
// Check in the profile.
$userId = (int)
$app->getUserState('com_users.edit.profile.id');
if ($userId)
{
$model->checkin($userId);
}
// Clear the profile id from the session.
$app->setUserState('com_users.edit.profile.id', null);
$redirect =
$app->getUserState('com_users.edit.profile.redirect');
// Don't redirect to an external URL.
if (!JUri::isInternal($redirect))
{
$redirect = null;
}
if (!$redirect)
{
$redirect =
'index.php?option=com_users&view=profile&user_id=' .
$return;
}
// Redirect to the list screen.
$this->setMessage(JText::_('COM_USERS_PROFILE_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_($redirect, false));
break;
}
// Flush the data from the session.
$app->setUserState('com_users.edit.profile.data', null);
}
}
registration.php000064400000015420151171652570010003 0ustar00<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('UsersController', JPATH_COMPONENT .
'/controller.php');
/**
* Registration controller class for Users.
*
* @since 1.6
*/
class UsersControllerRegistration extends UsersController
{
/**
* Method to activate a user.
*
* @return boolean True on success, false on failure.
*
* @since 1.6
*/
public function activate()
{
$user = JFactory::getUser();
$input = JFactory::getApplication()->input;
$uParams = JComponentHelper::getParams('com_users');
// Check for admin activation. Don't allow non-super-admin to delete
a super admin
if ($uParams->get('useractivation') != 2 &&
$user->get('id'))
{
$this->setRedirect('index.php');
return true;
}
// If user registration or account activation is disabled, throw a 403.
if ($uParams->get('useractivation') == 0 ||
$uParams->get('allowUserRegistration') == 0)
{
JError::raiseError(403,
JText::_('JLIB_APPLICATION_ERROR_ACCESS_FORBIDDEN'));
return false;
}
$model = $this->getModel('Registration',
'UsersModel');
$token = $input->getAlnum('token');
// Check that the token is in a valid format.
if ($token === null || strlen($token) !== 32)
{
JError::raiseError(403, JText::_('JINVALID_TOKEN'));
return false;
}
// Get the User ID
$userIdToActivate = $model->getUserIdFromToken($token);
if (!$userIdToActivate)
{
$this->setMessage(JText::_('COM_USERS_ACTIVATION_TOKEN_NOT_FOUND'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login',
false));
return false;
}
// Get the user we want to activate
$userToActivate = JFactory::getUser($userIdToActivate);
// Admin activation is on and admin is activating the account
if (($uParams->get('useractivation') == 2) &&
$userToActivate->getParam('activate', 0))
{
// If a user admin is not logged in, redirect them to the login page
with an error message
if (!$user->authorise('core.create', 'com_users')
|| !$user->authorise('core.manage', 'com_users'))
{
$activationUrl =
'index.php?option=com_users&task=registration.activate&token='
. $token;
$loginUrl =
'index.php?option=com_users&view=login&return=' .
base64_encode($activationUrl);
// In case we still run into this in the second step the user does not
have the right permissions
$message =
JText::_('COM_USERS_REGISTRATION_ACL_ADMIN_ACTIVATION_PERMISSIONS');
// When we are not logged in we should login
if ($user->guest)
{
$message =
JText::_('COM_USERS_REGISTRATION_ACL_ADMIN_ACTIVATION');
}
$this->setMessage($message);
$this->setRedirect(JRoute::_($loginUrl, false));
return false;
}
}
// Attempt to activate the user.
$return = $model->activate($token);
// Check for errors.
if ($return === false)
{
// Redirect back to the home page.
$this->setMessage(JText::sprintf('COM_USERS_REGISTRATION_SAVE_FAILED',
$model->getError()), 'error');
$this->setRedirect('index.php');
return false;
}
$useractivation = $uParams->get('useractivation');
// Redirect to the login screen.
if ($useractivation == 0)
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login',
false));
}
elseif ($useractivation == 1)
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_ACTIVATE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login',
false));
}
elseif ($return->getParam('activate'))
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_VERIFY_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=registration&layout=complete',
false));
}
else
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_ADMINACTIVATE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=registration&layout=complete',
false));
}
return true;
}
/**
* Method to register a user.
*
* @return boolean True on success, false on failure.
*
* @since 1.6
*/
public function register()
{
// Check for request forgeries.
$this->checkToken();
// If registration is disabled - Redirect to login page.
if
(JComponentHelper::getParams('com_users')->get('allowUserRegistration')
== 0)
{
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login',
false));
return false;
}
$app = JFactory::getApplication();
$model = $this->getModel('Registration',
'UsersModel');
// Get the user data.
$requestData = $this->input->post->get('jform',
array(), 'array');
// Validate the posted data.
$form = $model->getForm();
if (!$form)
{
JError::raiseError(500, $model->getError());
return false;
}
$data = $model->validate($form, $requestData);
// Check for validation errors.
if ($data === false)
{
// Get the validation messages.
$errors = $model->getErrors();
// Push up to three validation messages out to the user.
for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
{
if ($errors[$i] instanceof Exception)
{
$app->enqueueMessage($errors[$i]->getMessage(),
'error');
}
else
{
$app->enqueueMessage($errors[$i], 'error');
}
}
// Save the data in the session.
$app->setUserState('com_users.registration.data',
$requestData);
// Redirect back to the registration screen.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=registration',
false));
return false;
}
// Attempt to save the data.
$return = $model->register($data);
// Check for errors.
if ($return === false)
{
// Save the data in the session.
$app->setUserState('com_users.registration.data', $data);
// Redirect back to the edit screen.
$this->setMessage($model->getError(), 'error');
$this->setRedirect(JRoute::_('index.php?option=com_users&view=registration',
false));
return false;
}
// Flush the data from the session.
$app->setUserState('com_users.registration.data', null);
// Redirect to the profile screen.
if ($return === 'adminactivate')
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_COMPLETE_VERIFY'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=registration&layout=complete',
false));
}
elseif ($return === 'useractivate')
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_COMPLETE_ACTIVATE'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=registration&layout=complete',
false));
}
else
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login',
false));
}
return true;
}
}
remind.php000064400000002621151171652570006546 0ustar00<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2010 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('UsersController', JPATH_COMPONENT .
'/controller.php');
/**
* Reset controller class for Users.
*
* @since 1.6
*/
class UsersControllerRemind extends UsersController
{
/**
* Method to request a username reminder.
*
* @return boolean
*
* @since 1.6
*/
public function remind()
{
// Check the request token.
$this->checkToken('post');
$model = $this->getModel('Remind', 'UsersModel');
$data = $this->input->post->get('jform', array(),
'array');
// Submit the password reset request.
$return = $model->processRemindRequest($data);
// Check for a hard error.
if ($return == false && JDEBUG)
{
// The request failed.
// Go back to the request form.
$message = JText::sprintf('COM_USERS_REMIND_REQUEST_FAILED',
$model->getError());
$this->setRedirect(JRoute::_('index.php?option=com_users&view=remind',
false), $message, 'notice');
return false;
}
// To not expose if the user exists or not we send a generic message.
$message = JText::_('COM_USERS_REMIND_REQUEST');
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login',
false), $message, 'notice');
return true;
}
}
reset.php000064400000011203151171652570006406 0ustar00<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('UsersController', JPATH_COMPONENT .
'/controller.php');
/**
* Reset controller class for Users.
*
* @since 1.6
*/
class UsersControllerReset extends UsersController
{
/**
* Method to request a password reset.
*
* @return boolean
*
* @since 1.6
*/
public function request()
{
// Check the request token.
$this->checkToken('post');
$app = JFactory::getApplication();
$model = $this->getModel('Reset', 'UsersModel');
$data = $this->input->post->get('jform', array(),
'array');
// Submit the password reset request.
$return = $model->processResetRequest($data);
// Check for a hard error.
if ($return instanceof Exception && JDEBUG)
{
// Get the error message to display.
if ($app->get('error_reporting'))
{
$message = $return->getMessage();
}
else
{
$message = JText::_('COM_USERS_RESET_REQUEST_ERROR');
}
// Go back to the request form.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=reset',
false), $message, 'error');
return false;
}
elseif ($return === false && JDEBUG)
{
// The request failed.
// Go back to the request form.
$message = JText::sprintf('COM_USERS_RESET_REQUEST_FAILED',
$model->getError());
$this->setRedirect(JRoute::_('index.php?option=com_users&view=reset',
false), $message, 'notice');
return false;
}
// To not expose if the user exists or not we send a generic message.
$message = JText::_('COM_USERS_RESET_REQUEST');
$this->setRedirect(JRoute::_('index.php?option=com_users&view=reset&layout=confirm',
false), $message, 'notice');
return true;
}
/**
* Method to confirm the password request.
*
* @return boolean
*
* @access public
* @since 1.6
*/
public function confirm()
{
// Check the request token.
$this->checkToken('request');
$app = JFactory::getApplication();
$model = $this->getModel('Reset', 'UsersModel');
$data = $this->input->get('jform', array(),
'array');
// Confirm the password reset request.
$return = $model->processResetConfirm($data);
// Check for a hard error.
if ($return instanceof Exception)
{
// Get the error message to display.
if ($app->get('error_reporting'))
{
$message = $return->getMessage();
}
else
{
$message = JText::_('COM_USERS_RESET_CONFIRM_ERROR');
}
// Go back to the confirm form.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=reset&layout=confirm',
false), $message, 'error');
return false;
}
elseif ($return === false)
{
// Confirm failed.
// Go back to the confirm form.
$message = JText::sprintf('COM_USERS_RESET_CONFIRM_FAILED',
$model->getError());
$this->setRedirect(JRoute::_('index.php?option=com_users&view=reset&layout=confirm',
false), $message, 'notice');
return false;
}
else
{
// Confirm succeeded.
// Proceed to step three.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=reset&layout=complete',
false));
return true;
}
}
/**
* Method to complete the password reset process.
*
* @return boolean
*
* @since 1.6
*/
public function complete()
{
// Check for request forgeries
$this->checkToken('post');
$app = JFactory::getApplication();
$model = $this->getModel('Reset', 'UsersModel');
$data = $this->input->post->get('jform', array(),
'array');
// Complete the password reset request.
$return = $model->processResetComplete($data);
// Check for a hard error.
if ($return instanceof Exception)
{
// Get the error message to display.
if ($app->get('error_reporting'))
{
$message = $return->getMessage();
}
else
{
$message = JText::_('COM_USERS_RESET_COMPLETE_ERROR');
}
// Go back to the complete form.
$this->setRedirect(JRoute::_('index.php?option=com_users&view=reset&layout=complete',
false), $message, 'error');
return false;
}
elseif ($return === false)
{
// Complete failed.
// Go back to the complete form.
$message = JText::sprintf('COM_USERS_RESET_COMPLETE_FAILED',
$model->getError());
$this->setRedirect(JRoute::_('index.php?option=com_users&view=reset&layout=complete',
false), $message, 'notice');
return false;
}
else
{
// Complete succeeded.
// Proceed to the login form.
$message = JText::_('COM_USERS_RESET_COMPLETE_SUCCESS');
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login',
false), $message);
return true;
}
}
}
user.php000064400000020634151171652570006252 0ustar00<?php
/**
* @package Joomla.Site
* @subpackage com_users
*
* @copyright (C) 2009 Open Source Matters, Inc.
<https://www.joomla.org>
* @license GNU General Public License version 2 or later; see
LICENSE.txt
*/
defined('_JEXEC') or die;
JLoader::register('UsersController', JPATH_COMPONENT .
'/controller.php');
/**
* Registration controller class for Users.
*
* @since 1.6
*/
class UsersControllerUser extends UsersController
{
/**
* Method to log in a user.
*
* @return void
*
* @since 1.6
*/
public function login()
{
$this->checkToken('post');
$app = JFactory::getApplication();
$input = $app->input->getInputForRequestMethod();
// Populate the data array:
$data = array();
$data['return'] =
base64_decode($input->get('return', '',
'BASE64'));
$data['username'] = $input->get('username',
'', 'USERNAME');
$data['password'] = $input->get('password',
'', 'RAW');
$data['secretkey'] = $input->get('secretkey',
'', 'RAW');
// Check for a simple menu item id
if (is_numeric($data['return']))
{
if (JLanguageMultilang::isEnabled())
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('language')
->from($db->quoteName('#__menu'))
->where('client_id = 0')
->where('id =' . $data['return']);
$db->setQuery($query);
try
{
$language = $db->loadResult();
}
catch (RuntimeException $e)
{
return;
}
if ($language !== '*')
{
$lang = '&lang=' . $language;
}
else
{
$lang = '';
}
}
else
{
$lang = '';
}
$data['return'] = 'index.php?Itemid=' .
$data['return'] . $lang;
}
else
{
// Don't redirect to an external URL.
if (!JUri::isInternal($data['return']))
{
$data['return'] = '';
}
}
// Set the return URL if empty.
if (empty($data['return']))
{
$data['return'] =
'index.php?option=com_users&view=profile';
}
// Set the return URL in the user state to allow modification by plugins
$app->setUserState('users.login.form.return',
$data['return']);
// Get the log in options.
$options = array();
$options['remember'] =
$this->input->getBool('remember', false);
$options['return'] = $data['return'];
// Get the log in credentials.
$credentials = array();
$credentials['username'] = $data['username'];
$credentials['password'] = $data['password'];
$credentials['secretkey'] = $data['secretkey'];
// Perform the log in.
if (true !== $app->login($credentials, $options))
{
// Login failed !
// Clear user name, password and secret key before sending the login
form back to the user.
$data['remember'] = (int) $options['remember'];
$data['username'] = '';
$data['password'] = '';
$data['secretkey'] = '';
$app->setUserState('users.login.form.data', $data);
$app->redirect(JRoute::_('index.php?option=com_users&view=login',
false));
}
// Success
if ($options['remember'] == true)
{
$app->setUserState('rememberLogin', true);
}
$app->setUserState('users.login.form.data', array());
$app->redirect(JRoute::_($app->getUserState('users.login.form.return'),
false));
}
/**
* Method to log out a user.
*
* @return void
*
* @since 1.6
*/
public function logout()
{
$this->checkToken('request');
$app = JFactory::getApplication();
// Prepare the logout options.
$options = array(
'clientid' => $app->get('shared_session',
'0') ? null : 0,
);
// Perform the log out.
$error = $app->logout(null, $options);
$input = $app->input->getInputForRequestMethod();
// Check if the log out succeeded.
if ($error instanceof Exception)
{
$app->redirect(JRoute::_('index.php?option=com_users&view=login',
false));
}
// Get the return URL from the request and validate that it is internal.
$return = $input->get('return', '',
'BASE64');
$return = base64_decode($return);
// Check for a simple menu item id
if (is_numeric($return))
{
if (JLanguageMultilang::isEnabled())
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('language')
->from($db->quoteName('#__menu'))
->where('client_id = 0')
->where('id =' . $return);
$db->setQuery($query);
try
{
$language = $db->loadResult();
}
catch (RuntimeException $e)
{
return;
}
if ($language !== '*')
{
$lang = '&lang=' . $language;
}
else
{
$lang = '';
}
}
else
{
$lang = '';
}
$return = 'index.php?Itemid=' . $return . $lang;
}
else
{
// Don't redirect to an external URL.
if (!JUri::isInternal($return))
{
$return = '';
}
}
// In case redirect url is not set, redirect user to homepage
if (empty($return))
{
$return = JUri::root();
}
// Redirect the user.
$app->redirect(JRoute::_($return, false));
}
/**
* Method to logout directly and redirect to page.
*
* @return void
*
* @since 3.5
*/
public function menulogout()
{
// Get the ItemID of the page to redirect after logout
$app = JFactory::getApplication();
$active = $app->getMenu()->getActive();
$itemid = $active ? $active->getParams()->get('logout') :
0;
// Get the language of the page when multilang is on
if (JLanguageMultilang::isEnabled())
{
if ($itemid)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select('language')
->from($db->quoteName('#__menu'))
->where('client_id = 0')
->where('id =' . $itemid);
$db->setQuery($query);
try
{
$language = $db->loadResult();
}
catch (RuntimeException $e)
{
return;
}
if ($language !== '*')
{
$lang = '&lang=' . $language;
}
else
{
$lang = '';
}
// URL to redirect after logout
$url = 'index.php?Itemid=' . $itemid . $lang;
}
else
{
// Logout is set to default. Get the home page ItemID
$lang_code =
$app->input->cookie->getString(JApplicationHelper::getHash('language'));
$item = $app->getMenu()->getDefault($lang_code);
$itemid = $item->id;
// Redirect to Home page after logout
$url = 'index.php?Itemid=' . $itemid;
}
}
else
{
// URL to redirect after logout, default page if no ItemID is set
$url = $itemid ? 'index.php?Itemid=' . $itemid : JUri::root();
}
// Logout and redirect
$this->setRedirect('index.php?option=com_users&task=user.logout&'
. JSession::getFormToken() . '=1&return=' .
base64_encode($url));
}
/**
* Method to request a username reminder.
*
* @return boolean
*
* @since 1.6
*/
public function remind()
{
// Check the request token.
$this->checkToken('post');
$app = JFactory::getApplication();
$model = $this->getModel('User', 'UsersModel');
$data = $this->input->post->get('jform', array(),
'array');
// Submit the username remind request.
$return = $model->processRemindRequest($data);
// Check for a hard error.
if ($return instanceof Exception)
{
// Get the error message to display.
$message = $app->get('error_reporting')
? $return->getMessage()
: JText::_('COM_USERS_REMIND_REQUEST_ERROR');
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid :
'';
$route = 'index.php?option=com_users&view=remind' .
$itemid;
// Go back to the complete form.
$this->setRedirect(JRoute::_($route, false), $message,
'error');
return false;
}
if ($return === false)
{
// Complete failed.
// Get the route to the next page.
$itemid = UsersHelperRoute::getRemindRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid :
'';
$route = 'index.php?option=com_users&view=remind' .
$itemid;
// Go back to the complete form.
$message = JText::sprintf('COM_USERS_REMIND_REQUEST_FAILED',
$model->getError());
$this->setRedirect(JRoute::_($route, false), $message,
'notice');
return false;
}
// Complete succeeded.
// Get the route to the next page.
$itemid = UsersHelperRoute::getLoginRoute();
$itemid = $itemid !== null ? '&Itemid=' . $itemid :
'';
$route = 'index.php?option=com_users&view=login' . $itemid;
// Proceed to the login form.
$message = JText::_('COM_USERS_REMIND_REQUEST_SUCCESS');
$this->setRedirect(JRoute::_($route, false), $message);
return true;
}
/**
* Method to resend a user.
*
* @return void
*
* @since 1.6
*/
public function resend()
{
// Check for request forgeries
// $this->checkToken('post');
}
}