Initial commit
[2ch-be.git] / dev-test / follow.php
blob8105967717ccfac9cd0998d7a9914d60535acc77
1 <?php
2 include("encrypt.php");
3 $notipath = new Message;
4 $fObj = new Follower($notipath);
5 if (!isset($_COOKIE['DMDM']) && !isset($_COOKIE['MDMD'])) {
6 echo "NG";
7 exit;
10 $userID = strip_tags(trim($_POST['userID']));
11 $userID = (filter_var($userID, FILTER_VALIDATE_INT)) ? $userID : "NG";
13 $exists = $fObj->checkFollow($userID);
15 if(is_bool($exists)){
16 if(!$exists){
17 $fObj->addLines($userID);
18 echo "success";
19 }else{
20 $array = $fObj->array;
21 $finalValue = $fObj->removeID($array, $userID);
22 echo "remove me";
24 }else{
25 die("NG");