1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

InfoPanel changes- removed tabs.

This commit is contained in:
CaMer0n
2009-07-23 10:46:11 +00:00
parent 300ea4e8c4
commit 88620a7370

View File

@@ -1,4 +1,5 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
@@ -11,27 +12,28 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/includes/infopanel.php,v $
| $Revision: 1.4 $
| $Date: 2009-07-08 06:58:00 $
| $Revision: 1.5 $
| $Date: 2009-07-23 10:46:11 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
if (!defined('e107_INIT'))
{
exit;
}
require_once (e_HANDLER."message_handler.php");
$emessage = & eMessage :: getInstance();
require_once (e_HANDLER."form_handler.php");
$frm = new e_form(true); //enable inner tabindex counter
$frm = new e_form(true);
//enable inner tabindex counter
if (isset ($_POST['submit-mye107']))
{
$user_pref['core-infopanel-mye107'] = $_POST['e-mye107'];
save_prefs('user');
}
// $text = "<div style='text-align:center'>";
$text = "<div style='text-align:center'>
/*$text .="
<div class='admintabs' id='tab-container'>
<ul class='e-tabs e-hideme' id='core-emote-tabs'>
<li id='tab-infopanel_mye107'><a href='#core-infopanel_mye107'>My Admin Panel</a></li>
@@ -41,11 +43,11 @@ $text = "<div style='text-align:center'>
<li id='tab-infopanel_customize'><a href='#core-infopanel_customize'>Customize</a></li>
<li id='tab-infopanel_add'><a href='#core-infopanel_add'>+</a></li>
</ul>";
*/
$text = "<div style='text-align:center'>";
// My E107
// Info about attributes
/*
attribute 1 = link
attribute 2 = title
@@ -61,6 +63,7 @@ attribute 5 = category
attribute 6 = 16 x 16 image
attribute 7 = 32 x 32 image
*/
/* $buts = "";
while (list($key, $funcinfo) = each($array_functions_assoc))
@@ -69,12 +72,14 @@ attribute 7 = 32 x 32 image
$buts .= render_links($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[6], "classis");
}*/
$iconlist = array_merge($array_functions_assoc,getPluginLinks(E_16_PLUGMANAGER,"array"));
$text .= "
<div id='core-infopanel_mye107' class='adminedit' >
<div id='core-infopanel_mye107' class='f-left' style='width:49%'>
<div style='border:1px solid silver;margin:10px'>
<div class='main_caption bevel left'><b>Welcome to your e107 Content Management System</b></div>
@@ -87,6 +92,8 @@ attribute 7 = 32 x 32 image
<div class='left' style='padding:25px'>";
// Rendering the saved configuration.
foreach ($iconlist as $key => $val)
@@ -96,12 +103,42 @@ attribute 7 = 32 x 32 image
$text .= render_links($val['link'],$val['title'],$val['caption'],$val['perms'],$val['icon_32'],"div");
}
}
$text .= "<div class='clear'>&nbsp;</div>
</div>
<div class='left block-text' >
To customize the icons that appear in this panel, please <a href='#core-infopanel_customize&amp;etabTabContainer=core-infopanel_customize'>click here</a>.
To customize the icons that appear in this panel, please
<a href='#customize_icons' class='e-expandit'>click here</a>.
<form method='post' action='".e_SELF."?".e_QUERY."'>
<div id='customize_icons' class='e-hideme block-text'>
<div style='border:1px solid silver;margin:10px'>
<div class='main_caption bevel left'><b>Customize Icons</b></div>
<div class='left block-text' >";
foreach ($iconlist as $key => $icon)
{
$checked = (in_array($key,$user_pref['core-infopanel-mye107'])) ? true : false;
$text .= "<div class='left f-left list field-spacer' style='display:block;height:24px;width:200px;'>
".$icon['icon'].$frm->checkbox('e-mye107[]',$key,$checked).$icon['title']."</div>";
}
if (is_array($pluglist))
{
foreach ($pluglist as $key => $icon)
{
$checked = (in_array('p-'.$key,$user_pref['core-infopanel-mye107'])) ? true : false;
$text .= "<div class='left f-left list field-spacer' style='display:block;height:24px;width:200px;'>
".$icon['icon'].$frm->checkbox('e-mye107[]',$key,$checked).$icon['title']."</div>";
}
}
$text .= "<div class='clear'>&nbsp;</div>";
$text .= "<div id='button' class='buttons-bar center'>";
// has issues with the checkboxes.
$text .= $frm->admin_button('submit-mye107','Save','Save');
$text .= "</div></div></div></div></form>
</div>
@@ -109,13 +146,15 @@ attribute 7 = 32 x 32 image
</div>
";
// e107 News
// e107 News ------------------------------------------------------------------
$text .= "
<div id='core-infopanel_news' class='adminedit' >
<div id='core-infopanel_news' class='f-left' style='width:49%'>
<div style='border:1px solid silver;margin:10px'>
<div class='main_caption bevel left'><b>e107 News</b></div>
<div class='left block-text'>";
/*
require_once(e_HANDLER.'xml_class.php');
$xml = new xmlClass;
@@ -130,21 +169,19 @@ $text .= "
";
// e107 latest
// e107 latest
$text .= "
<div id='core-infopanel_latest' class='adminedit' >
<div id='core-infopanel_latest' class='f-left' style='width:49%' >
<div style='border:1px solid silver;margin:10px'>
<table cellspacing='0' cellpadding='0'>
<tr>
<td style='padding:0px'>
";
require_once (e_FILE."shortcode/batch/admin_shortcodes.php");
$text .= $tp->parseTemplate("{ADMIN_LATEST}");
$text .= "</td><td style='padding:0px'>";
$text .= $tp->parseTemplate("{ADMIN_STATUS}");
$text .= "</td></tr></table>
@@ -154,9 +191,8 @@ $text .= $tp->parseTemplate("{ADMIN_STATUS}");
// Who's Online ---------------------------------
$text .= "
<div id='core-infopanel_online' class='adminedit' >
<div id='core-infopanel_online' class='f-left' style='width:49%'>
<div style='border:1px solid silver;margin:10px'>
<div class='main_caption bevel left'><b>Who's Online</b></div>
<div class='left block-text'>
@@ -177,6 +213,7 @@ $text .= "
</thead>
<tbody>";
if ($e107->sql->db_Select('online','*'))
{
$newsarray = $e107->sql->db_getList();
@@ -189,60 +226,18 @@ $text .= "
</tr>
";
}
}
$text .= "</tbody></table></form></div>
</div>
</div>
";
// Customizer ------------------------------------------
/*
$text .= "
<form method='post' action='".e_SELF."?".e_QUERY."'>
<div id='core-infopanel_customize' class='adminedit' >
<div style='border:1px solid silver;margin:10px'>
<div class='main_caption bevel left'><b>Customize your Admin Panel</b></div>
<div class='block-text'>";
foreach($iconlist as $key=>$icon)
{
$checked = (in_array($key,$user_pref['core-infopanel-mye107'])) ? TRUE : FALSE;
$text .= "<div class='left f-left list field-spacer' style='display:block;height:24px;width:200px;'>
".$icon['icon'].$frm->checkbox('e-mye107[]',$key, $checked). $icon['title']."</div>";
}
if(is_array($pluglist))
{
foreach($pluglist as $key=>$icon)
{
$checked = (in_array('p-'.$key,$user_pref['core-infopanel-mye107'])) ? TRUE : FALSE;
$text .= "<div class='left f-left list field-spacer' style='display:block;height:24px;width:200px;'>
".$icon['icon'].$frm->checkbox('e-mye107[]', $key, $checked). $icon['title']."</div>";
}
}
$text .= " </div>
<div class='clear'>&nbsp;</div>
</div>";
$text .= "<div id='button' class='buttons-bar center'>"; // has issues with the checkboxes.
$text .= $frm->admin_button('submit-mye107','Save','Save');
$text .= "</div>
</div>
</form>
";
// e107 News
$text .= "
<div id='core-infopanel_add' class='adminedit' >
<div id='core-infopanel_add' class='f-left' style='width:49%'>
<div style='border:1px solid silver;margin:10px'>
<div class='main_caption bevel left'><b>Add</b></div>
<div class='left block-text'>
@@ -252,60 +247,12 @@ $text .= "
</div>
";
/*
foreach ($admin_cat['id'] as $cat_key => $cat_id)
{
$text_check = FALSE;
$text_cat = "<div class='adminedit' id='core-main_".$cat_key."'>
<div style='border:1px solid silver;margin:10px'>
<div class='main_caption bevel'><b>".$admin_cat['title'][$cat_key]."</b></div>
<table style='width:100%'>";
if ($cat_key != 5) // Note the Plugin category.
{
foreach ($newarray as $key => $funcinfo)
{
if ($funcinfo[4] == $cat_key)
{
$text_rend = render_links($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[6], 'classis');
if ($text_rend)
{
$text_check = TRUE;
}
$text_cat .= $text_rend;
}
}
}
else // Plugin category.
{
$text_rend = getPluginLinks(E_32_PLUGMANAGER, "classis");
if ($text_rend)
{
$text_check = TRUE;
}
$text_cat .= $text_rend;
}
$text_cat .= render_clean();
$text_cat .= "</table></div>
</div>";
if ($text_check)
{
$text .= $text_cat;
}
}*/
*/
$text .= "</div></div>";
$text .= "<div class='clear'>&nbsp;</div>";
$text .= "</div>";
//$text .= "</div>";
$ns->tablerender(ADLAN_47." ".ADMINNAME,$emessage->render().$text);
?>