Example #1
0
<?php

include '../Class/mapLoad.php';
include '../Class/Auth.php';
include '../Class/Hash_tag.php';
include '../Class/Img_ctl.php';
$mapLoad = new mapLoad();
$auth = new Auth();
$hash_tag = new Hash_tag();
$Img_ctl = new Img_ctl();
// num 값이 있는 경우 num값 만큼만 가져옴 (기본값 5)
if ($_POST['num']) {
    $maps = $mapLoad->getMapAllCapture($_POST['num']);
} else {
    $maps = $mapLoad->getMapAllCapture();
}
$map_list[] = null;
// 결과 담을 변수
foreach ($maps as $map) {
    $user_info = $auth->user_info($map['user_id']);
    // 각 맵의 사용자 정보 가져옴
    $tag = $hash_tag->get_tag_id_by_map($map['map_id']);
    // 태그 정보
    foreach ($tag as $tag_id) {
        $tag_name .= "#" . $hash_tag->get_tag_name($tag_id) . " ";
        // 태그 네임 저장
    }
    if ($Img_ctl->is_map_liker($map['map_id'], $_SESSION['user_id'])) {
        $is_like = 'true';
    } else {
        $is_like = 'false';
Example #2
0
<?php

include '../Class/mapLoad.php';
$mapLoad = new mapLoad();
$maps = $mapLoad->getMapAllCapture();
for ($i = 0; $i < count($maps); $i++) {
    $mapArray['mapInfo' . $i] = $maps[$i];
}
echo urldecode(json_encode($mapArray));