ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
694
694
EMPFEHLEN
-
Hallo,
habe folgenes Problem:
unzwar habe ich eine page mit einen voting script
nur leider geht es nicht so wie im test:
aufgebaut ist es so:
von diesem scrollscript
Code :1
http://www.blackeg6.de/basti/homepage/campus/girlsvote.php
auf diese page:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<table class="textmenu"> <tr> <td> <br> Bild1 Girly1 <br> <br> <img src="girl5.jpg" align="absmiddle"> </td> </tr> <tr> <td><tr> <td> <?php include ('vote/rate.php'); ?> </td> </tr> </td></tr> </table>
dann wird dieses geladen:
Code :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
<? $path= "http://www.blackeg6.de/basti/homepage/campus/vote/"; $ficdest=explode(".",basename($PHP_SELF)); $ficdest=$ficdest[0].".dat"; if(file_exists($ficdest)) { $compteur=fopen($ficdest, "r"); $old_stats=file($ficdest); $stats=explode("|", $old_stats[0]); fclose($compteur); $new_count=$stats[0]; if ($stats[3] != $REMOTE_ADDR) { $new_count +=1; } $ip_hit=$REMOTE_ADDR; $compteur=fopen($ficdest, "w"); fputs($compteur, "$new_count|$stats[1]|$stats[2]|$ip_hit|$stats[4]"); fclose($compteur); } else { $nouveau_compteur=fopen($ficdest, "w"); fputs($nouveau_compteur, "1|||$REMOTE_ADDR|"); fclose($nouveau_compteur); } if (!empty($envoi)) { $vote=fopen($ficdest, "r"); $old_stats=file($ficdest); $stats=explode("|", $old_stats[0]); fclose($vote); $nbr_votes=$stats[1]; $moy_votes=$stats[2]; if ($stats[4] != $REMOTE_ADDR) { $nbr_votes +=1; $moy_votes=((($stats[1]*$stats[2])+$note)/$nbr_votes); } else { echo "<font face=Verdana size=2 color=FFFFFF>Sie haben schon abgestimmt</font>"; } $ip_vote=$REMOTE_ADDR; $vote=fopen($ficdest, "w"); $new_stats=fputs($vote, "$new_count|$nbr_votes|$moy_votes|$stats[3]|$ip_vote"); fclose($vote); } print ("<form method=post>"); $old_stats=file($ficdest); $stats=explode("|", $old_stats[0]); if ($stats[2]>=5) { $star = "$path/images/5star.gif" ; } if ($stats[2]<=4.5) { $star = "$path/images/45star.gif" ; } if ($stats[2]<=4) { $star = "$path/images/4star.gif" ; } if ($stats[2]<=3.5) { $star = "$path/images/35star.gif" ; } if ($stats[2]<=3) { $star = "$path/images/3star.gif" ; } if ($stats[2]<=2.5) { $star = "$path/images/25star.gif" ; } if ($stats[2]<=2) { $star = "$path/images/2star.gif" ; } if ($stats[2]<=1.5) { $star = "$path/images/15star.gif" ; } if ($stats[2]<=1) { $star = "$path/images/1star.gif" ; } if ($stats[2]<=0.5) { $star = "$path/images/05star.gif" ; } if ($stats[2]<=0) { $star = "$path/images/00star.gif" ; } print ("<font size=1 face=Verdana color=#FFFFFF>Bewertung: <img src=\"$star\" alt=\"Durchschnittliche Bewertung: $stats[2]\"> $stats[1] Bewertung(en)</font>"); print (" <select name=note>"); for ($i=1; $i<=5; $i++) { print ("<option value=$i>$i"); } print (" </select> <input type=hidden name=envoi value=1><input type=submit value=Rate>"); print ("</form></font>"); ?>
nun ist mein problem das "rating" nicht mehr speichert...
er legt keine .dat datei mehr an (order ist auf 777 gestellt)
menü
Code :1 2 3 4 5 6 7 8
<?php $menu = $_GET['action1']; switch ($menu) { case "bild1": include("vote/bild1.php"); break; default: include("flyer.php"); break; } ?>
--------------------
http://www.blackeg6.de/basti/homepag.../vote/rate.php
wenn ich es ohne laden mache dann geht es auch
und nicht include
hier nochmal eins mit include:
http://www.blackeg6.de/basti/homepag.../vote/test.php
habe eine neuen php datei angelegt dann dort include -> rate.php
und es geht
nur wenn ich es in die page einbaue geht es komischer weise nicht
---------------------
ich denke mal weil es zuviel includet wird.. weil das script nennt immer die .dat datei so wie auch die .php seite heisst und denke mal das es darum nciht geht bzw etwas falsch ist:
darin bestimmtPHP-Code:<?php
<?
$path= "http://www.blackeg6.de/basti/homepage/campus/vote/";
$ficdest=explode(".",basename($PHP_SELF));
$ficdest=$ficdest[0].".dat";
?>
$ficdest=$action1... oder sowas hab nur zuwenig plan davon
darum frag ich ja hier
hoffe es kann wer helfen :/
Danke
Ähnliche Themen
-
SERVER-Variable wird nicht gespeichert
Von lisali im Forum PHPAntworten: 12Letzter Beitrag: 05.07.09, 10:36 -
Wieso wird das nicht gespeichert?
Von WACSF im Forum Javascript & AjaxAntworten: 5Letzter Beitrag: 28.04.07, 00:01 -
Szene wird nicht (vollständig) gespeichert
Von Xo-mate im Forum Cinema 4DAntworten: 1Letzter Beitrag: 03.01.07, 14:42 -
Session wird nicht gespeichert
Von h-brock im Forum PHPAntworten: 1Letzter Beitrag: 09.02.04, 22:09 -
[suche]Vote (WIRKLICH nur 1mal voten!!)
Von sorashi im Forum PHPAntworten: 8Letzter Beitrag: 05.06.03, 23:04





Zitieren
Login






[PHP][Snippet] Array zu XML konvertieren