[freeside-commits] freeside/httemplate/edit/process/addr_block
add.cgi, 1.1, 1.2 allocate.cgi, 1.1, 1.2 deallocate.cgi, 1.1,
1.2 split.cgi, 1.1, 1.2
Ivan,,,
ivan at wavetail.420.am
Wed Aug 23 15:25:39 PDT 2006
- Previous message: [freeside-commits] freeside/httemplate/edit/cust_main billing.html,
1.8, 1.9 contact.html, 1.4, 1.5 select-country.html, 1.3,
1.4 select-county.html, 1.2, 1.3 select-state.html, 1.2, 1.3
- Next message: [freeside-commits]
freeside/httemplate/edit/elements edit.html, 1.7,
1.8 svc_Common.html, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block
In directory wavetail:/tmp/cvs-serv18630/httemplate/edit/process/addr_block
Modified Files:
add.cgi allocate.cgi deallocate.cgi split.cgi
Log Message:
Will things ever be the same again?
It's the final masonize
Index: allocate.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block/allocate.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- allocate.cgi 5 Feb 2003 23:17:14 -0000 1.1
+++ allocate.cgi 23 Aug 2006 22:25:37 -0000 1.2
@@ -1,25 +1,26 @@
-<%
-my $error = '';
-my $blocknum = $cgi->param('blocknum');
-my $routernum = $cgi->param('routernum');
-
-my $addr_block = qsearchs('addr_block', { blocknum => $blocknum });
-my $router = qsearchs('router', { routernum => $routernum });
-
-if($addr_block) {
- if ($router) {
- $error = $addr_block->allocate($router);
- } else {
- $error = "Cannot find router with routernum $routernum";
- }
-} else {
- $error = "Cannot find block with blocknum $blocknum";
-}
+%
+%my $error = '';
+%my $blocknum = $cgi->param('blocknum');
+%my $routernum = $cgi->param('routernum');
+%
+%my $addr_block = qsearchs('addr_block', { blocknum => $blocknum });
+%my $router = qsearchs('router', { routernum => $routernum });
+%
+%if($addr_block) {
+% if ($router) {
+% $error = $addr_block->allocate($router);
+% } else {
+% $error = "Cannot find router with routernum $routernum";
+% }
+%} else {
+% $error = "Cannot find block with blocknum $blocknum";
+%}
+%
+%if ( $error ) {
+% $cgi->param('error', $error);
+% print $cgi->redirect(popurl(4). "browse/addr_block.cgi?" . $cgi->query_string);
+%} else {
+% print $cgi->redirect(popurl(4). "browse/addr_block.cgi");
+%}
+%
-if ( $error ) {
- $cgi->param('error', $error);
- print $cgi->redirect(popurl(4). "browse/addr_block.cgi?" . $cgi->query_string);
-} else {
- print $cgi->redirect(popurl(4). "browse/addr_block.cgi");
-}
-%>
Index: deallocate.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block/deallocate.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- deallocate.cgi 5 Feb 2003 23:17:14 -0000 1.1
+++ deallocate.cgi 23 Aug 2006 22:25:37 -0000 1.2
@@ -1,24 +1,25 @@
-<%
-my $error = '';
-my $blocknum = $cgi->param('blocknum');
-
-my $addr_block = qsearchs('addr_block', { blocknum => $blocknum });
-
-if($addr_block) {
- my $router = $addr_block->router;
- if ($router) {
- $error = $addr_block->deallocate($router);
- } else {
- $error = "Block is not allocated to a router";
- }
-} else {
- $error = "Cannot find block with blocknum $blocknum";
-}
+%
+%my $error = '';
+%my $blocknum = $cgi->param('blocknum');
+%
+%my $addr_block = qsearchs('addr_block', { blocknum => $blocknum });
+%
+%if($addr_block) {
+% my $router = $addr_block->router;
+% if ($router) {
+% $error = $addr_block->deallocate($router);
+% } else {
+% $error = "Block is not allocated to a router";
+% }
+%} else {
+% $error = "Cannot find block with blocknum $blocknum";
+%}
+%
+%if ( $error ) {
+% $cgi->param('error', $error);
+% print $cgi->redirect(popurl(4). "browse/addr_block.cgi?" . $cgi->query_string);
+%} else {
+% print $cgi->redirect(popurl(4). "browse/addr_block.cgi");
+%}
+%
-if ( $error ) {
- $cgi->param('error', $error);
- print $cgi->redirect(popurl(4). "browse/addr_block.cgi?" . $cgi->query_string);
-} else {
- print $cgi->redirect(popurl(4). "browse/addr_block.cgi");
-}
-%>
Index: split.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block/split.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- split.cgi 5 Feb 2003 23:17:15 -0000 1.1
+++ split.cgi 23 Aug 2006 22:25:37 -0000 1.2
@@ -1,19 +1,20 @@
-<%
-my $error = '';
-my $blocknum = $cgi->param('blocknum');
-my $addr_block = qsearchs('addr_block', { blocknum => $blocknum });
-
-if ( $addr_block) {
- $error = $addr_block->split_block;
-} else {
- $error = "Unknown blocknum: $blocknum";
-}
-
+%
+%my $error = '';
+%my $blocknum = $cgi->param('blocknum');
+%my $addr_block = qsearchs('addr_block', { blocknum => $blocknum });
+%
+%if ( $addr_block) {
+% $error = $addr_block->split_block;
+%} else {
+% $error = "Unknown blocknum: $blocknum";
+%}
+%
+%
+%if ( $error ) {
+% $cgi->param('error', $error);
+% print $cgi->redirect(popurl(4). "browse/addr_block.cgi?". $cgi->query_string );
+%} else {
+% print $cgi->redirect(popurl(4). "browse/addr_block.cgi");
+%}
+%
-if ( $error ) {
- $cgi->param('error', $error);
- print $cgi->redirect(popurl(4). "browse/addr_block.cgi?". $cgi->query_string );
-} else {
- print $cgi->redirect(popurl(4). "browse/addr_block.cgi");
-}
-%>
Index: add.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block/add.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- add.cgi 5 Feb 2003 23:17:13 -0000 1.1
+++ add.cgi 23 Aug 2006 22:25:37 -0000 1.2
@@ -1,20 +1,21 @@
-<%
-
-my $error = '';
-my $ip_gateway = $cgi->param('ip_gateway');
-my $ip_netmask = $cgi->param('ip_netmask');
-
-my $new = new FS::addr_block {
- ip_gateway => $ip_gateway,
- ip_netmask => $ip_netmask,
- routernum => 0 };
-
-$error = $new->insert;
+%
+%
+%my $error = '';
+%my $ip_gateway = $cgi->param('ip_gateway');
+%my $ip_netmask = $cgi->param('ip_netmask');
+%
+%my $new = new FS::addr_block {
+% ip_gateway => $ip_gateway,
+% ip_netmask => $ip_netmask,
+% routernum => 0 };
+%
+%$error = $new->insert;
+%
+%if ( $error ) {
+% $cgi->param('error', $error);
+% print $cgi->redirect(popurl(4). "browse/addr_block.cgi?". $cgi->query_string );
+%} else {
+% print $cgi->redirect(popurl(4). "browse/addr_block.cgi");
+%}
+%
-if ( $error ) {
- $cgi->param('error', $error);
- print $cgi->redirect(popurl(4). "browse/addr_block.cgi?". $cgi->query_string );
-} else {
- print $cgi->redirect(popurl(4). "browse/addr_block.cgi");
-}
-%>
- Previous message: [freeside-commits] freeside/httemplate/edit/cust_main billing.html,
1.8, 1.9 contact.html, 1.4, 1.5 select-country.html, 1.3,
1.4 select-county.html, 1.2, 1.3 select-state.html, 1.2, 1.3
- Next message: [freeside-commits]
freeside/httemplate/edit/elements edit.html, 1.7,
1.8 svc_Common.html, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list