Valid XHTML    Valid CSS2    

Listing du fichier calcgh.php

 

00001     <?php
00002     
# (gH) -_- calcgh.php ; TimeStamp (unix) : 12 Février 2010 vers 17:54
00003     
include("../std.php") ;
00004     
debutPage
("Calculatrices en Ajax","strict","","calcgh.js") ;
00005     
debutSection() ;
00006     
####################################################################
00007     
h1
("Calculatrices") ;
00008     
blockquote() ;
00009     
sdl
(2) ;
00010     
00011     
#################################################################################################
00012     
00013     
h2
("Version 1 (eval simple)") ;
00014     
00015     
#################################################################################################
00016     
00017     
form
("non.php","post","onsubmit=\"calcul1(this) ; return false\"") ;
00018     
p() ;
00019     
nbsp
(5) ;
00020     
input_text
("calc1","3*(2+1)") ;
00021     
nbsp
(5) ;
00022     
input_submit
("go1","go1") ;
00023     
nbsp
(5) ;
00024     
input_text
("res1","",15,"invisible") ;
00025     
finp() ;
00026     
finform() ;
00027     
sdl
(2) ;
00028     
00029     
#################################################################################################
00030     
00031     
h2
("Version 2 (eval sophistiqué)") ;
00032     
00033     
#################################################################################################
00034     
00035     
form
("non.php","post","onsubmit=\"calcul2(this) ; return false\"") ;
00036     
00037     
table
(0,30) ;
00038     
tr
() ; td() ;
00039     
00040     
table
(1,5,"collapse bleu_pastel") ;
00041     
tr() ;
00042     
td
("C") ; echo href("non.php","7","bouton_fin jaune_pastel nou","t7","onclick='ajoute(\"7\") ; return false'") ; fintd() ;
00043     
td
("C") ; echo href("non.php","8","bouton_fin jaune_pastel nou","t8","onclick='ajoute(\"8\") ; return false'") ; fintd() ;
00044     
td
("C") ; echo href("non.php","9","bouton_fin jaune_pastel nou","t9","onclick='ajoute(\"9\") ; return false'") ; fintd() ;
00045     
td
("C") ; echo href("non.php","+","bouton_fin orange_pastel nou","tp","onclick='ajoute(\"+\") ; return false'") ; fintd() ;
00046     
fintr() ;
00047     
tr() ;
00048     
td
("C") ; echo href("non.php","4","bouton_fin jaune_pastel nou","t4","onclick='ajoute(\"4\") ; return false'") ; fintd() ;
00049     
td
("C") ; echo href("non.php","5","bouton_fin jaune_pastel nou","t5","onclick='ajoute(\"5\") ; return false'") ; fintd() ;
00050     
td
("C") ; echo href("non.php","6","bouton_fin jaune_pastel nou","t6","onclick='ajoute(\"6\") ; return false'") ; fintd() ;
00051     
td
("C") ; echo href("non.php","-","bouton_fin orange_pastel nou","tm","onclick='ajoute(\"-\") ; return false'") ; fintd() ;
00052     
fintr() ;
00053     
tr() ;
00054     
td
("C") ; echo href("non.php","1","bouton_fin jaune_pastel nou","t1","onclick='ajoute(\"1\") ; return false'") ; fintd() ;
00055     
td
("C") ; echo href("non.php","2","bouton_fin jaune_pastel nou","t2","onclick='ajoute(\"2\") ; return false'") ; fintd() ;
00056     
td
("C") ; echo href("non.php","3","bouton_fin jaune_pastel nou","t3","onclick='ajoute(\"3\") ; return false'") ; fintd() ;
00057     
td
("C") ; echo href("non.php","*","bouton_fin orange_pastel nou","te","onclick='ajoute(\"*\") ; return false'") ; fintd() ;
00058     
fintr() ;
00059     
tr() ;
00060     
td
("C") ; echo href("non.php",".","bouton_fin jaune_pastel nou","tv","onclick='ajoute(\"0\") ; return false'") ; fintd() ;
00061     
td
("C") ; echo href("non.php","0","bouton_fin jaune_pastel nou","t0","onclick='ajoute(\".\") ; return false'") ; fintd() ;
00062     
td
("C") ; echo href("non.php","=","bouton_fin fond_rouge coul_jaune nou","del","onclick='calcul2(this) ; return false'") ; fintd() ;
00063     
td
("C") ; echo href("non.php","/","bouton_fin orange_pastel nou","tdiv","onclick='ajoute(\"/\") ; return false'") ; fintd() ;
00064     
fintr() ;
00065     
tr() ;
00066     
td
("C") ; echo href("non.php","(","bouton_fin vert_pastel nou","tg","onclick='ajoute(\"(\") ; return false'") ; fintd() ;
00067     
td
("C") ; echo href("non.php",")","bouton_fin vert_pastel nou","td","onclick='ajoute(\")\") ; return false'") ; fintd() ;
00068     
td
("C","",2) ; echo href("non.php","efface","bouton_fin fond_jaune2 coul_rouge nou","eff","onclick='efface() ; return false'") ; fintd() ;
00069     
fintr() ;
00070     
fintable() ;
00071     
00072     
fintd() ;
00073     
td() ;
00074     
00075     
input_text
("calc2","",25,"invisible") ;
00076     
nbsp
(5) ;
00077     
# inutile car déclenché par la touche =
00078     # input_submit("go3","go3") ;
00079     # nbsp(5) ;
00080     
input_text
("res2","",25,"invisible") ;
00081     
fintd() ;
00082     
fintr() ;
00083     
fintable() ;
00084     
finform() ;
00085     
sdl
(2) ;
00086     
00087     
#################################################################################################
00088     
00089     
h2
("Version 3 (google direct)") ;
00090     
00091     
#################################################################################################
00092     
00093     
form
("http://www.google.fr/search","get") ;
00094     
p() ;
00095     
nbsp
(5) ;
00096     
input_text
("q","3*(2+1)") ;
00097     
nbsp
(5) ;
00098     
input_submit
("go3","go3") ;
00099     
finp() ;
00100     
finform() ;
00101     
sdl
(2) ;
00102     
00103     
#################################################################################################
00104     
00105     
h2
("Version 4 (google ajax)") ;
00106     
00107     
#################################################################################################
00108     
00109     
form
("non.php","post","onsubmit=\"calculAjax(); return false\"") ;
00110     
p() ;
00111     
nbsp
(5) ;
00112     
input_text
("calc4","3*(2+1)") ;
00113     
nbsp
(5) ;
00114     
input_submit
("go4","go4") ;
00115     
nbsp
(5) ;
00116     
input_text
("res4","",15,"invisible") ;
00117     
finp() ;
00118     
finform() ;
00119     
00120     
/*
00121     pre("cadre","reponse") ;
00122     echo "Réponse Google " ;
00123     finpre() ;
00124     */
00125     
sdl
(2) ;
00126     
00127     
00128     
finblockquote() ;
00129     
####################################################################
00130     
finSection() ;
00131     
finPage() ;
00132     
?>

Pour ne pas voir les numéros de ligne, ajoutez &nl=non à la suite du nom du fichier.

 

 

retour gH    Retour à la page principale de   (gH)