come fare per aggiornare gold club ed avere l opzione di terminare le truppe ?

Stato
Discussione chiusa ad ulteriori risposte.
Vai in /Templates/menu.tpl cancella tutto e incollaci questo
PHP:
<?php
/** --------------------------------------------------- **\| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* |+---------------------------------------------------------+| Credits:     All the developers including the leaders:  ||              Advocaite & Dzoki & Donnchadh              ||                                                         || Copyright:   TravianX Project All rights reserved       |\** --------------------------------------------------- **/
?><?phpif(!$session->logged_in) {?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>    <title></title>    <style type="text/css">div.c1 {text-align: center}    </style></head>
<body>    <div id="side_navi">        <a id="logo" href="<?php echo HOMEPAGE; ?>" name="logo"><img src="img/x.gif" alt="Travian"></a>
        <p><a href="<?php echo HOMEPAGE; ?>"><?php echo HOME; ?></a> <a href="login.php"><?php echo LOGIN; ?></a> <a href="anmelden.php"><?php echo REG; ?></a></p>    </div><?php    }    else {    ?>
    <div id="side_navi">        <a id="logo" href="<?php echo HOMEPAGE; ?>" name="logo"><img src="img/x.gif" <?php if($session->plus) { echo "class=\"logo_plus\""; } ?> alt="Travian"></a>

        <p><a href="<?php echo HOMEPAGE; ?>"><?php echo HOME; ?></a> <a href="spieler.php?uid=<?php echo $session->uid; ?>"><?php echo PROFILE; ?></a> <a href="#" onclick="return Popup(0,0,1);"><?php echo INSTRUCT; ?></a> <?php if($session->access == MULTIHUNTER) {
                    echo "<a href=\"Admin/admin.php\"><font color=\"Blue\">Multihunter Panel</font></a>";                    } ?> <?php if($session->access == ADMIN) {                    echo "<a href=\"Admin/admin.php\"><font color=\"Red\">Admin Panel</font></a>";                    echo "<a href=\"massmessage.php\">Mass Message</a>";                    echo "<a href=\"medals.php\">Update Top 10</a>";                    echo "<a href=\"sysmsg.php\">System message</a>";					echo "<a href=\"create_account.php\">Create Natars</a><br>";                    } ?> <a href="completa_coda.php">Completa la coda</a><br>					<a href="logout.php"><?php echo LOGOUT; ?></a></p>
		<a href="rules.php"><b>Game Rules</b></a>         <p><a href="plus.php?id=3">Travian <b><span class="plus_g">P</span><span class="plus_o">l</span><span class="plus_g">u</span><span class="plus_o">s</span></b></a>                    <a href="support.php"><b>Support</b></a>         <br></p>		<?php		$timestamp = $database->isDeleting($session->uid);		if($timestamp) {		echo "<td colspan=\"2\" class=\"count\">";		if($timestamp > time()+48*3600) {		echo "<a href=\"spieler.php?s=3&id=".$session->uid."&a=1&e=4\"><img		class=\"del\" src=\"img/x.gif\" alt=\"Cancel process\"		title=\"Cancel process\" /> </a>";        }		$time=$generator->getTimeFormat(($timestamp-time()));        echo "<a href=\"spieler.php?s=3\"> The account will be deleted in <span		id=\"timer1\">".$time."</span> .</a></td>";		}		?>    </div><?php    if($_SESSION['ok']=='1'){    ?>
    <div id="content" class="village1">        <h1>Announcement</h1></br>        <h3>Hi <?php echo $session->username; ?>,</h3>        <?php include("Templates/text.tpl"); ?>        <div class="c1">		</br>            <h3><a href="dorf1.php?ok">&raquo; Go to my village</a></h3>        </div>    </div>
    <div id="side_info">        <?php        include("Templates/quest.tpl");        include("Templates/news.tpl");        include("Templates/multivillage.tpl");        include("Templates/links.tpl");        ?>    </div>
    <div class="clear"></div>
    <div class="footer-stopper"></div>
    <div class="clear"></div><?php     include("Templates/footer.tpl");     include("Templates/res.tpl");     ?>
    <div id="stime">        <div id="ltime">            <div id="ltimeWrap">                Calculated in <b><?php                echo round(($generator->pageLoadTimeEnd()-$start)*1000);                ?></b> ms                <br>                Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>            </div>        </div>    </div>
    <div id="ce"></div><?php    die();    }    }    ?></body></html>
poi crea un nuovo file e chiamalo completa_coda.php mettilo nella root del tuo sito e incollaci questo
PHP:
<?php\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\file name: completa_coda.php\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\include("GameEngine/Village.php");$start = $generator->pageLoadTimeStart();if(isset($_GET['newdid'])) {    $_SESSION['wid'] = $_GET['newdid'];    header("Location: ".$_SERVER['PHP_SELF']);}else {    $building->procBuild($_GET);}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title><?php echo SERVER_NAME ?></title><link REL="shortcut icon" HREF="favicon.ico"/><meta http-equiv="cache-control" content="max-age=0" /><meta http-equiv="pragma" content="no-cache" /><meta http-equiv="expires" content="0" /><meta http-equiv="imagetoolbar" content="no" /><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><script src="mt-full.js?0faaa" type="text/javascript"></script><script src="unx.js?0faaa" type="text/javascript"></script><script src="new.js?0faaa" type="text/javascript"></script><link href="<?php echo GP_LOCATE; ?>lang/en/lang.css?f4b7c" rel="stylesheet" type="text/css" /><link href="<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css" /><?phpif($session->gpack == null || GP_ENABLE == false) {echo "<link href='".GP_LOCATE."travian.css?e21d2' rel='stylesheet' type='text/css' /><link href='".GP_LOCATE."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";} else {echo "<link href='".$session->gpack."travian.css?e21d2' rel='stylesheet' type='text/css' /><link href='".$session->gpack."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";}?><script type="text/javascript">window.addEvent('domready', start);</script></head><body class="v35 ie ie8"><div class="wrapper"><img style="filter: chroma();" src="img/x.gif" id="msfilter" alt=""><div id="dynamic_header"></div><?php include("Templates/header.tpl"); ?><div id="mid"><?php include("Templates/menu.tpl"); ?><div id="content"  class="village2"><br /><br /><br /><h2>Complete Queued Troops in This Village <img class="unit u3" src="img/x.gif"/><img class="unit u11" src="img/x.gif"/><img class="unit u18" src="img/x.gif"/><img class="unit u24" src="img/x.gif"/></h2><br /><h2><?php echo '<a href="plus.php?id=3"><img src="gold.png" alt="Remaining gold" title="You currently have: '.$session->gold.' gold"/></a> You have: '.$session->gold.' Gold'; ?></h2><form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"> <table border="0"><tr><td>Username UID:</td><td><input type="text" name="username" maxlength="60" disabled="disabled" value="<?php echo $session->uid; ?>"></td></tr><tr><td>Village ID (Current Village):</td><td><input type="text" name="village" maxlength="60" disabled="disabled" value="<?php echo $village->wid; ?>"></td></tr><tr><td colspan="2" align="right"> <input type="submit" name="submit" value="Complete Troop Queues In This Village"> </td></tr> </table> </form> <?phperror_reporting (E_ALL ^ E_NOTICE);include ("extra_mysql.php");if (isset($_POST['submit'])) { // if form has been submitted// checks it against the database$check = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());//Gives error if user dosen't exist$check2 = mysql_num_rows($check);if ($check2 == 0) {die('Username id or Village id is wrong. <a href=dorf1.php>Click Here to go back to your village</a>');}//Gives error if user dosen't exist$check2 = mysql_num_rows($check);if ($check2 == 0) {die('Username uid or Village id is wrong. <a href=dorf1.php>Click Here to go back to your village</a>');}                    $sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());while($row = mysql_fetch_array($sql)){};$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());while($row = mysql_fetch_array($sql)){$gold = $row["gold"];};if ($gold < 15 ) {die('Sorry you dont have enough gold');}else {mysql_query("UPDATE ".TB_PREFIX."users SET `gold` = `gold`- 15 WHERE id ='".$session->uid."'")or die(mysql_error());    mysql_query("UPDATE ".TB_PREFIX."training SET `commence` = 0 WHERE vref ='".$village->wid."'")or die(mysql_error());echo "<h2>All Queued Troops In This Village Completed at the Cost of 15 Gold.</h2>";}}?><br></div><div id="side_info"><?phpinclude("Templates/quest.tpl");include("Templates/multivillage.tpl");include("Templates/links.tpl");include("Templates/news.tpl");?></div><div class="clear"></div></div><div class="footer-stopper"></div><div class="clear"></div><?phpinclude("Templates/res.tpl");include("Templates/footer.tpl"); ?><div id="stime"><div id="ltime"><div id="ltimeWrap">Calculated in <b><?phpecho round(($generator->pageLoadTimeEnd()-$start)*1000);?></b> ms<br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span></div></div></div><div id="ce"></html>
 
  • Mi piace
Reazioni: pier94 e BUCO
Vai in /Templates/menu.tpl cancella tutto e incollaci questo
PHP:
<?php
/** --------------------------------------------------- **\| ********* DO NOT REMOVE THIS COPYRIGHT NOTICE ********* |+---------------------------------------------------------+| Credits:     All the developers including the leaders:  ||              Advocaite & Dzoki & Donnchadh              ||                                                         || Copyright:   TravianX Project All rights reserved       |\** --------------------------------------------------- **/
?><?phpif(!$session->logged_in) {?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>    <title></title>    <style type="text/css">div.c1 {text-align: center}    </style></head>
<body>    <div id="side_navi">        <a rel="nofollow" id="logo" href="<?php echo HOMEPAGE; ?>" name="logo"><img src="img/x.gif" alt="Travian"></a>
        <p><a rel="nofollow" href="<?php echo HOMEPAGE; ?>"><?php echo HOME; ?></a> <a href="login.php"><?php echo LOGIN; ?></a> <a href="anmelden.php"><?php echo REG; ?></a></p>    </div><?php    }    else {    ?>
    <div id="side_navi">        <a rel="nofollow" id="logo" href="<?php echo HOMEPAGE; ?>" name="logo"><img src="img/x.gif" <?php if($session->plus) { echo "class=\"logo_plus\""; } ?> alt="Travian"></a>

        <p><a rel="nofollow" href="<?php echo HOMEPAGE; ?>"><?php echo HOME; ?></a> <a rel="nofollow" href="spieler.php?uid=<?php echo $session->uid; ?>"><?php echo PROFILE; ?></a> <a href="#" onclick="return Popup(0,0,1);"><?php echo INSTRUCT; ?></a> <?php if($session->access == MULTIHUNTER) {
                    echo "<a href=\"Admin/admin.php\"><font color=\"Blue\">Multihunter Panel</font></a>";                    } ?> <?php if($session->access == ADMIN) {                    echo "<a href=\"Admin/admin.php\"><font color=\"Red\">Admin Panel</font></a>";                    echo "<a href=\"massmessage.php\">Mass Message</a>";                    echo "<a href=\"medals.php\">Update Top 10</a>";                    echo "<a href=\"sysmsg.php\">System message</a>";                    echo "<a href=\"create_account.php\">Create Natars</a><br>";                    } ?> <a href="completa_coda.php">Completa la coda</a><br>                    <a href="logout.php"><?php echo LOGOUT; ?></a></p>
        <a href="rules.php"><b>Game Rules</b></a>         <p><a rel="nofollow" href="plus.php?id=3">Travian <b><span class="plus_g">P</span><span class="plus_o">l</span><span class="plus_g">u</span><span class="plus_o">s</span></b></a>                    <a href="support.php"><b>Support</b></a>         <br></p>        <?php        $timestamp = $database->isDeleting($session->uid);        if($timestamp) {        echo "<td colspan=\"2\" class=\"count\">";        if($timestamp > time()+48*3600) {        echo "<a href=\"spieler.php?s=3&id=".$session->uid."&a=1&e=4\"><img        class=\"del\" src=\"img/x.gif\" alt=\"Cancel process\"        title=\"Cancel process\" /> </a>";        }        $time=$generator->getTimeFormat(($timestamp-time()));        echo "<a href=\"spieler.php?s=3\"> The account will be deleted in <span        id=\"timer1\">".$time."</span> .</a></td>";        }        ?>    </div><?php    if($_SESSION['ok']=='1'){    ?>
    <div id="content" class="village1">        <h1>Announcement</h1></br>        <h3>Hi <?php echo $session->username; ?>,</h3>        <?php include("Templates/text.tpl"); ?>        <div class="c1">        </br>            <h3><a rel="nofollow" href="dorf1.php?ok">&raquo; Go to my village</a></h3>        </div>    </div>
    <div id="side_info">        <?php        include("Templates/quest.tpl");        include("Templates/news.tpl");        include("Templates/multivillage.tpl");        include("Templates/links.tpl");        ?>    </div>
    <div class="clear"></div>
    <div class="footer-stopper"></div>
    <div class="clear"></div><?php     include("Templates/footer.tpl");     include("Templates/res.tpl");     ?>
    <div id="stime">        <div id="ltime">            <div id="ltimeWrap">                Calculated in <b><?php                echo round(($generator->pageLoadTimeEnd()-$start)*1000);                ?></b> ms                <br>                Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span>            </div>        </div>    </div>
    <div id="ce"></div><?php    die();    }    }    ?></body></html>
poi crea un nuovo file e chiamalo completa_coda.php mettilo nella root del tuo sito e incollaci questo
PHP:
<?php\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\file name: completa_coda.php\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\include("GameEngine/Village.php");$start = $generator->pageLoadTimeStart();if(isset($_GET['newdid'])) {    $_SESSION['wid'] = $_GET['newdid'];    header("Location: ".$_SERVER['PHP_SELF']);}else {    $building->procBuild($_GET);}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title><?php echo SERVER_NAME ?></title><link REL="shortcut icon" HREF="favicon.ico"/><meta http-equiv="cache-control" content="max-age=0" /><meta http-equiv="pragma" content="no-cache" /><meta http-equiv="expires" content="0" /><meta http-equiv="imagetoolbar" content="no" /><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><script src="mt-full.js?0faaa" type="text/javascript"></script><script src="unx.js?0faaa" type="text/javascript"></script><script src="new.js?0faaa" type="text/javascript"></script><link href="<?php echo GP_LOCATE; ?>lang/en/lang.css?f4b7c" rel="stylesheet" type="text/css" /><link href="<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7c" rel="stylesheet" type="text/css" /><?phpif($session->gpack == null || GP_ENABLE == false) {echo "<link href='".GP_LOCATE."travian.css?e21d2' rel='stylesheet' type='text/css' /><link href='".GP_LOCATE."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";} else {echo "<link href='".$session->gpack."travian.css?e21d2' rel='stylesheet' type='text/css' /><link href='".$session->gpack."lang/en/lang.css?e21d2' rel='stylesheet' type='text/css' />";}?><script type="text/javascript">window.addEvent('domready', start);</script></head><body class="v35 ie ie8"><div class="wrapper"><img style="filter: chroma();" src="img/x.gif" id="msfilter" alt=""><div id="dynamic_header"></div><?php include("Templates/header.tpl"); ?><div id="mid"><?php include("Templates/menu.tpl"); ?><div id="content"  class="village2"><br /><br /><br /><h2>Complete Queued Troops in This Village <img class="unit u3" src="img/x.gif"/><img class="unit u11" src="img/x.gif"/><img class="unit u18" src="img/x.gif"/><img class="unit u24" src="img/x.gif"/></h2><br /><h2><?php echo '<a rel="nofollow" href="plus.php?id=3"><img src="gold.png" alt="Remaining gold" title="You currently have: '.$session->gold.' gold"/></a> You have: '.$session->gold.' Gold'; ?></h2><form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"> <table border="0"><tr><td>Username UID:</td><td><input type="text" name="username" maxlength="60" disabled="disabled" value="<?php echo $session->uid; ?>"></td></tr><tr><td>Village ID (Current Village):</td><td><input type="text" name="village" maxlength="60" disabled="disabled" value="<?php echo $village->wid; ?>"></td></tr><tr><td colspan="2" align="right"> <input type="submit" name="submit" value="Complete Troop Queues In This Village"> </td></tr> </table> </form> <?phperror_reporting (E_ALL ^ E_NOTICE);include ("extra_mysql.php");if (isset($_POST['submit'])) { // if form has been submitted// checks it against the database$check = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());//Gives error if user dosen't exist$check2 = mysql_num_rows($check);if ($check2 == 0) {die('Username id or Village id is wrong. <a href=dorf1.php>Click Here to go back to your village</a>');}//Gives error if user dosen't exist$check2 = mysql_num_rows($check);if ($check2 == 0) {die('Username uid or Village id is wrong. <a href=dorf1.php>Click Here to go back to your village</a>');}                    $sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());while($row = mysql_fetch_array($sql)){};$sql = mysql_query("SELECT * FROM ".TB_PREFIX."users WHERE id  = '".$session->uid."'")or die(mysql_error());while($row = mysql_fetch_array($sql)){$gold = $row["gold"];};if ($gold < 15 ) {die('Sorry you dont have enough gold');}else {mysql_query("UPDATE ".TB_PREFIX."users SET `gold` = `gold`- 15 WHERE id ='".$session->uid."'")or die(mysql_error());    mysql_query("UPDATE ".TB_PREFIX."training SET `commence` = 0 WHERE vref ='".$village->wid."'")or die(mysql_error());echo "<h2>All Queued Troops In This Village Completed at the Cost of 15 Gold.</h2>";}}?><br></div><div id="side_info"><?phpinclude("Templates/quest.tpl");include("Templates/multivillage.tpl");include("Templates/links.tpl");include("Templates/news.tpl");?></div><div class="clear"></div></div><div class="footer-stopper"></div><div class="clear"></div><?phpinclude("Templates/res.tpl");include("Templates/footer.tpl"); ?><div id="stime"><div id="ltime"><div id="ltimeWrap">Calculated in <b><?phpecho round(($generator->pageLoadTimeEnd()-$start)*1000);?></b> ms<br />Server time: <span id="tp1" class="b"><?php echo date('H:i:s'); ?></span></div></div></div><div id="ce"></html>


sai anche come togliere il limite dei campi al 20?
 
Stato
Discussione chiusa ad ulteriori risposte.