Jump to content
Sign in to follow this  
RagnaWarrior

problema com CP V6

Recommended Posts

instalei a CP V6 que esta disponibilizada para download, mas na pagina de criar a conta esta dando a seguinte mensagem: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/erikoter/public_html/cp/account.php:13) in /home/erikoter/public_html/cp/account.php on line 39

alguem sabe oque poderia ser ?

obg

Share this post


Link to post
Share on other sites

instalei a CP V6 que esta disponibilizada para download, mas na pagina de criar a conta esta dando a seguinte mensagem: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/erikoter/public_html/cp/account.php:13) in /home/erikoter/public_html/cp/account.php on line 39

alguem sabe oque poderia ser ?

obg

copia o codigo do arquivo account.php e cola aqui '-'

ou vai no arquivo account.php e tenta resolver, esse erro causa por ja estar chamando muito a funçao session, vai na linha 39 veja se tem algum codigo session na frente deste codigo voce coloca um @ , veja se resolve

Edited by b00ld

Share this post


Link to post
Share on other sites

aqui o codigo.

<!DOCTYPE html>

<html>

<head>

<title>REGISTRO</title>

<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"/>

<link rel="stylesheet" href="style.css" type="text/css" />

</body>

</html>

</head>

<body><center><a href="registrando.html" target="_blank" onclick="window.open(this.href, this.target, 'width=354,height=379,top=230,left=450'); return false;"><img src="img/tuto.png"></a>

<?php

/*

Ceres Control Panel

This is a control pannel program for Athena and Freya

Copyright © 2005 by Beowulf and Nightroad

This program is free software; you can redistribute it and/or

modify it under the terms of the GNU General Public License

as published by the Free Software Foundation; either version 2

of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software

Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

To contact any of the authors about special permissions send

an e-mail to cerescp@gmail.com

*/

session_start();

include_once 'config.php'; // loads config variables

include_once 'query.php'; // imports queries

include_once 'functions.php';

if ($CONFIG_disable_account || check_ban())

redir("motd.php", "main_div", "Disabled");

if ($CONFIG_max_accounts) {

$query = sprintf(MAX_ACCOUNTS);

$result = execute_query($query, 'account.php');

$maxaccounts = $result->fetch_row();

if ($maxaccounts[0] >= $CONFIG_max_accounts)

redir("motd.php", "main_div", $lang['ACCOUNT_MAX_REACHED']);

}

if (isset($POST_opt)) {

if ($POST_opt == 1 && isset($POST_frm_name) && !strcmp($POST_frm_name, "account")) {

$session = $_SESSION[$CONFIG_name.'sessioncode'];

if ($CONFIG_auth_image && function_exists("gd_info")

&& strtoupper($POST_code) != substr(strtoupper(md5("Mytext".$session['account'])), 0,6))

alert($lang['INCORRECT_CODE']);

if (inject($POST_username) || inject($POST_password) || inject($POST_email))

alert($lang['INCORRECT_CHARACTER']);

if (strlen(trim($POST_username)) < 4 || strlen(trim($POST_username)) > 23)

alert($lang['USERNAME_LENGTH']);

if ($CONFIG_safe_pass && (strlen(trim($POST_password)) < 6 || strlen(trim($POST_password)) > 23))

alert($lang['PASSWORD_LENGTH']);

if (strlen(trim($POST_password)) < 4 || strlen(trim($POST_password)) > 23)

alert($lang['PASSWORD_LENGTH_OLD']);

if (!strcmp($POST_password, $POST_username)) // passwords e username iguais

alert($lang['PASSWORD_REJECTED']);

if (strcmp($POST_password, $POST_confirm))

alert($lang['PASSWORD_NOT_MATCH']);

if ($CONFIG_safe_pass && thepass(trim($POST_password)))

alert($lang['PASSWORD_REJECTED']);

if (strlen($POST_email) < 7 || !strstr($POST_email, '@') || !strstr($POST_email, '.'))

alert($lang['EMAIL_NEEDED']);

$query = sprintf(CHECK_USERID, trim($POST_username));

$result = execute_query($query, 'account.php');

if ($result->count())

alert($lang['USERNAME_IN_USE']);

if ($POST_sex)

$POST_sex = 'F';

else

$POST_sex = 'M';

if ($CONFIG_md5_pass)

$POST_password = md5($POST_password);

$query = sprintf(INSERT_CHAR, trim($POST_username), trim($POST_password), $POST_sex, $POST_email, $_SERVER['REMOTE_ADDR']);

$result = execute_query($query, 'account.php');

$query = sprintf(CHECK_ACCOUNTID, trim($POST_username), trim($POST_password));

$result = execute_query($query, 'account.php');

if ($line = $result->fetch_row()) {

erro_de_login(1);

redir("motd.php", "main_div", $lang['ACCOUNT_CREATED']);

} else {

erro_de_login(1);

redir("motd.php", "main_div", $lang['ACCOUNT_PROBLEM']);

}

}

}

