Subversion Repositories Applications.bazar

Compare Revisions

Ignore whitespace Rev 153 → Rev 154

/trunk/bibliotheque/bazar.fonct.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: bazar.fonct.php,v 1.56 2006-09-28 15:41:36 alexandre_tb Exp $
// CVS : $Id: bazar.fonct.php,v 1.57 2006-10-05 08:53:50 florian Exp $
/**
*
* Fonctions du module bazar
31,7 → 31,7
*@author Florian Schmitt <florian@ecole-et-nature.org>
//Autres auteurs :
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.56 $ $Date: 2006-09-28 15:41:36 $
*@version $Revision: 1.57 $ $Date: 2006-10-05 08:53:50 $
// +------------------------------------------------------------------------------------------------------+
*/
 
146,7 → 146,9
else {
$res .= '<p class="zone_info">'.BAZ_PAS_DE_FICHE_A_VALIDER.'</p>'."\n" ;
}
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_VOIR_TOUTES_ANNONCES);
$res .= '<br /><ul style="clear:both;"><li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'" title="'.BAZ_CONSULTER_FICHES_VALIDEES.'">'.BAZ_CONSULTER_FICHES_VALIDEES.'</a></li></ul>';
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
return $res;
}
 
156,8 → 158,8
* @return string HTML
*/
function mes_fiches() {
if ($GLOBALS['AUTH']->getAuth()) {
$res= '<h2>'.BAZ_VOS_ANNONCES.'</h2><br />'."\n";
$res= '<h2>'.BAZ_VOS_ANNONCES.'</h2><br />'."\n";
if ($GLOBALS['AUTH']->getAuth()) {
// requete pour voir si l'utilisateur a des fiches a son nom, classees par date de MAJ et nature d'annonce
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_ce_utilisateur='. $GLOBALS['id_user'].
' AND bn_id_nature=bf_ce_nature AND bn_ce_id_menu='.$GLOBALS['_BAZAR_']['categorie_nature'].' ORDER BY bf_date_maj_fiche DESC,bf_ce_nature ASC';
205,7 → 207,7
'confirm(\''.BAZ_CONFIRMATION_SUPPRESSION.'\');" >'.BAZ_SUPPRIMER.'</a>'."\n")) ; // col 5 : supprimer
}
$table->altRowAttributes(1, array("class" => "ligne_impaire"), array("class" => "ligne_paire"));
$table->updateColAttributes(1, array("align" => "center"));
$table->updateColAttributes(1, array("align" => "left"));
$table->updateColAttributes(2, array("align" => "center"));
$table->updateColAttributes(3, array("align" => "center"));
$table->updateColAttributes(4, array("align" => "center"));
214,8 → 216,26
else {
$res .= '<p class="zone_info">'.BAZ_PAS_DE_FICHE.'</p>'."\n" ;
}
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_DEPOSER_ANNONCE);
$res .= '<br /><ul><li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'" title="'.BAZ_SAISIR_UNE_NOUVELLE_FICHE.'">'.BAZ_SAISIR_UNE_NOUVELLE_FICHE.'</a></li></ul>';
$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
}
else $res=BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR;
else {
$res .= '<p class="zone_info">'.BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR.'</p>'."\n" ;
$res .= '<form id="form_connexion" style="clear:both;" class="form_identification" action="' ;
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_ACTION_VOIR_VOS_ANNONCES);
$res .= $GLOBALS['_BAZAR_']['url']->getURL();
$res .= '" method="post">
<fieldset>
<legend>Identifiez vous</legend>
<label for="username">Courriel : </label>
<input type="text" id="username" name="username" maxlength="80" tabindex="1" value="courriel" />
<label for="password">Mot de passe : </label>
<input type="password" id="password" name="password" maxlength="80" tabindex="2" value="mot de passe" />
<input type="submit" id="connexion" name="connexion" tabindex="3" value="ok" />
</fieldset>
</form>';
}
return $res;
}
 
