Code:<?php
/************************************************************/
/* Theme Name: Preflight */
/* Version 1.0 */
/************************************************************/
/************************************************************/
/* Theme Colors Definition */
/* */
/* Define colors for your web site. $bgcolor2 is generaly */
/* used for the tables border as you can see on OpenTable() */
/* function, $bgcolor1 is for the table background and the */
/* other two bgcolor variables follows the same criteria. */
/* $texcolor1 and 2 are for tables internal texts */
/************************************************************/
$bgcolor1 = "#F1F1EC";
$bgcolor2 = "#D1D1D1";
$bgcolor3 = "#E6D9BA";
$bgcolor4 = "#E6D9BA";
$textcolor1 = "#FFFFFF";
$textcolor2 = "#000000";
include("themes/Preflight/tables.php");
/************************************************************/
/* Function themeheader() */
/* */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks */
/* function for left side with: blocks(left); */
/************************************************************/
function themeheader() {
global $index, $user, $userinfo, $cookie, $prefix, $user_prefix, $db, $name ,$total_time, $start_time, $dbi, $sitekey;
getusrinfo($user);
cookiedecode($user);
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
$username = $cookie[1];
if ($username == "") {
$username = "Anonymous";
}
echo "<body style=\"body; margin-left: 10em top: 10em;\" text=\"#000000\">";
if ($banners == 0) {
include("banners.php");
}
/* Start Log-in block top left */
$uresult = $db->sql_query("select user_id from ".$user_prefix."_users where username='$username'");
list($uid) = $db->sql_fetchrow($uresult);
$presult = $db->sql_query("SELECT privmsgs_to_userid FROM ".$prefix."_bbprivmsgs WHERE privmsgs_to_userid='$uid' AND (privmsgs_type='5' OR privmsgs_type='1')");
$pnumrow = $db->sql_numrows($presult);
$priv_msgs = "<a href=\"messages.html\"><font color=\"red\"><b>$pnumrow</b></font> äåãòåú çãùåú</a>";
if ($username == "Anonymous") {
$theuser = "<form action=\"account.html\" method=\"post\"><b>ùí îùúîù:</b><br><input class=\"headerinputtext\" type=\"text\" name=\"username\" value=\"ùí îùúîù\" onFocus=\"if(this.value=='ùí îùúîù')this.value='';\" style=\"width:100;height:16;border:1px solid blue;\"><br><b>ñéñîà:</b><br><input class=\"headerinputtext\" type=\"password\" name=\"user_password\" value=\"password\" onFocus=\"if(this.value=='password')this.value='';\" value style=\"width:100;height:16;border:1px solid blue;\"><input type=\"hidden\" name=\"random_num\" value=\"$random_num\"><input type=\"hidden\" class=headertextinput name=\"gfx_check\" value=\"$code\"><input type=\"hidden\" name=\"op\" value=\"login\"><br><input type=\"image\" value=\"login\" src=\"themes/Preflight/images/login.gif\" class=\"inputimage\"> <a href=\"account-new_user.html\"><img src=\"themes/Preflight/images/register.gif\" border=\"0\" alt=\"äéøùí\"></a></form>";
} else {
$theuser = "<center><font color=\"blue\"><b>áøåê äáà!</b></font><br><b>$username</b></center><hr>$priv_msgs<br><a href=\"forum-editprofile.html\">ùéðåé äâãøåú ôøåôéì</a><br><a href=\"account-logout.html\">äúðú÷</a>\n";
}
/* End Log-in block top left */
/* Start Menu Who is online */
cookiedecode($user);
if (isset($_SERVER['REMOTE_ADDR'])) { $ip = $_SERVER['REMOTE_ADDR']; }
if (is_user($user))
{
$uname = $cookie[1];
$guest = 0;
}
else
{
if (!empty($ip)) {
$uname = $ip;
} else {
$uname = '';
}
$guest = 1;
}
$guest_online_sql = 'SELECT * FROM '.$prefix.'_session WHERE guest=1';
$guest_online_query = $db->sql_query($guest_online_sql);
$guest_online_num = $db->sql_numrows($guest_online_query);
$member_online_sql = 'SELECT * FROM '.$prefix.'_session WHERE guest=0';
$member_online_query = $db->sql_query($member_online_sql);
$member_online_num = $db->sql_numrows($member_online_query);
$who_online_num = $guest_online_num + $member_online_num;
/* End Menu Who is online */
/* Start Home Page & Favorite */
$homepage = "<a href=\"#\" onClick=\"this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.preflight.us');\"><img src=\"themes/Preflight/images/homepage.gif\" border=\"0\" alt=\"ìçõ ëàï òì îðú ìäôåê àú ôøéôìééè ìòîåã äáéú\"></a>";
$favorite = "<a href=\"#\" onclick=\"window.external.addfavorite('http://www.preflight.us/','ôøéôìééè - àúø äñéîåìèåøéí îñôø 1 áéùøàì!');\"><img src=\"themes/Preflight/images/favorite.gif\" border=\"0\" alt=\"ìçõ ëàï ìäåñéó àú ôøéôìééè ìîåòãôéí\"></a>";
/* End Home Page & Favorite */
$public_msg = public_message();
$tmpl_file = "themes/Preflight/header.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\">\n"
."<tr valign=\"top\">\n"
."<td width=\"165\">\n";
if ($name=='Forums' || $name=='My_eGallery' || $name=='Community' || $name=='youtube') {
/* Don't display it. */
}
else {
blocks(left);
}
echo "</td>\n";
if ($index == 1) {
echo "<td valign=\"top\">\n";
blocks(center);
echo "</td>\n";
}
echo "<td width=\"100%\">\n";
}
/************************************************************/
/* 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 $foot1, $foot2, $foot3, $foot4, $copyright, $totaltime, $footer_message;
$tmpl_file = "themes/Preflight/footer.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
echo "<center>\n";
$footer_message = footmsg();
echo "</center>\n";
}
/************************************************************/
/* 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;
if ($notes != "") {
$notes = "<br><br><b>"._NOTE."</b>$notes\n";
} else {
$notes = "";
}
if ("$aid" == "$informant") {
$content = "$thetext$notes\n";
} else {
if($informant != "") {
$content = "<a href=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." \"$thetext\"$notes\n";
}
$posted .= " $time $timezone";
$viewed .="($counter "._READS.")";
$tmpl_file = "themes/Preflight/story_home.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themearticle() */
/* */
/* 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, $tipath;
$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=\"modules.php?name=Your_Account&op=userinfo&username=$informant\">$informant</a> ";
} else {
$content = "$anonymous ";
}
$content .= ""._WRITES." \"$thetext\"$notes\n";
}
$tmpl_file = "themes/Preflight/story_page.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
/************************************************************/
/* Function themesidebox() */
/* */
/* Control look of your blocks. Just simple. */
/************************************************************/
function themesidebox($title, $content) {
$tmpl_file = "themes/Preflight/blocks.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
?>
|