Ir para conteúdo
  • Cadastre-se

Website Erro no Guild Shop, e Cast System


Posts Recomendados

Gesior 2012 TFS 0.4;

 

Boaa noite, alguém poderia me tirar uma duvida, to começando agora mexer com otserv.. 

 

o problema e esse.

 

quando clico no Guild Shop, ou no cast system , me encaminha diretamente para essa pagina...

como posso resolver isso.

 

 

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'guild_points' in 'field list'' in C:\xampp\htdocs\pot\OTS_Account.php:774 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Account.php(774): PDO->query('SELECT `guild_p...') #1 C:\xampp\htdocs\guildshop.php(5): OTS_Account->getCustomField('guild_points') #2 C:\xampp\htdocs\index.php(380): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 774

 

 

SEgundo e esse

 

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'viewers' in 'field list'' in C:\xampp\htdocs\cast.php:158 Stack trace: #0 C:\xampp\htdocs\cast.php(158): PDO->query('SELECT name,lev...') #1 C:\xampp\htdocs\index.php(222): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\cast.php on line 158

 

 

769805670_bugshopguild.thumb.png.413aeb2ea8b49b39b1d1f79a90125fa1.png

 

 

Você tem o código disponível? Se tiver publique-o aqui:

 

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.

Bug cast.php.png

Link para o post
Compartilhar em outros sites
24 minutos atrás, aldenes disse:

Gesior 2012 TFS 0.4;

 

Boaa noite, alguém poderia me tirar uma duvida, to começando agora mexer com otserv.. 

 

o problema e esse.

 

quando clico no Guild Shop, ou no cast system , me encaminha diretamente para essa pagina...

como posso resolver isso.

 

 

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'guild_points' in 'field list'' in C:\xampp\htdocs\pot\OTS_Account.php:774 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Account.php(774): PDO->query('SELECT `guild_p...') #1 C:\xampp\htdocs\guildshop.php(5): OTS_Account->getCustomField('guild_points') #2 C:\xampp\htdocs\index.php(380): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 774

 

 

SEgundo e esse

 

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'viewers' in 'field list'' in C:\xampp\htdocs\cast.php:158 Stack trace: #0 C:\xampp\htdocs\cast.php(158): PDO->query('SELECT name,lev...') #1 C:\xampp\htdocs\index.php(222): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\cast.php on line 158

 

 

769805670_bugshopguild.thumb.png.413aeb2ea8b49b39b1d1f79a90125fa1.png

 

 

Você tem o código disponível? Se tiver publique-o aqui:



 

 

Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.

Bug cast.php.png

 

Ali esta falando que esta faltando uma coluna na sua database. Nos dois erros.

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

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

Link para o post
Compartilhar em outros sites
3 minutos atrás, aldenes disse:

como eu coloco uma coluna , Brother.

pode me ajudar.

 

Neste tópico você encontra toda as colunas que você precisa.

 

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

Link para o post
Compartilhar em outros sites
6 minutos atrás, tetheuscunha disse:

Neste tópico você encontra toda as colunas que você precisa.

 

 

Cara Obrigadooooooo

 

Shop Guild eu resolvir mais o outro.. a coluna parece que não tem...

do cast system..

 

Se poder me mandar desse tambem agradecido.

 

Obrigado Rep ae. pela ajuda. 

Link para o post
Compartilhar em outros sites
Spoiler

<?php
$cache_sec = 10;
$info = array(
    0 => array('Mexico', '04/03/2014')
);
 
$id=0;
$text1 = '
<p>Currently This Server is the only with a unique system of broadcasting game in the current time. System is based on an official TibiaCast.</p>
<p>You can enter a live stream by login into the game without entering any account number and password. Just don\'t write anything in those 2 fields and just press enter. A list of all available casts will appear shortly and you choose the one you would like to watch. After login into the cast, you can talk with other audiences and a person that is broadcasting.</p>
<p>To make your own broadcast, you must login to your account and use a command <strong>/cast on</strong>. </p>
<p>Full command list can be found below.</p>
';
$text2 = '
<p><strong>Currently available commands for spectators:</strong><br />
/show - display the amount of currently active spectators<br />
/name - change your name on chat with player and other spectators<br />
/auth - authenticate to an exisiting cast (required with chat proctetion)</p>
 
