Файловый менеджер - Редактировать - /home/lmsyaran/public_html/components/com_reservation/models/doctorsignup.php
Назад
<?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 Model for Doctorsignup */ class ReservationModelDoctorsignup extends JModelList { /** * Model user data. * * @var strings */ protected $user; protected $userId; protected $guest; protected $groups; protected $levels; protected $app; protected $input; protected $uikitComp; /** * Method to build an SQL query to load the list data. * * @return string An SQL query */ protected function getListQuery() { // Get the current user for authorisation checks $this->user = JFactory::getUser(); $this->userId = $this->user->get('id'); $this->guest = $this->user->get('guest'); $this->groups = $this->user->get('groups'); $this->authorisedGroups = $this->user->getAuthorisedGroups(); $this->levels = $this->user->getAuthorisedViewLevels(); $this->app = JFactory::getApplication(); $this->input = $this->app->input; $this->initSet = true; // Get a db connection. $db = JFactory::getDbo(); // Create a new query object. $query = $db->getQuery(true); // Get data /***[JCBGUI.dynamic_get.php_custom_get.45.$$$$]***/ $query->select('1 as id');/***[/JCBGUI$$$$]***/ // return the query object return $query; } /** * Method to get an array of data items. * * @return mixed An array of data items on success, false on failure. */ public function getItems() { $user = JFactory::getUser(); // load parent items $items = parent::getItems(); // Get the global params $globalParams = JComponentHelper::getParams('com_reservation', true); // Insure all item fields are adapted where needed. if (ReservationHelper::checkArray($items)) { foreach ($items as $nr => &$item) { // Always create a slug for sef URL's $item->slug = (isset($item->alias) && isset($item->id)) ? $item->id.':'.$item->alias : $item->id; } } // return items return $items; } /***[JCBGUI.site_view.php_model.34.$$$$]***/ public function checkPhoneExist($phoneNumber) { $db= JFactory::getDbo(); $query= $db->getQuery(true) ->select('id') ->from($db->quoteName('#__reservation_sick')) ->where($db->quoteName('phonenumber').'='. $db->quote($phoneNumber)); $db->setQuery($query); $result= $db->loadObject(); $db= JFactory::getDbo(); $query= $db->getQuery(true) ->select('id') ->from($db->quoteName('#__reservation_consultant')) ->where($db->quoteName('phonenumber').'='. $db->quote($phoneNumber)); $db->setQuery($query); $result2= $db->loadObject(); $db= JFactory::getDbo(); $query= $db->getQuery(true) ->select('id') ->from($db->quoteName('#__reservation_doctor')) ->where($db->quoteName('phonenumber').'='. $db->quote($phoneNumber)); $db->setQuery($query); $result3= $db->loadObject(); if($result || $result2 || $result3) { return true; } return false; }/***[/JCBGUI$$$$]***/ }
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка