Subversion Repositories Applications.bazar

Rev

Rev 104 | Rev 107 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 104 Rev 105
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.42 2006-03-01 16:23:22 florian Exp $
22
// CVS : $Id: bazar.fonct.php,v 1.43 2006-03-02 20:36:52 florian 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.42 $ $Date: 2006-03-01 16:23:22 $
34
*@version       $Revision: 1.43 $ $Date: 2006-03-02 20:36:52 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
Line 196... Line 196...
196
			$lien_supprimer->addQueryString('typeannonce', $ligne['bn_id_nature']);
196
			$lien_supprimer->addQueryString('typeannonce', $ligne['bn_id_nature']);
197
			$lien_supprimer_url=$lien_supprimer->getURL();
197
			$lien_supprimer_url=$lien_supprimer->getURL();
Line 198... Line 198...
198
			
198
			
199
			$table->addRow (array(
199
			$table->addRow (array(
200
			        '<a href="'.$lien_voir_url.'">'.$ligne['bf_titre'].'</a>'."\n", // col 1 : le nom
200
			        '<a href="'.$lien_voir_url.'">'.$ligne['bf_titre'].'</a>'."\n", // col 1 : le nom
201
					constant($ligne['bn_label_nature'])."\n", // col 2: type annonce
201
					$ligne['bn_label_nature']."\n", // col 2: type annonce
202
					$publiee."\n", // col 3 : publiee ou non
202
					$publiee."\n", // col 3 : publiee ou non
203
					'<a href="'.$lien_modifier_url.'">'.BAZ_MODIFIER.'</a>'."\n", // col 4 : modifier
203
					'<a href="'.$lien_modifier_url.'">'.BAZ_MODIFIER.'</a>'."\n", // col 4 : modifier
204
					'<a href="'.$lien_supprimer_url.'" onclick="javascript:return '.
204
					'<a href="'.$lien_supprimer_url.'" onclick="javascript:return '.
205
					'confirm(\''.BAZ_CONFIRMATION_SUPPRESSION.'\');" >'.BAZ_SUPPRIMER.'</a>'."\n")) ; // col 5 : supprimer
205
					'confirm(\''.BAZ_CONFIRMATION_SUPPRESSION.'\');" >'.BAZ_SUPPRIMER.'</a>'."\n")) ; // col 5 : supprimer
Line 476... Line 476...
476
								or ($droitspers=='superadministrateur' or !BAZ_RESTREINDRE_DEPOT)) {
476
								or ($droitspers=='superadministrateur' or !BAZ_RESTREINDRE_DEPOT)) {
477
					if ($ligne['bn_image_titre']!='') {
477
					if ($ligne['bn_image_titre']!='') {
478
						$titre='&nbsp;<img src="client/bazar/images/'.$ligne['bn_image_titre'].'" alt="'.
478
						$titre='&nbsp;<img src="client/bazar/images/'.$ligne['bn_image_titre'].'" alt="'.
479
										constant($ligne['bn_label_nature']).'" />'.'<br />'."\n";
479
										constant($ligne['bn_label_nature']).'" />'.'<br />'."\n";
480
					} else {
480
					} else {
481
						$titre='<h3>'.constant($ligne['bn_label_nature']).' : </h3>'."\n";
481
						$titre='<h3>'.$ligne['bn_label_nature'].' : </h3>'."\n";
482
					}
482
					}
483
					$formtemplate->addElement('radio', 'typeannonce', '', 
483
					$formtemplate->addElement('radio', 'typeannonce', '', 
484
							$titre.$ligne['bn_description'].'<br /><br />'."\n", 
484
							$titre.$ligne['bn_description'].'<br /><br />'."\n", 
485
							$ligne['bn_id_nature'], array("id" => 'select'.$ligne['bn_id_nature'], 
485
							$ligne['bn_id_nature'], array("id" => 'select'.$ligne['bn_id_nature'], 
486
							"style" => 'float:left;'));
486
							"style" => 'float:left;'));
Line 560... Line 560...
560
		if ($_GET['image']==1) baz_insertion_image($GLOBALS['_BAZAR_']['id_fiche']);	
560
		if ($_GET['image']==1) baz_insertion_image($GLOBALS['_BAZAR_']['id_fiche']);	
561
		if ($_GET['image']==2) baz_suppression_image($GLOBALS['_BAZAR_']['id_fiche']);
561
		if ($_GET['image']==2) baz_suppression_image($GLOBALS['_BAZAR_']['id_fiche']);
562
	}
