<?php include '../Class/Hash_tag.php'; // POST 로 온 map_id 에 해당하는 태그 출력 $hash_tag = new Hash_tag(); echo $hash_tag->get_tag($_POST['map_id']);
<?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(); session_start(); // num 값이 있는 경우 num값 만큼만 가져옴 (기본값 5) if (isset($_POST['num'])) { $maps = $mapLoad->getMapFeedCapture($_SESSION['user_id'], $_POST['num']); } else { $maps = $mapLoad->getMapFeedCapture($_SESSION['user_id']); } $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 {
<?php include '../Class/Hash_tag.php'; // POST 로 온 map_id 에 해당하는 태그 출력 $hash_tag = new Hash_tag(); $result_map_id = $hash_tag->get_map($_POST['tag_name']); echo urldecode(json_encode($result_map_id));
<?php include '../Class/Hash_tag.php'; // POST 로 온 map_id 에 해당하는 태그들 DB에 넣음 // 해시태그 갯수만큼 불러와야함 (추후에 배열로 받는걸로 바꿔야함) $hash_tag = new Hash_tag(); $hash_tag->set_tag($_POST['tag_name'], $_POST['map_id']);
<?php include '../Class/mapLoad.php'; include '../Class/Auth.php'; include '../Class/Hash_tag.php'; include '../Class/Img_ctl.php'; //session_start(); //if ($_SESSION['is_login']) { $mapLoad = new mapLoad(); $userLoad = new Auth(); $hash_tag = new Hash_tag(); $Img_ctl = new Img_ctl(); $mapArray = array(); // POST로 온 tag_name 가져옴 $result_map_id = $hash_tag->get_map($_POST['tag_name']); if (!empty($result_map_id)) { // 각 맵ID 별로 가져옴 foreach ($result_map_id as $map_id) { $map_info = $mapLoad->get_map_info($map_id); // 맵정보 $user_info = $userLoad->user_info($map_info['user_id']); // 유저정보 $tag = $hash_tag->get_tag_id_by_map($map_id); // 태그 정보 foreach ($tag as $tag_id) { $tag_name .= "#" . $hash_tag->get_tag_name($tag_id) . " "; // 태그 네임 저장 } if ($Img_ctl->is_img_liker($_POST['img_id'], $_SESSION['user_id'])) { $is_like = 'ture'; } else {
<?php /*// CONTROLLER, MODEL 불러오기 include '../Class/Auth.php'; // 회원가입 $auth = new Auth; $auth->login(); $_SESSION['test'] = '테스트'; $_SESSION['test2'] = '테스트2'; $_SESSION['test3'] = '테스트3'; var_dump($_SESSION); session_start('tesT!!!'); //session_destroy($name); echo $_COOKIE['PHPSESSID']; echo "<br>"; if ($_COOKIE['PHPSESSID'] === session_id()) { echo TRUE; }*/ include '../Class/Hash_tag.php'; $hash_tag = new Hash_tag(); echo $hash_tag->get_tag();
<?php include '../Class/mapLoad.php'; include '../Class/Hash_tag.php'; session_start(); if ($_SESSION['is_login'] === true) { $mapReg = new mapLoad(); $reg_result = $mapReg->upload_map(array('user_id' => $_SESSION['user_id'], 'map_name' => $_POST['map_name'], 'map_locate' => $_POST['map_locate'], 'map_type' => $_POST['map_type'])); // tag_name과 맵을 넣은 결과값이 true일 경우만 if (!empty($_POST['tag_name']) && $reg_result['db_result']) { // POST 로 온 map_id 에 해당하는 태그들 DB에 넣음 // 해시태그 갯수만큼 불러와야함 (추후에 배열로 받는걸로 바꿔야함) $hash_tag = new Hash_tag(); $tag = explode(" ", trim($_POST['tag_name'])); foreach ($tag as $tag_name) { $hash_result = $hash_tag->set_tag($tag_name, $reg_result['map_id']); if (!$hash_result) { break; } } } else { $hash_result = true; } if ($reg_result['db_result'] && $hash_result) { $result = array('result' => 'true', 'map_id' => (string) $reg_result['map_id']); } else { $result = array('result' => 'false'); } } else { $result = array('result' => 'false', 'msg' => '로그인이 필요합니다'); }