/[openfoncier]/trunk/app/tab_wid.php
ViewVC logotype

Contents of /trunk/app/tab_wid.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 88 - (show annotations)
Thu Aug 25 09:59:07 2011 UTC (13 years, 5 months ago) by fraynaud
File size: 2354 byte(s)
Réorganisation du dossier spécifique de l'application

1 <?php
2 /**
3 *
4 *
5 * @package openmairie_exemple
6 * @version SVN : $Id: tab.php 234 2010-11-18 15:00:55Z fmichon $
7 */
8
9 require_once "../obj/utils.class.php";
10 $f = new utils("nohtml");
11
12 /**
13 * Initialisation des variables
14 */
15 // Nom de l'objet metier
16 (isset($_GET['obj']) ? $obj = $_GET['obj'] : $obj = "");
17 // Premier enregistrement a afficher
18 (isset($_GET['premier']) ? $premier = $_GET['premier'] : $premier = 0);
19 // Colonne choisie pour le tri
20 (isset($_GET['tricol']) ? $tricol = $_GET['tricol'] : $tricol = "");
21 // Chaine recherchee
22 if (isset($_POST['recherche'])) {
23 $recherche = $_POST['recherche'];
24 if (get_magic_quotes_gpc()) {
25 $recherche1 = StripSlashes($recherche);
26 } else {
27 $recherche1 = $recherche;
28 }
29 } else {
30 if (isset($_GET['recherche'])) {
31 $recherche = $_GET['recherche'];
32 if (get_magic_quotes_gpc()) {
33 $recherche1 = StripSlashes($recherche);
34 } else {
35 $recherche1 = $recherche;
36 }
37 } else {
38 $recherche = "";
39 $recherche1 = "";
40 }
41 }
42 // Colonne choisie pour la selection
43 if (isset($_POST['selectioncol'])) {
44 $selectioncol = $_POST['selectioncol'];
45 } else {
46 if (isset($_GET['selectioncol'])) {
47 $selectioncol = $_GET['selectioncol'];
48 } else {
49 $selectioncol = "";
50 }
51 }
52 // ???
53 $ico = "";
54 // ???
55 $hiddenid = 0;
56
57 /**
58 * Verification des parametres
59 */
60 if (strpos($obj, "/") !== false
61 or !file_exists("../sql/".$f->phptype."/".$obj.".inc")) {
62 $class = "error";
63 $message = _("L'objet est invalide.");
64 $f->addToMessage($class, $message);
65 $f->setFlag(NULL);
66 $f->display();
67 die();
68 }
69
70
71 // tableau
72
73 $href[0] = array("lien" => "#", "id" => "", "lib" => "", );
74 $href[1] = array("lien" => "", "id" => "", "lib" => "", );
75 $href[2] = array("lien" => "#", "id" => "", "lib" => "", );
76
77
78 require_once "../sql/".$f->phptype."/".$obj.".inc";
79
80
81 require_once "om_widget.class.php";
82
83 // $edition non pris en compte
84
85 if (!isset($options)) {
86 $options = array();
87 }
88 //
89 $tb = new widget("../tdb/tab_wid.php", $table, $serie, $champAffiche, $champRecherche, $tri, $selection, $edition, $options);
90 //
91 $params = array(
92 "obj" => $obj,
93 "premier" => $premier,
94 "recherche" => $recherche,
95 "selectioncol" => $selectioncol,
96 "tricol" => $tricol,
97 );
98
99
100 $tb->display($params, $href, $f->db, "wid", false);
101
102
103 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26