[feladat @ 63]
Bugfix. The number of arguments for the function validate_input() in
record.inc.php and dns.inc.php was different, causing a variables to
be validated incorrectly.
<?require_once("inc/toolkit.inc.php");if(isset($_GET["delid"])){$db->query("DELETE FROM record_owners WHERE id='".$_GET["delid"]."'");}$xsid=(isset($_GET['id']))?$_GET['id']:$_POST['recordid'];if(!xs(recid_to_domid($xsid))){error(ERR_RECORD_ACCESS_DENIED);}if($_POST["commit"]){edit_record($_POST["recordid"],$_POST["domainid"],$_POST["name"],$_POST["type"],$_POST["content"],$_POST["ttl"],$_POST["prio"]);clean_page("edit.php?id=".$_POST["domainid"]);}elseif($_SESSION["partial_".get_domain_name_from_id($_GET["domain"])]==1){$checkPartial=$db->getOne("SELECT id FROM record_owners WHERE record_id='".$_GET["id"]."' AND user_id='".$_SESSION["userid"]."' LIMIT 1");if(empty($checkPartial)){error(ERR_RECORD_ACCESS_DENIED);}}include_once("inc/header.inc.php");?><h2><?echo_('Edit record in zone');?>"<?echoget_domain_name_from_id($_GET["domain"])?>"</h2><?$x_result=$db->query("SELECT r.id,u.fullname FROM record_owners as r, users as u WHERE r.record_id='".$_GET['id']."' AND u.id=r.user_id");if(level(10)&&($x_result->numRows()>0)){?><divid="meta"><divid="meta-left"><table><tr><th><?echo_('Sub-owners');?></td><th> </td></tr><?while($x_r=$x_result->fetchRow()){?><tr><tdclass="tdbg"><?echo$x_r["fullname"];?></td><tdclass="tdbg"><ahref="<?echo$_SERVER["PHP_SELF"];?>?id=<?echo$_GET["id"];?>&domain=<?echo$_GET["domain"];?>&delid=<?echo$x_r["id"];?>"><imgsrc="images/delete.gif"alt="trash"></a></td></tr><?}?></table></div></div><?}?><formmethod="post"action="edit_record.php"><inputtype="hidden"name="recordid"value="<?echo$_GET["id"]?>"><inputtype="hidden"name="domainid"value="<?echo$_GET["domain"]?>"><table><tr><th><?echo_('Name');?></td><th> </td><th><?echo_('Type');?></td><th><?echo_('Priority');?></td><th><?echo_('Content');?></td><th><?echo_('TTL');?></td></tr><?$rec=get_record_from_id($_GET["id"]);?><tr><td><?if($_SESSION[$_GET["domain"]."_ispartial"]==1){?><inputtype="hidden"name="name"value="<?echotrim(str_replace(get_domain_name_from_id($_GET["domain"]),'',$rec["name"]),'.')?>"class="input"><?echotrim(str_replace(get_domain_name_from_id($_GET["domain"]),'',$rec["name"]),'.')?><?}else{?><inputtype="text"name="name"value="<?echotrim(str_replace(get_domain_name_from_id($_GET["domain"]),'',$rec["name"]),'.')?>"class="input"><?}?>.<?echoget_domain_name_from_id($_GET["domain"])?></td><tdclass="n">IN</td><td><selectname="type"><?foreach(get_record_types()as$c){if($c==$rec["type"]){$add=" SELECTED";}else{$add="";}?><option<?echo$add?>value="<?echo$c?>"><?echo$c?></option><?}?></select></td><td><inputtype="text"name="prio"value="<?echo$rec["prio"]?>"class="sinput"></td><td><inputtype="text"name="content"value="<?echo$rec["content"]?>"class="input"></td><td><inputtype="text"name="ttl"value="<?echo$rec["ttl"]?>"class="sinput"></td></tr></table><p><inputtype="submit"name="commit"value="<?echo_('Commit changes');?>"class="button"> <inputtype="reset"name="reset"value="<?echo_('Reset changes');?>"class="button"></p></form><?include_once("inc/footer.inc.php");?>