Replace $_CVM with more generic $_APP.

feature/node-rewrite
Sven Slootweg 12 years ago
parent 1b2b2b7600
commit e3da8b66a5

@ -11,7 +11,7 @@
* licensing text.
*/
$_CVM = true;
$_APP = true;
require("includes/include.base.php");
$return_object = array();

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$router->uVariables['display_menu'] = true;

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$public_token = $_SERVER['HTTP_API_PUBLIC_TOKEN'];
$private_token = $_SERVER['HTTP_API_PRIVATE_TOKEN'];

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$router->uVariables['display_menu'] = true;

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
class ApiKey extends CPHPDatabaseRecordClass
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
define("IP_TYPE_NONE", 0);
define("IP_TYPE_IPV4", 4);

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
class Node extends CPHPDatabaseRecordClass
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
class SshConnector extends CPHPBaseClass
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
class Template extends CPHPDatabaseRecordClass
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
class User extends CPHPDatabaseRecordClass
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
class Vps extends CPHPDatabaseRecordClass
{

@ -11,7 +11,7 @@
* licensing text.
*/
$_CVM = true;
$_APP = true;
require("includes/include.base.php");
if($result = $database->CachedQuery("SELECT * FROM containers"))

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$_CPHP_CONFIG = "../config.json";
$_CPHP = true;
@ -24,7 +24,7 @@ require("include.misc.php");
function __autoload($class_name)
{
global $_CVM;
global $_APP;
if(strpos($class_name, "\\") !== false)
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
define("CVM_VIRTUALIZATION_OPENVZ", 1 );

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
// SshConnector-related exceptions
class SshException extends Exception {}

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
function check_fields($source, $fields, &$errors)
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
function split_whitespace($input)
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$sErrors = array();

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$sNodeList = array();

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
try
{

@ -11,6 +11,6 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$sPageContents = Templater::AdvancedParse("{$sTheme}/admin/overview/index", $locale->strings, array());

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$result = $database->CachedQuery("SELECT * FROM users ORDER BY `AccessLevel` DESC");

@ -13,7 +13,7 @@
/* TODO: Add "create VPS" button. */
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
try
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$sErrors = array();

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$sVpsList = array();

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
try
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
if($result = $database->CachedQuery("SELECT * FROM containers WHERE `UserId` = :UserId", array(':UserId' => $sApiKey->sUser->sId)))
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
try
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
if($sVps->sCurrentStatus != CVM_STATUS_STARTED)
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
if($sVps->sCurrentStatus != CVM_STATUS_STOPPED)
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$sPageContents .= Templater::AdvancedParse("{$sTheme}/client/vps/console", $locale->strings, array(
'host' => htmlspecialchars($_SERVER['SERVER_NAME']),

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
if($sLoggedIn === true)
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
if(!empty($router->uVariables['action']))
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$display_form = true;

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
$display_form = true;

@ -11,6 +11,6 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
throw new UnauthorizedException("You are not allowed to access this page.");

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
if($sLoggedIn === true)
{

@ -11,7 +11,7 @@
* licensing text.
*/
if(!isset($_CVM)) { die("Unauthorized."); }
if(!isset($_APP)) { die("Unauthorized."); }
if($sLoggedIn === true)
{

@ -13,7 +13,7 @@
$timing_start = microtime(true);
$_CVM = true;
$_APP = true;
require("includes/include.base.php");
$sTheme = "default";

Loading…
Cancel
Save