كود PHP:
function themeheader() {
global $user, $banners, $sitename, $slogan, $cookye, $prefix, $dbi;
cookyedecode($user);
$username = $cookye[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body bgcolor=\"#550847\" text=\"#000000\" link=\"#004080\" vlink=\"#004080\" alink=\"#004080\">"
."<!-- PurpleOdyssey Theme Mod By, MaxG at [url]http://www.globlenet.com/[/url] [email]support@globlenet.com[/email] -->\n\n\n\n";
if ($banners) {
include("banners.php");
}
$topics_list = "<select name=\"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 = " <a href=\"user.php\">Create an account";
} else {
$theuser = " Welcome $username!";
}
$tmpl_file = "themes/PurpleOdyssey/header.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
blocks(left);
$tmpl_file = "themes/PurpleOdyssey/left_center.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themefooter() */
/* */
/* Control the footer for your site. You don't need to */
/* close BODY and HTML tags at the end. In some part call */
/* the function for right blocks with: blocks(right); */
/* Also, $index variable need to be global and is used to */
/* determine if the page your're viewing is the Homepage or */
/* and internal one. */
/************************************************************/
function themefooter() {
global $index, $foot1, $foot2, $foot3, $foot4;
if ($index == 1) {
$tmpl_file = "themes/PurpleOdyssey/center_right.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
blocks(right);
}
$footer_message = "$foot1<br>$foot2<br>$foot3<br>$banners";
$tmpl_file = "themes/PurpleOdyssey/footer.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the Homepage */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
global $anonymous, $tipath, $cookye, $loonr, $vasak, $parem, $kokku, $storyhome, $storynum;
$loonr = ($loonr+1);
if (isset($cookye[3])) {
$storynum = $cookye[3];
} else {
$storynum = $storyhome;
}
$ridaaa1 = round($loonr/2);
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if($informant != "") {
$content = "<a href=\"user.php?op=userinfo&uname=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$posted = ""._POSTEDBY." ";
$posted .= get_author($aid);
$posted .= " "._ON." $time $timezone ($counter "._READS.")";
if (($ridaaa1*2) != $loonr) {
$tmpl_file = "themes/PurpleOdyssey/story_home.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
$vasak .= "$r_file";
} else {
$tmpl_file = "themes/PurpleOdyssey/story_home.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
$parem .= "$r_file";
}
if ($loonr == $storynum OR $loonr == $kokku) {
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
echo "<tr>";
echo "<td width=\"49%\" valign=\"top\">";
print $vasak;
echo "</td>";
echo "<td width=\"5\" cellpadding=\"0\" cellspacing=\"0\" valign=\"top\"></td>";
echo "<td width=\"49%\" valign=\"top\">";
print $parem;
echo "</td>";
echo "</tr>";
echo "</table>";
}
}
/************************************************************/
/* Function themeindex() */
/* */
/* This function format the stories on the story page, when */
/* you click on that "Read More..." link in the home */
/************************************************************/
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
global $admin, $sid;
$posted = ""._POSTEDON." $datetime "._BY." ";
$posted .= get_author($aid);
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b> <i>$notes</i>\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if($informant != "") {
$content = "<a href=\"user.php?op=userinfo&uname=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." <i>\"$thetext\"</i>$notes\n";
}
$tmpl_file = "themes/PurpleOdyssey/story_page.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}