mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 17:39:46 +01:00
Front Page Administration ready (new XHTML/CSS rules, admin JS, message handler, form handler, code cleanup)
This commit is contained in:
parent
3a818d060b
commit
4ed0c5b73d
@ -1,136 +1,128 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------+
|
* e107 website system
|
||||||
| e107 website system
|
*
|
||||||
|
|
* Copyright (C) 2001-2008 e107 Inc (e107.org)
|
||||||
| ©Steve Dunstan 2001-2002
|
* Released under the terms and conditions of the
|
||||||
| http://e107.org
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
| jalist@e107.org
|
*
|
||||||
|
|
* Administration Area - Front page
|
||||||
| Released under the terms and conditions of the
|
*
|
||||||
| GNU General Public License (http://gnu.org).
|
* $Source: /cvs_backup/e107_0.8/e107_admin/frontpage.php,v $
|
||||||
|
|
* $Revision: 1.8 $
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/frontpage.php,v $
|
* $Date: 2008-12-15 13:31:01 $
|
||||||
| $Revision: 1.7 $
|
* $Author: secretr $
|
||||||
| $Date: 2008-11-14 06:01:06 $
|
*
|
||||||
| $Author: e107coders $
|
|
||||||
|
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('../class2.php');
|
require_once ('../class2.php');
|
||||||
if (!getperms('G'))
|
if(! getperms('G'))
|
||||||
{
|
{
|
||||||
header('location:'.e_BASE.'index.php');
|
header('location:'.e_BASE.'index.php');
|
||||||
exit;
|
exit();
|
||||||
}
|
}
|
||||||
$e_sub_cat = 'frontpage';
|
$e_sub_cat = 'frontpage';
|
||||||
require_once('auth.php');
|
require_once ('auth.php');
|
||||||
require_once(e_HANDLER.'form_handler.php');
|
require_once (e_HANDLER.'form_handler.php');
|
||||||
$rs = new form;
|
require_once (e_HANDLER."message_handler.php");
|
||||||
require_once(e_HANDLER.'userclass_class.php');
|
$rs = new form();
|
||||||
|
$frm = new e_form();
|
||||||
|
$emessage = &eMessage::getInstance();
|
||||||
|
|
||||||
|
require_once (e_HANDLER.'userclass_class.php');
|
||||||
|
|
||||||
// Get list of possible options for front page
|
// Get list of possible options for front page
|
||||||
$front_page['news'] = array('page' => 'news.php', 'title' => ADLAN_0);
|
$front_page['news'] = array('page' => 'news.php', 'title' => ADLAN_0);
|
||||||
$front_page['download'] = array('page' => 'download.php', 'title' => ADLAN_24);
|
$front_page['download'] = array('page' => 'download.php', 'title' => ADLAN_24);
|
||||||
$front_page['wmessage'] = array('page' => 'index.php', 'title' => ADLAN_28);
|
$front_page['wmessage'] = array('page' => 'index.php', 'title' => ADLAN_28);
|
||||||
|
|
||||||
|
if($sql->db_Select("page", "*", "page_theme=''"))
|
||||||
if ($sql -> db_Select("page", "*", "page_theme=''"))
|
|
||||||
{
|
{
|
||||||
$front_page['custom']['title'] = 'Custom Page';
|
$front_page['custom']['title'] = 'Custom Page';
|
||||||
while ($row = $sql -> db_Fetch())
|
while($row = $sql->db_Fetch())
|
||||||
{
|
{
|
||||||
$front_page['custom']['page'][] = array('page' => 'page.php?'.$row['page_id'], 'title' => $row['page_title']);
|
$front_page['custom']['page'][] = array('page' => 'page.php?'.$row['page_id'], 'title' => $row['page_title']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now let any plugins add to the options - must append to the $front_page array as above
|
// Now let any plugins add to the options - must append to the $front_page array as above
|
||||||
foreach($pref['e_frontpage_list'] as $val)
|
foreach($pref['e_frontpage_list'] as $val)
|
||||||
{
|
{
|
||||||
if (is_readable(e_PLUGIN.$val."/e_frontpage.php"))
|
if(is_readable(e_PLUGIN.$val."/e_frontpage.php"))
|
||||||
{
|
{
|
||||||
require_once(e_PLUGIN.$val."/e_frontpage.php");
|
require_once (e_PLUGIN.$val."/e_frontpage.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Now sort out list of rules for display (based on $pref data to start with)
|
// Now sort out list of rules for display (based on $pref data to start with)
|
||||||
$gotpub = FALSE;
|
$gotpub = FALSE;
|
||||||
if (is_array($pref['frontpage']))
|
if(is_array($pref['frontpage']))
|
||||||
{
|
{
|
||||||
$i = 1;
|
$i = 1;
|
||||||
foreach ($pref['frontpage'] as $class => $val)
|
foreach($pref['frontpage'] as $class => $val)
|
||||||
{
|
|
||||||
if ($class == 'all')
|
|
||||||
{
|
{
|
||||||
$class = e_UC_PUBLIC;
|
if($class == 'all')
|
||||||
$gotpub = TRUE;
|
{
|
||||||
|
$class = e_UC_PUBLIC;
|
||||||
|
$gotpub = TRUE;
|
||||||
|
}
|
||||||
|
if($val)
|
||||||
|
{ // Only add non-null pages
|
||||||
|
$fp_settings[$i] = array('order' => $i, 'class' => $class, 'page' => $val, 'force' => varset($pref['frontpage_force'][$class], ''));
|
||||||
|
$i ++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($val)
|
|
||||||
{ // Only add non-null pages
|
|
||||||
$fp_settings[$i] = array('order' => $i, 'class' => $class, 'page' => $val,'force' => varset($pref['frontpage_force'][$class],''));
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Legacy stuff to convert
|
{ // Legacy stuff to convert
|
||||||
$fp_settings = array();
|
$fp_settings = array();
|
||||||
$fp_settings[] = array('order' => 0, 'class' => e_UC_PUBLIC, 'page' => varset($pref['frontpage'],'news.php'),'force' => '');
|
$fp_settings[] = array('order' => 0, 'class' => e_UC_PUBLIC, 'page' => varset($pref['frontpage'], 'news.php'), 'force' => '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$gotpub)
|
if(! $gotpub)
|
||||||
{ // Need a 'default' setting - usually 'all'
|
{ // Need a 'default' setting - usually 'all'
|
||||||
$fp_settings[] = array('order' => $i, 'class' => e_UC_PUBLIC, 'page' => varset($pref['frontpage']['all'],'news.php'),'force' => '');
|
$fp_settings[] = array('order' => $i, 'class' => e_UC_PUBLIC, 'page' => varset($pref['frontpage']['all'], 'news.php'), 'force' => '');
|
||||||
}
|
}
|
||||||
|
|
||||||
$fp_update_prefs = FALSE;
|
$fp_update_prefs = FALSE;
|
||||||
|
|
||||||
|
if(isset($_POST['fp_inc']))
|
||||||
if (isset($_POST['fp_inc']))
|
|
||||||
{
|
{
|
||||||
$mv = intval($_POST['fp_inc']);
|
$mv = intval($_POST['fp_inc']);
|
||||||
if (($mv > 1) && ($mv <= count($fp_settings)))
|
if(($mv > 1) && ($mv <= count($fp_settings)))
|
||||||
{
|
{
|
||||||
$temp = $fp_settings[$mv-1];
|
$temp = $fp_settings[$mv - 1];
|
||||||
$fp_settings[$mv-1] = $fp_settings[$mv];
|
$fp_settings[$mv - 1] = $fp_settings[$mv];
|
||||||
$fp_settings[$mv] = $temp;
|
$fp_settings[$mv] = $temp;
|
||||||
$fp_update_prefs = TRUE;
|
$fp_update_prefs = TRUE;
|
||||||
frontpage_adminlog('01','Inc '.$mv);
|
frontpage_adminlog('01', 'Inc '.$mv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif (isset($_POST['fp_dec']))
|
elseif(isset($_POST['fp_dec']))
|
||||||
{
|
{
|
||||||
$mv = intval($_POST['fp_dec']);
|
$mv = intval($_POST['fp_dec']);
|
||||||
if (($mv > 0) && ($mv < count($fp_settings)))
|
if(($mv > 0) && ($mv < count($fp_settings)))
|
||||||
{
|
{
|
||||||
$temp = $fp_settings[$mv+1];
|
$temp = $fp_settings[$mv + 1];
|
||||||
$fp_settings[$mv+1] = $fp_settings[$mv];
|
$fp_settings[$mv + 1] = $fp_settings[$mv];
|
||||||
$fp_settings[$mv] = $temp;
|
$fp_settings[$mv] = $temp;
|
||||||
$fp_update_prefs = TRUE;
|
$fp_update_prefs = TRUE;
|
||||||
frontpage_adminlog('01','Dec '.$mv);
|
frontpage_adminlog('01', 'Dec '.$mv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Edit an existing rule
|
// Edit an existing rule
|
||||||
if (isset($_POST['fp_edit_rule']))
|
if(isset($_POST['fp_edit_rule']))
|
||||||
{
|
{
|
||||||
$_POST['type'] = (isset($_POST['edit']['all'])) ? 'all_users' : 'user_class';
|
$_POST['type'] = (isset($_POST['edit']['all'])) ? 'all_users' : 'user_class';
|
||||||
$_POST['class'] = key($_POST['edit']);
|
$_POST['class'] = key($_POST['edit']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Cancel Edit
|
// Cancel Edit
|
||||||
|
|
||||||
|
|
||||||
|
if(isset($_POST['fp_save_new']))
|
||||||
|
{ // Add or edit an existing rule here.
|
||||||
if (isset($_POST['fp_save_new']))
|
|
||||||
{ // Add or edit an existing rule here.
|
|
||||||
// fp_order - zero for a new rule, non-zero if editing an existing rule
|
// fp_order - zero for a new rule, non-zero if editing an existing rule
|
||||||
// class - user class for rule
|
// class - user class for rule
|
||||||
// frontpage - radio button option indicating type of page (for home page)
|
// frontpage - radio button option indicating type of page (for home page)
|
||||||
@ -139,108 +131,111 @@ if (isset($_POST['fp_save_new']))
|
|||||||
// fp_force_page - radio button option indicating type of page (for post-login page)
|
// fp_force_page - radio button option indicating type of page (for post-login page)
|
||||||
// fp_force_page_multipage[] - the other information for custom pages and similar - array index matches value of 'frontpage' when selected
|
// fp_force_page_multipage[] - the other information for custom pages and similar - array index matches value of 'frontpage' when selected
|
||||||
// fp_force_page_other - URL for forced post-login 'other' page
|
// fp_force_page_other - URL for forced post-login 'other' page
|
||||||
|
|
||||||
|
|
||||||
if ($_POST['frontpage'] == 'other')
|
|
||||||
{
|
|
||||||
$_POST['frontpage_other'] = trim($tp -> toForm($_POST['frontpage_other']));
|
|
||||||
$frontpage_value = $_POST['frontpage_other'] ? $_POST['frontpage_other'] : 'news.php';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (is_array($front_page[$_POST['frontpage']]['page']))
|
|
||||||
{
|
|
||||||
$frontpage_value = $front_page[$_POST['frontpage']]['page'][$_POST['frontpage_multipage'][$_POST['frontpage']]]['page'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$frontpage_value = $front_page[$_POST['frontpage']]['page'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_POST['fp_force_page'] == 'other')
|
|
||||||
{
|
|
||||||
$_POST['fp_force_page_other'] = trim($tp -> toForm($_POST['fp_force_page_other']));
|
|
||||||
$forcepage_value = $_POST['fp_force_page_other']; // A null value is allowable here
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (is_array($front_page[$_POST['fp_force_page']]['page']))
|
|
||||||
{
|
|
||||||
$forcepage_value = $front_page[$_POST['fp_force_page']]['page'][$_POST['fp_force_page_multipage'][$_POST['fp_force_page']]]['page'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$forcepage_value = $front_page[$_POST['fp_force_page']]['page'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$temp = array('order' => intval($_POST['fp_order']), 'class' => $_POST['class'], 'page' => $frontpage_value,'force' => trim($forcepage_value));
|
if($_POST['frontpage'] == 'other')
|
||||||
if ($temp['order'] == 0)
|
|
||||||
{ // New index to add
|
|
||||||
$ind = 0;
|
|
||||||
for ($i = 1; $i <= count($fp_settings); $i++)
|
|
||||||
{
|
|
||||||
if ($fp_settings[$i]['class'] == $temp['class']) $ind = $i;
|
|
||||||
}
|
|
||||||
if ($ind)
|
|
||||||
{
|
|
||||||
unset($fp_settings[$ind]); // Knock out duplicate definition for class
|
|
||||||
echo "duplicate definition for class: ".$ind."<br />";
|
|
||||||
}
|
|
||||||
array_unshift($fp_settings,$temp); // Deliberately add twice
|
|
||||||
array_unshift($fp_settings,$temp); // ....because re-indexed from zero
|
|
||||||
unset($fp_settings[0]); // Then knock out index zero
|
|
||||||
$fp_update_prefs = TRUE;
|
|
||||||
frontpage_adminlog('02',"class => {$_POST['class']},[!br!]page => {$frontpage_value},[!br!]force => {$forcepage_value}");
|
|
||||||
}
|
|
||||||
elseif (array_key_exists($temp['order'],$fp_settings))
|
|
||||||
{
|
{
|
||||||
$fp_settings[$temp['order']] = $temp;
|
$_POST['frontpage_other'] = trim($tp->toForm($_POST['frontpage_other']));
|
||||||
$fp_update_prefs = TRUE;
|
$frontpage_value = $_POST['frontpage_other'] ? $_POST['frontpage_other'] : 'news.php';
|
||||||
frontpage_adminlog('03',"posn => {$temp},[!br!]class => {$_POST['class']},[!br!]page => {$frontpage_value},[!br!]force => {$forcepage_value}");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Someone playing games
|
{
|
||||||
$ns -> tablerender(LAN_UPDATED, "<div style='text-align:center'><b>"."Software error"."</b></div>");
|
if(is_array($front_page[$_POST['frontpage']]['page']))
|
||||||
|
{
|
||||||
|
$frontpage_value = $front_page[$_POST['frontpage']]['page'][$_POST['frontpage_multipage'][$_POST['frontpage']]]['page'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$frontpage_value = $front_page[$_POST['frontpage']]['page'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_POST['fp_force_page'] == 'other')
|
||||||
|
{
|
||||||
|
$_POST['fp_force_page_other'] = trim($tp->toForm($_POST['fp_force_page_other']));
|
||||||
|
$forcepage_value = $_POST['fp_force_page_other']; // A null value is allowable here
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(is_array($front_page[$_POST['fp_force_page']]['page']))
|
||||||
|
{
|
||||||
|
$forcepage_value = $front_page[$_POST['fp_force_page']]['page'][$_POST['fp_force_page_multipage'][$_POST['fp_force_page']]]['page'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$forcepage_value = $front_page[$_POST['fp_force_page']]['page'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$temp = array('order' => intval($_POST['fp_order']), 'class' => $_POST['class'], 'page' => $frontpage_value, 'force' => trim($forcepage_value));
|
||||||
|
if($temp['order'] == 0)
|
||||||
|
{ // New index to add
|
||||||
|
$ind = 0;
|
||||||
|
for($i = 1; $i <= count($fp_settings); $i ++)
|
||||||
|
{
|
||||||
|
if($fp_settings[$i]['class'] == $temp['class'])
|
||||||
|
$ind = $i;
|
||||||
|
}
|
||||||
|
if($ind)
|
||||||
|
{
|
||||||
|
unset($fp_settings[$ind]); // Knock out duplicate definition for class
|
||||||
|
echo "duplicate definition for class: ".$ind."<br />";
|
||||||
|
}
|
||||||
|
array_unshift($fp_settings, $temp); // Deliberately add twice
|
||||||
|
array_unshift($fp_settings, $temp); // ....because re-indexed from zero
|
||||||
|
unset($fp_settings[0]); // Then knock out index zero
|
||||||
|
$fp_update_prefs = TRUE;
|
||||||
|
frontpage_adminlog('02', "class => {$_POST['class']},[!br!]page => {$frontpage_value},[!br!]force => {$forcepage_value}");
|
||||||
|
}
|
||||||
|
elseif(array_key_exists($temp['order'], $fp_settings))
|
||||||
|
{
|
||||||
|
$fp_settings[$temp['order']] = $temp;
|
||||||
|
$fp_update_prefs = TRUE;
|
||||||
|
frontpage_adminlog('03', "posn => {$temp},[!br!]class => {$_POST['class']},[!br!]page => {$frontpage_value},[!br!]force => {$forcepage_value}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // Someone playing games
|
||||||
|
//$ns->tablerender(LAN_UPDATED, "<div style='text-align:center'><b>"."Software error"."</b></div>");
|
||||||
|
$emessage->add('Software error', E_MESSAGE_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_POST['fp_delete_rule']))
|
if(isset($_POST['fp_delete_rule']))
|
||||||
{
|
{
|
||||||
if (isset($fp_settings[key($_POST['fp_delete_rule'])]))
|
if(isset($fp_settings[key($_POST['fp_delete_rule'])]))
|
||||||
{
|
{
|
||||||
$rule_no = key($_POST['fp_delete_rule']);
|
$rule_no = key($_POST['fp_delete_rule']);
|
||||||
$array_size = count($fp_settings);
|
$array_size = count($fp_settings);
|
||||||
frontpage_adminlog('04',"Rule {$rule_no},[!br!]class => {$fp_settings[$rule_no]['class']},[!br!]page => {$fp_settings[$rule_no]['page']},[!br!]force => {$fp_settings[$rule_no]['force']}");
|
frontpage_adminlog('04', "Rule {$rule_no},[!br!]class => {$fp_settings[$rule_no]['class']},[!br!]page => {$fp_settings[$rule_no]['page']},[!br!]force => {$fp_settings[$rule_no]['force']}");
|
||||||
unset($fp_settings[$rule_no]);
|
unset($fp_settings[$rule_no]);
|
||||||
while ($rule_no < $array_size)
|
while($rule_no < $array_size)
|
||||||
{ // Move up and renumber any entries after the deleted rule
|
{ // Move up and renumber any entries after the deleted rule
|
||||||
$fp_settings[$rule_no] = $fp_settings[$rule_no + 1];
|
$fp_settings[$rule_no] = $fp_settings[$rule_no + 1];
|
||||||
$rule_no++;
|
$rule_no ++;
|
||||||
unset($fp_settings[$rule_no]);
|
unset($fp_settings[$rule_no]);
|
||||||
|
}
|
||||||
|
$fp_update_prefs = TRUE;
|
||||||
}
|
}
|
||||||
$fp_update_prefs = TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($fp_update_prefs)
|
||||||
if ($fp_update_prefs)
|
{ // Save the two arrays
|
||||||
{ // Save the two arrays
|
$fp_list = array();
|
||||||
$fp_list = array();
|
$fp_force = array();
|
||||||
$fp_force = array();
|
for($i = 1; $i <= count($fp_settings); $i ++)
|
||||||
for ($i = 1; $i <= count($fp_settings); $i++)
|
{
|
||||||
{
|
$fp_list[$fp_settings[$i]['class']] = $fp_settings[$i]['page'];
|
||||||
$fp_list[$fp_settings[$i]['class']] = $fp_settings[$i]['page'];
|
// $fp_force[$fp_settings[$i]['class']] = intval($fp_settings[$i]['force']);
|
||||||
// $fp_force[$fp_settings[$i]['class']] = intval($fp_settings[$i]['force']);
|
$fp_force[$fp_settings[$i]['class']] = $fp_settings[$i]['force'];
|
||||||
$fp_force[$fp_settings[$i]['class']] = $fp_settings[$i]['force'];
|
}
|
||||||
}
|
// if (($fp_list != $pref['frontpage']) || ($fp_force != $pref['frontpage_force']))
|
||||||
// if (($fp_list != $pref['frontpage']) || ($fp_force != $pref['frontpage_force']))
|
// {
|
||||||
// {
|
$pref['frontpage'] = $fp_list;
|
||||||
$pref['frontpage'] = $fp_list;
|
|
||||||
$pref['frontpage_force'] = $fp_force;
|
$pref['frontpage_force'] = $fp_force;
|
||||||
save_prefs();
|
save_prefs();
|
||||||
$ns -> tablerender(LAN_UPDATED, "<div style='text-align:center'><b>".FRTLAN_1."</b></div>");
|
//$ns->tablerender(LAN_UPDATED, "<div style='text-align:center'><b>".FRTLAN_1."</b></div>");
|
||||||
|
$emessage->add(FRTLAN_1, E_MESSAGE_SUCCESS);
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
@ -248,7 +243,6 @@ if ($fp_update_prefs)
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* For reference:
|
/* For reference:
|
||||||
define("e_UC_PUBLIC", 0);
|
define("e_UC_PUBLIC", 0);
|
||||||
define("e_UC_MAINADMIN", 250);
|
define("e_UC_MAINADMIN", 250);
|
||||||
@ -259,238 +253,308 @@ define("e_UC_ADMIN", 254);
|
|||||||
define("e_UC_NOBODY", 255);
|
define("e_UC_NOBODY", 255);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$fp = new frontpage;
|
$fp = new frontpage();
|
||||||
|
|
||||||
if (isset($_POST['fp_add_new']))
|
if(isset($_POST['fp_add_new']))
|
||||||
{
|
{
|
||||||
$fp->edit_rule(array('order' => 0, 'class' => e_UC_PUBLIC, 'page' => 'news.php','force' => FALSE)); // Display edit form as well
|
$text = $fp->edit_rule(array('order' => 0, 'class' => e_UC_PUBLIC, 'page' => 'news.php', 'force' => FALSE)); // Display edit form as well
|
||||||
$fp -> select_class(FALSE);
|
$text .= $fp->select_class(FALSE);
|
||||||
|
$e107->ns->tablerender(FRTLAN_PAGE_TITLE." - ".FRTLAN_42, $text);
|
||||||
}
|
}
|
||||||
elseif (isset($_POST['fp_edit_rule']))
|
elseif(isset($_POST['fp_edit_rule']))
|
||||||
{
|
{
|
||||||
$fp->edit_rule($fp_settings[key($_POST['fp_edit_rule'])]); // Display edit form as well
|
$text = $fp->edit_rule($fp_settings[key($_POST['fp_edit_rule'])]); // Display edit form as well
|
||||||
$fp -> select_class(FALSE);
|
$text .= $fp->select_class(FALSE);
|
||||||
|
$e107->ns->tablerender(FRTLAN_PAGE_TITLE." - ".FRTLAN_46, $text);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Just show existing rules
|
{ // Just show existing rules
|
||||||
$fp -> select_class(TRUE);
|
$e107->ns->tablerender(FRTLAN_PAGE_TITLE." - ".FRTLAN_13, $fp->select_class(TRUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class frontpage
|
||||||
|
|
||||||
class frontpage
|
|
||||||
{
|
{
|
||||||
function select_class($show_button = TRUE)
|
function select_class($show_button = TRUE)
|
||||||
{ // Display existing data
|
{ // Display existing data
|
||||||
global $fp_settings, $rs, $ns, $front_page, $imode;
|
global $fp_settings, $frm, $emessage;
|
||||||
|
|
||||||
|
|
||||||
// List of current settings
|
//Inline Page Help Info - system message for now
|
||||||
$text = "<div style='text-align:center'>
|
//TODO - inline tooltip help system
|
||||||
|
$emessage->add(FRTLAN_38.". ".FRTLAN_39.". ".FRTLAN_41.".");
|
||||||
|
|
||||||
|
// List of current settings
|
||||||
|
$show_legend = $show_button ? " class='e-hideme'" : '';
|
||||||
|
$text = "
|
||||||
<form method='post' action='".e_SELF."'>
|
<form method='post' action='".e_SELF."'>
|
||||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
<fieldset id='frontpage-settings'>
|
||||||
<colgroup>
|
<legend{$show_legend}>".FRTLAN_13."</legend>
|
||||||
<col style='width: 5%' />
|
|
||||||
<col style='width: 25%' />
|
|
||||||
<col style='width: 30%' />
|
|
||||||
<col style='width: 30%' />
|
|
||||||
<col style='width: 10%' />
|
|
||||||
</colgroup>
|
|
||||||
<tr><td class='forumheader3' colspan='5' style='text-align:center'>".FRTLAN_38."<br />".FRTLAN_39."<br />".FRTLAN_41."</td></tr>
|
|
||||||
<tr>
|
|
||||||
<td class='fcaption'>".FRTLAN_40."</td>
|
|
||||||
<td class='fcaption'>".FRTLAN_53."</td>
|
|
||||||
<td class='fcaption'>".FRTLAN_49."</td>
|
|
||||||
<td class='fcaption'>".FRTLAN_35."</td>
|
|
||||||
<td class='fcaption' style='text-align:center'>".LAN_EDIT."</td>
|
|
||||||
</tr>";
|
|
||||||
|
|
||||||
foreach ($fp_settings as $order => $current_value)
|
<table cellpadding='0' cellspacing='0' class='adminlist'>
|
||||||
{
|
<colgroup span='5'>
|
||||||
$title = r_userclass_name($current_value['class']);
|
<col style='width: 5%' />
|
||||||
$text .= "<tr><td class='forumheader3'>".$order."</td>
|
<col style='width: 25%' />
|
||||||
<td class='forumheader3'>".$title."</td>
|
<col style='width: 30%' />
|
||||||
<td class='forumheader3'>".$this->lookup_path($current_value['page'])."</td>
|
<col style='width: 30%' />
|
||||||
<td class='forumheader3'>".$this->lookup_path($current_value['force'])."</td>
|
<col style='width: 10%' />
|
||||||
<td class='forumheader3' style='text-align:center'>
|
</colgroup>
|
||||||
<input type='image' src='".e_IMAGE."admin_images/up.png' title='".FRTLAN_47."' value='".$order."' name='fp_inc' />
|
<thead>
|
||||||
<input type='image' src='".e_IMAGE."admin_images/down.png' title='".FRTLAN_48."' value='".$order."' name='fp_dec' />
|
<tr>
|
||||||
<input type='image' title='".LAN_EDIT."' name='fp_edit_rule[".$order."]' src='".ADMIN_EDIT_ICON_PATH."' />
|
<th class='first'>".FRTLAN_40."</th>
|
||||||
<input type='image' title='".LAN_DELETE."' name='fp_delete_rule[".$order."]' src='".ADMIN_DELETE_ICON_PATH."' />
|
<th>".FRTLAN_53."</th>
|
||||||
</td>
|
<th>".FRTLAN_49."</th>
|
||||||
</tr>";
|
<th>".FRTLAN_35."</th>
|
||||||
}
|
<th class='center last'>".LAN_EDIT."</th>
|
||||||
if ($show_button)
|
</tr>
|
||||||
{
|
</thead>
|
||||||
$text .= "<tr><td colspan='5' style='text-align: center' class='forumheader'>
|
<tbody>";
|
||||||
".$rs -> form_button('submit', 'fp_add_new', FRTLAN_42)."</td></tr>";
|
|
||||||
}
|
|
||||||
$text .= "</table></form></div>";
|
|
||||||
|
|
||||||
$ns -> tablerender(FRTLAN_33, $text);
|
foreach($fp_settings as $order => $current_value)
|
||||||
|
{
|
||||||
|
$title = r_userclass_name($current_value['class']);
|
||||||
|
$text .= "
|
||||||
|
<tr>
|
||||||
|
<td class='right'>".$order."</td>
|
||||||
|
<td>".$title."</td>
|
||||||
|
<td>".$this->lookup_path($current_value['page'])."</td>
|
||||||
|
<td>".$this->lookup_path($current_value['force'])."</td>
|
||||||
|
<td class='center'>
|
||||||
|
<input class='image' type='image' src='".e_IMAGE_ABS."admin_images/up.png' title='".FRTLAN_47."' value='".$order."' name='fp_inc' />
|
||||||
|
<input class='image' type='image' src='".e_IMAGE_ABS."admin_images/down.png' title='".FRTLAN_48."' value='".$order."' name='fp_dec' />
|
||||||
|
<input class='image edit' type='image' title='".LAN_EDIT."' name='fp_edit_rule[".$order."]' src='".ADMIN_EDIT_ICON_PATH."' />
|
||||||
|
<input class='image delete' type='image' title='".LAN_DELETE."' name='fp_delete_rule[".$order."]' src='".ADMIN_DELETE_ICON_PATH."' />
|
||||||
|
</td>
|
||||||
|
</tr>";
|
||||||
|
}
|
||||||
|
$text .= "
|
||||||
|
</tbody>
|
||||||
|
</table>";
|
||||||
|
|
||||||
|
if($show_button)
|
||||||
|
{
|
||||||
|
$text .= "
|
||||||
|
<div class='buttons-bar center'>
|
||||||
|
".$frm->admin_button('fp_add_new', FRTLAN_42, 'create')."
|
||||||
|
</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$text .= "
|
||||||
|
</fieldset>
|
||||||
|
</form>";
|
||||||
|
|
||||||
|
return ($show_button ? $emessage->render() : '').$text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function edit_rule($rule_info)
|
function edit_rule($rule_info)
|
||||||
{ // Display form to add/edit rules
|
{ // Display form to add/edit rules
|
||||||
global $front_page, $rs, $ns;
|
global $front_page, $frm;
|
||||||
// $rule_info contains existing data as an array, or a set of defaults otherwise ('order', 'class', 'page', 'force')
|
// $rule_info contains existing data as an array, or a set of defaults otherwise ('order', 'class', 'page', 'force')
|
||||||
|
|
||||||
$is_other_home = TRUE;
|
|
||||||
$is_other_force = TRUE;
|
|
||||||
$force_checked = $rule_info['force'] ? " checked='checked'" : '';
|
|
||||||
$text = "<div style='text-align:center'>
|
|
||||||
<form method='post' action='".e_SELF."'>
|
|
||||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
|
||||||
<colgroup>
|
|
||||||
<col style='width: 4%' />
|
|
||||||
<col style='width: 24%' />
|
|
||||||
<col style='width: 24%' />
|
|
||||||
<col style='width: 4%' />
|
|
||||||
<col style='width: 4%' />
|
|
||||||
<col style='width: 24%' />
|
|
||||||
<col style='width: 24%' />
|
|
||||||
</colgroup>
|
|
||||||
|
|
||||||
<tr><td colspan='7' class='fcaption' style='text-align:center;'>".($rule_info['order'] ? FRTLAN_46 : FRTLAN_42)."</td></tr>
|
|
||||||
<tr>
|
|
||||||
<td class='forumheader3' style='text-align:center' colspan='7'>
|
|
||||||
".FRTLAN_43.r_userclass('class', $rule_info['class'], 'off', 'public,guest,member,admin,main,classes')."</td>
|
|
||||||
</tr><tr><td colspan='3' class='fcaption' style='text-align:center;'>".FRTLAN_49."</td><td> </td>
|
|
||||||
<td colspan='3' class='fcaption' style='text-align:center;'>".FRTLAN_35."<br />".FRTLAN_50."</td></tr>";
|
|
||||||
|
|
||||||
foreach ($front_page as $front_key => $front_value)
|
$is_other_home = TRUE;
|
||||||
|
$is_other_force = TRUE;
|
||||||
|
//$force_checked = $rule_info['force'] ? " checked='checked'" : '';
|
||||||
|
$text_tmp_1 = "";
|
||||||
|
$text_tmp_2 = "";
|
||||||
|
foreach($front_page as $front_key => $front_value)
|
||||||
{
|
{
|
||||||
$type_selected = FALSE;
|
//$type_selected = FALSE;
|
||||||
$text .= "<tr>".$this->show_front_val('frontpage',$front_key,$front_value,$is_other_home,$rule_info['page']);
|
|
||||||
$text .= "<td> </td>"; // Spacer
|
$text_tmp_1 .= "
|
||||||
$text .= $this->show_front_val('fp_force_page',$front_key,$front_value,$is_other_force,$rule_info['force'])."</tr>";
|
<tr>
|
||||||
|
".$this->show_front_val('frontpage', $front_key, $front_value, $is_other_home, $rule_info['page'])."
|
||||||
|
</tr>
|
||||||
|
";
|
||||||
|
|
||||||
|
$text_tmp_2 .= "
|
||||||
|
<tr>
|
||||||
|
".$this->show_front_val('fp_force_page', $front_key, $front_value, $is_other_force, $rule_info['force'])."
|
||||||
|
</tr>
|
||||||
|
";
|
||||||
|
|
||||||
}
|
}
|
||||||
// Now add in the 'other' URL box
|
|
||||||
$text .= "<tr>".$this->add_other('frontpage', $is_other_home, $rule_info['page'])."<td> </td>".
|
|
||||||
$this->add_other('fp_force_page', $is_other_force, $rule_info['force'])."</tr>";
|
|
||||||
|
|
||||||
// 'Save' and 'Cancel' buttons
|
$text = "
|
||||||
$text .= "<tr style='vertical-align:top'>
|
<form method='post' action='".e_SELF."'>
|
||||||
<td colspan='7' style='text-align: center' class='forumheader'>";
|
<fieldset id='core-frontpage-edit'>
|
||||||
$text .= $rs -> form_hidden('fp_order', $rule_info['order']);
|
<legend class='e-hideme'>".($rule_info['order'] ? FRTLAN_46 : FRTLAN_42)."</legend>
|
||||||
$text .= $rs -> form_button('submit', 'fp_save_new', FRTLAN_12)." ".$rs -> form_button('submit', 'fp_cancel', LAN_CANCEL);
|
<div id='core-frontpage-edit-home'>
|
||||||
$text .= "</td>
|
<table cellpadding='0' cellspacing='0' class='adminlist'>
|
||||||
</tr>
|
<colgroup span='2'>
|
||||||
|
<col style='width: 40%' />
|
||||||
</table>
|
<col style='width: 60%' />
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan='2' class='last'>
|
||||||
|
".FRTLAN_49."
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{$text_tmp_1}
|
||||||
|
<tr>
|
||||||
|
".$this->add_other('frontpage', $is_other_home, $rule_info['page'])."
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div id='core-frontpage-edit-post-login'>
|
||||||
|
<table cellpadding='0' cellspacing='0' class='adminlist'>
|
||||||
|
<colgroup span='2'>
|
||||||
|
<col style='width: 40%' />
|
||||||
|
<col style='width: 60%' />
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan='2' class='last'>
|
||||||
|
".FRTLAN_35." ".FRTLAN_50."
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{$text_tmp_2}
|
||||||
|
<tr>
|
||||||
|
".$this->add_other('fp_force_page', $is_other_force, $rule_info['force'])."
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class='buttons-bar center'>
|
||||||
|
".$frm->hidden('fp_order', $rule_info['order'])."
|
||||||
|
".FRTLAN_43.r_userclass('class', $rule_info['class'], 'off', 'public,guest,member,admin,main,classes')."
|
||||||
|
".$frm->admin_button('fp_save_new', FRTLAN_12, 'update')."
|
||||||
|
".$frm->admin_button('fp_cancel', LAN_CANCEL, 'cancel')."
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</div><br /><br />";
|
";
|
||||||
|
return $text;
|
||||||
$ns -> tablerender(FRTLAN_13, $text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Given a path string, returns the 'type' (title) for it
|
// Given a path string, returns the 'type' (title) for it
|
||||||
function lookup_path($path)
|
function lookup_path($path)
|
||||||
{
|
{
|
||||||
global $front_page;
|
global $front_page;
|
||||||
foreach ($front_page as $front_key => $front_value)
|
foreach($front_page as $front_value)
|
||||||
{
|
{
|
||||||
if (is_array($front_value['page']))
|
if(is_array($front_value['page']))
|
||||||
{ // Its a URL with multiple options
|
{ // Its a URL with multiple options
|
||||||
foreach ($front_value['page'] as $multipage)
|
foreach($front_value['page'] as $multipage)
|
||||||
{
|
{
|
||||||
if ($path == $multipage['page'])
|
if($path == $multipage['page'])
|
||||||
{
|
{
|
||||||
// return $front_value['title'].":".$path;
|
// return $front_value['title'].":".$path;
|
||||||
return $front_value['title'].":".$multipage['title'];
|
return $front_value['title'].":".$multipage['title'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($path == $front_value['page'])
|
if($path == $front_value['page'])
|
||||||
{
|
{
|
||||||
return $front_value['title'];
|
return $front_value['title'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (strlen($path)) return FRTLAN_51.":".$path; // 'Other'
|
if(strlen($path))
|
||||||
else return FRTLAN_52; // 'None'
|
return FRTLAN_51.":".$path; // 'Other'
|
||||||
|
else
|
||||||
|
return FRTLAN_52; // 'None'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function show_front_val($ob_name, $front_key, $front_value, &$is_other, $current_setting)
|
function show_front_val($ob_name, $front_key, $front_value, &$is_other, $current_setting)
|
||||||
{
|
{
|
||||||
global $rs;
|
global $frm;
|
||||||
|
|
||||||
$type_selected = FALSE;
|
$type_selected = FALSE;
|
||||||
$text = '';
|
$text = '';
|
||||||
|
|
||||||
if (is_array($front_value['page']))
|
if(is_array($front_value['page']))
|
||||||
{ // Its a URL with multiple options
|
{ // Its a URL with multiple options
|
||||||
foreach ($front_value['page'] as $multipage)
|
foreach($front_value['page'] as $multipage)
|
||||||
{
|
|
||||||
if ($current_setting == $multipage['page'])
|
|
||||||
{
|
|
||||||
$type_selected = TRUE;
|
|
||||||
$is_other = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($current_setting == $front_value['page'])
|
|
||||||
{
|
|
||||||
$type_selected = TRUE;
|
|
||||||
$is_other = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$text .= "<td class='forumheader3'>";
|
|
||||||
$text .= $rs -> form_radio($ob_name, $front_key, $type_selected);
|
|
||||||
$text .= "</td>";
|
|
||||||
|
|
||||||
if (is_array($front_value['page']))
|
|
||||||
{ // Multiple options for same page name
|
|
||||||
$text .= "<td class='forumheader3'>".$front_value['title']."</td>";
|
|
||||||
$text .= "<td class='forumheader3'>";
|
|
||||||
$text .= $rs -> form_select_open($ob_name.'_multipage['.$front_key.']');
|
|
||||||
foreach ($front_value['page'] as $multipage_key => $multipage_value)
|
|
||||||
{
|
{
|
||||||
$sub_selected = ($current_setting == $multipage_value['page']) ? TRUE : FALSE;
|
if($current_setting == $multipage['page'])
|
||||||
$text .= $rs -> form_option($multipage_value['title'], $sub_selected, $multipage_key);
|
{
|
||||||
|
$type_selected = TRUE;
|
||||||
|
$is_other = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$text .= $rs -> form_select_close();
|
}
|
||||||
$text .= "</td>";
|
else
|
||||||
}
|
{
|
||||||
else
|
if($current_setting == $front_value['page'])
|
||||||
{ // Single option for URL
|
{
|
||||||
$text .= "<td colspan='2' class='forumheader3'>".$front_value['title']."</td>";
|
$type_selected = TRUE;
|
||||||
}
|
$is_other = FALSE;
|
||||||
return $text;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(is_array($front_value['page']))
|
||||||
|
{ // Multiple options for same page name
|
||||||
|
$text .= "
|
||||||
|
<td>
|
||||||
|
".$frm->radio($ob_name, $front_key, $type_selected)."
|
||||||
|
".$frm->label($front_value['title'], $ob_name, $front_key)."
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
";
|
||||||
|
$text .= $frm->select_open($ob_name.'_multipage['.$front_key.']');
|
||||||
|
foreach($front_value['page'] as $multipage_key => $multipage_value)
|
||||||
|
{
|
||||||
|
$text .= "\n".$frm->option($multipage_value['title'], $multipage_key, ($current_setting == $multipage_value['page']))."\n";
|
||||||
|
}
|
||||||
|
$text .= $frm->select_close();
|
||||||
|
$text .= "</td>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // Single option for URL
|
||||||
|
$text .= "
|
||||||
|
<td>
|
||||||
|
".$frm->radio($ob_name, $front_key, $type_selected)."
|
||||||
|
".$frm->label($front_value['title'], $ob_name, $front_key)."
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td> </td>";
|
||||||
|
}
|
||||||
|
return $text;
|
||||||
|
}
|
||||||
|
|
||||||
function add_other($ob_name, $cur_val, $cur_page)
|
function add_other($ob_name, $cur_val, $cur_page)
|
||||||
{
|
{
|
||||||
global $rs;
|
global $frm;
|
||||||
return "<td class='forumheader3'>".$rs -> form_radio($ob_name, 'other', $cur_val)."</td>
|
return "
|
||||||
<td class='forumheader3'>".FRTLAN_15."</td>
|
<td>".$frm->radio($ob_name, 'other', $cur_val)." ".$frm->label(FRTLAN_15, $ob_name, 'other')."</td>
|
||||||
<td class='forumheader3'>
|
<td>".$frm->text($ob_name.'_other', ($cur_val ? $cur_page : ''), 150, "size=50&id={$ob_name}-other-txt")."</td>
|
||||||
".$rs -> form_text($ob_name.'_other', 50, ($cur_val ? $cur_page : ''),150)."
|
";
|
||||||
</td>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once('footer.php');
|
require_once ('footer.php');
|
||||||
|
|
||||||
|
|
||||||
// Log event to admin log
|
// Log event to admin log
|
||||||
function frontpage_adminlog($msg_num='00', $woffle='')
|
function frontpage_adminlog($msg_num = '00', $woffle = '')
|
||||||
{
|
{
|
||||||
global $pref, $admin_log;
|
global $pref, $admin_log;
|
||||||
$admin_log->log_event('FRONTPG_'.$msg_num,$woffle,E_LOG_INFORMATIVE,'');
|
$admin_log->log_event('FRONTPG_'.$msg_num, $woffle, E_LOG_INFORMATIVE, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle page DOM within the page header
|
||||||
|
*
|
||||||
|
* @return string JS source
|
||||||
|
*/
|
||||||
|
function headerjs()
|
||||||
|
{
|
||||||
|
require_once(e_HANDLER.'js_helper.php');
|
||||||
|
$ret = "
|
||||||
|
<script type='text/javascript'>
|
||||||
|
//add required core lan - delete confirm message
|
||||||
|
(".e_jshelper::toString(FRTLAN_54).").addModLan('core', 'delete_confirm');
|
||||||
|
</script>
|
||||||
|
<script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>
|
||||||
|
";
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@ -9,8 +9,8 @@
|
|||||||
* Image Administration Area
|
* Image Administration Area
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/image.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/image.php,v $
|
||||||
* $Revision: 1.17 $
|
* $Revision: 1.18 $
|
||||||
* $Date: 2008-12-12 22:39:17 $
|
* $Date: 2008-12-15 13:31:01 $
|
||||||
* $Author: secretr $
|
* $Author: secretr $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -26,7 +26,6 @@ require_once("auth.php");
|
|||||||
require_once(e_HANDLER."form_handler.php");
|
require_once(e_HANDLER."form_handler.php");
|
||||||
require_once(e_HANDLER."userclass_class.php");
|
require_once(e_HANDLER."userclass_class.php");
|
||||||
require_once(e_HANDLER."message_handler.php");
|
require_once(e_HANDLER."message_handler.php");
|
||||||
$rs = new form;
|
|
||||||
$frm = new e_form(); //new form handler
|
$frm = new e_form(); //new form handler
|
||||||
|
|
||||||
$emessage = &eMessage::getInstance();
|
$emessage = &eMessage::getInstance();
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
* e107 Admin Helper
|
* e107 Admin Helper
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_files/jslib/core/admin.js,v $
|
* $Source: /cvs_backup/e107_0.8/e107_files/jslib/core/admin.js,v $
|
||||||
* $Revision: 1.2 $
|
* $Revision: 1.3 $
|
||||||
* $Date: 2008-12-11 11:25:21 $
|
* $Date: 2008-12-15 13:31:02 $
|
||||||
* $Author: secretr $
|
* $Author: secretr $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -33,7 +33,7 @@ e107Admin.Helper = {
|
|||||||
$$('.autocheck').invoke('observe', 'click', this.toggleCheckedHandler);
|
$$('.autocheck').invoke('observe', 'click', this.toggleCheckedHandler);
|
||||||
$$('button.action[name=check_all]').invoke('observe', 'click', this.allCheckedEventHandler);
|
$$('button.action[name=check_all]').invoke('observe', 'click', this.allCheckedEventHandler);
|
||||||
$$('button.action[name=uncheck_all]').invoke('observe', 'click', this.allUncheckedEventHandler);
|
$$('button.action[name=uncheck_all]').invoke('observe', 'click', this.allUncheckedEventHandler);
|
||||||
$$('button.delete').invoke('observe', 'click', function(e){ if( !e107Helper.confirm(e107.getModLan('delete_confirm')) ) e.stop(); });
|
$$('button.delete', 'input.delete[type=image]').invoke('observe', 'click', function(e){ if( !e107Helper.confirm(e107.getModLan('delete_confirm')) ) e.stop(); });
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
| e107 website system - Language File.
|
| e107 website system - Language File.
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_frontpage.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_frontpage.php,v $
|
||||||
| $Revision: 1.2 $
|
| $Revision: 1.3 $
|
||||||
| $Date: 2007-06-24 16:30:48 $
|
| $Date: 2008-12-15 13:31:02 $
|
||||||
| $Author: e107steved $
|
| $Author: secretr $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -31,15 +31,16 @@ define("FRTLAN_34", "Page");
|
|||||||
|
|
||||||
define("FRTLAN_1", "Front Page settings updated.");
|
define("FRTLAN_1", "Front Page settings updated.");
|
||||||
define("FRTLAN_12", "Update Front Page Settings");
|
define("FRTLAN_12", "Update Front Page Settings");
|
||||||
define("FRTLAN_13", "Front Page Settings");
|
define("FRTLAN_13", "Current Front Page Settings");
|
||||||
define("FRTLAN_15", "Other (enter url):");
|
define("FRTLAN_15", "Other (enter url):");
|
||||||
define("FRTLAN_33", "Current Settings");
|
//define("FRTLAN_33", "Current Settings");
|
||||||
|
|
||||||
// New language defs for 0.8
|
// New language defs for 0.8
|
||||||
define('FRTLAN_35', 'Post-login page');
|
define('FRTLAN_35', 'Post-login page');
|
||||||
define('FRTLAN_38', 'The rules are searched in order, to find the first where the current user belongs to the class specified in the rule. That rule then determines the front (home) page and any specific post-login page.');
|
define('FRTLAN_38', 'The rules are searched in order, to find the first where the current user belongs to the class specified in the rule. That rule then determines the front (home) page and any specific post-login page.');
|
||||||
define('FRTLAN_39', 'If no rule matches, news.php is set as the home page');
|
define('FRTLAN_39', 'If no rule matches, news.php is set as the home page');
|
||||||
define('FRTLAN_40', 'Order');
|
define('FRTLAN_40', 'Order');
|
||||||
define('FRTLAN_41', "The user is sent to the specified 'Post-login page' (if specified) immediately following a login");
|
define('FRTLAN_41', 'The user is sent to the specified "Post-login page" (if specified) immediately following a login');
|
||||||
define('FRTLAN_42', 'Add new rule');
|
define('FRTLAN_42', 'Add new rule');
|
||||||
define('FRTLAN_43', 'Class: ');
|
define('FRTLAN_43', 'Class: ');
|
||||||
define('FRTLAN_44', 'Go to this page after login');
|
define('FRTLAN_44', 'Go to this page after login');
|
||||||
@ -48,10 +49,12 @@ define('FRTLAN_46', 'Edit existing rule');
|
|||||||
define('FRTLAN_47', 'Move up');
|
define('FRTLAN_47', 'Move up');
|
||||||
define('FRTLAN_48', 'Move down');
|
define('FRTLAN_48', 'Move down');
|
||||||
define('FRTLAN_49', 'Home Page');
|
define('FRTLAN_49', 'Home Page');
|
||||||
define('FRTLAN_50', "(To disable, select 'Other' with a blank page)");
|
define('FRTLAN_50', '(To disable, select "Other" with a blank URL)');
|
||||||
define('FRTLAN_51', "Other");
|
define('FRTLAN_51', 'Other');
|
||||||
define('FRTLAN_52', "None");
|
define('FRTLAN_52', 'None');
|
||||||
define('FRTLAN_53', 'User Class');
|
define('FRTLAN_53', 'User Class');
|
||||||
|
|
||||||
|
//0.8
|
||||||
|
define("FRTLAN_PAGE_TITLE", 'Front Page');
|
||||||
|
define("FRTLAN_54", 'Are you sure?');
|
||||||
?>
|
?>
|
@ -213,6 +213,7 @@ input.radio { margin-right: 3px; }
|
|||||||
/******** Tooltip info */
|
/******** Tooltip info */
|
||||||
.e-info {}
|
.e-info {}
|
||||||
|
|
||||||
|
/******** Admin Buttons */
|
||||||
button {
|
button {
|
||||||
border:0;
|
border:0;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
@ -250,13 +251,13 @@ button.delete:hover span,
|
|||||||
button.delete:focus span { background-image:url(images/btn_remove_over_left.gif) }
|
button.delete:focus span { background-image:url(images/btn_remove_over_left.gif) }
|
||||||
button.delete:active span { background-image:url(images/btn_remove_active_left.gif)}
|
button.delete:active span { background-image:url(images/btn_remove_active_left.gif)}
|
||||||
|
|
||||||
/* Do we need this? Just no additional class?
|
/*default submit*/
|
||||||
button.submit span {}
|
button.submit span {}
|
||||||
button.submit span {}
|
button.submit span {}
|
||||||
button.submit:hover span,
|
button.submit:hover span,
|
||||||
button.submit:focus span {}
|
button.submit:focus span {}
|
||||||
button.submit:active span {}
|
button.submit:active span {}
|
||||||
*/
|
|
||||||
|
|
||||||
button.update span { padding-left: 30px; }
|
button.update span { padding-left: 30px; }
|
||||||
button.update span { background-image:url(images/btn_update_left.gif); }
|
button.update span { background-image:url(images/btn_update_left.gif); }
|
||||||
@ -287,6 +288,10 @@ button.cancel:active span {}
|
|||||||
.buttons-bar button { margin-right: 10px; }
|
.buttons-bar button { margin-right: 10px; }
|
||||||
.buttons-bar button.f-right { margin-right: 0px; }
|
.buttons-bar button.f-right { margin-right: 0px; }
|
||||||
|
|
||||||
|
/* Actions (adminlist ) */
|
||||||
|
input.action {} /* default */
|
||||||
|
input.delete {}
|
||||||
|
input.edit {}
|
||||||
|
|
||||||
/*******************************************************************************************************************/
|
/*******************************************************************************************************************/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user