$sql .= "has_pool = '" . magicAddSlashes($has_pool) . "', "; $sql .= "pool_type = '" . magicAddSlashes($pool_type) . "', "; $sql .= "distance_beach = '" . magicAddSlashes($distance_beach) . "', "; $sql .= "beds = '" . magicAddSlashes($beds) . "', "; $sql .= "beds_details_en = '" . magicAddSlashes($beds_details_en) . "', "; $sql .= "beds_details_fr = '" . magicAddSlashes($beds_details_fr) . "', "; $sql .= "beds_details_es = '" . magicAddSlashes($beds_details_es) . "', "; $sql .= "bathrooms = '" . magicAddSlashes($bathrooms) . "', "; $sql .= "bathrooms_details = '" . magicAddSlashes($bathrooms_details) . "', "; $sql .= "has_bbq = '" . magicAddSlashes($has_bbq) . "', "; $sql .= "price = '" . magicAddSlashes($price) . "', "; $sql .= "has_promotion = '" . magicAddSlashes($has_promotion) . "', "; $sql .= "price_promotion = '" . magicAddSlashes($price_promotion) . "', "; $sql .= "deadline_promotion = '" . magicAddSlashes($deadline_promotion) . "', "; $sql .= "google_map = '" . magicAddSlashes($google_map) . "', "; $sql .= "online = '" . magicAddSlashes($online) . "', "; $sql .= "date_modified = NOW() "; $sql .= "WHERE id = '" . intval($item_id) . "' "; $sqlConn->Execute($sql); } // redirect to same page, with action set to edit and news_id header("Location: sales_edit.php?action=edit&result=update&item_id=" . $item_id); exit; } //determine if error and text to display if ($form_error != "") { //remove leading "," from $form_error $form_error = substr($form_error, 1); //explode the form errors to get different strings to display $form_error_array = explode(",", $form_error); for ($i = 0; $i < sizeof($form_error_array); $i++) {
$filename = $file_image["name"]; $filename = $item_id . "_" . $image_id . "_" . $filename; $filename = cleanData($filename); // include auto cropper, to limit photo filesize include_once $path_to_dynamik . "auto_cropper.inc.php"; // full - save the new (cropped) image to the folder $crop = new autoCropper(imagecreatefromjpeg($file_image["tmp_name"]), FILES_PATH . FILES_ACTIVITIES_LARGE . $filename, IMG_ACTIVITIES_LARGE_WIDTH, IMG_ACTIVITIES_LARGE_HEIGHT, IMG_ACTIVITIES_LARGE_FIXED, 100, array(255, 255, 255)); $crop->processImage(); // medium - save the new (cropped) image to the folder $crop = new autoCropper(imagecreatefromjpeg($file_image["tmp_name"]), FILES_PATH . FILES_ACTIVITIES_MEDIUM . $filename, IMG_ACTIVITIES_MEDIUM_WIDTH, IMG_ACTIVITIES_MEDIUM_HEIGHT, IMG_ACTIVITIES_MEDIUM_FIXED, 100, array(255, 255, 255)); $crop->processImage(); // thumb - save the new (cropped) image to the folder $crop = new autoCropper(imagecreatefromjpeg($file_image["tmp_name"]), FILES_PATH . FILES_ACTIVITIES_THUMBS . $filename, IMG_ACTIVITIES_THUMBS_WIDTH, IMG_ACTIVITIES_THUMBS_HEIGHT, IMG_ACTIVITIES_THUMBS_FIXED, 100, array(255, 255, 255)); $crop->processImage(); // update the filename in [pictures] $sql = "UPDATE activity_photos SET image = '" . magicAddSlashes($filename) . "' WHERE id = '" . magicAddSlashes($image_id) . "' "; $sqlConn->Execute($sql); } // send to listing page header("Location: activities_edit.php?action=edit&result=update&item_id=" . $item_id . "#pictures"); exit; } //determine if error and text to display if ($form_error != "") { //remove leading "," from $form_error $form_error = substr($form_error, 1); //explode the form errors to get different strings to display $form_error_array = explode(",", $form_error); for ($i = 0; $i < sizeof($form_error_array); $i++) { if ($form_error_array[$i] == "1") { $error_str .= "<li>Certaines informations sont manquantes. Veuillez vérifier les champs avec un *</li>";
$filename = $file_image["name"]; $filename = $item_id . "_" . $filename; $filename = cleanData($filename); // include auto cropper, to limit photo filesize include_once $path_to_dynamik . "auto_cropper.inc.php"; // full - save the new (cropped) image to the folder $crop = new autoCropper(imagecreatefromjpeg($file_image["tmp_name"]), FILES_PATH . FILES_CONTACTS_LARGE . $filename, IMG_CONTACTS_LARGE_WIDTH, IMG_CONTACTS_LARGE_HEIGHT, IMG_CONTACTS_LARGE_FIXED, 100, array(255, 255, 255)); $crop->processImage(); // medium - save the new (cropped) image to the folder $crop = new autoCropper(imagecreatefromjpeg($file_image["tmp_name"]), FILES_PATH . FILES_CONTACTS_MEDIUM . $filename, IMG_CONTACTS_MEDIUM_WIDTH, IMG_CONTACTS_MEDIUM_HEIGHT, IMG_CONTACTS_MEDIUM_FIXED, 100, array(255, 255, 255)); $crop->processImage(); // thumb - save the new (cropped) image to the folder $crop = new autoCropper(imagecreatefromjpeg($file_image["tmp_name"]), FILES_PATH . FILES_CONTACTS_THUMBS . $filename, IMG_CONTACTS_THUMBS_WIDTH, IMG_CONTACTS_THUMBS_HEIGHT, IMG_CONTACTS_THUMBS_FIXED, 100, array(255, 255, 255)); $crop->processImage(); // update the filename in [pictures] $sql = "UPDATE contacts SET image = '" . magicAddSlashes($filename) . "' WHERE id = '" . magicAddSlashes($image_id) . "' "; $sqlConn->Execute($sql); } // send to listing page header("Location: contacts_edit.php?action=edit&result=update&item_id=" . $item_id . "#pictures"); exit; } //determine if error and text to display if ($form_error != "") { //remove leading "," from $form_error $form_error = substr($form_error, 1); //explode the form errors to get different strings to display $form_error_array = explode(",", $form_error); for ($i = 0; $i < sizeof($form_error_array); $i++) { if ($form_error_array[$i] == "1") { $error_str .= "<li>Certaines informations sont manquantes. Veuillez vérifier les champs avec un *</li>";
include $path_to_dynamik . "format_functions.inc.php"; // include DB fetch functions include $path_to_dynamik . "db_fetch_fncs.inc.php"; // include DB insert functions include $path_to_dynamik . "db_ops_fncs.inc.php"; // init variables $order = trim($_POST["order"]); $item_id = trim($_POST["item_id"]); // init page va $listings_page = "index.php"; // make sure that an order list is set if ($order == "") { header("Location: " . $listings_page); exit; } // check artist_id format, if not numeric then send to listing page if (!is_numeric($item_id)) { header("Location: " . $listings_page); exit; } // go through the array of ids in the order they've been reassigned in, and update each record in [projects_photos] $new_order_array = explode("|", $order); // loop through array for ($i = 0; $i < sizeof($new_order_array); $i++) { // define query to update $sql = "UPDATE rental_photos SET rank = '" . magicAddSlashes($i + 1) . "' WHERE id = '" . magicAddSlashes($new_order_array[$i]) . "' AND rentals_id = '" . magicAddSlashes($item_id) . "' "; $sqlConn->Execute($sql); } // send to main page header("Location: rentals_edit.php?action=edit&result=update&item_id=" . $item_id . "#pictures"); exit;
include $path_to_dynamik . "format_functions.inc.php"; // include DB fetch functions include $path_to_dynamik . "db_fetch_fncs.inc.php"; // include DB insert functions include $path_to_dynamik . "db_ops_fncs.inc.php"; // init variables $order = trim($_POST["order"]); $item_id = trim($_POST["item_id"]); // init page va $listings_page = "index.php"; // make sure that an order list is set if ($order == "") { header("Location: " . $listings_page); exit; } // check artist_id format, if not numeric then send to listing page if (!is_numeric($item_id)) { header("Location: " . $listings_page); exit; } // go through the array of ids in the order they've been reassigned in, and update each record in [projects_photos] $new_order_array = explode("|", $order); // loop through array for ($i = 0; $i < sizeof($new_order_array); $i++) { // define query to update $sql = "UPDATE activity_photos SET rank = '" . magicAddSlashes($i + 1) . "' WHERE id = '" . magicAddSlashes($new_order_array[$i]) . "' AND activities_id = '" . magicAddSlashes($item_id) . "' "; $sqlConn->Execute($sql); } // send to main page header("Location: activities_edit.php?action=edit&result=update&item_id=" . $item_id . "#pictures"); exit;