|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I make a wap site which is generated by a php script. It works well in emulators, when I put the header right, but not in my mobile. When I remove the header it works on my mobile but not the way I would like. In fact it displays all the content and it does not separate the different card that I generate.... I tried all I know!!! Here is the source:
<?php header("Content-type: text/vnd.wap.wml"); echo "<?xml version=\"1.0\"?>"; echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"" . " \"http://www.wapforum.org/DTD/wml_1.1.xml\">"; echo"<wml>\n"; $configpath=".."; include("../config.inc.php"); include("../mysql.config.php"); $result=mysql_connect("$hostname", "$username", "$passwordsql"); mysql_select_db("$bdd"); $query=mysql_query("SELECT * FROM identification WHERE num = '$login' AND pass = '$mdp'"); if(mysql_num_rows($query)=="0") die("<card>\n<p>Mot de passe incorrect ou pas inscrit sur le tutoweb.net</p>\n</card>\n</wml>"); //Menu Wap echo "<card id=\"menu\" title=\"Colles\">\n"; $planning=file("../planningcolles.txt"); foreach($planning as $ligne){ $ducon=explode(" : ",$ligne); $datejourmoiscolle=substr($ducon[2],0,2)."/".substr($ducon[2],2,2); if(file_exists("../stats/$ducon[0]/stat-$ducon[0].web")) echo "<p><a href=\"#$ducon[0]\">*$ducon[1] du $datejourmoiscolle*</a></p>\n"; } if(!$ducon) echo "<p>Aucune colle disponible</p>\n"; echo "</card>\n"; //Cartes des résultats foreach($planning as $ligne){ $ducon=explode(" : ",$ligne); if(file_exists("../stats/$ducon[0]/stat-$ducon[0].web")){ echo "<card id=\"$ducon[0]\" title=\"$ducon[1] du $datejourmoiscolle\">\n"; //Affichage du classement de la personne $file=file("../stats/$ducon[0]/stat-$ducon[0].web"); foreach($file as $line){ $ligne=explode(":",$line); if($ligne[0]==$login){ $note=$ligne[1]; $clsst1=$ligne[2]; $clsst2=$ligne[3]; $clsst3=$ligne[4]; echo"<p><b>Note:</b> $note/20</p>\n"; echo"<p><b>Medecine:</b>"; if($clsst1==0){ echo"Pas inscrit</p>\n"; }else{ if($clsst1!=1) echo "$clsst1"." eme</p>\n"; else echo "$clsst1"." er</p>\n"; if($clsst1==1) echo"<p><i>Bravo tu es major de la colle!!</i></p>\n"; } echo"<p><b>Kine:</b>"; if($clsst2==0){ echo"Pas inscrit</p>\n"; }else{ if($clsst2!=1) echo"$clsst2"." eme</p>\n"; else echo"$clsst2"." er</p>\n"; if($clsst2==1) echo"<p><i>Bravo tu es major de la colle!!</i></p>\n"; } echo"<p><b>Ergo:</b>"; if($clsst3==0){ echo"Pas inscrit</p>\n"; }else{ if($clsst3!=1) echo"$clsst3"."eme</p>\n"; else echo"$clsst3"."er</p>\n"; if($clsst3==1) echo"<p><i>Bravo tu es major de la colle!!</i></p>\n"; } } if($ligne[0]=="/stats"){ echo "<p><b>Effectif:</b> $ligne[1]</p>\n"; echo "<p><b>Moyenne:</b> $ligne[2]/20</p>\n"; echo "<p><b>Note major:</b> $ligne[3]/20</p>\n"; } } echo "<p><a href=\"#menu\">Retour</a></p>\n"; echo "</card>\n"; } } echo"</wml>"; ?> I tried to change the position of the <wml>, tried to remove something but anyway. Please help me!!!! When I remove the header all is shown: like that: (it's in French but don't care) *Anatomie du 23/02* *Physiologie du 23/02* *Histologie du 01/03* *Anatomie du 08/03* *Rea-Reeduc du 08/03* *Physiologie du 15/03* *Statistiques du 22/03* *Chimie du 29/03* Note: 8,6/20 Medecine:258 eme Kine:148 eme Ergo:103 eme Effectif: 560 Moyenne: 8,6/20 Note major: 16,2/20 Retour Note: 9/20 Medecine:278 eme Kine:158 eme Ergo:110 eme Effectif: 533 Moyenne: 9,53/20 Note major: 16,8/20 Retour Note: 9/20 Medecine:210 eme Kine:115 eme Ergo:75 eme Effectif: 568 Moyenne: 8,21/20 Note major: 14,7/20 Retour Note: 9,4/20 Medecine:267 eme Kine:146 eme Ergo:108 eme Effectif: 570 Moyenne: 9,37/20 Note major: 17,4/20 Retour Note: 0/20 Medecine:106 eme Kine:115 eme Ergo:82 eme Effectif: 125 Moyenne: 9,51/20 Note major: 13,7/20 Retour Note: 10,29/20 Medecine:303 eme Kine:176 eme Ergo:120 eme Effectif: 571 Moyenne: 10,3/20 Note major: 17,6/20 Retour Note: 9,61/20 Medecine:192 eme Kine:98 eme Ergo:63 eme Effectif: 393 Moyenne: 9,61/20 Note major: 19,03/20 Retour Note: 0/20 Medecine:94 eme Kine:59 eme Ergo:48 eme Effectif: 97 Moyenne: 10,11/20 Note major: 20/20 Retour In fact it should create links in card which is done in certain model phones but not all!!! Thanks a lot!! phil |
|
#2
|
||||
|
||||
|
Bit difficult to test when I don't have you DB connection but try changing your first line to:
PHP Code:
See if that helps. You could also maybe escape the PHP momentarily , see if that is causing a problem PHP Code:
__________________
Cheers, Jamie # skiFFie | Home of the 'accessibility module' for Drupal # Jamie Burns [me] Accessibility Module [drupal] # guidelines | search | wap resources | not getting help | fold to cure __________________ Let the might of your compassion arise to bring a quick end to the flowing stream of the blood and tears ..... Please hear my anguished words of truth. ![]() __________________ |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Mobile Programming > HELP ME!!!! php+wml |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|