//------------------------------------------------------------------------------------------ // Script: setup.inc.php // Author: Alex Gignac - alex@ax2.ca // Date: Feb 2009 // // Define include files for the site // // Parameters: // none // //------------------------------------------------------------------------------------------ //start session session_start(); // include global constants include_once $path_to_dynamik . "config.inc.php"; // include connection script include_once $path_to_dynamik . "connect.inc.php"; // include no cache headers include_once $path_to_dynamik . "no_cache.inc.php"; // include format functions include_once $path_to_dynamik . "format_functions.inc.php"; // include DB fetch functions include_once $path_to_dynamik . "db_fetch_fncs.inc.php"; // include lang setup include_once $path_to_dynamik . "lang_setup.inc.php"; // fetch locations from [locations] table $locations_result = fetchLocations($site_lang, $searchtype); $locations_sales_result = fetchLocations($site_lang, 'sales'); $locations_rentals_result = fetchLocations($site_lang, 'rentals', $project_id);
$error_str .= "<li>Veuillez dûement remplir la section "Détails"</li>"; } elseif ($form_error_array[$i] == "1c") { $error_str .= "<li>Veuillez dûement remplir la section "Tarifs" or "Promotion"</li>"; } elseif ($form_error_array[$i] == "1d") { $error_str .= "<li>Veuillez ajouter une image comme photo principale dans la section "Photo Principale"</li>"; } elseif ($form_error_array[$i] == "1e") { $error_str .= "<li>Veuillez dûement remplir la section "Promotion"</li>"; } elseif ($form_error_array[$i] == "2a" || $form_error_array[$i] == "2b" || $form_error_array[$i] == "2c") { $error_str .= "<li>Image: Erreur de transfert. Essayez à nouveau.</li>"; } elseif ($form_error_array[$i] == "2d") { $error_str .= "<li>Image: Fichier doit être un .jpg</li>"; } } } // fetch locations from [locations] table $locations_result = fetchLocations(CMS_LANG); // set id for css purposes $id = 2; // global vars for includes $g_section = 'Ventes'; $g_sub_section = $_GET['action'] != '' ? $_GET['action'] : 'Add'; // include header include 'inc/header.inc.php'; // include menu include 'inc/menu.inc.php'; ?> <?php if ($form_error != "") { ?> <div class="error_msg">
<?php include "../functions/init.php"; if (isset($_POST['create-league'])) { $insert_id = dbCreateLeague($_POST); } $locations = fetchLocations(); include $path . "includes/head.php"; include $path . "includes/admin-nav.php"; if (isset($insert_id)) { echo '<div class="alert alert-success alert-dismissible"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span></button> Success! <a href="../preview/' . $insert_id . '">Preview the league</a>, or create another below. </div>'; } ?> <div class="container container-main"> <a href="admin/"><i class="fa fa-arrow-left"></i> Back to all leagues</a> <h1>Create a League</h1> <!-- FORM START--> <form method="post" class="col-md-6"> <!-- SEASON START --> <div class="form-group form-group-lg"> <label class="control-label">Season</label>
// load type of items to display (online / offline) $type = trim($_GET["type"]); // make sure type is set if ($type == "") { $type = "online"; } // transform $type into $online (Y/N) if ($type == "offline") { $online = "N"; } else { $online = "Y"; } // get items total $items_total = fetchSimpleTotal("locations", "online = '" . $online . "'"); // get items results $items_result = fetchLocations(CMS_LANG, '', 0, ''); // set id for css purposes $id = 5; // global vars for includes $g_section = 'Destinations'; $g_sub_section = $type; $g_sub_sub_section = $items_total; // include header include 'inc/header.inc.php'; // include menu include 'inc/menu.inc.php'; ?> <?php if ($_GET['result'] == 'delete_ok') { ?>