<?php

header('Content-type: application/json');



session_start();



include 'func.php';



$db = @mysql_connect($db_server, $db_username, $db_password) or die(mysql_error());

@mysql_select_db($db_name,$db) or die(mysql_error());



//$userData = $_SESSION['userdata'];



$result = new stdClass();

$result->result = 'success';

$result->list = array();

/*

if (empty($userData)) {

    $result->result = 'error';

    $result->message = 'User not logged';

} else {

*/

	$qry = "select * from imageinfo";
    $res = mysql_query($qry,$db) or die(mysql_error());



    while (($row=mysql_fetch_assoc($res))!==false) {

        $result->list[] = $row;

    }



//}


echo json_encode($result);

?>