| @@ 318-325 (lines=8) @@ | ||
| 315 | ||
| 316 | // prepare config file |
|
| 317 | $tp_config_file = "../includes/config/tp.config.php"; |
|
| 318 | if (file_exists($tp_config_file)) { |
|
| 319 | if (!copy($tp_config_file, $tp_config_file.'.'.date("Y_m_d", mktime(0, 0, 0, date('m'), date('d'), date('y'))))) { |
|
| 320 | echo '[{"error" : "includes/config/tp.config.php file already exists and cannot be renamed. Please do it by yourself and click on button Launch.", "result":"", "index" : "'.$_POST['index'].'", "multiple" : "'.$_POST['multiple'].'"}]'; |
|
| 321 | break; |
|
| 322 | } else { |
|
| 323 | unlink($tp_config_file); |
|
| 324 | } |
|
| 325 | } |
|
| 326 | $fh = fopen($tp_config_file, 'w'); |
|
| 327 | $config_text = "<?php |
|
| 328 | global \$SETTINGS; |
|
| @@ 1010-1017 (lines=8) @@ | ||
| 1007 | } |
|
| 1008 | } elseif ($task === "sk.php") { |
|
| 1009 | //Create sk.php file |
|
| 1010 | if (file_exists($skFile)) { |
|
| 1011 | if (!copy($skFile, $skFile.'.'.date("Y_m_d", mktime(0, 0, 0, date('m'), date('d'), date('y'))))) { |
|
| 1012 | echo '[{"error" : "sk.php file already exists and cannot be renamed. Please do it by yourself and click on button Launch.", "result":"", "index" : "'.$_POST['index'].'", "multiple" : "'.$_POST['multiple'].'"}]'; |
|
| 1013 | break; |
|
| 1014 | } else { |
|
| 1015 | unlink($skFile); |
|
| 1016 | } |
|
| 1017 | } |
|
| 1018 | $fh = fopen($skFile, 'w'); |
|
| 1019 | ||
| 1020 | $result = fwrite( |
|
| @@ 660-667 (lines=8) @@ | ||
| 657 | * Introduce new CONFIG file |
|
| 658 | */ |
|
| 659 | $tp_config_file = "../includes/config/tp.config.php"; |
|
| 660 | if (file_exists($tp_config_file)) { |
|
| 661 | if (!copy($tp_config_file, $tp_config_file.'.'.date("Y_m_d", mktime(0, 0, 0, date('m'), date('d'), date('y'))))) { |
|
| 662 | echo '[{"error" : "includes/config/tp.config.php file already exists and cannot be renamed. Please do it by yourself and click on button Launch.", "result":"", "index" : "'.$_POST['index'].'", "multiple" : "'.$_POST['multiple'].'"}]'; |
|
| 663 | return false; |
|
| 664 | } else { |
|
| 665 | unlink($tp_config_file); |
|
| 666 | } |
|
| 667 | } |
|
| 668 | $fh = fopen($tp_config_file, 'w'); |
|
| 669 | $config_text = "<?php |
|
| 670 | global \$SETTINGS; |
|