/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: Daniel Johansson
  • Date: 2013-04-14 01:43:09 UTC
  • mfrom: (49.1.2 extremedating)
  • Revision ID: maila@danieljohansson.nu-20130414014309-zktupwya66vzojpr
merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
<head>
27
27
<?php
28
28
include "php/db.php";
29
 
include "php/salt.php";
30
29
if(isset($_POST['hiddenStuff']) && $_POST['hiddenStuff'] == "Something Strange") {
31
 
  $password = sha1($_POST['passwd'].$pwd_salt);
 
30
  $password = sha1($_POST['passwd']."salt");
32
31
  //If there is a $_POST that indicates that the add userscript should be run.
33
32
  $query = "";
34
33
  $output = "";
35
34
  if(isset($_FILES["image"]["tmp_name"])){
36
35
    $tmpFile = $_FILES["image"]["tmp_name"];
 
36
    //echo $_FILES["image"]["tmp_name"];
37
37
    $handle = fopen($tmpFile,"r");
38
38
    $fileSize = $_FILES['image']['size'];
 
39
    var_dump ($handle);
 
40
    //var_dump($_FILES);
 
41
    //echo $_FILES["image"]["tmp_name"];
39
42
    $output = fread($handle, filesize($tmpFile));
40
43
    $output = base64_encode ($output);
41
44
  }
 
45
  //$output = NULL;
 
46
  /*
 
47
  if ($handle) {
 
48
      while (($buffer = fgets($handle, 4096)) !== false) {
 
49
      //$buffer = str_replace("&", "&amp;", $buffer);
 
50
      //$buffer = str_replace("<", "&lt;", $buffer);
 
51
      //$buffer = str_replace(">", "&gt;", $buffer);
 
52
      $output .= $buffer;
 
53
     }
 
54
      if (!feof($handle)) {
 
55
      $output .= "Error: unexpected fgets() fail\n";
 
56
        }
 
57
    fclose($handle);
 
58
    var_dump($output);
 
59
  }
 
60
  */
 
61
  
 
62
 
42
63
  if (isset($_SESSION['userType']) && $_POST['isSuperUser'] == true && $_SESSION['userType'] == 1) {
43
64
    $query = "INSERT INTO Users (
44
65
    loginName,
137
158
              <td> <input type="input" name="city" id="city" /> </td>
138
159
            </tr>
139
160
            <tr>
140
 
              <td> <label for="file"> Profile Image </label> </td>
 
161
              <td> <label for="file"> City </label> </td>
141
162
              <td> <input type="file" name="image" id="image" /> </td>
142
163
            </tr>
143
164
                              <tr>