edit.php
changeset 56 6db9adfa86ac
parent 55 a885f557678f
child 65 ce1c4d5e1576
equal deleted inserted replaced
55:a885f557678f 56:6db9adfa86ac
    25 $recordOwnerError = '';
    25 $recordOwnerError = '';
    26 if (isset($_POST["action"]) && $_POST["action"]=="record-user") {
    26 if (isset($_POST["action"]) && $_POST["action"]=="record-user") {
    27 	if (!is_array($_POST['rowid'])) {
    27 	if (!is_array($_POST['rowid'])) {
    28 		$recordOwnerError = 'No records where selected to assign an sub-owner.';
    28 		$recordOwnerError = 'No records where selected to assign an sub-owner.';
    29 	} else {
    29 	} else {
    30 		foreach ($_POST["rowid"] as $x_user => $x_value){
    30 		foreach ($_POST["rowid"] as $x_user => $recordid){
    31 			$x_userid = $db->queryOne("SELECT id FROM record_owners WHERE user_id = '".$_POST["userid"]."' AND record_id='".$x_value."'");
    31 			$x_userid = $db->queryOne("SELECT id FROM record_owners WHERE user_id = '".$_POST["userid"]."' AND record_id='".$recordid."'");
    32 			if (empty($x_userid)) {
    32 			if (empty($x_userid)) {
    33 				$db->query("INSERT INTO record_owners (user_id, record_id) VALUES ('".$_POST["userid"]."','".$x_value."')");
    33 				add_record_owner($_GET["id"],$_POST["userid"],$recordid);
    34 			}
    34 			}
    35 		}
    35 		}
    36 	}
    36 	}
    37 }
    37 }
    38 if(isset($_POST['change_slave_master']) && is_numeric($_POST["domain"]) && level(5))
    38 if(isset($_POST['change_slave_master']) && is_numeric($_POST["domain"]) && level(5))