From 3136f0c1d25d98e83ebf0a3d3a362edaf2d729aa Mon Sep 17 00:00:00 2001 From: alopexc0de Date: Fri, 15 Feb 2013 18:08:46 -0500 Subject: [PATCH] Main program - imgstuff() --- img/img.main.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 img/img.main.php diff --git a/img/img.main.php b/img/img.main.php new file mode 100644 index 0000000..fb00a9c --- /dev/null +++ b/img/img.main.php @@ -0,0 +1,58 @@ +query($sql)){ + die('There was an error running the query [' . $db->error . ']'); + }; + $row = $result->fetch_assoc(); + if ($row){ + $_SESSION['noimg'] = false; + $_SESSION['id'] = $row['id']; + $_SESSION['img'] = $row['name']; + $_SESSION['location'] = $row['location']; + $_SESSION['type'] = $row['type']; + $_SESSION['size'] = $row['size']; + $_SESSION['time'] = $row['time']; + $_SESSION['comment'] = $row['comment']; + $_SESSION['username'] = $row['username']; + $_SESSION['tags'] = $row['tags']; + echo "

"; + //echo "$id
$img
$location
$type
$size
$time
$comment
$username
$tags\n"; + }else{ + $_SESSION['noimg'] = true; + echo "

That image was not found in our database D:

"; + } + $result->free(); + }else{ + if($_SESSION['noimg'] == 'search' || $_SESSION['noimg'] == 'tag' || $_SESSION['noimg'] == 'uname'){ + }else{ + noimg(); + $_SESSION['noimg'] = true; + } + } + } + +?> \ No newline at end of file