<?php if (!isset($_SESSION)) { session_start(); } require "checklogin.php"; $user = $_SESSION['username']; $pass = $_SESSION['password']; $level = $_SESSION['level']; $name = $_SESSION['name']; $email = $_SESSION['email']; include "libvirt.class"; $libvirt = new libvirt(); include "login.class"; $login = new login(); if ($level != "admin") { echo "<script>location.replace(\"{$_SESSION['destination']}\")</script>"; } ?> <html> <head> <title>Admin Dashboard</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css/jquery.gritter.css" /> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript">google.load('jquery', '1.5');</script> <script type="text/javascript" src="js/jquery.gritter.min.js"></script> <script type="text/javascript" src="js/jquery-1.11.2.js"></script> <script type="text/javascript" src="js/bootstrap.min"></script> <link rel="stylesheet" type="text/css" href="css/style1.css"/>
<?php if (!isset($_SESSION)) { session_start(); } require "checklogin.php"; $user = $_SESSION['username']; $pass = $_SESSION['password']; $level = $_SESSION['level']; $name = $_SESSION['name']; $email = $_SESSION['email']; include "login.class"; include "libvirt.class"; $login = new login(); $libvirt = new libvirt(); ?> <html> <head> <title>VM Start</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css/jquery.gritter.css" /> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript">google.load('jquery', '1.5');</script> <script type="text/javascript" src="js/jquery.gritter.min.js"></script> <link rel="stylesheet" type="text/css" href="css/style1.css"/> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript" src="js/script.js"></script> </head> </head> <body id="bg">
<?php include "libvirt.class"; $libvirt = new libvirt(); $vmname = "133050024CS101"; echo $vmname; $ip = "10.129.12.26"; $conn = $libvirt->connect_libvirt_remote($ip); echo libvirt_connect_get_hostname($conn); // $output=$libvirt->domain_shutdown($vmname); // if(!$output) echo libvirt_get_last_error(); // else echo "<pre>$output</pre>"; // echo $libvirt->vncport($vmname); ?>
<?php if (!isset($_SESSION)) { session_start(); } require "checklogin.php"; $user = $_SESSION['username']; $pass = $_SESSION['password']; $level = $_SESSION['level']; $name = $_SESSION['name']; $email = $_SESSION['email']; include "login.class"; include "libvirt.class"; $login = new login(); $libvirt = new libvirt(); if ($level != "admin") { echo "<script>location.replace(\"login.php\")</script><br>"; } ?> <html> <head> <title>Delete Course</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css/jquery.gritter.css" /> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript">google.load('jquery', '1.5');</script> <script type="text/javascript" src="js/jquery.gritter.min.js"></script> <link rel="stylesheet" type="text/css" href="css/style1.css"/> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript" src="js/script.js"></script> </head>
<?php if (!isset($_SESSION)) { session_start(); } require "checklogin.php"; $user = $_SESSION['username']; $pass = $_SESSION['password']; $level = $_SESSION['level']; $name = $_SESSION['name']; $email = $_SESSION['email']; include "login.class"; $login = new login(); include "libvirt.class"; $libvirt = new libvirt(); function read_file($filename) { ini_set("auto_detect_line_endings", true); $handle = fopen("{$filename}", "r"); if ($handle) { while (($line = fgets($handle)) !== false) { echo $line . "<br>"; } fclose($handle); } else { echo "Unable to open the file" . PHP_EOL; } } //if(($level!="fac") // echo "<script>location.replace(\"$_SESSION[destination]\")</script>";fac ?>