1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 00:41:52 +02:00

Administration area - work in progress

This commit is contained in:
secretr
2008-12-10 16:59:19 +00:00
parent 7fe42a3b96
commit 13b8a037f6
12 changed files with 621 additions and 381 deletions

View File

@@ -1,20 +1,17 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/auth.php,v $
| $Revision: 1.5 $
| $Date: 2008-11-14 06:01:06 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Administration Area Authorization
*
* $Source: /cvs_backup/e107_0.8/e107_admin/auth.php,v $
* $Revision: 1.6 $
* $Date: 2008-12-10 16:59:19 $
* $Author: secretr $
*/
if (!defined('e107_INIT')) { exit; }
@@ -24,10 +21,18 @@ if (!defined('e107_INIT')) { exit; }
if (ADMIN)
{
define("ADMIN_PAGE", true);
require_once(e_ADMIN."header.php");
//don't include it if it'a an AJAX call or not wanted
if(!e_AJAX_REQUEST && !defset('NO_HEADER')) require_once(e_ADMIN."header.php");
}
else
{
//login via AJAX call is not allowed
if(e_AJAX_REQUEST)
{
require_once(e_HANDLER.'js_helper.php');
e_jshelper::sendAjaxError(403, ADLAN_86, ADLAN_87, true);
}
$use_imagecode = ($pref['logcode'] && extension_loaded("gd"));
if ($use_imagecode)
{
@@ -51,14 +56,14 @@ else
require_once(e_HANDLER.'user_handler.php');
$row = $authresult = $obj->authcheck($_POST['authname'], $_POST['authpass'], varset($_POST['hashchallenge'],''));
if ($row[0] == "authfail")
if ($row[0] == "authfail")
{
$admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"LOGIN",LAN_ROLL_LOG_11,"U: ".$tp->toDB($_POST['authname']),FALSE,LOG_TO_ROLLING);
echo "<script type='text/javascript'>document.location.href='../index.php'</script>\n";
header("location: ../index.php");
exit;
}
else
}
else
{
$cookieval = $row['user_id'].".".md5($row['user_password']);
@@ -88,11 +93,11 @@ else
$edata_li = array("user_id" => $row['user_id'], "user_name" => $row['user_name'], 'class_list' => implode(',',$class_list));
$e_event->trigger("login", $edata_li);
if ($pref['user_tracking'] == "session")
if ($pref['user_tracking'] == "session")
{
$_SESSION[$pref['cookie_name']] = $cookieval;
}
else
}
else
{
cookie($pref['cookie_name'], $cookieval, (time()+3600 * 24 * 30));
}
@@ -101,13 +106,13 @@ else
}
$e_sub_cat = 'logout';
require_once(e_ADMIN."header.php");
if(!defset('NO_HEADER')) require_once(e_ADMIN."header.php");
if (ADMIN == FALSE)
if (ADMIN == FALSE)
{
$obj = new auth;
$obj->authform();
require_once(e_ADMIN."footer.php");
if(!defset('NO_HEADER')) require_once(e_ADMIN."footer.php");
exit;
}
}
@@ -149,7 +154,7 @@ class auth
</tr>
";
if ($use_imagecode)
if ($use_imagecode)
{
$text .= "
<tr>

View File

@@ -1,104 +1,202 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/image.php,v $
| $Revision: 1.9 $
| $Date: 2008-12-09 17:49:59 $
| $Author: secretr $
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Image Administration Area
*
* $Source: /cvs_backup/e107_0.8/e107_admin/image.php,v $
* $Revision: 1.10 $
* $Date: 2008-12-10 16:59:19 $
* $Author: secretr $
*
*/
require_once("../class2.php");
if (!getperms("A")) {
header("location:".e_BASE."index.php");
header("location:".e_HTTP."index.php");
exit;
}
$e_sub_cat = 'image';
require_once("auth.php");
require_once(e_HANDLER."form_handler.php");
require_once(e_HANDLER."userclass_class.php");
$rs = new form;
if (isset($_POST['delete']))
/*
* CLOSE - GO TO MAIN SCREEN
*/
if(isset($_POST['submit_cancel_show']))
{
$image = $tp->toDB($_POST['filename']);
@unlink(e_FILE."public/avatars/".$image);
$sql->db_Update("user", "user_image='' WHERE user_image='-upload-{$image}'");
$sql->db_Update("user", "user_sess='' WHERE user_sess='{$image}'");
$admin_log->log_event('IMALAN_01',$image,E_LOG_INFORMATIVE,'');
$message = $image." ".IMALAN_28;
header('Location: '.e_SELF);
exit();
}
/*
* DELETE CHECKED AVATARS - SHOW AVATAR SCREEN
*/
if (isset($_POST['submit_show_delete_multi']))
{
if(varset($_POST['multiaction']))
{
$tmp = array(); $tmp1 = array(); $message = array();
if (isset($_POST['deleteall']))
foreach ($_POST['multiaction'] as $todel)
{
$todel = explode('#', $todel);
$todel[1] = basename($todel[1]);
$image_type = 2;
if(strpos($todel[1], '-upload-') === 0)
{
$image_type = 1;
$todel[1] = substr($todel[1], strlen('-upload-'));
}
//delete it from server
@unlink(e_FILE."public/avatars/".$todel[1]);
//admin log & sysmessage
$message[] = $todel[1];
//It's owned by an user
if($todel[0])
{
switch ($image_type)
{
case 1: //avatar
$tmp[] = intval($todel[0]);
break;
case 2: //photo
$tmp1[] = intval($todel[0]);
break;
}
}
}
//Reset all deleted user avatars with one query
if(!empty($tmp))
{
$sql->db_Update("user", "user_image='' WHERE user_id IN (".implode(',', $tmp).")");
}
//Reset all deleted user photos with one query
if(!empty($tmp1))
{
$sql->db_Update("user", "user_sess='' WHERE user_id IN (".implode(',', $tmp1).")");
}
unset($tmp, $tmp1);
//Format system message
if(!empty($message))
{
$admin_log->log_event('IMALAN_01', implode('[!br!]', $message), E_LOG_INFORMATIVE, '');
$message = implode(', ', $message).' '.IMALAN_28;
}
else $message = '';
}
}
/*
* DELETE ALL UNUSED IMAGES - SHOW AVATAR SCREEN
*/
if (isset($_POST['submit_show_deleteall']))
{
$handle = opendir(e_FILE."public/avatars/");
$dirlist = array();
while ($file = readdir($handle)) {
if ($file != '.' && $file != '..' && $file != "index.html" && $file != "null.txt" && $file != '/' && $file != 'CVS' && $file != 'Thumbs.db') {
if (!is_dir(e_FILE."public/avatars/{$file}") && $file != '.' && $file != '..' && $file != "index.html" && $file != "null.txt" && $file != '/' && $file != 'CVS' && $file != 'Thumbs.db') {
$dirlist[] = $file;
}
}
closedir($handle);
$imgList = '';
$count = 0;
while (list($key, $image_name) = each($dirlist))
if(!empty($dirlist))
{
if (!$sql->db_Select("user", "*", "user_image='-upload-$image_name' OR user_sess='$image_name'")) {
unlink(e_FILE."public/avatars/".$image_name);
$count++;
$imgList .= '[!br!]'.$image_name;
$imgList = '';
$count = 0;
foreach ($dirlist as $image_name)
{
$image_name = basename($image_name);
$image_todb = $tp->toDB($image_name);
if (!$sql->db_Count('user', '(*)', "WHERE user_image='-upload-{$image_todb}' OR user_sess='{$image_todb}'")) {
unlink(e_FILE."public/avatars/".$image_name);
$imgList .= '[!br!]'.$image_name;
$count++;
}
}
$message = $count." ".IMALAN_26;
$admin_log->log_event('IMALAN_02', $message.$imgList,E_LOG_INFORMATIVE, '');
unset($imgList);
}
$message = $count." ".IMALAN_26;
$admin_log->log_event('IMALAN_02',$message.$imgList,E_LOG_INFORMATIVE,'');
unset($imgList);
}
if (isset($_POST['avdelete']))
/*
* DELETE ALL CHECKED BAD IMAGES - VALIDATE SCREEN
*/
if (isset($_POST['submit_avdelete_multi']))
{
require_once(e_HANDLER."avatar_handler.php");
$avList = array();
foreach($_POST['avdelete'] as $key => $val)
$tmp = array();
$uids = array();
//Sanitize
$_POST['multiaction'] = $tp->toDB($_POST['multiaction']);
//sql queries significant reduced
if(!empty($_POST['multiaction']) && $sql->db_Select("user", 'user_id, user_name, user_image', "user_id IN (".implode(',', $_POST['multiaction']).")"))
{
$key = intval($key); // We only need the key
if ($sql->db_Select("user", 'user_id, user_name, user_image', "user_id='{$key}'"))
$search_users = $sql->db_getList('ALL', FALSE, FALSE, 'user_id');
foreach($_POST['multiaction'] as $uid)
{
$row = $sql->db_Fetch();
$avname=avatar($row['user_image']);
if (strpos($avname,"http://")===FALSE)
{ // Internal file, so unlink it
@unlink($avname);
if (varsettrue($search_users[$uid]))
{
$avname = avatar($search_users[$uid]['user_image']);
if (strpos($avname, "http://") === FALSE)
{ // Internal file, so unlink it
@unlink($avname);
}
$uids[] = $uid;
$tmp[] = $search_users[$uid]['user_name'];
$avList[] = $uid.':'.$search_users[$uid]['user_name'].':'.$search_users[$uid]['user_image'];
}
$sql->db_Update("user","user_image='' WHERE user_id='{$key}'");
$message = IMALAN_51.$row['user_name']." ".IMALAN_28;
$avList[] = $key.':'.$row['user_name'].':'.$row['user_image'];
}
//sql queries significant reduced
if(!empty($uids))
{
$sql->db_Update("user", "user_image='' WHERE user_id IN (".implode(',', $uids).")");
}
$message = IMALAN_51.'<strong>'.implode(', ', $tmp).'</strong> '.IMALAN_28;
$admin_log->log_event('IMALAN_03', implode('[!br!]', $avList), E_LOG_INFORMATIVE, '');
unset($search_users);
}
$admin_log->log_event('IMALAN_03',implode('[!br!]',$avList),E_LOG_INFORMATIVE,'');
unset($avList);
$_POST['check_avatar_sizes'] = TRUE; // Force size recheck after doing one or more deletes
unset($avList, $tmp, $uids);
}
/*
* UPDATE IMAGE OPTIONS - MAIN SCREEN
*/
if (isset($_POST['update_options']))
{
unset($temp);
$temp['image_post'] = intval($_POST['image_post']);
$temp['resize_method'] = $_POST['resize_method'];
$temp['im_path'] = trim($tp->toDB($_POST['im_path']));
$temp['image_post_class'] = intval($_POST['image_post_class']);
$temp['image_post_disabled_method'] = intval($_POST['image_post_disabled_method']);
$temp['enable_png_image_fix'] = intval($_POST['enable_png_image_fix']);
$tmp = array();
$tmp['image_post'] = intval($_POST['image_post']);
$tmp['resize_method'] = $tp->toDB($_POST['resize_method']);
$tmp['im_path'] = trim($tp->toDB($_POST['im_path']));
$tmp['image_post_class'] = intval($_POST['image_post_class']);
$tmp['image_post_disabled_method'] = intval($_POST['image_post_disabled_method']);
$tmp['enable_png_image_fix'] = intval($_POST['enable_png_image_fix']);
if ($admin_log->logArrayDiffs($temp, $pref, 'IMALAN_04'))
if ($admin_log->logArrayDiffs($tmp, $pref, 'IMALAN_04'))
{
save_prefs(); // Only save if changes
$message = IMALAN_9;
@@ -109,16 +207,29 @@ if (isset($_POST['update_options']))
}
}
//FIXME - better message handler, no tablerender for sys-messages anymore
if (isset($message))
/*
* SYSTEM MESSAGE
*/
//FIXME - better message handler, sysmessages CSS rules
if (varsettrue($message))
{
$ns->tablerender("", "<div style='text-align:center'><b>".$message."</b></div>");
//no tablerender for sys-messages anymore
$message = "
<div class='s-message info'><span>".$message."</span></div>
";
}
else
{
$message = '';
}
/*
* SHOW AVATARS SCREEN
*/
if (isset($_POST['show_avatars']))
{
$handle = opendir(e_FILE."public/avatars/");
$dirlist = array();
while ($file = readdir($handle))
{
if ($file != '.' && $file != '..' && $file != "index.html" && $file != "null.txt" && $file != '/' && $file != 'CVS' && $file != 'Thumbs.db' && !is_dir($file))
@@ -130,55 +241,77 @@ if (isset($_POST['show_avatars']))
$text = '';
if (!is_array($dirlist))
if (empty($dirlist))
{
$text .= IMALAN_29;
}
else
{
$text = "
<form method='post' action='".e_SELF."' id='form-show-avatars'>
<form method='post' action='".e_SELF."' id='core-iamge-show-avatars-form'>
<fieldset id='core-iamge-show-avatars'>
";
$count = 0;
while (list($key, $image_name) = each($dirlist))
{
$users = IMALAN_21." | ";
if ($sql->db_Select("user", "*", "user_image='-upload-$image_name' OR user_sess='$image_name'"))
$row = array('user_id' => '');
$image_pre = '';
$disabled = '';
if ($sql->db_Select("user", "*", "user_image='-upload-".$tp->toDB($image_name)."' OR user_sess='".$tp->toDB($image_name)."'"))
{
/*
//Is it possible?! I don't think so
while ($row = $sql->db_Fetch())
{
extract($row); //FIXME - kill this!!!
extract($row); // kill this!!!
$users .= "<a href='".e_BASE."user.php?id.$user_id'>$user_name</a> <span class='smalltext'>(".($user_sess == $image_name ? IMALAN_24 : IMALAN_23).")</span> | ";
}*/
$row = $sql->db_Fetch();
if($row['user_image'] == '-upload-'.$image_name) $image_pre = '-upload-';
$users .= "<a href='".e_BASE."user.php?id.{$row['user_id']}'>{$row['user_name']}</a> <span class='smalltext'>(".($row['user_sess'] == $image_name ? IMALAN_24 : IMALAN_23).")</span>";
} else {
$users = '<span class="warning">'.IMALAN_22.'</span>';
}
//File info
$users = "<a class='e-tooltip' href='#' title='".IMALAN_66.": {$image_name}'><img src='".e_IMAGE_ABS."admin_images/docs_16.png' alt='".IMALAN_66.": {$image_name}' /></a> ".$users;
// Control over the image size (design)
$image_size = getimagesize(e_FILE."public/avatars/".$image_name);
//Friendly UI - click text to select a form element
$img_src = "<label for='image-action-{$count}' title='".IMALAN_56."'><img src='".e_FILE_ABS."public/avatars/{$image_name}' alt='{$image_name}' /></label>";
if ($image_size[0] > $pref['im_width'] || $image_size[1] > $pref['im_height'])
//directory?
if(is_dir(e_FILE."public/avatars/".$image_name))
{
$img_src = "<a class='image-preview' href='".e_FILE_ABS."public/avatars/".rawurlencode($image_name)."'>".IMALAN_57."</a>";
}
//File info
$users = "<a class='e-tooltip' href='#' title='".IMALAN_69.": {$image_name}'><img src='".e_IMAGE_ABS."admin_images/docs_16.png' alt='".IMALAN_66.": {$image_name}' /></a> <span class='error'>".IMALAN_69."</span>";
// Control over the image size (design)
$image_size = getimagesize(e_FILE."public/avatars/".$image_name);
//Friendly UI - click text to select a form element
$img_src = '<span class="error">'.IMALAN_70.'</span>';
$disabled = ' disabled="disabled"';
}
else
{
//File info
$users = "<a class='e-tooltip' href='#' title='".IMALAN_66.": {$image_name}'><img src='".e_IMAGE_ABS."admin_images/docs_16.png' alt='".IMALAN_66.": {$image_name}' /></a> ".$users;
// Control over the image size (design)
$image_size = getimagesize(e_FILE."public/avatars/".$image_name);
//Friendly UI - click text to select a form element
$img_src = "<label for='image-action-{$count}' title='".IMALAN_56."'><img src='".e_FILE_ABS."public/avatars/{$image_name}' alt='{$image_name}' /></label>";
if ($image_size[0] > $pref['im_width'] || $image_size[1] > $pref['im_height'])
{
$img_src = "<a class='image-preview' href='".e_FILE_ABS."public/avatars/".rawurlencode($image_name)."' rel='external'>".IMALAN_57."</a>";
}
}
//style attribute allowed here - server side width/height control
//options class - used for JS selectors (see eCoreImage object)
$text .= "
<div class='image-box f-left center' style='width: ".(intval($pref['im_width'])+40)."px; height: ".(intval($pref['im_height'])+100)."px;'>
<div class='image-box f-left center options' style='width: ".(intval($pref['im_width'])+40)."px; height: ".(intval($pref['im_height'])+100)."px;'>
<div class='spacer'>
<div class='image-users'>{$users}</div>
<div class='image-preview'>{$img_src}</div>
<div class='image-delete options'>
<input type='checkbox' class='checkbox' id='image-action-{$count}' name='multiaction[]' value='{$image_name}' />
<input type='checkbox' class='checkbox' id='image-action-{$count}' name='multiaction[]' value='{$row['user_id']}#{$image_pre}{$image_name}'{$disabled} />
</div>
</div>
@@ -189,25 +322,30 @@ if (isset($_POST['show_avatars']))
$count++;
}
//FIXME add multi delete for better user experience (not working yet), make check/uncheck-all work
$text .= "
<div class='spacer clear'>
<div class='buttons-bar'>
<button class='delete' type='submit' name='deleteall'><span>".IMALAN_25."</span></button>
<button class='delete' type='submit' name='delete_multi'><span>".IMALAN_58."</span></button>
<button class='action' type='button' name='check_all'><span>".IMALAN_59."</span></button>
<button class='action' type='button' name='uncheck_all'><span>".IMALAN_60."</span></button>
</div>
<div class='buttons-bar'>
<input type='hidden' name='show_avatars' value='1' />
<button class='action' type='button' name='check_all' value='".IMALAN_59."'><span>".IMALAN_59."</span></button>
<button class='action' type='button' name='uncheck_all' value='".IMALAN_60."'><span>".IMALAN_60."</span></button>
<button class='delete' type='submit' name='submit_show_delete_multi' value='".IMALAN_58."'><span>".IMALAN_58."</span></button>
<button class='delete' type='submit' name='submit_show_deleteall' value='".IMALAN_25."'><span>".IMALAN_25."</span></button>
<button class='cancel' type='submit' name='submit_cancel_show' value='".IMALAN_68."'><span>".IMALAN_68."</span></button>
</div>
</div>
</fieldset>
</form>
";
}
$ns->tablerender(IMALAN_18, $text);
$ns->tablerender(IMALAN_18, $message.$text);
}
/*
* CHECK AVATARS SCREEN
*/
if (isset($_POST['check_avatar_sizes']))
{
// Set up to track what we've done
@@ -221,10 +359,10 @@ if (isset($_POST['check_avatar_sizes']))
$text = "
<form method='post' action='".e_SELF."'>
<fieldset id='bad-avatar-table'>
<fieldset id='core-image-check-avatar'>
<legend class='e-hideme'>".CACLAN_3."</legend>
<table cellpadding='0' cellspacing='0' class='adminlist'>
<colgroup span='3'>
<colgroup span='4'>
<col style='width:10%'></col>
<col style='width:20%'></col>
<col style='width:25%'></col>
@@ -246,15 +384,15 @@ if (isset($_POST['check_avatar_sizes']))
// Loop through avatar field for every user
//
$iUserCount = $sql->db_Count("user");
$found = false;
$allowedWidth = intval($pref['im_width']);
$allowedHeight = intval($pref['im_width']);
if ($sql->db_Select("user", "*", "user_image!=''")) {
while ($row = $sql->db_Fetch())
{
extract($row); //FIXME - kill this!!!
//
// Check size
//
$avname=avatar($user_image);
//Check size
$avname=avatar($row['user_image']);
if (strpos($avname,"http://")!==FALSE)
{
$iAVexternal++;
@@ -263,23 +401,31 @@ if (isset($_POST['check_avatar_sizes']))
$iAVinternal++;
$bAVext=FALSE;
}
$image_stats = getimagesize($avname);
$sBadImage="";
if (!$image_stats)
{
$iAVnotfound++;
// allow delete
$sBadImage=IMALAN_42;
} else {
}
else
{
$imageWidth = $image_stats[0];
$imageHeight = $image_stats[1];
if ( ($imageHeight > $pref['im_height']) || ($imageWidth > $pref['im_width']) )
if ( ($imageHeight > $allowedHeight) || ($imageWidth > $allowedWidth) )
{ // Too tall or too wide
$iAVtoobig++;
if ($imageWidth > $pref['im_width']) {
if ($imageWidth > $allowedWidth)
{
$sBadImage = IMALAN_40." ($imageWidth)";
}
if ($imageHeight > $pref['im_height']) {
if ($imageHeight > $allowedHeight)
{
if (strlen($sBadImage))
{
$sBadImage .= ", ";
@@ -289,90 +435,86 @@ if (isset($_POST['check_avatar_sizes']))
}
}
//
// If not found or too big, allow delete
//
//If not found or too large, allow delete
if (strlen($sBadImage))
{
//$sBadImage .=" [".$avname."]"; // Show all files that have a problem
//FIXME <button class='delete' type='submit' name='avdelete[$user_id]'><span>".($bAVext ? IMALAN_44 : IMALAN_43)."</span></button>
$found = true;
$text .= "
<tr>
<td class='options center'>
<input class='checkbox' type='checkbox' name='multiaction[]' id='avdelete-{$user_id}' value='{$user_id}' />
<input class='checkbox' type='checkbox' name='multiaction[]' id='avdelete-{$row['user_id']}' value='{$row['user_id']}' />
</td>
<td>
<label for='avdelete-{$user_id}' title='".IMALAN_56."'>".IMALAN_51."</label><a href='".e_BASE."user.php?id.".$user_id."'>".$user_name."</a>
<label for='avdelete-{$row['user_id']}' title='".IMALAN_56."'>".IMALAN_51."</label><a href='".e_BASE."user.php?id.{$row['user_id']}'>".$row['user_name']."</a>
</td>
<td>".$sBadImage."</td>
<td>".$avname."</td>
</tr>";
}
else
{
//Nothing found
$text .="
<tr>
<td colspan='4' class='center'>".IMALAN_65."</td>
</tr>";
}
}
}
//
// Done, so show stats
//
//Nothing found
if(!$found)
{
$text .= "
<tr>
<td colspan='4' class='center'>".IMALAN_65."</td>
</tr>
";
}
$text .= "
</tbody>
</table>
<div class='buttons-bar'>
<button class='action' type='button' name='check_all'><span>".IMALAN_59."</span></button>
<button class='action' type='button' name='uncheck_all'><span>".IMALAN_60."</span></button>
<button class='delete' type='submit' name='avdelete_multi'><span>".IMALAN_58."</span></button>
<input type='hidden' name='check_avatar_sizes' value='1' />
<button class='action' type='button' name='check_all' value='".IMALAN_59."'><span>".IMALAN_59."</span></button>
<button class='action' type='button' name='uncheck_all' value='".IMALAN_60."'><span>".IMALAN_60."</span></button>
<button class='delete' type='submit' name='submit_avdelete_multi' value='".IMALAN_58."'><span>".IMALAN_58."</span></button>
</div>
</fieldset>
</form>
<table cellpadding='0' cellspacing='0' class='admininfo'>
<colgroup span='2'>
<col style='width:20%'></col>
<col style='width:80%'></col>
</colgroup>
<tbody>
<tr>
<td class='label'>".IMALAN_38."</td>
<td class='control'>".$pref['im_width']."</td>
</tr>
<tr>
<td class='label'>".IMALAN_39."</td>
<td class='control'>".$pref['im_height']."</td>
</tr>
<tr>
<td class='label'>".IMALAN_45."</td>
<td class='control'>".$iAVnotfound."</td>
</tr>
<tr>
<td class='label'>".IMALAN_46."</td>
<td>".$iAVtoobig."</td>
</tr>
<tr class='control'>
<td class='label'>".IMALAN_47."</td>
<td>".$iAVinternal."</td>
</tr>
<tr>
<td class='label'>".IMALAN_48."</td>
<td class='control'>".$iAVexternal."</td>
</tr>
<tr>
<td class='label'>".IMALAN_49."</td>
<td class='control'>".($iAVexternal+$iAVinternal)." (".(int)(100.0*(($iAVexternal+$iAVinternal)/$iUserCount)).'%, '.$iUserCount." ".IMALAN_50.")</td>
</tr>
</tbody>
<colgroup span='2'>
<col style='width:20%'></col>
<col style='width:80%'></col>
</colgroup>
<tbody>
<tr>
<td class='label'>".IMALAN_38."</td>
<td class='control'>{$allowedWidth}</td>
</tr>
<tr>
<td class='label'>".IMALAN_39."</td>
<td class='control'>{$allowedHeight}</td>
</tr>
<tr>
<td class='label'>".IMALAN_45."</td>
<td class='control'>{$iAVnotfound}</td>
</tr>
<tr>
<td class='label'>".IMALAN_46."</td>
<td class='control'>{$iAVtoobig}</td>
</tr>
<tr>
<td class='label'>".IMALAN_47."</td>
<td class='control'>{$iAVinternal}</td>
</tr>
<tr>
<td class='label'>".IMALAN_48."</td>
<td class='control'>{$iAVexternal}</td>
</tr>
<tr>
<td class='label'>".IMALAN_49."</td>
<td class='control'>".($iAVexternal+$iAVinternal)." (".(int)(100.0*(($iAVexternal+$iAVinternal)/$iUserCount)).'%, '.$iUserCount." ".IMALAN_50.")</td>
</tr>
</tbody>
</table>
";
$ns->tablerender(IMALAN_37, $text);
$ns->tablerender(IMALAN_37, $message.$text);
}
if(function_exists('gd_info'))
@@ -406,12 +548,12 @@ if($pref['im_path'] != "")
$text = "
<form method='post' action='".e_SELF."'>
<fieldset id='image-settings-form'>
<fieldset id='core-image-settings'>
<legend class='e-hideme'>".IMALAN_7."</legend>
<table cellpadding='0' cellspacing='0' class='adminform'>
<colgroup span='2'>
<col style='width:250px'></col>
<col></col>
<col class='col-label'></col>
<col class='col-control'></col>
</colgroup>
<tbody>
<tr>
@@ -487,11 +629,16 @@ $text = "
</div>
</fieldset>
</form>";
$ns->tablerender(IMALAN_7, $text);
$ns->tablerender(IMALAN_7, $message.$text);
//Just in case...
if(!e_AJAX_REQUEST) require_once("footer.php");
require_once("footer.php");
/**
* Handle page DOM within the page header
*
* @return string JS source
*/
function headerjs()
{
require_once(e_HANDLER.'js_helper.php');
@@ -517,17 +664,18 @@ function headerjs()
},
tCheckHandler: function(event) {
//do nothing if checkbox or its label is clicked
if(event.element().nodeName.toLowerCase() == 'input') return;
//do nothing if checkbox or link is clicked
var tmp = event.element();
if(tmp.nodeName.toLowerCase() == 'input' || tmp.nodeName.toLowerCase() == 'a') return;
//stop event
event.stop();
//td element
var element = event.findElement('td'), check = null;
//checkbox container element
var element = event.findElement('.options'), check = null;
if(element) {
check = element.select('input.checkbox'); //search for checkbox
}
//toggle checked property
if(check && check[0]) {
if(check && check[0] && !(\$(check[0]).disabled)) {
\$(check[0]).checked = !(\$(check[0]).checked);
}
},
@@ -550,8 +698,7 @@ function headerjs()
}
/**
* Observe e107:loaded
*
* Observe e107:loaded event
*/
e107.runOnLoad(eCoreImage.init.bind(eCoreImage), document, true);
</script>
@@ -559,11 +706,4 @@ function headerjs()
return $ret;
}
/*
XXX - remove this odd thing?!
$pref['resize_method'] = $_POST['resize_method'];
$pref['im_path'] = $_POST['im_path'];
*/
?>

View File

@@ -1,17 +1,17 @@
/*
* e107 website system
*
* Copyright (c) 2001-2008 e107 Developers (e107.org)
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://gnu.org).
*
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* e107 Javascript API
*
*
* $Source: /cvs_backup/e107_0.8/e107_files/jslib/e107.js.php,v $
* $Revision: 1.13 $
* $Date: 2008-12-03 13:03:54 $
* $Revision: 1.14 $
* $Date: 2008-12-10 16:59:19 $
* $Author: secretr $
*
*
*/
var e107API = {
@@ -932,7 +932,7 @@ Object.extend(e107Helper, {
toggleChecked: function(form, state, selector, byId) {
form = $(form); if(!form) { return; }
if(byId) selector = 'id^=' + selector;
$A(form.select('input[type=checkbox][' + selector + ']')).each(function(element) { element.checked=state });
$A(form.select('input[type=checkbox][' + selector + ']')).each(function(element) { if(!element.disabled) element.checked=state });
},
//This will be replaced later with upload_ui.php own JS method

View File

@@ -1,28 +1,31 @@
<?php
/*
* e107 website system
*
* Copyright (c) 2001-2008 Steve Dunstan (e107.org)
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://gnu.org).
*
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Javascript Helper
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/js_helper.php,v $
* $Revision: 1.3 $
* $Date: 2008-11-21 16:28:04 $
* $Revision: 1.4 $
* $Date: 2008-12-10 16:59:19 $
* $Author: secretr $
*
*
*/
//PHP <5.2 compatibility
//PHP < 5.2 compatibility
if (!function_exists('json_encode'))
{
require_once(e_HANDLER.'json_compat_handler.php');
function json_encode($array)
function json_encode($array)
{
$json = new Services_JSON();
return $json->encode($array);
}
function json_decode($json_obj)
function json_decode($json_obj)
{
$json = new Services_JSON();
return $json->decode($json_obj);
@@ -37,8 +40,8 @@ class e_jshelper
* @var array
*/
var $_response_actions = array();
function addResponseAction($action, $data_array)
function addResponseAction($action, $data_array)
{
if(!$action) $action = 'auto';
if(!isset($this->_response_actions[$action]))
@@ -46,10 +49,10 @@ class e_jshelper
$this->_response_actions[$action] = array();
}
$this->_response_actions[$action] = array_merge($this->_response_actions[$action], $data_array);
return $this;
}
/**
* Response array getter
*
@@ -65,12 +68,12 @@ class e_jshelper
}
return $this->_response_actions;
}
/**
* Buld XML response parsed by the JS API
* Quick & dirty, this will be extended to
* Quick & dirty, this will be extended to
* e107 web service standard (communication protocol).
*
*
* @return string XML response
*/
function buildXMLResponse()
@@ -78,16 +81,16 @@ class e_jshelper
$action_array = $this->getResponseActions(true);
$ret = '<?xml version="1.0" encoding="'.CHARSET.'" ?>';
$ret .= "\n<e107response>\n";
foreach ($action_array as $action => $field_array)
foreach ($action_array as $action => $field_array)
{
$ret .= "\t<e107action name='{$action}'>\n";
foreach ($field_array as $field => $value)
{
//associative arrays only - no numeric keys!
//to speed this up use $sql->db_Fetch(MYSQL_ASSOC);
//when passing large data from the DB
//to speed this up use $sql->db_Fetch(MYSQL_ASSOC);
//when passing large data from the DB
if (is_numeric($field))
continue;
continue;
$transport_value = $value;
if(!is_numeric($value) && !is_bool($value)) { $transport_value = "<![CDATA[{$value}]]>"; }
$ret .= "\t\t<item type='".gettype($value)."' name='{$field}'>{$transport_value}</item>\n";
@@ -97,7 +100,7 @@ class e_jshelper
$ret .= '</e107response>';
return $ret;
}
/**
* Convert (optional) and send array as XML response string
*
@@ -111,20 +114,20 @@ class e_jshelper
{
$this->addResponseAction($action, $data_array);
}
echo $this->buildXmlResponse();
}
/**
* Build JSON response string
*
*
* @return string JSON response
*/
function buildJSONResponse()
{
return "/*-secure-\n".json_encode($this->getResponseActions(true))."\n*/";
}
/**
* Convert (optional) and send array as JSON response string
*
@@ -140,10 +143,10 @@ class e_jshelper
}
echo $this->buildJSONResponse();
}
/**
* Reset response action array to prevent duplicates
*
*
* @access private
* @return void
*/
@@ -151,7 +154,7 @@ class e_jshelper
{
$this->_response_actions = array();
}
/**
* Convert (optional) and send array as JSON response string
*
@@ -163,7 +166,7 @@ class e_jshelper
header('Content-type: text/html; charset='.CHARSET, true);
echo $data_text;
}
/**
* Send error to the JS Ajax.response object
*
@@ -171,6 +174,7 @@ class e_jshelper
* @param string $errmessage
* @param string $errextended
* @param bool $exit
* @access public static
*/
function sendAjaxError($errcode, $errmessage, $errextended = '', $exit = true)
{
@@ -181,17 +185,17 @@ class e_jshelper
//Safari expects some kind of output, even empty
echo ($errextended ? $errextended : ' ');
if($exit) exit;
}
/**
* Clean string to be used as JS string
* Should be using for passing strings to e107 JS API - e.g Languages,Templates etc.
*
*
* @param string $string
* @return string
* @access static
* @access public static
*/
function toString($string)
{

View File

@@ -1,22 +1,17 @@
<?php
/*
+---------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
| $Revision: 1.32 $
| $Date: 2008-12-07 00:21:20 $
| $Author: mcfly_e107 $
|
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* mySQL Handler
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
* $Revision: 1.33 $
* $Date: 2008-12-10 16:59:19 $
* $Author: secretr $
*/
if (!defined('e107_INIT')) { exit; }
@@ -30,8 +25,8 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s
* MySQL Abstraction class
*
* @package e107
* @version $Revision: 1.32 $
* @author $Author: mcfly_e107 $
* @version $Revision: 1.33 $
* @author $Author: secretr $
*/
class db {

View File

@@ -1,17 +1,9 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id: lan_admin.php,v 1.11 2008-12-10 16:59:19 secretr Exp $
*
* Admin Language File
*
* $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_admin.php,v $
* $Revision: 1.10 $
* $Date: 2008-12-02 00:32:30 $
* $Author: secretr $
*/
define("ADLAN_0", "News");
define("ADLAN_1", "Add/edit/delete news items");
@@ -92,8 +84,8 @@ define("ADLAN_78", "Extended User Fields");
define("ADLAN_79", "Edit extended user fields");
//define("ADLAN_86", "Incorrect password ");
//define("ADLAN_87", "Administrator name not found in database ");
define("ADLAN_86", "Foirbbiden");
define("ADLAN_87", "Access denied!");
//define("ADLAN_88", "Unable to login ");
define("ADLAN_89", "Admin Name ");
define("ADLAN_90", "Admin Password ");

View File

@@ -1,14 +1,11 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_image.php,v $
| $Revision: 1.6 $
| $Date: 2008-12-09 17:49:59 $
| $Author: secretr $
+----------------------------------------------------------------------------+
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id: lan_image.php,v 1.7 2008-12-10 16:59:19 secretr Exp $
*
* Admin Language File
*/
define("IMALAN_1", "Enable image display");
define("IMALAN_2", "Display images, this will apply sitewide (comments, chatbox etc) to images posted using the [img] bbcode");
define("IMALAN_3", "Resize method");
@@ -85,6 +82,8 @@ define('IMALAN_64', 'User');
define('IMALAN_65', 'Nothing found');
define('IMALAN_66', 'Filename');
define('IMALAN_67', 'Are you\' sure?');
define('IMALAN_67', 'Are you sure?');
define('IMALAN_68', 'Close');
define('IMALAN_69', 'Folder');
define('IMALAN_70', 'Non-system folder is found!');
?>

View File

@@ -34,8 +34,8 @@
* { margin:0; padding:0; }
body { font:12px/1.5em Arial, Helvetica, sans-serif; }
img { border:0; vertical-align:top; }
a { text-decoration:underline; }
a:hover { text-decoration:underline; }
a { text-decoration:underline; color: #13394E; }
a:hover { text-decoration:underline; color: #CB0000; }
a img { border:0; }
:focus { outline:0; }
@@ -49,7 +49,7 @@ h6 { font-size:11px; font-weight:bold; }
/* Forms */
form { display:inline; }
fieldset { border:0; }
fieldset { border: 0; margin-bottom: 10px; }
input, select{ vertical-align:middle; }
textarea { overflow:auto; }
@@ -104,25 +104,27 @@ ul,ol { list-style:none; }
/* Form elements */
input.input-text,
textarea,
select {
select, .tbox {
border-width:1px;
border-style:solid;
border-color:#aaa #c8c8c8 #c8c8c8 #aaa;
background:#fff;
font:12px arial, helvetica, sans-serif;
}
select { min-height:17px; /* to set the height for empty selects */ }
input.input-text, textarea { padding:2px; }
input.input-text, textarea, .tbox { padding:2px; }
select.tbox { min-height:17px; padding: 0px; /* to set the height for empty selects */ }
/* custom fields CSS */
#image-settings-form input.input-text { width: 300px; }
#core-emoticon-configure input.input-text { width: 300px; }
.select.order { width: 40px; }
.inline-help { width: 280px; }
/* form used for settings */
.col-label { width: 250px; }
.col-control {}
.adminform { width:100%; border:1px solid #ddd;}
.adminform col.label { width: 250px; }
.adminform td { padding: 5px; text-align: left}
@@ -258,16 +260,18 @@ button.edit:active span {}
/* THEME SPECIFIC CSS *********************************************************************************************/
/******** Page Base */
.admin-wrapper { min-width: 950px; }
.admin-wrapper { width: 100%; }
.admin-header { padding: 20px 15px 0; }
.admin-header-content {border: 1px solid #DDDDDD;}
.admin-header-content { border: 1px solid #DDDDDD; }
.admin-page-body { padding: 20px 15px 0; }
.admin-footer {}
/******** Layout */
.col-left { float:left; width: 220px;}
.col-main { margin-left: 220px; padding: 0 0 0 20px;}
.inner-wrapper { float:left; width:100%; }
.main-table { width: 100%; border: 0 none; }
.col-left { width: 220px;}
.col-right { width: 220px;}
.col-main { padding: 0 15px 0 0;}
.inner-wrapper { }
/******** Horizontal navigation ADMIN_NAV_ALT */
.admin-navigation { border: 1px solid #DDDDDD;}
@@ -297,3 +301,54 @@ ul.plugin-navigation ul.sub-nav a.link-active {font-weight: bold;}
.page-info { border: 1px solid #DDDDDD; margin-bottom: 10px; }
.page-info p { padding: 10px; }
#core-frontpage-edit-home { width: 50%; float: left; }
#core-frontpage-edit-post-login { width: 50%; float: left; }
#core-frontpage-edit-home .adminlist { width: 99%; }
#core-frontpage-edit-post-login .adminlist { width: 99%; float: right; }
#core-frontpage-edit .tbox { width: 80%;}
#core-frontpage-edit select.tbox { width: 50%;}
#core-frontpage-edit .buttons-bar select.tbox { width: 140px; }
#core-frontpage-edit .buttons-bar { clear: both; }
/******** Core Block IDs */
/* cache.php */
#core-cache-settings {} /* General cache settings - Default front page */
/* emoticon.php */
#core-emoticon-activate {} /* Emote activation - Default front page */
#core-emoticon-packages {} /* Installed packs - Default front page */
#core-emoticon-configure {} /* Configure an individual emote pack */
/* frontpage.php */
#core-frontpage-settings {} /* Display list of current settings - Default front page */
#core-frontpage-edit {} /* Add / Edit existing rule - form */
#core-frontpage-edit-home {} /* Add / Edit existing rule for home page */
#core-frontpage-edit-post-login {} /* Add / Edit existing rule for post-login page */
/* image.php */
#core-image-check-avatar {} /* Check avatar sizes table */
#core-image-settings {} /* General image settings - Default front page */
/* links.php */
#core-links-list-1 {} /* Display list of current links - Default front page */
#core-links-list-2 {} /* Display list of current links - Default front page */
#core-links-list-3 {} /* Display list of current links - Default front page */
#core-links-list-4 {} /* Display list of current links - Default front page */
/* meta.php */
#core-dataform {} /* Form tag ID - Default front page - old core definition */
#core-meta-settings {} /* General meta settings - Default front page */
/* search.php */
#core-search-configuration-main {} /* Search Configuration for Searchable Areas - Default front page */
#core-search-configuration-comm {} /* Search Configuration for Searchable Comments Areas - Default front page */
#core-search-edit {} /* Edit search settings for specific area */
#core-search-settings {} /* General search settings */

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_themes/_blank/admin_template.php,v $
| $Revision: 1.1 $
| $Date: 2008-12-09 15:19:03 $
| $Revision: 1.2 $
| $Date: 2008-12-10 16:59:19 $
| $Author: secretr $
+----------------------------------------------------------------------------+
*/
@@ -38,38 +38,48 @@ $ADMIN_HEADER = "
</div>
</div>
<div class='admin-page-body'>
<div class='col-2-left'>
<div class='col-left'>
{ADMIN_LANG}
{SETSTYLE=admin_menu}
{ADMIN_NAV}
{ADMIN_MENU}
{SETSTYLE=bla}
{ADMIN_PWORD}
{ADMIN_STATUS=request}
{ADMIN_LATEST=request}
{ADMIN_LOG=request}
{ADMIN_MSG}
{ADMIN_PLUGINS}
{ADMIN_PRESET}
{ADMIN_UPDATE}
{SETSTYLE=site_info}
{ADMIN_HELP}
{ADMIN_SITEINFO}
{ADMIN_DOCS}
{SETSTYLE=bla}
</div>
<div class='col-main'>
<div class='inner-wrapper'>
<table class='main-table' cellpadding='0' cellspacing='0'>
<tr>
<!--
<td class='col-left'></td>
-->
<td>
<div class='col-main'>
<div class='inner-wrapper'>
";
$ADMIN_FOOTER = "
</div>
</div>
<div class='clear'><!-- --></div>
</div>
</div>
</div>
</td>
<td class='col-right'>
<div class='col-right'>
{SETSTYLE=admin_menu}
<!--
{ADMIN_NAV}
-->
{SETSTYLE=admin_menu}
{ADMIN_MENU}
{SETSTYLE=none}
{ADMIN_LANG}
{ADMIN_PWORD}
{ADMIN_STATUS=request}
{ADMIN_LATEST=request}
{ADMIN_LOG=request}
{ADMIN_MSG}
{ADMIN_PLUGINS}
{ADMIN_PRESET}
{ADMIN_UPDATE}
{SETSTYLE=site_info}
{ADMIN_HELP}
{ADMIN_SITEINFO}
{ADMIN_DOCS}
</div>
</td>
</tr>
</table>
</div>
<div class='admin-footer'>
{ADMIN_CREDITS}

View File

@@ -1,32 +1,30 @@
if (ADMIN) {
/*
* e107 website system (c) 2001-2008 Steve Dunstan (e107.org)
* $Id: fs_admin_alt_nav.sc,v 1.2 2008-12-10 16:59:19 secretr Exp $
*/
if (ADMIN)
{
global $sql, $pref, $tp;
parse_str($parm);
require(e_ADMIN.'ad_links.php');
require_once(e_HANDLER.'admin_handler.php');
function adnav_cat_fs($cat_title, $cat_link, $cat_img, $cat_id=FALSE) {
$cat_link = ($cat_link ? $cat_link : "javascript:void(0);");
$text = '<a class="menuButton" href="'.$cat_link.'" style="background-image: url('.$cat_img.'); background-repeat: no-repeat; background-position: 10px 50%" ';
if ($cat_id) {
//$text .= 'onclick="return buttonClick(event, \''.$cat_id.'\');" onmouseover="buttonMouseover(event, \''.$cat_id.'\');"';
}
$text .= '>'.$cat_title.'</a>';
return $text;
}
function adnav_main_fs($cat_title, $cat_link, $cat_img, $cat_id=FALSE, $cat_highlight='') {
$text = "<a class='menuItem ".$cat_highlight."' href='".$cat_link."' ";
if ($cat_id) {
//$text .= "onclick=\"return false;\" onmouseover=\"menuItemMouseover(event, '".$cat_id."');\"";
}
$text .= ">".$cat_img.$cat_title;
if ($cat_id) {
$text .= "";
}
@@ -34,14 +32,26 @@ if (ADMIN) {
$text .= "</a>";
return $text;
}
/* if (file_exists(THEME.'nav_menu.js')) {
$text = "<script type='text/javascript' src='".THEME_ABS."nav_menu.js'></script>";
} else {
$text = "<script type='text/javascript' src='".e_FILE_ABS."nav_menu.js'></script>";
} */
/*
$text .= "<div style='width: 100%'><table border='0' cellspacing='0' cellpadding='0' style='width: 100%'>
<tr><td>
<div class='menuBar' style='width: 100%'>";
*/
$text .= '
<div id="nav">
';
if ($exit != 'off') {
$text .= '<ul style="float: right"><li>'.adnav_cat_fs(ADLAN_53, e_BASE.'index.php', E_16_NAV_LEAV).'</li>';
$text .= '<li>'.adnav_cat_fs(ADLAN_46, e_ADMIN.'admin.php?logout', E_16_NAV_LGOT).'</li></ul>';
}
$text .= '
<ul class="level1" id="nav-links">
';
@@ -65,20 +75,21 @@ if (ADMIN) {
$ad_links_array = asortbyindex($array_functions, 1);
$text .= '<li>';
$nav_main = adnav_cat_fs($admin_cat['title'][$i], '', $admin_cat['img'][$i], $admin_cat['id'][$i]);
$ad_texti = '<ul id="'.$admin_cat["id"][$i].'" class="menu">
';
while(list($key, $nav_extract) = each($ad_links_array)){
if($nav_extract[4]==$i){
if(getperms($nav_extract[3])){
$ad_texti = '<ul id="'.$admin_cat["id"][$i].'" class="menu">';
while(list($key, $nav_extract) = each($ad_links_array))
{
if($nav_extract[4]==$i)
{
if(getperms($nav_extract[3]))
{
$ad_texti .= '<li>'.adnav_main_fs($nav_extract[1], $nav_extract[0], $nav_extract[5]).'</li>';
$ad_tmpi = 1;
}
}
}
$ad_texti .= '</ul>';
if ($ad_tmpi == 1) {
if ($ad_tmpi == 1)
{
$text .= $nav_main;
$text .= $ad_texti;
}
@@ -94,38 +105,53 @@ if (ADMIN) {
}
$render_plugins = FALSE;
if($sql -> db_Select("plugin", "*", "plugin_installflag=1 ORDER BY plugin_path")){
while($row = $sql -> db_Fetch()){
if(getperms('P'.$row['plugin_id'])){
include_once(e_PLUGIN.$row['plugin_path']."/plugin.php");
if($eplug_conffile){
$eplug_name = $tp->toHTML($eplug_name,FALSE,"defs");
$plugin_icon = $eplug_icon_small ? "<img src='".e_PLUGIN_ABS.$eplug_icon_small."' alt='".$eplug_caption."' style='border:0px; vertical-align:bottom; width: 16px; height: 16px' />" : E_16_PLUGIN;
$plugin_array[ucfirst($eplug_name)] = adnav_main_fs($eplug_name, e_PLUGIN.$row['plugin_path']."/".$eplug_conffile, $plugin_icon);
include_once(e_HANDLER.'plugin_class.php');
$plug = new e107plugin;
if($sql -> db_Select("plugin", "*", "plugin_installflag=1 ORDER BY plugin_path"))
{
while($row = $sql -> db_Fetch())
{
if(getperms('P'.$row['plugin_id']))
{
$_path = e_PLUGIN.$row['plugin_path'].'/';
if($plug->parse_plugin($_path))
{
$plug_vars = $plug->plug_vars;
loadLanFiles($row['plugin_path'], 'admin');
if($plug_vars['administration']['configFile'])
{
$plug_vars['@attributes']['name'] = $tp->toHTML($plug_vars['@attributes']['name'], FALSE, "defs");
$icon_src = (isset($plug_vars['plugin_php']) ? e_PLUGIN_ABS : e_PLUGIN_ABS.$row['plugin_path'].'/') .$plug_vars['administration']['iconSmall'];
$plugin_icon = $plug_vars['administration']['iconSmall'] ? "<img src='{$icon_src}' alt='".$plug_vars['administration']['caption']."' style='border:0px; vertical-align:bottom; width: 16px; height: 16px' />" : E_16_PLUGIN;
$plugin_array[ucfirst($plug_vars['@attributes']['name'])] = adnav_main_fs($plug_vars['@attributes']['name'], e_PLUGIN.$row['plugin_path']."/".$plug_vars['administration']['configFile'], $plugin_icon);
}
$render_plugins = TRUE;
$active_plugs = TRUE;
}
unset($eplug_conffile, $eplug_name, $eplug_caption, $eplug_icon_small);
$render_plugins = TRUE;
$active_plugs = TRUE;
}
}
ksort($plugin_array, SORT_STRING);
$plugs_text = '';
foreach ($plugin_array as $plugin_compile) {
foreach ($plugin_array as $plugin_compile)
{
$plugs_text .= $plugin_compile;
}
}
if (getperms('Z')) {
if (getperms('Z'))
{
$pclass_extended = $active_plugs ? 'header' : '';
$plugin_text = adnav_main_fs(ADLAN_98, e_ADMIN.'plugin.php', E_16_PLUGMANAGER, FALSE, $pclass_extended);
$render_plugins = TRUE;
}
if ($render_plugins) {
if (defined('FS_ADMIN_LINK_SEPARATOR')) {
$text .= "
<li class='fs-linkSep'>".FS_ADMIN_LINK_SEPARATOR."</li>";
}
$text .= '<li>';
$text .= adnav_cat_fs(ADLAN_CL_7, '', E_16_CAT_PLUG, 'plugMenu');
$text .= "<ul id='plugMenu' class='menu'>";
@@ -142,28 +168,27 @@ if (ADMIN) {
$text .= '<li>';
$text .= adnav_cat_fs(ADLAN_CL_8, '', E_16_NAV_DOCS, 'docsMenu');
$text .= "<ul id='docsMenu' class='menu'>";
if (!$handle=opendir(e_DOCS.e_LANGUAGE."/")) {
if (!$handle=opendir(e_DOCS.e_LANGUAGE."/"))
{
$handle=opendir(e_DOCS."English/");
}
$i=1;
while ($file = readdir($handle)) {
if ($file != "." && $file != ".." && $file != "CVS") {
while ($file = readdir($handle))
{
if ($file != "." && $file != ".." && $file != "CVS")
{
$text .= '<li>'.adnav_main_fs(str_replace("_", " ", $file), e_ADMIN."docs.php?".$i, E_16_DOCS).'</li>';
$i++;
}
}
closedir($handle);
$text .= "</ul>";
$text .='</li>';
/*
if ($exit != 'off') {
$text .= '<li>'.adnav_cat_fs(ADLAN_53, e_BASE.'index.php', E_16_NAV_LEAV).'</li>';
$text .= '<li>'.adnav_cat_fs(ADLAN_46, e_ADMIN.'admin.php?logout', E_16_NAV_LGOT).'</li>';
}
*/
$text .='</li>
</ul>
';
$text .= '
</ul>
</div>
<div class="clear"><!-- --></div>
';
return $text;

View File

@@ -8,7 +8,21 @@ input.radio { width:13px; height:13px; }
button {
width:auto;
overflow:visible;
vertical-align: middle
}
button span {
margin-top:1px;
}
/* THEME SPECIFIC CSS *********************************************************************************************/
#core-frontpage-edit-home { width: 49%; float: left; margin-right: 10px; }
#core-frontpage-edit-post-login { width: 49%; float: left;}
#core-frontpage-edit-home .adminlist { width: 100%; }
#core-frontpage-edit-post-login .adminlist { width: 100%; }

View File

@@ -38,7 +38,8 @@
float: left;
/* width: 158px; width needed or else Opera goes nuts */
}
ul.sub {border-top: 1px solid #CCCCCC;}
ul.sub {border-top: 1px solid #DDDDDD;}
#nav li ul { /* second-level lists */
position: absolute;
z-index: 10;
@@ -52,15 +53,15 @@ ul.sub {border-top: 1px solid #CCCCCC;}
#nav li.sfhover li a {
text-align: left;
background-image: none;
background-color: #FBFEF1;
background-color: #FFFFFF;
line-height: 28px;
font-size: 11px;
font-weight: bold;
padding-left: 10px;
padding-right: 0px;
border-left: 1px solid #B8DF30;
border-right: 1px solid #B8DF30;
border-bottom: 1px solid #B8DF30;
border-left: 1px solid #DDDDDD;
border-right: 1px solid #DDDDDD;
border-bottom: 1px solid #DDDDDD;
width: 188px;
w\idth : 188px;
text-transform: none;
@@ -81,7 +82,7 @@ ul.sub {border-top: 1px solid #CCCCCC;}
#nav li li a:hover{
background-color: #DDF098;
background-color: #f6f6f6;
color: #990000
}