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 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
|
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WyMod Control Panel v1.0</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript">
<!-- Gestion des onglets -->
function multiMenu(eltId) {
arrLinkId = new Array('_0','_1','_2','_3');
intNbLinkElt = new Number(arrLinkId.length);
arrClassLink = new Array('current','ghost');
strContent = new String()
for (i=0; i<intNbLinkElt; i++) {
strContent = "menu"+arrLinkId[i];
if ( arrLinkId[i] == eltId ) {
document.getElementById(arrLinkId[i]).className = arrClassLink[0];
document.getElementById(strContent).className = 'on content';
} else {
document.getElementById(arrLinkId[i]).className = arrClassLink[1];
document.getElementById(strContent).className = 'off content';
}
}
// 15 mai 2010 _ GdalPlay _ WyDev Team
// Afficher / Masquer les boutons de commandes en fonction de l'onglet sélectionné
if (eltId == "_2")
{
document.getElementById("ecform_buttons").style.display = "block" ;
}
else
{
document.getElementById("ecform_buttons").style.display = "none" ;
}
}
function multiSMenu(eltId,pfxContent,n,m) {
arrLinkId = new Array();
for (i=0; i<m; i++) {arrLinkId.push('s'+n+i);}
arrClassLink = new Array('scurrent','sghost');
strContent = new String()
for (j=0; j<arrLinkId.length; j++) {
strContent = pfxContent+arrLinkId[j];
if ( arrLinkId[j] == eltId ) {
document.getElementById(arrLinkId[j]).className = arrClassLink[0];
document.getElementById(strContent).className = 'son scontent';
} else {
document.getElementById(arrLinkId[j]).className = arrClassLink[1];
document.getElementById(strContent).className = 'soff scontent';
}
}
}
<!-- Afficher / Masquer les paramètres et le descriptif du script sélectionné -->
function AffMasqParamDesScript(NomListe,NbreElement) {
for (i=1; i<=NbreElement; i++)
{
if (i == NomListe.selectedIndex+1)
{
document.getElementById("DesScript"+i).style.display = "block" ;
document.getElementById("ParamScript"+i).style.display = "block" ;
}
else
{
document.getElementById("DesScript"+i).style.display = "none" ;
document.getElementById("ParamScript"+i).style.display = "none" ;
}
}
}
<!-- Construction de la requête à envoyer au serveur -->
function DebugFctConsReq(){
// Script sélectionné _ Script1
IndexScriptSel = parseInt(document.getElementById("LstScript").selectedIndex) + 1;
ScriptSel = "Script" + IndexScriptSel;
n=1;
strRequete="";
// Parcourir les paramètres suivant la sélection du script
/* ID Liste des scripts: LstScript
Valeur de la sélection dans la liste des scripts: scriptX (X débute à 1)
ID d'un ensemble de paramètres d'un script: ParamScriptX (X débute à 1)
ID d'un paramètre d'un script: ScriptXParamY (X et Y débute à 1)
*/
while (document.getElementById(ScriptSel + "Param" + n) != null)
{
switch (document.getElementById(ScriptSel + "Param" + n).type)
{
case "text":
strRequete = strRequete +
"\n ------- \n" +
"Nom de la balise id = " + document.getElementById(ScriptSel + "Param" + n).name + "\n" +
"Valeur du champ = " + document.getElementById(ScriptSel + "Param" + n).value;
break;
case "checkbox":
strRequete = strRequete +
"\n ------- \n" +
"Nom de la balise id = " + document.getElementById(ScriptSel + "Param" + n).name + "\n" +
"Valeur du champ = " + document.getElementById(ScriptSel + "Param" + n).checked;
break;
default:
;
break;
}
n++;
}
// Message de débug....
alert("\t \t **** DEBUG ****" +
"\n ------- \n" +
"Script sélectionné 'ScriptSel' = " + ScriptSel +
strRequete);
}
<!-- Construction de la requête à envoyer au serveur -->
function FctConsReq(){
// Script sélectionné _ Script1
IndexScriptSel = parseInt(document.getElementById("LstScript").selectedIndex) + 1;
ScriptSel = "Script" + IndexScriptSel;
n=1;
strRequete = "Script=" + ScriptSel;
// Parcourir les paramètres suivant la sélection du script
/* ID Liste des scripts: LstScript
Valeur de la sélection dans la liste des scripts: scriptX (X débute à 1)
ID d'un ensemble de paramètres d'un script: ParamScriptX (X débute à 1)
ID d'un paramètre d'un script: ScriptXParamY (X et Y débute à 1)
*/
while (document.getElementById(ScriptSel + "Param" + n) != null)
{
strRequete = strRequete + "&";
switch (document.getElementById(ScriptSel + "Param" + n).type)
{
case "text":
strRequete = strRequete +
document.getElementById(ScriptSel + "Param" + n).name +
"=" +
document.getElementById(ScriptSel + "Param" + n).value;
break;
case "checkbox":
strRequete = strRequete +
document.getElementById(ScriptSel + "Param" + n).name +
"=" +
document.getElementById(ScriptSel + "Param" + n).checked;
break;
default:
;
break;
}
n++;
}
// Message de débug....
alert("\t \t **** DEBUG ****" +
"\n ------- \n" +
strRequete);
// Appel de la fonction envoyant la requête
FctEnvoiReq(strRequete);
}
<!-- Envoi de la requête au serveur -->
function FctEnvoiReq(strRequete) {
var xmlhttp;
if (window.XMLHttpRequest)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{
// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
// Attente de la réponse
xmlhttp.onreadystatechange=function()
{
// Réponse du serveur: 4 = état "complete"
if(xmlhttp.readyState == 4)
{
// Statut 200 = code HTTP pour OK
/*if(xmlhttp.status == "200")
{
// Traitement de la réponse. Bopite de dialogue affichant la réponse.
alert(xmlhttp.responseText);
{*/
}
};
// Envoi de la requête, méthode POST
xmlhttp.open("POST", "scripts_cgi/index.cgi", true);
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.send(strRequete);
}
</script>
</head>
<body>
<form>
<input type="button" value="Click me!" onclick="DebugFctConsReq()" />
</form>
<div id="header">
<h1>WyMod Control Panel</h1>
<h2>Improving Wydevices since 2009</h2>
</div>
<div id="container-top"></div>
<div id="container">
<div id="left">
<div id="left-top"></div>
<div id="left-centre">
<h1>Menu</h1>
<ul class="menu">
<li><a href="../Status.html">Status</a></li>
<li><a href="../Databases.html">Databases</a></li>
<li><a href="../Extrastatus.html">Extras</a></li>
<li><a href="../Reboot.html">Reboot</a></li>
<li><a href="wyrename.html">Projet GdalPlay</a></li>
<li><a href="test.html">Test Ok</a></li>
</ul>
<h2>Login</h2>
<p>Username:<br /><input type="text" /><br />
Password:<br /><input type="password" /><br />
<input type="submit" value="Log in" /></p>
</div>
<div id="left-bottom"></div>
</div>
<div id="right">
<div id="tabs">
<ul>
<li><div class="tab-active"><a href="#"><span>Main</span></a></div></li>
<li><div class="tab"><a href="aboutus.html"><span>About Us</span></a></div></li>
</ul>
</div>
<div id="right-top"></div>
<div id="right-centre">
<h1>WyRename</h1>
<p>Renommer vos fichiers</p>
<!-- <blockquote> -->
<div id="ecform_container">
<div id="ecform_entete">
<!-- <span id="ecform_title">Titre de la boite</span> -->
<ul id="menu">
<li class="menu_0">
<a id="_0" class="current" onclick="multiMenu(this.id)" alt="menu0">Fichiers</a>
</li>
<li class="menu_1">
<a id="_1" class="ghost" onclick="multiMenu(this.id)" alt="menu1">Opérations</a>
</li>
<li class="menu_2">
<a id="_2" class="ghost" onclick="multiMenu(this.id)" alt="menu2">Aperçu</a>
</li>
<li class="menu_3">
<a id="_3" class="ghost" onclick="multiMenu(this.id)" alt="menu3">A propos</a>
</li>
</ul>
</div>
<form id="formWyRename" action="scripts_cgi/wyrename/index.cgi" method="get">
<div id="ecform_topbar">
<!-- Top Bar -->
</div>
<div id="ecform_content">
<div id="menu_0" class="on content"><!-- ONGLET SÉLECTION DES FICHIERS -->
<div class="titcontent">
<h2>Sélections des fichiers</h2>
<p></p>
<table border="0" width="100%"><!-- Répertoire de travail -->
<tr>
<td colspan="2"><div>Répertoire</div></td>
</tr>
<tr>
<td width="85%"><input type="text" name="Rep1" size="60px" readonly="readonly" value="\\MT\root\wymedia\usr\share\wymod\projet_gdalplay\dossier_test\dossier 1\dossier 1.2\dossier 1.2.1"></td>
<td align="center"><input type="button" name="BtSelRep1" value="Parcourir"></td>
</tr>
</table>
<table border="0" width="100%"><!-- Liste des fichiers -->
<tr><!-- Titres colonnes -->
<td width="85%"><div>Fichiers</div></td>
<td align="center"><div>Sélectionner</div></td>
</tr>
<tr><!-- Fichier 1 -->
<td><input type="text" name="Rep1Fich1" size="60px" readonly="readonly" value="Fichier 1 dossier 1.2.1"></td>
<td align="center"><input type="checkbox" name="Rep1Fich1Vld" class="element checkbox" checked="checked"></td>
</tr>
<tr><!-- Fichier 2 -->
<td><input type="text" name="Rep1Fich2" size="60px" readonly="readonly" value="Fichier 1 dossier 1.2.2"></td>
<td align="center"><input type="checkbox" name="Rep1Fich2Vld" class="element checkbox" checked="checked"></td>
</tr>
<tr><!-- Fichier 3 -->
<td><input type="text" name="Rep1Fich3" size="60px" readonly="readonly" value="Fichier 1 dossier 1.2.3"></td>
<td align="center"><input type="checkbox" name="Rep1Fich3Vld" class="element checkbox" checked="checked"></td>
</tr>
<tr><!-- Fichier 4 -->
<td><input type="text" name="Rep1Fich4" size="60px" readonly="readonly" value="Fichier 1 dossier 1.2.4"></td>
<td align="center"><input type="checkbox" name="Rep1Fich4Vld" class="element checkbox" checked="checked"></td>
</tr>
<tr><!-- Fichier 5 -->
<td><input type="text" name="Rep1Fich5" size="60px" readonly="readonly" value="Fichier 1 dossier 1.2.5"></td>
<td align="center"><input type="checkbox" name="Rep1Fich5Vld" class="element checkbox" checked="checked"></td>
</tr>
</table>
</div>
</div>
<div id="menu_1" class="off content"><!-- ONGLET OPERATIONS -->
<div class="titcontent">
<h2>Opérations</h2>
<table border="0" width="100%">
<tr><!-- Titres colonnes -->
<td><div><i>Opérations</i></div></td>
<td><div><i>Paramètres</i></div></td>
</tr>
<tr><!-- Liste des scripts & Paramètres des scripts -->
<td width="210px"><!-- Liste des scripts -->
<div>
<select id="LstScript" size="10" style="width:200px" onchange="AffMasqParamDesScript(this,5);">
<option value="script1" selected>Changer l'extension</option>
<option value="script2">Remplacer une chaîne</option>
<option value="script3">Insérer une chaîne</option>
<option value="script4">Supprimer des caractères</option>
<option value="script5">Script 5</option>
</select>
</div>
</td>
<td align="left" valign="top"><!-- Paramètres des scripts -->
<div id="ParamScript1"><!-- Paramètres script 1 -->
<table border="0">
<tr>
<td colspan="2"><div>Remplacer l'extension par</div></td>
</tr>
<tr>
<td colspan="2"><input type="text" id="Script1Param1" name="Script1Param1" size="40px"></td>
</tr>
<tr>
<td><input type="checkbox" id="Script1Param2" name="Script1Param2"></td>
<td><div>Ne pas remplacer l'extension, ajouter la nouvelle extension au nom complet.</div></td>
</tr>
</table>
</div>
<div id="ParamScript2" style="display:none"><!-- Paramètres script 2 -->
<table border="0">
<tr>
<td><div>Rechercher</div></td>
</tr>
<tr>
<td><input type="text" id="Script2Param1" name="Script2Param1" size="40px"></td>
</tr>
<tr>
<td><div>Remplacer par</div></td>
</tr>
<tr>
<td><input type="text" id="Script2Param2" name="Script2Param2" size="40px"></td>
</tr>
</table>
</div>
<div id="ParamScript3" style="display:none"><!-- Paramètres script 3 -->
</div>
<div id="ParamScript4" style="display:none"><!-- Paramètres script 4 -->
</div>
<div id="ParamScript5" style="display:none"><!-- Paramètres script 5 -->
</div>
</td>
</tr>
<tr><!-- Descriptifs des scripts -->
<td colspan="2">
<div id="DesScript1">Script 1: Changer l'extension</div>
<div id="DesScript2" style="display:none">Script 2: Remplacer une chaîne</div>
<div id="DesScript3" style="display:none">Script 3: Insérer une chaîne</div>
<div id="DesScript4" style="display:none">Script 4: Supprimer des caractères</div>
<div id="DesScript5" style="display:none">Script 5: En cours</div>
</td>
</tr>
</table>
</div>
</div>
<div id="menu_2" class="off content"><!-- ONGLET APERÇU -->
<div class="titcontent">
<h2 >Titre Menu 2</h2>
<p>Texte menu 2 ;)</p>
</div>
</div>
<div id="menu_3" class="off content"><!-- ONGLET A PROPOS -->
<div class="titcontent">
<h2 >Conclusion</h2>
<p>Texte Conclusion ;)</p>
</div>
</div>
</div>
<div id="ecform_btmbar">
<ul id="ecform_buttons" style="display:none">
<li class="buttons">
<a id="btcancel" href="javascript:document.formWyRename.reset()" alt="Cancel">Reset</a>
</li>
<li class="buttons">
<a id="btsubmit" href="javascript:FctConsReq()" alt="Submit">Valider</a>
</li>
</ul>
</div>
</form>
</div>
<!-- Ne pas supprimer, bug d'affichage à corriger en bas de page ?? -->
<table border="0">
<tr>
<td></td>
</tr>
</table>
<!-- </blockquote> -->
</div>
<div id="right-bottom"></div>
</div>
<div class="clear"></div>
</div>
<div id="container-bottom"></div>
<div id="footer-top"></div>
<div id="footer-centre">
<p>© 2010 Wymod Control Panel<br />
<a href="http://gregdev.net">We will like to thanks specially to Greg Smith for this template donation.</a></p>
</div>
<div id="footer-bottom"></div>
</body>
</html> |
Partager