• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Gesior aac

noobwars

NoobWars.hopto.org Hoster
Joined
Apr 2, 2013
Messages
153
Reaction score
2
Hey, does anyone knows what this means? this comes up when i try enter my website

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'z_forum.icon_id' in 'field list'' in C:\xampp\htdocs\latestnews.php:299 Stack trace: #0 C:\xampp\htdocs\latestnews.php(299): PDO->query('SELECT `z_forum...') #1 C:\xampp\htdocs\index.php(80): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\latestnews.php on line 299


Here is my Latestnews.php:
Code:
<?PHP
$main_content .= '
';
$main_content = " 

<script type=\"text/javascript\"><!-- 
function show_hide(flip) 
{ 
    var tmp = document.getElementById(flip); 
    if(tmp) 
        tmp.style.display = tmp.style.display == 'none' ? '' : 'none'; 
} 
--></script>"; 

$main_content .= '<script language="JavaScript">
TargetDate = "08/25/2012 1:00 PM";
CountActive = true;
CountStepper = -1;
LeadingZero = false;
DisplayFormat = "<font size=\'5\'><center>Do startu <font color=\"green\"><b>OTSMATERIA.PL</b></font> pozostalo:<br/> <font color=\"red\">%%D%%</font> dni, <font color=\"red\">%%H%%</font> godzin, <font color=\"red\">%%M%%</font> minut oraz <font color=\"red\"><b>%%S%%</b></font> sekund!<br></font>25 sierpien - sobota - godz. 13:00</center></br>";
FinishMessage = "";
</script>
<script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"></script>

';

/////////////////////////////////////////////////////////////////////////////////////////
//The new edition of my script: Best Player, Last joined and something new Server Motd.//
/////////////////////////Everything in the new appearance.///////////////////////////////
//////////////////////////////////////by  Aleh///////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
///Queries ///
$query = $SQL->query('SELECT `players`.`name`,`players`.`id`,`players`.`level`, `players`.`experience`, `server_motd`.`id`, `server_motd`.`text` FROM `players`,`server_motd` WHERE `players`.`group_id` < '.$config['site']['players_group_id_block'].' AND `players`.`name` != "Account Manager" ORDER BY `players`.`level` DESC, `players`.`experience` DESC, `server_motd`.`id` DESC LIMIT 1;')->fetch();
$query2 = $SQL->query('SELECT `id`, `name` FROM `players` ORDER BY `id` DESC LIMIT 1;')->fetch();
$housesfree = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=0;')->fetch();
$housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=1;')->fetch();
$players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
$accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();
$guilds = $SQL->query('SELECT COUNT(*) FROM `guilds` WHERE `id`>0;')->fetch();
///End Queries ///




$main_content .= '<center><div class="NewsHeadline">
	<div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">
		<table border="0">
			<tr>
				<td style="text-align: center; font-weight: bold;">
					<font color="white">WELCOME to ' . $config['server']['serverName'] . ' !</font>
				</td>
			</tr>
		</table>
	</div>
</div></center>


';



$kutas = $accounts[0] + 300;
$kutas1 = $players[0] + 300;
$kutas2 = $guilds[0] + 4;







    $main_content .= '
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center>Ostatnio dolaczyl do nas: <b><a href="?subtopic=characters&name='.urlencode($query2['name']).'">'.$query2['name'].'</a></b>, gracz numer '.$kutas1.'.</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center>Obecnie najlepszym graczem na serwerze jest: <b><a href="index.php?subtopic=characters&name='.urlencode($query['name']).'"> '.$query['name'].'</a> ('.urlencode($query['level']).')</b>.</center></td></tr>
    <table border=0 cellpadding=0 cellspacing=1 width=100%>    
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Accounts</b> in database: '.$kutas.'.</center></td>
    <td><center><b>Players</b> in database: '.$kutas1.'.</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>House</b> in game: 514.</center></td>
    <td><center><b>Guilds</b> in databese: '.$kutas2.'.</center></td></tr>

</table></td></tr></b></table>';

$cache_sec = 20;
$f = 'cache/news.tmp';
if(file_exists($f) && filemtime($f) > (time() - $cache_sec))
	$main_content = file_get_contents($f);
else
{


$guilds_list = $ots->createObject('Guilds_List');
$guilds_list->setFilter($filter);
$guilds_list->orderBy('name');
if(count($guilds_list) > 0) 
{
	foreach($SQL->query('SELECT `guild_name` FROM `castle` ORDER BY `id` DESC LIMIT 1;') as $result)
	{
		if($result['guild_name'] == 'No one')
			$main_content .= '<center><img src="http://images.stimax.pl/i2/zamek.gif" alt="xxx" /><b> Wlasciciel zamku: </b> No one is castle owner</center>';
		else
		{
			foreach($guilds_list as $guild) 
			{
				if($guild->getName() == $result['guild_name'])
				{
					foreach(array("/", "\\", "..") as $char) 
						$guild_logo = str_replace($char, "", $guild->getCustomField('logo_gfx_name'));
					
					if(empty($guild_logo) || !file_exists("http://otland.net/images/guilds/".$guild_logo)) 
						$guild_logo = "default_logo.gif";
					
					$main_content .= '<center><img src="http://images.stimax.pl/i2/zamek.gif" alt="xxx" /><b> Wlasciciel zamku: </b> <a href="?subtopic=guilds&action=show&guild=' . $guild->getId() . '">' . $result['guild_name'] . '</a></center>';
				}
			}
		}
	}
}



$main_content .= '
<div class="NewsHeadline">
	<div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">
		<table border="0">
			<tr>
				<td style="text-align: center; font-weight: bold;">
					<font color="white">Most powerfull guilds & TOP 3 players</font>
				</td>
			</tr>
		</table>
	</div>
</div>
<table border="0" cellspacing="3" cellpadding="4" width="100%" bgcolor="#D4C0A1">
	<tr >';

foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,  
    `g`.`logo_gfx_name` AS `logo`, COUNT(`g`.`name`) as `frags`  
FROM `killers` k  
    LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`  
    LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`  
    LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`  
    LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`  
WHERE `k`.`final_hit` = 1  
    GROUP BY `name`  
    ORDER BY `frags` DESC, `name` ASC  
    LIMIT 0, 6;') as $guild) 
    $main_content .= '        <td style="width: 62px; text-align: center;" bgcolor="#F1E0C6">
            <a href="?subtopic=guilds&action=show&guild=' . $guild['id'] . '"><img src="guilds/' . ((!empty($guild['logo']) && file_exists('guilds/' . $guild['logo'])) ? $guild['logo'] : 'default_logo.gif') . '" width="64" height="64" border="0" class="avatar" /><br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills
        </td>';

$main_content .= '    </tr>
</table>';


// ##### TOP 5 GRACZY CREATE BY COLLOCORPUS FROM MATERIAOTS, WSZYSTKIE PRAWA ZABRONIONE! KONTAKT 7284838 // 
$order = 0; 
$skills = $SQL->query('SELECT name,online,world_id,level,maglevel,vocation,promotion FROM players WHERE players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" ORDER BY level DESC, experience DESC LIMIT 3;'); 
foreach($skills as $skill)  
{ 
    if ( $skill['online'] == 1 ) 
    {  
        $online_gracz = '<font color="green"><img src="http://www.nazwa.pl/fileadmin/nazwa/10/images/domain-status1.png"></font>';  
    } 
    else  
    {  
        $online_gracz = '<font color="red"><img src="http://www.nazwa.pl/fileadmin/nazwa/10/images/domain-status2.png"></font>';  
    } 
    $order++; 
    $players_skill .= ' 
    <tr height="10px" BGCOLOR="#F2EEE3"> 
        <td align="center">'.$order.'.</td> 
        <td align="left" width="240"><a href="?subtopic=characters&name='.urlencode($skill['name']).'"><b>'.($skill['online']>0 ? "<font color=\"green\">".$skill['name']."</font>" : "".$skill['name']."</font>").'</b></a></td> 
        <td align="left" width="135"><font color="989177"><em>Level '.$skill['level'].'</em></font></td> 
        <td align="center" width="220"><font color="989177"><em>'.$vocation_name[$skill['world_id']][$skill['promotion']][$skill['vocation']].'</em></font></td> 
        <td align="center" width="200"><font color="989177"><em>'.$online_gracz.'</em></font></td> 
    </tr>'; 
} 

$main_content .= '<table><tr bgcolor="#F1E0C6"><td><table>' . $players_skill . '</table></td></tr></table>';


	file_put_contents($f, $main_content);
}

   /*
///////// TO WYWALIC PO STARCIE !!
$main_content .= '
<div class="NewsHeadline">
	<div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">
		<table border="0">
			<tr>
				<td style="text-align: center; font-weight: bold;">
					<font color="white">[auto- refresh] - KTO BEDZIE U NAS GRAL ?</font>
				</td>
			</tr>
		</table>
	</div>
</div>';

$main_content .= '<table><tr BGCOLOR="#F2EEE3"><td>';
$accept = $SQL->query('SELECT guildid, players FROM `application` WHERE `accept` = 1');
foreach($accept as $a)
{
	$guild = $SQL->query('SELECT `name` FROM `guilds` WHERE `id` = '.$a['guildid'].' LIMIT 1')->fetch();
	$main_content .= ' <b>'.$guild['name'].'</b> <font size="1">('.$a['players'].')</font>, ';
}

$main_content .= 'and few others..</td></tr></table>';

///////// TO WYWALIC PO STARCIE !!

    */



 






if ($logged){
$players_from_account = $SQL->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
foreach($players_from_account as $player)
    {
        $str .= '<option value="'.$player['id'].'"';
            if($player['id'] == $char_id)
            $strt .= ' selected="selected"';
            $str .= '>'.$player['name'].'</option>';
    }
}
$time = time();

//adding news
if($action == "newnews") {
if($group_id_of_acc_logged >= $config['site']['access_news']) {
$text = ($_REQUEST['text']);
                $char_id = (int) $_REQUEST['char_id'];
                $post_topic = stripslashes(trim($_REQUEST['topic']));
                $smile = (int) $_REQUEST['smile'];
				$news_icon = (int) $_REQUEST['icon_id'];
if(empty($news_icon)) {
$news_icon = 0;
}
if(empty($post_topic)) {
$an_errors[] .= 'You can\'t add news without topic.';
}
if(empty($text)) {
$an_errors[] .= 'You can\'t add empty news.';
}
if(empty($char_id)) {
$an_errors[] .= 'Select character.';
}
//execute query
if(empty($an_errors)) {
$SQL->query("INSERT INTO `z_forum` (`id` ,`first_post` ,`last_post` ,`section` ,`replies` ,`views` ,`author_aid` ,`author_guid` ,`post_text` ,`post_topic` ,`post_smile` ,`post_date` ,`last_edit_aid` ,`edit_date`, `post_ip`, `icon_id`) VALUES ('NULL', '0', '".time()."', '1', '0', '0', '".$account_logged->getId()."', '".(int) $char_id."', ".$SQL->quote($text).", ".$SQL->quote($post_topic).", '".(int) $smile."', '".time()."', '0', '0', '".$_SERVER['REMOTE_ADDR']."', '".$news_icon."')");
                        $thread_id = $SQL->lastInsertId();
                        $SQL->query("UPDATE `z_forum` SET `first_post`=".(int) $thread_id." WHERE `id` = ".(int) $thread_id);//show added data

$main_content .= '<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form>';
}
else
{
//show errors
$main_content .= '<div class="SmallBox" >  <div class="MessageContainer" >    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="ErrorMessage" >      <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div>      <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
foreach($an_errors as $an_error) {
	$main_content .= '<li>'.$an_error;
}
$main_content .= '</div>    <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div>    <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>    <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div>  </div></div><br/>';
//okno edycji newsa z wpisanymi danymi przeslanymi wczesniej
$main_content .= '<form action="?subtopic=latestnews&action=newnews" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="http://otland.net/images/news/icon_0.gif" width="20"></td><td><img src="http://otland.net/images/news/icon_1.gif" width="20"></td><td><img src="http://otland.net/images/news/icon_2.gif" width="20"></td><td><img src="http://otland.net/images/news/icon_3.gif" width="20"></td><td><img src="http://otland.net/images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="F1E0C6"><b>Topic:</b></td><td><input type="text" name="topic" maxlenght="50" style="width: 300px" value="'.$post_topic.'"></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>News<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="text" rows="6" cols="60">'.$text.'</textarea></td></tr><tr><td width="180"><b>Character:</b></td><td><select name="char_id"><option value="0">(Choose character)</option>'.$str.'</select></td></tr><tr><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></form><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="CancelAddNews" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="location.href=\'?subtopic=latestnews\';" alt="CancelAddNews" /></div></div></td></tr></table>';
}
}
else
{
$main_content .= 'You don\'t have site-admin rights. You can\'t add news.';}
}
//####################Show script with new news panel############################								
if($group_id_of_acc_logged >= $config['site']['access_news'] && $action != 'newnews')
{

$main_content .= '<script type="text/javascript">

var showednewnews_state = "0";
function showNewNewsForm()
{
if(showednewnews_state == "0") {
document.getElementById("newnewsform").innerHTML = \'<form action="?subtopic=latestnews&action=newnews" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="http://otland.net/images/news/icon_0.gif" width="20"></td><td><img src="http://otland.net/images/news/icon_1.gif" width="20"></td><td><img src="http://otland.net/images/news/icon_2.gif" width="20"></td><td><img src="http://otland.net/images/news/icon_3.gif" width="20"></td><td><img src="http://otland.net/images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="F1E0C6"><b>Topic:</b></td><td><input type="text" name="topic" maxlenght="50" style="width: 300px" ></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>News<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="text" rows="6" cols="60"></textarea></td></tr><tr><td width="180"><b>Character:</b></td><td><select name="char_id"><option value="0">(Choose character)</option>'.$str.'</select></td></tr><tr><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></form><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="CancelAddNews" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="showNewNewsForm()" alt="CancelAddNews" /></div></div></td></tr></table>\';
document.getElementById("chicken").innerHTML = \'\';
showednewnews_state = "1";
}
else {
document.getElementById("newnewsform").innerHTML = \'\';
document.getElementById("chicken").innerHTML = \'<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddNews" src="'.$layout_name.'/images/buttons/addnews.gif" onClick="showNewNewsForm()" alt="AddNews" /></div></div>\';
showednewnews_state = "0";
}
}
</script><div id="newnewsform"></div><div id="chicken"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddNews" src="'.$layout_name.'/images/buttons/addnews.gif" onClick="showNewNewsForm()" alt="AddNews" /></div></div></div><hr/>';$zapytanie = $SQL->query("SELECT `z_forum`.`icon_id`,`z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 3;")->fetchAll();
}
///show news
$zapytanie = $SQL->query("SELECT `z_forum`.`icon_id`, `z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 3;")->fetchAll();
foreach ($zapytanie as $row)
{
         $BB = array(
		'/\[youtube\](.*?)\[\/youtube\]/is' => '<center><object width="500" height="405"><param name="movie" value="http://www.youtube.com/v/$1&hl=pt-br&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/$1&hl=pt-br&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="500" height="405"></embed></object></center>',
		'/\[b\](.*?)\[\/b\]/is' => '<strong>$1</strong>',
		'/\[center\](.*?)\[\/center\]/is' => '<center>$1</center>',
		'/\[quote\](.*?)\[\/quote\]/is' => '<table cellpadding="0" style="background-color: #c4c4c4; width: 480px; border-style: dotted; border-color: #007900; border-width: 2px"><tr><td>$1</td></tr></table>',
		'/\[u\](.*?)\[\/u\]/is' => '<u>$1</u>',
		'/\[i\](.*?)\[\/i\]/is' => '<i>$1</i>',
		'/\[letter\](.*?)\[\/letter\]/is' => '<img src=images/letters/$1.gif alt=$1 />',
		'/\[url](.*?)\[\/url\]/is' => '<a href=$1>$1</a>',
		'/\[color\=(.*?)\](.*?)\[\/color\]/is' => '<span style="color: $1;">$2</span>',
		'/\[img\](.*?)\[\/img\]/is' => '<img src=$1 alt=$1 />',
		'/\[player\](.*?)\[\/player\]/is' => '<a href='.$server['ip'].'?subtopic=characters&amp;name=$1>$1</a>',
		'/\[code\](.*?)\[\/code\]/is' => '<div dir="ltr" style="margin: 0px;padding: 2px;border: 1px inset;width: 500px;height: 290px;text-align: left;overflow: auto"><code style="white-space:nowrap">$1</code></div>'
		);
		$message = preg_replace(array_keys($BB), array_values($BB), nl2br($row['post_text']));
        $main_content .= '<div class=\'NewsHeadline\'>
		<div class=\'NewsHeadlineBackground\' style=\'background-image:url('.$layout_name.'/images/news/newsheadline_background.gif)\'>
		<table border=0><tr><td><img src="'.$layout_name.'/images/news/icon_'.$row['icon_id'].'.gif" class=\'NewsHeadlineIcon\' alt=\'\' />
		</td><td><font color="'.$layout_ini['news_title_color'].'">'.date('d.m.y H:i:s', $row['post_date']).' - <b>'.$row['post_topic'].'</b></font></td></tr></table>
		</div>
		</div>
		<table style=\'clear:both\' border=0 cellpadding=0 cellspacing=0 width=\'100%\'><tr>
		<td><img src="'.$layout_name.'/images/global/general/blank.gif" width=10 height=1 border=0 alt=\'\' /></td>';
		if($group_id_of_acc_logged >= $config['site']['access_admin_panel'])
		{
			$main_content .='<td width="100%">'.$message.'<br><h6><i>Posted by </i><font color="green">'.$row['name'].'</font><br>

<div class="fb-like" data-href="http://www.facebook.com/otsmateriaPL" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" data-font="trebuchet ms"></div>


<br><br>
</h6><p align="right"><a href="?subtopic=forum&action=remove_post&id='.$row['id'].'"><font color="red">[Delete this news]</font></a>  <a href="?subtopic=forum&action=edit_post&id='.$row['id'].'"><font color="green">[Edit this news]</font></a><br>

';
		}
		else		
		{
			$main_content .='<td width="100%">'.$message.'<br><h6><i>Posted by </i><font color="green">'.$row['name'].'</font></h6><p align="right"></p>
<div class="fb-like" data-href="http://www.facebook.com/otsmateriaPL" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" data-font="trebuchet ms"></div>
<br><br>';		
		}
		$main_content .= '</td>
		<td><img src="'.$layout_name.'/images/global/general/blank.gif" width=10 height=1 border=0 alt=\'\' /></td>
		</tr></table>';
}

