Commit 2819d971 authored by Feu's avatar Feu
Browse files

aecms compatible promo

parent 929e6240
......@@ -30,15 +30,21 @@ $site->start_page ( CMS_PREFIX."contact", "Contact" );
$cts = new contents("Contact");
$cts->add_paragraph(htmlentities($site->asso->nom,ENT_NOQUOTES,"UTF-8")." est une activitée de l'association des étudiants de l'université de technologie de belfort montbéliard");
if ( !is_null($site->asso->id_asso_parent) )
$cts->add_paragraph(htmlentities($site->asso->nom,ENT_NOQUOTES,"UTF-8")." est une activitée de l'association des étudiants de l'université de technologie de belfort montbéliard");
$cts->add_title(2,"Adresses");
$cts->add_paragraph(
"université de technologie de belfort-montébliard<br/>".
"association des étudiants<br/>".
htmlentities($site->asso->nom,ENT_NOQUOTES,"UTF-8")."<br/>".
"90010 BELFORT CEDEX");
if ( !is_null($site->asso->id_asso_parent) )
$cts->add_paragraph(
"université de technologie de belfort-montébliard<br/>".
"association des étudiants<br/>".
htmlentities($site->asso->nom,ENT_NOQUOTES,"UTF-8")."<br/>".
"90010 BELFORT CEDEX");
else
$cts->add_paragraph(
htmlentities($site->asso->nom,ENT_NOQUOTES,"UTF-8")."<br/>".
nl2br(htmlentities($this->adresse_postale,ENT_NOQUOTES,"UTF-8")));
if ( $site->asso->email )
$cts->add_paragraph("e-mail: ".htmlentities($site->asso->email,ENT_NOQUOTES,"UTF-8"));
......
......@@ -388,9 +388,19 @@ class aecms extends site
echo "<!-- end of page -->\n\n";
echo "<p class=\"footer\">\n";
echo "<a href=\"/\">association des etudiants de l'utbm</a>";
echo " - <a href=\"/article.php?name=legals\">informations légales</a>";
echo " - <a href=\"contact.php\">contact</a>";
if ( !is_null($this->asso->id_asso_parent) )
{
echo "<a href=\"/\">association des etudiants de l'utbm</a>";
echo " - <a href=\"index.php?name=:legals\">informations légales</a>";
echo " - <a href=\"contact.php\">contact</a>";
}
else
{
echo "<a href=\"index.php?name=legals\">informations légales</a>";
echo " - <a href=\"contact.php\">contact</a>";
}
echo "</p>\n";
echo "</div>\n"; // /contents
......
......@@ -71,8 +71,18 @@ if ( $site->is_user_admin() )
}
}
if ( isset($_REQUEST["name"]) )
$page->load_by_name(CMS_PREFIX.$_REQUEST["name"]);
$bypass_admin=false;
if ( isset($_REQUEST["name"]) )
{
if ( $_REQUEST["name"]{0} == ":" )
{
$page->load_by_name(substr($_REQUEST["name"],1));
$bypass_admin=true;
}
else
$page->load_by_name(CMS_PREFIX.$_REQUEST["name"]);
}
else
$page->load_by_name(CMS_PREFIX."home");
......@@ -114,7 +124,7 @@ if ( !$page->is_right($site->user,DROIT_LECTURE) )
if ( $page->is_right($site->user,DROIT_ECRITURE) || $site->is_user_admin() )
if ( $page->is_right($site->user,DROIT_ECRITURE) || ($site->is_user_admin() && !$bypass_admin) )
{
if ( $_REQUEST['action'] == "save" )
{
......
......@@ -79,7 +79,12 @@ if ( $site->user->is_valid() && $site->user->is_in_group("moderateur_site") )
if ( isset($_REQUEST["name"]) )
$page->load_by_name($_REQUEST["name"]);
{
if ( $_REQUEST["name"]{0} == ":" )
$page->load_by_name(substr($_REQUEST["name"],1));
else
$page->load_by_name($_REQUEST["name"]);
}
if ( !$page->is_valid() )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment