xhtml debug.
authorx2000habouzit <x2000habouzit>
Tue, 24 Aug 2004 22:18:46 +0000 (22:18 +0000)
committerx2000habouzit <x2000habouzit>
Tue, 24 Aug 2004 22:18:46 +0000 (22:18 +0000)
be carefull, in order to embed javascript into a page, the right method is :

<script type=text/javascript>
//<![CDATA[
 ... your code here ...
//]]>
</script>

and NO other one

htdocs/inscrire.php
include/applis.func.inc.php
include/sondage.header.inc.php [deleted file]
templates/applis.js.tpl
templates/docs/charte.tpl
templates/inscrire.charte.tpl
templates/inscrire.form_data.tpl
templates/inscrire.form_id.tpl

index 9e924a7..9e9e3d0 100644 (file)
@@ -28,7 +28,7 @@ if(isset($_REQUEST["charte"])) { // ok la variable $_REQUEST["charte"] existe
             require("applis.func.inc.php");
            
            $page->assign('homonyme', $homonyme);
-           $page->assign('loginbis', $loginbis);
+           $page->assign('loginbis', isset($loginbis) ? $loginbis : '');
            $page->assign('mailorg', $mailorg);
            
            $page->assign('prenom', $prenom);
@@ -50,6 +50,14 @@ if(isset($_REQUEST["charte"])) { // ok la variable $_REQUEST["charte"] existe
        
        if(!empty($erreur)) {
            new_skinned_page('inscrire.form_data.tpl', AUTH_PUBLIC, true);
+           require("applis.func.inc.php");
+           $page->assign('homonyme', $homonyme);
+           $page->assign('loginbis', isset($loginbis) ? $loginbis : '');
+           $page->assign('mailorg', $mailorg);
+           
+           $page->assign('prenom', $prenom);
+           $page->assign('nom', $nom);
+           
            $page->assign('erreur', $erreur);
            $page->run();
        }
index e7c0eff..018ecd3 100644 (file)
@@ -14,8 +14,8 @@ function applis_options($current=0) {
     $res=$globals->db->query("select * from applis_def order by text");
     while ($arr_appli=mysql_fetch_array($res)) { 
        echo '<option value="'.$arr_appli["id"].'"';
-       if ($arr_appli["id"]==$current) echo " selected";
-       echo '>'.$arr_appli["text"]."</option>\n";
+       if ($arr_appli["id"]==$current) echo " selected='selected'";
+       echo '>'.htmlspecialchars($arr_appli["text"])."</option>\n";
     }
 }
 /** pour appeller applis_options depuis smarty
diff --git a/include/sondage.header.inc.php b/include/sondage.header.inc.php
deleted file mode 100644 (file)
index 59ff2a9..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-
-/*
- * Header spécial sondage (sans les menus x.org)
- */
-
-// Pour des url relatives !!!
-require_once("appel.inc.php");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-    <meta name="description" content="Sondage">
-    <meta name="keywords" content="sondage">
-<?php
-       require_once('linkbar.inc.php');
-       if (empty($_SESSION['skin_compatible'])) { ?>
-    <link rel="stylesheet" type="text/css" href="<?php echo url("Sk/Base/Base.css");?>" media="screen">
-<?php } ?>
-    <link rel="stylesheet" type="text/css" href="<?php echo url("Sk/{$_SESSION['name']}/{$_SESSION['name']}.css");?>" media="screen">
-    <link rel="icon" type="image/png" href="/images/favicon.png">
-    <title>
-      Sondage
-    </title>
-    <script language="JavaScript" type="text/javascript">
-      <!--
-      function Msg(msg) {
-        status=msg;
-        document.returnValue = true;
-      }
-      function getNow() {
-        dt=new Date();
-        dy=dt.getDay();
-        mh=dt.getMonth();
-        wd=dt.getDate();
-        yr=dt.getYear();
-        if (yr<1000) yr += 1900;
-        hr=dt.getHours();
-        mi=dt.getMinutes();
-        if (mi<10)
-          time=hr+":0"+mi;
-        else
-          time=hr+":"+mi;
-        days=new Array ("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi");
-        months=new Array ("janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre");
-        return days[dy]+" "+wd+" "+months[mh]+" "+yr+"<br>"+time;
-      }
-      //-->
-    </script>
-  </head>
-  <body>
index 8f55c2a..1dfe81d 100644 (file)
@@ -1,6 +1,6 @@
-<script language="JavaScript" type="text/javascript">
-<!-- Begin
-applisType = new Array(
+<script type="text/javascript">
+//<![CDATA[
+    applisType = new Array(
 {applis_type}
 );
 
@@ -34,7 +34,6 @@ function selectType( selectCtrl, type ) {
       selectCtrl.selectedIndex=i;
   }
 }
-
-// End -->
-</script>
 {/literal}
+//]]>
+</script>
index f28f669..ad1fcc0 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: charte.tpl,v 1.1 2004-01-29 14:18:55 x2000habouzit Exp $ *}
+{* $Id: charte.tpl,v 1.2 2004-08-24 22:18:47 x2000habouzit Exp $ *}
 
 <div class="rubrique">
   Conditions générales d'utilisation
@@ -43,6 +43,7 @@ Tu t'assures que tu as le droit d'utiliser ton adresse e-mail pour un reroutage
 </div>
 <p class="normal">
 La liberté d'expression est limitée en France par certaines lois que tu dois respecter.
+</p>
 <div class="ssrubrique">
   6 - ETHIQUE :
 </div>
index c1e2d48..fdc9a35 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: inscrire.charte.tpl,v 1.1 2004-07-19 08:58:04 x2000habouzit Exp $ *}
+{* $Id: inscrire.charte.tpl,v 1.2 2004-08-24 22:18:47 x2000habouzit Exp $ *}
 
 <form action="{$smarty.server.REQUEST_URI}" method="post">
   <div class="rubrique">
@@ -10,8 +10,8 @@
   recontactons pour te fournir un mot de passe et te demander de le changer.
   </p>
   {include file="docs/charte.tpl"}
-  <input type="hidden" value="OUI" name="charte" />
   <div class="center">
+    <input type="hidden" value="OUI" name="charte" />
     <input type="submit" value="J'accepte ces conditions" name="submit" />
   </div>
 </form>
index 54a1e57..4deb2bd 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: inscrire.form_data.tpl,v 1.1 2004-07-19 08:58:04 x2000habouzit Exp $ *}
+{* $Id: inscrire.form_data.tpl,v 1.2 2004-08-24 22:18:47 x2000habouzit Exp $ *}
 
 {include file="applis.js.tpl"}
 
@@ -9,15 +9,10 @@
 {dynamic}
 
 {foreach from=$erreur item=err}
-<p class="erreur">{$err}</p>
+<p class="erreur">{$err|smarty:nodefaults}</p>
 {/foreach}
 
 <form action="{$gotourl|default:$smarty.server.REQUEST_URI}" method="post" name="infos">
-  <input type="hidden" value="OUI" name="charte" />
-  <input type="hidden" value="{$smarty.request.nom}" name="nom" />
-  <input type="hidden" value="{$smarty.request.prenom}" name="prenom" />
-  <input type="hidden" value="{$smarty.request.promo}" name="promo" />
-  <input type="hidden" value="{$smarty.request.matricule}" name="matricule" />
   {if $homonyme}
   <p class="normal">
   Tu as un homonyme dans notre base de données, nous ne pouvons donc pas te donner 
         Appli graduate
       </td>
       <td>
-        <select name="appli_id1" onChange="fillType(this.form.appli_type1, this.selectedIndex-1);">
+        <select name="appli_id1" onchange="fillType(this.form.appli_type1, this.selectedIndex-1);">
           {applis_options selected=$smarty.request.appli_id1}
         </select>
         <br />
         Post-graduate
       </td>
       <td>
-        <select name="appli_id2" onChange="fillType(this.form.appli_type2, this.selectedIndex-1);">
+        <select name="appli_id2" onchange="fillType(this.form.appli_type2, this.selectedIndex-1);">
           {applis_options selected=$smarty.request.appli_id2}
         </select>
         <br />
     </tr>
     <tr>
       <td colspan="2" class="center">
+        <input type="hidden" value="OUI" name="charte" />
+        <input type="hidden" value="{$smarty.request.nom}" name="nom" />
+        <input type="hidden" value="{$smarty.request.prenom}" name="prenom" />
+        <input type="hidden" value="{$smarty.request.promo}" name="promo" />
+        <input type="hidden" value="{$smarty.request.matricule}" name="matricule" />
         <input type="submit" value="Terminer la pré-inscription" name="submit" />
       </td>
     </tr>
index d4cb58d..8ee6718 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: inscrire.form_id.tpl,v 1.1 2004-07-19 08:58:04 x2000habouzit Exp $ *}
+{* $Id: inscrire.form_id.tpl,v 1.2 2004-08-24 22:18:47 x2000habouzit Exp $ *}
 
 {dynamic}
 
@@ -6,11 +6,10 @@
 <p class="erreur">{$err}</p>
 {/foreach}
 
-<form action="{$smarty.server.REQUEST_URI}" method="POST">
+<form action="{$smarty.server.REQUEST_URI}" method="post">
   <div class="rubrique">
     Identification
   </div>
-  <input type="hidden" value="OUI" name="charte" />
   <p class="normal">
     Renseigne tes nom, prénom et promotion, et si tu es d'une promotion
     postérieure à la 1996, ton numéro de matricule.
@@ -72,6 +71,7 @@
     </tr>
     <tr>
       <td colspan="2" class="center">
+        <input type="hidden" value="OUI" name="charte" />
         <input type="submit" value="Continuer l'inscription" name="submit" />
       </td>
     </tr>