Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: bazar.fonct.php,v 1.57.2.10 2007-03-07 17:20:19 jp_milcent Exp $
|
22 |
// CVS : $Id: bazar.fonct.php,v 1.57.2.11 2007-03-07 17:40:57 jp_milcent Exp $
|
23 |
/**
|
23 |
/**
|
24 |
*
|
24 |
*
|
25 |
* Fonctions du module bazar
|
25 |
* Fonctions du module bazar
|
26 |
*
|
26 |
*
|
27 |
*
|
27 |
*
|
Line 29... |
Line 29... |
29 |
//Auteur original :
|
29 |
//Auteur original :
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
31 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
32 |
//Autres auteurs :
|
32 |
//Autres auteurs :
|
33 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@version $Revision: 1.57.2.10 $ $Date: 2007-03-07 17:20:19 $
|
34 |
*@version $Revision: 1.57.2.11 $ $Date: 2007-03-07 17:40:57 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
Line 1051... |
Line 1051... |
1051 |
/** baz_s_inscrire() affiche le formulaire qui permet de s'inscrire pour recevoir des annonces d'un type
|
1051 |
/** baz_s_inscrire() affiche le formulaire qui permet de s'inscrire pour recevoir des annonces d'un type
|
1052 |
*
|
1052 |
*
|
1053 |
* @return string le code HTML
|
1053 |
* @return string le code HTML
|
1054 |
*/
|
1054 |
*/
|
1055 |
function baz_s_inscrire() {
|
1055 |
function baz_s_inscrire() {
|
1056 |
$res= '<h2>'.BAZ_S_INSCRIRE_AUX_ANNONCES.'</h2><br />'."\n";
|
1056 |
$res= '<h2>'.BAZ_S_INSCRIRE_AUX_ANNONCES.'</h2>'."\n";
|
1057 |
if (isset($_GET['inscrip'])) {
|
1057 |
if (isset($_GET['inscrip'])) {
|
1058 |
//cas d'une desinscription
|
1058 |
//cas d'une desinscription
|
1059 |
if ($_GET['inscrip']==0) {
|
1059 |
if ($_GET['inscrip']==0) {
|
1060 |
$requete='DELETE FROM bazar_abonnement WHERE ba_id_utilisateur='.$GLOBALS['id_user'].' AND ba_id_rubrique='.$_GET['idtypeannonce'];
|
1060 |
$requete='DELETE FROM bazar_abonnement WHERE ba_id_utilisateur='.$GLOBALS['id_user'].' AND ba_id_rubrique='.$_GET['idtypeannonce'];
|
1061 |
}
|
1061 |
}
|
Line 1068... |
Line 1068... |
1068 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
1068 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
1069 |
}
|
1069 |
}
|
1070 |
}
|
1070 |
}
|
Line 1071... |
Line 1071... |
1071 |
|
1071 |
|
1072 |
if ($GLOBALS['AUTH']->getAuth()) {
|
1072 |
if ($GLOBALS['AUTH']->getAuth()) {
|
1073 |
$res .= BAZ_LAIUS_S_ABONNER.'<br /><br />'."\n";
|
1073 |
$res .= '<p id="laius_abonnement">'.BAZ_LAIUS_S_ABONNER.'</p>'."\n";
|
1074 |
//requete pour obtenir l'id et le label des types d'annonces
|
1074 |
//requete pour obtenir l'id et le label des types d'annonces
|
1075 |
$requete = 'SELECT bn_id_nature, bn_label_nature, bn_image_titre '.
|
1075 |
$requete = 'SELECT bn_id_nature, bn_label_nature, bn_image_titre '.
|
1076 |
'FROM bazar_nature WHERE 1'; /*bn_ce_id_menu='.$GLOBALS['_BAZAR_']['categorie_nature'];*/
|
1076 |
'FROM bazar_nature WHERE 1'; /*bn_ce_id_menu='.$GLOBALS['_BAZAR_']['categorie_nature'];*/
|
1077 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
1077 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
1078 |
if (DB::isError($resultat)) {
|
1078 |
if (DB::isError($resultat)) {
|
1079 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
1079 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
Line 1080... |
Line 1080... |
1080 |
}
|
1080 |
}
|
1081 |
|
1081 |
|
1082 |
$table = new HTML_Table(array ('width' => '100%', 'class' => 'table_bazar')) ;
|
- |
|
1083 |
$table->addRow(array ('<b>'.BAZ_TYPE_ANNONCES.'</b>',
|
- |
|
1084 |
'<b>'.BAZ_STATUT.'</b>',
|
- |
|
1085 |
'<b>'.BAZ_PASSER_EN.'</b>',
|
1082 |
$table = new HTML_Table(array ('width' => '100%', 'class' => 'table_bazar'));
|
Line 1086... |
Line 1083... |
1086 |
'<b>'.BAZ_RSS.'</b>',)) ;
|
1083 |
$table->addRow(array(BAZ_TYPE_ANNONCES, BAZ_STATUT, BAZ_PASSER_EN, BAZ_RSS));
|
1087 |
$table->setRowType (0, 'th') ;
|
1084 |
$table->setRowType(0, 'th');
|
1088 |
|
1085 |
|
1089 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
|
1086 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
|
Line 1132... |
Line 1129... |
1132 |
'<a href='.$lien_RSS->getURL().'><img src="client/bazar/images/BAZ_rss.png" alt="'.BAZ_RSS.'" /></a>'));
|
1129 |
'<a href='.$lien_RSS->getURL().'><img src="client/bazar/images/BAZ_rss.png" alt="'.BAZ_RSS.'" /></a>'));
|
1133 |
$lien_RSS->removeQueryString('annonce');
|
1130 |
$lien_RSS->removeQueryString('annonce');
|
1134 |
}
|
1131 |
}
|
1135 |
}
|
1132 |
}
|
1136 |
$table->altRowAttributes(1, array('class' => 'ligne_impaire'), array('class' => 'ligne_paire'));
|
1133 |
$table->altRowAttributes(1, array('class' => 'ligne_impaire'), array('class' => 'ligne_paire'));
|
1137 |
$table->updateColAttributes(0, array('align' => 'center'));
|
1134 |
$table->updateColAttributes(0, array('id' => 'col1'));
|
1138 |
$table->updateColAttributes(1, array('align' => 'center'));
|
1135 |
$table->updateColAttributes(1, array('id' => 'col2'));
|
1139 |
$table->updateColAttributes(2, array('align' => 'center'));
|
1136 |
$table->updateColAttributes(2, array('id' => 'col3'));
|
1140 |
$table->updateColAttributes(3, array('style' => 'text-align:center;'));
|
1137 |
$table->updateColAttributes(3, array('id' => 'col4'));
|
1141 |
$res.=$table->toHTML() ;
|
1138 |
$res.=$table->toHTML() ;
|
1142 |
}
|
1139 |
}
|
1143 |
else {
|
1140 |
else {
|
1144 |
$res .= '<p class="zone_info">'.BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR.'</p>'."\n" ;
|
1141 |
$res .= '<p class="zone_info">'.BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR.'</p>'."\n" ;
|
1145 |
$res .= '<form id="form_connexion" style="clear:both;" class="form_identification" action="' ;
|
1142 |
$res .= '<form id="form_connexion" style="clear:both;" class="form_identification" action="' ;
|
Line 1282... |
Line 1279... |
1282 |
}
|
1279 |
}
|
Line 1283... |
Line 1280... |
1283 |
|
1280 |
|
1284 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1281 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1285 |
*
|
1282 |
*
|
- |
|
1283 |
* $Log: not supported by cvs2svn $
|
- |
|
1284 |
* Revision 1.57.2.10 2007/03/07 17:20:19 jp_milcent
|
- |
|
1285 |
* Ajout du nettoyage systématique des URLs.
|
1286 |
* $Log: not supported by cvs2svn $
|
1286 |
*
|
1287 |
* Revision 1.57.2.9 2007/03/06 16:23:24 jp_milcent
|
1287 |
* Revision 1.57.2.9 2007/03/06 16:23:24 jp_milcent
|
1288 |
* Nettoyage de l'url pour la gestion des droits.
|
1288 |
* Nettoyage de l'url pour la gestion des droits.
|
1289 |
*
|
1289 |
*
|
1290 |
* Revision 1.57.2.8 2007/03/05 14:33:44 jp_milcent
|
1290 |
* Revision 1.57.2.8 2007/03/05 14:33:44 jp_milcent
|