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