";
if (!vartrue($user_pref['core-infopanel-mye107'])) // Set default icons.
{
$user_pref['core-infopanel-mye107'] = $pref['core-infopanel-default'];
}
$iconlist = array_merge($array_functions_assoc, getPluginLinks(E_16_PLUGMANAGER, "array"));
$text .= "
";
$text .= "";
$ns->tablerender(ADLAN_47." ".ADMINNAME, $emessage->render().$text);
function renderOnlineName($val)
{
if($val==0)
{
return "Guest";
}
return $val;
}
function render_info_panel($caption, $text)
{
return "".$caption."
".$text."
";
}
// ------------------
function render_infopanel_options()
{
$frm = e107::getSingleton('e_form');
$start = "
";
$text2 = "
Icons
";
$text2 .= render_infopanel_icons();
$text2 .= "
";
$text2 .= "
Menus
";
$text2 .= render_infopanel_menu_options();
$text2 .= "
";
$text2 .= "
";
$text2 .= $frm->admin_button('submit-mye107', 'Save', 'Save');
$text2 .= "
";
$end = "
";
return $start.render_info_panel("Customize", $text2).$end;
}
function render_infopanel_icons()
{
$frm = e107::getSingleton('e_form');
global $iconlist,$pluglist, $user_pref;
$text = "";
foreach ($iconlist as $key=>$icon)
{
if (getperms($icon['perms']))
{
$checked = (varset($user_pref['core-infopanel-mye107']) && in_array($key, $user_pref['core-infopanel-mye107'])) ? true : false;
$text .= "
".$icon['icon'].' '.$frm->checkbox_label($icon['title'], 'e-mye107[]', $key, $checked)."
";
}
}
if (is_array($pluglist))
{
foreach ($pluglist as $key=>$icon)
{
if (getperms($icon['perms']))
{
$checked = (in_array('p-'.$key, $user_pref['core-infopanel-mye107'])) ? true : false;
$text .= "
".$icon['icon'].$frm->checkbox_label($icon['title'], 'e-mye107[]', $key, $checked)."
";
}
}
}
return $text;
}
function render_infopanel_menu_options()
{
global $user_pref;
$frm = e107::getSingleton('e_form');
$text = "";
$menu_qry = 'SELECT * FROM #menus WHERE menu_id!= 0 GROUP BY menu_name ORDER BY menu_name';
$settings = varset($user_pref['core-infopanel-menus'],array());
if (e107::getDb()->db_Select_gen($menu_qry))
{
while ($row = e107::getDb()->db_Fetch())
{
if(!is_numeric($row['menu_path']))
{
$label = str_replace("_menu","",$row['menu_name']);
$path_to_menu = $row['menu_path'].$row['menu_name'];
$checked = ($settings && in_array($path_to_menu, $settings)) ? true : false;
$text .= "\n";
$text .= $frm->checkbox_label($label, "e-mymenus[]",$path_to_menu, $checked);
$text .= "
";
}
}
}
return $text;
}
?>