0) { $_SESSION["get"] = $_GET; $dir = dirname($_SERVER["PHP_SELF"]); if(($dir == "/") || ($dir == "\\")) { $dir = ""; } header("Location: http://".$_SERVER["SERVER_NAME"].$dir); die(); } require_once("conf/config.php"); require_once("core/system.php"); require_once("core/mysql.php"); $db = new mysql_db(); if(!$db->connect(_DB_HOST, _DB_NAME, _DB_USER, _DB_PASS)) { die("DB connection error."); } $widgets = parse_ini_file("widgets/widgets.ini", true); $outJs = "var/code.js"; $jsList = array( "js/system.js", "js/request.js", "js/xmlparser.js", "js/utils.js", "js/widget.js", "js/drag.js", "js/kernel.js", "js/desktop.js", "js/nvuwa.js" ); foreach($widgets as $k => $v) { $jsList[] = "widgets/".trim($k)."/widget.js"; } if(file_exists($outJs)) { $clm = filemtime($outJs); } else { $clm = 0; } $needRecompile = false; for($i=0; $i $clm) { $needRecompile = true; break; } } /* $offset = abs(crc32($_SERVER["SERVER_NAME"]) % 500); $words = array("getNoCache","getTransportObj","getXML","defaultProfile","domModel","modelDefaultSettings","isReduced","isSettingsReduced","isPreview","buildWindow","buildInterface","onOpen","buildDomModel","onBuildInterface","isForceClose","forceClose","checkMouseInOut","switchSize","onShow","hideSettings","onHide","switchSettings","showSettings","onShowSettings","settingsSetTitle","onDrag","onSelectColor","onSelectFont","onSelectFontSize","timerHandler","dispatchMsg","hideElement","showElement","addWidget","freeWidget","runWidget","timers","processTimer","stopTimer","parseLangXML","getHashList","newFeedUrl","applyTheme","isMenuShow","switchMenu","activePage","closeCurrentPage","editTitle","columners","tabOptionsShown","getNewTabNumber","addNewTab","defaultPanelsCount","getPanelsDom","renderTab","showTab","getTabIconSrc","belongTabInfo","onTabDragStart","onTabDragOver","onTabDragStop","activeTab","hideTab","hideTabOptions","showTabOptions","tabIcons","renameTab","setTabIcon","deleteTabIcon","closeTab","setPanelsCount","getPanelsCount","getPanel","getTinyPanel","savePanels","getBelongPanel","getWindowAtPos","startArea","stopArea","processArea","putWindow","showAll","hideAll","wakeUp","addFeedDispatch","addToFavorites","domContent","showRegform","hideRegform","tryLogin","tryRegister","checkEmail","checkPassword","signIn","loadUser","saveUser","registerUser","registerWidget","saveProfile","loadProfile","domModelContent","domModelAdditional","menuItemId","getMenuItemId","switchCategory","renderCategory","switchPanel","hideItemMenu","closePreview","closeAddFeedPanel","openWidget","hideHint","oldDisableOnClosePrompt","addToDesktop","currentHint","showHint","setAddFeedStatus","addFeedPanelVisible","showAddFeedPanel","addFeed","registerFeed","activeItemId","showItemControl","hideItemControl","showItemMenu","showRenameItemSection","getItemNum","showDeleteItemSection","renameItem","deleteItem","tmpIcons","themeBackground","applyBackgound","selectedBackground","testBackgroundImg","testBackgroundColor","saveBackground","delBackground","currentPopup","showPopup","closePopup","selectColor","selectFont","selectFontSize","renderThemes","setCurrentTheme","setTheme","showText","applyText","sendFeedback","domSendToFriend","doSend","domSettings","lastRefresh","isLoading","isInReader","setUrl","setOpenDirectly","setNewsCount","showChannelTitle","renderChannel","setPeriod","openChannel","getItemsCount","processItemRead","processItemUnread","getReadedItemsCount","lastFeed","getItemMd5","showChannel","isReaded","showError","openSite","setReaded","unsetReaded","channelLastRefresh","buildChannel","widgetId","readFeed","updateTitle","readAll","unReadAll","openFlash","isUpdating","switchSection","renderContactList","addContact","deleteContact","startNewMessage","replyTo","sendMessage","firstRenderMessages","renderMessages","clearMessages","showMail","fullCount","setConfigState","switchMailsContent","openInbox","setPort","isProfileEmpty","setContent","totalMessages","activeTag","applyTag","closeEdit","uploadFile","importError","importFromUrl","tmpFile","parseBookmarks","addBookmark","renderTags","editBookmarkId","isEditOpen","openEdit","processUpdate","updateBookmark","deleteBookmarks","processAdd","getBookmarksByTagId","deleteBookmark","renderItems","renderItem","addItem","switchItem","moveItemUp","swapItems","moveItemDown","editItem","contentDomWebnote","editText","switchFlashCategory","loadFlash","openPlayer","stopFlash","renderFlashCategory","tagUrl","setLayout","renderPhotos","setTarget","setTags","curPhoto","showBigPhoto","showAllPhotos","showPrevPhoto","showNextPhoto","openBigPhoto","openPhoto","showPhotos","setChannel","setCount","renderContent","parseContent","setUnit","renderWeather","loadCities","showCities",); $replaces = array(); for($i = 0; $i
\n"; // constants echo "baseUrl = \"".dirname($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])."/\";\n"; echo "BASE_URL = \"".dirname($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])."\";\n"; // GET vars $gvars = isset($_SESSION["get"]) ? $_SESSION["get"] : array(); echo "_GET = ".getJsCode($gvars).";\n"; unset($_SESSION["get"]); // session user echo "session_user = ".(isset($_SESSION["logged_user"]) ? getJsCode($_SESSION["logged_user"]) : "false")."\n"; // menu items if($menuList) { echo "menuWidgets = [ ". implode(",", $menuList) ." ]\n"; } // websearch servers $ws_serves = $db->query("SELECT * FROM "._DB_TABLE_PREFIX."websearch"); echo "websearch_servers = ".getJsCode($ws_serves).";\n"; // Languages if (isset($_COOKIE['lng'])) $lang = strtolower($_COOKIE['lng']); else $lang = 'en'; $desktopLangs = null; $langs = parse_ini_file("lang/langs.ini", true); foreach($langs as $k => $v) { $desktopLangs[] = "  ".$v['display']." "; } if($desktopLangs) { echo "desktopLangsHTML = '". implode("-", $desktopLangs) ."';\n"; } // custom pages $custom_pages = $db->query("SELECT * FROM "._DB_TABLE_PREFIX."custompages WHERE lang='".$lang."'"); if(isset($custom_pages["id"])) { $custom_pages = array($custom_pages); } echo "custom_pages = ".getJsCode($custom_pages).";\n"; if (is_array($custom_pages)) for($i=0;$i".$page["title"]." "; } if($c_pages) echo "customPagesHTML = '". implode("|", $c_pages) ."';\n"; else echo "customPagesHTML ='';\n"; echo ""; if($_SERVER["SERVER_NAME"] != "mevou") { includeJs($outJs); } else { for($i=0; $i