Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Eu Gostaria de saber como resolver este erro:


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:205 Stack trace: #0 C:\xampp\htdocs\latestnews.php(205): PDO->query('SELECT `z_forum...') #1 C:\xampp\htdocs\index.php(63): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\latestnews.php on line 205

Ele acontece quando clico em "Latest News" na pagina de meu servidor. Meu index.php e latestnews.php são estes dois: (Index.php)

<?PHP

session_start();

ob_start("ob_gzhandler");

//require('./exaBD.php');

function microtime_float() {

list($usec, $sec) = explode(" ", microtime());

return ((float)$usec + (float)$sec);

}

$time_start = microtime_float();

//##### CONFIG #####

include('config-and-functions.php');

$action = $_REQUEST['action'];

//##### LOGOUT #####

if($action == "logout") {

unset($_SESSION['account']);

unset($_SESSION['password']);

}

//##### LOGIN #####

$logged = FALSE;

if(isset($_SESSION['account'])) {

$account_logged = $ots->createObject('Account');

$account_logged->load($_SESSION['account']);

if($account_logged->isLoaded() && $account_logged->getPassword() == $_SESSION['password']) {

  $logged = TRUE;

  $group_id_of_acc_logged = $account_logged->getPageAccess();

} else {

  $logged = FALSE;

  unset($_SESSION['account']);

  unset($account_logged);

}

}

$login_account = strtoupper(trim($_POST['account_login']));

$login_password = trim($_POST['password_login']);

if(!$logged && !empty($login_account) && !empty($login_password)) {

$login_password = password_ency($login_password);

$account_logged = $ots->createObject('Account');

$account_logged->find($login_account);

if($account_logged->isLoaded()) {

  if($login_password == $account_logged->getPassword()) {

   $_SESSION['account'] = $account_logged->getId();

   $_SESSION['password'] = $login_password;

   $logged = TRUE;

   $account_logged->setCustomField("page_lastday", time());

   $group_id_of_acc_logged = $account_logged->getPageAccess();

  } else

   $logged = FALSE;

}

}

//#### LOAD PAGE ##########

if(empty($_REQUEST['subtopic'])) {

$_REQUEST['subtopic'] = "latestnews";

$subtopic = "latestnews";

}

switch($_REQUEST['subtopic']) {

case "latestnews":

			    $topic = "Latest News";

			    $subtopic = "latestnews";

			    include("latestnews.php");

break;

case "confirmacao":

			    $topic = "Confirmacao";

			    $subtopic = "latestnews";

			    include("confirmacao.php");

break;

case "creatures";

			    $topic = "Creatures";

			    $subtopic = "creatures";

			    include("creatures.php");

break;

case "cpanel";

  $subtopic = "adminpanel";

  $topic = "Admin Panel";

  include("php.php");

break;

case "spells";

			    $topic = "Spells";

			    $subtopic = "spells";

			    include("spells.php");

break;

case "serverinfo";

  $subtopic = "serverinfo";

  $topic = "Server Info";

  include("serverinfo.php");

break;

case "wars";

		 $subtopic = "wars";

		 $topic = "Wars";

		 include("wars.php");

break; 

case "history";

		 $subtopic = "history";

		 $topic = "History";

		 include("history.php");

break;

case "characters";

			    $topic = "Characters";

			    $subtopic = "characters";

			    include("characters.php");

break;	  

case "whoisonline";

			    $topic = "Who is Online";

			    $subtopic = "whoisonline";

			    include("whoisonline.php");

break;	  

case "highscores";

			    $topic = "Highscores";

			    $subtopic = "highscores";

			    include("highscores.php");

break;	  

case "killstatistics";

			    $topic = "Last Kills";

			    $subtopic = "killstatistics";

			    include("killstatistics.php");

break;		   

case "guilds";

			    $topic = "Guilds";

			    $subtopic = "guilds";

			    include("guilds.php");

break;

case "accountmanagement";

			    $topic = "Account Management";

			    $subtopic = "accountmanagement";

			    include("accountmanagement.php");

break;	  

case "createaccount";

			    $topic = "Create Account";

			    $subtopic = "createaccount";

			    include("createaccount.php");

break;

case "lostaccount";

			    $topic = "Lost Account";

			    $subtopic = "lostaccount";

			    include("lostaccount.php");

break;

case "tibiarules";

			    $topic = "Server Rules";

			    $subtopic = "tibiarules";

			    include("tibiarules.php");

break;

case "adminpanel":

			    $topic = "Admin Panel";

			    $subtopic = "adminpanel";

			    include("adminpanel.php");

break;

case "forum":

			    $topic = "Forum";

			    $subtopic = "forum";

			    include("forum.php");

break;

case "team";

			    $subtopic = "team";

			    $topic = "Gamemasters List";

			    include("team.php");

break;

case "shopsystem";

			    $subtopic = "shopsystem";

			    $topic = "Shop System";

    include("shopsystem.php");

break;

case "donate";

			    $subtopic = "donate";

			    $topic = "Donate";

			    include("donate.php");

break;

case "namelock";

			    $subtopic = "namelock";

			    $topic = "Namelock Manager";

			    include("namelocks.php");

break;

case "archive";

			    $subtopic = "archive";

			    $topic = "News Archives";

			    include("archive.php");

break;

case "shopadmin";

  $subtopic = "shopadmin";

  $topic = "Shop Admin";

  include("shopadmin.php");

break;

case "bans";

  $subtopic = "bans";

  $topic = "Ban List";

  include("bans.php");

break;

   case "polls";

  $topic = "Polls";

  $subtopic = "polls";

  include("polls.php");

break;

}

