<?php
include("../members/Config.php");
$baseurl = 'http://www.organner.pl/nt';
function cleanup_vars( $array )
{
{
}
foreach( $array as $key => $value )
{
$tmp[ $key ] = cleanup_vars( $value );
}
return $tmp;
}
function online_users()
{
$ONLINE_LOG_FILE = 'online.dat';
$myip = $_SERVER['REMOTE_ADDR'];
$timeout = 300;
$file = file($ONLINE_LOG_FILE);
$add = true;
$online = 0;
$fopen = fopen($ONLINE_LOG_FILE, "w");
for($i=0; $i<$count; $i++)
{
if($data[0]==$myip)
{
$add = false;
$online++;
}
else
{
if($data[1]>=(time() - $timeout))
{
fputs($fopen, $data[0].'|'.$data[1]."\n");
$online++;
}
}
}
if($add)
{
$online++;
}
return $online;
}
function GET_USER_NAME( $UserID )
{
$Return = "";
$Query = mysql_query("SELECT * FROM phpbb_users WHERE user_id = '$UserID'");
{
$Return = $Row['username'];
}
return $Return;
}
function GET_POST_TEXT( $PostID )
{
$Return = "";
$Query = mysql_query("SELECT * FROM phpbb_posts_text WHERE post_id = '$PostID'");
{
$Return = $Row['post_text'];
}
return $Return;
}
$Connection = mysql_connect("localhost", $PHPBB_MYSQL_USER, $PHPBB_MYSQL_PASSWORD);
if( !$Connection )
{
die("Failed to connect with MYSQL!");
}
$ONLINE = online_users();
$VIP_MEMBERS = 0;
$TOTAL_MEMBERS = 0;
$QueryResult = mysql_query("SELECT * FROM phpbb_users");
{
$TOTAL_MEMBERS++;
if($Row['user_rank'] == 3 || $Row['user_rank'] == 6)
{
$VIP_MEMBERS++;
}
}
$PageAction = $_GET['Action'];
$PageOrder = $_GET['Order'];
$PageProducts = $_GET['Products'];
if( !$PageAction && !$PageOrder && !$PageProducts )
{
$PageStats = '
<font face="Tahoma" size="2">
<div align="center">
<b>On-Line:</b> ['.$ONLINE.']
<br>
<b>Total Members:</b> ['.$TOTAL_MEMBERS.']
<br>
</div>
</font>
';
$ForumID = 6;
$Counter = 0;
$Query = mysql_query("SELECT * FROM phpbb_topics WHERE forum_id = '$ForumID' ORDER BY topic_time DESC");
{
if($Counter == $MAIN_PAGE_DISPLAY_NEWS_AMMOUNT)
{
$PageNews .= '<br>';
break;
}
else
{
$Counter++;
}
$TopicViews = $Row['topic_views'];
$TopicID = $Row['topic_id'];
$TopicPostID = $Row['topic_first_post_id'];
$PosterID = $Row['topic_poster'];
$TopicTitle = $Row['topic_title'];
$TopicTime = $Row['topic_time'];
$PosterNick = GET_USER_NAME($PosterID);
$TopicText = GET_POST_TEXT($TopicPostID);
$TopicText = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $TopicText);
$TopicText = str_replace("[/b]","</strong>",$TopicText);
$TopicText = preg_replace('/\[quote=(.*)\](.*)\[\/quote\]/Usi','<div style=\"padding: 7px\">$2</div>',$TopicText);
$TopicText = str_replace("[quote]","<strong>Quote</strong><em>",$TopicText);
$TopicText = str_replace("[/quote]","</em>",$TopicText);
$TopicText = str_replace("[code]","<strong>Code</strong><em>",$TopicText);
$TopicText = str_replace("[/code]","</em>",$TopicText);
$TopicText = preg_replace('/\[list\](.*)\[\/list\]/si',"<div style=\"padding: 7px\">$1</div>",$TopicText);
$TopicText = preg_replace('/\[list=(.*)\](.*)\[\/list\]/si',"<div style=\"padding: 7px\">$1</div>",$TopicText);
$TopicText = str_replace("[img]","<img src=\"",$TopicText);
$TopicText = str_replace("[/img]","\" alt=\"image\" />",$TopicText);
$TopicText = preg_replace('/\[url\](.*)\[\/url\]/Usi','<a href="$1">$1</a>',$TopicText);
$TopicText = preg_replace('/\[url=(.*)\](.*)\[\/url\]/Usi','<a href="$1">$2</a>',$TopicText);
$TopicText = preg_replace('/\[color=(.*)\](.*)\[\/color\]/Usi','<span style="{color:$1}">$2</span>',$TopicText);
$TopicText = preg_replace('/\[size=(.*)\](.*)\[\/size\]/Usi','<span style="{font-size:$1pt}">$2</span>',$TopicText);
$NewsDate = date("Y.m.d", $TopicTime);
$PageNews .= '
<div id="news">
<div id="lcorner"></div>
<div id="news_topic">
<div class="topic"><a HREF="http://forum.organner.pl/postlink/'.$TopicPostID.'.htm#'.$TopicPostID.'">'.$TopicTitle.'</a></div>
<div class="date">by: <a HREF="http://forum.organner.pl/profiles/'.$PosterID.'.htm">'.$PosterNick.'</a> on '.$NewsDate.' | Views: '.$TopicViews.'</div>
</div>
<div id="rcorner"></div>
<div id="news_content">
<div class="content">'.$TopicText.'</div>
</div>
</div>
';
}
$Site = include("templates/header.html");
include("templates/index.html");
include("templates/footer.html");
}
else
{
if($PageAction == 1)
{
$Site = include("templates/header.html");
include("templates/products.html");
include("templates/footer.html");
}
else if($PageAction == 2)
{
$Site = include("templates/header.html");
include("templates/contact.html");
include("templates/footer.html");
}
//
// Products List
//
if($PageProducts == 1)
{
$Site = include("templates/header.html");
include("templates/immunity-full-hl2.html");
include("templates/footer.html");
}
elseif($PageProducts == 2)
{
$Site = include("templates/header.html");
include("templates/immunity-light-hl2.html");
include("templates/footer.html");
}
elseif($PageProducts == 3)
{
$Site = include("templates/header.html");
include("templates/immunity-full-hl1.html");
include("templates/footer.html");
}
elseif($PageProducts == 4)
{
$Site = include("templates/header.html");
include("templates/immunity-light-hl1.html");
include("templates/footer.html");
}
elseif($PageProducts == 5)
{
$Site = include("templates/header.html");
include("templates/orgia-online.html");
include("templates/footer.html");
}
elseif($PageProducts == 6)
{
$Site = include("templates/header.html");
include("templates/orgia-lan.html");
include("templates/footer.html");
}
elseif($PageProducts == 7)
{
$Site = include("templates/header.html");
include("templates/immunity-sXe-hl1.html");
include("templates/footer.html");
}
if( $PageOrder )
{
if( $PageOrder >= 1 && $PageOrder <= 7 )
{
$PageText .= '
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="'.$DEFINED_PAYPAL_ACCOUNT.'">
<p align="center">
';
if($PageOrder == 1)
{
$PageText .= '
<b>[HL1] Immunity Light:</b>
<br>
<br>
<input type="hidden" name="item_name" value="Immunity Light [HL1]">
<select size="1" name="amount">
<option value="'.$IMMUNITY1_PRICE_1.'">1 MONTH ['.$IMMUNITY1_PRICE_1.' EUR]</option>
<option value="'.$IMMUNITY1_PRICE_3.'">3 MONTHS ['.$IMMUNITY1_PRICE_3.' EUR]</option>
<option value="'.$IMMUNITY1_PRICE_6.'">6 MONTHS ['.$IMMUNITY1_PRICE_6.' EUR]</option>
<option value="'.$IMMUNITY1_PRICE_12.'">12 MONTHS ['.$IMMUNITY1_PRICE_12.' EUR]</option>
</select>
';
}
else if($PageOrder == 2)
{
$PageText .= '
<b>[HL1] Immunity Full:</b>
<br>
<br>
<input type="hidden" name="item_name" value="Immunity Full [HL1]">
<select size="1" name="amount">
<option value="'.$IMMUNITY2_PRICE_1.'">1 MONTH ['.$IMMUNITY2_PRICE_1.' EUR]</option>
<option value="'.$IMMUNITY2_PRICE_3.'">3 MONTHS ['.$IMMUNITY2_PRICE_3.' EUR]</option>
<option value="'.$IMMUNITY2_PRICE_6.'">6 MONTHS ['.$IMMUNITY2_PRICE_6.' EUR]</option>
<option value="'.$IMMUNITY2_PRICE_12.'">12 MONTHS ['.$IMMUNITY2_PRICE_12.' EUR]</option>
</select>
';
}
else if($PageOrder == 3)
{
$PageText .= '
<b>[HL1] Orgia REBORN INTERNET:</b>
<br>
<br>
<input type="hidden" name="item_name" value="Orgia REBORN INTERNET [HL1]">
<select size="1" name="amount">
<option value="'.$REBORN1_PRICE_1.'">1 MONTH ['.$REBORN1_PRICE_1.' EUR]</option>
<option value="'.$REBORN1_PRICE_3.'">3 MONTHS ['.$REBORN1_PRICE_3.' EUR]</option>
<option value="'.$REBORN1_PRICE_6.'">6 MONTHS ['.$REBORN1_PRICE_6.' EUR]</option>
<option value="'.$REBORN1_PRICE_12.'">12 MONTHS ['.$REBORN1_PRICE_12.' EUR]</option>
</select>
';
}
else if($PageOrder == 4)
{
$PageText .= '
<b>[HL1] Orgia REBORN LAN:</b>
<br>
<br>
<input type="hidden" name="item_name" value="Orgia REBORN LAN [HL1]">
<select size="1" name="amount">
<option value="'.$REBORN2_PRICE_12.'">12 MONTHS ['.$REBORN2_PRICE_12.' EUR]</option>
</select>
';
}
else if($PageOrder == 5)
{
$PageText .= '
<b>[HL2] Immunity Light:</b>
<br>
<br>
<input type="hidden" name="item_name" value="Immunity Light [HL2]">
<select size="1" name="amount">
<option value="'.$IMMUNITY3_PRICE_1.'">1 MONTH ['.$IMMUNITY3_PRICE_1.' EUR]</option>
<option value="'.$IMMUNITY3_PRICE_3.'">3 MONTHS ['.$IMMUNITY3_PRICE_3.' EUR]</option>
<option value="'.$IMMUNITY3_PRICE_6.'">6 MONTHS ['.$IMMUNITY3_PRICE_6.' EUR]</option>
<option value="'.$IMMUNITY3_PRICE_12.'">12 MONTHS ['.$IMMUNITY3_PRICE_12.' EUR]</option>
</select>
';
}
else if($PageOrder == 6)
{
$PageText .= '
<b>[HL2] Immunity Full:</b>
<br>
<br>
<input type="hidden" name="item_name" value="Immunity Full [HL2]">
<select size="1" name="amount">
<option value="'.$IMMUNITY4_PRICE_1.'">1 MONTH ['.$IMMUNITY4_PRICE_1.' EUR]</option>
<option value="'.$IMMUNITY4_PRICE_3.'">3 MONTHS ['.$IMMUNITY4_PRICE_3.' EUR]</option>
<option value="'.$IMMUNITY4_PRICE_6.'">6 MONTHS ['.$IMMUNITY4_PRICE_6.' EUR]</option>
<option value="'.$IMMUNITY4_PRICE_12.'">12 MONTHS ['.$IMMUNITY4_PRICE_12.' EUR]</option>
</select>
';
}
else if($PageOrder == 7)
{
$PageText .= '
<b>Immunity sXe/VAC2 [HL1]:</b>
<br>
<br>
<input type="hidden" name="item_name" value="Immunity sXe [HL1]">
<select size="1" name="amount">
<option value="'.$IMMUNITY5_PRICE_1.'">1 MONTH ['.$IMMUNITY5_PRICE_1.' EUR]</option>
<option value="'.$IMMUNITY5_PRICE_3.'">3 MONTHS ['.$IMMUNITY5_PRICE_3.' EUR]</option>
<option value="'.$IMMUNITY5_PRICE_6.'">6 MONTHS ['.$IMMUNITY5_PRICE_6.' EUR]</option>
<option value="'.$IMMUNITY5_PRICE_12.'">12 MONTHS ['.$IMMUNITY5_PRICE_12.' EUR]</option>
</select>
';
}
$PageText .= '
<br>
<br>
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://members.organner.pl/payment.php">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="lc" value="ENG">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="image" src="PP_BUTTON.gif" border="0" name="submit" alt="Pay by PayPal" width="62" height="31">
</p>
</form>
';
}
else
{
$PageText .= '<p align="center"><b>We are sorry, but this product is not supported yet by our payment system!</b></p>';
}
}
}
//echo($Site);
?>