$gender = $_REQUEST['gender']; $birthday = $_REQUEST['birthday']; $country = $_REQUEST['country']; $zip = $_REQUEST['zip']; step1($gender, $birthday, $country, $zip); break; case 'step2': $feet = $_REQUEST['feet']; $inches = $_REQUEST['inches']; $pounds = $_REQUEST['pounds']; step2($feet, $inches, $pounds); break; case 'imgUpload': $imgType = $_REQUEST['imgType']; $imgData = $_REQUEST['imgData']; imgUpload($imgType, $imgData); break; case 'startDiet': $currentWeight = $_REQUEST['currentWeight']; $targetWeight = $_REQUEST['targetWeight']; $targetDate = $_REQUEST['targetDate']; startDiet($currentWeight, $targetWeight, $targetDate); break; case 'updateWeight': $weight = $_REQUEST['weight']; updateWeight($weight); break; case 'statusShare': $statusText = $_REQUEST['statusText']; $imgType = $_REQUEST['imgType']; $imgData = $_REQUEST['imgData'];
if (isset($_POST['upfile'])) { $unique = md5(date("YmdHms")); $activity = new Activity(); $activity->title = $_POST['name']; $activity->description = str_ireplace("'", "", str_ireplace("\"", "", htmlspecialchars_decode($_POST['description']))); $activity->date = $_POST['year'] . "-" . $_POST['mounth'] . "-" . $_POST['day'] . " " . $_POST['hour'] . ":" . $_POST['min'] . ":00"; $activity->category = $_POST['category']; $activity->unique = $unique; $act->addActivity($activity); $activitId = $act->loadActivityIdByUnique($unique); $images = array(); for ($x = 1; $x < 6; $x++) { if ($_FILES['img' . $x]['name'] != "") { $img = new Image(); $img->activityId = $activitId; $img->path = imgUpload($_FILES['img' . $x]); $images[] = $img; } } foreach ($images as $image) { $imgDAO->addImage($image); } // } if (isset($_POST['addEvent'])) { $event = array(); $event['activityId'] = $_POST['eId']; $event['date'] = $_POST['year'] . "-" . $_POST['mounth'] . "-" . $_POST['day'] . " " . $_POST['hour'] . ":" . $_POST['min'] . ":00"; $event['price'] = $_POST['price']; $event['ticket'] = $_POST['ticketSales']; $event['scene'] = $_POST['scene'];