?>
 
SQL:
ALTER TABLE `z_forum` ADD `icon_id` int(10) NOT NULL default '0';
 
PHP:
<?PHP
//######################## SHOW TICKERS AND NEWS #######################
$time = time();
    $query = $SQL->query("SELECT * FROM `players` ORDER BY `experience` DESC")->fetch();
    $query2 = $SQL->query('SELECT `id`, `name` FROM `players` ORDER BY `id` DESC LIMIT 1;')->fetch();
    $housesfree = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=0;')->fetch();
    $housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=1;')->fetch();
    $players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
    $accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();
    //$banned = $SQL->query('SELECT COUNT(*) FROM `bans` WHERE `id`>0;')->fetch();
    $guilds = $SQL->query('SELECT COUNT(*) FROM `guilds` WHERE `id`>0;')->fetch();
    ///End Queries ///
		// top kills - guilds
$main_content .= '<div class="NewsHeadline">
	<div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">
		<table border="0">
			<tr>
				<td style="text-align: center; font-weight: bold;">
					<font color="white">Most powerfull guilds</font>
				</td>
			</tr>
		</table>
	</div>
</div>
<table border="0" cellspacing="3" cellpadding="4" width="100%">
	<tr>';

foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,
	`g`.`logo_gfx_name` AS `logo`, COUNT(`g`.`name`) as `frags`
FROM `killers` k
	LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`
	LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`
	LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`
	LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`
WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1
	GROUP BY `name`
	ORDER BY `frags` DESC, `name` ASC
	LIMIT 0, 3;') as $guild)
	$main_content .= '		<td style="width: 25%; text-align: center;">
			<a href="?subtopic=guilds&action=show&guild=' . $guild['id'] . '"><img src="guild_image.php?id=' . $guild['id'] . '" width="64" height="64" border="0"/> <br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills
		</td>';

$main_content .= '	</tr>
</table>';
    

    
    $main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=4 cellspacing=1 width=100%>
    <tr bgcolor='. $config['site']['vdarkborder'] .'><td align="center" class=white colspan=1><b>Welcome to '.$config['server']['serverName'].'</b></td></tr>
    <tr><td><table border=0 cellpadding=1 cellspacing=1 width=100%>

    <tr bgcolor='. $config['site']['lightborder'] .'><td><center>Last joined us: <a href="?subtopic=characters&name='.urlencode($query2['name']).'">'.$query2['name'].'</a>, player number '.$query2['id'].'. Welcome and wish you a nice game!</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center>Currently, the best player on the server is: <a href="index.php?subtopic=characters&name='.urlencode($query['name']).'"> '.$query['name'].'</a> ('.urlencode($query['level']).'). Congratulations!</center></td></tr>
    <table border=0 cellpadding=0 cellspacing=1 width=100%>
      <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Free Houses:</b> '.$housesfree[0].'</center></td>
    <td><center><b>Rented Houses:</b> '.$housesrented[0].'</center></td></tr>      
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Accounts</b> in database: '.$accounts[0].'</center></td>
    <td><center><b>Players</b> in database: '.$players[0].'</center></td></tr>
    <tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Banned</b> accounts: '.$banned[0].'</center></td>
    <td><center><b>Guilds</b> in databese: '.$guilds[0].'</center></td></tr>

    </table></td></tr></table>';