if (isset($_SESSION[$CONFIG_name.'sessioncode']))

$session = $_SESSION[$CONFIG_name.'sessioncode'];

$session['account'] = rand(12345, 99999);

$_SESSION[$CONFIG_name.'sessioncode'] = $session;

$var = rand(10, 9999999);

echo "<center>

<form id=\"account\" onsubmit=\"return POST_ajax('account.php','main_div','account');\"><table>

<tr><td align=\"right\">".$lang['USERNAME'].":</td><td align=\"left\">

<input type=\"text\" name=\"username\" maxlength=\"223\" class=\"textfield\" width=\"202\" size=\"230\" onkeypress=\"return force(this.name,this.form.id,event);\">

</td></tr>

<tr><td align=\"right\">".$lang['PASSWORD'].":</td><td align=\"left\">

<input type=password name=\"password\" maxlength=\"23\"class=\"textfield\" size=\"230\" onkeypress=\"return force(this.name,this.form.id,event);\">

</td></tr>

<tr><td align=\"right\" width=\"20\">".$lang['CONFIRM'].":</td><td align=\"left\">

<input type=password name=\"confirm\" maxlength=\"23\" class=\"textfield\" size=\"230\" onkeypress=\"return force(this.name,this.form.id,event);\">

</td></tr>

<tr><td align=\"right\">".$lang['SEX'].":</td><td align=\"left\">

<select name=\"sex\" onkeypress=\"return force(this.name,this.form.id,event);\">

<option value=\"0\">".$lang['SEX_MALE']."<option value=\"1\">".$lang['SEX_FEMALE']."</select></td></tr>

<tr><td align=\"right\">".$lang['MAIL'].":</td><td align=\"left\">

<input type=\"text\" name=\"email\" maxlength=\"401\" size=\"40\"class=\"textfield\" onkeypress=\"return force(this.name,this.form.id,event);\">

<input type=\"hidden\" name=\"opt\" value=\"1\"></td></tr>

<input type=\"hidden\" name=\"ipaddress\" value=\"".$_SERVER['REMOTE_ADDR']."\">";

if ($CONFIG_auth_image && function_exists("gd_info")) {

echo "<tr><td></td><td align=left><img src=\"img.php?img=account&var=$var\" alt=\"".$lang['SECURITY_CODE']."\">

</td></tr><tr><td align=right>".$lang['CODE'].":</td>

<td align=\"left\">

<input type=\"text\" name=\"code\" maxlength=\"6\" size=\"6\" class=\"textfield\" onkeypress=\"return force(this.name,this.form.id,event);\">

 </td></tr>";

}

echo "

<tr align=\"right\"><td > </td><td><input type=\"submit\"class=\"textfield\" name=\"create\" value=\"Registrar\"></td></tr>

</table></form>

";

closetable();

?>

</body>

</html>

Share this post


Link to post
Share on other sites

Testa ae '-'

<!DOCTYPE html>

<html>

<head>

<title>REGISTRO</title>

<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"/>

<link rel="stylesheet" href="style.css" type="text/css" />

</body>

</html>

</head>

<body><center><a href="registrando.html" target="_blank" onclick="window.open(this.href, this.target, 'width=354,height=379,top=230,left=450'); return false;"><img src="img/tuto.png"></a>

<?php

