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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" "hmpro6.dtd">
<HTML>
<HEAD>
<script language="Javascript"type="text/JavaScript">
// Requette AJAX
function makeRequest(url,id_niveau,id_ecrire){
var http_request = false;
//créer une instance (un objet) de la classe désirée fonctionnant sur plusieurs navigateurs
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/xml');//un appel de fonction supplémentaire pour écraser l'en-tête envoyé par le serveur, juste au cas où il ne s'agit pas de text/xml, pour certaines versions de navigateurs Mozilla
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Abandon :( Impossible de créer une instance XMLHTTP');
return false;
}
http_request.onreadystatechange = function() { traitementReponse(http_request,id_ecrire); } //affectation fonction appelée qd on recevra la reponse
// lancement de la requete
http_request.open('POST', url, true);
//changer le type MIME de la requête pour envoyer des données avec la méthode POST , !!!! cette ligne doit etre absolument apres http_request.open('POST'....
http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
obj=document.getElementById(id_niveau);
data="val_sel="+obj.value;
http_request.send(data);
}
function traitementReponse(http_request,id_ecrire) {
var affich="";
if (http_request.readyState == 4) {
if (http_request.status == 200) {
// cas avec reponse de PHP en mode texte:
//chargement des elements reçus dans la liste
var affich_list=http_request.responseText;
obj = tinyMCE.execCommand('mceInsertContent',false,affich_list);
obj.innerHTML = affich_list;
}
else {
alert('Un problème est survenu avec la requête.');
}
}
}
</script>
<script type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
// Style formats
style_formats : [
{title : 'Bold text', inline : 'b'},
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
{title : 'Example 1', inline : 'span', classes : 'example1'},
{title : 'Example 2', inline : 'span', classes : 'example2'},
{title : 'Table styles'},
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
],
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
<TITLE></TITLE> <STYLE TYPE="text/css">
BODY {
margin-top: 10pt;
margin-right: 0pt;
margin-left: 0pt;
margin-bottom: 0pt;
padding-top: 0pt;
padding-right: 0pt;
padding-left: 0pt;
padding-bottom: 0pt;
}
</STYLE>
</HEAD>
<?php
include ("config.php");
// Connexion a la base de donnees
$AccesBase = mysql_connect($host,$Login,$Pass);
mysql_select_db($DB,$AccesBase);
$QuestionBase = "SELECT DISTINCT $champ_nom FROM $Table ORDER BY $champ_nom ASC " ;
$result_recherche=mysql_db_query($DB, $QuestionBase) or die (mysql_error());
$nombre_enr=mysql_num_rows($result_recherche);
?>
<BODY BGCOLOR="" TEXT="#000000" STYLE="font-family: Arial">
<CENTER>
<TABLE BORDER="0" WIDTH="625" CELLPADDING="0" CELLSPACING="0"
BGCOLOR="#cde3ff">
<TR VALIGN="MIDDLE">
<TD VALIGN="MIDDLE" ALIGN="LEFT">
<FORM ENCTYPE="multipart/form-data" ACTION="HiQFM.php"
METHOD="POST">
<form name="test1" method="post" action="liste_liees.php" >
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
<!--<INPUT TYPE="hidden" NAME=" SelectRecipient-Special " VALUE="user08"> -->
<TABLE WIDTH="99%" BORDER="0" CELLPADDING="5">
</TABLE>
<TABLE WIDTH="100%" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD VALIGN="MIDDLE" ALIGN="RIGHT" COLSPAN="2"><I>Nom</I></TD>
<TD width="402" ALIGN="LEFT">
<P><INPUT TYPE="TEXT" NAME="First Name"
SIZE="25" MAXLENGTH="25"></P> </TD>
</TR>
<TR>
<TD VALIGN="MIDDLE" ALIGN="RIGHT" COLSPAN="2"><I>Prenom</I></TD>
<TD>
<P><INPUT TYPE="TEXT" NAME="Last Name" SIZE="25"
MAXLENGTH="25"></P> </TD>
</TR>
<TR>
<TD VALIGN="MIDDLE" ALIGN="RIGHT" COLSPAN="2"><EM>email</EM></TD>
<TD><INPUT TYPE="TEXT" NAME="email" SIZE="35"
MAXLENGTH="550"></TD>
</TR>
<TR>
<TD VALIGN="MIDDLE" ALIGN="RIGHT" COLSPAN="2"><I>Adresse Email</I></TD>
<TD>
<P><INPUT TYPE="TEXT" NAME="email" SIZE="35"
MAXLENGTH="45"></P> </TD>
</TR>
</TABLE>
<TABLE WIDTH="100%" BORDER="0" CELLPADDING="3" CELLSPACING="3"
BGCOLOR="#cde3ff">
<TR>
<TD>
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0">
<TR>
<TD VALIGN="MIDDLE" ALIGN="RIGHT" COLSPAN="2"><EM>Pieces jointe 1 : </EM> </TD>
<TD width="408">
<P><INPUT TYPE="file" SIZE="40" NAME="attachment[]">
</P> </TD>
</TR>
<TR>
<TD VALIGN="MIDDLE" ALIGN="RIGHT" COLSPAN="2"><EM>Pieces jointe 2 : </EM></TD>
<TD>
<P><INPUT TYPE="file" SIZE="40" NAME="attachment[]">
</P></TD>
</TR>
<TR>
<TD VALIGN="MIDDLE" ALIGN="RIGHT" COLSPAN="2"><EM>Pieces jointe 3 : </EM></TD>
<TD>
<P><INPUT TYPE="file" SIZE="40" NAME="attachment[]">
</P></TD>
</TR>
<TR>
<TD>
<select name="niv1" id="id_niv1" onChange="makeRequest('RepPhpAjax.php','id_niv1','id_list2')">
<option>-- Choisissez --</option>
<?php
while ($row=mysql_fetch_assoc($result_recherche)){
?>
<option value="<?php echo $row[$champ_nom]?>"><?php echo $row[$champ_nom]?></option>
<?php
}
?>
</select>
</TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
<DIV STYLE="text-align: center">
<TEXTAREA id="id_list2" NAME="description" ROWS="5" COLS="50"></TEXTAREA> <BR>
<TABLE WIDTH="100%" BORDER="0" CELLPADDING="3" CELLSPACING="3"
BGCOLOR="#cde3ff">
<TR>
<TD ALIGN="CENTER"><INPUT TYPE="SUBMIT"
VALUE="Envoyer par mail" HEIGHT="25" WIDTH="35" BORDER="5">
<INPUT TYPE="RESET" VALUE="Effacer" HEIGHT="25" WIDTH="35" BORDER="5"><BR>
</TD>
</TR>
</TABLE></DIV> </FORM> </TD>
</TR>
</TABLE> </CENTER> </BODY>
</HTML> |
Partager