<?php
include("../../db.php");
//header("Access-Control-Allow-Origin: * ");
header('Content-Type: application/json');


$result = $db->getRows("SELECT * FROM image_calendar");
// print_r($result);
// $result = mysql_query($sql_qry);
if (count($result) > 0) {
    // while ($row = mysql_fetch_assoc($result)) 
    foreach($result as $row)
    {

        $row["image_name"] = "uploads/calendar/".$row["image_name"];

        $jsonn[] = $row;
        $json['status'] = 1;
        $json['msg'] = "successful";
        $json['data'] = $jsonn;
        //	$json['section']=$jsonc;

    }

    if(empty($json))
    {

        $json['status']=0;
        $json['msg']="data not found";
        echo json_encode($json);
    }
    else
    {
        echo json_encode($json);

    }

} else {
    echo json_encode(array('status' => 0, 'msg' => 'data not found..!'));
}

?>