if (!empty($_GET['final']) and (!empty($_POST) or !empty($postdata))) { if (!$memberloginkey) { $_SESSION['ni:name'] = $_POST['mascotName']; $_SESSION['ni:mean'] = $_POST['mean']; header("content-type: text/html; charset=utf-8"); echo "處理中,請稍候..."; echo "<script>"; echo "alert('您尚未登入,正在導引您到FB登入...');"; echo "location.href='/login/facebook'"; echo "</script>"; exit; } if (!empty($_POST)) { $postdata = array('user_id' => $user_id, 'mascotName' => $_POST['mascotName'], 'mean' => $_POST['mean']); } dbconn::update_tripname($user_id); $strlen = mb_strlen($postdata['mascotName'], "utf-8"); if ($strlen > 0 and $strlen <= 5) { $showonealert = 0; $oldtripname = dbconn::checktripname($user_id); if (!empty($oldtripname)) { $showonealert = 1; $word = $oldtripname['mem_tripname']; $imgurl = $oldtripname['mem_imgfile']; $imgkey = true; } else { $word = $postdata['mascotName']; /* $word_strlen = mb_strlen( $word, "utf-8"); $font_size = 25; $width = (33*$word_strlen);