() DLE

DataLife Engine , . () "./index.php?do=login".

"engine/engine.php" :

switch ( $do ) {

:

case 'login':
$tpl->load_template( 'login_page.tpl' );
$tpl->set( '{registration-link}', $PHP_SELF . "?do=register" );
$tpl->set( '{lostpassword-link}', $PHP_SELF . "?do=lostpassword" );
$tpl->set( '{logout-link}', $PHP_SELF . "?action=logout" );
$tpl->set( '{admin-link}', $config['http_home_url'] . $config['admin_path'] . "?mod=main" );
$tpl->set( '{login}', $member_id['name'] );
$tpl->set( '{pm-link}', $PHP_SELF . "?do=pm" );
$tpl->set( '{new-pm}', $member_id['pm_unread'] );
$tpl->set( '{all-pm}', $member_id['pm_all'] );

if ($member_id['favorites']) {
$tpl->set( '{favorite-count}', count(explode("," ,$member_id['favorites'])) );
}
else $tpl->set( '{favorite-count}', '0' );

if( $member_id['foto'] ) $tpl->set( '{foto}', $config['http_home_url'] . "uploads/fotos/" . $member_id['foto'] );
else $tpl->set( '{foto}', "{THEME}/images/noavatar.png" );

if ( $user_group[$member_id['user_group']]['allow_admin'] ) {
$tpl->set( '[admin-link]', "" );
$tpl->set( '[/admin-link]', "" );
} else {
$tpl->set_block( "'\\[admin-link\\](.*?)\\[/admin-link\\]'si", "" );
}

if ($config['allow_alt_url'] == "yes") {
$tpl->set( '{profile-link}', $config['http_home_url'] . "user/" . urlencode ( $member_id['name'] ) . "/" );
$tpl->set( '{stats-link}', $config['http_home_url'] . "statistics.html" );
$tpl->set( '{addnews-link}', $config['http_home_url'] . "addnews.html" );
$tpl->set( '{favorites-link}', $config['http_home_url'] . "favorites/" );
$tpl->set( '{newposts-link}', $config['http_home_url'] . "newposts/" );

} else {
$tpl->set( '{profile-link}', $PHP_SELF . "?subaction=userinfo&user=" . urlencode ( $member_id['name'] ) );
$tpl->set( '{stats-link}', $PHP_SELF . "?do=stats" );
$tpl->set( '{addnews-link}', $PHP_SELF . "?do=addnews" );
$tpl->set( '{favorites-link}', $PHP_SELF . "?do=favorites" );
$tpl->set( '{newposts-link}', $PHP_SELF . "?subaction=newposts" );

}
$tpl->compile( 'content' );
break;


"login.tpl" "login_page.tpl". .