get('log_status') === null) { header ("Location: not_enabled.php"); exit; } // number of my links saved... $db->get_mylinks_count(); $my_links_count = $db->result->cnt; // number of items in trash $db->get_trash_count(); $tr_n = $db->result->cnt; // number of favorites $db->get_favorites_count(); $favorites_count = $db->result->cnt; // get preferences for saving $pref_id=$_GET['set_pref']; $pref_value=$_GET['v']; // save preferences ONLY. Setting language in session is done in headers, here we only save that preferences. if ($_GET['set_pref']) { // Language selection if ($pref_id === "2") { //Rewrite array for late reuse $language_change = $language_support; // Here the $pref_value is actually $lng_sw $pref_value = $_GET['lng_sw']; while(array_keys($language_change)) { $lang_key = key($language_change); if (in_array($pref_value,$language_change[$lang_key])) { debug(DEBUG,"Saving language preferences into database..."); if ($db->set_jorge_pref($pref_id,$pref_value) === false) { $html->alert_message($oper_fail[$lang],"message"); debug(DEBUG,"Preferences not saved due to error"); } else{ $html->status_message($con_saved[$lang]); debug(DEBUG,"Preferences saved successfuly"); } break 1; } array_shift($language_change); } } // default view type if ($pref_id ==="1") { debug(DEBUG,"Saving view selection into database"); if($pref_value === "1" OR $pref_value === "2") { if ($db->set_jorge_pref($pref_id,$pref_value) === false) { $html->alert_message($oper_fail[$lang],"message"); debug(DEBUG,"Preferences not saved due to error"); } else{ // Display status message only if setting via control panel if ($_GET['ref'] === "settings") { $html->status_message($con_saved[$lang]); debug(DEBUG,"Preferences saved successfuly"); } } $sess->set('view_type',$pref_value); } } } // get preferences, if not set, fallback to standard view. $view_type=$sess->get('view_type'); if ($view_type=="1") { $view_type="main.php"; } elseif($view_type=="2") { $view_type="calendar_view.php"; } // this is menu. not nice but works ;) if (preg_match("/search_v2.php/i",$location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; $search_loc=1; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/main.php/i",$location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/my_links.php/i",$location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.') '; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/help.php/i",$location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/contacts.php/i", $location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/stats.php/i", $location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/logger.php/i", $location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/trash.php/i", $location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/calendar_view.php/i", $location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/chat_map.php/i", $location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/settings.php/i", $location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } elseif(preg_match("/favorites.php/i", $location)) { $menu_main=''.$menu_item_browser[$lang].''; $menu_map=''.$menu_item_map[$lang].''; $menu_search=''.$menu_item_search[$lang].''; $menu_mylinks=''.$menu_item_links[$lang].' ('.$my_links_count.')'; $menu_favorites=''.$menu_item_fav[$lang].'('.$favorites_count.')'; $menu_contacts=''.$menu_item_contacts[$lang].''; $menu_logger=''.$menu_item_logs[$lang].''; $menu_trash=''.$menu_item_trash[$lang].'('.$tr_n.')'; if (TOKEN==ADMIN_NAME) { $menu_stats=' | Stats'; } } // check if archivization is currently enabled... if ($sess->get('log_status') === false) { $html->system_message($status_msg1[$lang]); } if ($start) { $cur_loc="&start=$start"; } // Show special contact? $db->get_jorge_pref("3"); $show_spec = $db->result->pref_value; // Display special contacts? if ($show_spec === "2") { $db->spec_ignore(true); } else { $db->spec_ignore(false); } //Generate quick jump $db->get_last_day(); $ql_date = $db->result->at; $quick_link = $enc->crypt_url("tslice=$ql_date"); $html->menu(' '); if ($mac_user === true) { $html->menu(''); } $html->menu('
'.TOKEN.'@'.XMPP_HOST.'  |   '.$menu_item_panel[$lang].'  |   '.$sel_client[$lang].'  |   '.$help_but[$lang].'  |  '.$log_out_b[$lang].'
logo
'); if ($search_loc==1) { if (isset($_GET[c])) { $enc->decrypt_url($_GET['c']); $time2_start = $enc->time_start; $time2_end = $enc->time_end; } else{ $time2_start=$_POST[time2_start]; $time2_end=$_POST[time2_end]; if (validate_date($time2_start) === false) { unset($time2_start); } if (validate_date($time2_start) === false) { unset($time2_end); } } if ($time2_start AND $time2_end) { if (strtotime("$time2_start") > strtotime("$time2_end")) { $alert = $time_range_w[$lang]; unset ($search_phase); } } $db->get_uniq_chat_dates(); $result = $db->result; foreach ($result as $row) { $r++; $to_tble[$r] = $row[at]; } $html->menu(' '); if ($time2_start AND !$time2_end) { $time2_end = $to_tble[$pass_t-1]; } if (!$time2_start AND $time2_end) { $time2_start = $to_tble[($t+1)-$t]; } } $html->menu('
Hello Mac user!
'.$menu_main.' | ' .$menu_map.' | ' .$menu_favorites.' | ' .$menu_mylinks.' | ' .$menu_search.' | ' .$menu_contacts.' | ' .$menu_logger.$menu_stats.' | ' .$menu_trash. ' | '.$refresh[$lang].'

'.$alert.'

'); // Get user roster. $rpc_roster = $ejabberd_rpc->get_roster(); // creater roster object and rewrite it to portable multidimentional array $ejabberd_roster = new roster(); foreach ($rpc_roster as $roster_record) { if ($roster_record[group]=="") { $roster_record[group] = $con_no_g[$lang]; } // avoid contacts without nick if ($roster_record[nick]!="") { $ejabberd_roster->add_item($roster_record[jid],$roster_record[nick],$roster_record[group]); } } ?>