<?php
include("../db.php");
header('Content-Type: application/json');

$status = 0;
$data   = new stdClass();

$result = $db->getRow("SELECT show_intro, intro_image,intro_content FROM tbl_info WHERE id = '1'");

if ($result) {
    $status = 1;
    $data = $result;
}

$schoolName = $db->getVal("SELECT value FROM settings WHERE field = 'site_name'");
$logo = $db->getVal("SELECT value FROM settings WHERE field = 'logo'");

echo json_encode(array("status" => $status, "data" => $data, "logo" => $logo, "school_name" => $schoolName));

