Subversion-Projekte lars-tiefland.openvz_admin

Revision

Revision 125 | Revision 127 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 125 Revision 126
Zeile 1... Zeile 1...
1
<?php
1
<?php
2
	//$Id: load.php 125 2008-05-22 14:59:39Z lars $
2
	//$Id: load.php 126 2008-05-22 15:12:58Z lars $
3
	/**
3
	/**
4
	 * 	@package	openvz_admin
4
	 * 	@package	openvz_admin
5
	 * 	@author		Lars Tiefland <ltiefland@gmail.com> 
5
	 * 	@author		Lars Tiefland <ltiefland@gmail.com> 
6
	 **/
6
	 **/
7
	require ("include/common.php");
7
	require ("include/common.php");
Zeile 12... Zeile 12...
12
	{
12
	{
13
		$configs = load_configs($hn_id, $hn_name);
13
		$configs = load_configs($hn_id, $hn_name);
14
		foreach ($configs as $conf_id => $config)
14
		foreach ($configs as $conf_id => $config)
15
		{
15
		{
16
			$cfg = read_config($hn_id, $hn_name, $config);
16
			$cfg = read_config($hn_id, $hn_name, $config);
17
			update_db($cfg);
17
			update_db($hn_id, $cfg);
18
		}
18
		}
19
	}
19
	}
Zeile 20... Zeile 20...
20
 
20
 
21
	function load_configs($hn_id, $hn_name)
21
	function load_configs($hn_id, $hn_name)
Zeile 57... Zeile 57...
57
					else
57
					else
58
					{
58
					{
59
						$sql = "INSERT INTO distributions (dist_name, dist_template) VALUES('" . $config["DISTRIBUTION"] .
59
						$sql = "INSERT INTO distributions (dist_name, dist_template) VALUES('" . $config["DISTRIBUTION"] .
60
							"', '" . $config["OSTEMPLATE"] . "')";
60
							"', '" . $config["OSTEMPLATE"] . "')";
61
						$res = $db->query($sql);
61
						$res = $db->query($sql);
62
						$dist_id = $res->lastinsertID();
62
						$dist_id = $db->lastinsertID();
63
					}
63
					}
64
				}
64
				}
65
				else
65
				else
66
				{
66
				{
67
					die($res->getUserInfo());
67
					die($res->getUserInfo());