Location: PHPKode > projects > MtxEventManager > MtxEventManager-V2-beta1-source-italian/mtxeventmanager/index.php
<?php

/**
 * @Author				Tarchini Maurizio
 * @Version				1.0
 * @AuthorEmail			Maurizio Tarchini<hide@address.com>
 * @AuthorSite			http://www.mtxweb.ch
 * @DocumentDate		24-2-2008
 * @License				FREE
 * @LicenseDetail		GUN General Public License
 * @LicenseSite			http://www.gnu.org/copyleft/gpl.html 
 * @PHPCompatibility	4.2 or later
 * @DevelopmentStatus	DIST - beta
 */

include_once "config.php";
include_once "./lib/function_page.php";
include_once "./lib/function_news_layout.php";
include_once "./lib/function_db.php";
$utente = UserX();
Grant();
///primo uso?/////////////////////////////////////////////////
$sx = "SELECT status FROM users WHERE username='$utente'";
$rx = GetRes($sx);
$rox = mysql_fetch_array($rx);
if ($rox['status'] == 1)
{
	header("Location: first_login.php");
	die;
}
/////////////////////////////////////////////////////////////
PageIn();
$oggi = time();

$sql_last = "UPDATE users SET last='$oggi' WHERE username='$utente'";
QueryExec($sql_last);

$sql_arc = "UPDATE events SET arc=1 WHERE data<'$oggi'";
QueryExec($sql_arc);

echo '<h1>MtxEventManager Home Page</h1>
<br><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
	<td valign="top"><h2>Colpo d\'occhio</h2>
	';
	BoxIn(400);
	include_once "./lib/function_homebox.php";
	BoxOut();
	echo '</td>
	<td width="50"></td>
	<td valign="top"><h2>Le ultime 3 news</h2>';
	$sql = "SELECT * FROM news WHERE rif='general' ORDER BY data DESC LIMIT 0,3";
	$res = GetRes($sql);
		while ($row = mysql_fetch_array($res))
		{
			NewsLayout($row['contenuto'], $row['data'], $row['user'], 400);
		}
	echo '</td>
</tr>
</table>
';


PageOut();

?>
Return current item: MtxEventManager