diff -r 7be4525290cc -r 2ff220cfde13 edit.php --- a/edit.php Sun Apr 22 16:27:45 2007 +0000 +++ b/edit.php Mon Jun 04 18:43:11 2007 +0000 @@ -1,279 +1,326 @@ trancer nl> | -// | Sjeemz sjeemz nl> | -// +--------------------------------------------------------------------+ - -// -// $Id: edit.php,v 1.12 2003/05/10 20:10:47 azurazu Exp $ -// - require_once("inc/toolkit.inc.php"); // Assigning records to user: Check for records owned by user if (isset($_POST["action"]) && $_POST["action"]=="record-user") { - foreach ($_POST["rowid"] as $x_user => $x_value){ - $x_userid = $db->getOne("SELECT id FROM record_owners WHERE user_id = '".$_POST["userid"]."' AND record_id='".$x_value."'"); - if (empty($x_userid)) { - $db->query("INSERT INTO record_owners SET user_id = '".$_POST["userid"]."',record_id='".$x_value."'"); - } - } + foreach ($_POST["rowid"] as $x_user => $x_value){ + $x_userid = $db->queryOne("SELECT id FROM record_owners WHERE user_id = '".$_POST["userid"]."' AND record_id='".$x_value."'"); + if (empty($x_userid)) { + $db->query("INSERT INTO record_owners SET user_id = '".$_POST["userid"]."',record_id='".$x_value."'"); + } + } } - -$server_types = array("MASTER", "SLAVE", "NATIVE"); - +if(isset($_POST['change_slave_master']) && is_numeric($_POST["domain"]) && level(5)) +{ + change_domain_slave_master($_POST['domain'], $_POST['slave_master']); +} if(isset($_POST['type_change']) && in_array($_POST['newtype'], $server_types)) { - change_domain_type($_POST['newtype'], $_GET['id']); + change_domain_type($_POST['newtype'], $_GET['id']); } if(isset($_POST["newowner"]) && is_numeric($_POST["domain"]) && is_numeric($_POST["newowner"])) { add_owner($_POST["domain"], $_POST["newowner"]); } - if(isset($_POST["del_user"]) && is_numeric($_POST["del_user"]) && level(5)) { delete_owner($_GET["id"], $_POST["del_user"]); } - +$info = get_domain_info_from_id($_GET["id"]); include_once("inc/header.inc.php"); + +if (level(5)) +{ + if(!isset($info["ownerid"])) + { + ?> +
:
+ -

""

+
+ +

""

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + "> + +
+ "> + + + +
+
+ + -

- +
+ + + + + + "> + + + + + + + + + + + + "> + + + + + + - -
+ + + +
+ +
+ + + +
- - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ -
- - - - - - - - - - - - -
- : - "> - - - -
 
- : -
- - - "> - -
 
:
: - - - -
-
- - >> - -

: - + '" value="">   + + '" value=""> + +
+
- -

- -
?id=" method="post"> - - - + + ?id=" method="post"> + +
- - - " . _('Sub-owners') . ""; } ?> - - - - - - - - - - + +" . _('Sub-owners') . ""; + } +?> + + + + + + + + + + - - - - +query("SELECT r.user_id,u.username,u.fullname FROM record_owners as r, users as u WHERE r.record_id='".$r['id']."' AND u.id=r.user_id"); + echo ""; +?> + + + + + + + + + + + + - - - - - -
 
- ">[ <? echo _('Edit record'); ?> ] - ">[ <? echo _('Delete record'); ?> ] - - - - - +?> +
 
+ + ">[ <? echo _('Edit record'); ?> ] + ">[ <? echo _('Delete record'); ?> ] query("SELECT r.user_id,u.username FROM record_owners as r, users as u WHERE r.record_id='".$r['id']."' AND u.id=r.user_id"); -echo ""; + } + } + if(level(10) && $domain_type != "SLAVE") + { +?> + + +
- - -
- -arrow - - - -
- - -

- - -'" VALUE=""> + + +
+ + + -  '" VALUE=""> + arrow + + + +