$s['UPLOAD_MAX_FILESIZE'] = ini_get('upload_max_filesize'); $s['POST_MAX_SIZE'] = ini_get('post_max_size'); $s['ALLOW_URL_FOPEN'] = ini_get('allow_url_fopen') == 1 ? 'true' : 'false'; unset($s['token']); echo json_encode($s); } if ($token == $setting['token']) { switch ($option) { // auto config remote case 'autoconfremote': auto_conf_remote($_POST); break; // generate banner // generate banner case 'generatebanner': create_banner($lang, 'banner.jpg', $setting['banner']); break; // get hash // get hash case 'showhash': $hash_sql = 'SELECT * FROM hash'; $hash_res = mysql_q($hash_sql); $hash = mysql_fetch_assoc($hash_res); echo json_encode($hash); break; // update hash // update hash case 'updatehash': foreach ($_POST as $table => $hash) { $update_sql = 'UPDATE `hash` SET ' . $table . ' = "' . $hash . '"'; }
$hide = 0; } if ($option == 'hidemovie' or $option == 'visiblemovie') { $table = 'movies'; } else { $table = 'tvshows'; } connect($mysql_ml); $hide_sql = 'UPDATE `' . $table . '` SET hide = ' . $hide . ' WHERE id = "' . $id . '"'; mysql_q($hide_sql); } // banner if ($option == 'banner') { // admin permission if (!isset($_SESSION['logged_admin']) or $_SESSION['logged_admin'] !== true) { die('no permission'); } include 'function.php'; connect($mysql_ml); $setting = get_settings(); include 'lang/' . $setting['language'] . '/lang.php'; $b = create_banner($lang, 'banner_v.jpg', $_GET['banner']); } // fanart exist if ($option == 'fexist') { if (file_exists('cache/' . $_GET['id'] . '_f.jpg')) { echo '{"fexist": "exist"}'; } else { echo '{"fexist": "notexist"}'; } }