/extremedating/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/extremedating/trunk

« back to all changes in this revision

Viewing changes to adduser.php

  • Committer: Gustav Hatvigsson
  • Date: 2013-04-13 16:42:53 UTC
  • mfrom: (20.1.1 extremedating)
  • Revision ID: gustav.hartvigsson@gmail.com-20130413164253-37wp95nq8dzn03wg
morging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
<head>
6
6
<?php
7
7
include "php/db.php";
8
 
if(isset($_POST['hiddenStuff']) && $_POST['hiddenStuff'] != "Something Strange") {
9
 
  $password = sha1($_POST['password']."salt");
 
8
if(isset($_POST['hiddenStuff']) && $_POST['hiddenStuff'] == "Something Strange") {
 
9
  echo "Derp!";
 
10
  $password = sha1($_POST['passwd']."salt");
10
11
  //If there is a $_POST that indicates that the add userscript should be run.
11
12
  $query = "";
12
 
  if ($_POST['isSuperUser'] == true && $_SESSION['userType'] == 1) {
 
13
  if (isset($_SESSION['userType']) && $_POST['isSuperUser'] == true && $_SESSION['userType'] == 1) {
13
14
    $query = "INSERT INTO Users (
14
15
    loginName,
15
16
    shadow,
48
49
    '{$_POST['city']}
49
50
    );";
50
51
  }
 
52
  echo "Herp!";
51
53
} else {
52
54
 
53
55
?>
55
57
                <div id="profile">
56
58
    <h1> Create a new user </h1>
57
59
    <hr \>
58
 
        <form action="./adduser.php">
 
60
        <form action="./adduser.php" method="POST">
59
61
          <table border="0">
60
62
            <?php
61
63
              if(isset($_SESSION['userType']) && $_SESSION['userType'] == 1 ) {
93
95
              <td> <label for="city"> City </label> </td>
94
96
              <td> <input type="input" name="city" id="city" /> </td>
95
97
            </tr>
96
 
            <input name="hiddenStuff" value="Something Strange" type="hidden" \>
97
 
            <input id="input" type="submit" action="./adduser.php" />
 
98
                        <tr>
 
99
              <td><input name="hiddenStuff" value="Something Strange" type="hidden"/></td>
 
100
              <td><input id="input" type="submit" action="./adduser.php" value="Registera mig"/></td>
 
101
                        </tr>
98
102
          </table>
99
103
        </form>
100
104
      <?php