Spade
Mini Shell
| Directory:~$ /home/lmsyaran/public_html/joomla4/ |
| [Home] [System Details] [Kill Me] |
PK�s�[�#o,,
index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK�s�[�����rsticketspro.phpnu�[���<?php
/**
* @package RSTickets! Pro
*
* @copyright (c) 2010 - 2016 RSJoomla!
* @link https://www.rsjoomla.com
* @license GNU General Public License
http://www.gnu.org/licenses/gpl-3.0.en.html
*/
defined('_JEXEC') or die( 'Restricted access' );
class plgUserRsticketspro extends JPlugin
{
public function __construct(&$subject, $config) {
parent::__construct($subject, $config);
}
public static function onUserLogin($user, $options) {
// Initialize variables
$success = true;
if
(!file_exists(JPATH_ADMINISTRATOR.'/components/com_rsticketspro/helpers/rsticketspro.php'))
{
return $success;
}
require_once
JPATH_ADMINISTRATOR.'/components/com_rsticketspro/helpers/rsticketspro.php';
$app = JFactory::getApplication();
$db = JFactory::getDbo();
$session = JFactory::getSession();
if (isset($user['username'])) {
$user_id = JUserHelper::getUserId($user['username']);
$logged_user = JFactory::getUser($user_id);
} else {
$logged_user = JFactory::getUser();
}
$user_id = $logged_user->get('id');
// is staff
$query = $db->getQuery(true);
$query->select($db->qn('group_id'))
->from($db->qn('#__rsticketspro_staff'))
->where($db->qn('user_id').'='.$db->q($user_id));
$db->setQuery($query);
$group_id = $db->loadResult();
$is_staff = !empty($group_id);
if (!$is_staff) {
// must check if he's an admin
$admin_groups = RSTicketsProHelper::getAdminGroups();
$user_groups = $logged_user->getAuthorisedGroups();
foreach ($user_groups as $user_group_id) {
if (in_array($user_group_id, $admin_groups)) {
$is_staff = true;
break;
}
}
}
$session->set('rsticketspro.is_staff', $is_staff);
// permissions and department
if ($is_staff) {
// permissions
if ($group_id) {
$query = $db->getQuery(true);
$query->select('*')
->from($db->qn('#__rsticketspro_groups'))
->where($db->qn('id').'='.$db->q($group_id));
$db->setQuery($query);
$permissions = $db->loadObject();
} else {
//
JTable::getInstance('RSTicketsPro_Groups','Table');
$permissions = new stdClass();
$permissions->name = '';
$permissions->add_ticket = 1;
$permissions->add_ticket_customers = 1;
$permissions->add_ticket_staff = 1;
$permissions->update_ticket = 1;
$permissions->update_ticket_custom_fields = 1;
$permissions->delete_ticket = 1;
$permissions->answer_ticket = 1;
$permissions->update_ticket_replies = 1;
$permissions->update_ticket_replies_customers = 1;
$permissions->update_ticket_replies_staff = 1;
$permissions->delete_ticket_replies_customers = 1;
$permissions->delete_ticket_replies_staff = 1;
$permissions->delete_ticket_replies = 1;
$permissions->assign_tickets = 1;
$permissions->change_ticket_status = 1;
$permissions->see_unassigned_tickets = 1;
$permissions->see_other_tickets = 1;
$permissions->move_ticket = 1;
$permissions->view_notes = 1;
$permissions->add_note = 1;
$permissions->update_note = 1;
$permissions->update_note_staff = 1;
$permissions->delete_note = 1;
$permissions->delete_note_staff = 1;
$permissions->export_tickets = 1;
}
$session->set('rsticketspro.permissions', $permissions);
// get departments
$query = $db->getQuery(true);
$query->select($db->qn('department_id'))
->from($db->qn('#__rsticketspro_staff_to_department'))
->where($db->qn('user_id').'='.$db->q($user_id));
$db->setQuery($query);
$departments = $db->loadColumn();
if (empty($departments)) {
$query = $db->getQuery(true);
$query->select($db->qn('id'))
->from($db->qn('#__rsticketspro_departments'))
->where($db->qn('published').'='.$db->q(1));
$db->setQuery($query);
$departments = $db->loadColumn();
}
$session->set('rsticketspro.departments', $departments);
// searches
$query = $db->getQuery(true);
$query->select('*')
->from($db->qn('#__rsticketspro_searches'))
->where($db->qn('user_id').'='.$db->q($user_id))
->where($db->qn('default').'='.$db->q(1));
$db->setQuery($query);
if ($search = $db->loadObject()) {
if ($params = unserialize(base64_decode($search->params)))
{
JTable::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_rsticketspro/tables');
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR .
'/components/com_rsticketspro/models');
$table =
JTable::getInstance('Searches','RsticketsproTable');
$table->load($search->id);
$model = JModelLegacy::getInstance('Tickets',
'RsticketsproModel', array(
'option' => 'com_rsticketspro',
'table_path' => JPATH_ADMINISTRATOR .
'/components/com_rsticketspro/tables'
));
$model->performSearch($table);
}
}
}
return $success;
}
public function onUserLogout($user) {
// Initialize variables
$success = true;
$session = JFactory::getSession();
$session->set('rsticketspro.is_staff', false);
$session->set('rsticketspro.permissions', false);
return $success;
}
public function onAfterDeleteUser($user, $success, $msg) {
$db = JFactory::getDbo();
$id = (int) $user['id'];
if ($id) {
// remove this staff
$query = $db->getQuery(true);
$query->delete('#__rsticketspro_staff')
->where($db->qn('user_id').'='.$db->q($id));
$db->setQuery($query)->execute();
$query->clear();
$query->delete('#__rsticketspro_staff_to_department')
->where($db->qn('user_id').'='.$db->q($id));
$db->setQuery($query)->execute();
// unassign all tickets assigned to this staff member
$query->clear();
$query->update('#__rsticketspro_tickets')
->set($db->qn('staff_id').'='.$db->q(0))
->where($db->qn('staff_id').'='.$db->q($id));
$db->setQuery($query)->execute();
}
return true;
}
}PK�s�[�+k���rsticketspro.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension method="upgrade" version="2.5"
type="plugin" group="user">
<name>User - RSTickets! Pro Staff</name>
<author>RSJoomla!</author>
<creationDate>February 2014</creationDate>
<copyright>Copyright (C) 2010-2014 www.rsjoomla.com. All rights
reserved.</copyright>
<license>GNU General Public License</license>
<authorEmail>support@rsjoomla.com</authorEmail>
<authorUrl>www.rsjoomla.com</authorUrl>
<version>1.0.0</version>
<description>This plugin loads the RSTickets! Pro Staff information
when they login</description>
<files>
<filename
plugin="rsticketspro">rsticketspro.php</filename>
<filename>index.html</filename>
</files>
</extension>PKL��[���iirsticketspro_anonymise.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<form>
<fieldset name="rsticketspro_anonymise"
addfieldpath="administrator/components/com_rsticketspro/models/fields">
<field
name="anonymise"
type="RSTicketsProAnonymiseButton"
label=""
description=""
/>
</fieldset>
</form>PK��[+K�(��farhad_sms/farhad_sms.phpnu�[���<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.36
@build 11th August, 2021
@created 17th December, 2020
@package Reservation
@subpackage farhad_sms.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.1.$$$$]***/
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
/***[/JCBGUI$$$$]***/
/***[JCBGUI.class_extends.comment.1.$$$$]***/
/**
* Rsticketspro - Farhad_sms plugin.
*
* @package Farhad_sms
* @since 1.0.0
*//***[/JCBGUI$$$$]***/
class PlgRsticketsproFarhad_sms extends CMSPlugin
{
/***[JCBGUI.joomla_plugin.main_class_code.3.$$$$]***/
function onRsticketsproAfterStoreTicket($data)
{
// echo '<pre>';
// var_dump($data);
// echo '</pre>';
// exit();
}/***[/JCBGUI$$$$]***/
}
PK��[22�E��farhad_sms/farhad_sms.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension type="plugin" version="3.8"
group="rsticketspro" method="upgrade">
<name>PLG_RSTICKETSPRO_FARHAD_SMS</name>
<creationDate>11th August, 2021</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_RSTICKETSPRO_FARHAD_SMS_XML_DESCRIPTION</description>
<!-- Language files -->
<languages folder="language">
<language
tag="en-GB">en-GB/en-GB.plg_rsticketspro_farhad_sms.ini</language>
<language
tag="en-GB">en-GB/en-GB.plg_rsticketspro_farhad_sms.sys.ini</language>
</languages>
<!-- Plugin files -->
<files>
<filename
plugin="farhad_sms">farhad_sms.php</filename>
<filename>index.html</filename>
<folder>language</folder>
</files>
</extension>PK��[�#o,,farhad_sms/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK��[�'�U��?farhad_sms/language/en-GB/en-GB.plg_rsticketspro_farhad_sms.ininu�[���PLG_RSTICKETSPRO_FARHAD_SMS="Rsticketspro
- Farhad_sms"
PLG_RSTICKETSPRO_FARHAD_SMS_DESCRIPTION="farhad_sms"
PLG_RSTICKETSPRO_FARHAD_SMS_XML_DESCRIPTION="<h1>Rsticketspro -
Farhad_sms (v.1.0.0)</h1> <div style='clear:
both;'></div><p>farhad_sms</p><p>Created by
<a href='http://farhad.com'
target='_blank'>farhad shahbazi</a><br
/><small>Development started 11th August,
2021</small></p>"PK��[�'�U��Cfarhad_sms/language/en-GB/en-GB.plg_rsticketspro_farhad_sms.sys.ininu�[���PLG_RSTICKETSPRO_FARHAD_SMS="Rsticketspro
- Farhad_sms"
PLG_RSTICKETSPRO_FARHAD_SMS_DESCRIPTION="farhad_sms"
PLG_RSTICKETSPRO_FARHAD_SMS_XML_DESCRIPTION="<h1>Rsticketspro -
Farhad_sms (v.1.0.0)</h1> <div style='clear:
both;'></div><p>farhad_sms</p><p>Created by
<a href='http://farhad.com'
target='_blank'>farhad shahbazi</a><br
/><small>Development started 11th August,
2021</small></p>"PK��[�#o,,$farhad_sms/language/en-GB/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK��[�#o,,farhad_sms/language/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK��[��W��*rsticket_bale_sms/classes/bale_webhook.phpnu�[���<?php
require_once __DIR__.'/send.php';
$param= file_get_contents('php://input');
$param= json_decode($param);
$first_name= $param->message->from->first_name;
$chat_id= $param->message->chat->id;
$message_id= $param->message->message_id;
$message= $param->message->text;
$type= $param->message->chat->type;
if ($message!= '###id###')
exit();
if ($type== 'group')
$text= "سلام {$first_name} شناسه عددی گروه
{$chat_id} میباشد ";
elseif ($type== 'private')
$text= "سلام {$first_name} شناسه عددی شما
{$chat_id} میباشد ";
$data= [[
'chat_id'=> $chat_id,
'text'=> $text
]];
$send= new send;
$send->send_bale_message($data);PK��[�ւ��"rsticket_bale_sms/classes/send.phpnu�[���<?php
class send{
public function __construct($bot_token)
{
$this->bot_token= $bot_token;
$this->getupdates_url=
"https://tapi.bale.ai/bot{$this->bot_token}/getupdates";
$this->sendmessage_url=
"https://tapi.bale.ai/bot{$this->bot_token}/sendMessage";
}
public function send_bale_message($data=[])
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $this->sendmessage_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
foreach ($data as $item)
{
curl_setopt($curl, CURLOPT_POSTFIELDS, $item);
$response = curl_exec($curl);
}
$response = json_decode($response);
// $err = curl_error($curl);
curl_close($curl);
return $response;
}
public function send_sms($mobilenumber, $smsService_input_data,
$smsService_pattern_code, $smsService_username, $smsService_password)
{
$SoapClient = new
SoapClient("http://panel.smsema.com/class/sms/wsdlservice/server.php?wsdl");
$smsService_from = "+983000505";
for($i=0; $i< 3; $i++)
{
$result= $SoapClient->sendPatternSms($smsService_from,
(array)$mobilenumber, $smsService_username, $smsService_password,
$smsService_pattern_code, $smsService_input_data);
if ($result)
return $result;
}
}
public function getMobile($mobile_number_source,
$mobile_number_source_field, $user_id)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
if ($mobile_number_source == 'additional') {
$query->select('value');
$query->from($db->quoteName('#__fields',
'f'));
$query->join('inner',
$db->quoteName('#__fields_values', 'fv') .
'on' . $db->quoteName('f.id') . '=' .
$db->quoteName('fv.field_id'));
$query->where($db->quoteName('context') .
'=' . $db->quote('com_users.user'));
$query->where($db->quoteName('item_id') .
'=' . $user_id);
$query->where($db->quoteName('f.name') .
'=' . $db->quote($mobile_number_source_field));
$db->setQuery($query);
$result = $db->loadResult();
} elseif ($mobile_number_source == 'community_builder')
{
$query->select($mobile_number_source_field);
$query->from($db->quoteName('#__comprofiler',
'cp'));
$query->where($db->quoteName('user_id') .
'=' . $user_id);
$db->setQuery($query);
$result = $db->loadResult();
}
elseif ($mobile_number_source == 'username')
{
$query->select('username');
$query->from($db->quoteName('#__users',
'u'));
$query->where($db->quoteName('id') .
'=' . $user_id);
$db->setQuery($query);
$result = $db->loadResult();
}
return $result;
}
}PK��[�#o,,rsticket_bale_sms/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK��[t���
�
Mrsticket_bale_sms/language/en-GB/en-GB.plg_rsticketspro_rsticket_bale_sms.ininu�[���PLG_RSTICKETSPRO_RSTICKET_BALE_SMS="Rsticketspro
- Rsticket_bale_sms"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_DESCRIPTION="connect Rsticket to
bale social network and sms panel"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_XML_DESCRIPTION="<h1>Rsticketspro
- Rsticket_bale_sms (v.1.0.0)</h1> <div style='clear:
both;'></div><p>connect Rsticket to bale social network
and sms panel </p><p>Created by <a
href='http://farhad.com' target='_blank'>farhad
shahbazi</a><br /><small>Development started 14th August,
2021</small></p>"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER="Mobile Number"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_PANEL_SETTING="Panel Setting"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_LABEL="Mobile
Number Source"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_DESCRIPTION="the
source from which the mobile number is read. If you select the Joomla
option, the user username will be used as the phone number"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_JOOMLA_UESRS_ADDITIONAL_FIELD="joomla
uesrs additional field"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_COMMUNITY_BUILDER="community
builder"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_JOOMLA_USERNAME_FIELD="joomla
username field"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_FIELD_LABEL="Mobile
Number Source Field"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_FIELD_DESCRIPTION="the
name of the column in which the mobile number is stored"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_FIELD_MESSAGE="Error!
Please add some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_USERNAME_LABEL="Username"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_USERNAME_DESCRIPTION="sms panel
username. If the username is empty, the SMS system will remain
inactive"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_USERNAME_MESSAGE="Error! Please
add some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_PASSWORD_LABEL="Password"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_PASSWORD_DESCRIPTION="sms panel
password.If the password is empty, the SMS system will remain
inactive"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_PASSWORD_MESSAGE="Error! Please
add some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_SUBMIT_PATTERN_LABEL="Sms
Submit Pattern"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_SUBMIT_PATTERN_DESCRIPTION="Sms
Submit Pattern.If the submission pattern is blank, no message will be sent
to the user after submitting the ticket"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_SUBMIT_PATTERN_MESSAGE="Error!
Please add some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_REPLY_PATTERN_LABEL="Sms Reply
Pattern"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_REPLY_PATTERN_DESCRIPTION="Sms
Reply Pattern. If the replay pattern is blank, no message will be sent to
the user after the admin response to the ticket"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_REPLY_PATTERN_MESSAGE="Error!
Please add some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BALE_ID_LABEL="Bale ID"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BALE_ID_DESCRIPTION="You can get
help from Bale @isnullbot to get the group ID.
To get the channel ID, refer to the channel information section in Bale.
To send messages to multiple groups and channels, just separate their
identifiers with (,)"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BALE_ID_MESSAGE="Error! Please add
some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BOT_TOKEN_LABEL="bot token"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BOT_TOKEN_DESCRIPTION="Visit
@botfather in Bale to create and get the Bot Token"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BOT_TOKEN_MESSAGE="Error! Please
add some text
here."PK��[t���
�
Qrsticket_bale_sms/language/en-GB/en-GB.plg_rsticketspro_rsticket_bale_sms.sys.ininu�[���PLG_RSTICKETSPRO_RSTICKET_BALE_SMS="Rsticketspro
- Rsticket_bale_sms"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_DESCRIPTION="connect Rsticket to
bale social network and sms panel"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_XML_DESCRIPTION="<h1>Rsticketspro
- Rsticket_bale_sms (v.1.0.0)</h1> <div style='clear:
both;'></div><p>connect Rsticket to bale social network
and sms panel </p><p>Created by <a
href='http://farhad.com' target='_blank'>farhad
shahbazi</a><br /><small>Development started 14th August,
2021</small></p>"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER="Mobile Number"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_PANEL_SETTING="Panel Setting"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_LABEL="Mobile
Number Source"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_DESCRIPTION="the
source from which the mobile number is read. If you select the Joomla
option, the user username will be used as the phone number"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_JOOMLA_UESRS_ADDITIONAL_FIELD="joomla
uesrs additional field"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_COMMUNITY_BUILDER="community
builder"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_JOOMLA_USERNAME_FIELD="joomla
username field"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_FIELD_LABEL="Mobile
Number Source Field"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_FIELD_DESCRIPTION="the
name of the column in which the mobile number is stored"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_FIELD_MESSAGE="Error!
Please add some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_USERNAME_LABEL="Username"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_USERNAME_DESCRIPTION="sms panel
username. If the username is empty, the SMS system will remain
inactive"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_USERNAME_MESSAGE="Error! Please
add some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_PASSWORD_LABEL="Password"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_PASSWORD_DESCRIPTION="sms panel
password.If the password is empty, the SMS system will remain
inactive"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_PASSWORD_MESSAGE="Error! Please
add some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_SUBMIT_PATTERN_LABEL="Sms
Submit Pattern"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_SUBMIT_PATTERN_DESCRIPTION="Sms
Submit Pattern.If the submission pattern is blank, no message will be sent
to the user after submitting the ticket"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_SUBMIT_PATTERN_MESSAGE="Error!
Please add some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_REPLY_PATTERN_LABEL="Sms Reply
Pattern"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_REPLY_PATTERN_DESCRIPTION="Sms
Reply Pattern. If the replay pattern is blank, no message will be sent to
the user after the admin response to the ticket"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_REPLY_PATTERN_MESSAGE="Error!
Please add some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BALE_ID_LABEL="Bale ID"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BALE_ID_DESCRIPTION="You can get
help from Bale @isnullbot to get the group ID.
To get the channel ID, refer to the channel information section in Bale.
To send messages to multiple groups and channels, just separate their
identifiers with (,)"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BALE_ID_MESSAGE="Error! Please add
some text here."
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BOT_TOKEN_LABEL="bot token"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BOT_TOKEN_DESCRIPTION="Visit
@botfather in Bale to create and get the Bot Token"
PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BOT_TOKEN_MESSAGE="Error! Please
add some text
here."PK��[�#o,,+rsticket_bale_sms/language/en-GB/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK��[�#o,,%rsticket_bale_sms/language/index.htmlnu�[���<html><body
bgcolor="#FFFFFF"></body></html>PK��[�N�P��'rsticket_bale_sms/rsticket_bale_sms.phpnu�[���<?php
/*----------------------------------------------------------------------------------|
www.vdm.io |----/
fdsh
/-------------------------------------------------------------------------------------------------------/
@version 1.0.36
@build 28th March, 2023
@created 17th December, 2020
@package Reservation
@subpackage rsticket_bale_sms.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.1.$$$$]***/
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Plugin\CMSPlugin;
/***[/JCBGUI$$$$]***/
/***[JCBGUI.class_extends.comment.1.$$$$]***/
/**
* Rsticketspro - Rsticket_bale_sms plugin.
*
* @package Rsticket_bale_sms
* @since 1.0.0
*//***[/JCBGUI$$$$]***/
class PlgRsticketsproRsticket_bale_sms extends CMSPlugin
{
/***[JCBGUI.joomla_plugin.main_class_code.4.$$$$]***/
public function onRsticketsproAfterStoreTicket($row)
{
$row= (object)$row;
require_once __DIR__.'/classes/send.php';
$bale_id= $this->params->get('bale_id',0);
$params= [
'bale_id'=> $bale_id,
'id'=> $row->ticket_id,
'code'=> $row->code,
'subject'=> $row->subject,
'message'=> $row->message,
'created_date'=> $row->date,
'status_id'=> $row->status_id,
'priority_id'=> $row->priority_id,
'department_id'=> $row->department_id,
'user_id'=> $row->user_id,
'customer_id'=> $row->customer_id
];
$user= JFactory::getUser();
$name= $user->get('name', 'guest');
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('name');
$query->from($db->quoteName('#__rsticketspro_statuses'));
$query->where($db->quoteName('id').'='.$db->quote($params['status_id']));
$db->setQuery($query);
$params['status_title'] = $db->loadResult();
$query = $db->getQuery(true);
$query->select('name');
$query->from($db->quoteName('#__rsticketspro_priorities'));
$query->where($db->quoteName('id').'='.$db->quote($params['priority_id']));
$db->setQuery($query);
$params['priority_title'] = $db->loadResult();
$query = $db->getQuery(true);
$query->select('name');
$query->from($db->quoteName('#__rsticketspro_departments'));
$query->where($db->quoteName('id').'='.$db->quote($params['department_id']));
$db->setQuery($query);
$params['department_title'] = $db->loadResult();
$text= "
شناسه تیکت : {$params['id']}
کد تیکت : {$params['code']}
نام فرستنده : {$name}
دپارتمان : {$params['department_title']}
وضعیت : {$params['status_title']}
اولویت : {$params['priority_title']}
تاریخ ایجاد : {$params['created_date']}
موضوع : {$params['subject']}
متن : {$params['message']} ";
$send= new send($this->params->get('bot_token'));
foreach (explode(',',$params['bale_id']) as $item)
{
$data[]= ['chat_id'=> $item,
'text'=>$text];
}
$send->send_bale_message($data);
$mobile_number_source =
$this->params->get('mobile_number_source');
$mobile_number_source_field =
$this->params->get('mobile_number_source_field');
$smsService_input_data = array(
// "name" => $name,
"website_link" => 'https://www.daneh.ir'
);
$smsService_pattern_code =
$this->params->get('sms_submit_pattern', 0);
$smsService_username =
$this->params->get('sms_username', 0);
$smsService_password =
$this->params->get('sms_password', 0);
if ($smsService_username && $smsService_password &&
$smsService_pattern_code)
{
$mobile= $send->getMobile($mobile_number_source,
$mobile_number_source_field, $params['customer_id']);
if ($mobile)
{
$res = $send->send_sms($mobile, $smsService_input_data,
$smsService_pattern_code, $smsService_username, $smsService_password);
}
}
}
public function onRsticketsproAfterStoreTicketReply($row, $table= null)
{
if ($table)
{
$row= (object)$row;
require_once __DIR__.'/classes/send.php';
$bale_id= $this->params->get('bale_id',0);
$params= [
'bale_id'=> $bale_id,
'id'=> $row->ticket_id,
'message'=> $row->message,
'created_date'=> $row->date,
'user_id'=> $row->user_id
];
$user= JFactory::getUser();
$name= $user->get('name', 'guest');
$text= "
#پاسخ
شناسه تیکت : {$params['id']}
نام پاسخ دهنده : {$name}
تاریخ ایجاد : {$params['created_date']}
متن : {$params['message']} ";
$send= new send($this->params->get('bot_token'));
foreach (explode(',',$params['bale_id']) as
$item) {
$data[]= ['chat_id'=> $item,
'text'=>$text];
}
$send->send_bale_message($data);
$mobile_number_source =
$this->params->get('mobile_number_source');
$mobile_number_source_field =
$this->params->get('mobile_number_source_field');
$smsService_input_data = array(
"Name" => $name,
"website_link" =>
'https://www.daneh.ir'
);
$smsService_pattern_code =
$this->params->get('sms_reply_pattern', 0);
$smsService_username =
$this->params->get('sms_username', 0);
$smsService_password =
$this->params->get('sms_password', 0);
if ($smsService_username && $smsService_password &&
$smsService_pattern_code)
{
if (isset($row->customer_id))
{
$mobile= $send->getMobile($mobile_number_source,
$mobile_number_source_field, $row->customer_id);
if ($mobile)
$send->send_sms($mobile, $smsService_input_data,
$smsService_pattern_code, $smsService_username, $smsService_password);
}
}
}
}/***[/JCBGUI$$$$]***/
}
PK��[��º'rsticket_bale_sms/rsticket_bale_sms.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension type="plugin" version="3.8"
group="rsticketspro" method="upgrade">
<name>PLG_RSTICKETSPRO_RSTICKET_BALE_SMS</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_RSTICKETSPRO_RSTICKET_BALE_SMS_XML_DESCRIPTION</description>
<!-- Language files -->
<languages folder="language">
<language
tag="en-GB">en-GB/en-GB.plg_rsticketspro_rsticket_bale_sms.ini</language>
<language
tag="en-GB">en-GB/en-GB.plg_rsticketspro_rsticket_bale_sms.sys.ini</language>
</languages>
<!-- Plugin files -->
<files>
<filename
plugin="rsticket_bale_sms">rsticket_bale_sms.php</filename>
<filename>index.html</filename>
<folder>language</folder>
<folder>classes</folder>
</files>
<!-- Config parameter -->
<config
addrulepath="/administrator/components/com_reservation/models/rules"
addfieldpath="/administrator/components/com_reservation/models/fields"
>
<fields name="params">
<fieldset name="mobilenumber"
label="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER">
<!-- Mobile_number_source Field. Type: List. (joomla) -->
<field type="list"
name="mobile_number_source"
label="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_LABEL"
description="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_DESCRIPTION"
class="list_class"
multiple="false"
default="">
<!-- Option Set.-->
<option
value="additional">PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_JOOMLA_UESRS_ADDITIONAL_FIELD</option>
<option
value="community_builder">PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_COMMUNITY_BUILDER</option>
<option
value="username">PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_JOOMLA_USERNAME_FIELD</option>
</field>
<!-- Mobile_number_source_field Field. Type: Text. (joomla) -->
<field type="text"
name="mobile_number_source_field"
label="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_FIELD_LABEL"
size="10"
maxlength="50"
default=""
description="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_FIELD_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
message="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_MOBILE_NUMBER_SOURCE_FIELD_MESSAGE"
autocomplete="on"
showon="mobile_number_source:additional,community_builder" />
</fieldset>
<fieldset name="panelsetting"
label="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_PANEL_SETTING">
<!-- Sms_username Field. Type: Text. (joomla) -->
<field type="text"
name="sms_username"
label="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_USERNAME_LABEL"
size="10"
maxlength="50"
default=""
description="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_USERNAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
message="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_USERNAME_MESSAGE"
autocomplete="on" />
<!-- Sms_password Field. Type: Text. (joomla) -->
<field type="text"
name="sms_password"
label="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_PASSWORD_LABEL"
size="10"
maxlength="50"
default=""
description="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_PASSWORD_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
message="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_PASSWORD_MESSAGE"
autocomplete="on" />
<!-- Sms_submit_pattern Field. Type: Text. (joomla) -->
<field type="text"
name="sms_submit_pattern"
label="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_SUBMIT_PATTERN_LABEL"
size="10"
maxlength="50"
default=""
description="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_SUBMIT_PATTERN_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
message="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_SUBMIT_PATTERN_MESSAGE"
autocomplete="on" />
<!-- Sms_reply_pattern Field. Type: Text. (joomla) -->
<field type="text"
name="sms_reply_pattern"
label="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_REPLY_PATTERN_LABEL"
size="10"
maxlength="50"
default=""
description="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_REPLY_PATTERN_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
message="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_SMS_REPLY_PATTERN_MESSAGE"
autocomplete="on" />
</fieldset>
<fieldset name="basic" label="basic">
<!-- Bale_id Field. Type: Text. (joomla) -->
<field type="text"
name="bale_id"
label="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BALE_ID_LABEL"
size="10"
maxlength="50"
default=""
description="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BALE_ID_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
message="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BALE_ID_MESSAGE"
autocomplete="on" />
<!-- Bot_token Field. Type: Text. (joomla) -->
<field type="text"
name="bot_token"
label="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BOT_TOKEN_LABEL"
size="10"
maxlength="400"
default=""
description="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BOT_TOKEN_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
message="PLG_RSTICKETSPRO_RSTICKET_BALE_SMS_BOT_TOKEN_MESSAGE"
autocomplete="on" />
</fieldset>
</fields>
</config>
</extension>PK�s�[�#o,,
index.htmlnu�[���PK�s�[�����frsticketspro.phpnu�[���PK�s�[�+k���Brsticketspro.xmlnu�[���PKL��[���iiLrsticketspro_anonymise.xmlnu�[���PK��[+K�(���farhad_sms/farhad_sms.phpnu�[���PK��[22�E��$farhad_sms/farhad_sms.xmlnu�[���PK��[�#o,,2(farhad_sms/index.htmlnu�[���PK��[�'�U��?�(farhad_sms/language/en-GB/en-GB.plg_rsticketspro_farhad_sms.ininu�[���PK��[�'�U��C�*farhad_sms/language/en-GB/en-GB.plg_rsticketspro_farhad_sms.sys.ininu�[���PK��[�#o,,$�,farhad_sms/language/en-GB/index.htmlnu�[���PK��[�#o,,
-farhad_sms/language/index.htmlnu�[���PK��[��W��*�-rsticket_bale_sms/classes/bale_webhook.phpnu�[���PK��[�ւ��"�0rsticket_bale_sms/classes/send.phpnu�[���PK��[�#o,,�<rsticket_bale_sms/index.htmlnu�[���PK��[t���
�
M^=rsticket_bale_sms/language/en-GB/en-GB.plg_rsticketspro_rsticket_bale_sms.ininu�[���PK��[t���
�
Q�Krsticket_bale_sms/language/en-GB/en-GB.plg_rsticketspro_rsticket_bale_sms.sys.ininu�[���PK��[�#o,,+Zrsticket_bale_sms/language/en-GB/index.htmlnu�[���PK��[�#o,,%�Zrsticket_bale_sms/language/index.htmlnu�[���PK��[�N�P��'
[rsticket_bale_sms/rsticket_bale_sms.phpnu�[���PK��[��º'vrsticket_bale_sms/rsticket_bale_sms.xmlnu�[���PK�k