Файловый менеджер - Редактировать - /home/lmsyaran/public_html/khsh/chat.tar
Назад
chatterauth/chatterauth.php 0000644 00000011520 15116742625 0012115 0 ustar 00 <?php /*----------------------------------------------------------------------------------| www.vdm.io |----/ fdsh /-------------------------------------------------------------------------------------------------------/ @version 1.0.36 @build 28th March, 2023 @created 17th December, 2020 @package Reservation @subpackage chatterauth.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'); /***[JCBGUI.class_extends.head.5.$$$$]***/ jimport( 'joomla.plugin.plugin' );/***[/JCBGUI$$$$]***/ class PlgChatChatterauth extends JEvent { /***[JCBGUI.joomla_plugin.main_class_code.62.$$$$]***/ class PlgChatChatterauth extends JEvent { public function beforeChat($uid, $pid, $userid, $seid) { //firstQst site view control if (JFactory::getApplication()->input->get('view')== 'firstQst') { $uid= JFactory::getApplication()->input->get('uid',0); $pid= JFactory::getApplication()->input->get('pid',0); $db = JFactory::getDbo(); $query= $db->getQuery(true) ->select('c.id') ->from($db->quoteName('#__reservation_consultant','c')) ->where($db->quoteName('c.userid').'='.$uid); $db->setQuery($query); $res= $db->loadObject(); if(empty($res)) { JFactory::getApplication()->enqueueMessage('استفاده از پارامترهای نامعتبر','warning'); JFactory::getApplication()->redirect(JUri::root()); } $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').'='.$res->id); $db->setQuery($query); $res= $db->loadObject(); if(empty($res)) { JFactory::getApplication()->enqueueMessage('استفاده از پارامترهای نامعتبر','warning'); JFactory::getApplication()->redirect(JUri::root()); } return false; } //messages site view control // $session= JFactory::getApplication()->input->get('session'); $app= JFactory::getApplication(); $db= JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName('id')) ->from($db->quoteName('#__reservation_sick')) ->where($db->quoteName('userid').'='.$userid); $db->setQuery($query); $res= $db->loadResult(); if ($res) { $join= 'co.userid'; $where= 'si.userid'; $where2= 'co.userid'; } else { $join= 'si.userid'; $where= 'co.userid'; $where2= 'si.userid'; } $db= JFactory::getDbo(); $query = $db->getQuery(true) ->select($db->quoteName(array('u.id','u.name','p.id','se.pay'),array('uid','name','pid','pay'))) ->from($db->quoteName('#__reservation_session','se')) ->join('INNER',$db->quoteName('#__reservation_sick','si').'on ('.$db->quoteName('se.sickid').'='.$db->quoteName('si.id').')') ->join('INNER',$db->quoteName('#__reservation_plan','p').'on ('.$db->quoteName('se.planid').'='.$db->quoteName('p.id').')') ->join('INNER',$db->quoteName('#__reservation_consultant','co').'on ('.$db->quoteName('p.consultantid').'='.$db->quoteName('co.id').')') ->join('INNER',$db->quoteName('#__users','u').'on ('.$db->quoteName($join).'='.$db->quoteName('u.id').')') ->where($db->quoteName($where).'='.$userid) ->where($db->quoteName($where2).'='.$uid) ->where($db->quoteName('p.id').'='.$pid) ->where($db->quoteName('se.pay').'= 1') ->where($db->quoteName('se.id').'='.$seid); $db->setQuery($query); $res= $db->loadObject(); if (empty($res)) { JFactory::getApplication()->enqueueMessage('استفاده از پارامترهای نامعتبر','warning'); JFactory::getApplication()->redirect(JUri::root()); } return true; }/***[/JCBGUI$$$$]***/ } chatterauth/chatterauth.xml 0000644 00000001706 15116742625 0012133 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <extension type="plugin" version="3.8" group="chat" method="upgrade"> <name>PLG_CHAT_CHATTERAUTH</name> <creationDate>28th March, 2023</creationDate> <author>farhad shahbazi</author> <authorEmail>farhad.shahbazi0010@gmail.com</authorEmail> <authorUrl>http://farhad.com</authorUrl> <copyright>Copyright (C) 2015. All Rights Reserved</copyright> <license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license> <version>1.0.0</version> <description>PLG_CHAT_CHATTERAUTH_XML_DESCRIPTION</description> <!-- Language files --> <languages folder="language"> <language tag="en-GB">en-GB/en-GB.plg_chat_chatterauth.ini</language> <language tag="en-GB">en-GB/en-GB.plg_chat_chatterauth.sys.ini</language> </languages> <!-- Plugin files --> <files> <filename plugin="chatterauth">chatterauth.php</filename> <filename>index.html</filename> <folder>language</folder> </files> </extension>