edit_personname($id, $new_name, $new_surname); } //-----------------------------------china name-------------------------// if (!empty($_POST["chinaname"]) || !empty($_POST["chinaname_pinyin"]) || !empty($_POST["chinaname_thai"])) { echo "8;pppp"; $gen_id = $_POST["generation"]; // print_r($_POST); $chinaname = $_POST["chinaname"]; $chinaname_pinyin = $_POST['chinaname_pinyin']; $chinaname_th = $_POST['chinaname_thai']; add_chinaname($id, $gen_id, $chinaname, $chinaname_pinyin, $chinaname_th); } // if (isset($_POST["title"]) && !empty($_POST["title"])) { $title = $_POST["title"]; edit_title($id, $title); } if (isset($_POST["gender"]) && !empty($_POST["gender"])) { $gender = $_POST["gender"]; edit_gender($id, $gender); } if (isset($_POST["birthday"]) && !empty($_POST["birthday"])) { $birthday = $_POST["birthday"]; edit_birthday($id, $birthday); } if (isset($_POST["maritalstatus"]) && !empty($_POST["maritalstatus"])) { $maritalstatus = $_POST["maritalstatus"]; edit_maritalstatus($id, $maritalstatus); } if (isset($_POST["status"]) && !empty($_POST["status"])) { $status = $_POST["status"];
echo json_encode($result); } else { switch ($action) { /* Получение всех титулов */ case "getTitles": get_titles(); break; /* Добавление титула */ /* Добавление титула */ case "addTitle": add_title($postdata); break; /* Изменение титула */ /* Изменение титула */ case "editTitle": edit_title($postdata); break; /* Получение узлов титула */ /* Получение узлов титула */ case "getTitleNodes": get_title_nodes($postdata); break; case "getBoundaryNodes": get_boundary_nodes($postdata); break; /* Получение всех статусов титула */ /* Получение всех статусов титула */ case "getStatuses": get_statuses(); break; case "getBuildingPlans":
if (!empty($_POST["submit"]) && (empty($_POST[form_title]) || empty($_POST[form_subtitle]))) { //display an error message in case the blogger didn´t write a title or the text. //as the image is optinal if an image is not uploaded there wont be an error message. echo '<p style="color: red;">Please enter a title and subtitle</p>' . PHP_EOL; } //p("Imparted by: ".$subject['Professor']." semester: ".$subject["Semester"]); } function confirm_title() { //blog title name $inputTitle = $_POST[form_title]; $inputSubTitle = $_POST[form_subtitle]; //$replace=str_replace("\r","<br>",$inputData); //if (!empty($_POST[form_blog_input_name]) && !empty($_POST[form_blog_title_name]) ) { if (!empty($inputTitle) && !empty($inputSubTitle)) { //creation of a folder for each blog. In that folder the title, text and optional image will be stored. //$installationPath= "./installations/installation".$totalPosts."/"; $informationPath = "./titles/title/"; $titlePath = $informationPath . "title.txt"; $subtitlePath = $informationPath . "subtitle.txt"; mkdir($informationPath); file_put_contents($titlePath, htmlspecialchars($inputTitle), LOCK_EX); file_put_contents($subtitlePath, htmlspecialchars($inputSubTitle), LOCK_EX); //we want the image to be in the correct format and size. echo '<h3><a href="index.php">Go to your page!</a></h3>'; } else { echo "introduce data"; } } edit_title(); confirm_title();