- Timestamp:
- 04/07/06 18:01:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/admin.cgi
r330 r331 304 304 </form></table> 305 305 ); 306 print "<p> Edit existing customer contact data:\n".306 print "<p>Click CustID to edit existing customer contact data:\n". 307 307 "<table border=1>\n<tr><td>CustID</td><td>Name</td><td>Tech handle</td></tr>\n"; 308 308 $sth = $ip_dbh->prepare("select custid,name,tech_handle from customers order by custid"); 309 309 $sth->execute; 310 310 while (my @data = $sth->fetchrow_array) { 311 print "<tr><td>$data[0]</td><td>$data[1]</td><td>$data[2]</td></tr>\n"; 312 } 311 print qq(<tr><td><a href="admin.cgi?action=edcust&custid=$data[0]">$data[0]</td>). 312 "<td>$data[1]</td><td>$data[2]</td></tr>\n"; 313 } 314 print "</table>\n"; 313 315 } elsif ($webvar{action} eq 'newcust') { 314 316 if ($webvar{custid} eq '') { … … 344 346 } # $sth err check 345 347 } # bad custid 348 } elsif ($webvar{action} eq 'edcust') { 349 $sth = $ip_dbh->prepare("select custid,name,street,city,province,". 350 "country,pocode,phone,tech_handle,abuse_handle,admin_handle ". 351 "from customers where custid='$webvar{custid}'"); 352 $sth->execute; 353 my ($custid, $name, $street, $city, $prov, $country, $pocode, $phone, $tech, $abuse, $admin) = 354 $sth->fetchrow_array; 355 print qq(<form action=admin.cgi method=POST> 356 <table border=1><tr> 357 <input type=hidden name=action value=updcust> 358 <td>CustID:</td><td>$custid<input type=hidden name=custid value=$custid></td> 359 <td>Name:</td><td><input name=name value="$name"></td></tr> 360 <tr><td>Street:</td><td><input name=street value="$street"></td></tr> 361 <!-- <td>Street2:</td><td><input name=street2></td> --> 362 <tr><td>City:</td><td><input name=city value="$city"></td> 363 <td>Province: (2-letter code)</td><td><input name=province value="$prov" length=2 size=2></td></tr> 364 <tr><td>Country: (2-letter code)</td><td><input name=country value="$country" length=2 size=2></td> 365 <td>Postal/ZIP Code:</td><td><input name=pocode value="$pocode"></td></tr> 366 <tr><td>Phone:</td><td><input name=phone value="$pocode"></td> 367 <!-- <td>Default rDNS:</td><td><input name=def_rdns></td></tr> 368 <td>Description:</td><td><input name=description></td> --> 369 <td>ARIN Handles:</td><td> 370 Tech: <input name=tech_handle value="$tech"><br> 371 Abuse: <input name=abuse_handle value="$abuse"><br> 372 Admin: <input name=admin_handle value="$admin"><br> 373 Note: Only tech is required at the moment. 374 </td></tr> 375 <tr><td colspan=4 align=center><input type=submit value="Update"></td></tr> 376 </form></table> 377 ); 378 346 379 } elsif ($webvar{action} eq 'updcust') { 347 380 print "Updated $webvar{custid}\n";
Note:
See TracChangeset
for help on using the changeset viewer.