edit.php
changeset 71 e1b918eaf69a
parent 65 ce1c4d5e1576
child 75 a53200a76f9d
--- a/edit.php	Tue Jan 29 21:32:48 2008 +0000
+++ b/edit.php	Sat Feb 02 15:39:04 2008 +0000
@@ -60,67 +60,67 @@
 if (strlen($recordOwnerError)) {
 ?>
   <div class="error"><?php echo _('Error'); ?>: <?php echo _($recordOwnerError); ?></div>
-<?php	
+<?php
 }
 
 if(!isset($info["ownerid"]) && $domain_type != "SLAVE")
 {
 ?>
-    <div class="error"><? echo _('Error'); ?>: <? echo ('There is no owner for this zone, please assign someone.'); ?></div>
-<?
+    <div class="error"><?php echo _('Error'); ?>: <?php echo ('There is no owner for this zone, please assign someone.'); ?></div>
+<?php
 }
 if ($domain_type == "SLAVE" && ! $slave_master )
 {
 ?>
-    <div class="error"><? echo _('Error'); ?>: <? echo _('Type of this zone is "slave", but there is no IP address for it\'s master given.'); ?></div>
-<?
+    <div class="error"><?php echo _('Error'); ?>: <?php echo _('Type of this zone is "slave", but there is no IP address for it\'s master given.'); ?></div>
+<?php
 }
 ?>
-    <h2><? echo _('Edit zone'); ?> "<? echo get_domain_name_from_id($_GET["id"]) ?>"</h2>
-<?
+    <h2><?php echo _('Edit zone'); ?> "<?php echo get_domain_name_from_id($_GET["id"]) ?>"</h2>
+<?php
 if (level(5)) 
 { ?>	
        <div id="meta">
         <div id="meta-left">
 	 <table>
    	  <tr>
-  	   <th colspan="2"><? echo _('Owner of zone'); ?></th>
+  	   <th colspan="2"><?php echo _('Owner of zone'); ?></th>
   	  </tr>
-<?
+<?php
 	if(isset($info["ownerid"]))
 	{
 		$userRes = get_users_from_domain_id($_GET["id"]);
 		foreach($userRes as $user)
 		{ ?>
   	  <tr>
-  	   <form method="post" action="edit.php?id=<? echo $_GET['id']?>">
+  	   <form method="post" action="edit.php?id=<?php echo $_GET['id']?>">
   	    <td>
-	     <? echo $user["fullname"]?>
+	     <?php echo $user["fullname"]?>
 	    </td>
             <td>
-  	     <input type="hidden" name="del_user" value="<? echo $user["id"]?>">
-             <input type="submit" class="sbutton" name="co" value="<? echo _('Delete'); ?>">
+  	     <input type="hidden" name="del_user" value="<?php echo $user["id"]?>">
+             <input type="submit" class="sbutton" name="co" value="<?php echo _('Delete'); ?>">
   	    </td>
            </form>
   	  </tr>
-<?
+<?php
 		}
 	}
 	else
 	{
 ?>
 	  <tr>
-	   <td><? echo _('No owner set or this zone!'); ?></td>
+	   <td><?php echo _('No owner set or this zone!'); ?></td>
 	  </tr>
-<?
+<?php
 	}
   ?>
           <tr>
-  	   <form method="post" action="edit.php?id=<? echo $_GET['id']?>">
+  	   <form method="post" action="edit.php?id=<?php echo $_GET['id']?>">
   	    <td>
-  	     <input type="hidden" name="domain" value="<? echo $_GET["id"] ?>">
+  	     <input type="hidden" name="domain" value="<?php echo $_GET["id"] ?>">
   	     <select name="newowner">
-  			<?
+  			<?php
   			$users = show_users();
   			foreach ($users as $u)
   			{
@@ -130,29 +130,29 @@
   					$add = " SELECTED";
   				}
   				?>
-  				<option<? echo $add ?> value="<? echo $u["id"] ?>"><? echo $u["fullname"] ?></option><?
+  				<option<?php echo $add ?> value="<?php echo $u["id"] ?>"><?php echo $u["fullname"] ?></option><?php
   			}
   			?>
   			</select>
   	    </td>
   	    <td>
-     	     <input type="submit" class="sbutton" name="co" value="<? echo _('Add'); ?>">
+     	     <input type="submit" class="sbutton" name="co" value="<?php echo _('Add'); ?>">
             </td>
   	   </form>
   	  </tr>
          </table>
-	</div> <? // eo div meta-left ?>
+	</div> <?php // eo div meta-left ?>
         <div id="meta-right">
          <table>
 	  <tr>
-	   <th colspan="2"><? echo _('Type of zone'); ?></th>
+	   <th colspan="2"><?php echo _('Type of zone'); ?></th>
 	  </tr>
-	  <form action="<? echo $_SERVER['PHP_SELF']?>?id=<? echo $_GET['id']?>" method="post">
-	   <input type="hidden" name="domain" value="<? echo $_GET["id"] ?>">
+	  <form action="<?php echo $_SERVER['PHP_SELF']?>?id=<?php echo $_GET['id']?>" method="post">
+	   <input type="hidden" name="domain" value="<?php echo $_GET["id"] ?>">
 	   <tr>
 	    <td>
 	     <select name="newtype">
-<?
+<?php
 	foreach($server_types as $s)
 	{
 		unset($add);
@@ -161,44 +161,44 @@
 			$add = " SELECTED";
 		}
 ?>
-              <option<? echo $add ?> value="<? echo $s?>"><? echo $s?></option><?
+              <option<?php echo $add ?> value="<?php echo $s?>"><?php echo $s?></option><?php
 	}
 ?>
              </select>
             </td>
 	    <td>
-	     <input type="submit" class="sbutton" name="type_change" value="<? echo _('Change'); ?>">
+	     <input type="submit" class="sbutton" name="type_change" value="<?php echo _('Change'); ?>">
 	    </td>
 	   </tr>
 	  </form>
 
-<?
+<?php
 	if ($domain_type == "SLAVE" ) 
 	{ 
 		$slave_master=get_domain_slave_master($_GET['id']);
 ?>
           <tr>
 	   <th colspan="2">
-	    <? echo _('IP address of master NS'); ?>
+	    <?php echo _('IP address of master NS'); ?>
 	   </th>
 	  </tr>
-	  <form action="<? echo $_SERVER['PHP_SELF']?>?&amp;id=<? echo $_GET['id']?>" method="post">
-	   <input type="hidden" name="domain" value="<? echo $_GET["id"] ?>">
+	  <form action="<?php echo $_SERVER['PHP_SELF']?>?&amp;id=<?php echo $_GET['id']?>" method="post">
+	   <input type="hidden" name="domain" value="<?php echo $_GET["id"] ?>">
 	   <tr>
 	    <td>
-	     <input type="text" name="slave_master" value="<? echo $slave_master; ?>" class="input">
+	     <input type="text" name="slave_master" value="<?php echo $slave_master; ?>" class="input">
             </td>
             <td>
-	     <input type="submit" class="sbutton" name="change_slave_master" value="<? echo _('Change'); ?>">
+	     <input type="submit" class="sbutton" name="change_slave_master" value="<?php echo _('Change'); ?>">
             </td>
            </tr>
           </form>
-<?
+<?php
 	}
 ?>
          </table>  
