'; // nem aktiváltak törlése $egyhet=604800; $sql="select id from felhasznalok where (datum+".$egyhet.")<".time()." and aktiv='0'"; $res=mysql_query($sql,_sql); if(mysql_num_rows($res)){ while($torolni=mysql_fetch_assoc($res)){ $sql="delete from felhasznalok where id=".quote($torolni['id']); mysql_query($sql,_sql); } } // aktiválás if(isset($_GET['reg'])){ $sql="select id from felhasznalok where code=".quote($_GET['reg'])." and aktiv='0'"; $result=mysql_query($sql,_sql) or die(mysql_error().$sql); echo $sql; if(mysql_num_rows($result)){ $regisztral=mysql_fetch_assoc($result); $sq="update felhasznalok set aktiv='1' where id=".quote($regisztral['id']); mysql_query($sq,_sql) or die(mysql_error().$sq); $index['content']=file_get_contents('tpl/reg_aktival_elfogad.html'); } else $index['content']=file_get_contents('tpl/reg_aktival_elutasit.html'); } // oldalak betöltése if($index['content']=='') { if (isset($_GET['p'])) { if (is_file(_inc.$_GET['p'].'.php')) { include(_inc.$_GET['p'].'.php'); $index['content']=$_GET['p'](); } else { if (is_file(_inc.'termekek.php')) { include(_inc.'termekek.php'); $index['content']=termekek(); } } } else { if (is_file(_inc.'termekek.php')) { include(_inc.'termekek.php'); $index['content']=termekek(); } } } if (isset($_GET['p'])) { $index['action_belep']='index.php?p='.$_GET['p'].'&login=1'; $index['action_kilep']='index.php?p='.$_GET['p'].'&kilep=1'; } else { $index['action_belep']='index.php?login=1'; $index['action_kilep']='index.php?kilep=1'; } header('Content-Type: text/html; charset=iso-8859-2'); echo use_tpl('index',$index); db_off(); ?>