mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-13 17:24:54 +02:00
* remove whitespaces
This commit is contained in:
@@ -32,7 +32,7 @@ if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $
|
||||
|
||||
$player = new OTS_Player();
|
||||
$player->load($_GET['player_id']);
|
||||
|
||||
|
||||
$author = '';
|
||||
if($player->isLoaded()) {
|
||||
$author = $player->getName();
|
||||
@@ -42,7 +42,7 @@ if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $
|
||||
if(!isset($_GET['article_text'], $_GET['article_image'])) {
|
||||
error_('Error: please fill all inputs.');
|
||||
}
|
||||
|
||||
|
||||
$featured_article = '';
|
||||
if($twig->getLoader()->exists('news.featured_article.html.twig')) {
|
||||
$featured_article = $twig->render('news.featured_article.html.twig', array(
|
||||
@@ -69,13 +69,13 @@ if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $
|
||||
$ticker['icon'] = $categories[$ticker['category']]['icon_id'];
|
||||
$ticker['body_short'] = short_text(strip_tags($ticker['body']), 100);
|
||||
}
|
||||
|
||||
|
||||
$tickers_content = $twig->render('news.tickers.html.twig', array(
|
||||
'tickers' => $tickers,
|
||||
'canEdit' => false,
|
||||
'i' => -1
|
||||
));
|
||||
|
||||
|
||||
success_($tickers_content);
|
||||
}
|
||||
else {
|
||||
|
@@ -32,25 +32,25 @@
|
||||
|
||||
if(!isset($_REQUEST['name']))
|
||||
die('Please enter name as get or post parameter.');
|
||||
|
||||
|
||||
$name = stripslashes(ucwords(strtolower(trim($_REQUEST['name']))));
|
||||
$player = new OTS_Player();
|
||||
$player->find($name);
|
||||
|
||||
|
||||
if(!$player->isLoaded())
|
||||
{
|
||||
header('Content-type: image/png');
|
||||
readfile(SIGNATURES_IMAGES.'nocharacter.png');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
if(!function_exists( 'imagecreatefrompng'))
|
||||
{
|
||||
header('Content-type: image/png');
|
||||
readfile(SIGNATURES_IMAGES.'nogd.png');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$cached = SIGNATURES_CACHE.$player->getId() . '.png';
|
||||
if(file_exists($cached) && (time() < (filemtime($cached) + (60 * $config['signature_cache_time']))))
|
||||
{
|
||||
|
@@ -47,7 +47,7 @@
|
||||
$vocation = 'Unknown';
|
||||
if(isset($config['vocations'][$player->getVocation()]))
|
||||
$vocation = $config['vocations'][$player->getVocation()];
|
||||
|
||||
|
||||
$MadGD->addText( 'Profession:', $MadGD->textBold )->setPosition( 10, $i * $eachRow );
|
||||
$MadGD->addText( $vocation )->setPosition( ); $i++;
|
||||
/** LEVEL **/
|
||||
@@ -69,7 +69,7 @@
|
||||
$town = 'town_id';
|
||||
else if($db->hasColumn('houses', 'townid'))
|
||||
$town = 'townid';
|
||||
|
||||
|
||||
$house = $db->query( 'SELECT `houses`.`name`, `houses`.`' . $town . '` as town FROM `houses` WHERE `houses`.`owner` = '.$player->getId().';' )->fetchAll();
|
||||
if ( count( $house ) != 0 )
|
||||
{
|
||||
|
@@ -66,17 +66,17 @@ else if(isset($_GET['name']))
|
||||
else if(isset($_GET['password']) && isset($_GET['password2'])) {
|
||||
$password = $_GET['password'];
|
||||
$password2 = $_GET['password2'];
|
||||
|
||||
|
||||
if(!isset($password[0])) {
|
||||
error_('Please enter the password for your new account.');
|
||||
}
|
||||
|
||||
|
||||
if(!Validator::password($password))
|
||||
error_(Validator::getLastError());
|
||||
|
||||
|
||||
if($password != $password2)
|
||||
error_('Passwords are not the same.');
|
||||
|
||||
|
||||
success_(1);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user