include_once '../model/user_model.php'; include_once '../model/notify_model.php'; include_once '../model/friend_model.php'; include_once '../model/like_model.php'; $l = new LikeModel(); $t = new DiaryModel(); $c = new CommentModel(); $u = new UserModel(); $n = new NotifyModel(); $m = new NotifyModel(); $f = new FriendModel(); $button = ''; $p = 0; $onclick1 = ''; $user_page = $u->getUser($_GET['user_id']); if ($f->checkUserId($_SESSION['id'], $user_page['id'])) { $a = $f->getFlagFriend($_SESSION['id'], $user_page['id']); $flag['flag'] = $a['flag']; } if ($f->checkUserId($user_page['id'], $_SESSION['id'])) { $b = $f->getFlagFriend($user_page['id'], $_SESSION['id']); if ($b['flag'] == 2) { $flag['flag'] = 3; } } if (!$f->checkUserId($_SESSION['id'], $user_page['id']) && !$f->checkUserId($user_page['id'], $_SESSION['id'])) { $flag['flag'] = 0; } if ($_GET['friend'] != $flag['flag']) { header('Location: ../404.php'); }
<?php $f = new FriendModel(); if ($f->checkUserId($user_page['id'], $_SESSION[id])) { }