<p><strong>Available commands for streaming players:</strong><br />
/cast on - enables the stream<br />
/cast off - disables the stream<br />
/cast password {password} - sets a password on the stream<br />
/cast password off - disables the password protection<br />
/cast auth on - enables requirement of authentication on chat<br />
/cast auth off - disables requirement of authentication on chat<br />
/cast kick {name} - kick a spectator from your stream<br />
/cast ban {name} - locks spectator IP from joining your stream<br />
/cast unban {name} - removes banishment lock<br />
/cast bans - shows banished spectators list<br /><br />
/cast mute {name} - mutes selected spectator from chat<br />
/cast unmute {name} - removes mute<br />
/cast mutes - shows muted spectators list<br />
/cast show - displays the amount and nicknames of current spectators<br />
/cast status - displays stream status</p>
';
if(isset($_POST['world'])) {
    $f = null;
    foreach($config['site']['worlds'] as $k => $v)
        if($v == $_POST['world']) {
            $f = true;
            $id = $k;
            break;
        }
    if(!$f)
        $_POST['world'] = $config['site']['worlds'][0];
} else $_POST['world'] = $config['site']['worlds'][0];
 
$order = 'name_asc';
if(isset($_REQUEST['order']) && in_array($_REQUEST['order'], array('name_desc', 'level_asc','level_desc','vocation_asc','vocation_desc')))
    $order = $_REQUEST['order'];
 
if(count($config['site']['worlds']) > 1) {
    $main_content =
'<form action="?subtopic=whoislive" method="post">
    <div class="TableContainer">
        <table class="Table1" cellpadding="0" cellspacing="0">
            <div class="CaptionContainer">
                <div class="CaptionInnerContainer">
                    <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                    <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                    <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
                    <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                    <div class="Text">World Selection</div>
                    <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                    <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
                    <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                    <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                </div>
            </div>
            <tr>
                <td>
                    <div class="InnerTableContainer">
                        <table width="100%">
                            <tr>
                                <td style="vertical-align:middle" class="LabelV150">World Name:</td>
                                <td style="width:170px">
                                    <select size="1" name="world" style="width:165px">';
foreach($config['site']['worlds'] as $v)
    $main_content .= '<option value="'.$v.'"'.($v == $_POST['world'] ? ' selected="selected"' : '').'>'.$v.'</option>';
$main_content .= '
                                    </select>
                                </td>
                                <td style="text-align:left">
                                    <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>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</form><br/>
';
}
$main_content .=
'<div class="TableContainer">
    <table class="Table1" cellpadding="0" cellspacing="0">
        <div class="CaptionContainer">
            <div class="CaptionInnerContainer">
                <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
                <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                <div class="Text">World Information</div>
                <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>
                <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>
                <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
                <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>
            </div>
        </div>
        <tr>
            <td>
                <div class="InnerTableContainer">
                    <table width="100%">
                        <tr>
                            <td class="LabelV150">Status:</td>
                            <td>O'.($config['status']['serverStatus_online'] == 1 ? 'n' : 'ff').'line</td>
                        </tr>
                        <tr>
                            <td class="LabelV150">Players Casting:</td>
                            <td>';