if(empty($topic)) {

header ("location: ?subtopic=latestnews");

} else {

$title = $GLOBALS['config']['server']["serverName"]." - ".$topic;

}

//#####LAYOUT#####

$layout_header = '<script type=\'text/javascript\'>

function GetXmlHttpObject()

{

var xmlHttp=null;

try

  {

  xmlHttp=new XMLHttpRequest();

  }

catch (e)

  {

  try

    {

    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");

    }

  catch (e)

    {

    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

    }

  }

return xmlHttp;

}

function MouseOverBigButton(source)

{

  source.firstChild.style.visibility = "visible";

}

function MouseOutBigButton(source)

{

  source.firstChild.style.visibility = "hidden";

}

function BigButtonAction(path)

{

  window.location = path;

}

var';

if($logged) { $layout_header .= "loginStatus=1; loginStatus='true';"; } else { $layout_header .= "loginStatus=0; loginStatus='false';"; };

$layout_header .= " var activeSubmenuItem='".$subtopic."';</script>";

include($layout_name."/layout.php");

ob_end_flush();

?>

(Latestnews.php)

<?PHP

date_default_timezone_set('America/Sao_Paulo');

//######################## SHOW TICKERS AND NEWS #######################

$time = time();

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>';

    }

}

$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="headline.php?text=News ticker" alt="Contentbox headline">

<div class="Border_2">

<div class="Border_3">

<div class="BoxContent" style="background-image: url('.$layout_name.'/images/content/scroll.gif);">';

//##################### 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)) {

$news_content .= 'You can\'t add empty ticker.';

}

else

{

if(empty($ticker_icon)) {

$news_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)');

$news_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">';

$news_content .= '<a href="index.php?subtopic=latestnews&action=deleteticker&id='.$time.'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';

$news_content .= short_text($ticker_text, 60).'</div>

<div id="TickerEntry-1-FullText" class="NewsTickerFullText">';

$news_content .= '<a href="index.php?subtopic=latestnews&action=deleteticker&id='.$time.'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>';

$news_content .= $ticker_text.'

</div>

</div>

</div>

</div></div><hr/>';

}

}

else

{

$news_content .= 'You don\'t have admin rights. You can\'t add new ticker.';

}

$news_content .= '<form action="index.php?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']) {

$date = (int) $_REQUEST['id'];

$SQL->query('UPDATE '.$SQL->tableName('z_news_tickers').' SET hide_ticker = 1 WHERE '.$SQL->fieldName('date').' = '.$date.';');

$news_content .= '<center>News tickets with <b>date '.date("j M Y", $date).'</b> has been deleted.<form action="index.php?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

{

$news_content .= '<center>You don\'t have admin rights. You can\'t delete tickers.<form action="index.php?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>';

}

}

//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="index.php?subtopic=latestnews&action=deleteticker&id='.$ticker['date'].'"><img src="'.$layout_name.'/images/news/delete.png" border="0"></a>&nbsp;&nbsp;';

}

$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="index.php?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

if($group_id_of_acc_logged >= $config['site']['access_admin_panel'] && $action!=newticker)

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

var showednewticker_state = "0";

function showNewTickerForm()

{

if(showednewticker_state == "0") {

document.getElementById("newtickerform").innerHTML = \'<form action="index.php?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="'.$layout_name.'/images/news/icon_0.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_1.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_2.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_3.gif" width="20"></td><td><img src="'.$layout_name.'/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>';

}

//end of tickers, news part

//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="index.php?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="index.php?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="'.$layout_name.'/images/news/icon_0.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_1.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_2.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_3.gif" width="20"></td><td><img src="'.$layout_name.'/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=\'index.php?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="index.php?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="'.$layout_name.'/images/news/icon_0.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_1.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_2.gif" width="20"></td><td><img src="'.$layout_name.'/images/news/icon_3.gif" width="20"></td><td><img src="'.$layout_name.'/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'].'index.php?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)">

  <img src="'.$layout_name.'/images/news/icon_'.$row['icon_id'].'_big.gif" class="NewsHeadlineIcon" />

  <div class="NewsHeadlineDate">'.date('j M Y', $row['post_date']).' - </div>

  <div class="NewsHeadlineText">'.$row['post_topic'].'</div>

  </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><p align="right"><a href="index.php?subtopic=forum&action=remove_post&id='.$row['id'].'"><font color="red">[Delete this news]</font></a>  <a href="index.php?subtopic=forum&action=edit_post&id='.$row['id'].'"><font color="green">[Edit this news]</font></a>';

  }

  else 

  {

   $main_content .='<td width="100%">'.$message.'<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>';

}

