innerhalb eines "for" einen weiteren (bei 12 stopp

Alles, was PHP betrifft, kann hier besprochen werden.

innerhalb eines "for" einen weiteren (bei 12 stopp

Postby red171 » 12. February 2005 20:54

ich ma wieder :D

ig wes.. so langsam nerv ich :D

aber kann damit um ;)

Code: Select all
if($_GET['show'] == "month") {

for ($i = 0; $i < 365; $i++ ) {
$a = 10;
$unix=($unixstart+($i*$daysec));
$datum = date("Y-m-d",$unix);
$result = mysql_query("SELECT * FROM niv_counter_stat WHERE date = '".$datum."'") or sql_error(__FILE__." / ".__LINE__);
$ges = mysql_num_rows($result);


while ($daten = mysql_fetch_array($result)) {
$count=$daten['count'];
$datum1=$daten['date'];
}

$datearray=explode($trennzeichen,$datum);
if ($ges=="0") {$count="0";}
if ($datearray[1]==$view) {
if($datum==$heute) {
$a1 .= "<tr>\n<td style=\"padding:2px;\"><b>-- Heute --</b></td>\n";
} else {
$a1 .= "<tr>\n<td style=\"padding:2px;\">".date("d.m.Y",$unix)."</td>\n";
}

if ($ges!="0") {
$weite = round(($count/$max1)*600,0)."%";

$a1 .= "<td valign=\"middle\" style=\"padding:2px;\">&nbsp;<img src=\"./img/counted/vote_left".$a.".gif\" width=\"5\" height=\"9\" border=\"0\" alt=\"".$count."\" /><img src=\"./img/counted/vote_middle".$a.".gif\" width=".$weite." height=\"9\" border=\"0\" alt=\"".$count."\" /><img src=\"./img/counted/vote_right".$a.".gif\" width=\"6\" height=\"9\" border=\"0\" alt=\"".$count."\" /> $count</td>\n</tr>";
} else {
$a1 .= "<td valign=\"middle\" style=\"padding:2px;\">&nbsp; 0</td>\n</tr>\n";
}
$summe=$summe+$count;

}
}
eval ("\$stats_content = \"".parse_template("stats_month")."\";");
}


jau wie nich zu übersehn is parst der hier pro "tag" innerhalb eines monats ein stats balken,
ich habe aber nur 12 verschiedene (wegen den 12 monaten ;) )

nun möchte ich das innerhalb der monatsstats die balken auch ne andre farbe ham, soweit auch net das problem

nur dann müst ih 30 ham.

ich hab das schon mit nem for inner halb dieses einen probiert.. aber da km nur müll bei raus
will hat nix wieter das der die variable $a die ich da ma rein gehauen hat von 0-12 zählt und dann wieder von vorne anfängt wenn er die 31tage parst..

oh mann ^^
ob das grad einer verstandn hat?

thx for help
red171
 

Postby red171 » 13. February 2005 18:15

hmpf

keina idee??

also doch noch mehr images für jeden tach n neues?
red171
 


Return to PHP

Who is online

Users browsing this forum: No registered users and 14 guests