if($action == "") {

//show tickers if any in database or not blocked (tickers limit = 0)
$tickers = $SQL->query('SELECT * FROM `z_news_tickers` WHERE hide_ticker != 1 ORDER BY date DESC LIMIT 4;');
$number_of_tickers = 0;
if(is_object($tickers)) {
foreach($tickers as $ticker) {
if(is_int($number_of_tickers / 2))
        $color = "Odd";
else
        $color = "Even";
$tickers_to_add .= '<div id="TickerEntry-'.$number_of_tickers.'" class="Row" onclick=\'TickerAction("TickerEntry-'.$number_of_tickers.'")\'>
  <div class="'.$color.'">
    <div class="NewsTickerIcon" style="background-image: url('.$layout_name.'/images/news/icon_'.$ticker['image_id'].'.gif);"></div>
    <div id="TickerEntry-'.$number_of_tickers.'-Button" class="NewsTickerExtend" style="background-image: url('.$layout_name.'/images/general/plus.gif);"></div>
    <div class="NewsTickerText">
      <span class="NewsTickerDate">'.date("j M Y", $ticker['date']).' -</span>
      <div id="TickerEntry-'.$number_of_tickers.'-ShortText" class="NewsTickerShortText">';
//if admin show button to delete (hide) ticker
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
$tickers_to_add .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$ticker['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
}
$tickers_to_add .= short_text($ticker['text'], 60).'</div>
      <div id="TickerEntry-'.$number_of_tickers.'-FullText" class="NewsTickerFullText">';
//if admin show button to delete (hide) ticker
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
$tickers_to_add .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$ticker['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
}
$tickers_to_add .= $ticker['text'].'</div>
    </div>
  </div>
</div>';
$number_of_tickers++;
}
}

if(!empty($tickers_to_add)) {
//show table with tickers
$news_content .= '<div id="newsticker" class="Box">
    <div class="Corner-tl" style="background-image: url('.$layout_name.'/images/content/corner-tl.gif);"></div>
    <div class="Corner-tr" style="background-image: url('.$layout_name.'/images/content/corner-tr.gif);"></div>
    <div class="Border_1" style="background-image: url('.$layout_name.'/images/content/border-1.gif);"></div>
    <div class="BorderTitleText" style="background-image: url('.$layout_name.'/images/content/title-background-green.gif);"></div>
    <img class="Title" src="'.$layout_name.'/images/header/headline-newsticker.gif" alt="Contentbox headline">
    <div class="Border_2">
      <div class="Border_3">
        <div class="BoxContent" style="background-image: url('.$layout_name.'/images/content/scroll.gif);">';
if($group_id_of_acc_logged >= $config['site']['access_admin_panel'])
$news_content .= '<script type="text/javascript">
var showednewticker_state = "0";
function showNewTickerForm()
{
if(showednewticker_state == "0") {
document.getElementById("newtickerform").innerHTML = \'<form action="?subtopic=latestnews&action=newticker" method="post" ><table border="0"><tr><td bgcolor="D4C0A1" align="center"><b>Select icon:</b></td><td><table border="0" bgcolor="F1E0C6"><tr><td><img src="images/news/icon_0.gif" width="20"></td><td><img src="images/news/icon_1.gif" width="20"></td><td><img src="images/news/icon_2.gif" width="20"></td><td><img src="images/news/icon_3.gif" width="20"></td><td><img src="images/news/icon_4.gif" width="20"></td></tr><tr><td><input type="radio" name="icon_id" value="0" checked="checked"></td><td><input type="radio" name="icon_id" value="1"></td><td><input type="radio" name="icon_id" value="2"></td><td><input type="radio" name="icon_id" value="3"></td><td><input type="radio" name="icon_id" value="4"></td></tr></table></td></tr><tr><td align="center" bgcolor="D4C0A1"><b>New<br>ticker<br>text:</b></td><td bgcolor="F1E0C6"><textarea name="new_ticker" rows="3" cols="45"></textarea></td></tr><tr><td><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Submit" alt="Submit" src="'.$layout_name.'/images/buttons/_sbutton_submit.gif" ></div></div></form><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/_sbutton_cancel.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div></td></tr></table>\';
document.getElementById("jajo").innerHTML = \'\';
showednewticker_state = "1";
}
else {
document.getElementById("newtickerform").innerHTML = \'\';
document.getElementById("jajo").innerHTML = \'<div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/addticker.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div>\';
showednewticker_state = "0";
}
}
</script><div id="newtickerform"></div><div id="jajo"><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><img class="ButtonText" id="AddTicker" src="'.$layout_name.'/images/buttons/addticker.gif" onClick="showNewTickerForm()" alt="AddTicker" /></div></div></div><hr/>';
//add tickers list
$news_content .= $tickers_to_add;
//koniec
$news_content .= '</div>
      </div>
    </div>
    <div class="Border_1" style="background-image: url('.$layout_name.'/images/content/border-1.gif);"></div>
    <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image: url('.$layout_name.'/images/content/corner-bl.gif);"></div></div>
    <div class="CornerWrapper-b"><div class="Corner-br" style="background-image: url('.$layout_name.'/images/content/corner-br.gif);"></div></div>
  </div>';
}
}
//##################### ADD NEW TICKER #####################
if($action == "newticker") {
if($group_id_of_acc_logged >= $config['site']['access_tickers']) {
$ticker_text = stripslashes(trim($_POST['new_ticker']));
$ticker_icon = (int) $_POST['icon_id'];
if(empty($ticker_text)) {
$main_content .= 'You can\'t add empty ticker.';
}
else
{
if(empty($ticker_icon)) {
$ticker_icon = 0;
}
$SQL->query('INSERT INTO '.$SQL->tableName('z_news_tickers').' (date, author, image_id, text, hide_ticker) VALUES ('.$SQL->quote($time).', '.$account_logged->getId().', '.$ticker_icon.', '.$SQL->quote($ticker_text).', 0)');
$main_content .= '<center><h2><font color="red">Added new ticker:</font></h2></center><hr/><div id="newsticker" class="Box"><div id="TickerEntry-1" class="Row" onclick=\'TickerAction("TickerEntry-1")\'>
  <div class="Odd">
    <div class="NewsTickerIcon" style="background-image: url('.$layout_name.'/images/news/icon_'.$ticker['image_id'].'.gif);"></div>
    <div id="TickerEntry-1-Button" class="NewsTickerExtend" style="background-image: url('.$layout_name.'/images/general/plus.gif);"></div>
    <div class="NewsTickerText">
      <span class="NewsTickerDate">'.date("j M Y", $time).' -</span>
      <div id="TickerEntry-1-ShortText" class="NewsTickerShortText">';
$main_content .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$time.'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
$main_content .= short_text($ticker_text, 60).'</div>
      <div id="TickerEntry-1-FullText" class="NewsTickerFullText">';
$main_content .= '<a href="?subtopic=latestnews&action=deleteticker&id='.$time.'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';
$main_content .= $ticker_text.'</div>
    </div>
  </div>
</div></div><hr/>';
}
}
else
{
$main_content .= 'You don\'t have admin rights. You can\'t add new ticker.';
}
$main_content .= '<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form>';
}
//#################### DELETE (HIDE only!) TICKER ############################
if($action == "deleteticker") {
if($group_id_of_acc_logged >= $config['site']['access_tickers']) {
header("Location: ");
$date = (int) $_REQUEST['id'];
$SQL->query('UPDATE '.$SQL->tableName('z_news_tickers').' SET hide_ticker = 1 WHERE '.$SQL->fieldName('date').' = '.$date.';');
$main_content .= '<center>News tickets with <b>date '.date("j F Y, g:i a", $date).'</b> has been deleted.<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form></center>';
}
else
{
$main_content .= '<center>You don\'t have admin rights. You can\'t delete tickers.<form action="?subtopic=latestnews" METHOD=post><div class="BigButton" style="background-image:url('.$layout_name.'/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url('.$layout_name.'/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="'.$layout_name.'/images/buttons/_sbutton_back.gif" ></div></div></form></center>';
}
}
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']){$main_content .=  '<a href="?subtopic=forum&action=new_topic&section_id=1">Add new news</a>';}
$zapytanie = $SQL->query("SELECT `z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 6;")->fetchAll();
foreach ($zapytanie as $row)
{
         $BB = array(
		'/\[b\](.*?)\[\/b\]/is' => '<strong>$1</strong>',
		'/\[quote\](.*?)\[\/quote\]/is' => '<table cellpadding="0" style="background-color: #c4c4c4; width: 480px; border-style: dotted; border-color: #007900; border-width: 2px"><tr><td>$1</td></tr></table>',
		'/\[u\](.*?)\[\/u\]/is' => '<u>$1</u>',
		'/\[i\](.*?)\[\/i\]/is' => '<i>$1</i>',
		'/\[url](.*?)\[\/url\]/is' => '<a href=$1>$1</a>',
		'/\[img\](.*?)\[\/img\]/is' => '<img src=$1 alt=$1 />',
		'/\[player\](.*?)\[\/player\]/is' => '<a href='.$server['ip'].'?subtopic=characters&amp;name=$1>$1</a>',
		'/\[code\](.*?)\[\/code\]/is' => '<div dir="ltr" style="margin: 0px;padding: 2px;border: 1px inset;width: 500px;height: 290px;text-align: left;overflow: auto"><code style="white-space:nowrap">$1</code></div>'
		);
		$message = preg_replace(array_keys($BB), array_values($BB), nl2br($row['post_text']));
        $main_content .= '<div class=\'NewsHeadline\'>
		<div class=\'NewsHeadlineBackground\' style=\'background-image:url('.$layout_name.'/images/news/newsheadline_background.gif)\'>
		<table border=0><tr><td><img src="'.$layout_name.'/images/news/icon_1.gif" class=\'NewsHeadlineIcon\' alt=\'\' />
		</td><td><font color="'.$layout_ini['news_title_color'].'">'.date('d.m.y H:i:s', $row['post_date']).' - <b>'.$row['post_topic'].'</b></font></td></tr></table>
		</div>
		</div>
		<table style=\'clear:both\' border=0 cellpadding=0 cellspacing=0 width=\'100%\'><tr>
		<td><img src="'.$layout_name.'/images/global/general/blank.gif" width=10 height=1 border=0 alt=\'\' /></td>';
		if($group_id_of_acc_logged >= $config['site']['access_admin_panel'])
		{
			$main_content .='<td width="100%">'.$message.'<br><h6><i>Posted by </i><font color="green">'.$row['name'].'</font></h6><p align="right"><a href="?subtopic=forum&action=remove_post&id='.$row['id'].'"><font color="red">[Delete this news]</font></a>  <a href="?subtopic=forum&action=edit_post&id='.$row['id'].'"><font color="green">[Edit this news]</font></a>      <a href="?subtopic=forum&action=show_thread&id='.$row['id'].'">Comments: '.$row['replies'].'</a></p>';
		}
		else		
		{
			$main_content .='<td width="100%">'.$message.'<br><h6><i>Posted by </i><font color="green">'.$row['name'].'</font></h6><p align="right"><a href="?subtopic=forum&action=show_thread&id='.$row['id'].'">Comments: '.$row['replies'].'</a></p>';		
		}
		$main_content .= '</td>
		<td><img src="'.$layout_name.'/images/global/general/blank.gif" width=10 height=1 border=0 alt=\'\' /></td>
		</tr></table>';
}

