Example #1
0
function imo_top()
{
    //include('forum_old/SSI.php');
    //$cpath = "http://ilmarching.com" . $_SERVER["SCRIPT_NAME"];
    //$_SESSION['login_url'] = $cpath;
    //$_SESSION['logout_url'] = $cpath;
    htmlhead();
    contentbody();
    contentheader();
    start_content();
}
function do_login_page($message)
{
    start_content();
    echo '<script type="text/javascript" src="sha512.js"></script>';
    echo '<script type="text/javascript" src="forms.js"></script>';
    ?>
        <script type="text/javascript">
		    function validate() {
				if (document.getElementById('username').value=='' || document.getElementById('password').value=='') {
					document.getElementById('error_text').innerHTML = 'You did not fill out all of the required fields. Please try again.';
					return false;
				}
				else {
					formhash(login_form, login_form.password);
					return true;
				}
			}
		</script>
        <div id="loading_screen" style="display:none"><h2 align="center"><img src="ajax-loader.gif" style="vertical-align: middle "/>&nbsp;Loading...</h2></div>
		<div id="login_box">
        <p class="alert" id="error_text"><?php 
    echo $message;
    ?>
</p>
        <form action="login.php" method="post" name="login_form" id="login_form" onsubmit="return validate();">
        <p>Username:&nbsp;<input type="text" name="username" id="username" size="20" maxlength="20" value="<?php 
    if (!empty($GLOBALS['username'])) {
        echo $GLOBALS['username'];
    }
    ?>
" /></p>
        <p>Password:&nbsp;&nbsp;<input type="password" name="password" id="password" length="20" size="20" /></p>
		<div align="center"><input type="submit" value="Login" /></div>
		</form>
        </div>
        <div id="result"></div>
<?php 
    echo "<script type=\"text/javascript\">document.forms['login_form'].elements['username'].focus();</script>";
    do_footer();
}
######################################################################
# SourceAgency:
# ================================================
#
# Copyright (c) 2001-2003 by
#             Gregorio Robles (grex@scouts-es.org)
#
# BerliOS SourceAgency: http://sourceagency.berlios.de
# BerliOS - The OpenSource Mediator: http://www.berlios.de
#
# This is the index file which shows the recent apps
#
# This program is free software. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or later of the GPL.
######################################################################
require "include/prepend.php3";
page_open(array("sess" => "SourceAgency_Session"));
if (isset($auth) && !empty($auth->auth["perm"])) {
    page_close();
    page_open(array("sess" => "SourceAgency_Session", "auth" => "SourceAgency_Auth", "perm" => "SourceAgency_Perm"));
}
require "include/header.inc";
require "include/personallib.inc";
$bx = new box("100%", $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
start_content();
$page = "personal_ratings";
personal_comments_long($auth->auth["uname"]);
end_content();
require "include/footer.inc";
page_close();
Example #4
0
function pintar_intranet()
{
    start_content();
    end_content();
    start_sidebar();
    echo "<ul><li>";
    echo "<h2>Usuari:  " . id_usuari() . "</h2>";
    if (es_administrador()) {
        ?>
        <h2><strong>Administraci&oacute;</strong></h2>
        <ul>
        <li><a href="index.php?operacio=llistar_usuaris">Gesti&oacute; usuaris </a></li>
<?php 
    } else {
        if (es_moderador()) {
            ?>
		Aqui el menu de moderador
<?php 
        }
    }
    ?>
    <li>&nbsp;</li>
    <li><strong>Opcions d'usuari</strong></li>
<?php 
    echo '<li><a href="index.php?operacio=form_modificar_perfil&nick=' . id_usuari() . '">Modificar perfil</a></li>
	<li><a href="index.php?operacio=logout">Desconnectar</a></li></ul>
	</li></ul>';
    end_sidebar();
}