示例#1
0
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 */
require_once '../core/init.php';
$user->checkLogin(true);
// die due to update not implimented (waiting for bunny to impliment)
header('Location: ' . HOME_URL . 'panel/notava.php');
die;
$pageTitle = $lang['vcheck'];
include CORE_DIR . '/cp_header.php';
// Set the namespace
use BT\API as Api;
// Define the class
$api = new Api\Base();
// Init
$api->init('servertool', array('cmd' => 'getVersions'));
// Execute command
$api->execute();
$data = $api->requestData;
?>
			
			<div class="row">
				<div class="col-md-8 col-md-offset-2">
					
					<h2><i class="fa fa-refresh"></i> <?php 
echo $lang['vcheck'];
?>
</h2>
					<hr />
示例#2
0
            while ($setting = $result->fetch_assoc()) {
                $settings[$setting['setting_name']] = $setting['setting_value'];
            }
            $result->free();
        } else {
            // Redirect to installation page
            header('Location: ' . HOME_URL . 'install.php');
            die('Could not fetch the settings from the database (' . $db->connect_errno . ') ' . $db->connect_error);
        }
    }
    fetchSettings();
    /**
     * INITIALZE CLASSES AND STUFF
     */
    $rc = new rcon\Base();
    $rc->ip = decrypt($settings['server_ip']);
    $rc->port = (int) decrypt($settings['server_admin_port']);
    $rc->pwd = decrypt($settings['server_rcon_password']);
    // User class
    $user = new User($db, $config);
    // Log class
    $log = new Log($db, $config);
    // BattlefieldTools API class
    $api = new Api\Base();
    $api->setUser(decrypt($settings['api_username']));
    $api->setKey(decrypt($settings['api_key']));
    // If user is logged in, then fetch the user
    if ($user->checkLogin()) {
        $userInfo = $user->fetchUser();
    }
}