Commit e4c5275e authored by Leigh B. Stoller's avatar Leigh B. Stoller

After registering a new NetBed CD, send email back to user requesting

they go to the widearea_register page to get an account and fill in
the node info. Changed the registration page to take key,IP args so
that those fields can be embedded in the link we give them, and pre
entered into the form.
parent 05654295
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
#
require("defs.php3");
......@@ -162,6 +162,28 @@ if (isset($updated) && $updated == 1) {
}
$newargs .= " -t $type ";
SUEXEC("nobody", $TBADMINGROUP, "webnewwanode $newargs", 0);
#
# Send email to user reminding to register node.
#
$user_name = $warow[user_name];
$user_email= $warow[user_email];
$lockkey = $warow[lockkey];
TBMAIL("$user_name <$user_email>",
"Thanks for installing a NetBed CDROM!",
"It would be very helpful if you could please go to:\n".
"\n".
" ${TBBASE}/widearea_register.php?cdkey=$lockkey&IP=$IP\n".
"\n".
"and tell us a few things about the node (processor, connection\n".
"type, geographical info, etc.). You can also register for a\n".
"local account on your node by providing this info to us.\n".
"\n".
"Thanks,\n".
"Testbed Operations\n",
"From: $TBMAIL_OPS\n".
"Errors-To: $TBMAIL_WWW");
}
$newroot = "";
if (isset($roottag)) {
......
......@@ -492,6 +492,16 @@ if (! isset($submit)) {
$defaults = array();
$defaults[usr_URL] = "$HTTPTAG";
$defaults[node_country] = "USA";
#
# These two allow presetting the IP and cdkey
#
if (isset($IP) && strcmp($IP, "")) {
$defaults[IP] = $IP;
}
if (isset($cdkey) && strcmp($cdkey, "")) {
$defaults[cdkey] = $cdkey;
}
SPITFORM($defaults, $returning, 0);
PAGEFOOTER();
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -100,6 +100,7 @@ if (isset($deletekey)) {
DBQueryFatal("delete from interfaces where node_id='$nodeid'");
DBQueryFatal("delete from nodes where node_id='$nodeid'");
DBQueryFatal("delete from nodes where phys_nodeid='$nodeid'");
DBQueryFatal("delete from node_status where node_id='$nodeid'");
DBQueryFatal("delete from reserved where node_id='$nodeid'");
}
header("Location: wideareakeys.php3");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment