Subversion Repositories Sites.gentiana.org

Rev

Rev 82 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 82 Rev 105
Line 1051... Line 1051...
1051
*
1051
*
1052
* @global   L'identifiant de la fiche a supprimer
1052
* @global   L'identifiant de la fiche a supprimer
1053
* @return   void
1053
* @return   void
1054
*/
1054
*/
1055
function baz_suppression() {
1055
function baz_suppression() {
-
 
1056
	if ($GLOBALS['AUTH']->getAuth()) { 
1056
	$valeurs=baz_valeurs_fiche($_GET['id_fiche']);	
1057
		$valeurs=baz_valeurs_fiche($_GET['id_fiche']);	
Line 1057... Line 1058...
1057
	 
1058
		 
1058
	//suppression des wikinis associes		
1059
		//suppression des wikinis associes		
1059
	//génération du titre du wiki, sous la forme id-titre du projet
1060
		//génération du titre du wiki, sous la forme id-titre du projet
Line 1100... Line 1101...
1100
	if (DB::isError($resultat)) {
1101
		if (DB::isError($resultat)) {
1101
		die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'."\n") ;
1102
			die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'."\n") ;
1102
	}
1103
		}
1103
	return ;
1104
		return ;
1104
}
1105
	}
-
 
1106
}
Line 1105... Line 1107...
1105
 
1107
 
1106
 
1108
 
1107
/** baz_suppression_url() - Supprimer un lien d'une fiche
1109
/** baz_suppression_url() - Supprimer un lien d'une fiche
1108
*
1110
*
1109
* @global   integer L'identifiant du lien
1111
* @global   integer L'identifiant du lien
1110
* @return   void
1112
* @return   void
1111
*/
1113
*/
-
 
1114
function baz_suppression_url($id_url) {
1112
function baz_suppression_url($id_url) {
1115
	//suppression dans bazar_url
1113
	//suppression dans bazar_url
1116
	if ($GLOBALS['AUTH']->getAuth()) {
1114
	$requete = 'DELETE FROM bazar_url WHERE bu_id_url = '.$id_url;
1117
		$requete = 'DELETE FROM bazar_url WHERE bu_id_url = '.$id_url;
1115
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
1118
		$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
1116
	if (DB::isError($resultat)) {
1119
		if (DB::isError($resultat)) {
1117
		die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
1120
			die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
1118
	}
1121
		}
-
 
1122
		return;
Line 1119... Line 1123...
1119
	return;
1123
	}
1120
}
1124
}
1121
 
1125
 
1122
 
1126
 
1123
/** baz_suppression_fichier() - Supprimer un fichier d'une fiche
1127
/** baz_suppression_fichier() - Supprimer un fichier d'une fiche
1124
*
1128
*
-
 
1129
* @global   integer L'identifiant du fichier
1125
* @global   integer L'identifiant du fichier
1130
* @return   void
1126
* @return   void
1131
*/
1127
*/
1132
function baz_suppression_fichier($id_fichier) {
1128
function baz_suppression_fichier($id_fichier) {
1133
	if ($GLOBALS['AUTH']->getAuth()) { 
1129
	//verification de l'utilisation du fichier joint pour une autre annonce
1134
		//verification de l'utilisation du fichier joint pour une autre annonce
Line 1144... Line 1149...
1144
	if (DB::isError($resultat)) {
1149
		if (DB::isError($resultat)) {
1145
		return ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
1150
			return ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
1146
	}
1151
		}
1147
	return;
1152
		return;
1148
}
1153
	}
-
 
1154
}
Line 1149... Line 1155...
1149
 
1155
 
1150
 
1156
 
1151
/** baz_suppression_image() - Supprimer une image d'une fiche
1157
/** baz_suppression_image() - Supprimer une image d'une fiche
1152
*
1158
*
1153
* @global   integer L'identifiant de la fiche
1159
* @global   integer L'identifiant de la fiche
1154
* @return   void
1160
* @return   void
-
 
1161
*/
1155
*/
1162
function baz_suppression_image($id_fiche) {
1156
function baz_suppression_image($id_fiche) {
1163
	if ($GLOBALS['AUTH']->getAuth()) {
1157
	//verification de l'utilisation de l'image pour une autre annonce
1164
		//verification de l'utilisation de l'image pour une autre annonce
1158
	$requete = 'SELECT bf_url_image FROM bazar_fiche WHERE bf_id_fiche='.$id_fiche;
1165
		$requete = 'SELECT bf_url_image FROM bazar_fiche WHERE bf_id_fiche='.$id_fiche;
1159
	$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
1166
		$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
Line 1172... Line 1179...
1172
	if (DB::isError($resultat)) {
1179
		if (DB::isError($resultat)) {
1173
		die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
1180
			die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ;
1174
	}
1181
		}
1175
	return;
1182
		return;
1176
}
1183
	}
-
 
1184
}
Line 1177... Line 1185...
1177
 
1185
 
1178
 
1186
 
1179
/** publier_fiche () - Publie ou non dans les fichiers XML la fiche bazar d'un utilisateur
1187
/** publier_fiche () - Publie ou non dans les fichiers XML la fiche bazar d'un utilisateur