/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-14 13:29:34 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20130414132934-u283ow3t1e3r3zfq
* Made login re-direct if the a user is logedin
* 'secured' get_image.php

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
 
2
session_start();
2
3
 
3
4
/*
4
5
    ExtremeDating - a Hackathon 2013 project.
19
20
    You should have received a copy of the GNU Affero General Public License
20
21
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
22
*/
22
 
 
23
23
include "php/db.php";
 
24
 
24
25
$def =
25
26
"iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAYAAACHjumMAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
26
27
WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QQOCR0LEET6uQAAAB1pVFh0Q29tbWVudAAAAAAAQ3Jl
181
182
McYYY4wxxhhjjDFj8v+EX5l2R3A63QAAAABJRU5ErkJggg==";
182
183
 
183
184
header("Content-type: image/png");
184
 
if(isset($_GET['userName'])){
 
185
if(isset($_GET['userName']) && isset($_SESSION['userName']){
185
186
  $username = $_GET['userName'];
186
187
  $query = "SELECT profileImage FROM Users WHERE loginName = '{$username}'";
187
188
  $tuples = $db->query($query);