553,7 → 573,7
else {
$res .= '<h2>'.BAZ_DEPOSE_UNE_NOUVELLE_ANNONCE.'</h2><br />'."\n";
$res .= '<p class="zone_info">'.BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR.'</p>'."\n" ;
$res .= '<form id="form_connexion" class="form_identification" action="' ;
$res .= '<form id="form_connexion" style="clear:both;" class="form_identification" action="' ;
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_DEPOSER_ANNONCE);
$res .= $GLOBALS['_BAZAR_']['url']->getURL();
$res .= '" method="post">
1029,7 → 1049,7
$res .= BAZ_LAIUS_S_ABONNER.'<br /><br />'."\n";
//requete pour obtenir l'id et le label des types d'annonces
$requete = 'SELECT bn_id_nature, bn_label_nature, bn_image_titre '.
'FROM bazar_nature WHERE bn_ce_id_menu='.$GLOBALS['_BAZAR_']['categorie_nature'];
'FROM bazar_nature WHERE 1'; /*bn_ce_id_menu='.$GLOBALS['_BAZAR_']['categorie_nature'];*/
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
if (DB::isError($resultat)) {
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
1042,7 → 1062,13
'<b>'.BAZ_RSS.'</b>',)) ;
$table->setRowType (0, 'th') ;
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$tab_parametres_GET = explode ("&", $_SERVER["argv"][0]) ;
foreach ($tab_parametres_GET as $cle_param => $valeur_param) {
$tab_valeur = explode ('=', $valeur_param) ;
$GLOBALS['_BAZAR_']['url']->addQueryString($tab_valeur[0], $tab_valeur[1]);
}
$lien_s_abonner=$GLOBALS['_BAZAR_']['url'];
$lien_s_abonner->addQueryString('action', BAZ_S_INSCRIRE);
$lien_s_abonner->addQueryString('idtypeannonce', $ligne['bn_id_nature']);
1054,11 → 1080,9
$lien_se_desabonner->addQueryString('inscrip', 0);
$lien_RSS=$GLOBALS['_BAZAR_']['url'];
$lien_RSS->addQueryString('action', BAZ_VOIR_FLUX_RSS);
$lien_RSS->addQueryString('action', BAZ_VOIR_FLUX_RSS);
'http://'.$_SERVER['HTTP_HOST'].'/client/bazar/bazarRSS.php?annonce='.$ligne['bn_id_nature'];
//requete pour savoir si la personne est inscrite à ce type d'annonce
//requete pour savoir si la personne est inscrite a ce type d'annonce
$requete = 'SELECT ba_id_utilisateur '.
'FROM bazar_abonnement '.
'WHERE ba_id_utilisateur='.$GLOBALS['id_user'].' AND ba_id_rubrique='.$ligne['bn_id_nature'];
1092,7 → 1116,22
$table->updateColAttributes(3, array('style' => 'text-align:center;'));
$res.=$table->toHTML() ;
}
else $res .= '<p class="zone_info">'.BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR.'</p>'."\n";
else {
$res .= '<p class="zone_info">'.BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR.'</p>'."\n" ;
$res .= '<form id="form_connexion" style="clear:both;" class="form_identification" action="' ;
$GLOBALS['_BAZAR_']['url']->addQueryString('action', BAZ_S_INSCRIRE);
$res .= $GLOBALS['_BAZAR_']['url']->getURL();
$res .= '" method="post">
<fieldset>
<legend>Identifiez vous</legend>
<label for="username">Courriel : </label>
<input type="text" id="username" name="username" maxlength="80" tabindex="1" value="courriel" />
<label for="password">Mot de passe : </label>
<input type="password" id="password" name="password" maxlength="80" tabindex="2" value="mot de passe" />
<input type="submit" id="connexion" name="connexion" tabindex="3" value="ok" />
</fieldset>
</form>';
}
return $res;
}
1129,7 → 1168,7
}
$valeurs_fiche[$tableau[$i]['type'].$tableau[$i]['nom_bdd']] = $val;
}
elseif ($tableau[$i]['type']=='texte' || $tableau[$i]['type']=='textelong' || $tableau[$i]['type']=='listedatedeb' || $tableau[$i]['type']=='listedatefin' || $tableau[$i]['type']=='wikini') {
elseif ($tableau[$i]['type']=='texte' || $tableau[$i]['type']=='textelong' || $tableau[$i]['type']=='listedatedeb' || $tableau[$i]['type']=='listedatefin') {
$valeurs_fiche[$tableau[$i]['nom_bdd']] = stripslashes($ligne[$tableau[$i]['nom_bdd']]);
}
}
1216,6 → 1255,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.56 2006/09/28 15:41:36 alexandre_tb
* Le formulaire pour se logguer dans l'action saisir reste sur l'action saisir après
*
* Revision 1.55 2006/09/21 14:19:39 florian
* amélioration des fonctions liés au wikini
*