Bonjour, j'ai un probleme avec ma page d'atente pendant le telechargement, j'explique :

Page 1:

Formulaire d'upload

je verifie les champs (javascript) et juste avant le submit (qui va sur ma page qui kontient le code pour copier mon fichier) j'ai ce code la :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
 
{
my_form = eval(the_form)
 window.open("/wait.php", "popup", "height=150,width=400,menubar='no',toolbar='no',location='no',status='yes',scrollbars='no'");
my_form.target = "popup";
document.formUpload.submit();
}
Je vous esplique le probleme :

Tous marche sauf que ma page wait.php n'est pas visible...

je clic , si les condition sont verifiées, le pop up s'ouvre (la il est tous blanc le temps de l'upload) et le message de retour php de ma page 2 me dis que mon upload est reussi.

En gros, ma page wait.php , je ne la voit pas pendant le telechargement

si vous avez une idée ^^

Voici le code complet des trois page : page du formulaire / page wait / page d'upload

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
 
<?php require_once('Connections/root.php');
ini_set('session.use_trans_sid', false);
ini_set('session.use_cookies', true);
ini_set('url_rewriter.tags',''); 
?>
<?php
//initialize the session
if (!isset($_SESSION)) {
  session_start();
  if (!isset($_SESSION['profilActif'])){
  $_SESSION['profilActif']="1";
  }
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
 
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
  //to fully log out a visitor we need to clear the session varialbles
  $_SESSION['MM_Username'] = NULL;
  $_SESSION['MM_UserGroup'] = NULL;
  $_SESSION['PrevUrl'] = NULL;
  $_SESSION['profilActif'] = NULL;
  unset($_SESSION['MM_Username']);
  unset($_SESSION['MM_UserGroup']);
  unset($_SESSION['PrevUrl']);
  unset($_SESSION['profilActif']);
  unset($_SESSION);
 
  $logoutGoTo = "index.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
 
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 
 
  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && true) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}
 
$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
  $MM_referrer .= "?" . $QUERY_STRING;
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<?php
mysql_select_db($database_root, $root);
$query_listerCategorie = "SELECT * FROM tabl_categorie ORDER BY cate_id ASC";
$listerCategorie = mysql_query($query_listerCategorie, $root) or die(mysql_error());
$row_listerCategorie = mysql_fetch_assoc($listerCategorie);
$totalRows_listerCategorie = mysql_num_rows($listerCategorie);
 
$colname_listerArticles = "-1";
 
$requeteIdUser = "SELECT user_id FROM tabl_user WHERE user_mail='". $_SESSION['MM_Username'] ."'";
$resultatIdUser = mysql_query($requeteIdUser);
$IdUser = mysql_fetch_assoc($resultatIdUser);
$_SESSION['UserId']=$IdUser['user_id'];
 
if (isset($_SESSION['UserId'])) {
  $colname_listerArticles = (get_magic_quotes_gpc()) ? $_SESSION['UserId'] : addslashes($_SESSION['UserId']);
}
mysql_select_db($database_root, $root);
$query_listerArticles = sprintf("SELECT * FROM tabl_media WHERE user_id = %s ORDER BY medi_nom ASC", $colname_listerArticles);
$listerArticles = mysql_query($query_listerArticles, $root) or die(mysql_error());
$row_listerArticles = mysql_fetch_assoc($listerArticles);
$totalRows_listerArticles = mysql_num_rows($listerArticles);
 
mysql_select_db($database_root, $root);
$query_listerType = "SELECT * FROM tabl_type ORDER BY type_id ASC";
$listerType = mysql_query($query_listerType, $root) or die(mysql_error());
$row_listerType = mysql_fetch_assoc($listerType);
$totalRows_listerType = mysql_num_rows($listerType);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" >
	<head>
		<title>D-spax : Webmaster / Developpeur / Graphiste</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta name="description" content="Site personnel de Georges DEMBROSKI - Portfolio - Blog - Annonces" />
		<meta name="keywords" content="dembroski georges, d-spax, despax, tampax, graphiste, webmaster, developpeur, portfolio, blog, annonces" /> 
		<meta name="keyphrase" content="dembroski georges, d-spax, despax, tampax, graphiste, webmaster, developpeur, portfolio, blog, annonces" />
		<meta name="author" content="www.d-spax.com" />
		<meta name="reply-to" content="admin@d-spax.fr" />
		<meta name="robots" content="index, follow" />
		<meta name="revisit-after" content="1 day" />
		<meta name="rating" content="general" />
		<meta name="distribution" content="global" />
		<link href="css/style01.css" rel="stylesheet" type="text/css" />
		<link rel="icon" type="image/gif" href="http://www.d-spax.com/favicon.ico" />
				<script type="text/JavaScript">
		function reset_recherche(action){
			if(action == 'blanc'){
				document.getElementById('word').value='';
			}
		}
<!--
function recup_extension(fichier) // fonction de récupération extension fichier
   {
         if (fichier!="")// si le champ fihier n'est pas vide
         {
            nom_fichier=fichier;// on récupere le chemin complet du fichier
            nbchar = nom_fichier.length;// on compte le nombre de caractere que compose ce chemin
            extension = nom_fichier.substring(nbchar-4,nbchar); // on récupere les 4 derniers caracteres
            extension=extension.toLowerCase(); //on uniforme les caracteres en minuscules au cas ou cela aurait été écris en majuscule...
            return extension; // on renvoi l'extension vers la fonction appelante
         }
   }
 
function verif_extension(fichier)// fonction vérification de l'extension aprés avoir choisi le fichier
   {
   ext = recup_extension(fichier);// on appelle la fonction de récupération de l'extension et on récupere l'extension
 
            if(ext==".jpg"||ext==".flv"){}// si extension = a une des extension suivante alors tout est ok donc ... pas d'erreur
            else // sinon on alert l'user de la mauvaise extension
            {
               alert("L'extension du fichier que vous voulez uploader est :'"+extension+"'\n cette extension n'est pas autorisée !\n Seules les extensions suivantes sont autorisées :\n'JPG;FLV' !");
            }
   }
 
function verif_before_valid_form(formUpload)// fonction de validation de formulaire
   {
      var msgerr="Veuillez vérifier les erreurs suivantes :\n";// préparation message d'erreur 
      var erreur = 0;// par defaut tout est ok
 
      if(document.formUpload.lien.value!="")// si le champ fihier n'est pas vide
      {
               ext = recup_extension(document.formUpload.lien.value);// on appelle la fonction de récupération de l'extension et on récupere l'extension
 
               if(ext==".jpg"||ext==".flv"){} // si extension = a une des extension suivante alors tout est ok donc ... pas d'erreur
               else // sinon message d'erreur
               {
                  msgerr=msgerr+"- L'extension du fichier n'est pas valide, les extensions acceptées sont 'JPG;FLV' ! \n";// prépare message d'erreur
                  erreur = 1;// il y a une erreur donc on l'informe
               }
      }
 
   if(erreur==1)
      {
         alert(msgerr);
      }
   else
      {
        if(ext==".jpg"&&document.formUpload.id_type.value=="1")
		{
			   my_form = eval(formUpload)
			   window.open("/wait.php", "popup", "height=150,width=400,menubar='no',toolbar='no',location='no',status='no',scrollbars='no'");
			   my_form.target = "popup";
			   document.formUpload.submit();	
		}else{
			if(ext==".flv"&&document.formUpload.id_type.value=="2")	
			{
			 my_form = eval(formUpload)
			   window.open("/wait.php", "popup", "height=150,width=400,menubar='no',toolbar='no',location='no',status='yes',scrollbars='no'");
			   my_form.target = "popup";
			   document.formUpload.submit();
			}else{
			msgerr2="L'extension du fichier est valide mais ne correspond pas au type de Media séléctionné \n";
			alert(msgerr2);
			}
      }
}
}
-->
		</script>
	</head>	
	<body>
		<div id="spacework">
			<div id="header">
				<p>&nbsp;</p>
			</div>
			<div id="linkage">
				<div style="float: left; width:200px;"><p>&nbsp;</p></div>
				<div style="float: left;">
					<ul id="arbo">
					<li><a href="/index.php">&nbsp;Accueil -&nbsp;</a></li>
					<li>Ajouter un m&eacute;dia à un de vos articles</li>
					</ul>
				</div>
			</div>
			<div id="corp">
				<div id="menu">
					<p>&nbsp;</p>
					<p>&nbsp;&nbsp;Log : <?php echo substr($_SESSION['MM_Username'], 0, 20) ; ?></p>
					<p>&nbsp;</p>
					<ul id="menu-ul">
						<li><a href="ajouterArticle.php">Add Article</a></li>
						<li><a href="AjouterMedia.php">Add Media</a></li>
						<li><a href="modifierArticle.php">Modif Article</a></li>
						<li><a href="<?php echo $logoutAction ?>">Déconnecter</a></li>
					</ul>
					<p>&nbsp;</p>
					<p>&nbsp;&nbsp;&nbsp;Tous les Portfolios <a href="portfolios.php"><img src="/images/cg/changer.jpg" alt="changer" title="Voir un autre portfolio" /></a></p>
					<p>&nbsp;</p>
					<p>&nbsp;&nbsp;&nbsp;<img src="/images/cg/user.jpg" alt="user" title="Profil actif" />
					<?php
                                        $requetePactif = "SELECT user_nom, user_prenom FROM tabl_user WHERE user_id='". $_SESSION['profilActif'] ."'";
                                        $resultatPactif = mysql_query($requetePactif);
                                        $Pactif = mysql_fetch_assoc($resultatPactif);
                                        $nom=$Pactif['user_nom'];
                                        $prenom=$Pactif['user_prenom'];
                                        
                                        echo substr($prenom, 0, 1).". ".substr($nom, 0, 20);
                                        ?>
					</p>
					<p>&nbsp;</p>
					<p>&nbsp;</p>
					<ul id="menu-ul">
                      <?php do { ?>
                        <li><a href="listerArticle.php?num=<?php echo $row_listerCategorie['cate_id']; ?>"><img src="/images/cg/voir.jpg" alt="voir" title="Voir" /><?php echo $row_listerCategorie['cate_nom']; ?></a></li>
                        <?php } while ($row_listerCategorie = mysql_fetch_assoc($listerCategorie)); ?>
					</ul>
					<p>&nbsp;</p>
					<p>&nbsp;</p>
					<form id="formSearch" method="post" action="resultats.php">
					<p>&nbsp;&nbsp;<input onclick="reset_recherche('blanc')" name="word" id="word" type="text" value="Recherche" size="16" />&nbsp;&nbsp;<input name="sendSearch" type="submit" value="Go" /></p>
				  	</form>
					<object type="application/x-shockwave-flash" data="/images/cg/bonome.swf" width="200" height="220">
			        <param name="movie" value="images/cg/bonome.swf" />
			        <param name="quality" value="high" />
					<param name="wmode" value="transparent" />
					</object>
				</div>
			<div id="content"> 
			  <p>&nbsp;</p>
			  <p>&nbsp;</p>
			  <div style="float: left; width:780px; padding: 10px 10px 0 10px; margin: 0px; text-align: left;">
			  <form name="formUpload" action="uploadMedia.php" method="post" enctype="multipart/form-data" >
				  Nom de l'article :
				  <p>&nbsp;</p>
						<select name="id_media" size="15">
						  <?php 
                                                        do {  
                                                        ?>
						  <option value="<?php echo $row_listerArticles['medi_id']?>" ><?php echo $row_listerArticles['medi_nom']?></option>
						  <?php
                                                        } while ($row_listerArticles = mysql_fetch_assoc($listerArticles));
                                                        ?>
						</select>
					<p>&nbsp;</p>
						<input name="lien" id="lien" type="file" onChange="verif_extension(this.value);" />
						 &nbsp; Type de Media : &nbsp;
						<select name="id_type" id="id_type">
						  <?php 
                                                        do {  
                                                        ?>
						  <option value="<?php echo $row_listerType['type_id']?>" ><?php echo $row_listerType['type_nom']?></option>
						  <?php
                                                        } while ($row_listerType = mysql_fetch_assoc($listerType));
                                                        ?>
						</select>
						<p>&nbsp;</p>
						<p>Pour une photo, inserer un ".jpg" ( 500 / 500 avec fond blanc pour un meilleur rendu )</p>
						<p>&nbsp;</p>
						<p>Pour une video, inserer un ".flv" ( Maxi 10 Mo )</p>
						<p>&nbsp;</p>
						<input type="button" value="Ajouter" onClick="verif_before_valid_form(formUpload)" />&nbsp;(Patientez jusqu'au reload automatique de la page)
						<input type="hidden" name="MM_insert" value="form1" />
			  </form>
			  </div>
			  <p>&nbsp;</p>
			  <p>&nbsp;</p>
			</div>
		  </div>
		</div>
		  <div id="footer">
			<div id="footer-content">
				<?php echo "<p>www.d-spax.com © ".date(Y)." - Tous droits r&eacute;serv&eacute;s - "; ?><a href="/contact.php">Me contacter</a></p>
				<a href="http://validator.w3.org/check?uri=referer"><img src="/images/cg/xhtml.png" alt="Valid XHTML 1.0 Strict" /></a>&nbsp;&nbsp;<a href="http://jigsaw.w3.org/css-validator/validator?uri=www.d-spax.com%2Fcss%2Fstyle01.css"><img src="/images/cg/css.png" alt="Valid CSS" /></a>
			</div>	
		</div>								
	</body>
 
</html>
<?php
mysql_free_result($listerCategorie);
 
mysql_free_result($listerArticles);
 
mysql_free_result($listerType);
?>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" >
	<head>
		<title>D-spax : Webmaster / Developpeur / Graphiste</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta name="description" content="Site personnel de Georges DEMBROSKI - Portfolio - Blog - Annonces" />
		<meta name="keywords" content="dembroski georges, d-spax, despax, tampax, graphiste, webmaster, developpeur, portfolio, blog, annonces" /> 
		<meta name="keyphrase" content="dembroski georges, d-spax, despax, tampax, graphiste, webmaster, developpeur, portfolio, blog, annonces" />
		<meta name="author" content="www.d-spax.com" />
		<meta name="reply-to" content="admin@d-spax.fr" />
		<meta name="robots" content="index, follow" />
		<meta name="revisit-after" content="1 day" />
		<meta name="rating" content="general" />
		<meta name="distribution" content="global" />
		<link href="css/style01.css" rel="stylesheet" type="text/css" />
		<link rel="icon" type="image/gif" href="http://www.d-spax.com/favicon.ico" />
	</head>	
	<body>
	<img src="http://www.d-spax.com/images/cg/wait.gif" alt="voir" title="Voir" />
	<p>&nbsp;</p>
	Patientez jusqu'a la fin du telechargement	
	</body>
 
</html>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
 
<?php require_once('Connections/root.php');
ini_set("post_max_size", "50M");
ini_set("upload_max_filesize", "50M");
ini_set('session.use_trans_sid', false);
ini_set('session.use_cookies', true);
ini_set('url_rewriter.tags',''); 
?>
<?php
//initialize the session
if (!isset($_SESSION)) {
  session_start();
  if (!isset($_SESSION['profilActif'])){
  $_SESSION['profilActif']="1";
  }
}
// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}
 
if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
  //to fully log out a visitor we need to clear the session varialbles
  $_SESSION['MM_Username'] = NULL;
  $_SESSION['MM_UserGroup'] = NULL;
  $_SESSION['PrevUrl'] = NULL;
  $_SESSION['profilActif'] = NULL;
  unset($_SESSION['MM_Username']);
  unset($_SESSION['MM_UserGroup']);
  unset($_SESSION['PrevUrl']);
  unset($_SESSION['profilActif']);
  unset($_SESSION);
 
  $logoutGoTo = "index.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
 
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 
 
  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && true) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}
 
$MM_restrictGoTo = "index.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
  $MM_referrer .= "?" . $QUERY_STRING;
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<?php
mysql_select_db($database_root, $root);
$query_listerCategorie = "SELECT * FROM tabl_categorie ORDER BY cate_id ASC";
$listerCategorie = mysql_query($query_listerCategorie, $root) or die(mysql_error());
$row_listerCategorie = mysql_fetch_assoc($listerCategorie);
$totalRows_listerCategorie = mysql_num_rows($listerCategorie);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" >
	<head>
		<title>D-spax : Webmaster / Developpeur / Graphiste</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta name="description" content="Site personnel de Georges DEMBROSKI - Portfolio - Blog - Annonces" />
		<meta name="keywords" content="dembroski georges, d-spax, despax, tampax, graphiste, webmaster, developpeur, portfolio, blog, annonces" /> 
		<meta name="keyphrase" content="dembroski georges, d-spax, despax, tampax, graphiste, webmaster, developpeur, portfolio, blog, annonces" />
		<meta name="author" content="www.d-spax.com" />
		<meta name="reply-to" content="admin@d-spax.fr" />
		<meta name="robots" content="index, follow" />
		<meta name="revisit-after" content="1 day" />
		<meta name="rating" content="general" />
		<meta name="distribution" content="global" />
		<link href="css/style01.css" rel="stylesheet" type="text/css" />
		<link rel="icon" type="image/gif" href="http://www.d-spax.com/favicon.ico" />
		<script type="text/JavaScript">
		function reset_recherche(action){
			if(action == 'blanc'){
				document.getElementById('word').value='';
			}
		}
		</script>
	</head>	
	<body>
					<p>&nbsp;</p>
					<?php
					if(isset($_POST['id_media'])){
					$idMedia=$_POST['id_media'];
					}
					if(isset($_POST['id_type'])){
					$idType=$_POST['id_type'];
					}
					if($_POST['id_media']==""){
					echo "Vous n'avez pas choisis d'article pour rattacher votre media";
					}else{
					if(!empty($_FILES['lien']['name'])) {
						$nomfile=$_FILES['lien']['name'];
						$nom_temp=$_FILES['lien']['tmp_name'];
						$type=$_FILES['lien']['type'];
						$taille=$_FILES['lien']['size'];
						$erreur=$_FILES['lien']['error'];
						$link=$nomfile;
						$dossier = 'images/upload/';
 
						if(copy($nom_temp,$dossier.$nomfile)) {
							//connection bbd
							$db=mysql_connect('mysql5-10','dspaxpfolio','1ma5da0la7');
							mysql_select_db('dspaxpfolio',$db);
							//insertion dans bdd
							$sql="INSERT INTO rela_media(id_media,id_type,rela_link) VALUES('$idMedia','$idType','$link')";  
							mysql_query($sql) or die(mysql_error());
							echo'Téléchargement réussi';
						}else{
							echo'Le téléchargement à échoué...';
						}
					}else {
						echo'Il n\' y a pas de fichiers à télécharger...';
					}
					}
					?>
					<p>&nbsp;</p>							
	</body>
 
</html>
<?php
mysql_free_result($listerCategorie);
?>