$value) { $link .= "&".$key."=".$value; } } elseif (isset($get["retour"]) && $get["retour"] == "form" && isset($emplacements[0])) { // $emplacement = $emplacements[0]; // $link = OM_ROUTE_TAB; $link .= "&"; // $link .= "obj=".$emplacement['nature']."&idx=".$emplacement['emplacement']."&action=3"; } else { // $link = OM_ROUTE_DASHBOARD; } // return $link; } // Cette fonction permet d'afficher le bouton retour function display_button_back($link = "") { // echo "
\n"; // echo ""; // echo __("Retour"); // echo "\n"; // echo "
\n"; } // $emplacements = array(); // $mode = 0; // MODE 1 - Visualisation d'un seul objet sur le plan // $obj = ""; if (isset($_GET['obj'])) { $obj = $_GET['obj']; } // $idx = ""; if (isset($_GET['idx'])) { $idx = $_GET['idx']; } // if ($obj != "" && $idx != "") { $mode = 1; } // if ($mode == 1 && (strpos($obj, "/") !== false || !file_exists("../obj/".$obj.".class.php"))) { $class = "error"; $message = __("L'objet est invalide."); $f->addToMessage($class, $message); $f->setFlag(NULL); $f->display(); die(); } // MODE 2 - Visualisation de tous les objets sur le plan // $plan = ""; if (isset($_GET['plan'])) { $plan = $_GET['plan']; } // $nature = ""; if (isset($_GET['nature'])) { $nature = $_GET['nature']; } // if ($mode == 0 && $plan != "") { $mode = 2; } // if ($mode == 1) { // require "../obj/".$obj.".class.php"; $emplacement = new $obj($idx, $f->db, 0); // $plan = $emplacement->getVal("plans"); // $emplacements[] = array( "emplacement" => $emplacement->getVal("emplacement"), "positionx" => $emplacement->getVal("positionx"), "positiony" => $emplacement->getVal("positiony"), "nature" => $emplacement->getVal("nature"), "famille" => $emplacement->getVal("famille"), "libre" => $emplacement->getVal("libre"), "terme" => $emplacement->getVal("terme"), ); } // if ($mode == 2) { // $sql = "select * from ".DB_PREFIXE."emplacement where plans='".$plan."'"; if ($nature != "") { $sql .= " and nature='".$nature."'"; } $res = $f->db->query($sql); $f->addToLog("visualisationplan.php: db->query(\"".$sql."\");", VERBOSE_MODE); $f->isDatabaseError($res); while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) { $emplacements[] = $row; } } // require_once "../obj/plans.class.php"; $plans = new plans($plan, $f->db, NULL); // $imageplan = $f->storage->getPath($plans->getVal("fichier")); // if (!file_exists($imageplan)) { $class = "error"; $message = __("L'objet est invalide car il n y a pas de plan selectionné pour cet enregistrement."); $f->addToMessage($class, $message); $f->setFlag(NULL); $f->display(); die(); } // $sql = "select planslib from ".DB_PREFIXE."plans where plans='".$plan."'"; $plan_libelle = $f->db->getone($sql); $f->addToLog("app/widget_localisation.php: db->getone(\"".$sql."\");", VERBOSE_MODE); $f->isDatabaseError($plan_libelle); // $html_body = ""; $f->setHTMLBody($html_body); // $f->setFlag("htmlonly"); $f->display(); // $f->displayStartContent(); // $f->setTitle(__("Localisation")." -> ".$plan_libelle." (".$plan.")"); $f->displayTitle(); /** * */ // display_button_back(calculate_back_link($_GET, $emplacements)); /** * */ // $size = getimagesize($imageplan); // echo "\n"; // foreach($emplacements as $i => $emplacement) { // echo "
\n"; // echo "\t"; // echo "\".\""; // echo "\n"; // echo "
\n"; } // echo "\n\n"; // echo "
\n"; /** * */ // display_button_back(calculate_back_link($_GET, $emplacements)); /** * */ // $f->displayEndContent();