edit.php
author rejo
Sun, 22 Apr 2007 14:07:04 +0000
changeset 10 68d13494519e
parent 5 ebf8868e99f5
child 13 2ff220cfde13
permissions -rw-r--r--
[feladat @ 24] Fixed small typo.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     1
<?php
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     2
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     3
// +--------------------------------------------------------------------+
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     4
// | PowerAdmin								|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     5
// +--------------------------------------------------------------------+
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     6
// | Copyright (c) 1997-2002 The PowerAdmin Team			|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     7
// +--------------------------------------------------------------------+
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     8
// | This source file is subject to the license carried by the overal	|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
     9
// | program PowerAdmin as found on http://poweradmin.sf.net		|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    10
// | The PowerAdmin program falls under the QPL License:		|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    11
// | http://www.trolltech.com/developer/licensing/qpl.html		|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    12
// +--------------------------------------------------------------------+
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    13
// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl>	|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    14
// |          Sjeemz <sjeemz <AT> sjeemz <DOT> nl>			|
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    15
// +--------------------------------------------------------------------+
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    16
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    17
//
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    18
// $Id: edit.php,v 1.12 2003/05/10 20:10:47 azurazu Exp $
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    19
//
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    20
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    21
require_once("inc/toolkit.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    22
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    23
// Assigning records to user: Check for records owned by user
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    24
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    25
if (isset($_POST["action"]) && $_POST["action"]=="record-user") {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    26
   foreach ($_POST["rowid"] as $x_user => $x_value){
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    27
      $x_userid = $db->getOne("SELECT id FROM record_owners WHERE user_id = '".$_POST["userid"]."' AND record_id='".$x_value."'");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    28
      if (empty($x_userid)) {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    29
         $db->query("INSERT INTO record_owners SET user_id = '".$_POST["userid"]."',record_id='".$x_value."'");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    30
      }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    31
   }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    32
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    33
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    34
$server_types = array("MASTER", "SLAVE", "NATIVE");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    35
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    36
if(isset($_POST['type_change']) && in_array($_POST['newtype'], $server_types))
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    37
{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    38
    change_domain_type($_POST['newtype'], $_GET['id']);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    39
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    40
if(isset($_POST["newowner"]) && is_numeric($_POST["domain"]) && is_numeric($_POST["newowner"]))
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    41
{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    42
	add_owner($_POST["domain"], $_POST["newowner"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    43
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    44
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    45
if(isset($_POST["del_user"]) && is_numeric($_POST["del_user"]) && level(5))
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    46
{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    47
	delete_owner($_GET["id"], $_POST["del_user"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    48
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    49
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    50
include_once("inc/header.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    51
?>
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
    52
<H2><? echo _('Edit domain'); ?> "<?= get_domain_name_from_id($_GET["id"]) ?>"</H2>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    53
<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    54
$info = get_domain_info_from_id($_GET["id"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    55
if(!isset($info["ownerid"]))
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    56
{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    57
	?>
3
64525a2eb098 [feladat @ 4]
rejo
parents: 2
diff changeset
    58
	<P CLASS="warning"><? echo _('This domain isn\'t owned by anyone yet, please assign someone.'); ?></P>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    59
	<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    60
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    61
?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    62
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    63
<TABLE class="text" cellspacing="0" style="width: 280px">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    64
<? if (level(5)) 
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    65
{ ?>	
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    66
	<TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    67
		<FORM METHOD="post" ACTION="edit.php?id=<?=$_GET['id']?>">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    68
		<TD CLASS="none" VALIGN="middle" style="width: 250px;">
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
    69
			<B><? echo _('Add an owner'); ?>:</B>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    70
			<INPUT TYPE="hidden" NAME="domain" VALUE="<?= $_GET["id"] ?>">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    71
			<SELECT NAME="newowner">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    72
			<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    73
			$users = show_users();
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    74
			foreach ($users as $u)
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    75
			{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    76
				unset($add);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    77
				if ($u["id"] == $info["ownerid"])
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    78
				{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    79
					$add = " SELECTED";
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    80
				}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    81
				?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    82
				<OPTION<?= $add ?> VALUE="<?= $u["id"] ?>"><?= $u["fullname"] ?></OPTION><?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    83
			}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    84
			?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    85
			</SELECT>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    86
		</TD>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    87
		<TD CLASS="none" VALIGN="middle"  align="right">
3
64525a2eb098 [feladat @ 4]
rejo
parents: 2
diff changeset
    88
			<INPUT TYPE="submit" CLASS="sbutton" NAME="co" VALUE="<? echo _('Add'); ?>">
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    89
		</TD>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    90
		</FORM>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    91
	</TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    92
	<TR>
3
64525a2eb098 [feladat @ 4]
rejo
parents: 2
diff changeset
    93
		<TD CLASS="text" COLSPAN="2">&nbsp;</TD>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    94
	</TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    95
<? 
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    96
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    97
if(isset($info["ownerid"]))
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    98
{?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
    99
	<TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   100
		<TD CLASS="text" ALIGN="left" COLSPAN="2" style="width:150px;">
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   101
			<B><? echo _('Current listed owners'); ?>:</B>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   102
		</TD>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   103
	</TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   104
	<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   105
	$userRes = get_users_from_domain_id($_GET["id"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   106
	foreach($userRes as $user)
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   107
	{ ?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   108
		<TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   109
			<FORM METHOD="post" ACTION="edit.php?id=<?=$_GET['id']?>">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   110
			<TD CLASS="text" ALIGN="left" style="width:150px;">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   111
				<?=$user["fullname"]?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   112
			</TD>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   113
			<TD CLASS="text" align="right">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   114
				<INPUT TYPE="hidden" NAME="del_user" VALUE="<?=$user["id"]?>">
3
64525a2eb098 [feladat @ 4]
rejo
parents: 2
diff changeset
   115
				<INPUT TYPE="submit" CLASS="sbutton" NAME="co" VALUE="<? echo _('Delete'); ?>">
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   116
			</TD>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   117
			</FORM>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   118
		</TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   119
	<? }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   120
}} ?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   121
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   122
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   123
<? if(level(5) && $MASTER_SLAVE_FUNCTIONS)
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   124
{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   125
    $domain_type=get_domain_type($_GET['id']);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   126
    // Let the user change the domain type.
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   127
?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   128
        <TR>
5
ebf8868e99f5 [feladat @ 6]
rejo
parents: 3
diff changeset
   129
            <TD CLASS="text" COLSPAN="2">&nbsp;</TD>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   130
        </TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   131
		<TR>
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   132
			<TD CLASS="text" COLSPAN="2"><B><? echo _('Type of this domain'); ?>: </B><?=$domain_type?></TD>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   133
		</TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   134
		<FORM ACTION="<?=$_SERVER['PHP_SELF']?>?&amp;id=<?=$_GET['id']?>" METHOD="post">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   135
		<TR>
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   136
            <TD CLASS="text"><B><? echo _('Change type'); ?>: </B>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   137
                <SELECT NAME="newtype">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   138
                <?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   139
                foreach($server_types as $s)
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   140
                {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   141
                    unset($add);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   142
				    if ($s == $domain_type)
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   143
				    {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   144
					   $add = " SELECTED";
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   145
				    }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   146
                    ?><OPTION<?=$add ?> VALUE="<?=$s?>"><?=$s?></OPTION><?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   147
                }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   148
                ?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   149
                </SELECT>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   150
            </TD>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   151
            <TD CLASS="text">
3
64525a2eb098 [feladat @ 4]
rejo
parents: 2
diff changeset
   152
                <INPUT TYPE="submit" CLASS="sbutton" NAME="type_change" VALUE="<? echo _('Change'); ?>">
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   153
            </TD>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   154
        </TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   155
        </FORM>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   156
<? } ?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   157
</TABLE>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   158
<br />
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   159
<FONT CLASS="nav">
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   160
<A HREF="index.php"><? echo _('DNS Admin'); ?></A> &gt;&gt; <?= get_domain_name_from_id($_GET["id"]) ?>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   161
</FONT>
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   162
<br /><br /><small><b><? echo _('Number of records'); ?>:</b> <?= $info["numrec"] ?>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   163
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   164
<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   165
show_pages($info["numrec"],ROWAMOUNT,$_GET["id"]);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   166
?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   167
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   168
<br /><br />
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   169
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   170
<form action="<?=$_SERVER["PHP_SELF"]?>?id=<?=$_GET["id"]?>" method="post">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   171
<input type="hidden" name="action" value="record-user" />
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   172
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   173
<TABLE BORDER="0" CELLSPACING="4">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   174
<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   175
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   176
$countinput=0;
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   177
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   178
$rec_result = get_records_from_domain_id($_GET["id"],ROWSTART,ROWAMOUNT);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   179
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   180
if($rec_result != -1)
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   181
{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   182
	?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   183
	<TR STYLE="font-weight: Bold;">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   184
	<TD CLASS="tdbg">&nbsp;</TD>
3
64525a2eb098 [feladat @ 4]
rejo
parents: 2
diff changeset
   185
	<? if (level(10)) { echo "<TD CLASS=\"tdbg\">" . _('Sub-owners') . "</TD>"; } ?>
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   186
	<TD CLASS="tdbg"><? echo _('Name'); ?></TD>
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   187
	<TD CLASS="tdbg"><? echo _('Type'); ?></TD>
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   188
	<TD CLASS="tdbg"><? echo _('Content'); ?></TD>
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   189
	<TD CLASS="tdbg"><? echo _('Priority'); ?></TD>
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   190
	<TD CLASS="tdbg"><? echo _('TTL'); ?></TD>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   191
	</TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   192
	<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   193
	$recs = sort_zone($rec_result);
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   194
	foreach($recs as $r)
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   195
	{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   196
	        ?><TR><TD CLASS="tdbg"><?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   197
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   198
	        if(level(5) || (!($r["type"] == "SOA" && !$GLOBALS["ALLOW_SOA_EDIT"]) && !($r["type"] == "NS" && !$GLOBALS["ALLOW_NS_EDIT"])))
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   199
	        {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   200
                // get_name_from_record_id($r["id"]) != get_domain_name_from_id(recid_to_domid($r["id"])) <-- hmm..
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   201
                ?>
3
64525a2eb098 [feladat @ 4]
rejo
parents: 2
diff changeset
   202
	            <A HREF="edit_record.php?id=<?= $r['id'] ?>&amp;domain=<?= $_GET["id"] ?>"><IMG SRC="images/edit.gif" ALT="[ <? echo _('Edit record'); ?> ]" BORDER="0"></A>
64525a2eb098 [feladat @ 4]
rejo
parents: 2
diff changeset
   203
	            <A HREF="delete_record.php?id=<?= $r['id'] ?>&amp;domain=<?= $_GET["id"] ?>"><IMG SRC="images/delete.gif" ALT="[ <? echo _('Delete record'); ?> ]" BORDER="0"></A>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   204
	            <?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   205
	        }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   206
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   207
if(level(10)) { ?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   208
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   209
<input type="checkbox" name="rowid[<?=$countinput++?>]" value="<?=$r['id']?>" />
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   210
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   211
<? }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   212
		
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   213
	        ?></TD>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   214
		
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   215
<? if (level(10)) { ?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   216
		<TD STYLE="border: 1px solid #000;width:120px">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   217
<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   218
$x_result = $db->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");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   219
echo "<select style=\"width:120px;font-size:9px\">";
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   220
while ($x_r = $x_result->fetchRow()) {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   221
   echo "<option>".$x_r["username"]."</option>";
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   222
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   223
echo "</select>";
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   224
?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   225
		</TD>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   226
<? } ?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   227
		<TD STYLE="border: 1px solid #000000;"><?= $r['name'] ?></TD><TD STYLE="border: 1px solid #000000;"><?= $r['type'] ?></TD><TD STYLE="border: 1px solid #000000;"><?= $r['content'] ?></TD><?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   228
	        if ($r['prio'] != 0) {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   229
	                ?><TD STYLE="border: 1px solid #000000;"><?= $r['prio']; ?></TD><?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   230
	        } else {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   231
	                ?><TD CLASS="tdbg"></TD><?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   232
	        }
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   233
	        ?><TD STYLE="border: 1px solid #000000;"><?= $r['ttl'] ?></TD></TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   234
	        <?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   235
	}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   236
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   237
else
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   238
{
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   239
	?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   240
	<TR>
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   241
	<TD CLASS="tdbg"><DIV CLASS="warning"><? echo _('No records for this domain.'); ?></DIV></TD>
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   242
	</TR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   243
	<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   244
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   245
?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   246
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   247
</TABLE>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   248
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   249
<? if (level(10)) { ?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   250
<br>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   251
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   252
<img src="images/arrow.png" alt="arrow" style="margin-left:47px"/>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   253
<select name="userid">
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   254
<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   255
$users = show_users();
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   256
foreach ($users as $user) {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   257
	echo "<option value=\"".$user[id]."\">".$user[fullname]."</option>";
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   258
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   259
?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   260
</select>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   261
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   262
<input type="submit" class="button" value="<? echo _('Assign to user'); ?>">
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   263
</form>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   264
<? } ?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   265
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   266
<BR><BR>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   267
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   268
<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   269
if ($_SESSION[$_GET["id"]."_ispartial"] != 1)  {
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   270
?>
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   271
<INPUT TYPE="button" CLASS="button" OnClick="location.href='add_record.php?id=<?= $_GET["id"] ?>'" VALUE="<? echo _('Add record'); ?>">
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   272
<?
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   273
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   274
?>
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   275
2
9a485c41cfcf [feladat @ 3]
rejo
parents: 1
diff changeset
   276
<? if (level(5)) { ?>&nbsp;&nbsp;<INPUT TYPE="button" CLASS="button" OnClick="location.href='delete_domain.php?id=<?= $_GET["id"] ?>'" VALUE="<? echo _('Delete zone'); ?>"><?
1
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   277
}
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   278
include_once("inc/footer.inc.php");
58094faf794d [feladat @ 2]
rejo
parents:
diff changeset
   279
?>