?>

try
 
Ninja, Thnx its fixed, and thnx for helping me megazx, but now it comes up another error

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'otsmateria.z_shop_points_bought' doesn't exist' in C:\xampp\htdocs\layouts\tibiacom\layout.php:243 Stack trace: #0 C:\xampp\htdocs\layouts\tibiacom\layout.php(243): PDO->query('SELECT SUM(`amo...') #1 C:\xampp\htdocs\index.php(705): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\layouts\tibiacom\layout.php on line 243
 
SQL:
CREATE TABLE `z_shop_points_bought` (
`id` INT( 15 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`amount` INT( 15 ) NOT NULL ,
`type` VARCHAR( 255 ) NOT NULL ,
`accountid` INT( 15 ) NOT NULL ,
`code` VARCHAR( 255 ) NOT NULL ,
`paypalmail` VARCHAR( 255 ) NOT NULL ,
`date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP 
) ENGINE = MYISAM ;
 
YEEES!!!, FINALLY AFTER 1 WEEK XD!, Thanks to everybody that helped me SOOO MUCH!

- - - Updated - - -

Can anyone help me? , Everything works expect account site...

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'lastpremdays' in 'field list'' in C:\xampp\htdocs\pot\OTS_Account.php:772 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Account.php(772): PDO->query('SELECT `lastpre...') #1 C:\xampp\htdocs\accountmanagement.php(114): OTS_Account->getCustomField('lastpremdays') #2 C:\xampp\htdocs\index.php(361): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 772
 
SQL:
ALTER TABLE `accounts` ADD `lastpremdays` INT(10) NOT NULL AFTER `premdays`;
 
When i create account, i receive acc number/pass then recovery key, and this pops up at the top of site

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in C:\xampp\htdocs\phpmailer\class.smtp.php on line 105

Fatal error: Call to undefined function force() in C:\xampp\htdocs\characters.php on line 146

This too.. (Only 2 errors left xD, its those i have pasted here..
 
Last edited:
config-and-functions.php
PHP:
function force($podstawa, $wykladnik)
{
    $wynik = $podstawa;
    $i = 1;
    while ($i++ < $wykladnik)
        $wynik *= $podstawa;
    return $wynik;
}

php.ini, remove ;
Code:
extension=php_openssl.dll[COLOR=#ff0000];[/COLOR]
 
Thnx, View Chars fixed, but still got problem with "SMTP"

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in C:\xampp\htdocs\phpmailer\class.smtp.php on line 105

Here is the "Class.Smtp.php"
http://www.mediafire.com/view/?21y0vyidoedawa8
 
Yes. i did, nothing happend ;/ still getting the "smtp" error after i create account..

This and the error "smtp / on the line 105" thing..
--- Your R-KEY: S5K86A5CIE --- save it !!
An error occorred while sending email ([email protected])!

i think it has something to do with smtp ports but idk what or how to fix it
 
First create email on AOL.com - News, Sports, Weather, Entertainment, Local & Lifestyle

fix that lines in config.php

// E-MAIL config
$config['site']['send_emails'] = 1; // is acc. maker configured to send e-mails?
$config['site']['mail_address'] = "your aol mail"; // e-mail address
$config['site']['smtp_enabled'] = "no"; // send by smtp or mail function (set 0 if use mail function)
$config['site']['smtp_host'] = "smtp.aol.com"; // address
$config['site']['smtp_port'] = 25; // port
$config['site']['smtp_auth'] = "1"; // need authorization? (set 0 if not need auth)
$config['site']['smtp_user'] = "your aol mail"; // login
$config['site']['smtp_pass'] = "your aol password"; // password

should works fine now
 
PHP:
// E-MAIL config
$config['site']['send_emails'] = 0; // is acc. maker configured to send e-mails?
$config['site']['mail_address'] = "[email protected]"; // e-mail address
$config['site']['smtp_enabled'] = "yes"; // send by smtp or mail function (set 0 if use mail function)
$config['site']['smtp_host'] = "smtp.gmail.com"; // address
$config['site']['smtp_port'] = 465; // port
$config['site']['smtp_auth'] = "yes"; // need authorization? (set 0 if not need auth)
$config['site']['smtp_user'] = "login"; // login
$config['site']['smtp_pass'] = "password"; // password

this one working with me
 
Should i write "gmail acc/pass" in those lines?

$config['site']['smtp_user'] = "login"; // login
$config['site']['smtp_pass'] = "password"; // password

- - - Updated - - -

Its working, but its not sending info after creating account "Your Account Number: 3523523 Password: signaoqq32 Recovery Key: TF923H9NA" to email that player creates
 
Back
Top