";
if (getperms('0') && !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 .= "";
if($_GET['mode'] != 'customize')
{
$ns->tablerender(ADLAN_47." ".ADMINNAME, $emessage->render().$text);
}
else
{
echo render_infopanel_options(true);
}
function renderOnlineName($val)
{
if($val==0)
{
return "Guest";
}
return $val;
}
function render_info_panel($caption, $text)
{
return "".$caption."
".$text."
";
}
// ------------------
function render_infopanel_options($render = false)
{
// $frm = e107::getSingleton('e_form');
$frm = e107::getForm();
$mes = e107::getMessage();
$start = "
";
if($render == false){ return $start; }
$text2 = "";
$end = "";
return $mes->render().$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()
{
if(!getperms('0'))
{
return;
}
global $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($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;
}
?>