getWhere("settings", array("name", "=", "donate")); if($donate_enabled[0]->value === "false"){ Redirect::to("/"); die(); } $donate_enabled = null; /* * Log the user in */ if(!$user->isLoggedIn()){ if(Input::exists()) { if(Token::check(Input::get('token'))) { $validate = new Validate(); $validation = $validate->check($_POST, array( 'username' => array('required' => true, 'isbanned' => true, 'isactive' => true), 'password' => array('required' => true) )); if($validation->passed()) { $user = new User(); $remember = (Input::get('remember') === 'on') ? true : false; $login = $user->login(Input::get('username'), Input::get('password'), $remember); if($login) { Session::flash('donate', '
You have been successfully logged in
'); Redirect::to("/donate"); die(); } else { echo '

Sorry, there was an unknown error whilst logging you in. Homepage

'; die(); } } } } } // Get currency $currency = $queries->getWhere("settings", array("name", "=", "donation_currency")); $currency = $currency[0]->value; ?> <?php echo $sitename; ?> • Donate
isLoggedIn()){ ?>
passed()) { echo '
'; foreach($validation->errors() as $error) { if (strpos($error,'is required') !== false) { if (strpos($error,'username') !== false) { echo 'You must input a username.
'; } else if (strpos($error,'password') !== false) { echo 'You must input a password.
'; } } if (strpos($error,'active') !== false){ echo 'Your account is currently inactive. Did you request a password reset?'; } } echo '
'; } } ?>

Sign In



Latest Donors

orderAll("buycraft_data", "time", "DESC"); /* * TODO: Get currency from database */ if(count($latest) < 5){ $limit = count($latest); } else { $limit = 5; } for ($x=1; $x<=$limit; $x++){ echo '

' . htmlspecialchars($latest[$x-1]->ign) . ' - ' . $queries->convertCurrency($currency) . $latest[$x-1]->price . '

'; } ?>
orderAll("donation_packages", "package_order", "ASC"); $config = HTMLPurifier_Config::createDefault(); $config->set('HTML.Doctype', 'XHTML 1.0 Transitional'); $config->set('URI.DisableExternalResources', false); $config->set('URI.DisableResources', false); $config->set('HTML.Allowed', 'u,p,b,i,small,blockquote,span[style],span[class],p,strong,em,li,ul,ol,div[align],br,img'); $config->set('CSS.AllowedProperties', array('float', 'color','background-color', 'background', 'font-size', 'font-family', 'text-decoration', 'font-weight', 'font-style', 'font-size')); $config->set('HTML.AllowedAttributes', 'src, height, width, alt, class, *.style'); $purifier = new HTMLPurifier($config); $n = 0; $finish = count($packages) - 1; foreach($packages as $package){ if($n % 3 != 0){ // Middle or end column } else { if($n !== 0){ ?>
name); ?>convertCurrency($currency); echo htmlspecialchars($package->cost); ?>
purify(htmlspecialchars_decode($package->description)); ?>

getWhere('settings', array('name', '=', 'store_type')); $store_type = $store_type[0]->value; if($store_type == "bc"){ $buycraft_url = $queries->getWhere("settings", array("name", "=", "buycraft_url")); $buycraft_url = $buycraft_url[0]->value; foreach($packages as $package){ ?>