$f = 'cache/whoislive-'.$_POST['world'].'-'.$order.'.tmp';
if(file_exists($f) && filemtime($f) > (time() - $cache_sec)) {
    $cp = file_get_contents($f);
}
else {
    $cp = '';
    $n = 0;
    $q = 'SELECT name,level,vocation,promotion,viewers, looktype, lookbody, looklegs, lookhead, lookfeet, lookaddons FROM players WHERE world_id='.$id.' AND broadcasting=1';
    if(in_array($order, array('name_asc','name_desc','level_asc','level_desc')))
        $q .= ' ORDER BY '.str_replace('_', ' ', $order);
 
    if(in_array($order, array('vocation_asc','vocation_desc'))) {
        $a = array();
        $q .= ' ORDER BY level desc';
        foreach($SQL->query($q)->fetchAll() as $p)
            $a[] = array($p['name'], $p['level'], $vocation_name[$p['promotion']][$p['vocation']], $p['looktype'], $p['lookhead'], $p['lookbody'], $p['looklegs'], $p['lookfeet'], $p['lookaddons'], $p['viewers']);
        function cmp($a, $b) {
            return $a[2][0] == $b[2][0] ? 0 :
                $GLOBALS['order'] == 'vocation_asc'
                    ? ($a[2][0] < $b[2][0] ? -1 : 1)
                    : ($a[2][0] > $b[2][0] ? -1 : 1);
        }
        usort($a, 'cmp');
        foreach($a as $p) {
            $n++;
            $cp .= '<tr class="'.(is_int($n/2)?'Even':'Odd').'" style="text-align:right"><td><img src="outfitter.php?id='.$p[3].'&addons='.$p[8].'&head='.$p[4].'&body='.$p[5].'&legs='.$p[6].'&feet='.$p[7].'" width="64" height="64"/></td><td style="width:70%;text-align:left"><a href="?subtopic=characters&name='.urlencode($p[0]).'">'.$p[0].'</a></td><td style="width:10%">'.$p[1].'</td><td style="width:20%">'.$p[2].'</td><td>'.$p[9].'/50</td></tr>';
        }
    }
    else {
        $l = array();
        foreach($SQL->query($q)->fetchAll() as $p) {
            $n++;
            $cp .= '<tr class="'.(is_int($n/2)?'Even':'Odd').'" style="text-align:right"><td><img src="outfitter.php?id='.$p['looktype'].'&addons='.$p['lookaddons'].'&head='.$p['lookhead'].'&body='.$p['lookbody'].'&legs='.$p['looklegs'].'&feet='.$p['lookfeet'].'" width="64" height="64"/></td><td style="width:70%;text-align:left">';
            if($order == 'name_asc') {
                $tmp = strtoupper($p['name'][0]);
                if(!in_array($tmp, $l)) {
                    $l[] = $tmp;
                    $cp .= '<a name="'.$tmp.'"></a>';
                }
            }
            $cp .= '<a href="?subtopic=characters&name='.urlencode($p['name']).'">'.$p['name'].'</a></td><td style="width:10%">'.$p['level'].'</td><td style="width:20%">'.$vocation_name[$p['promotion']][$p['vocation']].'</td><td>'.$p['viewers'].'/50</td></tr>';
        }
    }
    file_put_contents($f, $cp);
}
$main_content .= $n.'</td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
</div><br/>
'.$text1.'
    <div class="TableContainer">
        <table class="Table2" cellpadding="0" cellspacing="0">  <div class="CaptionContainer">   <div class="CaptionInnerContainer">    <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>    <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>    <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>    <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>    <div class="Text">Players Casting';
if($order == 'name_asc')
    $main_content .= '<span class="TableHeadlineNavigation"> [ <a href="#A">A</a> <a href="#B">B</a> <a href="#C">C</a> <a href="#D">D</a> <a href="#E">E</a> <a href="#F">F</a> <a href="#G">G</a> <a href="#H">H</a> <a href="#I">I</a> <a href="#J">J</a> <a href="#K">K</a> <a href="#L">L</a> <a href="#M">M</a> <a href="#N">N</a> <a href="#O">O</a> <a href="#P">P</a> <a href="#Q">Q</a> <a href="#R">R</a> <a href="#S">S</a> <a href="#T">T</a> <a href="#U">U</a> <a href="#V">V</a> <a href="#W">W</a> <a href="#X">X</a> <a href="#Y">Y</a> <a href="#Z">Z</a> ]</span>';
