View Source: /source/village.php
Click here for the source, OR
Other files that you may wish to view the source of:
<?
require_once "common.php";
/*
if ($session[user][superuser] && $HTTP_GET_VARS[op]=="newday"){
//this is old code, but I'll leave it around in case I depend on it when I don't realize it.
$sql = "UPDATE accounts SET laston = '".date("Y-m-d H:i:s",strtotime("-1 day"))."'";
db_query($sql);
redirect("village.php");
}
*/
checkday();
if ($session['user']['alive']){ }else{
redirect("shades.php");
}
if (getsetting("automaster",1) && $session['user']['seenmaster']!=1){
$exparray=array(1=>100,300,602,1012,1540,2207,3041,4085,5395,7043,9121,11740,15037,19171,24330);
//$exparray[$key]=$val*2;
while (list($key,$val)=each($exparray)){
$exparray[$key]=$val + (pow($key-1,2)*100);
}
$expreqd = $exparray[$session['user']['level']] * 2;
if ($session['user']['experience']>$expreqd && $session['user']['level']<15){
redirect("train.php?op=autochallenge");
}
}
addnav("`bCombat`b");
addnav("Forest","forest.php");
addnav("Bluspring's Warrior Training","train.php");
if (getsetting("pvp",1)){
addnav("Slay Other Players","pvp.php");
}
addnav("Commerce");
addnav("MightyE's Weaponry","weapons.php");
addnav("Pegasus Armor","armor.php");
addnav("Ye Olde Bank","bank.php");
addnav("T`5he Inn`0","inn.php",true);
addnav("Stables","stables.php");
addnav("Gypsy Tent","gypsy.php");
addnav("`bOther`b");
//$nav.="<a class='nav' href='petition.php?op=faq' target='_blank' onClick=\"".popup("petition.php?op=faq")."; return false;\">".translate("F.A.Q. (newbies start here)")."<br></a>";
$nav.=templatereplace("navitem",array("text"=>translate("F.A.Q. (newbies start here)"),
"link"=>"petition.php?op=faq\" target='_blank' onClick=\"".popup("petition.php?op=faq")."; return false;\"",
"accesskey"=>""));
addnav("Daily News","news.php");
addnav("Preferences","prefs.php");
addnav("List Warriors","list.php");
addnav("Hall of Fame","hof.php");
addnav("`%Quit`0 to the fields","login.php?op=logout",true);
if ($session[user][superuser]>=2){
addnav("`bSuperuser Grotto`b","superuser.php");
}
//let users try to cheat, we protect against this and will know if they try.
addnav("","superuser.php");
addnav("","user.php");
addnav("","taunt.php");
addnav("","creatures.php");
addnav("","configuration.php");
if ($session[user][superuser]){
addnav("New Day","newday.php");
}
page_header("Village Square");
//output("<img src='images/trans.gif' width='1' height='700' alt='' align='right'>",true);
output("`@`c`bVillage Square`b`cThe village hustles and bustles. No one really notices that you're standing there.");
output(" You see various shops and businesses along main street. There is a curious looking rock to one side. ");
output("On every side the village is surrounded by deep dark forest.`n`n");
output("The clock on the inn reads `^".getgametime()."`@.");
// $t1 = strtotime("now")*getsetting("daysperday",4);
// $t2 = strtotime($session[user][lasthit])*getsetting("daysperday",4);
// $d1 = date("Y-m-d",$t1);
// $d2 = date("Y-m-d",$t2);
//output("`n`nToday is $d1, your last new day was $d2");
output("`n`n`%`@Nearby some villagers talk:`n");
commentary("village","Add",25);
page_footer();
?>