mirror of
https://github.com/e107inc/e107.git
synced 2025-01-29 10:38:08 +01:00
Bugtracker #4480 - make the two banner config pages consistent
This commit is contained in:
parent
e2d5327566
commit
1cdf8e17bc
@ -11,13 +11,14 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_admin/banner.php,v $
|
||||
| $Revision: 1.5 $
|
||||
| $Date: 2008-07-20 18:05:57 $
|
||||
| $Revision: 1.6 $
|
||||
| $Date: 2008-08-26 19:45:11 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
require_once("../class2.php");
|
||||
if (!getperms("D")) {
|
||||
if (!getperms("D"))
|
||||
{
|
||||
header("location:".e_BASE."index.php");
|
||||
exit;
|
||||
}
|
||||
@ -29,8 +30,8 @@ require_once(e_HANDLER."userclass_class.php");
|
||||
require_once(e_HANDLER."file_class.php");
|
||||
$fl = new e_file;
|
||||
|
||||
$lan_file = e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_menus.php";
|
||||
include_once(file_exists($lan_file) ? $lan_file : e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_menus.php");
|
||||
@include_lan(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_menus.php");
|
||||
@include_lan(e_PLUGIN."banner_menu/languages/".e_LANGUAGE.".php");
|
||||
|
||||
|
||||
if(e_QUERY)
|
||||
@ -474,7 +475,7 @@ if ($action == "menu")
|
||||
|
||||
|
||||
$text = "<div style='text-align:center'>
|
||||
<form method='post' action='".e_SELF."' name='menu_conf_form'>
|
||||
<form method='post' action='".e_SELF."?menu' name='menu_conf_form'>
|
||||
<table style='".ADMIN_WIDTH."' class='fborder' >
|
||||
|
||||
<tr>
|
||||
@ -530,9 +531,11 @@ if ($action == "menu")
|
||||
<tr>
|
||||
<td style='width:40%' class='forumheader3'>".BANNER_MENU_L10."</td>
|
||||
<td style='width:60%' class='forumheader3'>
|
||||
<select class='tbox' id='banner_rendertype' name='banner_rendertype' size='1'>
|
||||
".$rs->form_option(BANNER_MENU_L12, ($menu_pref['banner_rendertype'] == 1 ? "1" : "0"), 1)."
|
||||
".$rs->form_option(BANNER_MENU_L13, ($menu_pref['banner_rendertype'] == 2 ? "1" : "0"), 2)."
|
||||
<select class='tbox' id='banner_rendertype' name='banner_rendertype' size='1' >
|
||||
".$rs->form_option(BANNER_MENU_L11, (!$menu_pref['banner_rendertype'] || $menu_pref['banner_rendertype'] == "0" ? "1" : "0"), 0)."
|
||||
".$rs->form_option("1 - ".BANNER_MENU_L12."", ($menu_pref['banner_rendertype'] == "1" ? "1" : "0"), 1)."
|
||||
".$rs->form_option("2 - ".BANNER_MENU_L13."", ($menu_pref['banner_rendertype'] == "2" ? "1" : "0"), 2)."
|
||||
".$rs->form_option("3 - ".BANNER_MENU_L14."", ($menu_pref['banner_rendertype'] == "3" ? "1" : "0"), 3)."
|
||||
".$rs->form_select_close()."
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/user_handler.php,v $
|
||||
| $Revision: 1.1 $
|
||||
| $Date: 2008-06-13 20:20:21 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2008-08-26 19:45:12 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -356,6 +356,26 @@ class UserHandler
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function makeUserCookie($lode,$autologin = FALSE)
|
||||
{
|
||||
global $pref;
|
||||
$cookieval = $lode['user_id'].".".md5($lode['user_password']); // (Use extra md5 on cookie value to obscure hashed value for password)
|
||||
if ($pref['user_tracking'] == "session")
|
||||
{
|
||||
$_SESSION[$pref['cookie_name']] = $cookieval;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($autologin == 1)
|
||||
{ // Cookie valid for up to 30 days
|
||||
cookie($pref['cookie_name'], $cookieval, (time() + 3600 * 24 * 30));
|
||||
}
|
||||
else
|
||||
{
|
||||
cookie($pref['cookie_name'], $cookieval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,9 +4,9 @@
|
||||
| e107 website system - Language File.
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_banner.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:34:40 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2008-08-26 19:45:22 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
define("BNRLAN_1", "Banner deleted.");
|
||||
@ -65,8 +65,8 @@ define("BANNER_MENU_L7", "available campaigns");
|
||||
define("BANNER_MENU_L8", "selected campaigns");
|
||||
define("BANNER_MENU_L9", "remove selection");
|
||||
define("BANNER_MENU_L10", "Render type");
|
||||
define("BANNER_MENU_L12", "plain");
|
||||
define("BANNER_MENU_L13", "in captioned box");
|
||||
//define("BANNER_MENU_L12", "plain");
|
||||
//define("BANNER_MENU_L13", "in captioned box");
|
||||
define("BANNER_MENU_L18", "Update Menu Settings");
|
||||
define("BANNER_MENU_L19", "number of banners to show:<br />this is only used when multiple campaigns are selected");
|
||||
|
||||
|
@ -11,14 +11,15 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/banner_menu/config.php,v $
|
||||
| $Revision: 1.1.1.1 $
|
||||
| $Date: 2006-12-02 04:34:44 $
|
||||
| $Author: mcfly_e107 $
|
||||
| $Revision: 1.2 $
|
||||
| $Date: 2008-08-26 19:45:33 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
$eplug_admin = TRUE;
|
||||
require_once("../../class2.php");
|
||||
if (!getperms("1")) {
|
||||
if (!getperms("1")) // Access to those who can change prefs, theme etc
|
||||
{
|
||||
header("location:".e_BASE."index.php");
|
||||
exit ;
|
||||
}
|
||||
@ -26,13 +27,11 @@ require_once(e_ADMIN."auth.php");
|
||||
require_once(e_HANDLER."form_handler.php");
|
||||
$rs = new form;
|
||||
|
||||
@include_once(e_PLUGIN."banner_menu/languages/".e_LANGUAGE.".php");
|
||||
@include_once(e_PLUGIN."banner_menu/languages/English.php");
|
||||
@include_lan(e_PLUGIN."banner_menu/languages/".e_LANGUAGE.".php");
|
||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_menus.php");
|
||||
|
||||
$lan_file = e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_menus.php";
|
||||
include(file_exists($lan_file) ? $lan_file : e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_menus.php");
|
||||
|
||||
if (e_QUERY) {
|
||||
if (e_QUERY)
|
||||
{
|
||||
$tmp = explode(".", e_QUERY);
|
||||
$action = $tmp[0];
|
||||
$sub_action = $tmp[1];
|
||||
@ -40,16 +39,21 @@ if (e_QUERY) {
|
||||
unset($tmp);
|
||||
}
|
||||
|
||||
if (isset($_POST['update_menu'])) {
|
||||
foreach($_POST as $k => $v) {
|
||||
if (strpos($k, "banner_") === 0) {
|
||||
if (isset($_POST['update_menu']))
|
||||
{
|
||||
foreach($_POST as $k => $v)
|
||||
{
|
||||
if (strpos($k, "banner_") === 0)
|
||||
{
|
||||
$menu_pref[$k] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['catid'])) {
|
||||
if (isset($_POST['catid']))
|
||||
{
|
||||
$array_cat = explode("-", $_POST['catid']);
|
||||
for($i = 0; $i < count($array_cat); $i++) {
|
||||
for($i = 0; $i < count($array_cat); $i++)
|
||||
{
|
||||
$cat .= $array_cat[$i]."|";
|
||||
}
|
||||
$cat = substr($cat, 0, -1);
|
||||
@ -60,7 +64,8 @@ if (isset($_POST['update_menu'])) {
|
||||
$ns->tablerender("", "<div style='text-align:center'><b>".BANNER_MENU_L2."</b></div>");
|
||||
}
|
||||
|
||||
if (!$menu_pref['banner_caption']) {
|
||||
if (!$menu_pref['banner_caption'])
|
||||
{
|
||||
$menu_pref['banner2_caption'] = BANNER_MENU_L1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user