anpera.net
https://anpera.dyndns.org/phpbb3/

Common.php Frage
https://anpera.dyndns.org/phpbb3/viewtopic.php?f=34&t=1482
Seite 1 von 1

Autor:  Ventus [ Mo 27 Jun, 2005 18:56 ]
Betreff des Beitrags:  Common.php Frage

[php]if($session['user']['dragonanaus']==0){
.templatereplace("statrow",array("title"=>"Inventar","value"=>$bag))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag2))
}else{
.templatereplace("statrow",array("title"=>"Inventar","value"=>$bag3))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag3))
}


[/php]

Kann mir mal jemand verraten warum das so net funzt?
Ich find den Fehler net Ôo

Nichma das
[php]
if($session['user']['dragonanaus']==0){
.templatereplace("statrow",array("title"=>"Inventar","value"=>$bag))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag2))
}
[/php]

alleine schenint zu funzen. Hab ich was verpasst?

Autor:  Meteora [ Mo 27 Jun, 2005 19:24 ]
Betreff des Beitrags: 

[php]
$charstat=appoencode(templatereplace("statstart")
.templatereplace("stathead",array("title"=>"Statistik:"))
.templatereplace("statrow",array("title"=>"Name","value"=>appoencode($u[name],false)))
,true);
if($session['user']['dragonanaus']==0){



$charstat.=appoencode(
templatereplace("statrow",array("title"=>"Inventar","value"=>$bag))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag2))
}else{
$charstat.=appoencode(
templatereplace("statrow",array("title"=>"Inventar","value"=>$bag3))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag3))
}
$charstat.=appoencode(
[...]
[...]
[/php]

Autor:  Ventus [ Mo 27 Jun, 2005 19:29 ]
Betreff des Beitrags: 

Thx großer Meister, aber funtz net:

Parse error: parse error, unexpected T_VARIABLE in /home/www/web9/html/lotgd/common.php on line 693

Fatal error: Call to undefined function: page_header() in /home/www/web9/html/lotgd/index.php on line 10

EDIT:

Und nein ich hab das nach der } nicht mit rein genommen ^^

Autor:  Meteora [ Mo 27 Jun, 2005 19:32 ]
Betreff des Beitrags: 

source?

bitte zeilen 685 - 700 zitieren

Autor:  Ventus [ Mo 27 Jun, 2005 19:33 ]
Betreff des Beitrags: 

Source ist in http://www.elfen-portal.de/source.php

Zeilen zitieren ist schwer, hab nur Wordpad ^^

Autor:  anpera [ Mo 27 Jun, 2005 19:54 ]
Betreff des Beitrags: 

[php]$charstat=appoencode(templatereplace("statstart")
.templatereplace("stathead",array("title"=>"Statistik:"))
.templatereplace("statrow",array("title"=>"Name","value"=>appoencode($u[name],false)))
,true);

if($session['user']['dragonanaus']==0){
$charstat.=appoencode(templatereplace("statrow",array("title"=>"Inventar","value"=>$bag))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag2))
,true);
}else{
$charstat.=appoencode(templatereplace("statrow",array("title"=>"Inventar","value"=>$bag3))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag3))
,true);
}
$charstat.=appoencode(
[...]
[...]
[/php]
?

Autor:  Ventus [ Mo 27 Jun, 2005 20:00 ]
Betreff des Beitrags: 

leider nein!

Parse error: parse error, unexpected T_IF in /home/www/web9/html/lotgd/common.php on line 692

Fatal error: Call to undefined function: page_header() in /home/www/web9/html/lotgd/index.php on line 10

ich zitier mal den betroffenen abschnitt wo ich das einbauen will:

[php]
$charstat=appoencode(templatereplace("statstart")
.templatereplace("stathead",array("title"=>"Vital Info"))

.templatereplace("statrow",array("title"=>"Name","value"=>appoencode($u[name],false)))

.templatereplace("statrow",array("title"=>"Inventar","value"=>$bag))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag2))
[/php]

bei Inventar und Notausgang will ich dann eben das wenn dragonanaus = 1 ist, die Value auf bag3 geändert wird, welche lautet:

$bag3.="`$Deaktiviert";

Autor:  Meteora [ Mo 27 Jun, 2005 20:34 ]
Betreff des Beitrags: 

