function __construct($group_id = "", $region_id = "") { parent::__construct($group_id, $region_id); if (!$this->menus['dashboard']['link']) { $this->menus['dashboard']['link'] = "/"; $this->menus['dashboard']['name'] = "Dashboard"; } if (!$this->menus['regions']['link']) { $this->menus['regions']['link'] = "/?page=regions"; $this->menus['regions']['name'] = "Regions"; $this->menus['regions']['sub'][] = array("link" => "?page=regions", "name" => "View All"); $this->menus['regions']['sub'][] = array("name" => "-"); $regions = $this->region()->getAllRegions(); foreach ($regions as $key => $region) { $this->menus['regions']['sub'][] = array("link" => "?page=region&id=" . $key, "name" => $region['name']); } } if (!$this->menus['groups']['link']) { $this->menus['groups']['link'] = "/?page=groups"; $this->menus['groups']['name'] = "Groups"; $this->menus['groups']['sub'][] = array("link" => "?page=groups", "name" => "View All"); $this->menus['groups']['sub'][] = array("name" => "-"); $groups = $this->group()->getAllGroups(); foreach ($groups as $key => $group) { $this->menus['groups']['sub'][] = array("link" => "?page=group&id=" . $key, "name" => $group['name']); } } if (!$this->menus['modules']['link']) { $this->menus['modules']['link'] = "/?page=modules"; $this->menus['modules']['name'] = "Modules"; } }
function __construct($group_id = "", $region_id = "") { parent::__construct($group_id, $region_id); $this->credentials = new Credentials($this->config['aws_access_key_id'], $this->config['aws_secret_access_key']); $region = $this->region()->getRegion(); $this->AWS = Aws::factory(array('credentials' => $this->credentials, 'region' => $region['id'])); }
<?php session_start(); if ($_REQUEST['logout']) { unset($_SESSION['admin']); } if ($_SESSION['admin'] == "") { die; } include "../lib/CloudMngr/cloudmngr.core.class.php"; $CloudMngr = new CloudMngr($_GET['id']); $module = $_POST['module']; //{TODO input filertering $action = $_POST['action']; if ($module != "") { $mod = $CloudMngr->module($_POST['module']); $mod->getModulePage("cmd" . DIRECTORY_SEPARATOR . $action); }
function __construct($group_id = "", $region_id = "") { parent::__construct($group_id, $region_id); }
<?php include "../lib/CloudMngr/cloudmngr.core.class.php"; $CloudMngr = new CloudMngr(); session_start(); if ($_REQUEST['logout']) { unset($_SESSION['admin']); } if ($_POST['login_email'] == "markw" && $_POST['login_pass'] == "chang") { $_SESSION['admin'] = "markw"; } if ($_SESSION['admin'] == "") { $page = "login"; } elseif ($_GET['page']) { $page = $_GET['page']; } else { $page = "main"; } ?> <!DOCTYPE html> <html> <head> <title>CloudMngr Control Panel</title> <!-- Bootstrap --> <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> <link href="bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen"> <link href="assets/styles.css" rel="stylesheet" media="screen"> <link href="vendors/easypiechart/jquery.easy-pie-chart.css" rel="stylesheet" media="screen"> <link href="styles.css" rel="stylesheet" media="screen"> <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]>