require_once 'Update.class.php'; if (file_exists('Settings.class.php')) { require_once 'Settings.class.php'; } // XAJAX Framework part include_once "Ajax.class.php"; $gSetupObj = new Setup(); $gSetupObj->configOutDated(); $gUpdateObj = new Update(!$gSetupObj->configOutDated()); if (!$gSetupObj->configOutDated()) { if (Settings::isPrivate()) { $lUser = ''; $lPassword = ''; if (getMobileOption('user') != '' && getMobileOption('pass') != '') { $lUser = $_SERVER["PHP_AUTH_USER"] = getMobileOption('user'); $lPassword = $_SERVER["PHP_AUTH_PW"] = getMobileOption('pass'); $_SERVER['HTTP_AUTHORIZATION'] = 'Basic ' . base64_encode($lUser . ':' . $lPassword); } if (isset($_SERVER["PHP_AUTH_USER"]) && isset($_SERVER["PHP_AUTH_PW"])) { $lUser = $_SERVER["PHP_AUTH_USER"]; $lPassword = $_SERVER["PHP_AUTH_PW"]; } elseif (isset($_SERVER['HTTP_AUTHORIZATION'])) { list($lUser, $lPassword) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); } if ($lUser != Settings::getPrivateModusUsername() || $lPassword != Settings::getPrivateModusPassword()) { header("WWW-Authenticate: Basic realm=\"Enter username and password to proceed\""); header("HTTP/1.0 401 Unauthorized"); echo "<h1>Authentication failed</h1>Dreambox ReStream is running in private modus."; exit; } }
function getAutoLoadEPG() { return getMobileOption("epg") == 1; }
if (!$lAutoLoadEPG) { echo 'selected'; } ?> >Off</option> <option value="on" <?php if ($lAutoLoadEPG) { echo 'selected'; } ?> >On</option> </select> </div> <label for="purge">Purge cache data<label> <button type="button" data-icon="check" onclick="location.href='/?cachepurge=1'">Purge</button><br /> <label for="un" >Private modus username:</label> <input name="user" id="un" value="<?php echo getMobileOption('user'); ?> " placeholder="username" type="text"> <label for="pw" >Private modus password:</label> <input name="pass" id="pw" value="<?php echo getMobileOption('pass'); ?> " placeholder="password" type="password"> <button type="submit" data-icon="check">Save</button> </form> </div> </div> </body> </html>