/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 05:10:39 UTC
  • Revision ID: maila@danieljohansson.nu-20130414051039-rs72wxozzalakqtu
added support for accepts and declines in a ugly way

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
  $output = "";
34
34
  if(isset($_FILES["image"]["tmp_name"])){
35
35
    $tmpFile = $_FILES["image"]["tmp_name"];
36
 
    //echo $_FILES["image"]["tmp_name"];
37
36
    $handle = fopen($tmpFile,"r");
38
37
    $fileSize = $_FILES['image']['size'];
39
 
    var_dump ($handle);
40
 
    //var_dump($_FILES);
41
 
    //echo $_FILES["image"]["tmp_name"];
42
38
    $output = fread($handle, filesize($tmpFile));
43
39
    $output = base64_encode ($output);
44
40
  }
45
 
  //$output = NULL;
46
 
  /*
47
 
  if ($handle) {
48
 
      while (($buffer = fgets($handle, 4096)) !== false) {
49
 
      //$buffer = str_replace("&", "&", $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
 
 
63
41
  if (isset($_SESSION['userType']) && $_POST['isSuperUser'] == true && $_SESSION['userType'] == 1) {
64
42
    $query = "INSERT INTO Users (
65
43
    loginName,