mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6485 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
		
			
				
	
	
		
			35 lines
		
	
	
		
			580 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			580 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Main xCAT page
 | |
|  */
 | |
| require_once "lib/functions.php";
 | |
| require_once "lib/ui.php";
 | |
| require_once "lib/jsonwrapper.php";
 | |
| 
 | |
| /* Load page */
 | |
| loadPage();
 | |
| 
 | |
| /* Login user */
 | |
| if (!isAuthenticated()) {
 | |
| 	login();
 | |
| } else {
 | |
| 	loadContent();
 | |
| }
 | |
| 
 | |
| /**
 | |
|  * Test lib/cmd.php
 | |
|  */
 | |
| function testCmdPhp() {
 | |
| 	$xml = docmd('lsdef', NULL, array('all'));
 | |
| 	$rsp = array();
 | |
| 
 | |
| 	foreach ($xml->children() as $child) {
 | |
| 		foreach ($child->children() as $data) {
 | |
| 			array_push($rsp, "$data");
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 	$rtn = array("rsp" => $rsp, "msg" => '');
 | |
| 	echo json_encode($rtn);
 | |
| }
 | |
| ?>
 |