require_once "common.php";
//echo(strpos($_SERVER['SERVER_NAME'],"logd.mightye.org"));
$old = getsetting("expireoldacct",45);
$new = getsetting("expirenewacct",10);
$trash = getsetting("expiretrashacct",1);
$sql = "DELETE FROM accounts WHERE superuser<=1 AND (1=0\n"
.($old>0?"OR (laston < \"".date("Y-m-d H:i:s",strtotime("-$old days"))."\")\n":"")
.($new>0?"OR (laston < \"".date("Y-m-d H:i:s",strtotime("-$new days"))."\" AND level=1 AND dragonkills=0)\n":"")
.($trash>0?"OR (laston < \"".date("Y-m-d H:i:s",strtotime("-".($trash+1)." days"))."\" AND level=1 AND experience < 10 AND dragonkills=0)\n":"")
.")";
//echo "
".HTMLEntities($sql)."
";
db_query($sql) or die(db_error(LINK));
$old-=5;
$sql = "SELECT acctid,emailaddress FROM accounts WHERE 1=0 "
.($old>0?"OR (laston < \"".date("Y-m-d H:i:s",fixedtime("-$old days"))."\")\n":"")
." AND emailaddress!='' AND sentnotice=0";
$result = db_query($sql);
for ($i=0;$i".HTMLEntities($sql)."";
if ($session[loggedin]){
redirect("badnav.php");
}
page_header("Legend of the Green Leupak");
output("`cWelcome to Legend of the Green Leupak, a shameless knockoff of Seth Able's Legend of the Red Dragon.`n");
output("`@The current time in the village is `!".getgametime()."`@.`0`n");
output("Enter your name and password to enter the realm.`n");
if ($_GET['op']=="timeout"){
$session['message'].="Your session has timed out, you must log in again.`n";
if (!isset($_COOKIE['PHPSESSID'])){
$session['message'].="Also, it appears that you may be blocking cookies from this site. At least session cookies must be enabled in order to use this site.`n";
}
}
if ($session[message]>"") output("`b`\$$session[message]`b`n");
output("`c",true);
//output("`n`b`&**BETA**`0 This is a BETA of this website, things are likely to change now and again, as it is under active development (when I have time ;-)) `&**BETA**`0`n");
output("`n`b`&".getsetting("loginbanner","Warning -- this application is under frequent revision, and may suffer temporary downtimes, as it is under active development.")."`0`b`n");
$session[message]="";
clearnav();
addnav("New to LoGL?");
addnav("Create a character","create.php");
addnav("Other");
addnav("About LoGL","about.php");
addnav("List Warriors","list.php");
addnav("LoGD Net","logdnet.php?op=list");
addnav("Forgotten Password","create.php?op=forgot");
page_footer();
?>