562
	}
Line 563... Line 563...
563
	
563
	
564
	//titre de la rubrique
564
	//titre de la rubrique
565
	$res= '<h2>'.BAZ_TITRE_SAISIE_ANNONCE.'&nbsp;'.constant($GLOBALS['_BAZAR_']['typeannonce']).'</h2><br />'."\n";
565
	$res= '<h2>'.BAZ_TITRE_SAISIE_ANNONCE.'&nbsp;'.$GLOBALS['_BAZAR_']['typeannonce'].'</h2><br />'."\n";
566
	if (($GLOBALS['_BAZAR_']['condition']!='')AND(!isset($_POST['accept_condition']))AND(!isset($_GET['url'])OR(!isset($_GET['fichier']))OR(!isset($_GET['image'])))) {
566
	if (($GLOBALS['_BAZAR_']['condition']!='')AND(!isset($_POST['accept_condition']))AND(!isset($_GET['url'])OR(!isset($_GET['fichier']))OR(!isset($_GET['image'])))) {
567
		require_once 'HTML/QuickForm/html.php';
567
		require_once 'HTML/QuickForm/html.php';
568
		$conditions= new HTML_QuickForm_html('<tr><td colspan="2" style="padding:5px; margin:5px; width: 90%; background: #C1CBA7;">'.$GLOBALS['_BAZAR_']['condition'].'</td>'."\n".'</tr>'."\n");
568
		$conditions= new HTML_QuickForm_html('<tr><td colspan="2" style="padding:5px; margin:5px; width: 90%; background: #C1CBA7;">'.$GLOBALS['_BAZAR_']['condition'].'</td>'."\n".'</tr>'."\n");
569
		$formtemplate->addElement($conditions);
569
		$formtemplate->addElement($conditions);
Line 805... Line 805...
805
				}
805
				}
806
			}
806
			}
807
			//cas des fichiers
807
			//cas des fichiers
808
			elseif ($tableau[$i]['type']=='fichier') {
808
			elseif ($tableau[$i]['type']=='fichier') {
809
				baz_insertion_fichier($valeur['texte_fichier'.$tableau[$i]['nom_bdd']], $GLOBALS['_BAZAR_']['id_fiche'], 'fichier'.$tableau[$i]['nom_bdd']); 
809
				baz_insertion_fichier($valeur['texte_fichier'.$tableau[$i]['nom_bdd']], $GLOBALS['_BAZAR_']['id_fiche'], 'fichier'.$tableau[$i]['nom_bdd']); 
810
			}
810
			}		
811
			//cas des urls
811
			//cas des urls
812
			elseif ($tableau[$i]['type']=='url') {
812
			elseif ($tableau[$i]['type']=='url') {
813
				baz_insertion_url($valeur['url_texte'.$tableau[$i]['nom_bdd']], $valeur['url_lien'.$tableau[$i]['nom_bdd']], $GLOBALS['_BAZAR_']['id_fiche']);
813
				baz_insertion_url($valeur['url_texte'.$tableau[$i]['nom_bdd']], $valeur['url_lien'.$tableau[$i]['nom_bdd']], $GLOBALS['_BAZAR_']['id_fiche']);
814
			}
814
			}
815
			else {
815
			else {
Line 1302... Line 1302...
1302
}
1302
}
Line 1303... Line 1303...
1303
 
1303
 
1304
/* +--Fin du code ----------------------------------------------------------------------------------------+
1304
/* +--Fin du code ----------------------------------------------------------------------------------------+
1305
*
1305
*
-
 
1306
* $Log: not supported by cvs2svn $
-
 
1307
* Revision 1.42  2006/03/01 16:23:22  florian
-
 
1308
* modifs textes fr et correction bug "undefined index"
1306
* $Log: not supported by cvs2svn $
1309
*
1307
* Revision 1.41  2006/03/01 16:05:51  florian
1310
* Revision 1.41  2006/03/01 16:05:51  florian
1308
* ajout des fichiers joints
1311
* ajout des fichiers joints
1309
*
1312
*
1310
* Revision 1.40  2006/02/06 09:33:00  alexandre_tb
1313
* Revision 1.40  2006/02/06 09:33:00  alexandre_tb