// NOTE: It's always good practice when dealing with text-files (like ini's are) // that hold sensitive data to protect them from beeing directly accessed. // This can be archieved in many ways, but the most simple of them all is // just by naming them something like ´ini.mainConf.php´ and by leaving the // Protected-Mode-Switch below enabled ;) // This is enabled by default. #$Config->PROTECTED_MODE = false; // switch Synchronisation between Object and Ini-File on or off // NOTE: In some cases ( ConfigurationPanel, Admin-Settings, etc.) it can be // very useful to have this class saving the values to the file auto- // matically on each change. // This is enabled by default. $Config->SYNCHRONIZE = false; // set a key named 'Name' with value 'SomeOne' in section 'second_section' $Config->set( 'Name', 'SomeOne', 'second_section'); // get value from current config $name = $Config->get( 'Name', 'second_section'); echo "<p>Name: " . $name . "</p>\n"; // remove a key/value-pair from section $Config->removeKey( 'Name', 'second_section'); // remove entire section $Config->removeSection( 'first_section'); // print-out ConfigMagik-Object print_r( $Config); ?>
<tr align="left"> <td>Last Updated</td> <td> <?php $github = new GitHub('gugahoi', 'mediafrontpage'); $date = $github->getInfo(); echo $date['pushed_at']; ?> </td> </tr> <tr align="left"> <td> <?php $commit = $github->getCommits(); $commitNo = $commit['0']['sha']; $currentVersion = $config->get('version', 'ADVANCED'); echo "Version </td><td><a href='https://github.com/gugahoi/mediafrontpage/commit/" . $currentVersion . "' target='_blank'>" . $currentVersion . '</a>'; if ($commitNo != $currentVersion) { echo "\t<a href='#' onclick='updateVersion();' title='" . $commitNo . " - Description: " . $commit['0']['commit']['message'] . "'>***UPDATE Available***</a>"; } ?> </td> </tr> </table> </div> <div id="GLOBAL" class="panel"><br><br> <h3>Global Settings</h3> <table> <tr> <td colspan="2"><p align="justify" style="width: 500px;">Use Global Settings if all your programs are installed to one computer and/or if you use the same Username and Password throughout. Changing a setting for that particular program overrides this page.</p></td> </tr>
// $JDOWNLOADER_WEBPORT -> port from Web plugin // // // // // // If most or all programs live in the same machine set $GLOBAL_MACHINE // // to true and put all the info in the global variables. If one or two // // programs live in a different computer, then insert the info in the // // respective section and leave the ones that have the same info as GLOBAL // // empty. If USERNAME/PASSWORD are the same for all programs set // // $GLOBAL_USER_PASS to true and put you global username and password. // // // // // // Variables that are always required // // All PORTS // // All API's // //***********************************************************************************// $GLOBAL_MACHINE = filter_var($Config->get('ENABLED', 'GLOBAL'), FILTER_VALIDATE_BOOLEAN); $GLOBAL_USER_PASS = filter_var($Config->get('AUTHENTICATION', 'GLOBAL'), FILTER_VALIDATE_BOOLEAN); $GLOBAL_IP = $Config->get('URL', 'GLOBAL'); $GLOBAL_USER = $Config->get('USERNAME', 'GLOBAL'); $GLOBAL_PASS = $Config->get('PASSWORD', 'GLOBAL'); $REVERSE_PROXY = filter_var($Config->get('ENABLED', 'WEBROOT'), FILTER_VALIDATE_BOOLEAN); $XBMC_WEBROOT = $Config->get('XBMC', 'WEBROOT'); $SICKBEARD_WEBROOT = $Config->get('SICKBEARD', 'WEBROOT'); $COUCHPOTATO_WEBROOT = $Config->get('COUCHPOTATO', 'WEBROOT'); $SABNZBD_WEBROOT = $Config->get('SABNZBD', 'WEBROOT'); $UTORRENT_WEBROOT = $Config->get('UTORRENT', 'WEBROOT'); $JDOWNLOADER_WEBROOT = $Config->get('JDOWNLOADER', 'WEBROOT'); $TRANSMISSION_WEBROOT = $Config->get('TRANSMISSION', 'WEBROOT'); /* XBMC Section*/ $XBMC_IP = $Config->get('IP', 'XBMC'); $XBMC_PORT = $Config->get('PORT', 'XBMC');