Op zondag 10 maart 2002 20:26 schreef zellufs het volgende:
Maar je include hem toch in een phpfile!?
als ik dan $username in d.html heb staan dan laat hij $username zien als ik hem include.
in een html file staat dit(header.html)
code:
1
2
3
| <td width="15%" nowrap>
<font color="#FFFFFF"><b>$theuser</b></font>
</td> |
en de php file die het opent staat dit
PHP:
1
| <?function themeheader() { global $user, $banners, $sitename, $slogan, $cookie, $prefix, $dbi; cookiedecode($user); $username = $cookie[1]; if ($username == "") { $username = "Anonymous"; } echo "<body bgcolor=\"#505050\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">"; if ($banners == 1) { include("banners.php"); } $topics_list = "<select name=\"new_topic\" onChange='submit()'>\n"; $topics_list .= "<option value=\"\">All Topics</option>\n"; $toplist = sql_query("select topicid, topictext from ".$prefix."_topics order by topictext", $dbi); while(list($topicid, $topics) = sql_fetch_row($toplist, $dbi)) { if ($topicid==$topic) { $sel = "selected "; } $topics_list .= "<option $sel value=\"$topicid\">$topics</option>\n"; $sel = ""; } if ($username == "Anonymous") { $theuser = "&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account&op=new_user\">Create an account"; } else { $theuser = "&nbsp;&nbsp;Welkom $username!"; } $tmpl_file = "themes/NukeNews/header.html"; $thefile = implode("", file($tmpl_file)); $thefile = addslashes($thefile); $thefile = "\$r_file=\"".$thefile."\";"; eval($thefile); print $r_file; blocks(left); $tmpl_file = "themes/NukeNews/left_center.html"; $thefile = implode("", file($tmpl_file)); $thefile = addslashes($thefile); $thefile = "\$r_file=\"".$thefile."\";"; eval($thefile); print $r_file;}?> |
op een of een andere manier kan het dus toch.
nou wil ik in die header.html een $weetikveel toevoegen.
die moet hij dan replacen met text.
$theuser is hier je gebruikernaam, die laat hij zien Welkom KingOfDos(of net wie je bent).