Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Olá, Gostaria de uma ajudinha malandra aq 

to tentando abrir um global e so falta arrumar o site mas ta dando esse erro aq :(((

Oq eu tenho q fazer? +rep pela melhor resposta

olha ai a imagem ç-ç (obs: sou novo no TK :P o post deve ta meio noob)

 

 

post-142654-0-24943000-1436889428_thumb.

Link para o post
Compartilhar em outros sites

você tem que configurar o diretório do seu server  vai onde ta seu site e vai na pasta config/config.php abra ele e caça isso  $config['site']['serverPath'] =

 

ai você coloca qual diretório ta seu servidor exemplo C:/pasta1/     << usa a barra assim /  e não assim \

Editado por JonatasLucasf (veja o histórico de edições)

ca.png?1422745283

 

CONQUISTASdesigner-king.png   Designer.png    

 

Link para o post
Compartilhar em outros sites

você tem que configurar o diretório do seu server  vai onde ta seu site e vai na pasta config/config.php abra ele e caça isso  $config['site']['serverPath'] =

 

ai você coloca qual diretório ta seu servidor exemplo C:/pasta1/     << usa a barra assim /  e não assim \

Fiz isso mas veio outro erro :( 

 

   Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\pages\latestnews.php on line 269

Fatal error: Call to a member function fetchAll() on a non-object in C:\xampp\htdocs\pages\latestnews.php on line 303

Link para o post
Compartilhar em outros sites

Fiz isso mas veio outro erro :(

 

   Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\pages\latestnews.php on line 269

Fatal error: Call to a member function fetchAll() on a non-object in C:\xampp\htdocs\pages\latestnews.php on line 303

 

Mas o site abriu?

Ajudei? Clica em Gostei!

 

Da um like ae!

https://www.facebook.com/nosegangserver

 

 

 

Link para o post
Compartilhar em outros sites

 

Mas o site abriu?

Não :/

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

Não :/

 

Isso acontece quando o xamp e o gesior nao sao compativeis. Pode acontecer também quando a database não é compativel com o gesior.

Ajudei? Clica em Gostei!

 

Da um like ae!

https://www.facebook.com/nosegangserver

 

 

 

Link para o post
Compartilhar em outros sites
  • 3 weeks later...

tente trocar seu lastenews, ou baixe uma versão mais atualizada do gesior. Dependendo da versão do seu tfs, se for 1.0 + baixe o 2012. 

Link para o post
Compartilhar em outros sites

Só colocar isso no lugar do seu arquivo da sua latest news!

div id="LayerPop" style="display:block; position:absolute; left:0px; top:-520px;"></div>

<div id="LayerPop2" align="center" style="position: absolute; top:-520px; margin:auto; padding:auto; width: 100%; z-index: 5000;"><a href="?subtopic=buypoints" target="_BLANK"><img src="promo.jpg" class="imgBorder"></a><BR /><input type="button" name="fechar" value="FECHAR" onclick="document.getElementById('LayerPop').style.display = 'none';document.getElementById('LayerPop2').style.display = 'none'" style="font-family: Verdana; font-weight: bold; font-size:10px; color: #FFFFFF; background-color: #000000; border: 1px solid #fffff;"></div>

<?PHP header("Content-Type: text/html; charset=ISO-8859-1",true);

date_default_timezone_set('America/Sao_Paulo');

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

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();

$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="/images/head/News Ticker.png" 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_admin_panel']) {

$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_admin_panel']) {

header("Location: ");

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

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

}

$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

//featured article

//sem creditos do autor, apenas postado por Dhenyz Shady no X-tibia.

$news_content .= '

<div id="news" 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(layouts/tibiacom/images/content/title-background-green.gif);"></div>

<img class="Title" src="/images/head/Featured Article.png" alt="Contentbox headline" />

<div class="Border_2">

<div class="Border_3">

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

<div id=\'TeaserThumbnail\'><img src="layouts/tibiacom/images/news/topitems.jpg" width=275 height=200 border=0 alt="" ALIGN=right hspace="10" /></div>

<div id=\'TeaserText\'>

<div style="position: relative; top: -9px; margin-bottom: 10px;"></br>

<b><font size="5px"><center><b><font style="text-decoration: inherit; text-shadow:#000 1px -1px 2px, #000 -1px 1px 2px, #000 1px 1px 2px, #000 -1px -1px 2px" size="1px" color="white">| IP: <font color="#00FF00">www.arenatibia.com</font> / Port: <font color="#00FF00">7171</font> / Client: <font color="#00FF00">10.53</font> |</b></font></center><br></b><font size="2px">Seja bem vindo ao <b><font color="green">ArenaTibia</font></b>, servidor feito especialmente para jogadores que gostam de um hard up. Oferecemos quests, outfits e miss&otilde;es 99% igual ao do global (n&atilde;o damos 100% de certeza pois pode ser que esteja faltando algo, e isto ser&aacute; corrigido com o tempo).<br><br><br><br>

</font> </div>

</div>

</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>

';

//Fim do featured Article

//adding news

if($action == "newnews") {

if($group_id_of_acc_logged >= $config['site]['access_admin_panel']) {

$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_admin_panel'] && $action != 'newnews')

{

$main_content .= '

<font style=font-size: 16px; font-weight: bold; margin-left: 20px;">New News</font>

<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">

<tr bgcolor="F1E0C6">

<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 bgcolor="D4C0A1">

<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></td></tr>

</table>

<hr/>';

}

///show news

$announcements = $SQL->query("SELECT id, title, text, date, author FROM announcements ORDER BY date DESC LIMIT 1");

foreach ($announcements as $announcementsRow){

$news_content .= '<div id="featuredarticle" 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="montaimg.php?text=Announcement" alt="Contentbox headline" />

<div class="Border_2">

<div class="Border_3">

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

<div id="TeaserThumbnail"><img src="images/news/announcement.jpg" width="150" height="100" border="0" alt="" /></div>

<div id="TeaserText">

<div style="position: relative; margin-bottom: 2px;" >

<div style="font-size:18px; font-weight:bold;">'.$announcementsRow['title].'</div>

</div>

'.$announcementsRow['text'].'

<br />

<br />

<small style=float: right;">Posted by <font color="red">'.$announcementsRow['author].'</font> - '.date("d M Y", $announcementsRow['date']).'</small>';

if ($logged)if ($account_logged->getCustomField("page_access") > 6 ){ $news_content .=<input type="button" value="Deletar" OnClick="location.href=\'index.php?subtopic=cpanel&action=deletar_ann&id='.$announcementsRow['id].'\'" />';}

$news_content .='

</div>

</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>

';

}

//

$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 6;");

foreach ($zapytanie as $row)

{

$BB = array(

'/\[youtube\](.*?)\[\/youtube\]/is' => '<center><object width=500" height="405"><param name="movie" value="<div class="NewsHeadline">

<img class="Title" src="/images/head/Latest News.png" alt="Contentbox headline" />

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

}

?>

Editado por filipez (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 4 months later...
Em 01/08/2015 12:26:34, filipez disse:

Só colocar isso no lugar do seu arquivo da sua latest news!

div id="LayerPop" style="display:block; position:absolute; left:0px; top:-520px;"></div>

<div id="LayerPop2" align="center" style="position: absolute; top:-520px; margin:auto; padding:auto; width: 100%; z-index: 5000;"><a href="?subtopic=buypoints" target="_BLANK"><img src="promo.jpg" class="imgBorder"></a><BR /><input type="button" name="fechar" value="FECHAR" onclick="document.getElementById('LayerPop').style.display = 'none';document.getElementById('LayerPop2').style.display = 'none'" style="font-family: Verdana; font-weight: bold; font-size:10px; color: #FFFFFF; background-color: #000000; border: 1px solid #fffff;"></div>

<?PHP header("Content-Type: text/html; charset=ISO-8859-1",true);

date_default_timezone_set('America/Sao_Paulo');

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

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();

$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="/images/head/News Ticker.png" 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_admin_panel']) {

$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_admin_panel']) {

header("Location: ");

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

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

}

$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

//featured article

//sem creditos do autor, apenas postado por Dhenyz Shady no X-tibia.

 

$news_content .= '

<div id="news" 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(layouts/tibiacom/images/content/title-background-green.gif);"></div>

<img class="Title" src="/images/head/Featured Article.png" alt="Contentbox headline" />

<div class="Border_2">

<div class="Border_3">

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

<div id=\'TeaserThumbnail\'><img src="layouts/tibiacom/images/news/topitems.jpg" width=275 height=200 border=0 alt="" ALIGN=right hspace="10" /></div>

<div id=\'TeaserText\'>

<div style="position: relative; top: -9px; margin-bottom: 10px;"></br>

<b><font size="5px"><center><b><font style="text-decoration: inherit; text-shadow:#000 1px -1px 2px, #000 -1px 1px 2px, #000 1px 1px 2px, #000 -1px -1px 2px" size="1px" color="white">| IP: <font color="#00FF00">www.arenatibia.com</font> / Port: <font color="#00FF00">7171</font> / Client: <font color="#00FF00">10.53</font> |</b></font></center><br></b><font size="2px">Seja bem vindo ao <b><font color="green">ArenaTibia</font></b>, servidor feito especialmente para jogadores que gostam de um hard up. Oferecemos quests, outfits e miss&otilde;es 99% igual ao do global (n&atilde;o damos 100% de certeza pois pode ser que esteja faltando algo, e isto ser&aacute; corrigido com o tempo).<br><br><br><br>

</font> </div>

</div>

</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>

';

//Fim do featured Article

//adding news

if($action == "newnews") {

if($group_id_of_acc_logged >= $config['site]['access_admin_panel']) {

$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_admin_panel'] && $action != 'newnews')

{

 

$main_content .= '

<font style=font-size: 16px; font-weight: bold; margin-left: 20px;">New News</font>

<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">

<tr bgcolor="F1E0C6">

<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 bgcolor="D4C0A1">

<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></td></tr>

</table>

<hr/>';

}

///show news

$announcements = $SQL->query("SELECT id, title, text, date, author FROM announcements ORDER BY date DESC LIMIT 1");

foreach ($announcements as $announcementsRow){

$news_content .= '<div id="featuredarticle" 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="montaimg.php?text=Announcement" alt="Contentbox headline" />

<div class="Border_2">

<div class="Border_3">

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

<div id="TeaserThumbnail"><img src="images/news/announcement.jpg" width="150" height="100" border="0" alt="" /></div>

<div id="TeaserText">

<div style="position: relative; margin-bottom: 2px;" >

<div style="font-size:18px; font-weight:bold;">'.$announcementsRow['title].'</div>

</div>

'.$announcementsRow['text'].'

<br />

<br />

<small style=float: right;">Posted by <font color="red">'.$announcementsRow['author].'</font> - '.date("d M Y", $announcementsRow['date']).'</small>';

if ($logged)if ($account_logged->getCustomField("page_access") > 6 ){ $news_content .=<input type="button" value="Deletar" OnClick="location.href=\'index.php?subtopic=cpanel&action=deletar_ann&id='.$announcementsRow['id].'\'" />';}

$news_content .='

</div>

</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>

';

}

 

//

$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 6;");

foreach ($zapytanie as $row)

{

$BB = array(

'/\[youtube\](.*?)\[\/youtube\]/is' => '<center><object width=500" height="405"><param name="movie" value="<div class="NewsHeadline">

<img class="Title" src="/images/head/Latest News.png" alt="Contentbox headline" />

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

 

}

?>

 

 

 

Ei estou com o mesmo problema.. após eu substituir por essa deu esse erro..  Parse error: syntax error, unexpected '/' in C:\xampp\htdocs\pages\latestnews.php on line 13

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.

  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo