"; 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 .= "
Welcome to your e107 Content Management System

".ucwords(USERNAME)."'s Admin Panel

Welcome to your Website Content Manager
"; // Rendering the saved configuration. foreach ($iconlist as $key=>$val) { if (!isset($user_pref['core-infopanel-mye107']) || in_array($key, $user_pref['core-infopanel-mye107'])) { $text .= render_links($val['link'], $val['title'], $val['caption'], $val['perms'], $val['icon_32'], "div"); } } $text .= "
 
"; // ------------------------------- e107 News -------------------------------- $text .= "
e107 News
"; // TODO Load with Ajax /* require_once(e_HANDLER.'xml_class.php'); $xml = new xmlClass; $vars = $xml->loadXMLfile('http://www.e107.org/e107_plugins/rss_menu/rss.php?1.2', true, true); $text .= print_r($vars,TRUE); */ $text .= " RSS News feed from e107.org goes here.
"; // ---------------------Latest Stuff --------------------------- $text .= "
"; require_once (e_FILE."shortcode/batch/admin_shortcodes.php"); $text .= $tp->parseTemplate("{ADMIN_LATEST}"); $text .= ""; $text .= $tp->parseTemplate("{ADMIN_STATUS}"); $text .= "
"; // ---------------------- Who's Online ------------------------ // TODO Could use a new _menu item instead. $text .= "
Who's Online
"; if (e107::getDB()->db_Select('online', '*')) { $newsarray = $e107->sql->db_getList(); foreach ($newsarray as $key=>$val) { $text .= " "; } } $text .= "
Timestamp Username Location
".$val['online_timestamp']." ".$val['online_user_id']." ".$val['online_location']."
"; // --------------------- User Selected Menus ------------------- if (varset($user_pref['core-infopanel-menus'])) { foreach ($user_pref['core-infopanel-menus'] as $val) { $text .= "
"; $text .= $tp->parseTemplate("{PLUGIN=$val|TRUE}"); $text .= "
"; } } $text .= "
 
"; $text .= render_infopanel_options(); $text .= "
"; $text .= ""; $ns->tablerender(ADLAN_47." ".ADMINNAME, $emessage->render().$text); function render_info_panel($caption, $text) { return "
".$caption."
".$text."
"; } // ------------------ function render_infopanel_options() { $frm = e107::getSingleton('e_form'); $start = "
To customize this page, please click here.
"; $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; $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('e-mye107[]', $key, $checked).$icon['title']."
"; } } 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('e-mye107[]', $key, $checked).$icon['title']."
"; } } } 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()) { $checked = (in_array($row['menu_name'], $settings)) ? true : false; $text .= "
"; $text .= $frm->checkbox("e-mymenus[]", $row['menu_name'], $checked); $text .= $row['menu_name']; $text .= "
"; } } return $text; } ?>