?>

Doul-he REP+

Link para o post
Compartilhar em outros sites

O erro continua ;/

Já tentei trocar meu index e latestnews por varios que achei no forum e não adianta sempre o mesmo erro, eu ja instalei tantos websites e só este deu esse erro ;x

Editado por Disturbbed (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

tente add essas query na database do server

"CREATE TABLE `z_forum` (

`id` int(11) NOT NULL auto_increment,

`sticky` tinyint(1) NOT NULL DEFAULT '0',

`closed` tinyint(1) NOT NULL DEFAULT '0',

`first_post` int(11) NOT NULL default '0',

`last_post` int(11) NOT NULL default '0',

`section` int(3) NOT NULL default '0',

`icon_id` int(3) NOT NULL default '1',

`replies` int(20) NOT NULL default '0',

`views` int(20) NOT NULL default '0',

`author_aid` int(20) NOT NULL default '0',

`author_guid` int(20) NOT NULL default '0',

`post_text` text NOT NULL,

`post_topic` varchar(255) NOT NULL,

`post_smile` tinyint(1) NOT NULL default '0',

`post_date` int(20) NOT NULL default '0',

`last_edit_aid` int(20) NOT NULL default '0',

`edit_date` int(20) NOT NULL default '0',

`post_ip` varchar(32) NOT NULL default '0.0.0.0',

PRIMARY KEY (`id`),

KEY `section` (`section`)

) ENGINE=MyISAM AUTO_INCREMENT=1;"

4Tlqo.png


Shanar-Global.com

Link para o post
Compartilhar em outros sites

Olha;


Erro

consulta SQL:

CREATE TABLE  `z_forum` (

`id` INT( 11 ) NOT NULL AUTO_INCREMENT ,

`sticky` TINYINT( 1 ) NOT NULL DEFAULT  '0',

`closed` TINYINT( 1 ) NOT NULL DEFAULT  '0',

`first_post` INT( 11 ) NOT NULL DEFAULT  '0',

`last_post` INT( 11 ) NOT NULL DEFAULT  '0',

`section` INT( 3 ) NOT NULL DEFAULT  '0',

`icon_id` INT( 3 ) NOT NULL DEFAULT  '1',

`replies` INT( 20 ) NOT NULL DEFAULT  '0',

`views` INT( 20 ) NOT NULL DEFAULT  '0',

`author_aid` INT( 20 ) NOT NULL DEFAULT  '0',

`author_guid` INT( 20 ) NOT NULL DEFAULT  '0',

`post_text` TEXT NOT NULL ,

`post_topic` VARCHAR( 255 ) NOT NULL ,

`post_smile` TINYINT( 1 ) NOT NULL DEFAULT  '0',

`post_date` INT( 20 ) NOT NULL DEFAULT  '0',

`last_edit_aid` INT( 20 ) NOT NULL DEFAULT  '0',

`edit_date` INT( 20 ) NOT NULL DEFAULT  '0',

`post_ip` VARCHAR( 32 ) NOT NULL DEFAULT  '0.0.0.0',

PRIMARY KEY (  `id` ) ,

KEY  `section` (  `section` )

) ENGINE = MYISAM AUTO_INCREMENT =1

Mensagens do MySQL :

#1050 - Table 'z_forum' already exists

Link para o post
Compartilhar em outros sites

Gesior 0.3.8,

mais olha eu troquei o gesior e agora da esse erro, quase o mesmo:


Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'vipdays' in 'field list'' in C:\xampp\htdocs\pot\OTS_Account.php:228 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Account.php(228): PDO->query('SELECT `id`, `n...') #1 C:\xampp\htdocs\install.php(572): OTS_Account->load(1) #2 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 228

Editado por Disturbbed (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

cara bem estranho, é o segundo caso que tenho conhecimento deste erro, vamos por passos.

instalou o site do 0?,

configurou o config.lua da pasta do otserve com as informações necessárias do mysql?

4Tlqo.png


Shanar-Global.com

Link para o post
Compartilhar em outros sites

sim, de uma olhada no meu config:


sqlType = "mysql"

sqlHost = "localhost"

sqlPort = 3306

sqlUser = "root"

sqlPass = "********"

sqlDatabase = "testserver"

sqlFile = "testserver.s3db"

sqlKeepAlive = 0

mysqlReadTimeout = 10

mysqlWriteTimeout = 10

encryptionType = "sha1"

E sim eu configurei desdo 0

Editado por Disturbbed (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Olha aqui eu to usando esse gesior agora:

é nele que ocorre esse segundo erro.

E no topico deste gesior ninguem posta o mesmo erro, dizem que funcionam normalmente, deve ser na minha database ou sei la então :S

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo