Jump to content
  • 0

Question

Posted

Hello, i have a problem, i change the time of the next sieges in the DB (mysql), in the console and in the npc to register for the siege both have the same data that i put in the db so it's ok, but in in the website in the castle section it have a different time for the sieges, what i should change to it have the same data like in the DB and in the console and npc?...

 

here is a image:

sqlcastle.jpg

 

and the website castle section code:

 


    <!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=utf-8" />
    <?php include("config.php");?>
    <title>Untitled Document</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    </head>

    <body>
        <div id="content">
            <div id="textbox">
                <div id="pagetitle">Castle Siege of L2<?php print ("$servername");?></div>
                <p> </p>
                <center>
              <table width="500px" border="0" align="center">
      <tr class="rowt" align="center" height="25">
        <td>Castle:</td>
        <td>Clan:</td>
        <td>Lord Castle:</td>
        <td>Alliance:</td>
        <td>Next Siege:</td>
     </tr>
    <?php
    //Script de Top Pk.
    //Script Desenvolvido por: Jonatha ferreira.
    //Email: jonathaferreira@live.com.
    $db['servidor'] = "localhost";//Nome do servidor
    $db['usuario_mysql'] = "root";// Usuario do mysql
    $db['senha_mysql'] = "root";//Senha do mysql
    $db['banco_de_dados'] = "l2jdb";//Nome d banco de dados
    $open = mysql_connect($db['servidor'], $db['usuario_mysql'], $db['senha_mysql']) or die("Não foi possível conectar-se à database.");
    $select_db = mysql_select_db($db['banco_de_dados'], $open) or die("Database não encontrada ou inexistente.");
    $sql = mysql_query("SELECT * FROM castle ORDER BY name") or die(mysql_error());
    $cor = 0;
    while($c = mysql_fetch_array($sql)) {
          $cor = $cor + 1;
          $bg  = $cor % 2 == 0 ? '#F1F1F1' : '#FFFFFF';

          $cl = mysql_query("SELECT * FROM clan_data WHERE hasCastle = '".$c['id']."'") or die(mysql_error());
          $clan = mysql_fetch_array($cl);
         
          $l = mysql_query("SELECT * FROM characters WHERE obj_id = '".$clan['leader_id']."'") or die(mysql_error());
          $lord = mysql_fetch_array($l);

    ?>

      <tr bgcolor="<?php echo $bg; ?>" class="style8" align="center" height="23">
        <td><a style="color:#000;text-decoration:none;" href="#" class="tooltip" ><span><font color="#FF9900"><?php echo $c['name'];?></font><br />
        </span> </a></td>
        <td><?php echo !empty($clan['clan_name']) ? $clan['clan_name'] : "No Clan"; ?></td>
        <td><?php echo !empty($lord['char_name']) ? $lord['char_name'] : "No Lord"; ?></td>
        <td><?php echo !empty($clan['ally_name']) ? $clan['ally_name'] : "No Ally"; ?></td>
        <td><?php echo @date('D\, j M Y H\:i',$c['siegeDate']/1000); ?></td>
      </tr>
    <?php
    }
    ?>
    </table>
              <p> </p>
              </center>
    </div>
        </div>
    </body>
    </html>

3 answers to this question

Recommended Posts

  • 0
Posted

Maybe it's showing the date based on host (website) GMT which is other than yours? :o I can't really say :P

  • 0
Posted

help :D

 

So what i understand is:

  • You wanna change siege dates;
  • The php code you show did not works correct or at all;

what i can't understand is:

  • How we can solve the php if we don't know your database columns etc...( the screenshot doesn't show all i need)
  • Isn't there a control panel about that in-game or no?

Guest
This topic is now closed to further replies.


×
×
  • Create New...