/*

Ceres Control Panel

This is a control pannel program for Athena and Freya

Copyright © 2005 by Beowulf and Nightroad

This program is free software; you can redistribute it and/or

modify it under the terms of the GNU General Public License

as published by the Free Software Foundation; either version 2

of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

GNU General Public License for more details.

You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software

Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

To contact any of the authors about special permissions send

an e-mail to cerescp@gmail.com

*/

@session_start();

include_once 'config.php'; // loads config variables

include_once 'query.php'; // imports queries

include_once 'functions.php';

if ($CONFIG_disable_account || check_ban())

redir("motd.php", "main_div", "Disabled");

if ($CONFIG_max_accounts) {

$query = sprintf(MAX_ACCOUNTS);

$result = execute_query($query, 'account.php');

$maxaccounts = $result->fetch_row();

if ($maxaccounts[0] >= $CONFIG_max_accounts)

redir("motd.php", "main_div", $lang['ACCOUNT_MAX_REACHED']);

}

if (isset($POST_opt)) {

if ($POST_opt == 1 && isset($POST_frm_name) && !strcmp($POST_frm_name, "account")) {

$session = $_SESSION[$CONFIG_name.'sessioncode'];

if ($CONFIG_auth_image && function_exists("gd_info")

&& strtoupper($POST_code) != substr(strtoupper(md5("Mytext".$session['account'])), 0,6))

alert($lang['INCORRECT_CODE']);

if (inject($POST_username) || inject($POST_password) || inject($POST_email))

alert($lang['INCORRECT_CHARACTER']);

if (strlen(trim($POST_username)) < 4 || strlen(trim($POST_username)) > 23)

alert($lang['USERNAME_LENGTH']);

if ($CONFIG_safe_pass && (strlen(trim($POST_password)) < 6 || strlen(trim($POST_password)) > 23))

alert($lang['PASSWORD_LENGTH']);

if (strlen(trim($POST_password)) < 4 || strlen(trim($POST_password)) > 23)

alert($lang['PASSWORD_LENGTH_OLD']);

if (!strcmp($POST_password, $POST_username)) // passwords e username iguais

alert($lang['PASSWORD_REJECTED']);

if (strcmp($POST_password, $POST_confirm))

alert($lang['PASSWORD_NOT_MATCH']);

if ($CONFIG_safe_pass && thepass(trim($POST_password)))

alert($lang['PASSWORD_REJECTED']);

if (strlen($POST_email) < 7 || !strstr($POST_email, '@') || !strstr($POST_email, '.'))

alert($lang['EMAIL_NEEDED']);

$query = sprintf(CHECK_USERID, trim($POST_username));

$result = execute_query($query, 'account.php');

if ($result->count())

alert($lang['USERNAME_IN_USE']);

if ($POST_sex)

$POST_sex = 'F';

else

$POST_sex = 'M';

if ($CONFIG_md5_pass)

$POST_password = md5($POST_password);

$query = sprintf(INSERT_CHAR, trim($POST_username), trim($POST_password), $POST_sex, $POST_email, $_SERVER['REMOTE_ADDR']);

$result = execute_query($query, 'account.php');

$query = sprintf(CHECK_ACCOUNTID, trim($POST_username), trim($POST_password));

$result = execute_query($query, 'account.php');

if ($line = $result->fetch_row()) {

erro_de_login(1);

redir("motd.php", "main_div", $lang['ACCOUNT_CREATED']);

} else {

erro_de_login(1);

redir("motd.php", "main_div", $lang['ACCOUNT_PROBLEM']);

}

}

}

if (isset($_SESSION[$CONFIG_name.'sessioncode']))

$session = $_SESSION[$CONFIG_name.'sessioncode'];

$session['account'] = rand(12345, 99999);

$_SESSION[$CONFIG_name.'sessioncode'] = $session;

$var = rand(10, 9999999);

echo "<center>

<form id=\"account\" onsubmit=\"return POST_ajax('account.php','main_div','account');\"><table>

<tr><td align=\"right\">".$lang['USERNAME'].":</td><td align=\"left\">

<input type=\"text\" name=\"username\" maxlength=\"223\" class=\"textfield\" width=\"202\" size=\"230\" onkeypress=\"return force(this.name,this.form.id,event);\">