$main_content .= '</div>    <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>    <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>    <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>    <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>   </div>  </div>  <tr>   <td>    <div class="InnerTableContainer">     <table width="100%"><tr class="LabelH"><td>Outfit</td><td style="text-align:left;width:90%">Name<small style="font-weight:normal">[<a href="?subtopic=whoislive&world='.$_POST['world'].'&order=name_'.($order == 'name_asc' ? 'desc' : 'asc').'">sort</a>]</small> <img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'name_asc' ? 'content/order_desc' : ($order == 'name_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td><td>Level<small style="font-weight:normal">[<a href="?subtopic=whoislive&world='.$_POST['world'].'&order=level_'.($order == 'level_asc' ? 'desc' : 'asc').'">sort</a>]</small> <img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'level_asc' ? 'content/order_desc' : ($order == 'level_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td><td>Vocation<small style="font-weight:normal">[<a href="?subtopic=whoislive&world='.$_POST['world'].'&order=vocation_'.($order == 'vocation_asc' ? 'desc' : 'asc').'">sort</a>]</small> <img class="sortarrow" src="'.$layout_name.'/images/'.($order == 'vocation_asc' ? 'content/order_desc' : ($order == 'vocation_desc' ? 'content/order_asc' : 'news/blank')).'.gif"/></td><td>Spectators</td></tr>'.(strlen($cp) ? $cp : '<tr><td colspan="4" class="Even">There are no players streaming right now.</td></tr>').'     </table>    </div> </table></div></td></tr>'.$text2.'<br/><form action="?subtopic=characters" method="post"><div class="TableContainer"> <table class="Table1" cellpadding="0" cellspacing="0">  <div class="CaptionContainer">   <div class="CaptionInnerContainer">    <span class="CaptionEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>    <span class="CaptionEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>    <span class="CaptionBorderTop" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>    <span class="CaptionVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>    <div class="Text">Search Character</div>    <span class="CaptionVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif)"></span>    <span class="CaptionBorderBottom" style="background-image:url('.$layout_name.'/images/content/table-headline-border.gif)"></span>    <span class="CaptionEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>    <span class="CaptionEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif)"></span>   </div>  </div>  <tr>   <td>    <div class="InnerTableContainer">     <table width="100%"><tr><td style="vertical-align:middle" class="LabelV150">Character Name:</td><td style="width:170px"><input style="width:165px" name="name" value="" size="29" maxlength="29"/></td><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></td></tr>     </table>    </div> </table></div></td></tr></form></center>';
?>

 

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

Testa esse 

 

ALTER TABLE `players` ADD `viewers` INTEGER(11) NOT NULL DEFAULT 0;

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

Link para o post
Compartilhar em outros sites
3 minutos atrás, tetheuscunha disse:

Testa esse 

 


ALTER TABLE `players` ADD `viewers` INTEGER(11) NOT NULL DEFAULT 0;

 

Ainda continua, será que tenho que trocar o cast.php ? 

sé eu trocar e capaz de da buga. 

Link para o post
Compartilhar em outros sites

Vamos mudar teu arquivo de cast.php

<?PHP
$update_interval = 2;
if(count($config['site']['worlds']) > 1)
{
	$worlds .= '<i>Select world:</i> ';
	foreach($config['site']['worlds'] as $id => $world_n)
	{
		$worlds .= ' <a href="?subtopic=livestreams&world='.$id.'">'.$world_n.'</a> , ';
		if($id == (int) $_GET['world'])
		{
			$world_id = $id;
			$world_name = $world_n;
		}
	}
	$main_content .= substr($worlds, 0, strlen($worlds)-3);
}
if(!isset($world_id))
{
	$world_id = 0;
	$world_name = $config['server']['serverName'];
}
// Sorting type
$order = $_REQUEST['order'];
if($order == 'level')
	$orderby = 'level';
elseif($order == 'vocation')
	$orderby = 'vocation';
if(empty($orderby))
	$orderby = 'name';
$tmp_file_name = 'cache/livestreams-'.$orderby.'-'.$world_id.'.tmp';
if(file_exists($tmp_file_name) && filemtime($tmp_file_name) > (time() - $update_interval))
{
	$tmp_file_content = explode(",", file_get_contents($tmp_file_name));
	$number_of_players_online = $tmp_file_content[0];
	$players_rows = $tmp_file_content[1];
}
else
{
	$players_online_data = $SQL->query('SELECT * FROM players WHERE world_id = '.(int) $world_id.' AND stream_status > 0 AND online > 0 ORDER BY '.$orderby);
	$number_of_players_online = 0;
	foreach($players_online_data as $player)
	{
		$number_of_players_online++;
                $acc = $SQL->query('SELECT flag, vip_time FROM '.$SQL->tableName('accounts').' WHERE '.$SQL->fieldName('id').' = '.$player['account_id'].' LIMIT 1;')->fetch();
		if(is_int($number_of_players_online / 2))
			$bgcolor = $config['site']['darkborder'];
		else
			$bgcolor = $config['site']['lightborder'];
		
		$skull = '';
		if($config['site']['show_skull']) {
			if ($player['skulltime'] > 0 && $player['skull'] == 3)
					$skull = '<right><image src="./images/whiteskull.gif"/></right>';
			elseif ($player['skulltime'] =  $player['skull'] == 4)
					$skull = '<right><image src="./images/redskull.gif"/></right>';
			elseif ($player['skulltime'] =  $player['skull'] == 5)
					$skull = '<right><image src="./images/blackskull.gif"/></right>';
		}
		$players_outfit_row = '';
		if($config['site']['show_outfit'])
			$players_outfit_row .= '<TD ALIGN="right">'.$skull.'<center><image src="'.getOutfitLink($player['id']).'"/></center></TD>';
		$players_rows .= '
		<TR BGCOLOR='.$bgcolor.'>
			<TD><center><image src="images/flags/'.$acc['flag'].'.png"/></center></TD>
			'.$players_outfit_row.'
			<TD><A HREF="?subtopic=characters&name='.$player['name'].'">'.$player['name'].'</A></TD>
			<TD>'.$player['stream_desc'].'</TD>
			<TD>'.$player['level'].'</TD>
			<TD>'.$vocation_name[$world_id][$player['promotion']][$player['vocation']].'</TD>
			<TD>'.($acc['vip_time'] > 0 ? '<font color="green"><b>VIP</b></font>' : '<font color="red"><b>NO</b></font></TD>').'
		</TR>';
	}
	file_put_contents($tmp_file_name, $number_of_players_online.','.$players_rows);
}

if($number_of_players_online == 0)
	//server status - server empty
	$main_content .= '
	<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
		<TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR>
		<TR BGCOLOR='.$config['site']['darkborder'].'>
			<TD>
				<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1>
					<TR><TD>There are no players streaming right now on <b>'.$config['site']['worlds'][$world_id].'</b>.</TD></TR>
				</TABLE>
			</TD>
		</TR>
	</TABLE>
	<BR>';
else
{
//Vocations pics
$vocs = array();
foreach($SQL->query('SELECT `vocation`, COUNT(`id`) AS `count` FROM `players` WHERE `world_id` = "'.$world_id.'" AND `online` > 0 GROUP BY `vocation`') as $entry)
	  $vocs[$entry['vocation']] = $entry['count'];


$main_content .= '
<div class="TableContainer" > 
	<table class="Table1" cellpadding="0" cellspacing="0" >
		<div class="CaptionContainer" >
			<div class="CaptionInnerContainer" >
				<span class="CaptionEdgeLeftTop" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-edge.gif);" /></span>
				<span class="CaptionEdgeRightTop" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-edge.gif);" /></span>
				<span class="CaptionBorderTop" style="background-image:url(http://static.tibia.com/images/global/content/table-headline-border.gif);" ></span>
				<span class="CaptionVerticalLeft" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-vertical.gif);" /></span>
				<div class="Text" >World Information</div>
					<span class="CaptionVerticalRight" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-vertical.gif);" /></span>
					<span class="CaptionBorderBottom" style="background-image:url(http://static.tibia.com/images/global/content/table-headline-border.gif);" ></span>
					<span class="CaptionEdgeLeftBottom" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-edge.gif);" /></span>
					<span class="CaptionEdgeRightBottom" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-edge.gif);" /></span>
				</div>
			</div>
		<tr>
			<td>
				<div class="InnerTableContainer" >
					<table style="width:100%;" >
						<tr>
							<td class="LabelV150" ><b>Status:</b></td>
							<td>Online</td></tr><tr><td class="LabelV150" ><b>Live Streams:</b></td>
							<td>'.$number_of_players_online.'</td></tr><tr><td class="LabelV150" ><b>Creation Date:</b></td>
							<td>30/11/2010</td></tr>
						<tr><td class="LabelV150" ><b>Location:</b></td><td>Brazil</td></tr>
						<tr><td class="LabelV150" ><b>PvP Type:</b></td><td>Open PvP</td></tr>
						<tr>
							<td class="LabelV150" ><b>World Quest Titles:</b></td>
							<td><a href="?subtopic=lightbearer">Lightbearer</a></td>
						</tr>         
					</table>        
				</div>  
			</td>
		</tr>
	</table>
</div>
<br>';
	

	
//list of players
$width_name = 35;
if($config['site']['show_outfit']) {
	$players_outfit_row = '<TD WIDTH=5%><a href="" CLASS=white >Outfit</a></TD>';
	$width_name = 30;
}
$main_content .= '
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
	<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
		<TD WIDTH=5%><a href="" CLASS=white >Country</a></TD>
		'.$players_outfit_row.'
		<TD WIDTH='.width_name.'%><A HREF="?subtopic=livestreams&order=name&world='.$world_id.'" CLASS=white>Name</A></TD>
		<TD WIDTH=40%><A HREF="?subtopic=livestreams&order=stream_desc&world='.$world_id.'" CLASS=white>Stream Description</A></TD>
		<TD WIDTH=5%><A HREF="?subtopic=livestreams&order=level&world='.$world_id.'" CLASS=white>Level</A></TD>
		<TD WIDTH=10%><A HREF="?subtopic=livestreams&order=vocation&world='.$world_id.'" CLASS=white>Vocation</TD>
		<TD WIDTH="5%><a href="" CLASS=white >VIP</a></TD></TR>'.$players_rows.'</TABLE>';
//search bar
$main_content .= '
<BR>
<FORM ACTION="?subtopic=characters" METHOD=post>  
	<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
		<TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR>
		<TR>
			<TD BGCOLOR="'.$config['site']['darkborder'].'">
				<TABLE BORDER=0 CELLPADDING=1>
					<TR>
						<TD>Name:</TD>
						<TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD>
						<TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD>
					</TR>
				</TABLE>
			</TD>
		</TR>
	</TABLE>