ganze charstats, angepasst:[php]
$charstat=appoencode(templatereplace("statstart")
.templatereplace("stathead",array("title"=>"Vital Info"))

.templatereplace("statrow",array("title"=>"Avatar","value"=>($u['avatar']?"<img src=\"{$u['avatar']}\" alt=\"Avatar\" border=\"0\">":"(kein Bild)")))
.templatereplace("statrow",array("title"=>"Name","value"=>appoencode($u[name],false)))
,true);

if($session['user']['dragonanaus']==0){
$charstat.=appoencode(
templatereplace("statrow",array("title"=>"Inventar","value"=>$bag))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag2))
,true);
}else{
$charstat.=appoencode(
templatereplace("statrow",array("title"=>"Inventar","value"=>$bag3))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag3))
,true);
}



$charstat.=appoencode(
templatereplace("statrow",array("title"=>"Kampfart","value"=>"`b".$kampfkunst[(string)$u['kunst']]."`b"))
.templatereplace("statrow",array("title"=>"Gottheit","value"=>"`b".$gott[(string)$u['gott']]."`b"))

.templatereplace("statrow",array("title"=>"Inventar","value"=>$bag))
.templatereplace("statrow",array("title"=>"Notausgang","value"=>$bag2))
.templatereplace("statrow",array("title"=>"Gilde","value"=>$u['gilde']))
,true);
if ($session['user']['alive']){

$charstat.=appoencode(
templatereplace("statrow",array("title"=>"Lebenspunkte","value"=>"$u[hitpoints]`0/$u[maxhitpoints]".grafbar($u[maxhitpoints],$u[hitpoints])))
.templatereplace("statrow",array("title"=>"Runden","value"=>$u['turns']))
,true);
}else{
$charstat.=appoencode(
templatereplace("statrow",array("title"=>"Seelenpunkte","value"=>"$u[soulpoints]".grafbar((5*$u[level]+50),$u[soulpoints])))
.templatereplace("statrow",array("title"=>"Foltern","value"=>$u['gravefights']))
,true);
}
$charstat.=appoencode(
templatereplace("statrow",array("title"=>"Stimmung","value"=>"`b".$spirits[(string)$u['spirits']]."`b"))
.templatereplace("statrow",array("title"=>"Level","value"=>"`b".$u['level']."`b"))
.($session['user']['alive']?
templatereplace("statrow",array("title"=>"Angriff","value"=>$atk))
.templatereplace("statrow",array("title"=>"Verteidigung","value"=>$def))
:
templatereplace("statrow",array("title"=>"Psyche","value"=>10 + round(($u['level']-1)*1.5)))
.templatereplace("statrow",array("title"=>"Geist","value"=>10 + round(($u['level']-1)*1.5)))
)
.templatereplace("statrow",array("title"=>"Edelsteine","value"=>$u['gems']))
.templatereplace("stathead",array("title"=>"Weitere Infos"))
.templatereplace("statrow",array("title"=>"Gold","value"=>$u['gold']))
.templatereplace("statrow",array("title"=>"Erfahrung","value"=>expbar()))
.templatereplace("statrow",array("title"=>"Waffe","value"=>$u['weapon']))
.templatereplace("statrow",array("title"=>"Rüstung","value"=>$u['armor']))
,true);
if (getsetting("dispnextday",0)){
$time = gametime();
$tomorrow = strtotime(date("Y-m-d H:i:s",$time)." + 1 day");
$tomorrow = strtotime(date("Y-m-d 00:00:00",$tomorrow));
$secstotomorrow = $tomorrow-$time;
$realsecstotomorrow = round($secstotomorrow / (int)getsetting("daysperday",4));
$charstat.=appoencode(templatereplace("statrow",array("title"=>"Nächster Tag","value"=>date("G\\h, i\\m, s\\s \\",strtotime("1980-01-01 00:00:00 + $realsecstotomorrow seconds")))),true);
}
if (!is_array($session[bufflist])) $session[bufflist]=array();
$charstat.=appoencode(templatereplace("statbuff",array("title"=>"Aktionen","value"=>$buffs)),true);
$charstat.=appoencode(templatereplace("statend"),true);
return $charstat;
[/php]

Autor:  Ventus [ Mo 27 Jun, 2005 20:56 ]
Betreff des Beitrags: 

Danke du bist der beste, ich könnt dich küssen :>

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/