</td></tr>

<tr><td align=\"right\">".$lang['PASSWORD'].":</td><td align=\"left\">

<input type=password name=\"password\" maxlength=\"23\"class=\"textfield\" size=\"230\" onkeypress=\"return force(this.name,this.form.id,event);\">

</td></tr>

<tr><td align=\"right\" width=\"20\">".$lang['CONFIRM'].":</td><td align=\"left\">

<input type=password name=\"confirm\" maxlength=\"23\" class=\"textfield\" size=\"230\" onkeypress=\"return force(this.name,this.form.id,event);\">

</td></tr>

<tr><td align=\"right\">".$lang['SEX'].":</td><td align=\"left\">

<select name=\"sex\" onkeypress=\"return force(this.name,this.form.id,event);\">

<option value=\"0\">".$lang['SEX_MALE']."<option value=\"1\">".$lang['SEX_FEMALE']."</select></td></tr>

<tr><td align=\"right\">".$lang['MAIL'].":</td><td align=\"left\">

<input type=\"text\" name=\"email\" maxlength=\"401\" size=\"40\"class=\"textfield\" onkeypress=\"return force(this.name,this.form.id,event);\">

<input type=\"hidden\" name=\"opt\" value=\"1\"></td></tr>

<input type=\"hidden\" name=\"ipaddress\" value=\"".$_SERVER['REMOTE_ADDR']."\">";

if ($CONFIG_auth_image && function_exists("gd_info")) {

echo "<tr><td></td><td align=left><img src=\"img.php?img=account&var=$var\" alt=\"".$lang['SECURITY_CODE']."\">

</td></tr><tr><td align=right>".$lang['CODE'].":</td>

<td align=\"left\">

<input type=\"text\" name=\"code\" maxlength=\"6\" size=\"6\" class=\"textfield\" onkeypress=\"return force(this.name,this.form.id,event);\">

 </td></tr>";

}

echo "

<tr align=\"right\"><td > </td><td><input type=\"submit\"class=\"textfield\" name=\"create\" value=\"Registrar\"></td></tr>

</table></form>

";

closetable();

?>

</body>

</html>

Edited by b00ld

Share this post


Link to post
Share on other sites

aqui o codigo.

<!DOCTYPE html>

<html>

<head>

<title>REGISTRO</title>

<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"/>

<link rel="stylesheet" href="style.css" type="text/css" />

</body>

</html>

</head>...

Cara acabei de baixar o cp v6 e nao deu esse erro, porem aconteceu de fazer a conta e nao poder logar na cp.

vi linha a linha do arquivo acima e nao encontrei erro.

algumas configurações que fiz:

instalei o table.slq num banco de dados de nome "ceres" e fiz a devidas configuraçoes no config.php dessa forma.

//sql connections

$CONFIG['rag_serv'] = 'localhost'; // meu server offlineentao deixa assim

$CONFIG['rag_user'] = 'root'; // login do server

$CONFIG['rag_pass'] = 'vertrigo'; // senha do server

$CONFIG['rag_db'] = 'ragnarok'; // banco de dados do meu rag offline

$CONFIG['log_db'] = 'log'; // aqui é que fica o log

$CONFIG['cp_serv'] = 'localhost'; //meu db é offline se o seu for tambem deixa assim

$CONFIG['cp_user'] = 'root'; // login do meu ser ver

$CONFIG['cp_pass'] = 'vertrigo'; // senha do db ou do server (mesma coisa)

$CONFIG['cp_db'] = 'ceres'; // aqui foi o nome que coloquei o meu ceres

Veja se tem alguma coisa haver com seu problema.

Edited by shapin

Share this post


Link to post
Share on other sites

Cara acabei de baixar o cp v6 e nao deu esse erro, porem aconteceu de fazer a conta e nao poder logar na cp.

vi linha a linha do arquivo acima e nao encontrei erro.

algumas configurações que fiz:

instalei o table.slq num banco de dados de nome "ceres" e fiz a devidas configuraçoes no config.php dessa forma.

//sql connections

$CONFIG['rag_serv'] = 'localhost'; // meu server offlineentao deixa assim

$CONFIG['rag_user'] = 'root'; // login do server

$CONFIG['rag_pass'] = 'vertrigo'; // senha do server

$CONFIG['rag_db'] = 'ragnarok'; // banco de dados do meu rag offline

$CONFIG['log_db'] = 'log'; // aqui é que fica o log

$CONFIG['cp_serv'] = 'localhost'; //meu db é offline se o seu for tambem deixa assim

$CONFIG['cp_user'] = 'root'; // login do meu ser ver

$CONFIG['cp_pass'] = 'vertrigo'; // senha do db ou do server (mesma coisa)

$CONFIG['cp_db'] = 'ceres'; // aqui foi o nome que coloquei o meu ceres

Veja se tem alguma coisa haver com seu problema.

Nao tem nada aver com essa config.php '-'

Na linha que acusa erro no dele e a linha 39 que cai nesse codigo session_start(); basta colocar um @ na frente e ve o que da (y)

Edited by b00ld

Share this post


Link to post
Share on other sites

okayy manolos vou testar aqui ^^

e ja respondo

funcionou era o @ mesmo eu sou nob dimais

obrigado a todos que me ajudaram ^^

so mais uma coisa aproveitando o post, vcs sabem como por o rank de pvp e tals nessa CP?

ou se tiver algum tutorial eu nao achei nenhum.

obrigado ^^

no ranking aparece isso aqui

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'erikoter'@'localhost' (using password: YES) in /home/erikoter/public_html/cp/confe.phpon line 7

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'erikoter'@'localhost' (using password: NO) in/home/erikoter/public_html/cp/confe.php on line 8

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/erikoter/public_html/cp/confe.php on line 8

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/erikoter/public_html/cp/pvp.php on line 33

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/erikoter/public_html/cp/pvp.php on line 35

Pos. Nick Classe

Vit�rias

alguem poderia me ajudar? rs

Share this post


Link to post
Share on other sites

okayy manolos vou testar aqui ^^

e ja respondo

funcionou era o @ mesmo eu sou nob dimais

obrigado a todos que me ajudaram ^^

so mais uma coisa aproveitando o post, vcs sabem como por o rank de pvp e tals nessa CP?

ou se tiver algum tutorial eu nao achei nenhum.

obrigado ^^

no ranking aparece isso aqui

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'erikoter'@'localhost' (using password: YES) in /home/erikoter/public_html/cp/confe.phpon line 7

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'erikoter'@'localhost' (using password: NO) in/home/erikoter/public_html/cp/confe.php on line 8

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/erikoter/public_html/cp/confe.php on line 8

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/erikoter/public_html/cp/pvp.php on line 33

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/erikoter/public_html/cp/pvp.php on line 35

Pos. Nick Classe

Vit�rias

alguem poderia me ajudar? rs

voce configurou o confe.php com dados errado da onde fica a database do seu servidor.

Share this post


Link to post
Share on other sites

configurei sim cara certinho mas ta dando erro na linha 8 vou postar aqui:

<? $login = $_POST['login'];

$pass = $_POST['pass'];

$db['server'] = 'localhost'; // < Coloque o IP do seu Banco de Dados [ padrão: localhost ]

$db['id'] = ''; // < Coloque o ID do seu Banco de Dados [ padrão: ragnarok ]

$db['senha'] = ''; // < Coloque a Senha do seu Banco de Dados [ padrão: ragnarok ]

$db['db'] = ''; // Coloque o seu banco de dados. [ padrão: ragnarok ]

$db['cnt'] = mysql_connect ($db['server'], $db['id'], $db['senha']);

$db['cntdb'] = mysql_select_db($db['db']);?>

otimo ja consegui arrumar o confe agora falta o PVP.php

eu ja tenho uma ideia do erro, mas gostaria que vc desse uma olhada aqui esta o arquivo:

<title>Ranking de PVP </title>

</head>

<style>

table, tr, td, p, div {

font:10px Verdana, Arial, Helvetica, sans-serif;

}

td,th {

color: #000000;

}

.style4 {

color: #0000FF;

font-weight: bold;

}

.style5 {color: #0000FF}

</style>

<body>

</style>

<table width="103%" cellpadding="4" cellspacing="1">

<tr>

<td align="center"><span class="style4">Pos.</span></td>

<td align=""><span class="style4">Nick</span></td>

<td align="left"><span class="style4">Classe</span></td>

<td align="right"><span class="style4">Vitórias</span></td>

<td align="center"><span class="style4">Status</b></td></tr>

<?

include('confe.php');

include('func.php');

$v1 = @mysql_query("SELECT * FROM `pvp` WHERE vitorias OR derrotas >= 1 ORDER BY `pvp`.`vitorias` DESC LIMIT 5");

$v4 = mysql_num_rows($v1);

$rank = 0;

while($r = mysql_fetch_array($v1)) {

$rank = $rank+1;

extract($r);

$v2 = mysql_query("SELECT * FROM `char` WHERE char_id = $char_id LIMIT 5");

$v3 = mysql_fetch_array($v2);

@extract($v3);

if($online == 0){$con = '<img src=images/off.png>';}

if($online == 1){$con = '<img src=images/on.png>';}

echo '<tr>

<td align="center">'.$rank.'</td>

<td align="left">'.$nick.'</td>

<td align="left">'.njob($class).'</td>

<td align="right">'.$vitorias.'</td>

<td align="center">'.$con.'</td></tr>';

}

?>

</table>

</body>

</html>

(aonde esta grifado la em cima)

porem eu nao tenho nenhuma tabela pvp (aonde esta grifado la em cima) eu uso o pvp do mooka seria entao no lugar de PVP igual ta o nome no meu banco de dados pvpm_data?

e esta dando esse erro:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/erikoter/public_html/cp/pvp.php on line 33

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/erikoter/public_html/cp/pvp.php on line 35

Share this post


Link to post
Share on other sites

configurei sim cara certinho mas ta dando erro na linha 8 vou postar aqui:

<? $login = $_POST['login'];

$pass = $_POST['pass'];

$db['server'] = 'localhost'; // < Coloque o IP do seu Banco de Dados [ padrão: localhost ]

$db['id'] = ''; // < Coloque o ID do seu Banco de Dados [ padrão: ragnarok ]

$db['senha'] = ''; // < Coloque a Senha do seu Banco de Dados [ padrão: ragnarok ]

$db['db'] = ''; // Coloque o seu banco de dados. [ padrão: ragnarok ]

$db['cnt'] = mysql_connect ($db['server'], $db['id'], $db['senha']);

$db['cntdb'] = mysql_select_db($db['db']);?>

otimo ja consegui arrumar o confe agora falta o PVP.php

eu ja tenho uma ideia do erro, mas gostaria que vc desse uma olhada aqui esta o arquivo:

<title>Ranking de PVP </title>

</head>

<style>

table, tr, td, p, div {

font:10px Verdana, Arial, Helvetica, sans-serif;

}

td,th {

color: #000000;

}

.style4 {

color: #0000FF;

font-weight: bold;

}

.style5 {color: #0000FF}

</style>

<body>

</style>

<table width="103%" cellpadding="4" cellspacing="1">

<tr>

<td align="center"><span class="style4">Pos.</span></td>

<td align=""><span class="style4">Nick</span></td>

<td align="left"><span class="style4">Classe</span></td>

<td align="right"><span class="style4">Vitórias</span></td>

<td align="center"><span class="style4">Status</b></td></tr>

<?

include('confe.php');

include('func.php');

$v1 = @mysql_query("SELECT * FROM `pvp` WHERE vitorias OR derrotas >= 1 ORDER BY `pvp`.`vitorias` DESC LIMIT 5");

$v4 = mysql_num_rows($v1);

$rank = 0;

while($r = mysql_fetch_array($v1)) {

$rank = $rank+1;

extract($r);

$v2 = mysql_query("SELECT * FROM `char` WHERE char_id = $char_id LIMIT 5");

$v3 = mysql_fetch_array($v2);

@extract($v3);

if($online == 0){$con = '<img src=images/off.png>';}

if($online == 1){$con = '<img src=images/on.png>';}

echo '<tr>

<td align="center">'.$rank.'</td>

<td align="left">'.$nick.'</td>

<td align="left">'.njob($class).'</td>

<td align="right">'.$vitorias.'</td>

<td align="center">'.$con.'</td></tr>';

}

?>

</table>

</body>

</html>

(aonde esta grifado la em cima)

porem eu nao tenho nenhuma tabela pvp (aonde esta grifado la em cima) eu uso o pvp do mooka seria entao no lugar de PVP igual ta o nome no meu banco de dados pvpm_data?

e esta dando esse erro:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/erikoter/public_html/cp/pvp.php on line 33

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/erikoter/public_html/cp/pvp.php on line 35

tem que ter uma tabela chamada pvp la no seu database para que o rank pvp funcione '-'

Share this post


Link to post
Share on other sites

mas se eu mudar no pvp.php de PVP pra pvpm_data sera que funciona?

porque eu uso o pvp do mooka e la nao tem PVP so tem pvpm_data entende?

Share this post


Link to post
Share on other sites

mas se eu mudar no pvp.php de PVP pra pvpm_data sera que funciona?

porque eu uso o pvp do mooka e la nao tem PVP so tem pvpm_data entende?

vai ter que mudar o SELECT desse pvp nao so no nome da tabela como no nome das colunas da tabela pvp tbm, a n ser que seja o mesmo nome do pvp do mooka '-'

Share this post


Link to post
Share on other sites

mudar o nome do pvp do moka pra só pvp o inves de deixar pvpm_data?

mais facil voce mudar o rank pvp ai para o do mooka em vez de editar o do mooka '-'

Share this post


Link to post
Share on other sites

me fala o nome da tabela e das colunas da tabela do pvp do mooka '-'

Share this post


Link to post
Share on other sites

nome da tabela pvpm_data

Coluna

1 id int(11) UNSIGNED Não

0

2 name varchar(255) latin1_swedish_ci Não

3 kills int(11) UNSIGNED Não 0

4 dies int(11) UNSIGNED Não 0

leader int(11) UNSIGNED Não 0

6 annc int(11) UNSIGNED Não 0

ban int(11) UNSIGNED Não 0

type int(11) UNSIGNED Não 0

Share this post


Link to post
Share on other sites

testa ae '-'


<title>Ranking de PVP </title>
</head>
<style>
table, tr, td, p, div {
font:10px Verdana, Arial, Helvetica, sans-serif;
}

td,th {
color: #000000;
}
.style4 {
color: #0000FF;
font-weight: bold;
}
.style5 {color: #0000FF}
</style>
<body>
</style>
<table width="103%" cellpadding="4" cellspacing="1">
<tr>
<td align="center"><span class="style4">Pos.</span></td>
<td align=""><span class="style4">Nick</span></td>
<td align="left"><span class="style4">Classe</span></td>
<td align="right"><span class="style4">Vitórias</span></td>

<td align="center"><span class="style4">Status</b></td></tr>
<?
include('confe.php');
include('func.php');
$v1 = @mysql_query("SELECT * FROM `pvpm_data` WHERE kills OR dies >= 1 ORDER BY `pvpm_data`.`kills` DESC LIMIT 5");
$v4 = mysql_num_rows($v1);
$rank = 0;
while($r = mysql_fetch_array($v1)) {
$rank = $rank+1;
extract($r);
$v2 = mysql_query("SELECT * FROM `char` WHERE char_id = $char_id LIMIT 5");
$v3 = mysql_fetch_array($v2);
@extract($v3);
if($online == 0){$con = '<img src=images/off.png>';}
if($online == 1){$con = '<img src=images/on.png>';}
echo '<tr>
<td align="center">'.$rank.'</td>
<td align="left">'.$nick.'</td>
<td align="left">'.njob($class).'</td>
<td align="right">'.$vitorias.'</td>
<td align="center">'.$con.'</td></tr>';
}
?>

</table>
</body>
</html>

Edited by b00ld

Share this post


Link to post
Share on other sites

tenta esse ae '-'


<title>Ranking de PVP </title>
</head>
<style>
table, tr, td, p, div {
font:10px Verdana, Arial, Helvetica, sans-serif;
}

td,th {
color: #000000;
}
.style4 {
color: #0000FF;
font-weight: bold;
}
.style5 {color: #0000FF}
</style>
<body>
</style>
<table width="103%" cellpadding="4" cellspacing="1">
<tr>
<td align="center"><span class="style4">Pos.</span></td>
<td align=""><span class="style4">Nick</span></td>
<td align="left"><span class="style4">Classe</span></td>
<td align="right"><span class="style4">Vitórias</span></td>

<td align="center"><span class="style4">Status</b></td></tr>
<?
include('confe.php');
include('func.php');
$v1 = @mysql_query("SELECT * FROM `pvpm_data` WHERE kills OR dies >= 1 ORDER BY `pvpm_data`.`kills` DESC LIMIT 5");
$v4 = mysql_num_rows($v1);
$rank = 0;
while($r = mysql_fetch_array($v1)) {
$rank = $rank+1;
extract($r);
$v2 = mysql_query("SELECT * FROM `char` WHERE char_id = $char_id LIMIT 5");
$v3 = mysql_fetch_array($v2);
@extract($v3);
if($online == 0){$con = '<img src=images/off.png>';}
if($online == 1){$con = '<img src=images/on.png>';}
echo '<tr>
<td align="center">'.$rank.'</td>
<td align="left">'.$r['name'].'</td>
<td align="left">'.njob($class).'</td>
<td align="right">'.$r['kills'].'</td>
<td align="center">'.$con.'</td></tr>';
}
?>

</table>
</body>
</html>

Share this post


Link to post
Share on other sites

pior que nao mano todos estao como aprendiz e eu to online agora e nao fica @_@

eu tenho ideia do que tem que fazer porem nao sei como fazer, so a classe e o stats estao errados...

o char adm erik ta online agr

Share this post


Link to post
Share on other sites

Veja se os status funciona '-'


<title>Ranking de PVP </title>
</head>
<style>
table, tr, td, p, div {
font:10px Verdana, Arial, Helvetica, sans-serif;
}

td,th {
color: #000000;
}
.style4 {
color: #0000FF;
font-weight: bold;
}
.style5 {color: #0000FF}
</style>
<body>
</style>
<table width="103%" cellpadding="4" cellspacing="1">
<tr>
<td align="center"><span class="style4">Pos.</span></td>
<td align=""><span class="style4">Nick</span></td>
<td align="left"><span class="style4">Classe</span></td>
<td align="right"><span class="style4">Vitórias</span></td>

<td align="center"><span class="style4">Status</b></td></tr>
<?
include('confe.php');
include('func.php');
$v1 = @mysql_query("SELECT * FROM `pvpm_data` WHERE kills OR dies >= 1 ORDER BY `pvpm_data`.`kills` DESC LIMIT 5");
$v4 = mysql_num_rows($v1);
$rank = 0;
while($r = mysql_fetch_array($v1)) {
$rank = $rank+1;
extract($r);
$v2 = mysql_query("SELECT * FROM `char` WHERE online = '1'");
$v3 = mysql_fetch_array($v2);
@extract($v3);
if($v3['online'] != 1){$con = '<img src=images/off.png>';}
if($v3['online'] == 1){$con = '<img src=images/on.png>';}
echo '<tr>
<td align="center">'.$rank.'</td>
<td align="left">'.$r['name'].'</td>
<td align="left">'.njob($class).'</td>
<td align="right">'.$r['kills'].'</td>
<td align="center">'.$con.'</td></tr>';
}
?>

</table>
</body>
</html>

Share this post


Link to post
Share on other sites
Sign in to follow this  

Seja bem vindo ao Cronus-Emulator.
É sempre um prazer te-lo conosco.
Você pode visualizar nossas áreas de suporte para encontrar suas soluções sem a necessidade de se registrar!
Registrando em nossa comunidade, você poderá conhecer mais sobre nosso projeto, criar tópicos, responder tópicos existentes, baixar milhares de recursos em nosso sistema de downloads, participar de nossa comunidade, customizar seu perfil e muito mais... Se você já possui uma conta, faça seu login - ou crie uma conta. Também temos integração com Google+ e Facebook.

×
×
  • Create New...