</FORM>';
}
?>

 

ALTER TABLE  `players` ADD  `cast` TINYINT NOT NULL DEFAULT  '0',
ADD  `castViewers` INT( 11 ) NOT NULL DEFAULT  '0',
ADD  `castDescription` VARCHAR( 255 ) NOT NULL

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

Link para o post
Compartilhar em outros sites
5 minutos atrás, tetheuscunha disse:

Vamos mudar teu arquivo de cast.php


<?PHP
$update_interval = 2;
if(count($config['site']['worlds']) > 1)
{
	$worlds .= '<i>Select world:</i> ';
	foreach($config['site']['worlds'] as $id => $world_n)
	{
		$worlds .= ' <a href="?subtopic=livestreams&world='.$id.'">'.$world_n.'</a> , ';
		if($id == (int) $_GET['world'])
		{
			$world_id = $id;
			$world_name = $world_n;
		}
	}
	$main_content .= substr($worlds, 0, strlen($worlds)-3);
}
if(!isset($world_id))
{
	$world_id = 0;
	$world_name = $config['server']['serverName'];
}
// Sorting type
$order = $_REQUEST['order'];
if($order == 'level')
	$orderby = 'level';
elseif($order == 'vocation')
	$orderby = 'vocation';
if(empty($orderby))
	$orderby = 'name';
$tmp_file_name = 'cache/livestreams-'.$orderby.'-'.$world_id.'.tmp';
if(file_exists($tmp_file_name) && filemtime($tmp_file_name) > (time() - $update_interval))
{
	$tmp_file_content = explode(",", file_get_contents($tmp_file_name));
	$number_of_players_online = $tmp_file_content[0];
	$players_rows = $tmp_file_content[1];
}
else
{
	$players_online_data = $SQL->query('SELECT * FROM players WHERE world_id = '.(int) $world_id.' AND stream_status > 0 AND online > 0 ORDER BY '.$orderby);
	$number_of_players_online = 0;
	foreach($players_online_data as $player)
	{
		$number_of_players_online++;
                $acc = $SQL->query('SELECT flag, vip_time FROM '.$SQL->tableName('accounts').' WHERE '.$SQL->fieldName('id').' = '.$player['account_id'].' LIMIT 1;')->fetch();
		if(is_int($number_of_players_online / 2))
			$bgcolor = $config['site']['darkborder'];
		else
			$bgcolor = $config['site']['lightborder'];
		
		$skull = '';
		if($config['site']['show_skull']) {
			if ($player['skulltime'] > 0 && $player['skull'] == 3)
					$skull = '<right><image src="./images/whiteskull.gif"/></right>';
			elseif ($player['skulltime'] =  $player['skull'] == 4)
					$skull = '<right><image src="./images/redskull.gif"/></right>';
			elseif ($player['skulltime'] =  $player['skull'] == 5)
					$skull = '<right><image src="./images/blackskull.gif"/></right>';
		}
		$players_outfit_row = '';
		if($config['site']['show_outfit'])
			$players_outfit_row .= '<TD ALIGN="right">'.$skull.'<center><image src="'.getOutfitLink($player['id']).'"/></center></TD>';
		$players_rows .= '
		<TR BGCOLOR='.$bgcolor.'>
			<TD><center><image src="images/flags/'.$acc['flag'].'.png"/></center></TD>
			'.$players_outfit_row.'
			<TD><A HREF="?subtopic=characters&name='.$player['name'].'">'.$player['name'].'</A></TD>
			<TD>'.$player['stream_desc'].'</TD>
			<TD>'.$player['level'].'</TD>
			<TD>'.$vocation_name[$world_id][$player['promotion']][$player['vocation']].'</TD>
			<TD>'.($acc['vip_time'] > 0 ? '<font color="green"><b>VIP</b></font>' : '<font color="red"><b>NO</b></font></TD>').'
		</TR>';
	}
	file_put_contents($tmp_file_name, $number_of_players_online.','.$players_rows);
}

if($number_of_players_online == 0)
	//server status - server empty
	$main_content .= '
	<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
		<TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Server Status</B></TD></TR>
		<TR BGCOLOR='.$config['site']['darkborder'].'>
			<TD>
				<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1>
					<TR><TD>There are no players streaming right now on <b>'.$config['site']['worlds'][$world_id].'</b>.</TD></TR>
				</TABLE>
			</TD>
		</TR>
	</TABLE>
	<BR>';
else
{
//Vocations pics
$vocs = array();
foreach($SQL->query('SELECT `vocation`, COUNT(`id`) AS `count` FROM `players` WHERE `world_id` = "'.$world_id.'" AND `online` > 0 GROUP BY `vocation`') as $entry)
	  $vocs[$entry['vocation']] = $entry['count'];


$main_content .= '
<div class="TableContainer" > 
	<table class="Table1" cellpadding="0" cellspacing="0" >
		<div class="CaptionContainer" >
			<div class="CaptionInnerContainer" >
				<span class="CaptionEdgeLeftTop" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-edge.gif);" /></span>
				<span class="CaptionEdgeRightTop" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-edge.gif);" /></span>
				<span class="CaptionBorderTop" style="background-image:url(http://static.tibia.com/images/global/content/table-headline-border.gif);" ></span>
				<span class="CaptionVerticalLeft" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-vertical.gif);" /></span>
				<div class="Text" >World Information</div>
					<span class="CaptionVerticalRight" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-vertical.gif);" /></span>
					<span class="CaptionBorderBottom" style="background-image:url(http://static.tibia.com/images/global/content/table-headline-border.gif);" ></span>
					<span class="CaptionEdgeLeftBottom" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-edge.gif);" /></span>
					<span class="CaptionEdgeRightBottom" style="background-image:url(http://static.tibia.com/images/global/content/box-frame-edge.gif);" /></span>
				</div>
			</div>
		<tr>
			<td>
				<div class="InnerTableContainer" >
					<table style="width:100%;" >
						<tr>
							<td class="LabelV150" ><b>Status:</b></td>
							<td>Online</td></tr><tr><td class="LabelV150" ><b>Live Streams:</b></td>
							<td>'.$number_of_players_online.'</td></tr><tr><td class="LabelV150" ><b>Creation Date:</b></td>
							<td>30/11/2010</td></tr>
						<tr><td class="LabelV150" ><b>Location:</b></td><td>Brazil</td></tr>
						<tr><td class="LabelV150" ><b>PvP Type:</b></td><td>Open PvP</td></tr>
						<tr>
							<td class="LabelV150" ><b>World Quest Titles:</b></td>
							<td><a href="?subtopic=lightbearer">Lightbearer</a></td>
						</tr>         
					</table>        
				</div>  
			</td>
		</tr>
	</table>
</div>
<br>';
	

	
//list of players
$width_name = 35;
if($config['site']['show_outfit']) {
	$players_outfit_row = '<TD WIDTH=5%><a href="" CLASS=white >Outfit</a></TD>';
	$width_name = 30;
}
$main_content .= '
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
	<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
		<TD WIDTH=5%><a href="" CLASS=white >Country</a></TD>
		'.$players_outfit_row.'
		<TD WIDTH='.width_name.'%><A HREF="?subtopic=livestreams&order=name&world='.$world_id.'" CLASS=white>Name</A></TD>
		<TD WIDTH=40%><A HREF="?subtopic=livestreams&order=stream_desc&world='.$world_id.'" CLASS=white>Stream Description</A></TD>
		<TD WIDTH=5%><A HREF="?subtopic=livestreams&order=level&world='.$world_id.'" CLASS=white>Level</A></TD>
		<TD WIDTH=10%><A HREF="?subtopic=livestreams&order=vocation&world='.$world_id.'" CLASS=white>Vocation</TD>
		<TD WIDTH="5%><a href="" CLASS=white >VIP</a></TD></TR>'.$players_rows.'</TABLE>';
