Project

General

Profile

« Previous | Next » 

Revision 18f7352b

Added by Seth Mos about 18 years ago

Add duplicate option to system_routes.php.
By request of Seth.

View differences:

usr/local/www/system_routes.php
120 120
                  <td width="10%" class="list">
121 121
			<table border="0" cellspacing="0" cellpadding="1">
122 122
			   <tr>
123
				<td width="20"></td>
123
				<td width="17"></td>
124 124
				<td><a href="system_routes_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
125 125
			   </tr>
126 126
			</table>
......
150 150
                  <td class="listbg" ondblclick="document.location='system_routes_edit.php?id=<?=$i;?>';">
151 151
                    <font color="#FFFFFF"><?=htmlspecialchars($route['descr']);?>&nbsp;
152 152
                  </td>
153
                  <td valign="middle" nowrap class="list"> <a href="system_routes_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
154
                     &nbsp;<a href="system_routes.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this route?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
155
				</tr>
153
                  <td valign="middle" nowrap class="list">
154
			<table border="0" cellspacing="0" cellpadding="1">
155
			   <tr>
156
				<td><a href="system_routes_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
157
				<td><a href="system_routes.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this route?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
158
			   </tr>
159
			   <tr>
160
				<td width="17"></td>
161
				<td><a href="system_routes_edit.php?dup=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
162
			   </tr>
163
			</table>
164

  
165
		</tr>
156 166
			  <?php $i++; endforeach; ?>
157 167
                <tr>
158 168
                  <td class="list" colspan="4"></td>
159 169
                  <td class="list">
160 170
			<table border="0" cellspacing="0" cellpadding="1">
161 171
			   <tr>
162
				<td width="20"></td>
172
				<td width="17"></td>
163 173
				<td><a href="system_routes_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
164 174
			   </tr>
165 175
			</table>
usr/local/www/system_routes_edit.php
41 41
if (isset($_POST['id']))
42 42
	$id = $_POST['id'];
43 43

  
44
if (isset($_GET['dup'])) {
45
	$id = $_GET['dup'];
46
}
47

  
44 48
if (isset($id) && $a_routes[$id]) {
45 49
	$pconfig['interface'] = $a_routes[$id]['interface'];
46 50
	list($pconfig['network'],$pconfig['network_subnet']) = 
......
49 53
	$pconfig['descr'] = $a_routes[$id]['descr'];
50 54
}
51 55

  
56
if (isset($_GET['dup']))
57
	unset($id);
58

  
52 59
if ($_POST) {
53 60

  
54 61
	unset($input_errors);

Also available in: Unified diff