par
djtec » 14 déc. 2007, 18:52
Bonjour à tous,
Voilà j'ai vu dans les tutos comment réaliser une liste déroulante lié. Mais mon problème c'est que quand je sélectionne dans la première liste il traite automatiquement le formulaire sans que l'on puisse choisir dans la deuxième liste et sans que l'on puisse remplir les autres champs.
Voici mon code:
<?php include('includes/page_header.php'); ?>
<script type='text/javascript'>
var nowLocal = new Date(); /* time at very beginning of js execution */
var localTime = Math.floor(nowLocal.getTime()/1000); /* time, in ms -- recorded at top of jscript */
function SyncWithServerTime(serverTime)
{
if (serverTime) {
/* update time difference cookie */
tdCookie='e107_tdOffset=';
tdSetTimeCookie='e107_tdSetTime=';
serverDelta=Math.floor(localTime-serverTime);
document.cookie = tdCookie+serverDelta;
document.cookie = tdSetTimeCookie+(localTime-serverDelta); /* server time when set */
}
tzCookie = 'e107_tzOffset=';
if (document.cookie.indexOf(tzCookie) < 0) {
/* set if not already set */
timezoneOffset = nowLocal.getTimezoneOffset(); /* client-to-GMT in minutes */
document.cookie = tzCookie + timezoneOffset;
}
}
if(document.getElementById&&!document.all){ns6=1;}else{ns6=0;}
var agtbrw=navigator.userAgent.toLowerCase();
var operaaa=(agtbrw.indexOf('opera')!=-1);
var head="display:''";
var folder='';
function expandit(curobj, hide) {
if(document.getElementById(curobj)) {
folder=document.getElementById(curobj).style;
} else {
if(ns6==1||operaaa==true) {
folder=curobj.nextSibling.nextSibling.style;
} else {
folder=document.all[curobj.sourceIndex+1].style;
}
}
if(folder.display=="none")
{
folder.display="";
} else {
folder.display="none";
}
if(hide) {
var hide_objects = hide.split(",");
for(i=0; i<hide_objects.length; i++) {
hide_objects[i]=hide_objects[i].replace(/^\s*(.*)/, "$1");
hide_objects[i]=hide_objects[i].replace(/(.*?)\s*$/, "$1");
if(document.getElementById(hide_objects[i])) {
hidden=document.getElementById(hide_objects[i]).style;
if(hidden.display=="") {
hidden.display="none";
}
}
}
}
}
function urljump(url){
top.window.location = url;
}
function setInner(id, txt) {
document.getElementById(id).innerHTML = txt;
}
function jsconfirm(thetext){
return confirm(thetext);
}
function insertext(str,tagid,display){
document.getElementById(tagid).value = str;
if(display){
document.getElementById(display).style.display='none';
}
}
function appendtext(str,tagid,display){
document.getElementById(tagid).value += str;
document.getElementById(tagid).focus();
if(display){
document.getElementById(display).style.display='none';
}
}
function open_window(url,wth,hgt) {
if('full' == wth){
pwindow = window.open(url);
} else {
if (wth) {
mywidth=wth;
} else {
mywidth=600;
}
if (hgt) {
myheight=hgt;
} else {
myheight=400;
}
pwindow = window.open(url,'Name', 'top=100,left=100,resizable=yes,width='+mywidth+',height='+myheight+',scrollbars=yes,menubar=yes')
}
pwindow.focus();
}
function ejs_preload(ejs_path, ejs_imageString){
var ejs_imageArray = ejs_imageString.split(',');
for(ejs_loadall=0; ejs_loadall<ejs_imageArray.length; ejs_loadall++){
var ejs_LoadedImage=new Image();
ejs_LoadedImage.src=ejs_path + ejs_imageArray[ejs_loadall];
}
}
function textCounter(field,cntfield) {
cntfield.value = field.value.length;
}
function openwindow() {
opener = window.open("htmlarea/index.php", "popup","top=50,left=100,resizable=no,width=670,height=520,scrollbars=no,menubar=no");
opener.focus();
}
function setCheckboxes(the_form, do_check, the_cb){
var elts = (typeof(document.forms[the_form].elements[the_cb]) != 'undefined') ? document.forms[the_form].elements[the_cb] : document.forms[the_form].elements[the_cb];
var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0;
if(elts_cnt){
for(var i = 0; i < elts_cnt; i++){
elts[i].checked = do_check;
}
}else{
elts.checked = do_check;
}
return true;
}
var ref=""+escape(top.document.referrer);
var colord = window.screen.colorDepth;
var res = window.screen.width + "x" + window.screen.height;
var eself = document.location;
// From http://phpbb.com
var clientPC = navigator.userAgent.toLowerCase();
var clientVer = parseInt(navigator.appVersion);
var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1) && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1) && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
var is_moz = 0;
var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac = (clientPC.indexOf("mac")!=-1);
var e107_selectedInputArea;
var e107_selectedRange;
var e107_dupCounter = 1;
// From http://www.massless.org/mozedit/
function mozWrap(txtarea, open, close){
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
if (selEnd == 1 || selEnd == 2) selEnd = selLength;
var s1 = (txtarea.value).substring(0,selStart);
var s2 = (txtarea.value).substring(selStart, selEnd)
var s3 = (txtarea.value).substring(selEnd, selLength);
txtarea.value = s1 + open + s2 + close + s3;
return;
}
function mozSwap(txtarea, newtext){
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
if (selEnd == 1 || selEnd == 2) selEnd = selLength;
var s1 = (txtarea.value).substring(0,selStart);
var s3 = (txtarea.value).substring(selEnd, selLength);
txtarea.value = s1 + newtext + s3;
return;
}
function storeCaret (textAr){
e107_selectedInputArea = textAr;
if (textAr.createTextRange){
e107_selectedRange = document.selection.createRange().duplicate();
}
}
function addtext(text, emote)
{
if (window.e107_selectedInputArea)
{
var ta = e107_selectedInputArea;
if (emote != true)
{ // Split if its a paired bbcode
val = text.split('][');
if (val[0] == text) val[1] = '';
}
else
{
val = text;
}
if ((clientVer >= 4) && is_ie && is_win)
{
theSelection = document.selection.createRange().text; /* wrap selected text */
if (theSelection)
{
if (emote != true)
{
if (val[1] == '')
{ // Single piece of text
document.selection.createRange().text = val[0];
}
else
{ // bbcode
document.selection.createRange().text = val[0] +']' + theSelection + '[' + val[1];
}
}
else
{
document.selection.createRange().text = val + theSelection;
}
ta.focus();
theSelection = '';
return;
}
}
else
if (ta.selectionEnd && (ta.selectionEnd - ta.selectionStart > 0))
{ // Selected text here
if (emote != true)
{
if (val[1] != '')
{ // BBCode to wrap
mozWrap(ta, val[0] +']', '[' + val[1]); /* wrap selected text */
}
else
{ // Single piece of text to insert, and delete any selected text
mozSwap(ta, text); /* wrap selected text */
}
}
else
{
mozWrap(ta, val, ''); /* wrap selected text */
}
return;
}
text = ' ' + text + ' ';
if (ta.createTextRange && e107_selectedRange)
{
var caretPos = e107_selectedRange; /* IE */
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
}
else
if (ta.selectionStart || ta.selectionStart == '0')
{ /* Moz */
var startPos = ta.selectionStart;
var endPos = ta.selectionEnd;
var charb4 = ta.value.charAt(endPos-1);
ta.value = ta.value.substring(0, endPos)+ text + ta.value.substring(endPos);
}
else
{
ta.value += text;
}
ta.focus();
}
}
function help(help,tagid){
if(tagid){
document.getElementById(tagid).value = help;
} else if(document.getElementById('dataform')) {
document.getElementById('dataform').helpb.value = help;
}
}
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
function eover(object, over) {
object.className = over;
}
function duplicateHTML(copy,paste,baseid){
if(document.getElementById(copy)){
e107_dupCounter++;
var type = document.getElementById(copy).nodeName; // get the tag name of the source copy.
var but = document.createElement('input');
var br = document.createElement('br');
but.type = 'button';
but.value = 'x';
but.className = 'button';
but.onclick = function(){ this.parentNode.parentNode.removeChild(this.parentNode); };
var destination = document.getElementById(paste);
var source = document.getElementById(copy).cloneNode(true);
var newentry = document.createElement(type);
newentry.appendChild(source);
newentry.value='';
newentry.appendChild(but);
newentry.appendChild(br);
if(baseid)
{
newid = baseid+e107_dupCounter;
newentry.innerHTML = newentry.innerHTML.replace(new RegExp(baseid, 'g'), newid);
newentry.id=newid;
}
destination.appendChild(newentry);
}
}
function preview_image(src_val,img_path){
var ta;
var desti
var desti = src_val + '_prev';
ta = document.getElementById(src_val).value;
if(ta){
document.getElementById(desti).src = img_path + ta;
}else{
document.getElementById(desti).src = '".e_IMAGE."generic/blank.gif';
}
return;
}
//-->
</script>
<?
/// Début de l'identification
////// Début de l'identification pas reconnu
if (!isset($_SESSION['pseudo']))
{
echo '
<script language="javascript" type="text/javascript">
<!--
window.location.replace( "account-login.php?action=error");
-->
</script>
';
}
////// Fin de l'identification pas reconnu
////// Début de l'identification reconnu
else
{
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<TBODY>
<tr>
<td><TABLE cellSpacing="8" cellPadding="0" width="100%" border="0" >
<TBODY>
<TR>
<!-- LEFT COLUMN -->
<TD vAlign="top" width="180">
<?php include('includes/menu-gauche.php'); ?>
</TD>
<!-- END LEFT COLUMN -->
<!-- MAIN CENTER CONTENT START -->
<TD vAlign="top">
<?
$name = $_GET['name'];
if($name == "") {
?>
<table class="ftable" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table class="fheader" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_ftl" width="16" height="41"><img src="images/blank.gif" width="16" height="41" /></td>
<td class="NB_ftm" align="center" width="100%" height="41">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_capl" width="10" height="41"><img src="images/blank.gif" width="10" height="41"></td>
<td class="NB_capm" height="41" style="white-space: nowrap;">Artiste</td>
<td class="NB_capr" width="10" height="41"><img src="images/blank.gif" width="10" height="41"></td>
</tr>
</table>
</td>
<td class="NB_ftr" width="10" height="41"><img src="images/blank.gif" width="10" height="41" /></td>
</tr>
</table>
<table class="fmiddle" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_fml" width="8"><img src="images/blank.gif" width="8" height="2" /></td>
<td class="NB_fmmain" width="100%">
<br />
<center>
<?php
$idr = isset($_POST['cat'])?$_POST['cat']:null;
$sql1 = "SELECT `id_cat`, `cat` FROM `".$prefixe."_cat` ORDER BY `id_cat`";
$rech_cats = mysql_query($sql1);
$code_cat = array();
$cat = array();
$nb_cats = 0;
if($rech_cats != false)
{
while($ligne = mysql_fetch_assoc($rech_cats))
{
array_push($code_cat, $ligne['id_cat']);
array_push($cat, $ligne['cat']);
$nb_cats++;
}
}
?>
<form id="dataform" method="post" action="?name=verif" enctype="multipart/form-data" onsubmit="return frmVerify()">
<table align=center cellpadding="0" cellspacing="0" width=99%>
<tr>
<td width="180">Type :</td>
<td>
<select name="cat" id="cat" onchange="document.forms['dataform'].submit();">
<option value="-1">- - - Choisissez - - -</option>
<?php
for($i = 0; $i < $nb_cats; $i++)
{
?>
<option value="<?php echo($code_cat[$i]); ?>"<?php echo((isset($idr) && $idr == $code_cat[$i])?" selected=\"selected\"":null); ?>><?php echo($cat[$i]); ?></option>
<?php
}
?>
</select>
<?php
if(isset($idr) && $idr != -1)
{
$sql2 = "SELECT `id_type`, `type` FROM `".$prefixe."_type` WHERE `id_cat` = ". $idr ." ORDER BY `id_type`;";
if($c != false)
{
$rech_tpe = mysql_query($sql2, $c);
$nd = 0;
$code_tpe = array();
$nom_tpe = array();
while($ligne_tpe = mysql_fetch_assoc($rech_tpe))
{
array_push($code_tpe, $ligne_tpe['id_type']);
array_push($nom_tpe, $ligne_tpe['type']);
$nd++;
}
?>
<select name="type" id="type">
<?php
for($d = 0; $d<$nd; $d++)
{
?>
<option value="<?php echo($code_tpe[$d]); ?>"<?php echo((isset($tpe_selectionne) && $tpe_selectionne == $code_tpe[$d])?" selected=\"selected\"":null); ?>><?php echo($nom_tpe[$d]); ?></option>
<?php
}
?>
</select>
<?php
}
}
?>
</td>
</tr>
<tr>
<td width="180">Titre :</td>
<td><input type="text" name="titre" size="15" value="" class="gd"></td>
</tr>
<tr>
<td width="180">Description :</td>
<td><textarea class='tbox' id='item' name='item' cols='80' style='max-width:90%' rows='15' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea></td>
</tr>
<tr>
<td width="180"></td>
<td>
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/link.png' alt='' title='Insert link: [link]http://mysite.com[/link] or [link=http://yoursite.com]Visit My Site[/link]' onclick="addtext('[url][/url]')" onmouseout="help('','news')" onmouseover="help('Insert link: [link]http://mysite.com[/link] or [link=http://yoursite.com]Visit My Site[/link]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/bold.png' alt='' title='Bold text: [b]This text will be bold[/b]' onclick="addtext('[b][/b]')" onmouseout="help('','news')" onmouseover="help('Bold text: [b]This text will be bold[/b]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/italic.png' alt='' title='Italic text: [i]This text will be italicised[/i]' onclick="addtext('[i][/i]')" onmouseout="help('','news')" onmouseover="help('Italic text: [i]This text will be italicised[/i]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/underline.png' alt='' title='Underline text: [u]This text will be underlined[/u]' onclick="addtext('[u][/u]')" onmouseout="help('','news')" onmouseover="help('Underline text: [u]This text will be underlined[/u]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/image.png' alt='' title='Insert image: [img]mypicture.jpg[/img]' onclick="addtext('[img][/img]')" onmouseout="help('','news')" onmouseover="help('Insert image: [img]mypicture.jpg[/img]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/center.png' alt='' title='Center align: [center]This text will be centered[/center]' onclick="addtext('[align=center][/align]')" onmouseout="help('','news')" onmouseover="help('Center align: [center]This text will be centered[/center]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/left.png' alt='' title='Left align: [left]This text will be left aligned[/left]' onclick="addtext('[align=left][/align]')" onmouseout="help('','news')" onmouseover="help('Left align: [left]This text will be left aligned[/left]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/right.png' alt='' title='Right align: [right]This text will be right aligned[/right]' onclick="addtext('[align=right][/align]')" onmouseout="help('','news')" onmouseover="help('Right align: [right]This text will be right aligned[/right]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/blockquote.png' alt='' title='Blockquote text: [blockquote]This text will be blockquoted (indented)[/blockquote]' onclick="addtext('[quote][/quote]')" onmouseout="help('','news')" onmouseover="help('Blockquote text: [blockquote]This text will be blockquoted (indented)[/blockquote]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/code.png' alt='' title='Code - preformatted text: [code]$foo = bah;[/code]' onclick="addtext('[code][/code]')" onmouseout="help('','news')" onmouseover="help('Code - preformatted text: [code]$foo = bah;[/code]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/list.png' alt='' title='Unordered: [list]line1*line2*line3[/list] Ordered: [list=type]line1*line2*line3[/list]' onclick="addtext('[list][/list]')" onmouseout="help('','news')" onmouseover="help('Unordered: [list]line1*line2*line3[/list] Ordered: [list=type]line1*line2*line3[/list]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/fontcol.png' alt='' title='Click to open color dialog ...' onclick="expandit('col_selector_1299')" onmouseout="help('','news')" onmouseover="help('Click to open color dialog ...','news')" />
<!-- Start of Color selector -->
<div style='margin-left: 0px; margin-right: 0px; width: 221px; position: relative; z-index: 1000; float: right; display: none' id='col_selector_1299' onclick="this.style.display='none'" >
<div style='position: absolute; bottom: 30px; right: 145px; width: 221px'><script type='text/javascript'>
//<![CDATA[
var maxtd = 18;
var maxtddiv = -1;
var coloursrgb = new Array('00', '33', '66', '99', 'cc', 'ff');
var coloursgrey = new Array('000000', '333333', '666666', '999999', 'cccccc', 'ffffff');
var colourssol = new Array('ff0000', '00ff00', '0000ff', 'ffff00', '00ffff', 'ff00ff');
var rowswitch = 0;
var rowline = '';
var rows1 = '';
var rows2 = '';
var notr = 0;
var tdblk = '<td style=\'background-color: #000000; cursor: default; height: 10px; width: 10px;\'><\/td>';
var g = 1;
var s = 0;
function td_render(color) {
return '<td style=\'background-color: #' + color + '; height: 10px; width: 10px;\' onmousedown="addtext(\'[color=#' + color + '][/color]\')"><\/td>';
}
for (i=0; i < coloursrgb.length; i++) {
for (j=0; j < coloursrgb.length; j++) {
for (k=0; k < coloursrgb.length; k++) {
maxtddiv++;
if (maxtddiv % maxtd == 0) {
if (rowswitch) {
if (notr < 5){
rows1 += '<\/tr><tr>' + td_render(coloursgrey[g]) + tdblk;
g++;
}
rowswitch = 0;
notr++;
}else{
rows2 += '<\/tr><tr>' + td_render(colourssol[s]) + tdblk;
s++;
rowswitch = 1;
}
maxtddiv = 0;
}
rowline = td_render(coloursrgb[j] + coloursrgb[k] + coloursrgb[i]);
if (rowswitch) {
rows1 += rowline;
}else{
rows2 += rowline;
}
}
}
}
document.write('<table cellspacing=\'1\' cellpadding=\'0\' style=\'cursor: pointer; background-color: #000; width: 100%; border: 0px\'><tr>');
document.write(td_render(coloursgrey[0]) + tdblk + rows1 + rows2);
document.write('<\/tr><\/table>');
//]]>
</script></div>
</div>
<!-- End of Color selector -->
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/fontsize.png' alt='' title='Click to open size dialog ...' onclick="expandit('size_selector_8424')" onmouseout="help('','news')" onmouseover="help('Click to open size dialog ...','news')" />
<!-- Start of Size selector -->
<div style='margin-left:0px;margin-right:0px; position:relative;z-index:1000;float:right;display:none' id='size_selector_8424'><div style='position:absolute; bottom:30px; right:125px'><table class='fborder' style='background-color: #fff'>
<tr><td class='forumheader3'>
<select class='tbox' name='preimageselect' onchange="addtext(this.value); expandit('size_selector_8424')">
<option value=''>Font Size...</option>
<option value='[size=7][/size]'>7px</option>
<option value='[size=8][/size]'>8px</option>
<option value='[size=9][/size]'>9px</option>
<option value='[size=10][/size]'>10px</option>
<option value='[size=11][/size]'>11px</option>
<option value='[size=12][/size]'>12px</option>
<option value='[size=14][/size]'>14px</option>
<option value='[size=15][/size]'>15px</option>
<option value='[size=18][/size]'>18px</option>
<option value='[size=20][/size]'>20px</option>
<option value='[size=22][/size]'>22px</option>
<option value='[size=24][/size]'>24px</option>
<option value='[size=26][/size]'>26px</option>
<option value='[size=28][/size]'>28px</option>
<option value='[size=30][/size]'>30px</option>
<option value='[size=36][/size]'>36px</option>
</select></td></tr>
</table></div>
</div>
<!-- End of Size selector -->
</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" id="Valider" value="Valider" class="submit" /></td>
</tr>
</table>
<input type="hidden" name="idm" value="<? echo ''.$idm.''; ?>" />
</form>
<br />
</td>
<td class="NB_fmr" width="8"><img src="images/blank.gif" width="8" height="2" /></td>
</tr>
</table>
<table class="ffooter" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_fbl" width="12" height="18" class="NB_fbl"><img src="images/blank.gif" width="12" height="18" /></td>
<td class="NB_fbm" width="100%" height="18"><img src="images/blank.gif" width="100%" height="18" /></td>
<td class="NB_fbr" width="12" height="18"><img src="images/blank.gif" width="12" height="18" /></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<?
}
?>
<? ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<?
$name = $_GET['name'];
if($name == "verif") {
$cat = secure($_POST['cat']);
$parent_cat = secure($_POST['type']);
$titre = secure($_POST['titre']);
$item = secure($_POST['item']);
$idm = secure($_POST['idm']);
$date = date("y-m-d");
$sql = "INSERT INTO ".$prefixe."_article(id, cat_parent, idm, titre, resume, cat, date) VALUES('', '$parent_cat', '$idm', '$titre', '$item', '$cat', '$date')";
mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
?>
<table class="ftable" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table class="fheader" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_ftl" width="16" height="41"><img src="images/blank.gif" width="16" height="41" /></td>
<td class="NB_ftm" align="center" width="100%" height="41">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_capl" width="10" height="41"><img src="images/blank.gif" width="10" height="41"></td>
<td class="NB_capm" height="41" style="white-space: nowrap;">Article</td>
<td class="NB_capr" width="10" height="41"><img src="images/blank.gif" width="10" height="41"></td>
</tr>
</table>
</td>
<td class="NB_ftr" width="10" height="41"><img src="images/blank.gif" width="10" height="41" /></td>
</tr>
</table>
<table class="fmiddle" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_fml" width="8"><img src="images/blank.gif" width="8" height="2" /></td>
<td class="NB_fmmain" width="100%">
<br />
<center>
<table align=center cellpadding="0" cellspacing="0" width=99%>
<tr>
<td>Votre article à bien été enregistré.<br><br>Il sera ajouté après vérification.</td>
</tr>
</table>
<br />
</td>
<td class="NB_fmr" width="8"><img src="images/blank.gif" width="8" height="2" /></td>
</tr>
</table>
<table class="ffooter" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_fbl" width="12" height="18" class="NB_fbl"><img src="images/blank.gif" width="12" height="18" /></td>
<td class="NB_fbm" width="100%" height="18"><img src="images/blank.gif" width="100%" height="18" /></td>
<td class="NB_fbr" width="12" height="18"><img src="images/blank.gif" width="12" height="18" /></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<?
}
?>
</TD>
<!-- END MAIN CONTENT AREA -->
<!-- RIGHT COLUMN -->
<TD vAlign="top" width="180">
<?php include('includes/menu-droit.php'); ?>
</TD>
<!-- END RIGHT COLUMN -->
</TR>
</TABLE></td>
</tr>
</table>
<?
}
////// Fin de l'identification pas reconnu
/// Fin de l'identification
?>
<?php include('includes/page_footer.php'); ?>
La je bloque j'espère que vous avez une solution.
Merci d'avance.
A bientôt.
Bonjour à tous,
Voilà j'ai vu dans les tutos comment réaliser une liste déroulante lié. Mais mon problème c'est que quand je sélectionne dans la première liste il traite automatiquement le formulaire sans que l'on puisse choisir dans la deuxième liste et sans que l'on puisse remplir les autres champs.
Voici mon code:
[php]<?php include('includes/page_header.php'); ?>
<script type='text/javascript'>
var nowLocal = new Date(); /* time at very beginning of js execution */
var localTime = Math.floor(nowLocal.getTime()/1000); /* time, in ms -- recorded at top of jscript */
function SyncWithServerTime(serverTime)
{
if (serverTime) {
/* update time difference cookie */
tdCookie='e107_tdOffset=';
tdSetTimeCookie='e107_tdSetTime=';
serverDelta=Math.floor(localTime-serverTime);
document.cookie = tdCookie+serverDelta;
document.cookie = tdSetTimeCookie+(localTime-serverDelta); /* server time when set */
}
tzCookie = 'e107_tzOffset=';
if (document.cookie.indexOf(tzCookie) < 0) {
/* set if not already set */
timezoneOffset = nowLocal.getTimezoneOffset(); /* client-to-GMT in minutes */
document.cookie = tzCookie + timezoneOffset;
}
}
if(document.getElementById&&!document.all){ns6=1;}else{ns6=0;}
var agtbrw=navigator.userAgent.toLowerCase();
var operaaa=(agtbrw.indexOf('opera')!=-1);
var head="display:''";
var folder='';
function expandit(curobj, hide) {
if(document.getElementById(curobj)) {
folder=document.getElementById(curobj).style;
} else {
if(ns6==1||operaaa==true) {
folder=curobj.nextSibling.nextSibling.style;
} else {
folder=document.all[curobj.sourceIndex+1].style;
}
}
if(folder.display=="none")
{
folder.display="";
} else {
folder.display="none";
}
if(hide) {
var hide_objects = hide.split(",");
for(i=0; i<hide_objects.length; i++) {
hide_objects[i]=hide_objects[i].replace(/^\s*(.*)/, "$1");
hide_objects[i]=hide_objects[i].replace(/(.*?)\s*$/, "$1");
if(document.getElementById(hide_objects[i])) {
hidden=document.getElementById(hide_objects[i]).style;
if(hidden.display=="") {
hidden.display="none";
}
}
}
}
}
function urljump(url){
top.window.location = url;
}
function setInner(id, txt) {
document.getElementById(id).innerHTML = txt;
}
function jsconfirm(thetext){
return confirm(thetext);
}
function insertext(str,tagid,display){
document.getElementById(tagid).value = str;
if(display){
document.getElementById(display).style.display='none';
}
}
function appendtext(str,tagid,display){
document.getElementById(tagid).value += str;
document.getElementById(tagid).focus();
if(display){
document.getElementById(display).style.display='none';
}
}
function open_window(url,wth,hgt) {
if('full' == wth){
pwindow = window.open(url);
} else {
if (wth) {
mywidth=wth;
} else {
mywidth=600;
}
if (hgt) {
myheight=hgt;
} else {
myheight=400;
}
pwindow = window.open(url,'Name', 'top=100,left=100,resizable=yes,width='+mywidth+',height='+myheight+',scrollbars=yes,menubar=yes')
}
pwindow.focus();
}
function ejs_preload(ejs_path, ejs_imageString){
var ejs_imageArray = ejs_imageString.split(',');
for(ejs_loadall=0; ejs_loadall<ejs_imageArray.length; ejs_loadall++){
var ejs_LoadedImage=new Image();
ejs_LoadedImage.src=ejs_path + ejs_imageArray[ejs_loadall];
}
}
function textCounter(field,cntfield) {
cntfield.value = field.value.length;
}
function openwindow() {
opener = window.open("htmlarea/index.php", "popup","top=50,left=100,resizable=no,width=670,height=520,scrollbars=no,menubar=no");
opener.focus();
}
function setCheckboxes(the_form, do_check, the_cb){
var elts = (typeof(document.forms[the_form].elements[the_cb]) != 'undefined') ? document.forms[the_form].elements[the_cb] : document.forms[the_form].elements[the_cb];
var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0;
if(elts_cnt){
for(var i = 0; i < elts_cnt; i++){
elts[i].checked = do_check;
}
}else{
elts.checked = do_check;
}
return true;
}
var ref=""+escape(top.document.referrer);
var colord = window.screen.colorDepth;
var res = window.screen.width + "x" + window.screen.height;
var eself = document.location;
// From http://phpbb.com
var clientPC = navigator.userAgent.toLowerCase();
var clientVer = parseInt(navigator.appVersion);
var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1) && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1) && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
var is_moz = 0;
var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac = (clientPC.indexOf("mac")!=-1);
var e107_selectedInputArea;
var e107_selectedRange;
var e107_dupCounter = 1;
// From http://www.massless.org/mozedit/
function mozWrap(txtarea, open, close){
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
if (selEnd == 1 || selEnd == 2) selEnd = selLength;
var s1 = (txtarea.value).substring(0,selStart);
var s2 = (txtarea.value).substring(selStart, selEnd)
var s3 = (txtarea.value).substring(selEnd, selLength);
txtarea.value = s1 + open + s2 + close + s3;
return;
}
function mozSwap(txtarea, newtext){
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
if (selEnd == 1 || selEnd == 2) selEnd = selLength;
var s1 = (txtarea.value).substring(0,selStart);
var s3 = (txtarea.value).substring(selEnd, selLength);
txtarea.value = s1 + newtext + s3;
return;
}
function storeCaret (textAr){
e107_selectedInputArea = textAr;
if (textAr.createTextRange){
e107_selectedRange = document.selection.createRange().duplicate();
}
}
function addtext(text, emote)
{
if (window.e107_selectedInputArea)
{
var ta = e107_selectedInputArea;
if (emote != true)
{ // Split if its a paired bbcode
val = text.split('][');
if (val[0] == text) val[1] = '';
}
else
{
val = text;
}
if ((clientVer >= 4) && is_ie && is_win)
{
theSelection = document.selection.createRange().text; /* wrap selected text */
if (theSelection)
{
if (emote != true)
{
if (val[1] == '')
{ // Single piece of text
document.selection.createRange().text = val[0];
}
else
{ // bbcode
document.selection.createRange().text = val[0] +']' + theSelection + '[' + val[1];
}
}
else
{
document.selection.createRange().text = val + theSelection;
}
ta.focus();
theSelection = '';
return;
}
}
else
if (ta.selectionEnd && (ta.selectionEnd - ta.selectionStart > 0))
{ // Selected text here
if (emote != true)
{
if (val[1] != '')
{ // BBCode to wrap
mozWrap(ta, val[0] +']', '[' + val[1]); /* wrap selected text */
}
else
{ // Single piece of text to insert, and delete any selected text
mozSwap(ta, text); /* wrap selected text */
}
}
else
{
mozWrap(ta, val, ''); /* wrap selected text */
}
return;
}
text = ' ' + text + ' ';
if (ta.createTextRange && e107_selectedRange)
{
var caretPos = e107_selectedRange; /* IE */
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
}
else
if (ta.selectionStart || ta.selectionStart == '0')
{ /* Moz */
var startPos = ta.selectionStart;
var endPos = ta.selectionEnd;
var charb4 = ta.value.charAt(endPos-1);
ta.value = ta.value.substring(0, endPos)+ text + ta.value.substring(endPos);
}
else
{
ta.value += text;
}
ta.focus();
}
}
function help(help,tagid){
if(tagid){
document.getElementById(tagid).value = help;
} else if(document.getElementById('dataform')) {
document.getElementById('dataform').helpb.value = help;
}
}
function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
function eover(object, over) {
object.className = over;
}
function duplicateHTML(copy,paste,baseid){
if(document.getElementById(copy)){
e107_dupCounter++;
var type = document.getElementById(copy).nodeName; // get the tag name of the source copy.
var but = document.createElement('input');
var br = document.createElement('br');
but.type = 'button';
but.value = 'x';
but.className = 'button';
but.onclick = function(){ this.parentNode.parentNode.removeChild(this.parentNode); };
var destination = document.getElementById(paste);
var source = document.getElementById(copy).cloneNode(true);
var newentry = document.createElement(type);
newentry.appendChild(source);
newentry.value='';
newentry.appendChild(but);
newentry.appendChild(br);
if(baseid)
{
newid = baseid+e107_dupCounter;
newentry.innerHTML = newentry.innerHTML.replace(new RegExp(baseid, 'g'), newid);
newentry.id=newid;
}
destination.appendChild(newentry);
}
}
function preview_image(src_val,img_path){
var ta;
var desti
var desti = src_val + '_prev';
ta = document.getElementById(src_val).value;
if(ta){
document.getElementById(desti).src = img_path + ta;
}else{
document.getElementById(desti).src = '".e_IMAGE."generic/blank.gif';
}
return;
}
//-->
</script>
<?
/// Début de l'identification
////// Début de l'identification pas reconnu
if (!isset($_SESSION['pseudo']))
{
echo '
<script language="javascript" type="text/javascript">
<!--
window.location.replace( "account-login.php?action=error");
-->
</script>
';
}
////// Fin de l'identification pas reconnu
////// Début de l'identification reconnu
else
{
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<TBODY>
<tr>
<td><TABLE cellSpacing="8" cellPadding="0" width="100%" border="0" >
<TBODY>
<TR>
<!-- LEFT COLUMN -->
<TD vAlign="top" width="180">
<?php include('includes/menu-gauche.php'); ?>
</TD>
<!-- END LEFT COLUMN -->
<!-- MAIN CENTER CONTENT START -->
<TD vAlign="top">
<?
$name = $_GET['name'];
if($name == "") {
?>
<table class="ftable" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table class="fheader" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_ftl" width="16" height="41"><img src="images/blank.gif" width="16" height="41" /></td>
<td class="NB_ftm" align="center" width="100%" height="41">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_capl" width="10" height="41"><img src="images/blank.gif" width="10" height="41"></td>
<td class="NB_capm" height="41" style="white-space: nowrap;">Artiste</td>
<td class="NB_capr" width="10" height="41"><img src="images/blank.gif" width="10" height="41"></td>
</tr>
</table>
</td>
<td class="NB_ftr" width="10" height="41"><img src="images/blank.gif" width="10" height="41" /></td>
</tr>
</table>
<table class="fmiddle" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_fml" width="8"><img src="images/blank.gif" width="8" height="2" /></td>
<td class="NB_fmmain" width="100%">
<br />
<center>
<?php
$idr = isset($_POST['cat'])?$_POST['cat']:null;
$sql1 = "SELECT `id_cat`, `cat` FROM `".$prefixe."_cat` ORDER BY `id_cat`";
$rech_cats = mysql_query($sql1);
$code_cat = array();
$cat = array();
$nb_cats = 0;
if($rech_cats != false)
{
while($ligne = mysql_fetch_assoc($rech_cats))
{
array_push($code_cat, $ligne['id_cat']);
array_push($cat, $ligne['cat']);
$nb_cats++;
}
}
?>
<form id="dataform" method="post" action="?name=verif" enctype="multipart/form-data" onsubmit="return frmVerify()">
<table align=center cellpadding="0" cellspacing="0" width=99%>
<tr>
<td width="180">Type :</td>
<td>
<select name="cat" id="cat" onchange="document.forms['dataform'].submit();">
<option value="-1">- - - Choisissez - - -</option>
<?php
for($i = 0; $i < $nb_cats; $i++)
{
?>
<option value="<?php echo($code_cat[$i]); ?>"<?php echo((isset($idr) && $idr == $code_cat[$i])?" selected=\"selected\"":null); ?>><?php echo($cat[$i]); ?></option>
<?php
}
?>
</select>
<?php
if(isset($idr) && $idr != -1)
{
$sql2 = "SELECT `id_type`, `type` FROM `".$prefixe."_type` WHERE `id_cat` = ". $idr ." ORDER BY `id_type`;";
if($c != false)
{
$rech_tpe = mysql_query($sql2, $c);
$nd = 0;
$code_tpe = array();
$nom_tpe = array();
while($ligne_tpe = mysql_fetch_assoc($rech_tpe))
{
array_push($code_tpe, $ligne_tpe['id_type']);
array_push($nom_tpe, $ligne_tpe['type']);
$nd++;
}
?>
<select name="type" id="type">
<?php
for($d = 0; $d<$nd; $d++)
{
?>
<option value="<?php echo($code_tpe[$d]); ?>"<?php echo((isset($tpe_selectionne) && $tpe_selectionne == $code_tpe[$d])?" selected=\"selected\"":null); ?>><?php echo($nom_tpe[$d]); ?></option>
<?php
}
?>
</select>
<?php
}
}
?>
</td>
</tr>
<tr>
<td width="180">Titre :</td>
<td><input type="text" name="titre" size="15" value="" class="gd"></td>
</tr>
<tr>
<td width="180">Description :</td>
<td><textarea class='tbox' id='item' name='item' cols='80' style='max-width:90%' rows='15' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'></textarea></td>
</tr>
<tr>
<td width="180"></td>
<td>
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/link.png' alt='' title='Insert link: [link]http://mysite.com[/link] or [link=http://yoursite.com]Visit My Site[/link]' onclick="addtext('[url][/url]')" onmouseout="help('','news')" onmouseover="help('Insert link: [link]http://mysite.com[/link] or [link=http://yoursite.com]Visit My Site[/link]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/bold.png' alt='' title='Bold text: [b]This text will be bold[/b]' onclick="addtext('[b][/b]')" onmouseout="help('','news')" onmouseover="help('Bold text: [b]This text will be bold[/b]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/italic.png' alt='' title='Italic text: [i]This text will be italicised[/i]' onclick="addtext('[i][/i]')" onmouseout="help('','news')" onmouseover="help('Italic text: [i]This text will be italicised[/i]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/underline.png' alt='' title='Underline text: [u]This text will be underlined[/u]' onclick="addtext('[u][/u]')" onmouseout="help('','news')" onmouseover="help('Underline text: [u]This text will be underlined[/u]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/image.png' alt='' title='Insert image: [img]mypicture.jpg[/img]' onclick="addtext('[img][/img]')" onmouseout="help('','news')" onmouseover="help('Insert image: [img]mypicture.jpg[/img]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/center.png' alt='' title='Center align: [center]This text will be centered[/center]' onclick="addtext('[align=center][/align]')" onmouseout="help('','news')" onmouseover="help('Center align: [center]This text will be centered[/center]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/left.png' alt='' title='Left align: [left]This text will be left aligned[/left]' onclick="addtext('[align=left][/align]')" onmouseout="help('','news')" onmouseover="help('Left align: [left]This text will be left aligned[/left]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/right.png' alt='' title='Right align: [right]This text will be right aligned[/right]' onclick="addtext('[align=right][/align]')" onmouseout="help('','news')" onmouseover="help('Right align: [right]This text will be right aligned[/right]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/blockquote.png' alt='' title='Blockquote text: [blockquote]This text will be blockquoted (indented)[/blockquote]' onclick="addtext('[quote][/quote]')" onmouseout="help('','news')" onmouseover="help('Blockquote text: [blockquote]This text will be blockquoted (indented)[/blockquote]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/code.png' alt='' title='Code - preformatted text: [code]$foo = bah;[/code]' onclick="addtext('[code][/code]')" onmouseout="help('','news')" onmouseover="help('Code - preformatted text: [code]$foo = bah;[/code]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/list.png' alt='' title='Unordered: [list]line1*line2*line3[/list] Ordered: [list=type]line1*line2*line3[/list]' onclick="addtext('[list][/list]')" onmouseout="help('','news')" onmouseover="help('Unordered: [list]line1*line2*line3[/list] Ordered: [list=type]line1*line2*line3[/list]','news')" />
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/fontcol.png' alt='' title='Click to open color dialog ...' onclick="expandit('col_selector_1299')" onmouseout="help('','news')" onmouseover="help('Click to open color dialog ...','news')" />
<!-- Start of Color selector -->
<div style='margin-left: 0px; margin-right: 0px; width: 221px; position: relative; z-index: 1000; float: right; display: none' id='col_selector_1299' onclick="this.style.display='none'" >
<div style='position: absolute; bottom: 30px; right: 145px; width: 221px'><script type='text/javascript'>
//<![CDATA[
var maxtd = 18;
var maxtddiv = -1;
var coloursrgb = new Array('00', '33', '66', '99', 'cc', 'ff');
var coloursgrey = new Array('000000', '333333', '666666', '999999', 'cccccc', 'ffffff');
var colourssol = new Array('ff0000', '00ff00', '0000ff', 'ffff00', '00ffff', 'ff00ff');
var rowswitch = 0;
var rowline = '';
var rows1 = '';
var rows2 = '';
var notr = 0;
var tdblk = '<td style=\'background-color: #000000; cursor: default; height: 10px; width: 10px;\'><\/td>';
var g = 1;
var s = 0;
function td_render(color) {
return '<td style=\'background-color: #' + color + '; height: 10px; width: 10px;\' onmousedown="addtext(\'[color=#' + color + '][/color]\')"><\/td>';
}
for (i=0; i < coloursrgb.length; i++) {
for (j=0; j < coloursrgb.length; j++) {
for (k=0; k < coloursrgb.length; k++) {
maxtddiv++;
if (maxtddiv % maxtd == 0) {
if (rowswitch) {
if (notr < 5){
rows1 += '<\/tr><tr>' + td_render(coloursgrey[g]) + tdblk;
g++;
}
rowswitch = 0;
notr++;
}else{
rows2 += '<\/tr><tr>' + td_render(colourssol[s]) + tdblk;
s++;
rowswitch = 1;
}
maxtddiv = 0;
}
rowline = td_render(coloursrgb[j] + coloursrgb[k] + coloursrgb[i]);
if (rowswitch) {
rows1 += rowline;
}else{
rows2 += rowline;
}
}
}
}
document.write('<table cellspacing=\'1\' cellpadding=\'0\' style=\'cursor: pointer; background-color: #000; width: 100%; border: 0px\'><tr>');
document.write(td_render(coloursgrey[0]) + tdblk + rows1 + rows2);
document.write('<\/tr><\/table>');
//]]>
</script></div>
</div>
<!-- End of Color selector -->
<img class='bbcode bbcode_buttons' style='cursor:pointer' src='images/bbcode/fontsize.png' alt='' title='Click to open size dialog ...' onclick="expandit('size_selector_8424')" onmouseout="help('','news')" onmouseover="help('Click to open size dialog ...','news')" />
<!-- Start of Size selector -->
<div style='margin-left:0px;margin-right:0px; position:relative;z-index:1000;float:right;display:none' id='size_selector_8424'><div style='position:absolute; bottom:30px; right:125px'><table class='fborder' style='background-color: #fff'>
<tr><td class='forumheader3'>
<select class='tbox' name='preimageselect' onchange="addtext(this.value); expandit('size_selector_8424')">
<option value=''>Font Size...</option>
<option value='[size=7][/size]'>7px</option>
<option value='[size=8][/size]'>8px</option>
<option value='[size=9][/size]'>9px</option>
<option value='[size=10][/size]'>10px</option>
<option value='[size=11][/size]'>11px</option>
<option value='[size=12][/size]'>12px</option>
<option value='[size=14][/size]'>14px</option>
<option value='[size=15][/size]'>15px</option>
<option value='[size=18][/size]'>18px</option>
<option value='[size=20][/size]'>20px</option>
<option value='[size=22][/size]'>22px</option>
<option value='[size=24][/size]'>24px</option>
<option value='[size=26][/size]'>26px</option>
<option value='[size=28][/size]'>28px</option>
<option value='[size=30][/size]'>30px</option>
<option value='[size=36][/size]'>36px</option>
</select></td></tr>
</table></div>
</div>
<!-- End of Size selector -->
</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" id="Valider" value="Valider" class="submit" /></td>
</tr>
</table>
<input type="hidden" name="idm" value="<? echo ''.$idm.''; ?>" />
</form>
<br />
</td>
<td class="NB_fmr" width="8"><img src="images/blank.gif" width="8" height="2" /></td>
</tr>
</table>
<table class="ffooter" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_fbl" width="12" height="18" class="NB_fbl"><img src="images/blank.gif" width="12" height="18" /></td>
<td class="NB_fbm" width="100%" height="18"><img src="images/blank.gif" width="100%" height="18" /></td>
<td class="NB_fbr" width="12" height="18"><img src="images/blank.gif" width="12" height="18" /></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<?
}
?>
<? ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?>
<?
$name = $_GET['name'];
if($name == "verif") {
$cat = secure($_POST['cat']);
$parent_cat = secure($_POST['type']);
$titre = secure($_POST['titre']);
$item = secure($_POST['item']);
$idm = secure($_POST['idm']);
$date = date("y-m-d");
$sql = "INSERT INTO ".$prefixe."_article(id, cat_parent, idm, titre, resume, cat, date) VALUES('', '$parent_cat', '$idm', '$titre', '$item', '$cat', '$date')";
mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
?>
<table class="ftable" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table class="fheader" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_ftl" width="16" height="41"><img src="images/blank.gif" width="16" height="41" /></td>
<td class="NB_ftm" align="center" width="100%" height="41">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_capl" width="10" height="41"><img src="images/blank.gif" width="10" height="41"></td>
<td class="NB_capm" height="41" style="white-space: nowrap;">Article</td>
<td class="NB_capr" width="10" height="41"><img src="images/blank.gif" width="10" height="41"></td>
</tr>
</table>
</td>
<td class="NB_ftr" width="10" height="41"><img src="images/blank.gif" width="10" height="41" /></td>
</tr>
</table>
<table class="fmiddle" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_fml" width="8"><img src="images/blank.gif" width="8" height="2" /></td>
<td class="NB_fmmain" width="100%">
<br />
<center>
<table align=center cellpadding="0" cellspacing="0" width=99%>
<tr>
<td>Votre article à bien été enregistré.<br><br>Il sera ajouté après vérification.</td>
</tr>
</table>
<br />
</td>
<td class="NB_fmr" width="8"><img src="images/blank.gif" width="8" height="2" /></td>
</tr>
</table>
<table class="ffooter" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="NB_fbl" width="12" height="18" class="NB_fbl"><img src="images/blank.gif" width="12" height="18" /></td>
<td class="NB_fbm" width="100%" height="18"><img src="images/blank.gif" width="100%" height="18" /></td>
<td class="NB_fbr" width="12" height="18"><img src="images/blank.gif" width="12" height="18" /></td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<?
}
?>
</TD>
<!-- END MAIN CONTENT AREA -->
<!-- RIGHT COLUMN -->
<TD vAlign="top" width="180">
<?php include('includes/menu-droit.php'); ?>
</TD>
<!-- END RIGHT COLUMN -->
</TR>
</TABLE></td>
</tr>
</table>
<?
}
////// Fin de l'identification pas reconnu
/// Fin de l'identification
?>
<?php include('includes/page_footer.php'); ?>
[/php]
La je bloque j'espère que vous avez une solution.
Merci d'avance.
A bientôt.