<?php
   $queryMax = "SELECT MAX(codeTheme) FROM theme"; $resultMax = mysql_query ($queryMax) or die ("La requête de sélection de id max ($queryMax) a échoué"); $lineMax = mysql_fetch_row($resultMax); $maxIdTheme = ($lineMax[0]+1);  mysql_free_result($resultMax);  $rep = getRepertoire($repertoire); $repertoire = "photos/".$repertoire;  $str = "<html>"; $str .= "<head>"; $str .= "<link rel='stylesheet' href='ergonomie/style.css'>"; $str .= "</head>"; $str .= "<center>"; $str .= "<span class='erreur'>ERREUR : Le répertoire <i>'".$rep."'</i> existe déjà en base.</span><br><br><br><br>"; $str .=  "<img src='../ergonomie/_images/retour.gif' id='retour' onClick=\"retourTheme('$theme','$rep','$dateCreation','$commentaire')\" title='Retour' style='cursor:pointer;cursor:hand'>"; $str .= "</center>";  $dateCreation = formatterDateToBase($dateCreation);  $queryInsert = "INSERT INTO theme (`codeTheme`,`nomTheme`,`commentaire`,`repertoire`,`dateCreation`,`panoramique`) VALUES ('$maxIdTheme','".$theme."','".$commentaire."','$repertoire','$dateCreation','$panoramique')"; $resultInsert = mysql_query ($queryInsert) or die ($str); ?> 