Changeset 282 for branches/privdata/cgi-bin/main.cgi
- Timestamp:
- 09/21/05 14:09:35 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/privdata/cgi-bin/main.cgi
r280 r282 626 626 } 627 627 $html =~ s|\$\$ALLCITIES\$\$|$cities|g; 628 629 my $i = 0; 630 $i++ if $webvar{fbtype} eq 'y'; 631 # Check to see if user is allowed to do anything with sensitive data 632 my $privdata = ''; 633 if ($IPDBacl{$authuser} =~ /s/) { 634 $privdata = qq(<tr class="color).($i%2).qq("><td>Restricted data:</td>). 635 qq(<td class=regular><textarea rows="3" cols="64" name="privdata" class="regular">). 636 qq(</textarea></td></tr>\n); 637 $i++; 638 } 639 $html =~ s/\$\$PRIVDATA\$\$/$privdata/g; 640 641 $i = $i % 2; 642 $html =~ s/\$\$BUTTONROWCOLOUR\$\$/color$i/; 628 643 629 644 print $html; … … 789 804 $html =~ s|\$\$ACTION\$\$|insert|g; 790 805 806 my $i=1; 807 # Check to see if user is allowed to do anything with sensitive data 808 my $privdata = ''; 809 if ($IPDBacl{$authuser} =~ /s/) { 810 $privdata = qq(<tr class="color).($i%2).qq("><td>Restricted data:</td>). 811 qq(<td class=regular>$webvar{privdata}). 812 qq(<input type=hidden name=privdata value="$webvar{privdata}"></td></tr>\n); 813 $i++; 814 } 815 $html =~ s/\$\$PRIVDATA\$\$/$privdata/g; 816 817 $i = $i % 2; 818 $html =~ s/\$\$BUTTONROWCOLOUR\$\$/color$i/; 819 791 820 print $html; 792 821 … … 803 832 return if !validateInput(); 804 833 834 if (!defined($webvar{privdata})) { 835 $webvar{privdata} = ''; 836 } 805 837 # $code is "success" vs "failure", $msg contains OK for a 806 838 # successful netblock allocation, the IP allocated for static … … 808 840 my ($code,$msg) = allocateBlock($ip_dbh, $webvar{fullcidr}, $webvar{alloc_from}, 809 841 $webvar{custid}, $webvar{alloctype}, $webvar{city}, $webvar{desc}, $webvar{notes}, 810 $webvar{circid} );842 $webvar{circid}, $webvar{privdata}); 811 843 812 844 if ($code eq 'OK') { … … 1105 1137 } 1106 1138 1107 my ($cidr, $custid, $type, $city, $circid, $desc, $notes, $alloctype );1139 my ($cidr, $custid, $type, $city, $circid, $desc, $notes, $alloctype, $privdata); 1108 1140 1109 1141 if ($webvar{alloctype} eq 'rm') {
Note:
See TracChangeset
for help on using the changeset viewer.