Secret Experience

Secret Experience (https://secretexperience.net/)
-   [L2J] Dúvidas (https://secretexperience.net/l2j-duvidas/)
-   -   [Web Site] Ajuda com uso de Scrip (https://secretexperience.net/l2j-duvidas/11607-ajuda-com-uso-de-scrip.html)

Misho 15-08-2009 03:23 AM

Pessoal peguei alguns Scrip nesse Topico


[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]


Os Scrip sao:

Status dos Castle

cria pagina de rank,pvp,pk,karma,lv




Queria saber agora como ADD eles na minha Pagina



Se possivel um tutorial ou uma explicaçao bem detalhada

Pessoal impossivel que tantos programoderes aqui do Forum ninguem sabe me dizer oNDE e como devo add os Scrip no meu Site..

Aqui uma parte da Index do site>

Citação:

<li class="subNavContainer">
<a class="subNavLink" id="news_from_abroad" href="1">Top PVP</a>
</li>
<li class="subNavContainer">
<a class="subNavLink" id="general_news" href="1">Top PK</a>
</li>
<li class="subNavContainer">
<a class="subNavLink" id="developer_blogs" href="1">Top Online</a>
</li>
<li class="subNavContainer">
<a class="subNavLink" id="developer_blogs" href="1">Top Voters</a>
</li>
<li class="subNavContainer">
<a class="subNavLink" id="developer_blogs" href="1">Top Clans</a>
</li>
</table>
</body>


</html>

Apenas digam o que devo add e em qual pasta e como configurar os botoes pra redirecionar pros top...



EDIT:PROBLEMA RESOLVIO, PODE MOVER O TOPICO

Setokaiba 15-08-2009 05:54 PM

Recapitulando, vamos lá:

Estes são scripts funcionais que podem ser inseridos em alguma parte de sua página.
Eu recomendo que utilize um editor de páginas web, como o Dreamweaver e inserir o código na parte desejada do layout.
Se pois os arquivos já prontos dentro de algum diretório, para abrirem em nova janela ou em _self mesmo o que tem que editar é o href do código: href="PONDO AQUI O DIRETÓRIO E O NOME DO ARQUIVO DO SCRIPT SEGUIDO DA TERMINAÇÃO .php"

Não se esqueça de configurar as propriedades de conexão com o banco de dados, e utilize também um bom gerenciador de web sites, como o Abyss Web Server X1.

Misho 15-08-2009 06:19 PM

Seto aqui eu deixei a pasta Script dentro da WWW, editei os Botoes e ficaram assim:

Código:

<li class="subNavContainer">
    <a class="subNavLink" id="news_from_abroad" href="Script/pvpkills.php">Top PVP</a>
  </li>
  <li class="subNavContainer">
    <a class="subNavLink" id="general_news" href="Script/pkkills">Top PK</a>
  </li>
  <li class="subNavContainer">
    <a class="subNavLink" id="developer_blogs" href="Script/online.php">Top Online</a>
  </li>
  <li class="subNavContainer">
    <a  href="Top Voters.html" class="subNavLink" id="developer_blogs">Top Voters</a>
  </li>
  <li class="subNavContainer">
    <a class="subNavLink" id="developer_blogs" href="Script/clan.php">Top Clans</a>
  </li>



Mesmo assim ainda ta erro, ele nao consegue carregar a pagina...




Depois de um teste com a opçao de clan

apresentou esse seguinte erro:

Spoiler
Código:

Warning: include(Connection.php) [function.include]: failed to open stream: No such file or directory in C:\AppServ\www\Script\clan.php on line 9

Warning: include() [function.include]: Failed opening 'Connection.php' for inclusion (include_path='.;C:\php5\pear') in C:\AppServ\www\Script\clan.php on line 9

Warning: mysql_query() [function.mysql-query]: Can't connect to MySQL server on 'localhost' (10061) in C:\AppServ\www\Script\clan.php on line 24

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\AppServ\www\Script\clan.php on line 24

Warning: mysql_query() [function.mysql-query]: Can't connect to MySQL server on 'localhost' (10061) in C:\AppServ\www\Script\clan.php on line 29

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\AppServ\www\Script\clan.php on line 29

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\Script\clan.php on line 30




meu arquivo Clan.php esta assim:


Spoiler
Código:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="Windows-1251">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>Clans</title>
</head>
<body bgcolor="#000000" style="color:#999999; font-family:verdana;">
<?php
include("Connection.php");

$FORM2 = "<table width=500 style=\"font-size:11px; font-family:verdana; color:#999999;\" cellspacing=\"0\" cellpadding=\"0\" align=center>
<tr>
<td width=100% height=34 colspan=4 align=center class=\"content\" style=\"font-size:12px; font-family:verdana; color:#999999;\"><b>Clans</b>
</td>
</tr>
<tr>
<td style=\"font-size:12px; border:1px #999999 solid;\"><center><b>Pos</b></center></td>
<td style=\"font-size:12px; border:1px #999999 solid;\"><center><b>Clan</b></center></td>
<td style=\"font-size:12px; border:1px #999999 solid;\"><center><b>Clan Level</b></center></td>
<td style=\"font-size:12px; border:1px #999999 solid;\"><center><b>Player</b></center></td>
</tr>";


$link = mysql_query($query_chars);
$i = 1;
$activity = mysql_query("SELECT characters.char_name,characters.clanid,clan_data.clan_id,clan_data.clan_name,characters.accesslevel,clan_data.clan_level
FROM characters,clan_data
WHERE  ((characters.clanid = clan_data.clan_id) AND (characters.clanid > 0))
ORDER BY clan_data.clan_level DESC, clan_data.clan_name, characters.char_name ASC ");
while($row = mysql_fetch_array($activity))

{
 
$FORM2 .= '<tr>
    <td style=\"font-size:10px; font-family:verdana; color:#999999;\" class=content align=center>'.$style_string.$i.'</span></td>
    <td style=\"font-size:10px; font-family:verdana; color:#999999;\" class=content align=center>'.$row['clan_name'].'</td>
    <td style=\"font-size:10px; font-family:verdana; color:#999999;\" class=content align=center>'.$row['clan_level'].'</td>
        <td style=\"font-size:10px; font-family:verdana; color:#999999;\" class=content align=center>'.$row['char_name'].'</td>
  </tr>';
 
    $i++;
}
 
echo $FORM2;

?>
</body>
</html>




Meu Arquivo de conexao com banco de dados



Spoiler
Código:

[Share]Collection of PHP shares.
« on: August 10, 2009, 05:38:55 AM »
        Reply with quoteQuote
1st.5 Star rating system.

How to start?
Well first we have to make a DB and we put this inside:
Code:

    CREATE TABLE `star_vote` (
    `id` int(15) NOT NULL,
    `rating` int(10) NOT NULL default '0',
    `Voters` int(5) NOT NULL default '0',
    UNIQUE KEY(`id`)
    );

    CREATE TABLE `star_vote_ip` (
    `id` int(15) NOT NULL,
    `ip` varchar(30) NOT NULL
    );

After we created the table and added the structure inside it the next step is the next file.

You have to create a .php file name it connect.php,put inside this code:
Code:

    <?php
    define(DB_HOST, "l2batery.servegame.com");
    define(DB_USER, "root");
    define(DB_PASS, "senha do meu mysql");
    define(DB_NAME, "l2jdb");

    $conn = @mysql_connect(DB_HOST, DB_USER, DB_PASS) or die(mysql_error());
    @mysql_select_db(DB_NAME, $conn) or die(mysql_error());

    define(STARS, 5); // From here configure how many stars you want to have.
    ?>

After you create it config it so it can connect to DB.
Next step is create a file config.php in the file we put:

Code:

    <?php
    require "connect.php";

    $id = $_GET['id']; // we take ID;

    $display_rating = false;
    if (is_numeric($id) && $id > 0) // check if ID is numeric and if its bigger than 0
    {
    $display_rating = true;
    $vote_allow = true;

    $votes = array();

    $row = mysql_fetch_object(mysql_query("SELECT `rating`, `Voters`, COUNT(*) as 'kolko' FROM `star_vote` WHERE `id` = '$id' LIMIT 1"));
    if ($row -> How many) // Check if you've voted already with 1
    {
    $rating = @round($row -> rating / $row -> Voters); // ownring the rating in  $rating

    $votes = array_pad($votes, $rating, "starvoted.png"); // fill the massive $votes with starvoted.png(filled stars)
    $ip_vote = @mysql_result(mysql_query("SELECT COUNT(*) FROM `star_vote_ip` WHERE `id` = '$id' AND `ip` = '".$_SERVER['REMOTE_ADDR']."'"), 0);
    if ($ip_vote) $vote_allow = false; // check if you already voted with this IP
    }
    $votes = array_pad($votes, STARS, "starunvoted.png"); // fill the massive with $votes with starunvoted.png(non-filled stars)
    }
    ?>


So we're done with this file too.Now we move to the file: vote_star.js (There is nothing to change in it.)Here is it containing:

Code:

    var xmlHttp

    function vote_star(id, str)
    {
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    {
    alert ("Browser does not support HTTP Request")
    return
    }
    var url="vote_star.php"
    url=url "?id=" id
    url=url "&str=" str "&sid=" Math.random()
    xmlHttp.onreadystatechange=stateChanged
    xmlHttp.open("GET",url,true)
    xmlHttp.send(null)
    }

    function stateChanged()
    {
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    {
    document.getElementById("star_votes").innerHTML=xmlHttp.responseText;
    }
    }

    function GetXmlHttpObject()
    {
    var objXMLHttp=null
    if (window.XMLHttpRequest)
    {
    objXMLHttp=new XMLHttpRequest()
    }
    else if (window.ActiveXObject)
    {
    objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
    }
    return objXMLHttp
    }


Next file we have to create is:
vote_star.php fill it with this:
Code:

    <?php
    require "connect.php";

    $id = $_GET['id'];
    $str = $_GET['str'];
    $ip = $_SERVER['REMOTE_ADDR'];

    if (is_numeric($id) && $id > 0 && in_array($str, range(1,STARS))) //
    { // if OK continue

    $votes = array();

    $row = mysql_fetch_object(mysql_query("SELECT `rating`, `Voters`, COUNT(*) as 'kolko' FROM `star_vote` WHERE `id` = '$id' LIMIT 1"));
    if ($row -> kolko) // check if its already voted with this ID
    { // ??? ? ?????????
    $ip_vote = @mysql_result(mysql_query("SELECT COUNT(*) FROM `star_vote_ip` WHERE `id` = '$id' AND `ip` = '$ip'"), 0);

    if (!$ip_vote) // check if its already voted with this IP if no continue
    {
    $new_rating = $row -> rating  $str; // add the new vote rating to the old
    $new_Voters = $row -> Voters  1; // add  1 to voters

    $rating = @round($new_rating / $new_Voters); // calculate middle rating
    $votes = array_pad($votes, $rating, "starvoted.png"); // fill $votes with starvoted.png(filled stars)

    mysql_query("UPDATE `star_vote` SET `rating` = '$new_rating',`Voters` = '$new_Voters' WHERE `id` = '$id'"); // update the info for the ID
    mysql_query("INSERT INTO `star_vote_ip` (`id`,`ip`) VALUES ('$id','$ip')"); // log the IP of the voter
    }
    }
    else // ??? ??? ??? ????? ?? ? ??? ???????? ?? ???? ID
    {
    $rating = $str;
    $votes = array_pad($votes, $rating, "starvoted.png"); // fill the massive  $votes with starvoted.png(filled stars)

    mysql_query("INSERT INTO `star_vote` (`id`, `rating`, `Voters`) VALUES ('$id', '$str', '1')"); // creating new ID with the vote
    mysql_query("INSERT INTO `star_vote_ip` (`id`,`ip`) VALUES ('$id','$ip')"); // log the IP of the voter
    }

    $votes = array_pad($votes, STARS, "starunvoted.png"); // fill the massive $votes with starunvoted.png(empty stars)

    if ($rating)
    {
    for ($i=0;$i<STARS;$i  )
    echo "<img src="".$votes[$i]."" border="0">";
    }
    }
    ?>


The final step is create a file ex. index.php put this inside it:
Code:

    <?php
    require "config.php";
    ?>
    <html>
    <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <title>Demo Vote system by: Flower</title>
    <?php
    if ($display_rating)
    {
    ?>
    <script src="vote_star.js" type="text/javascript"></script>
    <script type="text/javascript">
    function star_vote(id)
    {
    for (i=1;i<=<?=STARS?>;i  )
    {
    if (i <= id)
    {
    document[i].src="starvoted.png";
    }
    else
    {
    document[i].src="starunvoted.png";
    }
    }
    }
    function normal()
    {
    <?php
    for ($i=0,$i2=1;$i<STARS;$i  ,$i2  )
    {
    echo "document[$i2].src="".$votes[$i]."";n";
    }
    ?>
    }
    </script>
    <?php
    }
    ?>
    </head>
    <body>

    <?php
    if ($display_rating)
    {
    ?>
    <b>Voters:</b>
    <div id="star_votes">
    <?php
    for ($i=0,$i2=1;$i<STARS;$i  ,$i2  )
    {
    ?>
    <?php if ($vote_allow) { ?><a href="javascript:void(null)" onMouseOver="star_vote('<?=$i2?>')" onMouseOut="normal()" onClick="vote_star('<?=$id?>', '<?=$i2?>')"><?php } ?><img id="<?=$i2?>" src="<?=$votes[$i]?>" border="0"><?php if ($vote_allow) { ?></a><?php }
    }
    ?>
    </div>
    <?php
    }
    else echo "<b>Invalid ID!</b>";
    ?>

    </body>
    </html>


How to use it?Open an index.php and put
Code:

?id=[ ID]

Each ID is individual and the rates are invidual for each ID.

----------------------

2.Creating DB with PHP.

The PHP Function "mydql_create_db() tries to create a DB with the name,which u add as argument.The guide down here shows all exsisting DB and after that creates a form,in which you can add the name of the new BD.When the form get accepted,the script tries to create the new BD with the given name.

Code:

<?php
$conn = @mysql_connect("localhost", "test", "test")
or die( "Error, the connection to MySQL cannot be accomplished." );
$rezl = @mysql_create__db ( $_REQUEST['db'] );
$rez2 = @mysql_list_dbs($conn);
$spisyk = "";
for( $row=0; $row < mysql_num_rows( $rez2 ); $row  )
{ $spisyk .= raysql_tablename( $rez2, $row ) .
" - "; }
?>


and

Code:

<html>
<head> <title>Create DB with PHP by: Flower</title> </head>
<body>
<form action="<?php echo( $_SERVER['PHP_SELF'] ); ?> " method="post">
Data base: <?php echo( $spisyk ); ?> <hr>
Name:<input type = "text" name = "db"> <br>
<input type = "submit" value = "Create DB.">
</form>
</body>
</html>



P.S2.:If you have any problem use prefix: [Problem] Include full explaination of the problem.If you find a bug write here.Haven't tested it just created it i think there are no bugs inside it!Enjoy!

Keep the topic clean!All useless posts will be deleted without warns!


Setokaiba 15-08-2009 06:55 PM

Warning: include(Connection.php) [function.include]: failed to open stream: No such file or directory in C:\AppServ\www\Script\clan.php on line 9

Este erro significa que não foi encontrado o arquivo no diretório C:\AppServ\www\Script\

Warning: include() [function.include]: Failed opening 'Connection.php' for inclusion (include_path='.;C:\php5\pear') in C:\AppServ\www\Script\clan.php on line 9

Este erro significa que não foi encontrado o path, normal já que não foi encontrado o arquivo acima.

Warning: mysql_query() [function.mysql-query]: Can't connect to MySQL server on 'localhost' (10061) in C:\AppServ\www\Script\clan.php on line 24

Neste aqui significa que o script não conseguiu se conectar com o seu banco de dados.

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\AppServ\www\Script\clan.php on line 24

Os demais erros são decorrentes do anterior.

Warning: mysql_query() [function.mysql-query]: Can't connect to MySQL server on 'localhost' (10061) in C:\AppServ\www\Script\clan.php on line 29

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\AppServ\www\Script\clan.php on line 29

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\Script\clan.php on line 30

Misho 15-08-2009 07:04 PM

Seto me diz nao tem nenhum site aqui na SE que tem esses Scrips prontos?

apenas para eu retirar e por na minha pasta WWW?

ja que ja mechi em tudo que podia, ate testei outros Scrip e apresento outro errou agora:

Citação:

VOLTAR
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'l2alive.servegame.com' (10061) in C:\AppServ\www\status\config.php on line 6
Can't connect to MySQL server on 'l2meuserver.servegame.com' (10061)



Seto essa parte que ele diz nao achar o arquivo, esta errado, por que o arquivo esta na pasta certa

C:\AppServ\www\Script

Dentro tem o arquivo clan.php normal

Config.php desses Scrip ta assim:

Citação:

<?
$servidor = "l2Meuserver.servegame.com";
$usuario = "root";
$senha = "senha MySql";
$banco = "l2jdb";
$conexao = mysql_connect($servidor, $usuario, $senha) or die(mysql_error());
mysql_select_db($banco, $conexao) or die(mysql_error());
?>

Setokaiba 15-08-2009 07:22 PM

Você tem que configurar corretamente os dados senão nunca conecta a database pra realizar a consulta e mostrar os resultados.

l2batery.servegame.com
l2alive.servegame.com

Afinal de contas qual é o teu?

E se o site estiver no mesmo computador que o servidor, deve usar localhost e não o ddns.

Misho 15-08-2009 07:56 PM

eu testei meus 2 no-ip, o site to usando pra mecher nele no PC, mas ja mandei pro meu HOST e tbem aconteceu a mesma coisa...


Eu acesso ele via [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar] as portas que usei, so da erro nisso ai

Setokaiba 15-08-2009 08:23 PM

Seguinte, tu tem que por o caminho do No-IP ou do DDNS aí, sem esse negócio de :8090

8090 é uma porta alternativa para web sites.
O que o código pede é o host de onde fica a database para realizar uma consulta ao banco de dados e gerar as informações que os códigos pedem, independente que seja para o web site ou não, ele vai tentar encontrar a porta 3306 que é a default do MySQL.
Certifique-se de que o firewall está desativado e com essa exceção de acesso a porta 3306.

Misho 15-08-2009 09:06 PM

Seto rodei novamente no PC e rsolvi, pelo jeito era algum erro no meu MYSQL,

reinstalei ele, mas a duvida que vc me disse la em cima mas nao consegui resolver foi a seguinte duvida:

Quando clico nos TOP eles abrem a apgina nova em cima da pagina atual, queria que fosse aberto 1 pagina nova

Tipo dessa pagina

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]


Olha que ele abre uma mini janela mostrando, ate poderia ser na mesma pagina minha,no meio dela...

gustavohp 15-08-2009 09:26 PM

Amigo Vc usa o DreamWeaver?
Se usar, abre a pagina que tem o link que direciona para o seus tops e clica nele, ai vc procura la embaixo no dreamweaver a opção Target, ai eh so vc escolher a opção _blank , que abrira em uma aba ou em uma nova janela

Um Exemplo pra vc ve como faz
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]


Se Ajudei Clique em Obrigado ^^

Misho 15-08-2009 11:32 PM

gustavo aqui ele abriu uma nova pagina sim, porem eu queria que ela carrega se uma 2 pagina mas em forma de Pop Pup, tipo do site que citei ai em cima,entendeu?

se alguem souber como fazer me diz, sim to suando o DreamWeaver!

Setokaiba 16-08-2009 12:00 AM

Esses são os chamados Quicklinks.

Insira esse código para gerar o menu em drop down:
Código:

<div id="drop_box_nav">
<form action="#" onsubmit="return go_nav();">
<select name="my_links" id="my_links">
  <option value="http://www.secretwarez.net">SE</option>
  <option value="http://www.secretwarez.net">SE</option>
  <option value="http://www.google.com">Google</option>
  <option value="http://www.secretwarez.net">SE</option>
</select>
&nbsp;&nbsp;
<input type="submit" name="sub_nav" id="sub_nav" value="Go to URL" />
</form>
</div>
<script type="text/javascript" src="subnav.js"></script>


Copie esse conteúdo salve num bloco de notas com a terminação .js
Trata-se de um arquivo do tipo jscript:
Código:

function go_nav() {
       
  if (document.getElementById && document.createTextNode) {       
       
        var user_link = document.getElementById("my_links").value;       
   
        window.location = user_link;
       
        return false;
       
  }
 
}


Misho 16-08-2009 12:19 AM

Insiro o primeiro codigo onde?

o.O

Explica melhor que nao entendi Seto :D

Salvar o segundo mas com qual nome?

Setokaiba 16-08-2009 12:29 AM

Brother, para isso é necessário ter um pouco de noção em programação, quando eu disse inserir em algum lugar, é na template ou melhor na página que tu quer que apareça a função, se fosse para eu fazer isso aqui nesta página ou em qualquer outra página de post, eu deveria procurar a minha template postbit_legacy. Se for para aparecer isso no início do teu site, tu deve procurar o index.php, se for para aparecer na página customizada de rankings, tu deve procurar a página de rank.php e inserir o código do primeiro bloco, que ele cria um menu drop down, creio que seja isto que tu queria, pois no site onde passou o estilo era este, uma caixa drop down onde selecionava o status e abria um pop-up.

Justamente o que faz abrir o pop-up é a função do final do jscript
Código:

<script type="text/javascript" src="subnav.js"></script>
Que chama pelo arquivo subnav.js então tu deve salvar o segundo código com qualquer nome ou com o nome de subnav.js evidente que o qualquer nome no caso, deveria ser modificado também alí onde está marcado em vermelho, para o script chamar a ação dele.

CavaleiroNegro 16-08-2009 12:31 AM

@Misho :

Poderia ser subnav.js como esta ali na primeira citação que o seto fez foi para esse nome de arquivo!!

fetish 16-08-2009 12:34 AM

Olá.
Para criar uma janela pop-up, siga os passos citados abaixo.

Primeiro selecione o link que queiras criar a o link para a janela pop:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Após ter selecionado o link, vá ao menu direito do teu Drewamweaver e selecione Tag Inspector
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Após isso, aparecerão duas opção de controle. Selecione: Behaviors
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Depois clique no sinal de + direcionado por1 uma seta para baixo como mostra no screenshot.
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Abrirá uma janela como esta:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Clique em Browse para carregar a página que queira que seja o pop-up e a selecione:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Citação:

1. Url to display: Local onde foi carregado o arquivo da tua página
Citação:

2. Width: Largura do documento.
Citação:

3. Height: Altura do documento.
Citação:

4. Window Name: Nome da janela pop-up
Após setar as medidas do documento, clique em ok.

Teste a página: F12
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Teste o Link:
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Até mais.

Misho 16-08-2009 12:41 AM

Seto no caso meu pkrank.php esta assim:

Código:

<html>
<head>
<title>PK Rank</title>
<body bgcolor="">
<a href="javascript:history.go(-1)">VOLTAR</a>
<?
include "config.php";

$ordem = empty($_GET['o']) ? 'pkkills' : base64_decode($_GET['o']);
$sql = mysql_query("SELECT * FROM characters ORDER BY ".$ordem." DESC LIMIT 30") or die(mysql_error());
$array = array('pvpkills' => 'PVP Kills',
                          'pkkills'  => 'PK Kills',
                          'level'    => 'Level',
                          'karma'    => 'Karma'
                          );
?>
<table width="100%" align="center">
  <tr align="center">
    <td width="35%"><font color="green" size="1" face="verdana">Nome do Char </td>
    <td width="21%"><font color="green" size="1" face="verdana"><?php echo $array[$ordem]; ?> </span></td>
    <td width="36%"><font color="green" size="1" face="verdana">Clan</td>
  </tr>
<?
$i = 1;
$cor = 0;
while($a = mysql_fetch_object($sql)) {
$cor = $cor + 1;
$bg  = $cor % 2 == 0 ? '#F1F1F1' : '#E8E8E8';

if($i == 1) {
$img = "<img src=\"top1.gif\" alt=\"1&ordm; Lugar\">";
}elseif($i == 2) {
$img = "<img src=\"top2.gif\" alt=\"2&ordm; Lugar\">";
}elseif($i == 3) {
$img = "<img src=\"top3.gif\" alt=\"3&ordm; Lugar\">";
}else{
$img = $i."&ordm; lugar";
}

$clan = mysql_query("SELECT * FROM clan_data WHERE clan_id = '".$a->clanid."'") or die(mysql_error());
$clans = mysql_fetch_object($clan);


$clans->clan_name = empty($clans->clan_name) ? 'Sem info.' : $clans->clan_name;
?>
  <tr align="center">
    <td><font size="1" face="verdana" color="#800000"><?php echo $a->char_name; ?></td>
    <td><font size="1" face="verdana" color="#800000"><?php echo $a->$ordem; ?></td>
    <td><font size="1" face="verdana" color="#800000"><?php echo $clans->clan_name; ?></td>
  </tr>
<?
$i++;
}
?>
</table>
</body>
</html>

Se fosse pra eu add o rpimeiro bloco, onde eu iria por?

Setokaiba 16-08-2009 12:45 AM

Não.
Entenda, esse código é para adicionar na index por exemplo, ele quem irá jogar para essa página aí que mostrará a quantidade de PvP e/ou PK's de um personagem, aquilo é um menu que ao selecionar a opção joga para a página, é um drop down (caído pra baixo) algo parecido com o menu de escolha dos prefixos aqui antes de criar o tópico, só que este que estou passando possui a função de abrir uma página conforme configurado alí.

Misho 16-08-2009 12:53 AM

Nao consigui, seto nem postando minha Index.html voce consegue ver onde encaixar esse codigo?


por que ja coloquei ele no inicio da pagina,final,meio e mesmo assim ele nao abre o Pop-PUp como nesse site que citei no Topico..

Vu postar a Index novamente:

Código:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>L2 ][ Server</title>
<link rel="stylesheet" href="css/site.css" type="text/css">
<link rel="shortcut icon" href="favicon.ico" /><link rel="icon" href="favicon.ico" />
<script src="scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script src="scripts/slideshow.js" type="text/javascript"></script>
<script src="scripts/menu_js.html" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="scripts/mening.js"></script>
<script language="JavaScript">
function abrir(URL) {
  var width = 600;
  var height = 330;
  var left = 99;
  var top = 99;
  window.open(URL,'janela', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}
</script>
<style type="text/css">
.style2 {
        color: #006600;
}
.style3 {
        text-align: center;
}
.style4 {
        border-width: 0px;
}
.style5 {
        color: #6B3200;
}
</style>
</head>
<body>

<div id="apDiv3" align="center">
 </tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" align="center" width="100%">
 <tr>
  <td align="left">
  <table width="992" border="0" align="center" cellpadding="0" cellspacing="0" class="banner">
    <tr>
    <td height="300" valign="top">&nbsp;
                <a href="index.html">
                <img src="http://www.secretwarez.net/images/logo2 copy copy.png" width="328" height="157" class="style4" /></a></td>
    </tr>
    <tr>
    <td valign="top" background="http://www.secretwarez.net/images/header_top.png" width="992" height="97">
      <table cellpadding="0" cellspacing="0" border="0">
      <tr>
        <td height="40" valign="top"></td>
      </tr>
      <tr>
        <td width="210"></td>
        <td class="style3" style="width: 575px">&nbsp;</td>
      </tr>
      </table>
    </td>
    </tr>
    <tr>
    <td valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="166" scope="col" valign="top">
<table cellpadding="0" cellspacing="0" border="0">
 <tr>
  <td><a href="index.html"><img src="http://www.secretwarez.net/images/menu/menu_top.png" border="0" /></a></td>
 </tr>
 <tr>
  <td>
<div id="navFloat">
<ul id="navInner">
 <li class="mainButtonContainer" id="navDiv_news">
  <a  href="#"  onclick="showSubNav('news'); return false;" id="newsBtn" class="navButtons"></a>
  <ul id="news">
  <li class="subNavContainer">
    <a class="subNavLink" id="news_from_abroad" href="news.html">Novidades do Server</a></li>
  <li class="subNavContainer">
    <a class="subNavLink" id="general_news" href="Ingame Events.html">Ingame Events</a></li>
  <li class="subNavContainer">
    <a  href="Server Update.html" class="subNavLink" id="general_news">Server Update</a>
  </ul>
 </li>
 <li class="mainButtonContainer" id="navDiv_account">
  <a  href="#"  onclick="showSubNav('account'); return false;" id="accountBtn" class="navButtons"></a>
  <ul id="account">
  <li class="subNavContainer">
    <a target="_blank" class="subNavLink" id="news_from_abroad" href="acc/?action=acc">Registro</a>
  </li>
  <li class="subNavContainer">
    <a  href="L2 Admin/index.php" class="subNavLink" id="L2 Admin/index.php">Sobre cadastro</a>
  </li>
  </ul>
 </li>
 <li class="mainButtonContainer" id="navDiv_download">
  <a  href="#"  onclick="showSubNav('download'); return false;" id="loreBtn" class="navButtons"></a>
  <ul id="download">
  <li class="subNavContainer">
    <a  href="http://www.gamershell.com/download_44070.shtml" target="_blank" class="subNavLink" id="news_from_abroad">Lineage II Gracia Final</a>
  </li>
  <li class="subNavContainer">
    <a class="subNavLink" id="general_news" href="1">L2 Server Patch</a>
  </li>
  <li class="subNavContainer">
    <a class="subNavLink" id="developer_blogs" href="Tutorial instalacao.html">Tutorial como instalar?</a>
  </li>
  </ul>
 </li>
 <li class="mainButtonContainer" id="navDiv_info">
  <a  href="#"  onclick="showSubNav('info'); return false;" id="game_guideBtn" class="navButtons"></a>
  <ul id="info">
  <li class="subNavContainer">
    <a  href="servidor.html" class="subNavLink" id="news_from_abroad">O Servidor</a>
  </li>
  <li class="subNavContainer">
    <a class="subNavLink" id="news_from_abroad" href="Server Estrutura.html">Server Estrutura</a>
  </li>
  <li class="subNavContainer">
    <a href="status/castles/index.php" target="_blank" class="subNavLink" id="developer_blogs">Castle Sieges </a></li>
  <li class="subNavContainer">
    <a class="subNavLink" id="developer_blogs" href="1">Raid Boss Information</a>
  </li>
  </ul>
 </li>
 
 <li class="mainButtonContainer" id="navDiv_donate">
  <a  href="#"  onclick="showSubNav('donate'); return false;" id="donaBtn" class="navButtons"></a>
  <ul id="donate">
  <li class="subNavContainer">
    <a class="subNavLink" id="news_from_abroad" href="Donations.html">Doaçoes</a>
  </li>
  <li class="subNavContainer">
    <a class="subNavLink" id="general_news" href="Donations Info.html">Infos Doaçoes</a>
  </li>
  </ul>
 </li>
 
 <li class="mainButtonContainer" id="navDiv_rank">
  <a  href="#"  onclick="showSubNav('rank'); return false;" id="communityBtn" class="navButtons"></a>
  <ul id="rank">
  <li class="subNavContainer">
    <a href="status/pkrank.php" target="_blank" class="subNavLink" id="news_from_abroad">Top PK</a>  </li>
  <li class="subNavContainer">
    <a href="status/pvprank.php" target="_blank" class="subNavLink" id="general_news">Top PVP</a>  </li>
  <li class="subNavContainer">
    <a href="status/top.php" target="_blank" class="subNavLink" id="developer_blogs">Top Online</a>  </li>
  <li class="subNavContainer">
    <a class="subNavLink" id="developer_blogs" href="1">Top Voters</a>
  </li>
  <li class="subNavContainer">
    <a href="status/clan.php" target="_blank" class="subNavLink" id="developer_blogs">Top Clans</a>  </li>
  </ul>
 </li>
 <li class="mainButtonContainer" id="navDiv_forum">
  <a  href="/forum/" target="_blank" id="mediaBtn" class="navButtons"></a>
 </li>
</ul>
</div>
<br /></td>
 </tr>
 <tr>
  <td background="http://www.secretwarez.net/images/menu/menu_header.png">
<div align="center">
</div>
  </td>
 </tr>
 <tr><td><img src="http://www.secretwarez.net/images/menu/menu_fim.png" /></td></tr>
</table>
        </td>
        <td width="825" valign="top" scope="col">
<table width="825" border="0" cellspacing="0" cellpadding="0">
 <tr>
  <td valign="top" width="485" align="left">
  <table cellpadding="0" cellspacing="0" border="0" width="485">
    <tr>
    <td align="center" valign="top" height="61" background="http://www.secretwarez.net/images/center_top.png" scope="col">
      <table cellpadding="0" cellspacing="0" border="0">
      <tr><td height="20"></td></tr>
      <tr><td align="center">Bem vindo ao  Lineage 2&nbsp; Server.</td></tr>
      </table>
    </td>
    </tr>
    <tr>
    <td valign="top" background="http://www.secretwarez.net/images/center_.png">
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td scope="col">
       

<div class="ler">
<p class="title">Lineage 2 Server</p>
<table cellpadding="0" cellspacing="0" border="0" align="left">
 <tr>
  <td><img src="http://www.secretwarez.net/images/home.png" /></td>
  <td width="15"></td>
 </tr>
</table>

L2  é um servidor gratuito de Lineage II 100% Brasileiro na versão <b>Gracia Final</b> com uma jogabilidade ótima e única nunca visto antes!<br /><br />

Servidor foi construído e administrado por uma equipe de 2 administradores, o que significa que o server nunca estará trabalhando sozinho e que os players estão seguro a qualquer erro ou injustiça sobre o servidor.<br /><br />

Não perca tempo, venha participar desta nova comunidade.<br />

<a href="/forum">F<span class="style5">orum</span></a><br /><br />

</div>
<div align="center"><img src="http://www.secretwarez.net/images/news_divider.png" /></div><br />
</div>
<br />
<br />
<br />
<br />

        </td>
      </tr>
      </table>
    </td>
    </tr>
    <tr>
    <td><img src="http://www.secretwarez.net/images/center_fim.png" width="485" height="20" /></td>
    </tr>
  </table>
  </td>
  <td valign="top" scope="col">
  <table width="330" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td>
      <div align="center">
      <div id="box1">
        <script language="javascript" type="text/javascript">slideshow1.init();</script>
        <noscript>
        </noscript>
      </div>
      </div>
    </td>
    </tr>
    <tr><td height="10"></td></tr>
    <tr>
    <td height="243" align="center" background="http://www.secretwarez.net/images/boxstatus.png" valign="top">
      <table width="300" align="center" cellpadding="0" cellspacing="0" border="0">
      <tr><td colspan="2" height="35"></td></tr>
      <tr>
        <td valign="top" width="150"><img src="http://www.secretwarez.net/images/server.png" /></td>
        <td valign="top" align="left">
        <br />
                        <br />
                        <br />
                        Game Server: <a href="" target="_blank"><img src="http://status.blackout-gaming.net/status.php?dns=.servegame.com&port=2106&style=12" alt="" border="0" /></a>
                        <span class="style2">Online</span><br />
                        <br />
                        Login Server: <a href="" target="_blank"><img src="http://status.blackout-gaming.net/status.php?dns=.servegame.com&port=9014&style=12" alt="Powered by Blackout Gaming Status Checker" border="0" /></a>
                        <span class="style2">Online</span><br />
                        <br />
                        Database:<a href="" target="_blank"><img src="http://status.blackout-gaming.net/status.php?dns=.servegame.com&port=9014&style=12" alt="Powered by Blackout Gaming Status Checker" border="0" /></a>
                        <span class="style2">Online</span><br />
                        <br />
                        Online Players:<br />
        </td>
      </tr>
      </table>
    </td>
    </tr>
  </table>
  </td>
 </tr>
</table>        </td>
      </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr><td height="15"></td></tr>
      <tr>
        <td scope="col">&nbsp;</td>
        <td width="826" height="129" background="http://www.secretwarez.net/images/fim.png" scope="col">
        <table cellpadding="0" cellspacing="0" border="0">
          <tr>
          <td width="20"></td>
          <td width="200">&nbsp;</td>
          <td width="20"></td>
          <td width="410">
            <span class="copyright">© 2009 - - All rights
                        reserved - L2 <br /></span><span class="ncsoft">Site
                        designer &amp; Lineage 2 information and images belong to L2, Inc.</span>
          </td>
          <td width="20"></td>
          <td><img src="http://www.secretwarez.net/images/lineage2_logo.png" /></td>
          </tr>
        </table>
        </td>
      </tr>
      </table>
    </td>
    </tr>
  </table>
  </td>
 </tr>
</table>
</div>
<table cellpadding="0" cellspacing="0" border="0" align="center" width="100%" height="560" class="header">
 <tr>
  <td>&nbsp;</td>
 </tr>
</table>
</body>


</html>


Setokaiba 16-08-2009 12:58 AM

Cara tu está abrindo com o bloco de notas?
Desde o início do tópico eu instrui que utilizasse um editor de web sites com o DreamWeaver por exemplo, que abre o arquivo index.html com o design completo do site, e permite a edição, ao invés de ter que por atrás de códigos escuros do bloco de notas, o que seria mais difícil pra tu.

Misho 16-08-2009 01:07 AM

Seto estou usando o Dream aqui sim, baixei a versao portatil do 8

Estou abrindo o index.html usando ele ...

Peguei o arquivo do primeiro bloco e salvei com o nome que vc indico, Ok

Depois o segundo bloco?o que fassu com aquele arquivo?


E o que vou por na minha index a final?

Código:

function go_nav() {
       
  if (document.getElementById && document.createTextNode) {       
       
        var user_link = document.getElementById("my_links").value;       
   
        window.location = user_link;
       
        return false;
       
  }
 
}



Uma duvida,pra esses Pop-Pup aparecer, eu devo ter algum arquivo HTML com nome dos rank?


Horários baseados na GMT -3. Agora são 07:11 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0