i18n::translate('Login'), 'type'=>'both', // On My Page, this becomes a Logout block 'descr'=>i18n::translate('The Login block accepts a user name and password for users to login.'), 'canconfig'=>false, 'config'=>array( 'cache'=>0 ) ); /** * Print Login Block * * Prints a block allowing the user to login to the site directly from the portal */ function print_login_block($block = true, $config="", $side, $index) { global $QUERY_STRING, $USE_REGISTRATION_MODULE, $TEXT_DIRECTION; if (WT_USER_ID) { $id="logout_block"; $title = i18n::translate('Logout'); $i = 0; // Initialize tab index $content = '
'; $content .= '
'.i18n::translate('Logged in as ').' ('.WT_USER_NAME.')

'; $i++; $content .= ""; $content .= "

"; } else { $id="login_block"; $i = 0; // Initialize tab index $title = i18n::translate('Login'); if ($USE_REGISTRATION_MODULE) { $title.=help_link('index_login_register'); } else { $title.=help_link('index_login'); } $LOGIN_URL=get_site_setting('LOGIN_URL'); $content = "
"; $content .= ""; $content .= ""; $content .= ""; $content .= ""; $content .= ""; $content .= ""; // Row 1: Userid $i++; $content .= ""; // Row 2: Password $i++; $content .= ""; // Row 3: "Login" link $i++; $content .= ""; if ($USE_REGISTRATION_MODULE) { // Row 4: "Request Account" link $i++; $content .= ""; // Row 5: "Lost Password" link $i++; $content .= ""; } $content .= "
"; $content .= i18n::translate('User name'); $content .= help_link('username'); $content .= ""; $content .= "
"; $content .= i18n::translate('Password'); $content .= help_link('password'); $content .= ""; $content .= "
"; $content .= " "; $content .= "

"; $content .= i18n::translate('No account?'); $content .= help_link('new_user'); $content .= "

"; $content .= ""; $content .= i18n::translate('Request new user account'); $content .= ""; $content .= "
"; $content .= i18n::translate('Lost your password?'); $content .= help_link('new_password'); $content .= ""; $content .= ""; $content .= i18n::translate('Request new password'); $content .= ""; $content .= "
"; $content .= "
"; } global $THEME_DIR; if ($block) { require $THEME_DIR.'templates/block_small_temp.php'; } else { require $THEME_DIR.'templates/block_main_temp.php'; } } ?>