0) { $input_id = $_id; } else { $input_id = $_REQUEST["input_id"]; } if ($input_id <> '') { $query = "SELECT * FROM facebook_header WHERE id = '" . $input_id . "' LIMIT 1"; $result = @mysqli_query($GLOBALS['mysql_con'], $query); if (@mysqli_num_rows($result) == 1) { $input_facebook = @mysqli_fetch_array($result); require_once("edit_facebook_cardform.inc.php"); } } else { $input_facebook = array(); require_once("edit_facebook_cardform.inc.php"); } } function delete_facebook() { if ($_REQUEST["input_id"] <> '') { $query = "DELETE FROM facebook_header WHERE id = '" . $_REQUEST["input_id"] . "' LIMIT 1"; @mysqli_query($GLOBALS['mysql_con'], $query); // zuordnung von Seiten loeschen $query = "DELETE FROM main_page_link WHERE main_sitepart_id = 9 AND main_sitepart_header_id = '" . $_REQUEST["input_id"]."'"; @mysqli_query($GLOBALS['mysql_con'], $query); update_sitepart_changes(9, $_REQUEST["input_id"], TRUE); } require_once("edit_facebook_listform.inc.php"); } function save_facebook() { $translation = \DynCom\mysyde\common\classes\Registry::get("translation"); $input_id = ""; $input_show_faces = ($_POST["input_show_faces"] == "on") ? 1 : 0; $input_show_posts = ($_POST["input_show_posts"] == "on") ? 1 : 0; $input_all_languages = ($_POST["input_all_languages"] == "on") ? 1 : 0; if ($_REQUEST["input_id"] <> '') { $query = "UPDATE facebook_header SET description = '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST["input_description"]) . "', modified_date = " . time() . ", modified_user = " . (int)$GLOBALS["admin_user"]['id'] . ", width = '" . (int)$_REQUEST["input_width"] . "', height = '" . (int)$_REQUEST["input_height"] . "', show_faces = " . $input_show_faces . ", show_posts = " . $input_show_posts . ", url = '" . $_REQUEST["input_url"] . "', all_languages = " . $input_all_languages . " WHERE id = '" . $_REQUEST["input_id"] . "' LIMIT 1"; $inserted = FALSE; $input_id = $_REQUEST["input_id"]; } else { $query = "INSERT INTO facebook_header (main_language_id, description, modified_date, modified_user, width, height, show_faces, show_posts, url, all_languages) VALUES ( " . (int)$GLOBALS["language"]['id'] . ", '" . mysqli_real_escape_string($GLOBALS['mysql_con'], $_REQUEST['input_description']) . "', " . time() . ", " . (int)$GLOBALS["admin_user"]['id'] . ", '" . (int)$_REQUEST["input_width"] . "', '" . (int)$_REQUEST["input_height"] . "', " . $input_show_faces . ", " . $input_show_posts . ", '" . $_REQUEST["input_url"] . "', " . $input_all_languages . " )"; $inserted = TRUE; } if (($_REQUEST["input_description"] == '')) { $messages[] = "