version 0.1.7
[fms.git] / admin / addpeeridentity.php
diff --git a/admin/addpeeridentity.php b/admin/addpeeridentity.php
deleted file mode 100644 (file)
index 5d24f0c..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php\r
-\r
-       include_once('config.php');\r
-       include_once('linkbar.php');\r
-       \r
-function content()\r
-{\r
-       global $dblocation;\r
-       \r
-       if(isset($_REQUEST["formaction"]) && $_REQUEST["formaction"]=="addpeer" && $_REQUEST["publickey"]!="")\r
-       {\r
-               $message="";\r
-               $db=new PDO('sqlite:'.$dblocation);\r
-               $st=$db->prepare("SELECT IdentityID FROM tblIdentity WHERE PublicKey=?;");\r
-               $st->bindParam(1,$_REQUEST["publickey"]);\r
-               $st->execute();\r
-               if($record=$st->fetch())\r
-               {\r
-                       $message="This peer already exists";\r
-               }\r
-               else\r
-               {\r
-                       $st2=$db->prepare("INSERT INTO tblIdentity(PublicKey,DateAdded) VALUES(?,?);");\r
-                       $st2->bindParam(1,$_REQUEST["publickey"]);\r
-                       $st2->bindParam(2,gmdate('Y-m-d H:i:s'));\r
-                       $st2->execute();\r
-                       $message="Peer added";  \r
-               }\r
-?>\r
-       <h2><?php print($message) ?></h2>\r
-<?php\r
-       }\r
-       else\r
-       {\r
-?>\r
-       <h2>Add Peer</h2>\r
-       <form name="frmaddpeer" method="POST">\r
-       <input type="hidden" name="formaction" value="addpeer">\r
-       Peer Public Key<input type="text" name="publickey" size="100">\r
-       <br>\r
-       The public key must be a valid SSK public key and include the / at the end\r
-       <br>\r
-       <input type="submit" value="Add">\r
-       </form>\r
-<?php\r
-       }\r
-}\r
-       \r
-       include_once('template.php');\r
-\r
-?>
\ No newline at end of file