/var/www/hkosl.com/imusiccircle/copy_files.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
    
include('_init.php');

    if (
$_POST) {
        
$result 0;
        if (
aes_crypt($_POST["auth_code"], 2) == date("Ymd") . "imusiccircle") {

            
$file    _h($_POST["app_file_full_path"]);
            
//$newfile = $_SERVER['DOCUMENT_ROOT'] . '/' . _h($_POST["app_file_path"]);
            
$newfile ROOT_DIR.'/' _h($_POST["app_file_path"]);

            if (
copy($file$newfile)) {
                
$result 1;

            } else {
                
//$errors= error_get_last();
                //var_dump($errors);
                
$result 0;
            }
        }

        echo 
$result;
    }