/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 get_image.php

  • Committer: Gustav Hatvigsson
  • Date: 2013-04-13 22:52:37 UTC
  • mto: This revision was merged to the branch mainline in revision 43.
  • Revision ID: gustav.hartvigsson@gmail.com-20130413225237-jrj7reb6e932zson
fixed the user images! that only took a fow houres -_-...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
include "db.php";
 
2
include "php/db.php";
3
3
$def = "iVBORw0KGgoAAAANSUhEUgAAAXwAAAF8CAIAAABDhZedAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA
4
4
B3RJTUUH3QQNFCA1vYYwYQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAABpC
5
5
SURBVHja7d3/TxP3H8DxcghYFVJQo0RBiYtKE2OaJXYMEeMSXRTiEkekElwYMRiy3/jR/kz26ycx
127
127
  $username = $_GET['userName'];
128
128
  $query = "SELECT profileImage FROM Users WHERE loginName = '{$username}'";
129
129
  $tuples = $db->query($query);
 
130
  //var_dump($tuples);
130
131
  $fetch = $tuples->fetchAll();
131
 
  if(isset($fetch[0]['profileImage'])) {
132
 
   print($fetch[0]['profileImage']);
 
132
  //var_dump($tuples);
 
133
  if($fetch[0]['profileImage'] != "") {
 
134
   echo(base64_decode($fetch[0]['profileImage']));
133
135
  } else {
134
136
    echo base64_decode($def);
135
137
  }