about summary refs log tree commit diff
path: root/sourcecodes/enter_netID.php~
diff options
context:
space:
mode:
authorziejd22021-02-24 14:36:59 -0600
committerziejd22021-02-24 14:36:59 -0600
commit25b843f6bbacb1937bdb960777b73acbece64115 (patch)
tree88645b9d1d8a0eea19d7229555bf8805571bc8b7 /sourcecodes/enter_netID.php~
parent33cedf36248f616aa37d1462c69a4a3058a5d92e (diff)
downloadBNW-25b843f6bbacb1937bdb960777b73acbece64115.tar.gz
GENENET8 update
Diffstat (limited to 'sourcecodes/enter_netID.php~')
-rw-r--r--sourcecodes/enter_netID.php~74
1 files changed, 74 insertions, 0 deletions
diff --git a/sourcecodes/enter_netID.php~ b/sourcecodes/enter_netID.php~
new file mode 100644
index 00000000..c58e63f3
--- /dev/null
+++ b/sourcecodes/enter_netID.php~
@@ -0,0 +1,74 @@
+<!DOCTYPE HTML>
+<html>
+
+<?php 
+
+include("header_new.inc");
+include("input_validate.php");
+
+$netID = "";
+$netIDErr = "";
+if ($_SERVER["REQUEST_METHOD"] == "POST") {
+  if (empty($_POST["netID"])) {
+    $netIDErr = "Entering a network ID is required";
+  } else {
+    //    $netID = valid_keyval($_POST["netID"]);
+    $netIDErr = "1";
+    $netID = test_input($_POST["netID"]);
+    //    $netIDErr = "1";
+    // check if name only contains letters
+    if (strlen($netID)!=3) {
+          $netIDErr = "Network ID must be three letters"; 
+    }
+    if (!preg_match('/^[a-zA-Z]+$/',$netID)) {
+          $netIDErr = "Only letters are allowed"; 
+    }
+  }
+}
+
+function test_input($data) {
+  $data = trim($data);
+  $data = stripslashes($data);
+  $data = htmlspecialchars($data);
+  return $data;
+}
+?>
+
+
+<!-- Site navigation menu -->
+<ul class="navbar">
+  <li><a href="help.php" target="_blank">Help</a>
+  <li><a href="home.php">Home</a>
+</ul>
+
+<div id="outer">
+<!-- Main content -->
+<h2>Enter network ID from previously used network</h2>
+<p align="justify"> 
+<br>  Networks that have previously been generated in BNW can be accessed by entering the network ID in the input box below. The network ID is currently a three character string that can be found on the left hand menu of any network page. Network files are periodically deleted from BNW so it is possible that older networks may no longer be active.
+<br>
+<br>
+<p><span class="error"></span></p>
+<FORM METHOD="post" ACTION="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
+    Network ID:<INPUT TYPE="text" name="netID" value="<?php echo $netID;?>" style="padding: 2px 5px; border: 2px solid; border-color: black black black black; font-family: Georgia, ..., serif; font-size: 18px;
+display: block; height: 30px; width: 100px;"><span class="error"> <?php echo $netIDErr;?></span>
+<br><input type="submit" name="submit" value="Submit" style="display: block; height: 30px; width:100px; font-family: Georgia, ..., serif; font-size: 16px;">
+</FORM>
+</p>
+<br>
+
+<?php
+if ($netIDErr=="1")
+{
+  $keyval=$netID;
+?>
+<script>
+  window.open("layout_svg_no.php?My_key=<?php print($keyval);?>",'_self',false);  
+</script>
+<?php
+}
+?>
+
+</div>
+</body>
+</html>
\ No newline at end of file