diff --git a/e107_admin/header.php b/e107_admin/header.php
index d825f4fee..d7d443604 100644
--- a/e107_admin/header.php
+++ b/e107_admin/header.php
@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/header.php,v $
-| $Revision: 1.21 $
-| $Date: 2008-12-16 11:05:36 $
+| $Revision: 1.22 $
+| $Date: 2008-12-17 17:27:07 $
| $Author: secretr $
+---------------------------------------------------------------+
*/
@@ -400,11 +400,11 @@ if (!function_exists('show_admin_menu')) {
$BUTTON_TEMPLATE = $sub_link ? $SUB_BUTTON : $BUTTON;
}
$replace[0] = str_replace(" ", " ", $e107_vars[$act]['text']);
- $replace[1] = $e107_vars[$act]['link'];
+ $replace[1] = varset($e107_vars[$act]['link'], "#{$act}");
if (!empty($e107_vars[$act]['include'])) {
$replace[2] = $e107_vars[$act]['include'];
} else {
- $replace[2] = $js ? "onclick=\"showhideit('".$act."');\"" : "onclick=\"document.location='".$e107_vars[$act]['link']."'; disabled=true;\"";
+ $replace[2] = $js ? " onclick=\"showhideit('".$act."');\"" : " onclick=\"document.location='".$e107_vars[$act]['link']."'; disabled=true;\"";
}
$replace[3] = $title;
$replace[4] = $id_title;
diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php
index 16331c5ef..5076609a3 100644
--- a/e107_admin/prefs.php
+++ b/e107_admin/prefs.php
@@ -1,1095 +1,1135 @@
db_Update("user", "user_name=user_loginname");
- $message = PRFLAN_157;
+ $e107->sql->db_Update("user", "user_name=user_loginname");
+ $emessage->add(PRFLAN_157);
}
-if (isset($_POST['updateprefs']))
+/* UPDATE PREFERENCES */
+if(isset($_POST['updateprefs']))
{
- unset($_POST['updateprefs'],$_POST['sitelanguage']);
+ unset($_POST['updateprefs'], $_POST['sitelanguage']);
- $_POST['cookie_name'] = str_replace(array(" ","."), "_", $_POST['cookie_name']);
+ $_POST['cookie_name'] = str_replace(array(" ", "."), "_", $_POST['cookie_name']);
$_POST['cookie_name'] = preg_replace("#[^a-zA-Z0-9_]#", "", $_POST['cookie_name']);
- $_POST['siteurl'] = trim($_POST['siteurl']) ? trim($_POST['siteurl']) : SITEURL;
- $_POST['siteurl'] = substr($_POST['siteurl'], -1) == "/" ? $_POST['siteurl'] : $_POST['siteurl']."/";
+ $_POST['siteurl'] = trim($_POST['siteurl']) ? trim($_POST['siteurl']) : SITEURL;
+ $_POST['siteurl'] = substr($_POST['siteurl'], - 1) == "/" ? $_POST['siteurl'] : $_POST['siteurl']."/";
// If email verification, email address is required!
- if ($_POST['user_reg_veri'] == 1) $_POST['disable_emailcheck'] = 0;
+ if($_POST['user_reg_veri'] == 1)
+ $_POST['disable_emailcheck'] = 0;
-// Table of range checking values - min and max for numerics. Only do the important ones
- $pref_limits = array(
- 'loginname_maxlength' => array('min' => 10, 'max' => 100, 'default' => 30),
- 'displayname_maxlength' => array('min' => 5, 'max' => 30, 'default' => 15),
- 'antiflood_timeout' => array('min' => 3, 'max' => 300, 'default' => 10)
- );
+ // Table of range checking values - min and max for numerics. Only do the important ones
+ $pref_limits = array('loginname_maxlength' => array('min' => 10, 'max' => 100, 'default' => 30), 'displayname_maxlength' => array('min' => 5, 'max' => 30, 'default' => 15), 'antiflood_timeout' => array('min' => 3, 'max' => 300, 'default' => 10));
$prefChanges = array();
foreach($_POST as $key => $value)
{
- if (isset($pref_limits[$key]))
- { // Its a numeric value to check
- if (is_numeric($value))
- {
- if ($value < $pref_limits[$key]['min']) $value = $pref_limits[$key]['min'];
- if ($value > $pref_limits[$key]['max']) $value = $pref_limits[$key]['max'];
+ if(isset($pref_limits[$key]))
+ { // Its a numeric value to check
+ if(is_numeric($value))
+ {
+ if($value < $pref_limits[$key]['min'])
+ $value = $pref_limits[$key]['min'];
+ if($value > $pref_limits[$key]['max'])
+ $value = $pref_limits[$key]['max'];
+ }
+ else
+ {
+ $value = $pref_limits[$key]['default'];
+ }
+ $newValue = $value;
}
else
{
- $value = $pref_limits[$key]['default'];
- }
- $newValue = $value;
- }
- else
- {
- $newValue = $tp->toDB($value);
- }
- if ($newValue != $pref[$key])
- { // Changed value
- $pref[$key] = $newValue;
- $prefChanges[$key] = $newValue;
- }
+ $newValue = $tp->toDB($value);
+ }
+ if($newValue != $pref[$key])
+ { // Changed value
+ $pref[$key] = $newValue;
+ $prefChanges[$key] = $newValue;
+ }
}
- if (count($prefChanges))
- { // Values have changed
- $e107cache->clear('',TRUE);
+ if(count($prefChanges))
+ { // Values have changed
+ $e107cache->clear('', TRUE);
$saved = save_prefs();
$logStr = '';
- foreach ($prefChanges as $k => $v)
+ foreach($prefChanges as $k => $v)
{
$logStr .= "[!br!]{$k} => {$v}";
}
- $admin_log->log_event('PREFS_01',PRFLAN_195.$logStr,'');
-
- $sql -> db_Select_gen("TRUNCATE ".MPREFIX."online");
+ $admin_log->log_event('PREFS_01', PRFLAN_195.$logStr, '');
+ $e107->sql->db_Select_gen("TRUNCATE ".MPREFIX."online");
}
if($saved)
{
- header("location:".e_ADMIN."prefs.php?u");
- exit;
+ $emessage->addSession(PRFLAN_106, E_MESSAGE_SUCCESS);
+ header("location:".e_ADMIN."prefs.php?u");
+ exit();
+ }
+ else
+ {
+ include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php');
+ $emessage->add(LAN_NO_CHANGE);
}
}
-if($sql->db_Select("plugin", "plugin_path", "plugin_installflag='1' AND plugin_path = 'alt_auth'"))
+if($e107->sql->db_Select("plugin", "plugin_path", "plugin_installflag='1' AND plugin_path='alt_auth'"))
{
$authlist[] = "e107";
- $handle=opendir(e_PLUGIN."alt_auth");
- while ($file = readdir($handle))
+ $handle = opendir(e_PLUGIN."alt_auth");
+ while($file = readdir($handle))
{
- if(preg_match("/^(.*)_auth\.php/",$file,$match))
+ if(preg_match("/^(.*)_auth\.php/", $file, $match))
{
$authlist[] = $match[1];
}
}
}
-if ($authlist)
+if($authlist)
{
- $auth_dropdown .= "";
+}
+else
{
$auth_dropdown = "".PRFLAN_151;
$pref['auth_method'] = "";
}
-
-require_once("auth.php");
-
-if (isset($message)) {
+require_once (e_ADMIN."auth.php");
+/*
+if(isset($message))
+{
$ns->tablerender("", "
".$message."
");
}
-if(e_QUERY == "u") {
+if(e_QUERY == "u")
+{
$ns->tablerender("", "".PRFLAN_106."
");
}
-
+*/
$handle = opendir(e_ADMIN.'includes/');
-while ($file = readdir($handle)) {
- if ($file != "." && $file != "..") {
+while($file = readdir($handle))
+{
+ if($file != "." && $file != "..")
+ {
$file = str_replace(".php", "", $file);
$adminlist[] = $file;
}
}
closedir($handle);
-$text = "
- ";
+$e107->ns->tablerender(PRFLAN_53, $emessage->render().$text);
-$ns->tablerender(PRFLAN_53, $text);
+require_once(e_ADMIN."footer.php");
-require_once("footer.php");
-
-function pref_submit() {
- $text = "
-
-
";
+ $text .= "\n";
// END ML
return $text;
}
-function prefs_adminmenu() {
- $var['main']['text'] = PRFLAN_1;
- $var['display']['text'] = PRFLAN_13;
- $var['admindisp']['text'] = PRFLAN_77;
- $var['date']['text'] = PRFLAN_21;
- $var['registration']['text'] = PRFLAN_28;
- $var['signup']['text'] = PRFLAN_19;
- $var['textpost']['text'] = PRFLAN_101;
- $var['security']['text'] = PRFLAN_47;
- $var['comments']['text'] = PRFLAN_87;
- $var['advanced']['text'] = PRFLAN_149;
- show_admin_menu(LAN_OPTIONS, $action, $var, TRUE);
+function prefs_adminmenu()
+{
+ $var['core-prefs-main']['text'] = PRFLAN_1;
+ $var['core-prefs-display']['text'] = PRFLAN_13;
+ $var['core-prefs-admindisp']['text'] = PRFLAN_77;
+ $var['core-prefs-date']['text'] = PRFLAN_21;
+ $var['core-prefs-registration']['text'] = PRFLAN_28;
+ $var['core-prefs-signup']['text'] = PRFLAN_19;
+ $var['core-prefs-textpost']['text'] = PRFLAN_101;
+ $var['core-prefs-security']['text'] = PRFLAN_47;
+ $var['core-prefs-comments']['text'] = PRFLAN_87;
+ $var['core-prefs-advanced']['text'] = PRFLAN_149;
+ show_admin_menu(LAN_OPTIONS, '', $var, TRUE);
}
?>
\ No newline at end of file
diff --git a/e107_files/shortcode/admin_lang.sc b/e107_files/shortcode/admin_lang.sc
index dbbea8f0d..0e2f84d7b 100644
--- a/e107_files/shortcode/admin_lang.sc
+++ b/e107_files/shortcode/admin_lang.sc
@@ -1,7 +1,6 @@
-
/*
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
- * $Id: admin_lang.sc,v 1.4 2008-12-16 17:23:25 secretr Exp $
+ * $Id: admin_lang.sc,v 1.5 2008-12-17 17:27:07 secretr Exp $
*
* Admin Language Shortcode
*
diff --git a/e107_files/shortcode/imagepreview.sc b/e107_files/shortcode/imagepreview.sc
index c2ac374e1..452f988bd 100644
--- a/e107_files/shortcode/imagepreview.sc
+++ b/e107_files/shortcode/imagepreview.sc
@@ -1,15 +1,19 @@
-// $Id: imagepreview.sc,v 1.1 2008-03-18 00:39:02 e107coders Exp $
-global $tp;
-list($name,$width,$height,$img_path) = explode("|",$parm);
-if(!$width)
+// $Id: imagepreview.sc,v 1.2 2008-12-17 17:27:07 secretr Exp $
+global $e107;
+
+list($name, $width, $height) = explode("|",$parm, 3);
+
+$name = varset($name);//avoid warnings
+if(varset($width))
{
- $width = "32px";
+ $width = " width: {$width};";
}
-if(!$height)
+if(varset($height))
{
- $height = "32px";
+ $height = " width: {$height};";
}
-$path = ($_POST[$name] && $_POST['ajax_used']) ? $img_path.$tp->replaceConstants($_POST[$name]) : e_IMAGE_ABS."generic/blank.gif";
-return "
";
+$path = (varset($_POST[$name]) && defsettrue('e_AJAX_REQUEST')) ? $e107->tp->replaceConstants($_POST[$name], 'full') : e_IMAGE_ABS."generic/blank.gif";
+
+return "
";
diff --git a/e107_files/shortcode/imageselector.sc b/e107_files/shortcode/imageselector.sc
index 83bbab94b..49fe2b292 100644
--- a/e107_files/shortcode/imageselector.sc
+++ b/e107_files/shortcode/imageselector.sc
@@ -1,5 +1,6 @@
-// $Id: imageselector.sc,v 1.7 2008-11-20 20:34:58 e107steved Exp $
+// $Id: imageselector.sc,v 1.8 2008-12-17 17:27:07 secretr Exp $
+//FIXME - full rewrite, backward compatible
global $sql,$parm,$tp;
if(strstr($parm,"="))
@@ -9,35 +10,10 @@ if(strstr($parm,"="))
}
else
{ // comma separated parms.
- list($name,$path,$default,$width,$height,$multiple,$label,$subdirs,$filter,$fullpath,$click_target,$click_prefix,$click_postfix) = explode(",",$parm);
+ list($name,$path,$default,$width,$height,$multiple,$label,$subdirs,$filter,$fullpath,$click_target,$click_prefix,$click_postfix,$tabindex,$class) = explode(",",$parm);
}
-require_once(e_HANDLER."file_class.php");
-$fl = new e_file;
-
$paths = explode("|",$path);
-$recurse = ($subdirs) ? $subdirs : 0;
-$imagelist = array();
-
-foreach($paths as $pths)
-{
- $imagelist += $fl->get_files($pths,'\.jpg|\.gif|\.png|\.JPG|\.GIF|\.PNG', 'standard', $recurse);
-}
-
-if($imagelist)
-{
- sort($imagelist);
-}
-
-if(!$fullpath && (count($paths) > 1))
-{
- $fullpath = TRUE;
-}
-
-$multi = ($multiple == "TRUE" || $multiple == "1") ? "multiple='multiple' style='height:{$height}'" : "style='float:left'";
-$width = ($width) ? $width : "*";
-$height = ($height) ? $height : "*";
-$label = ($label) ? $label : " -- -- ";
if(trim($default[0])=="{")
{
@@ -45,38 +21,78 @@ if(trim($default[0])=="{")
$path = ""; // remove the default path if a constant is used.
}
-$text .= "
-\n";
-foreach($imagelist as $icon)
-{
- $dir = str_replace($paths,"",$icon['path']);
+$scaction = varsettrue($scaction, 'all');
+$text = '';
- if(!$filter || ($filter && ereg($filter,$dir.$icon['fname'])))
+//Get Select Box Only!
+if($scaction == 'select' || $scaction == 'all')
+{
+ require_once(e_HANDLER."file_class.php");
+ $fl = new e_file;
+
+
+ $recurse = ($subdirs) ? $subdirs : 0;
+ $imagelist = array();
+
+ foreach($paths as $pths)
{
- $pth = ($fullpath) ? $tp->createConstants($icon['path'],1) : $dir;
- $selected = ($default == $pth.$icon['fname']) ? " selected='selected'" : "";
- $text .= "\n";
+ $imagelist += $fl->get_files($pths,'\.jpg|\.gif|\.png|\.JPG|\.GIF|\.PNG', 'standard', $recurse);
}
+
+ if($imagelist)
+ {
+ sort($imagelist);
+ }
+
+ if(!$fullpath && (count($paths) > 1))
+ {
+ $fullpath = TRUE;
+ }
+
+ $multi = ($multiple == "TRUE" || $multiple == "1") ? " multiple='multiple' style='height:{$height}'" : "";//style='float:left'
+ $width = ($width) ? $width : "0";
+ $height = ($height) ? $height : "0";
+ $label = ($label) ? $label : " -- -- ";
+ $tabindex = varset($tabindex) ? " tabindex='{$tabindex}'" : '';
+ $class = varset($class) ? " class='{$class}'" : " class='tbox'";
+
+ $text .= "
+ \n";
+ foreach($imagelist as $icon)
+ {
+ $dir = str_replace($paths,"",$icon['path']);
+
+ if(!$filter || ($filter && ereg($filter,$dir.$icon['fname'])))
+ {
+ $pth = ($fullpath) ? $tp->createConstants($icon['path'],1) : $dir;
+ $selected = ($default == $pth.$icon['fname']) ? " selected='selected'" : "";
+ $text .= "\n";
+ }
+
+ }
+ $text .= "";
+
+
+ if($scaction == 'select') return $text;
}
-$text .= "";
+
if(!$pvw_default)
{
$pvw_default = ($default) ? $path.$default : e_IMAGE_ABS."generic/blank.gif";
}
+$text .= "\n";
-//$text .= "
\n";
-
-
-return "\n\n\n\n".$text."\n\n\n\n";
\ No newline at end of file
+return "\n\n\n\n".$text."\n\n\n\n";
\ No newline at end of file
diff --git a/e107_themes/_blank/admin_style.css b/e107_themes/_blank/admin_style.css
index 794bd3541..ebda8c8fb 100644
--- a/e107_themes/_blank/admin_style.css
+++ b/e107_themes/_blank/admin_style.css
@@ -121,6 +121,7 @@ select.tbox { min-height:17px; padding: 0px; /* setting the height of empty sel
.select.time-offset { width: 60px !important; }
input.radio { margin-right: 3px; }
label { cursor: pointer; }
+.checkbox { margin-right: 5px; }
/* Related JS functionality - .autocheck together with .auto-toggle-area (see admin/image.php) */
.auto-toggle-area { width: 280px; cursor: pointer; }
@@ -131,6 +132,10 @@ label { cursor: pointer; }
.adminform { width:100%; border:1px solid #ddd;}
+.adminform th { padding: 5px; font-weight: bold; white-space:nowrap; }
+.adminform td { padding: 5px; }
+
+
.adminform td { padding: 5px; text-align: left}
.adminform td div.field-spacer { clear: both; margin-bottom: 3px; } /* multi-fields per row separator */
@@ -300,10 +305,19 @@ input.action { vertical-align: middle; } /* default */
input.action.delete {}
input.action.edit {}
+/********** Page Loading Status default style */
+#loading-mask { color: #556B2F; font-size: 1.2em; font-weight:bold; position:absolute; text-align: center; padding: 0; margin: 0; background-color: transparent; }
+#loading-mask .loader { position: fixed; top: 40%; left: 50%; width: 200px; text-align: center; background: #F0F9E3 none repeat scroll 0 0; border: 2px solid #556B2F; font-weight: bold; padding: 10px 5px; margin-left: -100px; margin-top: 0; }
+#loading-mask img { margin: 10px auto; }
+
+/********** Element Loading Status default style */
+.element-loading-mask { background-repeat: no-repeat; background-position: 50% 50%; background-color: #f5f5f5; }
+
/********** Misc */
.e-pointer { cursor: pointer; } /* Pointer Hand */
.expand-container { padding: 10px; } /* Block with expandable items */
.nextprev-bar { clear: both; padding: 5px; font-size: 14px; margin: 5px; border:1px solid #ddd; } /* Page NextPrev nabigation block */
+.imgselector-container { clear: both; } /* ImageSelector.sc */
/*******************************************************************************************************************/
@@ -347,10 +361,12 @@ ul.plugin-navigation ul.sub-nav a.link-active {font-weight: bold;}
/******** Block Elements */
.block { border: 1px solid #DDDDDD; margin-bottom: 10px;}
.block-text { padding: 10px 10px 10px; }
-.block h2, .block h4 { padding: 5px 10px 5px; border-bottom: 1px solid #DDDDDD; }
+.block h2.caption, .block h4.caption { padding: 5px 10px 5px; border-bottom: 1px solid #DDDDDD; }
.page-info { border: 1px solid #DDDDDD; margin-bottom: 10px; }
.page-info p { padding: 10px; }
+#core-banlist-times .textarea { width: 98%; }
+
#core-emoticon-configure input.input-text { width: 300px; }
#core-links-edit textarea { width: 390px !important; }
#core-links-edit .helpbox { width: 390px !important; margin: 5px 0px; }
@@ -358,9 +374,6 @@ ul.plugin-navigation ul.sub-nav a.link-active {font-weight: bold;}
#core-admin-log-config legend { font-weight: bold; }
-#core-admin-log-options .checkbox,
-#core-admin-log-filter .checkbox { margin-right: 5px; }
-
#core-admin-log-maintenance .select { width: 60px; }
#core-admin-log-maintenance button { margin-left: 10px; }
@@ -382,6 +395,19 @@ ul.plugin-navigation ul.sub-nav a.link-active {font-weight: bold;}
#core-admin-log-list {}
#core-admin-log-confirm-delete {}
+/* administrator.php */
+#core-administrator-list {} /* List current administrators - Default front page */
+#core-administrator-edit {} /* Edit administrators permissions */
+
+/* banlist.php */
+#core-banlist-options {}
+#core-banlist-options-ban {}
+#core-banlist-times {}
+#core-banlist-edit {}
+#core-banlist-transfer-export {}
+#core-banlist-transfer-import {}
+
+
/* cache.php */
#core-cache-settings {} /* General cache settings - Default front page */
diff --git a/e107_themes/_blank/admin_template.php b/e107_themes/_blank/admin_template.php
index d5d8fb917..0d20f4196 100644
--- a/e107_themes/_blank/admin_template.php
+++ b/e107_themes/_blank/admin_template.php
@@ -9,8 +9,8 @@
* Admin template - _blank theme
*
* $Source: /cvs_backup/e107_0.8/e107_themes/_blank/admin_template.php,v $
- * $Revision: 1.6 $
- * $Date: 2008-12-16 17:23:25 $
+ * $Revision: 1.7 $
+ * $Date: 2008-12-17 17:27:07 $
* $Author: secretr $
*
*/
@@ -104,18 +104,18 @@ $BUTTONS_START = '
';
$BUTTON = '
- » {LINK_TEXT}
+ » {LINK_TEXT}
';
$BUTTON_OVER = '
- » {LINK_TEXT}
+ » {LINK_TEXT}
';
$SUB_BUTTONS_START = '