示例#1
0
     if (isExist($post_body) !== true) {
         $errors[] = 'つぶやきを入力してください';
     } else {
         if (isOvertext($post_body, 140) !== true) {
             $erros[] = 'つぶやきは140文字以内で入力してください';
         }
     }
     if (count($errors) === 0) {
         $post->postCreate($db, $login_id, $color_id, $post_body);
         include_once '../include/common/goto_main.php';
     }
     // フォロー処理
 } else {
     if (getPost('action_id') === 'follow') {
         $follower_user_id = getPost('follower_user_id');
         $follow->createFollow($db, $login_id, $follower_user_id);
         include_once '../include/common/goto_main.php';
         // アンフォロー処理
     } else {
         if (getPost('action_id') === 'unfollow') {
             $follower_user_id = getPost('follower_user_id');
             $follow->unfollowUser($db, $login_id, $follower_user_id);
             include_once '../include/common/goto_main.php';
             // うついね処理
         } else {
             if (getPost('action_id') === 'create_good') {
                 $good_post_id = getPost('good_post_id');
                 if (!$good->createGood($db, $login_id, $good_post_id)) {
                     $errors[] = 'うついねに失敗しました';
                 }
                 include_once '../include/common/goto_main.php';