version 0.0.1
[fms.git] / admin / createidentity.php
1 <?php\r
2         \r
3         include_once('config.php');\r
4         include_once('linkbar.php');\r
5 \r
6 function content()\r
7 {\r
8         \r
9         global $dblocation;\r
10         \r
11         if(isset($_REQUEST["formaction"]) && $_REQUEST["formaction"]=="create" && $_REQUEST["name"]!="")\r
12         {\r
13                 $db=new PDO('sqlite:'.$dblocation);\r
14                 $st=$db->prepare("INSERT INTO tblLocalIdentity(Name) VALUES(?);");\r
15                 $st->bindParam(1,$_REQUEST["name"]);\r
16                 $st->execute();\r
17 ?>\r
18         <h2>Identity Created</h2>\r
19 <?php\r
20         }\r
21         else\r
22         {\r
23 ?>\r
24         <h2>Create Identity</h2>\r
25         <form name="frmcreateidentity" method="POST">\r
26         <input type="hidden" name="formaction" value="create">\r
27         Name : <input type="text" name="name">\r
28         <input type="submit" value="Create">\r
29         </form>\r
30 <?php\r
31         }\r
32 }\r
33         \r
34         include_once('template.php');\r
35 \r
36 ?>