Exemple #1
0
include_once "classes/API/RutrackerAPI.php";
include_once "classes/API/RutorAPI.php";
include "ConfigReader.php";
include_once "classes/Utils.php";
$c = new ConfigReader();
$config = $c->getConfig();
$rt = new RutrackerAPI();
$rt->parse_user_params();
$flist = $rt->getFutureList();
$response = false;
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $c->save_param('rutracker', 'username', $_POST['rutracker-username'], false);
    $c->save_param('rutracker', 'password', $_POST['rutracker-password'], false);
    $c->save_param('search-in', 'rutracker', isset($_POST['search-in-rutracker']), false);
    $c->save_param('search-in', 'rutor', isset($_POST['search-in-rutor']), false);
    $response = $c->save_config_to_file();
    $config = $c->getConfig();
}
?>


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Rtracker - Config page</title>

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">