//search bar
$main_content .= '
<BR>
<FORM ACTION="?subtopic=characters" METHOD=post>  
	<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4>
		<TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR>
		<TR>
			<TD BGCOLOR="'.$config['site']['darkborder'].'">
				<TABLE BORDER=0 CELLPADDING=1>
					<TR>
						<TD>Name:</TD>
						<TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD>
						<TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD>
					</TR>
				</TABLE>
			</TD>
		</TR>
	</TABLE>
</FORM>';
}
?>

 


ALTER TABLE  `players` ADD  `cast` TINYINT NOT NULL DEFAULT  '0',
ADD  `castViewers` INT( 11 ) NOT NULL DEFAULT  '0',
ADD  `castDescription` VARCHAR( 255 ) NOT NULL

 

fiz oque pediu , agora apareceu isso ae. 

 

Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\cast.php on line 8

 

Link para o post
Compartilhar em outros sites

procura no arquivo a linha 8, vai ter isso la 

        $worlds .= ' <a href="?subtopic=livestreams&?world='.$id.'">'.$world_n.'</a> , ';

 

remove o "?" entre &?world

Senhoras e senhores, se alguma resposta lhe ajudou, marque-a como a melhor resposta e de ponto positivo, assim você incentiva quem lhe ajudou a continuar ajudando!!.

Link para o post
Compartilhar em outros sites
5 minutos atrás, tetheuscunha disse:

procura no arquivo a linha 8, vai ter isso la 

        $worlds .= ' <a href="?subtopic=livestreams&?world='.$id.'">'.$world_n.'</a> , ';

 

remove o "?" entre &?world

 

        $worlds .= ' <a href="?subtopic=livestreams&world='.$id.'">'.$world_n.'</a> , ';
        if($id == (int) $_GET['world'])

 

parece que não tem ...

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 Andersontatuador
      .Qual servidor ou website você utiliza como base? 
      Global Full 8.60 + Zao
      Qual o motivo deste tópico? 
      O site não esta adicionando os pontos na conta dos plays.
       
      Está surgindo algum erro? Se sim coloque-o aqui. 
       
      Você tem o código disponível? Se tiver publique-o aqui: 
         
      Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 
       



    • Por A.Mokk
      .Qual servidor ou website você utiliza como base? 
      TFS 0.4
      Qual o motivo deste tópico? 
      Estou tendo um probleminha indelicado no meu site, gostaria de obter respostas aqui com voces que sao sempre muito eficientes e praticos.
      Está surgindo algum erro? Se sim coloque-o aqui. 
       
       
    • Por thunmin
      .Qual servidor ou website você utiliza como base? 
      Canary
      Qual o motivo deste tópico? 
      Não consigo deixar ele automatico os players tem que confirmar o pagamento depois eu tenho que verificar se caiu pra depois eu confirmar e colocar as coins
      Está surgindo algum erro? Se sim coloque-o aqui. 
       
      Você tem o código disponível? Se tiver publique-o aqui: 
         
      Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui. 
       
    • Por Jordan422
      Faala Deuses do Tibia! Estou com um projeto sólido de um global old, mas to preso nessa parte do website viu.. Eu dou meu jeitinho mas ta chegando nas coisas avançadas que precisa daquele freelancer bacana para ajeitar umas páginas para mim! Já tenho as ideias, basta somente botar a mão na massa.. Quem estiver interessado por favor entrar em contato por mensagem aqui no Tibiaking mesmo ou preferencialmente pelo discord mythh9257 
       
    • Por moleza
      Para quem quer abrir um servidor antigo que roda em php5 e está com dificuldade com a configuração do linux, pode contratar um cpanel que contenha o php5 que facilita a configuração do site!!
       
      essa foi a minha solução!
       
      Resolvido !!
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo