Skip to content

Commit

Permalink
Remove indentation & file ending inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Dec 15, 2018
1 parent 8f95aac commit ee562d1
Show file tree
Hide file tree
Showing 306 changed files with 70,368 additions and 70,113 deletions.
166 changes: 83 additions & 83 deletions aboutpro.php
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
<?php

define('INSIDE', true);

$_EnginePath = './';
include($_EnginePath.'common.php');

loggedCheck();

$Now = time();

includeLang('aboutpro');
$_Lang['skinpath'] = $_SkinPath;

foreach($_Lang['Benefits'] as &$Value)
{
$Value = '&#149; '.$Value;
}
$_Lang['ParsedBenefits'] = implode('<br/>', $_Lang['Benefits']);

foreach($_Vars_ProAccountData as $Data)
{
$_Lang['ProArray'][$Data['shopID']]['time'] = $Data['time'];
if($Data['time'] == 1)
{
$_Lang['ProArray'][$Data['shopID']]['thistime'] = '_day';
}
else
{
$_Lang['ProArray'][$Data['shopID']]['thistime'] = '_days';
}
$_Lang['CostVal'.$Data['shopID']] = $Data['cost'];
$_Lang['ShopItemID'.$Data['shopID']] = $Data['shopID'];
}

if($_User['pro_time'] > $Now)
{
$_Lang['ProState'] = $_Lang['ProTill'];
$_Lang['ProTime'] = prettyDate('d m Y H:i:s', $_User['pro_time'], 1);
$_Lang['ProTimeColor'] = 'lime';
foreach($_Lang['ProArray'] as $ShopID => $Data)
{
$_Lang['BuyButton'.$ShopID] = sprintf($_Lang['RenewPro'], $Data['time'], $_Lang[$Data['thistime']]);
}
}
else if($_User['pro_time'] > 0)
{
$_Lang['ProState'] = $_Lang['ProEnded'];
$_Lang['ProTime'] = prettyDate('d m Y H:i:s', $_User['pro_time'], 1);
$_Lang['ProTimeColor'] = 'orange';
foreach($_Lang['ProArray'] as $ShopID => $Data)
{
$_Lang['BuyButton'.$ShopID] = sprintf($_Lang['BuyAgain'], $Data['time'], $_Lang[$Data['thistime']]);
}
}
else
{
$_Lang['ProState'] = $_Lang['NeverHadPro'];
$_Lang['ProStateColor'] = 'red';
foreach($_Lang['ProArray'] as $ShopID => $Data)
{
$_Lang['BuyButton'.$ShopID] = sprintf($_Lang['FirstBuy'], $Data['time'], $_Lang[$Data['thistime']]);
}
}

$_Lang['DarkEnergy_Counter'] = $_User['darkEnergy'];
if($_User['darkEnergy'] >= 15)
{
$_Lang['DarkEnergy_Color'] = 'lime';
}
else if($_User['darkEnergy'] > 0)
{
$_Lang['DarkEnergy_Color'] = 'orange';
}
else
{
$_Lang['DarkEnergy_Color'] = 'red';
}

$page = parsetemplate(gettemplate('about_pro'), $_Lang);
display($page, $_Lang['aboutpro'], false);
?>
<?php

define('INSIDE', true);

$_EnginePath = './';
include($_EnginePath.'common.php');

loggedCheck();

$Now = time();

includeLang('aboutpro');
$_Lang['skinpath'] = $_SkinPath;

foreach($_Lang['Benefits'] as &$Value)
{
$Value = '&#149; '.$Value;
}
$_Lang['ParsedBenefits'] = implode('<br/>', $_Lang['Benefits']);

foreach($_Vars_ProAccountData as $Data)
{
$_Lang['ProArray'][$Data['shopID']]['time'] = $Data['time'];
if($Data['time'] == 1)
{
$_Lang['ProArray'][$Data['shopID']]['thistime'] = '_day';
}
else
{
$_Lang['ProArray'][$Data['shopID']]['thistime'] = '_days';
}
$_Lang['CostVal'.$Data['shopID']] = $Data['cost'];
$_Lang['ShopItemID'.$Data['shopID']] = $Data['shopID'];
}

if($_User['pro_time'] > $Now)
{
$_Lang['ProState'] = $_Lang['ProTill'];
$_Lang['ProTime'] = prettyDate('d m Y H:i:s', $_User['pro_time'], 1);
$_Lang['ProTimeColor'] = 'lime';
foreach($_Lang['ProArray'] as $ShopID => $Data)
{
$_Lang['BuyButton'.$ShopID] = sprintf($_Lang['RenewPro'], $Data['time'], $_Lang[$Data['thistime']]);
}
}
else if($_User['pro_time'] > 0)
{
$_Lang['ProState'] = $_Lang['ProEnded'];
$_Lang['ProTime'] = prettyDate('d m Y H:i:s', $_User['pro_time'], 1);
$_Lang['ProTimeColor'] = 'orange';
foreach($_Lang['ProArray'] as $ShopID => $Data)
{
$_Lang['BuyButton'.$ShopID] = sprintf($_Lang['BuyAgain'], $Data['time'], $_Lang[$Data['thistime']]);
}
}
else
{
$_Lang['ProState'] = $_Lang['NeverHadPro'];
$_Lang['ProStateColor'] = 'red';
foreach($_Lang['ProArray'] as $ShopID => $Data)
{
$_Lang['BuyButton'.$ShopID] = sprintf($_Lang['FirstBuy'], $Data['time'], $_Lang[$Data['thistime']]);
}
}

$_Lang['DarkEnergy_Counter'] = $_User['darkEnergy'];
if($_User['darkEnergy'] >= 15)
{
$_Lang['DarkEnergy_Color'] = 'lime';
}
else if($_User['darkEnergy'] > 0)
{
$_Lang['DarkEnergy_Color'] = 'orange';
}
else
{
$_Lang['DarkEnergy_Color'] = 'red';
}

$page = parsetemplate(gettemplate('about_pro'), $_Lang);
display($page, $_Lang['aboutpro'], false);

?>
2 changes: 1 addition & 1 deletion action_logs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

header("Location: ../index.php");

?>
?>
106 changes: 53 additions & 53 deletions activate.php
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
<?php

define('INSIDE', true);

$_EnginePath = './';
include($_EnginePath.'common.php');

includeLang('activate');

$Activated = false;

$_GET['code'] = (isset($_GET['code']) ? trim($_GET['code']) : null);
if(!empty($_GET['code']))
{
if(preg_match('/^[0-9a-zA-Z]{32}$/D', $_GET['code']))
{
$Result = doquery("SELECT `id`, `username` FROM {{table}} WHERE `activation_code` = '{$_GET['code']}' LIMIT 1;", 'users');
if(mysql_num_rows($Result) > 0)
{
$Result = mysql_fetch_assoc($Result);
$Username = $Result['username'];
doquery("UPDATE {{table}} SET `activation_code` = '' WHERE `id` = '{$Result['id']}';", 'users');

$Msg = sprintf($_Lang['activation_completed'], $Username, 'overview.php', 3);
$Activated = true;
}
else
{
$Msg = $_Lang['no_code_in_db'];
}
}
else
{
$Msg = $_Lang['invalid_code_format'];
}
}
else
{
$Msg = $_Lang['empty_code'];
}

if($Activated)
{
$Color = 'lime';
}
else
{
$Color = 'red';
}

message("<span style=\"color: {$Color}\">{$Msg}</span><br/><br/>{$_Lang['go_back']}", $_Lang['title']);

?>
<?php

define('INSIDE', true);

$_EnginePath = './';
include($_EnginePath.'common.php');

includeLang('activate');

$Activated = false;

$_GET['code'] = (isset($_GET['code']) ? trim($_GET['code']) : null);
if(!empty($_GET['code']))
{
if(preg_match('/^[0-9a-zA-Z]{32}$/D', $_GET['code']))
{
$Result = doquery("SELECT `id`, `username` FROM {{table}} WHERE `activation_code` = '{$_GET['code']}' LIMIT 1;", 'users');
if(mysql_num_rows($Result) > 0)
{
$Result = mysql_fetch_assoc($Result);
$Username = $Result['username'];
doquery("UPDATE {{table}} SET `activation_code` = '' WHERE `id` = '{$Result['id']}';", 'users');

$Msg = sprintf($_Lang['activation_completed'], $Username, 'overview.php', 3);
$Activated = true;
}
else
{
$Msg = $_Lang['no_code_in_db'];
}
}
else
{
$Msg = $_Lang['invalid_code_format'];
}
}
else
{
$Msg = $_Lang['empty_code'];
}

if($Activated)
{
$Color = 'lime';
}
else
{
$Color = 'red';
}

message("<span style=\"color: {$Color}\">{$Msg}</span><br/><br/>{$_Lang['go_back']}", $_Lang['title']);

?>
Loading

0 comments on commit ee562d1

Please sign in to comment.