Public part: home and team part
This commit is contained in:
parent
7571c8c1b1
commit
f8eff22c22
3 changed files with 13 additions and 6 deletions
|
|
@ -12,6 +12,9 @@ if ($_SERVER["SERVER_NAME"] == "localhost" || $_SERVER["SERVER_NAME"] == "fic" |
|
|||
//Chargement de tout le nécessaire pour le site
|
||||
require_once("common.php");
|
||||
|
||||
$template->assign("SALT_USER",SALT_USER);
|
||||
$template->assign("SALT_ADMIN",SALT_ADMIN);
|
||||
|
||||
$n = preg_match_all("#[^/]+#", strtolower(gpc("p")), $out);
|
||||
$p = $out[0];
|
||||
|
||||
|
|
@ -46,7 +49,6 @@ if ($n && $p[0] == SALT_ADMIN)
|
|||
else if ($n && $p[0] == SALT_USER)
|
||||
{
|
||||
$connected = true;
|
||||
|
||||
if ($n <= 1)
|
||||
$page = require("team/home.php");
|
||||
else
|
||||
|
|
@ -59,9 +61,9 @@ else if ($n && $p[0] == SALT_USER)
|
|||
{
|
||||
switch($p[2])
|
||||
{
|
||||
case "change/":
|
||||
case "change":
|
||||
$page = require("team/change.php");
|
||||
case "me/":
|
||||
case "me":
|
||||
$page = require("team/me.php");
|
||||
break;
|
||||
|
||||
case "summary":
|
||||
|
|
@ -92,7 +94,7 @@ else
|
|||
$page = require("public/home.php");
|
||||
else if ($n == 1)
|
||||
{
|
||||
$TEAM = $p[0];
|
||||
$TEAM = intval(substr($p[0], 0, strpos($p[0], "-")));
|
||||
|
||||
$page = require("public/team.php");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ try
|
|||
|
||||
return "public/team";
|
||||
}
|
||||
catch($e)
|
||||
catch(Exception $e)
|
||||
{
|
||||
return "404";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,4 +3,9 @@
|
|||
<h1>
|
||||
Hello World!
|
||||
</h1>
|
||||
{foreach from=$teams item=i}
|
||||
<ul>
|
||||
<li><a href="/{$i->id}-{$i->company}">{$i->company}</a></li>
|
||||
</ul>
|
||||
{/foreach}
|
||||
{/block}
|
||||
|
|
|
|||
Reference in a new issue