-        </div> <? // eo div meta-right ?>
-       </div> <? // eo div meta 
+        </div> <?php // eo div meta-right ?>
+       </div> <?php // eo div meta 
 }
 else
 {
@@ -207,48 +207,48 @@
         <div id="meta-right">
          <table>
  	  <tr>
- 	   <th><? echo _('Type of zone'); ?></th><td class="y"><? echo $domain_type; ?></td>
+ 	   <th><?php echo _('Type of zone'); ?></th><td class="y"><?php echo $domain_type; ?></td>
 	  </tr>
-<?
+<?php
 	if ($domain_type == "SLAVE" &&  $slave_master )
 	{
 ?>
 	  <tr>
-	   <th><? echo _('IP address of master NS'); ?></th><td class="y"><? echo $slave_master; ?></td>
+	   <th><?php echo _('IP address of master NS'); ?></th><td class="y"><?php echo $slave_master; ?></td>
 	  </tr>
-<?
+<?php
 	}
 ?>
          </table>
-        </div> <? //eo div meta-right ?>
-        </div> <? // eo div meta
+        </div> <?php //eo div meta-right ?>
+        </div> <?php // eo div meta
 }
 ?>
        <div id="meta">
-<?
+<?php
 	if ($_SESSION[$_GET["id"]."_ispartial"] != 1 && $domain_type != "SLAVE" )
 	{
 ?>
-        <input type="button" class="button" OnClick="location.href='add_record.php?id=<? echo $_GET["id"] ?>'" value="<? echo _('Add record'); ?>">&nbsp;&nbsp;
-<?
+        <input type="button" class="button" OnClick="location.href='add_record.php?id=<?php echo $_GET["id"] ?>'" value="<?php echo _('Add record'); ?>">&nbsp;&nbsp;
+<?php
 	}
 	if (level(5))
 	{
 ?>
-	<input type="button" class="button" OnClick="location.href='delete_domain.php?id=<? echo $_GET["id"] ?>'" value="<? echo _('Delete zone'); ?>">
-<?
+	<input type="button" class="button" OnClick="location.href='delete_domain.php?id=<?php echo $_GET["id"] ?>'" value="<?php echo _('Delete zone'); ?>">
+<?php
 	}
 ?>
-        </div> <? // eo div meta ?>
+        </div> <?php // eo div meta ?>
        <div class="showmax">
-<?
+<?php
 show_pages($info["numrec"],ROWAMOUNT,$_GET["id"]);
 ?>
-        </div> <? // eo div showmax ?>
-         <form action="<? echo $_SERVER["PHP_SELF"]?>?id=<? echo $_GET["id"]?>" method="post">
+        </div> <?php // eo div showmax ?>
+         <form action="<?php echo $_SERVER["PHP_SELF"]?>?id=<?php echo $_GET["id"]?>" method="post">
           <input type="hidden" name="action" value="record-user">
           <table>
-<?
+<?php
 $countinput=0;
 $rec_result = get_records_from_domain_id($_GET["id"],ROWSTART,ROWAMOUNT);
 if($rec_result != -1)
@@ -256,50 +256,50 @@
 ?>
            <tr>
 	    <th>&nbsp;</th>
-<? 
+<?php 
 	if (level(10) && $domain_type != "SLAVE") 
 	{ 
 		echo "<th class=\"n\">" . _('Sub-owners') . "</td>"; 
 	} 
 ?>
-	    <th><? echo _('Name'); ?></th>
-	    <th><? echo _('Type'); ?></th>
-	    <th><? echo _('Content'); ?></th>
-	    <th><? echo _('Priority'); ?></th>
-	    <th><? echo _('TTL'); ?></th>
+	    <th><?php echo _('Name'); ?></th>
+	    <th><?php echo _('Type'); ?></th>
+	    <th><?php echo _('Content'); ?></th>
+	    <th><?php echo _('Priority'); ?></th>
+	    <th><?php echo _('TTL'); ?></th>
            </tr>
-<?
+<?php
   	$recs = sort_zone($rec_result);
   	foreach($recs as $r)
   	{
 ?>
            <tr>
 	    <td class="n">
-<?
+<?php
 		if ($domain_type != "SLAVE" )
 		{	
 			if(level(5) || (!($r["type"] == "SOA" && !$GLOBALS["ALLOW_SOA_EDIT"]) && !($r["type"] == "NS" && !$GLOBALS["ALLOW_NS_EDIT"])))
 			{
 ?>
-			     <a href="edit_record.php?id=<? echo $r['id'] ?>&amp;domain=<? echo $_GET["id"] ?>"><img src="images/edit.gif" alt="[ <? echo _('Edit record'); ?> ]"></a>
-			     <a href="delete_record.php?id=<? echo $r['id'] ?>&amp;domain=<? echo $_GET["id"] ?>"><img src="images/delete.gif" ALT="[ <? echo _('Delete record'); ?> ]" BORDER="0"></a>
-<?
+			     <a href="edit_record.php?id=<?php echo $r['id'] ?>&amp;domain=<?php echo $_GET["id"] ?>"><img src="images/edit.gif" alt="[ <?php echo _('Edit record'); ?> ]"></a>
+			     <a href="delete_record.php?id=<?php echo $r['id'] ?>&amp;domain=<?php echo $_GET["id"] ?>"><img src="images/delete.gif" ALT="[ <?php echo _('Delete record'); ?> ]" BORDER="0"></a>
+<?php
 			}
 		}
 		if(level(10) && $domain_type != "SLAVE") 
 		{ 
 ?>
-		     <input type="checkbox" name="rowid[<? echo $countinput++?>]" value="<? echo $r['id']?>" />
-<? 
+		     <input type="checkbox" name="rowid[<?php echo $countinput++?>]" value="<?php echo $r['id']?>" />
+<?php 
 		}
 ?>
             </td>
-<? 
+<?php 
 		if (level(10) && $domain_type != "SLAVE") 
 		{ 
 ?>
             <td class="n">
-<? 
+<?php 
 			$x_result = $db->query("SELECT r.user_id,u.username,u.fullname FROM record_owners as r, users as u WHERE r.record_id=".$db->quote($r['id'])." AND u.id=r.user_id");
 			echo "<select style=\"width:120px;\">";
 			while ($x_r = $x_result->fetchRow()) {
@@ -308,26 +308,26 @@
 			echo "</select>";
 ?>
             </td>
-<? 
+<?php 
 		} 
 ?>
-	    <td class="y"><? echo $r['name'] ?></td>
-	    <td class="y"><? echo $r['type'] ?></td>
-	    <td class="y"><? echo $r['content'] ?></td>
-<?
+	    <td class="y"><?php echo $r['name'] ?></td>
+	    <td class="y"><?php echo $r['type'] ?></td>
+	    <td class="y"><?php echo $r['content'] ?></td>
+<?php
 		if ($r['prio'] != 0) 
 		{
 ?>
-            <td class="y"><? echo $r['prio']; ?></td>
-<?
+            <td class="y"><?php echo $r['prio']; ?></td>
+<?php
 		} else {
 ?>
-            <td class="n"></td><?
+            <td class="n"></td><?php
 		}
 ?>
-            <td class="y"><? echo $r['ttl'] ?></td>
+            <td class="y"><?php echo $r['ttl'] ?></td>
 	   </tr>
-<?
+<?php
 	}
 }
 else
@@ -335,30 +335,30 @@
 ?>
            <tr>
             <td class="n">
-	     <div class="warning"><? echo _('No records for this zone.'); ?></div>
+	     <div class="warning"><?php echo _('No records for this zone.'); ?></div>
 	    </td>
            </tr>
-<?
+<?php
 }
 ?>
           </table>
 
-<?
+<?php
 if ($domain_type != "SLAVE")
 {
 	if (level(10)) { ?>
 	   <img src="images/arrow.png" alt="arrow" class="edit-assign-to-user">
 	   <select name="userid">
-		<?
+		<?php
 		$users = show_users();
 		foreach ($users as $user) {
 			echo "<option value=\"".$user[id]."\">".$user[fullname]."</option>";
 		}
 		?>
            </select>
-	   <input type="submit" class="button" value="<? echo _('Assign to user'); ?>">
+	   <input type="submit" class="button" value="<?php echo _('Assign to user'); ?>">
 	  </form>
-<? 
+<?php 
 	} 
 }
 include_once("inc/footer.inc.php");