Showing preview only (8,563K chars total). Download the full file or copy to clipboard to get everything.
Repository: supernova-ws/SuperNova
Branch: master
Commit: 5b4df5b56ab3
Files: 814
Total size: 6.7 MB
Directory structure:
gitextract_i4qucyb1/
├── .gitattributes
├── .gitignore
├── .htaccess
├── README.MD
├── _error-404.php
├── admin/
│ ├── add_moon.php
│ ├── adm_flying_fleets.php
│ ├── adm_log_main.php
│ ├── adm_message_list.php
│ ├── adm_metamatter.php
│ ├── adm_planet_list.php
│ ├── adm_quest.php
│ ├── adm_user_analyze.php
│ ├── adm_user_stat.php
│ ├── admin_analyze_matter.php
│ ├── admin_chat.php
│ ├── admin_darkmatter.php
│ ├── admin_locale.php
│ ├── admin_user_activity.php
│ ├── ajax_maintenance.php
│ ├── banned.php
│ ├── includes/
│ │ └── admin_planet_edit.inc.php
│ ├── index.html
│ ├── maintenance.php
│ ├── overview.php
│ ├── planet_compensate.php
│ ├── planet_edit.php
│ ├── settings.php
│ ├── statbuilder.php
│ ├── sxd/
│ │ ├── .htaccess
│ │ ├── backup/
│ │ │ ├── .htaccess
│ │ │ └── index.htm
│ │ ├── bsd_license.txt
│ │ ├── img/
│ │ │ └── index.htm
│ │ ├── index.php
│ │ ├── info.php
│ │ ├── lang/
│ │ │ ├── index.htm
│ │ │ ├── list.php
│ │ │ ├── lng_en.php
│ │ │ ├── lng_ru.php
│ │ │ ├── lng_uk.php
│ │ │ └── update.php
│ │ ├── load.php
│ │ ├── readme_en.txt
│ │ ├── readme_ru.txt
│ │ ├── sxd.css
│ │ ├── sxd.js
│ │ └── tmpl.php
│ ├── tools.php
│ └── userlist.php
├── affilates.php
├── ajax_version_check.php
├── alliance.php
├── annonce.php
├── announce.php
├── artifacts.php
├── banned.php
├── banner.php
├── blitz_register.php
├── buddy.php
├── buildings.php
├── captcha.php
├── classes/
│ ├── Account.php
│ ├── AjaxController.php
│ ├── Alliance/
│ │ ├── Alliance.php
│ │ ├── AllianceHelper.php
│ │ ├── AllianceMember.php
│ │ ├── AllianceMemberList.php
│ │ ├── AllianceTitle.php
│ │ ├── AllianceTitleList.php
│ │ ├── DBStaticAlly.php
│ │ └── RecordAlliance.php
│ ├── AuthProvider.php
│ ├── BBCodeParser.php
│ ├── BanHammer.php
│ ├── Bonus/
│ │ ├── BonusAtom.php
│ │ ├── BonusAtomAbility.php
│ │ ├── BonusAtomAdd.php
│ │ ├── BonusAtomMultiply.php
│ │ ├── BonusAtomPercent.php
│ │ ├── BonusCatalog.php
│ │ ├── BonusFactory.php
│ │ ├── BonusListAtom.php
│ │ ├── ValueBonused.php
│ │ └── ValueStorage.php
│ ├── Chat/
│ │ └── Chat.php
│ ├── Common/
│ │ ├── AccessAccessors.php
│ │ ├── AccessLogged.php
│ │ ├── AccessLoggedAbstract.php
│ │ ├── AccessLoggedTranslatedV2.php
│ │ ├── AccessLoggedV2.php
│ │ ├── AccessMagic.php
│ │ ├── AccessorsV2.php
│ │ ├── ContainerPlus.php
│ │ ├── EmptyCountableIterator.php
│ │ ├── Exceptions/
│ │ │ ├── DbalFieldInvalidException.php
│ │ │ └── ExceptionSnLocalized.php
│ │ ├── Hooker/
│ │ │ ├── Hooker.php
│ │ │ └── Pimp.php
│ │ ├── Interfaces/
│ │ │ ├── IContainer.php
│ │ │ └── ICountableIterator.php
│ │ ├── Invoker.php
│ │ ├── NullContainer.php
│ │ ├── OutcomeManager.php
│ │ ├── Pimple/
│ │ │ ├── Container.php
│ │ │ └── ServiceProviderInterface.php
│ │ ├── Tools/
│ │ │ └── VersionCheckerDeprecated.php
│ │ ├── Traits/
│ │ │ ├── TContainer.php
│ │ │ ├── TJsonSerializable.php
│ │ │ └── TSingleton.php
│ │ ├── Vector.php
│ │ └── oldArrayAccessNd.php
│ ├── Confirmation.php
│ ├── Core/
│ │ ├── Autoloader.php
│ │ ├── Crypto.php
│ │ ├── Entity.php
│ │ ├── EntityDb.php
│ │ ├── GlobalContainer.php
│ │ ├── HttpRequest.php
│ │ ├── HttpUrl.php
│ │ ├── RepoV2.php
│ │ ├── Repository.php
│ │ ├── Scheduler/
│ │ │ ├── Lock.php
│ │ │ ├── TaskConditional.php
│ │ │ ├── TaskPeriodic.php
│ │ │ └── Watchdog.php
│ │ ├── Singleton.php
│ │ ├── SnBootstrap.php
│ │ ├── SnPimp.php
│ │ ├── StorageV2.php
│ │ ├── Updater.php
│ │ └── Worker.php
│ ├── DBAL/
│ │ ├── ActiveRecord.php
│ │ ├── ActiveRecordAbstract.php
│ │ ├── ActiveRecordAbstractIndexed.php
│ │ ├── DbAbstractResultIterator.php
│ │ ├── DbFieldDescription.php
│ │ ├── DbIndexDescription.php
│ │ ├── DbIndexField.php
│ │ ├── DbMysqliResultIterator.php
│ │ ├── DbQuery.php
│ │ ├── DbSqlPaging.php
│ │ ├── OldDbChangeSet.php
│ │ ├── PropertyDescription.php
│ │ ├── RecordV2.php
│ │ ├── RecordV3.php
│ │ ├── Schema.php
│ │ ├── StorageSqlV2.php
│ │ ├── TableSchema.php
│ │ └── db_mysql.php
│ ├── Design.php
│ ├── Fleet/
│ │ ├── Constants.php
│ │ ├── DbFleetStatic.php
│ │ ├── Fleet.php
│ │ ├── FleetDispatchEvent.php
│ │ ├── FleetDispatcher.php
│ │ ├── FleetRowObject.php
│ │ ├── FleetStatic.php
│ │ ├── FleetWatchdog.php
│ │ ├── MissionData.php
│ │ ├── MissionEspionage.php
│ │ ├── MissionEspionageReport.php
│ │ ├── MissionExploreResult.php
│ │ ├── RecordFleet.php
│ │ └── TaskDispatchFleets.php
│ ├── General/
│ │ ├── Helpers/
│ │ │ ├── PagingRenderer.php
│ │ │ └── URLHelper.php
│ │ ├── LogCounterShrinker.php
│ │ ├── VisitAccumulator.php
│ │ └── VisitMerger.php
│ ├── General.php
│ ├── HelperArray.php
│ ├── HelperString.php
│ ├── Meta/
│ │ └── Economic/
│ │ ├── BuildDataStatic.php
│ │ ├── EconomicHelper.php
│ │ └── ResourceCalculations.php
│ ├── Modules/
│ │ ├── ModulesManager.php
│ │ └── sn_module.php
│ ├── Note/
│ │ └── Note.php
│ ├── Notification/
│ │ └── RecordNotification.php
│ ├── Old/
│ │ └── Avatar.php
│ ├── PTLTag.php
│ ├── Pages/
│ │ ├── Deprecated/
│ │ │ ├── PageAdminMining.php
│ │ │ ├── PageAdminModules.php
│ │ │ ├── PageAdminPayment.php
│ │ │ ├── PageAdminUserView.php
│ │ │ ├── PageDeprecated.php
│ │ │ ├── PageFleet5Gathering.php
│ │ │ ├── PageImperium.php
│ │ │ ├── PageMercenary.php
│ │ │ ├── PageMessage.php
│ │ │ └── PageOverview.php
│ │ ├── Helpers/
│ │ │ └── PageHelperAlly.php
│ │ ├── IPage.php
│ │ ├── PageAjax.php
│ │ ├── PageAjaxIgnore.php
│ │ ├── PageQuest.php
│ │ └── PageTutorial.php
│ ├── Payment/
│ │ ├── PaymentMethods.php
│ │ └── PaymentsMethodsActive.php
│ ├── Planet/
│ │ ├── DBStaticPlanet.php
│ │ ├── Planet.php
│ │ └── RecordPlanet.php
│ ├── Player/
│ │ ├── PlayerLevelHelper.php
│ │ ├── PlayerStatic.php
│ │ ├── RecordPlayer.php
│ │ ├── playerTimeDiff.php
│ │ └── userOptions.php
│ ├── PlayerToAccountTranslate.php
│ ├── Pm/
│ │ ├── DecodeEspionage.php
│ │ ├── PlayerIgnore.php
│ │ └── RecordPlayerIgnore.php
│ ├── Ptl/
│ │ └── PtlVariableDecorator.php
│ ├── Que/
│ │ ├── DBStaticQue.php
│ │ └── QueUnitStatic.php
│ ├── RequestInfo.php
│ ├── ResultMessages.php
│ ├── SN.php
│ ├── SkinInterface.php
│ ├── SkinModel.php
│ ├── SkinV2.php
│ ├── SnTemplate.php
│ ├── StatCalculator.php
│ ├── StatUpdateLauncher.php
│ ├── Storage.php
│ ├── Template/
│ │ └── TemplateMeta.php
│ ├── TextEntity.php
│ ├── TextModel.php
│ ├── TextRecordDescription.php
│ ├── TheUser.php
│ ├── Timer.php
│ ├── Tools.php
│ ├── Ube/
│ │ └── Ube4_1/
│ │ ├── Ube4_1Calc.php
│ │ └── Ube4_1Prepare.php
│ ├── Unit/
│ │ ├── DBStaticUnit.php
│ │ ├── Governor.php
│ │ ├── RecordUnit.php
│ │ └── Unit.php
│ ├── Universe/
│ │ └── Universe.php
│ ├── Universe.php
│ ├── Validators.php
│ ├── auth_abstract.php
│ ├── auth_local.php
│ ├── classCache.php
│ ├── classConfig.php
│ ├── classLocale.php
│ ├── classPersistent.php
│ ├── core_auth.php
│ ├── debug.php
│ ├── sn_module_payment.php
│ ├── template.php
│ └── template_compile.php
├── common.php
├── composer.json
├── dark_matter.php
├── design/
│ ├── css/
│ │ ├── blitz_login_background.css
│ │ ├── global-ie.css
│ │ ├── global.css
│ │ ├── index.html
│ │ ├── jquery-ui.css
│ │ ├── login.css
│ │ ├── login_background.css
│ │ └── menu_icons.css
│ ├── images/
│ │ ├── index.html
│ │ ├── lang/
│ │ │ └── index.html
│ │ └── smileys/
│ │ └── index.html
│ └── templates/
│ ├── OpenGame/
│ │ ├── .htaccess
│ │ ├── _ajax.tpl.html
│ │ ├── _number_color_maximum.tpl.html
│ │ ├── _number_color_percent.tpl.html
│ │ ├── _number_color_planet_fill_bg.tpl.html
│ │ ├── _number_color_production_bg.tpl.html
│ │ ├── _number_color_value.tpl.html
│ │ ├── _number_percent_class.tpl.html
│ │ ├── _page/
│ │ │ ├── _00_header.tpl.html
│ │ │ ├── _01_head.tpl.html
│ │ │ ├── _40_js.tpl.html
│ │ │ ├── _99_footer.tpl.html
│ │ │ ├── navbar.tpl.html
│ │ │ ├── navbar_additions.tpl.html
│ │ │ ├── navbar_buttons.tpl.html
│ │ │ ├── navbar_planet_select.tpl.html
│ │ │ ├── navbar_resources.tpl.html
│ │ │ ├── navbar_resources_flex.tpl.html
│ │ │ ├── navbar_resources_horizontal.tpl.html
│ │ │ └── navbar_resources_vertical.tpl.html
│ │ ├── _paging.tpl.html
│ │ ├── _redirect.tpl.html
│ │ ├── _result_message.tpl.html
│ │ ├── _table.tpl.html
│ │ ├── _template.css
│ │ ├── _template.ini
│ │ ├── admin/
│ │ │ ├── add_moon.tpl.html
│ │ │ ├── adm_flying_fleets.tpl.html
│ │ │ ├── adm_log_main.tpl.html
│ │ │ ├── adm_log_main_detail.tpl.html
│ │ │ ├── adm_messagelist.tpl.html
│ │ │ ├── adm_metamatter.tpl.html
│ │ │ ├── adm_overview.tpl.html
│ │ │ ├── adm_planet_list.tpl.html
│ │ │ ├── admin_ally_all.tpl.html
│ │ │ ├── admin_ally_one.tpl.html
│ │ │ ├── admin_analyze_matter.tpl.html
│ │ │ ├── admin_ban.tpl.html
│ │ │ ├── admin_chat.tpl.html
│ │ │ ├── admin_darkmatter.tpl.html
│ │ │ ├── admin_locale.tpl.html
│ │ │ ├── admin_mining.tpl.html
│ │ │ ├── admin_modules.tpl.html
│ │ │ ├── admin_payment.tpl.html
│ │ │ ├── admin_planet_edit.tpl.html
│ │ │ ├── admin_ptl_test.tpl.html
│ │ │ ├── admin_tools.tpl.html
│ │ │ ├── admin_user.tpl.html
│ │ │ ├── admin_user_activity.tpl.html
│ │ │ ├── md5enc.tpl.html
│ │ │ ├── planet_compensate.tpl.html
│ │ │ ├── reset_body.tpl.html
│ │ │ ├── settings.tpl.html
│ │ │ ├── simple_header.tpl.html
│ │ │ ├── tests/
│ │ │ │ └── _number_color_value.tpl.html
│ │ │ └── userlist.tpl.html
│ │ ├── affilates.tpl.html
│ │ ├── agreement.tpl.html
│ │ ├── ali_admin.tpl.html
│ │ ├── ali_admin_diplomacy.tpl.html
│ │ ├── ali_admin_mail.tpl.html
│ │ ├── ali_admin_request.tpl.html
│ │ ├── ali_admin_rights.tpl.html
│ │ ├── ali_external.tpl.html
│ │ ├── ali_external_make.tpl.html
│ │ ├── ali_info.tpl.html
│ │ ├── ali_members.tpl.html
│ │ ├── ali_request.tpl.html
│ │ ├── ali_request_waiting.tpl.html
│ │ ├── ali_search.tpl.html
│ │ ├── announce.tpl.html
│ │ ├── artifacts.tpl.html
│ │ ├── banned_body.tpl.html
│ │ ├── blitz_register.tpl.html
│ │ ├── buddy.tpl.html
│ │ ├── buildings_builds.tpl.html
│ │ ├── chat/
│ │ │ ├── chat_body.tpl.html
│ │ │ ├── chat_frame.tpl.html
│ │ │ ├── chat_header.tpl.html
│ │ │ ├── chat_messages.tpl.html
│ │ │ └── chat_online.tpl.html
│ │ ├── contact.tpl.html
│ │ ├── dark_matter.tpl.html
│ │ ├── eco_bld_queue_list.tpl.html
│ │ ├── eco_queue.tpl.html
│ │ ├── fleet0.tpl.html
│ │ ├── fleet1.tpl.html
│ │ ├── fleet2.tpl.html
│ │ ├── fleet3.tpl.html
│ │ ├── fleet5.tpl.html
│ │ ├── fleet_aks_invite.tpl.html
│ │ ├── fleet_javascript.tpl.html
│ │ ├── fleet_miniatures.tpl.html
│ │ ├── fleet_page_0_buttons.tpl.html
│ │ ├── fleet_page_0_buttons_action.tpl.html
│ │ ├── flying_fleets.tpl.html
│ │ ├── imperator.tpl.html
│ │ ├── imperium.tpl.html
│ │ ├── imperium_resource_cell.tpl.html
│ │ ├── index.html
│ │ ├── jumpgate.tpl.html
│ │ ├── login_body.tpl.html
│ │ ├── login_header.tpl.html
│ │ ├── login_menu.tpl.html
│ │ ├── login_player_register.tpl.html
│ │ ├── lostpassword.tpl.html
│ │ ├── market.tpl.html
│ │ ├── market_fleet.tpl.html
│ │ ├── market_info.tpl.html
│ │ ├── market_trader.tpl.html
│ │ ├── menu.tpl.html
│ │ ├── message_body.tpl.html
│ │ ├── metamatter.tpl.html
│ │ ├── mrc_mercenary_hire.tpl.html
│ │ ├── msg_message_class.tpl.html
│ │ ├── msg_message_compose.tpl.html
│ │ ├── msg_message_list.tpl.html
│ │ ├── msg_message_list_paging.tpl.html
│ │ ├── msg_message_spy.tpl.html
│ │ ├── navbar_button_queued.tpl.html
│ │ ├── navbar_news.tpl.html
│ │ ├── navbar_notes.tpl.html
│ │ ├── news_list.tpl.html
│ │ ├── note_list.tpl.html
│ │ ├── notes.tpl.html
│ │ ├── novapedia.tpl.html
│ │ ├── options.tpl.html
│ │ ├── options_block.tpl.html
│ │ ├── overview_fleet_event.tpl.html
│ │ ├── page_hint.tpl.html
│ │ ├── planet_fleet_list.tpl.html
│ │ ├── planet_governor.tpl.html
│ │ ├── planet_list.tpl.html
│ │ ├── planet_list_info.tpl.html
│ │ ├── planet_list_overview.tpl.html
│ │ ├── planet_manage.tpl.html
│ │ ├── planet_overview.tpl.html
│ │ ├── planet_sector_bar.tpl.html
│ │ ├── planet_sector_buy.tpl.html
│ │ ├── que_total.tpl.html
│ │ ├── quest.tpl.html
│ │ ├── quest_edit_form.tpl.html
│ │ ├── rank_list.tpl.html
│ │ ├── records.tpl.html
│ │ ├── registry_form.tpl.html
│ │ ├── resources.tpl.html
│ │ ├── search.tpl.html
│ │ ├── server_info.tpl.html
│ │ ├── simple_table.tpl.html
│ │ ├── simulator.tpl.html
│ │ ├── stat_statistics.tpl.html
│ │ ├── techtree.tpl.html
│ │ ├── techtree_computer.tpl.html
│ │ ├── techtree_mobile.tpl.html
│ │ ├── tutorial.tpl.html
│ │ ├── ube_combat_report.tpl.html
│ │ ├── universe.tpl.html
│ │ ├── universe_navigation.tpl.html
│ │ ├── universe_new.tpl.html
│ │ ├── universe_old.tpl.html
│ │ ├── universe_rename.tpl.html
│ │ ├── vacation.tpl.html
│ │ └── viewreport.tpl.html
│ └── index.html
├── docs/
│ ├── SuperNova - All you didn't want to know but forced to.docx
│ ├── balance.txt
│ ├── changelog.dev.todo.txt
│ ├── changelog.txt
│ ├── changelog_dev.txt
│ ├── class_tree.txt
│ ├── config.php.sample
│ ├── credits.txt
│ ├── extra/
│ │ ├── readme.txt
│ │ └── sql/
│ │ └── account_by_user_name.sql
│ ├── html/
│ │ ├── .htaccess
│ │ ├── changelog.html
│ │ ├── coding-guidelines.html
│ │ ├── developer.html
│ │ ├── readme.html
│ │ └── stylesheet.css
│ ├── install-en.md
│ ├── install.md
│ ├── license.txt
│ ├── readme-en.txt
│ ├── readme.txt
│ ├── similar_characters_detect.md
│ ├── supernova-data.sql
│ ├── supernova.sql
│ ├── todo.txt
│ ├── todo.xls
│ ├── tricks.txt
│ ├── txt2html.php
│ └── work-fleets.txt
├── fleet.php
├── flotenajax.php
├── flying_fleets.php
├── galaxy.php
├── includes/
│ ├── .htaccess
│ ├── alliance/
│ │ ├── ali_external_create_ally.inc
│ │ ├── ali_external_request.inc
│ │ ├── ali_info.inc
│ │ ├── ali_internal_admin.inc
│ │ ├── ali_internal_admin_diplomacy.inc
│ │ ├── ali_internal_admin_mail.inc
│ │ ├── ali_internal_admin_request.inc
│ │ ├── ali_internal_admin_rights.inc
│ │ └── ali_internal_members.inc
│ ├── constants/
│ │ ├── constants.php
│ │ ├── constants_fake.php
│ │ ├── constants_params.php
│ │ ├── constants_payments.php
│ │ ├── constants_rpg.php
│ │ ├── constants_ube.php
│ │ └── constants_units.php
│ ├── db/
│ │ ├── db_helpers.php
│ │ ├── db_queries.php
│ │ └── db_queries_users.php
│ ├── db.php
│ ├── debug.tools.php
│ ├── functions/
│ │ ├── _deprecated.php
│ │ ├── _news.php
│ │ ├── ali_alliances.php
│ │ ├── cht_message_parse.php
│ │ ├── eco_get_build_data.php
│ │ ├── eco_planet_update.php
│ │ ├── eco_queue.php
│ │ ├── flt_mission_missile.php
│ │ ├── geoip.php
│ │ ├── index.html
│ │ ├── int_banner_create.php
│ │ ├── int_fleet_events.php
│ │ ├── lng_language.php
│ │ ├── msg_send_simple_message.php
│ │ ├── qst_quest.php
│ │ ├── rpg_points.php
│ │ ├── sys_maintenance.php
│ │ ├── sys_user.php
│ │ ├── tpl_helpers.php
│ │ └── uni_functions.php
│ ├── general/
│ │ ├── general.php
│ │ ├── general_compatibility.php
│ │ ├── general_formatters.php
│ │ ├── general_math.php
│ │ ├── general_nickRender.php
│ │ ├── general_params.php
│ │ ├── general_planetFunctions.php
│ │ ├── general_playerFunctions.php
│ │ ├── general_pname.php
│ │ ├── general_unitFunctions.php
│ │ ├── general_urlAndHttp.php
│ │ └── general_validators.php
│ ├── includes/
│ │ ├── art_artifact.php
│ │ ├── coe_simulator_helpers.php
│ │ ├── eco_bld_structures.php
│ │ ├── flt_functions.php
│ │ ├── flt_mission_attack.php
│ │ ├── flt_mission_colonize.php
│ │ ├── flt_mission_hold.php
│ │ ├── flt_mission_recycle.php
│ │ ├── flt_mission_relocate.php
│ │ ├── flt_mission_transport.php
│ │ ├── flt_page0.inc
│ │ ├── flt_page1.inc
│ │ ├── flt_page2.inc
│ │ ├── flt_page3.inc
│ │ ├── flt_page4.inc
│ │ ├── market_fleeter.inc
│ │ ├── market_info.inc
│ │ ├── market_trader.inc
│ │ ├── sys_avatar.php
│ │ ├── ube_attack_calculate.php
│ │ ├── ube_report.php
│ │ ├── ube_zi_helpers.php
│ │ ├── uni_rename.php
│ │ └── user_birthday_celebrate.php
│ ├── index.html
│ ├── init.php
│ ├── pages/
│ │ ├── admin/
│ │ │ └── admin_ally.php
│ │ ├── battle_report.php
│ │ ├── contact.php
│ │ ├── imperator.php
│ │ ├── options.php
│ │ └── techtree.php
│ ├── update.php
│ ├── vars.php
│ ├── vars_combats.php
│ ├── vars_menu.php
│ ├── vars_powerups.php
│ └── vars_structures.php
├── index.php
├── infos.php
├── js/
│ ├── build_unit.js
│ ├── chat_advanced.js
│ ├── cnt.js
│ ├── fleet.js
│ ├── fleet_gather.js
│ ├── generate.js
│ ├── index.html
│ ├── lib/
│ │ ├── fm.checkator.jquery.js
│ │ ├── ion.sound.js
│ │ ├── jquery-ui.js
│ │ ├── jquery.bpopup.js
│ │ ├── jquery.grayscale.js
│ │ ├── jquery.js
│ │ └── js.cookie.js
│ ├── market.js
│ ├── metamatter.js
│ ├── planet_manage.js
│ ├── sn_ajax_send_fleet.js
│ ├── sn_global.js
│ ├── sn_notes.js
│ ├── sn_sound.js
│ ├── sn_survey.js
│ ├── sn_timer.js
│ ├── sn_universe.js
│ └── tutorial.js
├── jumpgate.php
├── language/
│ ├── .htaccess
│ ├── de/
│ │ ├── admin.mo.php
│ │ ├── affilates.mo.php
│ │ ├── alliance.mo.php
│ │ ├── announce.mo.php
│ │ ├── artifacts.mo.php
│ │ ├── buddy.mo.php
│ │ ├── buildings.mo.php
│ │ ├── chat_advanced.mo.php
│ │ ├── fleet.mo.php
│ │ ├── infos.mo.php
│ │ ├── language.mo.php
│ │ ├── login.mo.php
│ │ ├── market.mo.php
│ │ ├── menu.mo.php
│ │ ├── messages.mo.php
│ │ ├── mrc_mercenary.mo.php
│ │ ├── notes.mo.php
│ │ ├── options.mo.php
│ │ ├── overview.mo.php
│ │ ├── payment.mo.php
│ │ ├── quest.mo.php
│ │ ├── search.mo.php
│ │ ├── stat.mo.php
│ │ ├── system.mo.php
│ │ ├── tech.mo.php
│ │ └── universe.mo.php
│ ├── en/
│ │ ├── admin.mo.php
│ │ ├── affilates.mo.php
│ │ ├── alliance.mo.php
│ │ ├── announce.mo.php
│ │ ├── artifacts.mo.php
│ │ ├── buddy.mo.php
│ │ ├── buildings.mo.php
│ │ ├── chat_advanced.mo.php
│ │ ├── fleet.mo.php
│ │ ├── index.html
│ │ ├── infos.mo.php
│ │ ├── language.mo.php
│ │ ├── login.mo.php
│ │ ├── market.mo.php
│ │ ├── menu.mo.php
│ │ ├── messages.mo.php
│ │ ├── mrc_mercenary.mo.php
│ │ ├── notes.mo.php
│ │ ├── options.mo.php
│ │ ├── overview.mo.php
│ │ ├── payment.mo.php
│ │ ├── quest.mo.php
│ │ ├── search.mo.php
│ │ ├── stat.mo.php
│ │ ├── system.mo.php
│ │ ├── tech.mo.php
│ │ └── universe.mo.php
│ ├── es/
│ │ ├── admin.mo.php
│ │ ├── affilates.mo.php
│ │ ├── alliance.mo.php
│ │ ├── announce.mo.php
│ │ ├── artifacts.mo.php
│ │ ├── buddy.mo.php
│ │ ├── buildings.mo.php
│ │ ├── chat_advanced.mo.php
│ │ ├── fleet.mo.php
│ │ ├── infos.mo.php
│ │ ├── language.mo.php
│ │ ├── login.mo.php
│ │ ├── market.mo.php
│ │ ├── menu.mo.php
│ │ ├── messages.mo.php
│ │ ├── mrc_mercenary.mo.php
│ │ ├── notes.mo.php
│ │ ├── options.mo.php
│ │ ├── overview.mo.php
│ │ ├── payment.mo.php
│ │ ├── quest.mo.php
│ │ ├── search.mo.php
│ │ ├── stat.mo.php
│ │ ├── system.mo.php
│ │ ├── tech.mo.php
│ │ └── universe.mo.php
│ └── ru/
│ ├── admin.mo.php
│ ├── affilates.mo.php
│ ├── alliance.mo.php
│ ├── announce.mo.php
│ ├── artifacts.mo.php
│ ├── buddy.mo.php
│ ├── buildings.mo.php
│ ├── chat_advanced.mo.php
│ ├── fleet.mo.php
│ ├── index.html
│ ├── infos.mo.php
│ ├── language.mo.php
│ ├── login.mo.php
│ ├── market.mo.php
│ ├── menu.mo.php
│ ├── messages.mo.php
│ ├── mrc_mercenary.mo.php
│ ├── notes.mo.php
│ ├── options.mo.php
│ ├── overview.mo.php
│ ├── payment.mo.php
│ ├── quest.mo.php
│ ├── search.mo.php
│ ├── stat.mo.php
│ ├── system.mo.php
│ ├── tech.mo.php
│ └── universe.mo.php
├── login.php
├── logout.php
├── lostpassword.php
├── market.php
├── messages.php
├── metamatter.php
├── notes.php
├── officer.php
├── overview.php
├── phalanx.php
├── quest.php
├── ranks.php
├── records.php
├── reg.php
├── resources.php
├── robots.txt
├── scheduler.php
├── search.php
├── server_info.php
├── simulator.php
├── skins/
│ ├── EpicBlue/
│ │ ├── skin.css
│ │ ├── skin.ini
│ │ └── tmpl.ini
│ ├── index.html
│ └── supernova-ivash/
│ ├── skin.css
│ ├── skin.ini
│ └── tmpl.ini
├── sounds/
│ ├── beer_can_opening.aac
│ ├── beer_can_opening.ogg
│ ├── bell_ring.aac
│ ├── bell_ring.ogg
│ ├── branch_break.aac
│ ├── branch_break.ogg
│ ├── button_click.aac
│ ├── button_click.ogg
│ ├── button_click_on.aac
│ ├── button_click_on.ogg
│ ├── button_push.aac
│ ├── button_push.ogg
│ ├── button_tiny.aac
│ ├── button_tiny.ogg
│ ├── camera_flashing.aac
│ ├── camera_flashing.ogg
│ ├── camera_flashing_2.aac
│ ├── camera_flashing_2.ogg
│ ├── cd_tray.aac
│ ├── cd_tray.ogg
│ ├── computer_error.aac
│ ├── computer_error.ogg
│ ├── door_bell.aac
│ ├── door_bell.ogg
│ ├── door_bump.aac
│ ├── door_bump.ogg
│ ├── glass.aac
│ ├── glass.ogg
│ ├── keyboard_desk.aac
│ ├── keyboard_desk.ogg
│ ├── light_bulb_breaking.aac
│ ├── light_bulb_breaking.ogg
│ ├── metal_plate.aac
│ ├── metal_plate.ogg
│ ├── metal_plate_2.aac
│ ├── metal_plate_2.ogg
│ ├── pop_cork.aac
│ ├── pop_cork.ogg
│ ├── snap.aac
│ ├── snap.ogg
│ ├── staple_gun.aac
│ ├── staple_gun.ogg
│ ├── tap.aac
│ ├── tap.ogg
│ ├── water_droplet.aac
│ ├── water_droplet.ogg
│ ├── water_droplet_2.aac
│ ├── water_droplet_2.ogg
│ ├── water_droplet_3.aac
│ └── water_droplet_3.ogg
├── stat.php
├── tests/
│ ├── Bonus/
│ │ ├── BonusAtomAbilityTest.php
│ │ ├── BonusAtomAddTest.php
│ │ ├── BonusAtomMultiplyTest.php
│ │ ├── BonusAtomPercentTest.php
│ │ ├── BonusAtomTest.php
│ │ ├── BonusCatalogTest.php
│ │ ├── BonusFactoryTest.php
│ │ └── BonusListAtomTest.php
│ ├── DBAL/
│ │ └── Tests/
│ │ ├── ActiveRecordAbstractTest.php
│ │ └── Fixtures/
│ │ ├── ActiveAbstractObjectDump.php
│ │ └── RecordActiveAbstractObject.php
│ ├── Fixtures/
│ │ └── UnitInfo.php
│ ├── Meta/
│ │ └── Economic/
│ │ └── EcoHelperTest.php
│ ├── Tests/
│ │ └── Common/
│ │ ├── Hooker/
│ │ │ ├── HookerTest.php
│ │ │ └── PimpTest.php
│ │ └── Pimple/
│ │ ├── Fixtures/
│ │ │ ├── Invokable.php
│ │ │ ├── NonInvokable.php
│ │ │ ├── PimpleServiceProvider.php
│ │ │ └── Service.php
│ │ ├── PimpleServiceProviderInterfaceTest.php
│ │ └── PimpleTest.php
│ ├── bootstrap.php
│ ├── classes/
│ │ ├── AccessAccessorsTest.php
│ │ ├── AccessLoggedTest.php
│ │ ├── AccessMagicTest.php
│ │ ├── AccessorsV2Test.php
│ │ ├── DbQueryTest.php
│ │ ├── HelperArrayTest.php
│ │ ├── InvokerTest.php
│ │ ├── ToolsTest.php
│ │ ├── ValidatorsTest.php
│ │ └── VectorTest.php
│ ├── includes/
│ │ ├── test_constants.php
│ │ └── test_functions.php
│ └── phpunit.xml
├── time_probe.php
├── tools/
│ ├── classes/
│ │ ├── ImageContainer.php
│ │ ├── ImageFile.php
│ │ ├── Sprite.php
│ │ ├── SpriteLine.php
│ │ ├── SpriteLineGif.php
│ │ └── Spritify.php
│ ├── generate.php
│ ├── spritify.md
│ └── spritify.php
└── viewreport.php
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
.gitattributes export-ignore
.gitignore export-ignore
*.jpg binary
*.gif binary
*.png binary
*.ttf binary
*.zip binary
*.rar binary
*.gz binary
*.min.js diff=nodiff
*.min.css diff=nodiff
================================================
FILE: .gitignore
================================================
# Ignore config.php in any directory
config.php
*config.php
badqrys.txt
# Ignore Yandex and Google placeholders
/yandex_*.txt
/google*.txt
/google*.html
# Ignore override CSS files
/desing/css/*override*
# Ignore uploaded files
/files
# Ignore local folder, test folder and test files
/test/
/.local/
t.*
# Ignore update flag
/includes/update.last
# Ignore cache folder
/cache/
/design/cache/
# Ignore avatar folder
/images/avatar/
# Ignore instanced servers
/servers/
# Ignore all dotfiles...
.*
# ...except for .gitignore & .gitattributes
!.gitignore
!.gitattributes
!.htaccess
# Ignoring all files started with "__" - it's a local or global test files
__*
# Ignore backup folder
/admin/sxd/cfg.php
/admin/sxd/error.log
/admin/sxd/ses.php
/admin/sxd/backup/*.job.php
# Ignore backups
/admin/backup/*.gz
/admin/backup/*.bz2
/admin/backup/*.sql
/admin/sxd/backup/*.gz
/admin/sxd/backup/*.bz2
/admin/sxd/backup/*.sql
# Ignore skin xNova
/skins/xnova/
# Ignore forums
/phpBB3/
/forum/
# Ignore DirInfo
dirinfo
# Ignore CMD-files
/*.cmd
# Ignore xcache interface
/xcache/
/xcache-admin/
/xcache-admin2/
================================================
FILE: .htaccess
================================================
AddDefaultCharset UTF-8
# Disable index list
Options -Indexes
# Disable access to config.php
<Files config.php>
order allow,deny
deny from all
</Files>
<Files ~ "\.html$">
order allow,deny
deny from all
</Files>
# Deny access to all dotted fields and folders
RedirectMatch 404 /\..*$
#<Files "\.(tar|gif|png|...|xml)$">
# order allow,deny
# deny from all
#</Files>
================================================
FILE: README.MD
================================================
# We Want YOU!
SuperNova need YOU! We need maintainers for localizations. Any language is
fine! Currently we need maintainer for English locale to check and fix it as
base for other non-Russian speaker users!
# Project "SuperNova.WS"
"SuperNova.WS" (shortly SN) is a massive multiplayer online browser space
strategy game (like oGame). SN is a very heavily modified XNova RageRepack v226
SN written on PHP. It require MySQL-server for work
SN developed under GNU GENERAL PUBLIC LICENSE Version 2, June 1991. You can
read it in /docs/license.txt (English). Also there is additional restrictions:
1. You can not remove or change any copyright notices from any part of SN. If
you wish to use any part of code in your development you should also add all
copyright notices
2. You absolutly can not sell SN-based product without my special permission.
If you want to sell such product - contact me
Currently SN supports Russian and English languages
## Disclaimer
WARNING! Project status is "Alpha"! It means that any update can seriously
change any aspect of gameplay! Also it means that there may be lack of
documentation, no user-friendly installer. Also it means that any user that
want to use this code should have some knowledge about configuring web-server
with PHP and MySQL and have knowledge about installing and configuring
PHP-scripts. However code is pretty stable and has "beta"-quality.
WARNING! SN PROVIDED "AS-IS" WITH NO EXPLICIT OR IMPLIED WARRANTY AT ALL!
WARNING! MANY ASPECTS OF GAMEPLAY AND ALGORYTHMS DIFFERS FROM OGAME OFFICIAL
SERVERS! IT'S NOT A BUG - IT WAS MADE INTENTIONALLY! DO NOT COMPLY IF YOU
ENCOUNTER SUCH DIFFERENCE! Some notes about SN future development can be read
in /docs/todo.txt (Russian)
## Web-resources
### Main Hub For Your SuperNova Experience
Russian Version http://supernova.ws/index.htm
English Version http://supernova.ws/index-en.htm
### GitHub
You encouraged to use GitHub as main source for SN releases and builds
SN on GitHub: http://github.com/supernova-ws/SuperNova
GIT-repository: git://github.com/supernova-ws/SuperNova.git
GIT-repository through HTTP: https://github.com/supernova-ws/SuperNova#
Latest stable release: https://github.com/supernova-ws/SuperNova/zipball/master
Latest night build (stability is not guaranted!): https://github.com/supernova-ws/SuperNova/zipball/trunk
SVN-interface (SVN-interface on GitHub works very unstable): http://svn.github.com/supernova-ws/SuperNova.git
There are 3 branches on GitHub repository
- "master" contains last stable version.
- "trunk" contains most recent and feature-rich code. Here can be some minor bugs
- "test" contains developer snapshot. It can be partially or fully
non-functional. Hovewer here you can see currently developing features.
### SourceForge
GIT-repository on SourceForge:
git://supernova-ws.git.sourceforge.net/gitroot/supernova-ws/supernova-ws
Release archives:
http://sourceforge.net/projects/supernova-ws/files/releases/
DIFFs
http://sourceforge.net/projects/supernova-ws/files/diffs/
Patches (archive of differences between indicated versions)
http://sourceforge.net/projects/supernova-ws/files/patches/
### Support
Forum (Russian and English):
http://forum.supernova.ws/viewforum.php?f=73
### Live Demo Universes
SuperNova (x1):
http://supernova.ws
oGame (x2):
http://ogame.supernova.ws
Beta (x50):
http://beta.supernova.ws
## Documentation
All documentation located in folder `/docs`.
License (English):
`/docs/license.txt`
Project documentation (Russian):
`/docs/readme.txt`
User-level changelog (Russian):
`/docs/changelog.txt`
Installation instructions (Russian):
`/docs/install.md`
Installation instructions (English, google-translated):
`/docs/install-en.md`
Documentation for developers & administrators (Russian):
`/docs/html/developer.html`
Changelog for developers & administrators (Russian):
`/docs/changelog_dev.txt`
Plans for further development (Russian):
`/docs/todo.txt`
Coding Gudelines for developers (English):
`/docs/html/coding-guidelines.html`
Bellitrized game background (Russian):
`/docs/SuperNova - All you didn't want to know but forced to.docx`
# Copyright notice
СуперНова copyright (c) 2009-2020 Gorlum для http://supernova.ws
Project "SuperNova.WS" copyright (c) 2009-2020 by Gorlum for http://supernova.ws
================================================
FILE: _error-404.php
================================================
/* <?php
$redirectFrom = !empty($_SERVER["REDIRECT_URL"]) ? $_SERVER["REDIRECT_URL"] : '';
// $serverProtocol = !empty($_SERVER["SERVER_PROTOCOL"]) ? $_SERVER["SERVER_PROTOCOL"] : 'HTTP/1.0';
// header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
// @header("{$serverProtocol} 200 OK");
echo "File {$redirectFrom} not found on server. Contact administration if you think that this is error";
die();
?> */
================================================
FILE: admin/add_moon.php
================================================
<?php
/**
* admin/add_moon.php
*
* @version 2
* @copyright 2014 Gorlum for http://supernova.ws
*/
use DBAL\db_mysql;
use Planet\DBStaticPlanet;
use Universe\Universe;
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
$template = SnTemplate::gettemplate("admin/add_moon", true);
if(sys_get_param_str('mode') == 'addit')
{
$PlanetID = sys_get_param_id('user');
$MoonName = sys_get_param_str('name');
db_mysql::db_transaction_start();
$PlanetSelected = DBStaticPlanet::db_planet_by_id($PlanetID, true);
uni_create_moon($PlanetSelected['galaxy'], $PlanetSelected['system'], $PlanetSelected['planet'], $PlanetSelected['id_owner'], Universe::moonSizeRandom(), false, ['name' => $MoonName]);
db_mysql::db_transaction_commit();
SnTemplate::messageBoxAdmin($lang['addm_done'], $lang['addm_title']);
}
SnTemplate::display($template, $lang['addm_title']);
================================================
FILE: admin/adm_flying_fleets.php
================================================
<?php
/**
* adm_flying_fleets.php
*
* @copyright 2014 by Gorlum for http://supernova.ws/
*/
use Fleet\DbFleetStatic;
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
$template = SnTemplate::gettemplate('admin/adm_flying_fleets', true);
//$FlyingFleets = db_fleet_list_all();
//while($CurrentFleet = db_fetch($FlyingFleets))
$all_flying_fleets = DbFleetStatic::db_fleet_list('', DB_SELECT_PLAIN);
foreach($all_flying_fleets as $fleet_id => $CurrentFleet) {
$FleetOwner = db_user_by_id($CurrentFleet['fleet_owner']);
$TargetOwner = db_user_by_id($CurrentFleet['fleet_target_owner']);
$fleet_data = tpl_parse_fleet_db($CurrentFleet, ++$i, $FleetOwner);
$fleet_data['fleet']['OWNER_NAME'] = htmlentities($FleetOwner['username'], ENT_COMPAT, 'UTF-8');
$fleet_data['fleet']['TARGET_OWNER_NAME'] = htmlentities($TargetOwner['username'], ENT_COMPAT, 'UTF-8');
$fleet_data['fleet']['STAY_TIME_INT'] = $CurrentFleet['fleet_end_stay'];
$template->assign_block_vars('fleets', $fleet_data['fleet']);
foreach($fleet_data['ships'] as $ship_data) {
$template->assign_block_vars('fleets.ships', $ship_data);
}
}
SnTemplate::display($template, $lang['flt_title']);
================================================
FILE: admin/adm_log_main.php
================================================
<?php
/**
* admin/adm_log_main.php
*
* @version 2.0 - full rewrote
* @copyright 2014 by Gorlum for http://supernova.ws
*
*/
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
if($delete = sys_get_param_id('delete'))
{
doquery("DELETE FROM `{{logs}}` WHERE `log_id` = {$delete} LIMIT 1;");
}
elseif(sys_get_param_str('delete_update_info'))
{
doquery("DELETE FROM `{{logs}}` WHERE `log_code` in (103, 180, 191);");
}
elseif(sys_get_param_str('deleteall') == 'yes')
{
// doquery("TRUNCATE TABLE `{{logs}}`");
}
/**
* @param $value
*
* @return string|null
*/
function admLogRender($value) {
if (is_array($value)) {
$result = '<table class="no_border_image var_in">';
foreach ($value as $key => $val) {
$result .= '<tr><td>' . $key . '</td><td>' . var_export($val, true) . '</td></tr>';
}
$result .= '</table>';
} else {
$result = var_export($value, true);
}
return $result;
}
if($detail = sys_get_param_id('detail'))
{
$template = SnTemplate::gettemplate('admin/adm_log_main_detail', true);
$errorInfo = doquery("SELECT * FROM `{{logs}}` WHERE `log_id` = {$detail} LIMIT 1;", true);
$error_dump = json_decode($errorInfo['log_dump'], true);
if(is_array($error_dump))
{
foreach ($error_dump as $key => $value)
{
// Parsing user options to readable state
if($key == 'user' ) {
if(!empty($value['options'])) {
$value['options'] = explode(USER_OPTIONS_SPLIT, $value['options']);
}
}
$val = $key == 'query_log' ? $value : admLogRender($value);
$template->assign_block_vars('vars', [
'VAR_NAME' => $key,
'VAR_VALUE' => $val,
]);
}
}
// Replacing LF with HTML <br /> tag for better readability
$errorInfo['log_text'] = str_replace("\n", '<br />', $errorInfo['log_text']);
$template->assign_vars($errorInfo);
}
else
{
$template = SnTemplate::gettemplate('admin/adm_log_main', true);
$i = 0;
$query = doquery("SELECT * FROM `{{logs}}` ORDER BY log_id DESC LIMIT 100;");
while($u = db_fetch($query))
{
$i++;
$v = [];
$u['log_text'] = str_replace("\n", "<br />", $u['log_text']);
foreach($u as $key => $value)
{
$v[strtoupper($key)] = $value;
}
$template->assign_block_vars('error', $v);
}
$query = doquery("SELECT COUNT(*) AS LOG_MESSAGES_TOTAL, {$i} AS LOG_MESSAGES_VISIBLE FROM `{{logs}}`;", true);
$template->assign_vars($query);
}
SnTemplate::display($template, $lang['adm_er_ttle']);
================================================
FILE: admin/adm_message_list.php
================================================
<?php
/**
* admin/adm_message_list.php
*
* @version 2
* @copyright 2014 by Gorlum for http://supernova.ws/
*
*/
define('INSIDE' , true);
define('INSTALL' , false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
$template = SnTemplate::gettemplate('admin/adm_messagelist', true);
$int_type_selected = sys_get_param_int('int_type_selected', -1);
$allowed_types = array(
-1 => array(
'VALUE' => -1,
'TEXT' => $lang['adm_pay_filter_all']
),
);
$template->assign_block_vars('int_type_selected', $allowed_types[-1]);
foreach($sn_message_class_list as $key => $value)
{
if($key == MSG_TYPE_NEW || $key == MSG_TYPE_OUTBOX)
{
continue;
}
$template->assign_block_vars('int_type_selected', $allowed_types[$key] = array(
'VALUE' => $key,
'TEXT' => $lang['msg_class'][$key],
));
}
$message_delete = sys_get_param_id('msg_del');
if(sys_get_param('str_delete_selected') && is_array($message_delete = sys_get_param('selected')) && !empty($message_delete))
{
$message_delete = implode(', ', $message_delete);
}
if($message_delete)
{
doquery("DELETE FROM {{messages}} WHERE `message_id` in ({$message_delete});");
$template->assign_block_vars('result', array('MESSAGE' => sprintf($lang['mlst_messages_deleted'], $message_delete)));
}
if(sys_get_param('str_delete_date') && checkdate($month = sys_get_param_id('delete_month'), $day = sys_get_param_id('delete_day'), $year = sys_get_param_id('delete_year')))
{
$delete_date = "{$year}-{$month}-{$day}";
doquery("DELETE FROM {{messages}} WHERE message_time <= UNIX_TIMESTAMP('{$delete_date}')" . ($int_type_selected >= 0 ? " AND `message_type` = {$int_type_selected}" : ''));
$template->assign_block_vars('result', array('MESSAGE' => sprintf($lang['mlst_messages_deleted_date'], $allowed_types[$int_type_selected]['TEXT'], $delete_date)));
}
$page_max = doquery('SELECT COUNT(*) AS `max` FROM `{{messages}}`' . ($int_type_selected >= 0 ? " WHERE `message_type` = {$int_type_selected};" : ''), true);
$page_max = ceil($page_max['max'] / 25);
$int_page_current = min(sys_get_param_id('int_page_current', 1), $page_max);
if(sys_get_param('page_prev') && $int_page_current > 1)
{
$int_page_current--;
}
elseif(sys_get_param('page_next') && $int_page_current < $page_max)
{
$int_page_current++;
}
for($i = 1; $i <= $page_max; $i++)
{
$template->assign_block_vars('page', array('NUMBER' => $i));
}
$StartRec = ($int_page_current - 1) * 25;
$Messages = db_message_list_admin_by_type($int_type_selected, $StartRec);
while($row = db_fetch($Messages))
{
$row['FROM'] = htmlentities($row['FROM'], ENT_COMPAT, 'UTF-8');
$row['OWNER_NAME'] = htmlentities($row['OWNER_NAME'], ENT_COMPAT, 'UTF-8');
$row['TEXT'] = nl2br($row['TEXT']);
$template->assign_block_vars('message', $row);
}
$template->assign_vars(array(
'PAGE_MAX' => $page_max,
'PAGE_CURRENT' => $int_page_current,
'TYPE_SELECTED' => $int_type_selected,
));
SnTemplate::display($template, $lang['mlst_title']);
================================================
FILE: admin/adm_metamatter.php
================================================
<?php
/**
* adm_meta_matter.php
*
* Adjust Meta Matter quantity
*
* @version 2.0 (c) copyright 2013-2017 by Gorlum for http://supernova.ws
*
*/
use Common\Exceptions\ExceptionSnLocalized;
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
if(!SN::$gc->modules->countModulesInGroup('payment')) {
sys_redirect(SN_ROOT_VIRTUAL . 'admin/overview.php');
}
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
/**
* @param classLocale $lang
* @param array $user
* @param string $accountIdOrName_unsafe
* @param string $playerIdOrName_unsafe
* @param float $points
* @param string $reason_unsafe
* @param bool $confirmed
*
* @throws ExceptionSnLocalized
*/
function admin_meta_matter_model($lang, $user, $accountIdOrName_unsafe, $playerIdOrName_unsafe, $points, $reason_unsafe, $confirmed) {
// If no points and no username - nothing to do
if (!$points && !$playerIdOrName_unsafe && !$accountIdOrName_unsafe) {
return;
}
if (!$points) {
throw new ExceptionSnLocalized('adm_mm_err_points_empty', ERR_ERROR);
}
$account = new Account(SN::$auth->account->db);
if (!empty($accountIdOrName_unsafe)) {
if (
!$account->db_get_by_id($accountIdOrName_unsafe)
&&
!$account->db_get_by_name($accountIdOrName_unsafe)
&&
!$account->db_get_by_email($accountIdOrName_unsafe)
) {
throw new ExceptionSnLocalized('adm_mm_err_account_not_found', ERR_ERROR);
}
} elseif (!empty($playerIdOrName_unsafe)) {
$row = dbPlayerByIdOrName($playerIdOrName_unsafe);
if (empty($row['id'])) {
throw new ExceptionSnLocalized('adm_mm_err_player_not_found', ERR_ERROR, null, array($playerIdOrName_unsafe));
}
if (!$account->dbGetByPlayerId($row['id'])) {
throw new ExceptionSnLocalized('adm_mm_err_player_no_account', ERR_ERROR, null, array($playerIdOrName_unsafe));
}
} else {
throw new ExceptionSnLocalized('adm_mm_err_account_and_player_empty', ERR_ERROR);
}
$sprintfPayload = array(
$account->account_name,
$account->account_id,
HelperString::numberFloorAndFormat($points),
!empty($row['id']) ? $row['id'] : 0,
!empty($row['username']) ? $row['username'] : ''
);
if ($confirmed) {
if (empty($account->metamatter_change(
RPG_ADMIN,
$points,
sprintf(
$lang['adm_mm_msg_change_mm_log_record'],
$account->account_id,
$account->account_name,
$user['id'],
$user['username'],
$reason_unsafe,
core_auth::$main_provider->account->account_id,
core_auth::$main_provider->account->account_name,
!empty($row['id']) ? $row['id'] : 0,
!empty($row['username']) ? $row['username'] : ''
)
))) {
throw new ExceptionSnLocalized($lang['adm_mm_err_mm_change_failed'], ERR_ERROR);
}
throw new ExceptionSnLocalized('adm_mm_msg_mm_changed', ERR_NONE, null, $sprintfPayload);
} else {
throw new ExceptionSnLocalized('adm_mm_msg_confirm_mm_change', ERR_WARNING, null, $sprintfPayload);
}
}
/**
* @param array $user
* @param classLocale $lang
*/
function admin_meta_matter_view($user, $lang) {
$accountIdOrName_unsafe = sys_get_param_str_unsafe('accountId');
$playerIdOrName_unsafe = sys_get_param_str_unsafe('playerId');
$points = sys_get_param_float('points');
$reason_unsafe = sys_get_param_str_unsafe('reason');
$confirmed = sys_get_param('confirm_mm_change');
$confirmed = !empty($confirmed); // can't use empty() or isset() with function result in PHP 5.3
$template = SnTemplate::gettemplate("admin/adm_metamatter", true);
try {
admin_meta_matter_model($lang, $user, $accountIdOrName_unsafe, $playerIdOrName_unsafe, $points, $reason_unsafe, $confirmed);
} catch (ExceptionSnLocalized $e) {
$template->assign_block_vars('result', array(
'MESSAGE' => $e->getMessageLocalized(),
'STATUS' => $e->getCode() ? $e->getCode() : ERR_NONE,
));
if ($e->getCode() != ERR_NONE) {
$template->assign_vars(array(
'ACCOUNT_ID' => sys_safe_output($accountIdOrName_unsafe),
'PLAYER_ID' => sys_safe_output($playerIdOrName_unsafe),
'POINTS' => $points,
'REASON' => sys_safe_output($reason_unsafe),
));
};
if ($e->getCode() == ERR_WARNING) {
$template->assign_vars(array(
'NEED_CONFIRMATION' => 1,
));
}
}
SnTemplate::display($template, $lang['adm_dm_title']);
}
global $user, $lang;
admin_meta_matter_view($user, $lang);
================================================
FILE: admin/adm_planet_list.php
================================================
<?php
define('INSIDE' , true);
define('INSTALL' , false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $config, $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
$planet_active = sys_get_param_int('planet_active');
if(!$planet_active) {
$planet_type = sys_get_param_int('planet_type', 1);
$planet_type = $planet_type == 3 ? 3 : 1;
} else {
$active_time = SN_TIME_NOW - SN::$config->game_users_online_timeout;
}
$table_parent_columns = $planet_type == 3 || $planet_active;
$template = SnTemplate::gettemplate('admin/adm_planet_list', true);
$query = db_planet_list_admin_list($table_parent_columns, $planet_active, $active_time, $planet_type);
while ($planet_row = db_fetch($query)) {
$template->assign_block_vars('planet', array(
'ID' => $planet_row['id'],
'NAME' => js_safe_string($planet_row['name']),
'GALAXY' => $planet_row['galaxy'],
'SYSTEM' => $planet_row['system'],
'PLANET' => $planet_row['planet'],
'PLANET_TYPE' => $planet_row['planet_type'],
'PLANET_TYPE_PRINT' => $lang['sys_planet_type_sh'][$planet_row['planet_type']],
'PARENT_ID' => js_safe_string($planet_row['parent_planet']),
'PARENT_NAME' => js_safe_string($planet_row['parent_name']),
'OWNER' => js_safe_string($planet_row['username']),
'OWNER_ID' => $planet_row['id_owner'],
));
}
$page_title =
$lang['adm_planet_list_title'] . ': ' .
($planet_active ? $lang['adm_planet_active'] :
($planet_type ? ($planet_type == 3 ? $lang['sys_moons'] : $lang['sys_planets']) : '')
);
$template->assign_vars(array(
'PAGE_TITLE' => $page_title,
'PLANET_COUNT' => SN::$db->db_num_rows($query),
'PARENT_COLUMN' => $table_parent_columns,
));
SnTemplate::display($template, $page_title);
================================================
FILE: admin/adm_quest.php
================================================
<?php
/**
* quest.php
*
* @v1 (c) copyright 2011 by Gorlum for http://supernova.ws
*
*/
define('INSIDE' , true);
define('INSTALL' , false);
define('IN_ADMIN' , true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_OPERATOR);
roughQuestRenderWrapper();
================================================
FILE: admin/adm_user_analyze.php
================================================
<?php
/**
* adm_payment.php
*
* @version 1.0
* @copyright 2013 by Gorlum for http://supernova.ws
*/
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
// define('SESSION_INTERRUPT', 15*60); // Можно увеличить до 4 часов - никито не может сидеть 2 суток с перерывом менее 4 часов
// define('SUSPICIOUS_LONG', 2 * 60*60); // Тогда это увеличиваем до, скажем суток - и там смотрим
define('SESSION_INTERRUPT', 1 * 60*60); // Можно увеличить до 4 часов - никито не может сидеть 2 суток с перерывом менее 4 часов
define('SUSPICIOUS_LONG', 16 * 60*60); // Тогда это увеличиваем до, скажем суток - и там смотрим
function check_suspicious(&$session, &$session_list_last_id, &$row) {
$session[2] = $session[1] - $session[0];
if($session[2] > SUSPICIOUS_LONG)
{
$session[2] = pretty_time($session[2]);
$session[0] = date(FMT_DATE_TIME_SQL, $session[0]);
$session[1] = date(FMT_DATE_TIME_SQL, $session[1]);
$session_list_last_id[] = $session;
}
//$row ?
$session = array(
// 0 => $row['time'], // start
// 1 => $row['time'], // end
0 => $row['visit_time'], // start
1 => $row['visit_time'], // end
)
//: false
;
}
$session_list = array();
$query = doquery("SELECT `visit_time`, user_id FROM {{counter}} where user_id <> 0 and visit_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 7 DAY)) order by user_id, visit_time;");
$session = array();
if($row = db_fetch($query)) {
$session = array(
0 => strtotime($row['visit_time']), // start
1 => strtotime($row['visit_time']), // end
);
$last_id = $row['user_id'];
}
while($row = db_fetch($query)) {
$row['visit_time'] = strtotime($row['visit_time']);
if($last_id == $row['user_id']) {
// Тот же юзер
if($row['visit_time'] - $session[1] <= SESSION_INTERRUPT) { // Та же сессия
$session[1] = $row['visit_time'];
} else {
// Новая сессия
// check_suspicious($session, $session_list[$last_id], $row);
$session[2] = $session[1] - $session[0];
if($session[2] > SUSPICIOUS_LONG)
{
$session[2] = pretty_time($session[2]);
$session[0] = date(FMT_DATE_TIME_SQL, $session[0]);
$session[1] = date(FMT_DATE_TIME_SQL, $session[1]);
$session_list[$last_id][] = $session;
}
$session = array(
0 => $row['visit_time'], // start
1 => $row['visit_time'], // end
);
}
} else {
// check_suspicious($session, $session_list[$last_id], $row);
$session[2] = $session[1] - $session[0];
if($session[2] > SUSPICIOUS_LONG)
{
$session[2] = pretty_time($session[2]);
$session[0] = date(FMT_DATE_TIME_SQL, $session[0]);
$session[1] = date(FMT_DATE_TIME_SQL, $session[1]);
$session_list[$last_id][] = $session;
}
$session = array(
0 => $row['visit_time'], // start
1 => $row['visit_time'], // end
);
$last_id = $row['user_id'];
}
}
if($last_id) {
// check_suspicious($session, $session_list[$last_id], $row = array('time' => 0));
$session[2] = $session[1] - $session[0];
if($session[2] > SUSPICIOUS_LONG)
{
$session[2] = pretty_time($session[2]);
$session[0] = date(FMT_DATE_TIME_SQL, $session[0]);
$session[1] = date(FMT_DATE_TIME_SQL, $session[1]);
$session_list[$last_id][] = $session;
}
}
print("<table border='1'>");
print("<tr>");
print("<td>ID</td><td>Username</td><td>Start</td><td>End</td><td>Length</td>");
print("<td>Last online</td>");
print("</tr>");
foreach($session_list as $user_id => $value) {
$user_record = doquery("SELECT `username`, onlinetime FROM {{users}} WHERE id = {$user_id};", true);
foreach($value as $interval_data) {
print("<tr>");
print("<td>{$user_id}</td><td>{$user_record['username']}</td><td>{$interval_data[0]}</td><td>{$interval_data[1]}</td><td>{$interval_data[2]}</td>");
print("<td>" . date(FMT_DATE_TIME_SQL, $user_record['onlinetime']) . "</td>");
print("</tr>");
}
}
print("</table>");
================================================
FILE: admin/adm_user_stat.php
================================================
<?php
/**
* adm_payment.php
*
* @version 1.0
* @copyright 2013 by Gorlum for http://supernova.ws
*/
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
function admin_date_sort($a, $b)
{
return $a['DATE'] == $b['DATE'] ? 0 : ($a['DATE'] > $b['DATE'] ? 1 : -1);
}
if($user['authlevel'] < 3)
{
AdminMessage($lang['adm_err_denied']);
}
$template = SnTemplate::gettemplate('admin/adm_user_stat', true);
$dt_from = sys_get_param_date_sql('dt_from', '2000-01-01');
if(strlen($dt_from) == 4)
{
$dt_from .= '-01';
}
$dt_to = sys_get_param_date_sql('dt_to', date('Y-m-d', SN_TIME_NOW + PERIOD_DAY));
if(strlen($dt_to) == 4)
{
$dt_to .= '-01';
}
$sql_date =
($dt_from ? " AND register_time >= UNIX_TIMESTAMP(STR_TO_DATE('{$dt_from}', '%Y-%m-%d %H:%i:%s')) " : '') .
($dt_to ? " AND register_time < UNIX_TIMESTAMP(STR_TO_DATE('{$dt_to}', '%Y-%m-%d %H:%i:%s')) " : '');
$min_max_dates = doquery($q = "SELECT min(register_time) AS min_register, max(register_time) AS max_register, avg(onlinetime - register_time) AS avg_play_time, STR_TO_DATE('{$dt_to}', '%Y-%m-%d %H:%i:%s') FROM {{users}} WHERE 1 " . $sql_date, true);
$interval = $min_max_dates['max_register'] - $min_max_dates['min_register'];
switch(true)
{
case $interval >= PERIOD_YEAR * 4:
$sql_group_format = "%Y";
$sql_date_add = 'year';
break;
case $interval > PERIOD_DAY * 32:
$sql_group_format = "%Y-%m";
$sql_date_add = 'month';
break;
case $interval > PERIOD_DAY:
$sql_group_format = "%Y-%m-%d";
$sql_date_add = 'day';
break;
default:
$sql_group_format = "%Y-%m-%d %H:00:00";
$sql_date_add = 'hour';
$stop_next = true;
break;
}
$stat_date = array();
$max_registered = 0;
$max_accounts = 0;
$sql_group_by2 = "DATE_FORMAT(account_register_time, '{$sql_group_format}')";
$sql_date2 =
($dt_from ? " AND account_register_time >= (STR_TO_DATE('{$dt_from}', '%Y-%m-%d %H:%i:%s')) " : '') .
($dt_to ? " AND account_register_time < (STR_TO_DATE('{$dt_to}', '%Y-%m-%d %H:%i:%s')) " : '');
$query = doquery(
"SELECT
count(*) AS the_count,
DATE_FORMAT(account_register_time, '{$sql_group_format}') AS the_date,
DATE_FORMAT(account_register_time, '%a') AS DoW,
DATE_FORMAT(DATE_ADD(account_register_time, INTERVAL 1 {$sql_date_add}), '{$sql_group_format}') AS date_next
FROM {{account}} WHERE 1 " . $sql_date2 . " GROUP BY {$sql_group_by2}");
while($row = db_fetch($query))
{
$stat_date[$row['the_date']] = array(
'DATE' => $row['the_date'],
'DOW' => $row['DoW'],
'DATE_URL' => urlencode($row['the_date']),
'DATE_NEXT_URL' => urlencode($row['date_next']),
'ACCOUNTS' => $row['the_count'],
);
$max_accounts = max($max_accounts, $row['the_count']);
}
$sql_group_by = "DATE_FORMAT(FROM_UNIXTIME(register_time), '{$sql_group_format}')";
$query = doquery("SELECT count(*) AS the_count, {$sql_group_by} AS the_date, DATE_FORMAT(DATE_ADD(FROM_UNIXTIME(register_time), INTERVAL 1 {$sql_date_add}), '{$sql_group_format}') AS date_next
FROM {{users}} WHERE user_as_ally IS NULL " . $sql_date . " GROUP BY {$sql_group_by}");
while($row = db_fetch($query))
{
$stat_date[$row['the_date']]['REGISTERED'] = $row['the_count'];
$max_registered = max($max_registered, $row['the_count']);
}
$query = doquery("SELECT count(*) AS the_count, {$sql_group_by} AS the_date FROM {{users}} WHERE user_as_ally IS NULL " .
" AND onlinetime <= register_time + " . PERIOD_DAY .
' AND UNIX_TIMESTAMP(NOW()) >= register_time + ' . PERIOD_DAY .
$sql_date . " GROUP BY {$sql_group_by}");
while($row = db_fetch($query))
{
$stat_date[$row['the_date']]['REJECTED'] = $row['the_count'];
}
$query = doquery("SELECT count(*) AS the_count, {$sql_group_by} AS the_date FROM {{users}} WHERE user_as_ally IS NULL " .
" AND onlinetime > register_time + " . PERIOD_DAY .
' AND onlinetime <= register_time + ' . PERIOD_WEEK .
' AND UNIX_TIMESTAMP(NOW()) >= register_time + ' . PERIOD_WEEK .
$sql_date . " GROUP BY {$sql_group_by}");
while($row = db_fetch($query))
{
$stat_date[$row['the_date']]['LEAVED'] = $row['the_count'];
}
$query = doquery("SELECT count(*) AS the_count, {$sql_group_by} AS the_date FROM {{users}} WHERE user_as_ally IS NULL " .
' AND UNIX_TIMESTAMP(NOW()) - onlinetime <= ' . PERIOD_DAY .
' AND UNIX_TIMESTAMP(NOW()) - register_time >= ' . PERIOD_DAY .
$sql_date . " GROUP BY {$sql_group_by}");
while($row = db_fetch($query))
{
$stat_date[$row['the_date']]['ACTIVE'] = $row['the_count'];
}
$query = doquery("SELECT count(*) AS the_count, {$sql_group_by} AS the_date FROM {{users}} WHERE user_as_ally IS NULL " .
' AND UNIX_TIMESTAMP(NOW()) - onlinetime > ' . PERIOD_DAY .
' AND UNIX_TIMESTAMP(NOW()) - onlinetime <= ' . PERIOD_WEEK .
' AND UNIX_TIMESTAMP(NOW()) - register_time >= ' . PERIOD_WEEK .
$sql_date . " GROUP BY {$sql_group_by}");
while($row = db_fetch($query))
{
$stat_date[$row['the_date']]['DORMANT'] = $row['the_count'];
}
uasort($stat_date, 'admin_date_sort');
$total = array();
foreach($stat_date as $key => &$value)
{
$value['TOTAL'] = $value['REJECTED'] + $value['LEAVED'];
$value['LEAVED_PERCENT'] = $value['REGISTERED'] ? round($value['TOTAL'] / $value['REGISTERED'] * 100) : 0;
$value['ACTIVE_PERCENT'] = $value['REGISTERED'] ? round($value['ACTIVE'] / $value['REGISTERED'] * 100) : 0;
$value['DORMANT_PERCENT'] = $value['REGISTERED'] ? round($value['DORMANT'] / $value['REGISTERED'] * 100) : 0;
foreach($value as $key2 => $value2)
{
$total[$key2] += $value2;
}
$value['REGISTERED_PERCENT'] = ceil($max_registered ? $value['REGISTERED'] * 100 / $max_registered : 0);
$template->assign_block_vars('stats', $value);
}
$total['DATE'] = 'Всего';
$total['TH'] = 1;
$total['LEAVED_PERCENT'] = count($stat_date) ? round($total['TOTAL'] / $total['REGISTERED'] * 100) : 0;
$total['ACTIVE_PERCENT'] = count($stat_date) ? round($total['ACTIVE'] / $total['REGISTERED'] * 100) : 0;
$total['DORMANT_PERCENT'] = count($stat_date) ? round($total['DORMANT'] / $total['REGISTERED'] * 100) : 0;
$template->assign_block_vars('stats', $total);
$template->assign_vars(array(
'AVG_PLAY_TIME' => round($min_max_dates['avg_play_time'] / PERIOD_DAY, 2),
'STOP_NEXT' => intval($stop_next),
'INTERVAL' => $sql_date_add,
));
SnTemplate::display($template, $lang['adm_user_stat'], false, '', true);
================================================
FILE: admin/admin_analyze_matter.php
================================================
<?php
/**
* Created by Gorlum 18.02.2017 19:37
*/
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
$constants = get_defined_constants(true);
$rpgConstants = array();
foreach($constants['user'] as $constantName => $constantValue) {
if(substr($constantName, 0, 4) == 'RPG_') {
$rpgConstants[$constantValue] = $constantName;
}
}
$spent = array();
$result = SN::$db->doquery(
"SELECT
CONCAT(log_dark_matter_reason, '_', IF(sign(sum(log_dark_matter_amount)) > 0, 1, -1)) as `BALANCE`,
log_dark_matter_reason as `REASON`,
sum(log_dark_matter_amount) as `DM_AMOUNT`,
count(log_dark_matter_amount) as `DM_COUNT`,
sign(sum(log_dark_matter_amount)) as `SIGN`
FROM `{{log_dark_matter}}`
GROUP BY log_dark_matter_reason, IF(sign((log_dark_matter_amount)) > 0, 1, -1) ORDER BY sum(log_dark_matter_amount) DESC;"
);
while($row = SN::$db->db_fetch($result)) {
$row['CONSTANT'] = $rpgConstants[$row['REASON']];
$row['DM_AMOUNT_TEXT'] = HelperString::numberFloorAndFormat($row['DM_AMOUNT']);
// $row['TOTAL_AMOUNT'] = $row['DM_AMOUNT'];
// $row['TOTAL_COUNT'] = $row['DM_COUNT'];
// $row['TOTAL_AMOUNT_TEXT'] = pretty_number($row['TOTAL_AMOUNT']);
$spent[$row['BALANCE']] = $row;
}
$result = SN::$db->doquery(
"SELECT
CONCAT(reason, '_', IF(sign(sum(amount)) > 0, 1, -1)) as `BALANCE`,
reason as `REASON`,
sum(amount) as `MM_AMOUNT`,
count(amount) as `MM_COUNT`,
sign(sum(amount)) as `SIGN`
FROM `{{log_metamatter}}`
GROUP BY reason, if(sign((amount)) > 0, 1, -1) ORDER BY sum(amount) DESC;"
);
while($row = SN::$db->db_fetch($result)) {
if(empty($spent[$row['BALANCE']])) {
$spent[$row['BALANCE']] = array();
}
$row['CONSTANT'] = $rpgConstants[$row['REASON']];
$row['MM_AMOUNT_TEXT'] = HelperString::numberFloorAndFormat($row['MM_AMOUNT']);
$spent[$row['BALANCE']] = array_merge_recursive_numeric($spent[$row['BALANCE']], $row);
}
foreach($spent as &$row) {
@$row['TOTAL_COUNT'] = $row['MM_COUNT'] + $row['DM_COUNT'];
@$row['TOTAL_AMOUNT'] = $row['MM_AMOUNT'] + $row['DM_AMOUNT'];
@$row['TOTAL_AMOUNT_TEXT'] = HelperString::numberFloorAndFormat($row['TOTAL_AMOUNT']);
@$row['TOTAL_COUNT_TEXT'] = HelperString::numberFloorAndFormat($row['TOTAL_COUNT']);
}
usort($spent, function ($a, $b) {
return $a['TOTAL_AMOUNT'] < $b['TOTAL_AMOUNT'] ? -1 :
($a['TOTAL_AMOUNT'] > $b['TOTAL_AMOUNT'] ? 1 : 0);
});
$template = SnTemplate::gettemplate("admin/admin_analyze_matter", true);
foreach ($spent as $row) {
$template->assign_block_vars('spent', $row);
}
$fromDate = SN::$db->doQueryAndFetch("SELECT min(log_dark_matter_timestamp) FROM `{{log_dark_matter}}`;");
$template->assign_var("MIN_DATE", reset($fromDate));
SnTemplate::display($template, '{Анализ расхода и прихода материи}');
================================================
FILE: admin/admin_chat.php
================================================
<?php
/**
* Project "SuperNova.WS" copyright (c) 2009-2017 Gorlum
* @version #45d0#
**/
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
global $user, $lang;
$delete = sys_get_param_str('delete');
$deleteall = sys_get_param_str('deleteall');
if ($delete) {
doquery("DELETE FROM `{{chat}}` WHERE `messageid` = {$delete};");
} elseif ($deleteall == 'yes') {
doquery("DELETE FROM `{{chat}}`;");
}
$template = SnTemplate::gettemplate('admin/admin_chat', true);
$query = doquery("SELECT * FROM `{{chat}}` ORDER BY `messageid` DESC LIMIT 25;");
while ($e = db_fetch($query)) {
$template->assign_block_vars('message', array(
'ID' => $e['messageid'],
'TIMESTAMP' => str_replace(' ', ' ', date(FMT_DATE_TIME, $e['timestamp'])),
'PLAYER_NAME' => $e['user'],
'MESSAGE' => nl2br($e['message']),
));
}
$template->assign_vars(array(
'PAGE_HEADER' => $lang['adm_ch_ttle'],
'msg_num' => SN::$gc->db->db_num_rows($query),
));
SnTemplate::display($template);
================================================
FILE: admin/admin_darkmatter.php
================================================
<?php
/**
* admin_darkmatter.php
*
* Adjust Dark Matter quantity
*
* @version 2.0 (c) copyright 2010-2017 by Gorlum for http://supernova.ws/
*
*/
use Common\Exceptions\ExceptionSnLocalized;
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
/**
* @param $lang
* @param $user
*
* @throws ExceptionSnLocalized
*
*/
function admin_dark_matter_model($lang, $user) {
$points = sys_get_param_float('points');
$reason_unsafe = sys_get_param_str_unsafe('reason');
$playerIdOrName_unsafe = sys_get_param_str_unsafe('playerId');
// If no points and no username - nothing to do
if (!$points && !$playerIdOrName_unsafe) {
return;
}
if (!$points) {
throw new ExceptionSnLocalized('adm_dm_no_quant', ERR_ERROR);
}
if (empty($playerIdOrName_unsafe)) {
throw new ExceptionSnLocalized('adm_dm_no_dest', ERR_ERROR);
}
$row = dbPlayerByIdOrName($playerIdOrName_unsafe);
if (empty($row['id'])) {
throw new ExceptionSnLocalized('adm_dm_user_none', ERR_ERROR, null, array($playerIdOrName_unsafe));
}
// Does anything post to DB?
if (!rpg_points_change(
$row['id'],
RPG_ADMIN,
$points,
sprintf($lang['adm_matter_change_log_record'], $row['id'], $row['username'], $user['id'], $user['username'], $reason_unsafe)
)
) {
// No? We will say it to user...
throw new ExceptionSnLocalized('adm_dm_add_err', ERR_ERROR);
}
throw new ExceptionSnLocalized(
'adm_dm_user_added',
ERR_NONE,
null,
array($row['username'], $row['id'], HelperString::numberFloorAndFormat($points))
);
}
/**
* @param $template |null $template
*/
function admin_dark_matter_view($template = null) {
global $user, $lang;
$playerIdOrName_unsafe = sys_get_param_str_unsafe('playerId');
$points = sys_get_param_float('points');
$reason_unsafe = sys_get_param_str_unsafe('reason');
$template = SnTemplate::gettemplate("admin/admin_darkmatter", true);
try {
admin_dark_matter_model($lang, $user);
} catch (ExceptionSnLocalized $e) {
$template->assign_block_vars('result', array(
'MESSAGE' => $e->getMessageLocalized(),
'STATUS' => $e->getCode() ? $e->getCode() : ERR_NONE,
));
if ($e->getCode() != ERR_NONE) {
$template->assign_vars(array(
'PLAYER_ID' => sys_safe_output($playerIdOrName_unsafe),
'POINTS' => $points,
'REASON' => sys_safe_output($reason_unsafe),
));
};
}
SnTemplate::display($template, $lang['adm_dm_title']);
return $template;
}
admin_dark_matter_view();
================================================
FILE: admin/admin_locale.php
================================================
<?php
/**
* adm_locale.php
*
* @v1 (c) copyright 2011 by Gorlum for http://supernova.ws
*
*/
define('INSIDE' , true);
define('INSTALL' , false);
define('IN_ADMIN' , true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
function adm_lng_assign_string($lang_id, $locale_string_name, $value) {
global $locale_string_template, $languages_info, $languages, $domain;
if(is_array($value)) {
foreach($value as $sub_key => $sub_value) {
adm_lng_assign_string($lang_id, "{$locale_string_name}[{$sub_key}]", $sub_value);
}
} elseif($value) {
if(!isset($locale_string_template[$locale_string_name])) {
$locale_string_template[$locale_string_name] = array();
}
$locale_string_template[$locale_string_name] = array_merge($locale_string_template[$locale_string_name], array("[{$lang_id}]" => htmlentities($value, ENT_COMPAT, 'utf-8')));
}
}
function adm_lng_load($full_filename) {
// $lang_old = $lang;
// $lang = array();
require($full_filename);
// $lang_new = $lang;
// $lang = $lang_old;
// return $lang_new;
return $a_lang_array;
}
function adm_lng_parse_string($string_name, $string_value, $ident = ' ') {
global $domain, $lang_id;
$return = "{$ident}'{$string_name}' => ";
if(isset($string_value[$lang_id]) && !is_array($string_value[$lang_id])) {
$return .= "'" . str_replace(array("\\", "'"), array('\\\\', "\\'"), $string_value[$lang_id]) . "',";
} else {
$return .= "array(\r\n";
foreach($string_value as $arr_name => $arr_data) {
$return .= adm_lng_parse_string($arr_name, $arr_data, $ident . ' ');
}
$return .= "{$ident}),\r\n";
}
return $return . "\r\n";
}
$honor_constants = array(
'admin' => array(
'[adm_opt_ver_response]' => 'SNC_VER_',
'[adm_opt_ver_response_short]' => 'SNC_VER_',
),
'alliance' => array(
'[ali_dip_relations]' => 'ALLY_DIPLOMACY_',
),
'artifacts' => array(
'[art_moon_create]' => 'ART_',
),
'fleet' => array(
'[fl_attack_error]' => 'ATTACK_',
'[fl_shrtcup]' => 'PT_',
'[fl_planettype]' => 'PT_',
),
'infos' => array(
'[info]' => array('TECH_', 'MRC_', 'SHIP_', 'RES_', 'ART_', 'STRUC_'),
),
'market' => array(
'[eco_mrk_errors]' => 'MARKET_',
),
'quest' => array(
'[qst_status_list]' => 'QUEST_STATUS_',
),
'tech' => array(
'[type_mission]' => 'MT_',
'[tech]' => array('TECH_', 'MRC_', 'SHIP_', 'RES_', 'ART_', 'STRUC_'),
),
);
function adm_lng_write_string($string_name, $string_value, $ident = ' ', $string_name_prefix = '') {
global $lang_id, $file_handler, $constants, $honor_constants, $domain;
$string_name_new = false;
if(isset($honor_constants[$domain][$string_name_prefix])) {
$found_constants = array_keys($constants, $string_name);
foreach($found_constants as $constant_name) {
$honor_prefix_list = is_array($honor_constants[$domain][$string_name_prefix]) ? $honor_constants[$domain][$string_name_prefix] : array($honor_constants[$domain][$string_name_prefix]);
foreach($honor_prefix_list as $honor_prefix) {
if(strpos($constant_name, $honor_prefix) === 0) {
$string_name_new = $constant_name;
break;
}
}
}
}
$string_name_new = $string_name_new ? $string_name_new : "'{$string_name}'";
fwrite($file_handler, "{$ident}{$string_name_new} => ");
if(isset($string_value[$lang_id]) && !is_array($string_value[$lang_id])) {
fwrite($file_handler, "'" . str_replace(array("\\", "'"), array('\\\\', "\\'"), $string_value[$lang_id]) . "',");
// fwrite($file_handler, "'" . addslashes($string_value[$lang_id]) . "',");
} else {
$string_name_prefix = $string_name_prefix . "[{$string_name}]";
fwrite($file_handler, "array(\r\n");
foreach($string_value as $arr_name => $arr_data) {
adm_lng_write_string($arr_name, $arr_data, $ident . ' ', $string_name_prefix);
}
fwrite($file_handler, "{$ident}),\r\n");
}
fwrite($file_handler, "\r\n");
}
$template = SnTemplate::gettemplate('admin/admin_locale', true);
lng_include('system');
lng_include('tech');
lng_include('admin');
$languages = array();
$language_domains = array();
$languages_info = lng_get_list();
$domain = sys_get_param_str('domain');
if($domain) {
$lang_new = sys_get_param('lang_new');
if(!empty($lang_new) && is_array($lang_new)) {
$constants = get_defined_constants(true);
$constants = $constants['user'];
ksort($constants);
foreach($languages_info as $lang_id => $land_data) {
$file_handler = fopen(SN_ROOT_PHYSICAL . "language/{$lang_id}/{$domain}.mo.php.new", 'w');
fwrite($file_handler, "<?php\r\n\r\n/*\r\n#############################################################################
# Filename: {$domain}.mo.php
# Project: SuperNova.WS
# Website: http://www.supernova.ws
# Description: Massive Multiplayer Online Browser Space Strategy Game\r\n#\r\n");
foreach($land_data['LANG_COPYRIGHT'] as $lang_copyright) {
$lang_copyright = str_replace(array('©', '"', '<', '>'), array('©', '"', '<', '>'), $lang_copyright);
fwrite($file_handler, "# {$lang_copyright}\r\n");
}
fwrite($file_handler, "#############################################################################\r\n*/\r\n
/**\r\n*\r\n* @package language\r\n* @system [{$land_data['LANG_NAME_ENGLISH']}]\r\n* @version " . SN_VERSION . "\r\n*\r\n*/\r\n
/**\r\n* DO NOT CHANGE\r\n*/\r\n\r\nif (!defined('INSIDE')) die();\r\n
\$a_lang_array = array(\r\n");
foreach($lang_new as $string_name => $string_value) {
adm_lng_write_string($string_name, $string_value);
}
fwrite($file_handler, ");\r\n");
fclose($file_handler);
}
sys_redirect("admin_locale.php?domain={$domain}");
}
foreach($languages_info as $lang_id => $lang_data) {
$template->assign_block_vars('language', $lang_data);
$full_filename = SN_ROOT_PHYSICAL . "language/{$lang_id}/{$domain}.mo.php";
$languages[$lang_id] = adm_lng_load($full_filename . (file_exists($full_filename . '.new') ? '.new' : ''));
foreach($languages[$lang_id] as $locale_string_name => $cork) {
adm_lng_assign_string($lang_id, "[{$locale_string_name}]", $languages[$lang_id][$locale_string_name]);
}
}
foreach($locale_string_template as $locale_string_name => $locale_string_list) {
$template->assign_block_vars('string', array(
'NAME' => $locale_string_name,
));
foreach($languages_info as $lang_id => $cork2) {
$template->assign_block_vars('string.locale', array(
'LANG' => $lang_id,
'VALUE' => $locale_string_list["[{$lang_id}]"],
));
}
}
$template->assign_vars(array(
'DOMAIN' => $domain,
));
} else {
$path = SN_ROOT_PHYSICAL . "language/";
$dir = dir($path);
while (false !== ($lang_id = $dir->read())) {
$full_path = $path . $lang_id;
if($lang_id[0] != "." && is_dir($full_path)) {
$lang_file_list = dir($full_path);
while (false !== ($filename = $lang_file_list->read())) {
$lang_domain = strtolower(substr($filename, 0, strpos($filename, '.')));
if(!$lang_domain) {
continue;
}
$file_ext = strtolower(substr($filename, strpos($filename, '.')));
if($lang_domain != 'language') {
if($file_ext == '.mo.php.new' || ($file_ext == '.mo.php' && empty($languages[$lang_id][$lang_domain]))) {
$language_domains[$lang_domain] = $lang_domain;
$languages[$lang_id][$lang_domain] = $lang_domain;
}
}
}
}
}
$dir->close();
foreach($language_domains as $lang_domain) {
$template->assign_block_vars('domain', array(
'NAME' => $lang_domain,
));
}
}
SnTemplate::display($template, $lang['adm_lng_title']);
================================================
FILE: admin/admin_user_activity.php
================================================
<?php
/** @noinspection SqlResolve */
ini_set('memory_limit', '512M');
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
//messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
$userId = sys_get_param_id('id');
$template = SnTemplate::gettemplate('admin/admin_user_activity');
visualize($userId);
$template->assign_recursive($template_result);
SnTemplate::display($template, "Активность игрока [{$userId}] {$template_result['USER_NAME']}");
function visualize($userId) {
global $template_result;
$activityPeriod = PERIOD_HOUR * 1;
// $activityPeriod = PERIOD_MINUTE_10;
$userIdSafe = round(floatval($userId));
$iter = SN::$gc->db->selectIterator(
"SELECT c.visit_time, c.visit_length, c.counter_id
FROM `{{counter}}` as c
where
user_id={$userIdSafe}
AND visit_time > '2018-01-01'
order by visit_time desc;"
);
$user = SN::$db->doQueryAndFetch("SELECT `username` FROM `{{users}}` WHERE `id` = {$userIdSafe}");
$template_result += [
'RECORDS' => count($iter),
'USER_ID' => $userId,
'USER_NAME' => $user['username'],
];
if (!count($iter)) {
return;
}
$from = null;
$to = null;
$perHour = [];
foreach ($iter as $record) {
empty($to) ? $to = $record['visit_time'] : false;
$from = $record['visit_time'];
$time = strtotime($record['visit_time']);
$hourStart = floor($time / $activityPeriod) * $activityPeriod;
$length = $record['visit_length'];
$length == 0 ? $length = 1 : false;
do {
$leftOfThisHour = $hourStart + $activityPeriod - $time;
if ($length < $leftOfThisHour) {
$spendOnThisHour = $length;
$length = 0;
} else {
$spendOnThisHour = $leftOfThisHour;
$length -= $leftOfThisHour;
}
$perHour[$hourStart] += $spendOnThisHour;
$hourStart += $activityPeriod;
} while ($length > 0);
}
$template_result += [
'PERIOD' => $activityPeriod,
'DATE_FROM' => $from,
'DATE_TO' => $to,
];
ksort($perHour);
end($perHour);
$lastHour = key($perHour);
reset($perHour);
$firstHour = key($perHour);
$thisHour = $firstHour;
do {
if (empty($perHour[$thisHour])) {
$perHour[$thisHour] = 0;
}
$thisHour += $activityPeriod;
} while ($thisHour < $lastHour);
krsort($perHour);
end($perHour);
$lastHour = key($perHour);
$dayOpened = null;
$toTemplate = [];
foreach ($perHour as $hour => $length) {
$openDay = false;
$closeDay = false;
if (!$dayOpened) {
$openDay = true;
$dayOpened = 1;
}
if ($dayOpened && (date('H', $hour) == 0 || $hour == $lastHour)) {
$closeDay = true;
$dayOpened = 0;
}
$lengthPercent = $length / $activityPeriod * 100;
$toTemplate[] = [
'TIME' => date(FMT_TIME, $hour),
'LENGTH' => $length,
'LENGTH_PERCENT' => $lengthPercent > 100 ? 100 : $lengthPercent,
'MINUTES' => round($length / PERIOD_MINUTE, 1), // unused?
'TIME_CLASS' => $length ? 'present' : 'none',
'OPEN_DAY' => $openDay,
'CLOSE_DAY' => $closeDay,
'DATE' => date(FMT_DATE, $hour),
'DAY_CLASS' => in_array(date('w', $hour), [0, 6]) ? 'weekend' : '',
];
$template_result['.']['hourly'] = $toTemplate;
}
}
================================================
FILE: admin/ajax_maintenance.php
================================================
<?php /** @noinspection SqlResolve */
use DBAL\db_mysql;
define('IN_ADMIN', true);
require('../includes/init.' . substr(strrchr(__FILE__, '.'), 1));
global $user, $lang, $result;
/**
* @var array $user
*/
if(
($user['authlevel'] < 3)
&&
(empty($config->admin_http_key) || empty($_GET['admin_http_key']) || $_GET['admin_http_key'] != $config->admin_http_key)
)
{
SnTemplate::messageBox($lang['sys_noalloaw'], $lang['sys_noaccess']);
die();
}
// If we have already passed here through admin_http_key - then we can safely assume that it's admin
if(empty($user['authlevel'])) {
$user['authlevel'] = 3;
}
define('IN_AJAX', true);
lng_include('admin');
$totaltime = microtime(true);
$pack_until = date("Y-m-01 00:00:00", SN_TIME_NOW - PERIOD_MONTH * 3);
// [#] info_best_battles 1b0
$best_reports = array();
if(defined('MODULE_INFO_BEST_BATTLES_QUERY')) {
$query = doquery(MODULE_INFO_BEST_BATTLES_QUERY);
while($row = db_fetch($query)) {
$best_reports[] = $row['ube_report_id'];
}
}
$best_reports = !empty($best_reports) ? ' AND ube_report_id NOT IN (' . implode(',', $best_reports) . ')' : '';
$ques = array(
// 'DELETE {{users}}.* FROM {{users}} WHERE `user_as_ally` IS NULL and `onlinetime` < unix_timestamp(now()) - ( 60 * 60 * 24 * 45) and metamatter_total <= 0;',
// Выводим из отпуска игроков, которые находятся там более 4 недель
// 'UPDATE {{users}}
// SET vacation = 0, vacation_next = 0
// WHERE
// authlevel = 0 AND user_as_ally IS NULL AND user_bot = ' . USER_BOT_PLAYER . ' /* Не админы, Не Альянсы, Не боты */
// AND vacation > 0 AND banaday = 0 /* В отпуске и не в бане */
// AND vacation < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 4 WEEK)) /* Находящиеся в отпуске более 4 недель */;',
// // Игроки удаляются по Регламенту
// 'DELETE FROM `{{users}}` WHERE
// authlevel = 0 AND user_as_ally IS NULL AND user_bot = ' . USER_BOT_PLAYER . ' AND metamatter_total = 0 AND /* Не админы, Не Альянсы, Не боты, Не Бессмертные*/
// metamatter = 0 AND /* Нету ММ */
// vacation = 0 AND banaday = 0 AND /* Не в отпуске, Не в бане */
// (
// (onlinetime - register_time < 5 * 60 AND UNIX_TIMESTAMP() - onlinetime > 2*7 *86400)
// OR (onlinetime - register_time < 30 * 60 AND UNIX_TIMESTAMP() - onlinetime > 4*7 *86400)
// OR (onlinetime - register_time < 10 * 60*60 AND UNIX_TIMESTAMP() - onlinetime > 6*7 *86400)
// OR (UNIX_TIMESTAMP() - onlinetime > 8*7 *86400)
// );',
// Игроки, которые не были активны более 4 недель становятся I-шками. Для них
// Отключаем получение писем
// 'UPDATE {{users}}
// SET OPTIONS = ""
// WHERE
// authlevel = 0 AND user_as_ally IS NULL AND user_bot = ' . USER_BOT_PLAYER . ' AND vacation = 0 /* Не админы, Не Альянсы, Не боты, Не в отпуске */
// AND onlinetime < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 4 WEEK)) /* Не выходившие в онлайн более 4 недель */;',
// // Отключаем производство на планетах
// 'UPDATE {{users}} AS u
// JOIN {{planets}} AS p ON p.id_owner = u.id
// SET
// metal_perhour = 0,
// crystal_perhour = 0,
// deuterium_perhour = 0,
// metal_mine_porcent = 0,
// crystal_mine_porcent = 0,
// deuterium_sintetizer_porcent = 0,
// solar_plant_porcent = 0,
// fusion_plant_porcent = 0,
// solar_satelit_porcent = 0,
// ship_sattelite_sloth_porcent = 0
// WHERE
// authlevel = 0 AND user_as_ally IS NULL AND user_bot = ' . USER_BOT_PLAYER . ' AND vacation = 0 /* Не админы, Не Альянсы, Не боты, Не в отпуске */
// AND onlinetime < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 4 WEEK)) /* Не выходившие в онлайн более 4 недель */;',
// Удаляем все здания из очереди
// 'DELETE q FROM {{users}} AS u JOIN {{que}} AS q ON q.que_player_id = u.id
// WHERE
// authlevel = 0 AND user_as_ally IS NULL AND user_bot = ' . USER_BOT_PLAYER . ' AND vacation = 0 /* Не админы, Не Альянсы, Не боты, Не в отпуске */
// AND onlinetime < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 4 WEEK)) /* Не выходившие в онлайн более 4 недель */;',
// Возвращаем все флоты ???
// Пока не будем делать запрос - за 4 недели всяко все флоты должны вернутся...
// TODO I-шки - неделя на разграбление - или сколько там стата хранится...
// Удаляем планеты без пользователей
'DELETE FROM `{{planets}}` WHERE `id_owner` not in (select id from `{{users}}`) AND id_owner <> 0;', // TODO NO FK Переписать на джоине
// Удаляем юниты без планет
'DELETE un FROM `{{unit}}` AS un
LEFT JOIN `{{planets}}` AS pl ON pl.id = un.unit_location_id
WHERE unit_location_type = ' . LOC_PLANET . ' AND pl.id IS NULL;',
// Удаляем пустые юниты с 0 уровнем (кроме Капитана) - TODO - перенести в модуль, если нужно!
// 'DELETE FROM {{unit}} WHERE unit_location_type = ' . LOC_PLANET . ' AND unit_level = 0 AND unit_type <> ' . UNIT_CAPTAIN,
// Удаляем очереди на ничьих планетах
'DELETE q FROM `{{que}}` AS q
LEFT JOIN `{{planets}}` AS p ON p.id = q.que_planet_id
WHERE
que_type IN (' . QUE_STRUCTURES . ', ' . QUE_HANGAR . ', ' . SUBQUE_FLEET . ', ' . SUBQUE_DEFENSE . ')
AND
(p.id_owner = 0 OR p.id_owner IS NULL);',
// Удаляем пустые САБы
'DELETE FROM `{{aks}}` WHERE `id` NOT IN (SELECT DISTINCT `fleet_group` FROM `{{fleets}}`);', // TODO Переписать на джоине
// UBE reports
"DELETE FROM `{{ube_report}}` WHERE `ube_report_time_combat` < DATE_SUB(NOW(), INTERVAL 60 DAY) {$best_reports};", // TODO Настройка
// Чистка сообщений - ВРЕМЕННО ОТКЛЮЧЕНО
// 'DELETE FROM `{{messages}}` WHERE `message_owner` not in (select id from {{users}});', // TODO NO FK
// Удаляются сообщения, старше 4 недель, кроме личных и Альянсовских
'DELETE FROM `{{messages}}` WHERE
UNIX_TIMESTAMP() - message_time > 4*7 * 24 * 60 * 60 AND
message_type NOT IN (' . MSG_TYPE_PLAYER . ', ' . MSG_TYPE_ALLIANCE . ', ' . MSG_TYPE_ADMIN . ');',
// Удаляются сообщения у пользователей, которые неактивны больше 4 недель - кроме личных и Альянсовских
'DELETE m FROM `{{users}}` AS u
JOIN `{{messages}}` AS m ON m.message_owner = u.id
WHERE
message_type NOT IN (' . MSG_TYPE_PLAYER . ', ' . MSG_TYPE_ALLIANCE . ') AND
authlevel = 0 AND user_as_ally IS NULL AND /* Не админы, Не Альянсы */
UNIX_TIMESTAMP() - onlinetime > 4*7 *86400;',
'DELETE FROM `{{chat}}` WHERE timestamp < unix_timestamp(now()) - (60 * 60 * 24 * 14);',
// Recalculate Alliance members
"UPDATE `{{alliance}}` as a LEFT JOIN (SELECT ally_id, count(*) as ally_memeber_count FROM `{{users}}` WHERE ally_id IS NOT NULL GROUP BY ally_id) as u ON u.ally_id = a.id
SET a.`ally_members` = u.ally_memeber_count;",
// Deleting empty Alliances - ВРЕМЕННО ОТКЛЮЧЕНО
// 'DELETE FROM {{alliance}} WHERE id not in (select ally_id from {{users}} WHERE `user_as_ally` IS NOT NULL group by ally_id);',
// 'DELETE FROM {{alliance}} WHERE ally_members <= 0;',
"UPDATE `{{users}}` SET ally_id = null, ally_name = null, ally_tag = null, ally_register_time = 0, ally_rank_id = 0 WHERE ally_id not in (select id from `{{alliance}}`);",
// Пакуем данные по логу ТМ
array(
"INSERT INTO {{log_dark_matter}}
(log_dark_matter_timestamp, log_dark_matter_username, log_dark_matter_reason, log_dark_matter_amount,
log_dark_matter_comment, log_dark_matter_page, log_dark_matter_sender)
SELECT
'{$pack_until}', IF(u.username IS NULL, ldm.log_dark_matter_username, u.username), " . RPG_CUMULATIVE . ", sum(ldm.log_dark_matter_amount),
'Баланс на {$pack_until}', 'admin/ajax_maintenance.php', ldm.log_dark_matter_sender
FROM
{{log_dark_matter}} AS ldm
LEFT JOIN {{users}} AS u ON u.id = ldm.log_dark_matter_sender
WHERE
ldm.log_dark_matter_timestamp < '{$pack_until}'
GROUP BY
log_dark_matter_sender;",
"DELETE FROM `{{log_dark_matter}}` WHERE log_dark_matter_timestamp < '{$pack_until}';",
),
// Пакуем статистические данные по онлайну пользователей
array(
"REPLACE INTO `{{log_users_online}}`
(online_timestamp, online_count, online_aggregated)
SELECT
FROM_UNIXTIME((UNIX_TIMESTAMP(online_timestamp) DIV " . PERIOD_MINUTE_10 . ") * (" . PERIOD_MINUTE_10 . ")), ceil(avg(online_count)), " . LOG_ONLIINE_AGGREGATE_PERIOD_MINUTE_10 . "
FROM
`{{log_users_online}}`
WHERE
online_timestamp < '{$pack_until}' AND online_aggregated = " . LOG_ONLIINE_AGGREGATE_NONE . "
GROUP BY
(UNIX_TIMESTAMP(online_timestamp) DIV " . PERIOD_MINUTE_10 . ") * (" . PERIOD_MINUTE_10 . ");",
"DELETE FROM `{{log_users_online}}` WHERE online_timestamp < '{$pack_until}' AND online_aggregated = " . LOG_ONLIINE_AGGREGATE_NONE,
),
// Удаляем старые записи из логов
"DELETE FROM `{{logs}}` WHERE log_timestamp < '{$pack_until}';",
// Удаляем записи о маинтенансе, апдейте и пересчете статистики более чем недельной давности - они нам уже не нужны
'DELETE FROM `{{logs}}` WHERE
`log_code` IN (' . LOG_INFO_DB_CHANGE . ', ' . LOG_INFO_MAINTENANCE . ', ' . LOG_INFO_STAT_START . ', ' . LOG_INFO_STAT_PROCESS . ', ' . LOG_INFO_STAT_FINISH . ')
AND `log_timestamp` < DATE_SUB(NOW(),INTERVAL 7 DAY);',
// Удаляем вхождения игроков, на которые никто не ссылается
"DELETE spe FROM `{{security_player_entry}}` AS spe
LEFT JOIN `{{counter}}` AS c ON c.player_entry_id = spe.id
WHERE c.counter_id IS NULL;",
// Удаляем устройства, на которые никто не ссылается
"DELETE sd FROM `{{security_device}}` AS sd
LEFT JOIN `{{security_player_entry}}` AS spe ON spe.device_id = sd.device_id
WHERE spe.id IS NULL;",
// Удаляем браузеры, на которые никто не ссылается
"DELETE sb FROM `{{security_browser}}` AS sb
LEFT JOIN `{{security_player_entry}}` AS spe ON spe.browser_id = sb.browser_id
WHERE spe.id IS NULL;",
// Удаляем строки запросов, на которые никто не ссылается
"DELETE sqs FROM `{{security_query_strings}}` AS sqs
LEFT JOIN `{{counter}}` AS c ON c.query_string_id = sqs.id
WHERE c.counter_id IS NULL;",
// Удаляем УРЛы, на которые никто не ссылается
"DELETE su FROM `{{security_url}}` AS su
LEFT JOIN `{{counter}}` AS c ON c.page_url_id = su.url_id
WHERE c.counter_id IS NULL;",
// "INSERT INTO {{counter}} SET
// `page_url_id` = {$this->page_address_id},
// Удаляем записи визитов без пользователей
// 'DELETE FROM `{{counter}}` WHERE `user_id` NOT IN (SELECT `id` FROM `{{users}}`);',
);
function sn_maintenance_pack_user_list($user_list) {
$user_list = explode(',', $user_list);
foreach($user_list as $key => $user_id) {
if(!is_numeric($user_id)) {
unset($user_list[$key]);
}
}
$result = array();
if(!empty($user_list)) {
$query = doquery("SELECT `id` FROM `{{users}}` WHERE `id` in (" . implode(',', $user_list) . ")");
while($row = db_fetch($query)) {
$result[] = $row['id'];
}
}
return implode(',', $result);
}
global $config, $debug, $lang;
db_mysql::db_transaction_start();
$old_server_status = SN::$config->pass()->game_disable;
$old_server_status == GAME_DISABLE_NONE ? SN::$config->pass()->game_disable = GAME_DISABLE_MAINTENANCE : false;
db_mysql::db_transaction_commit();
foreach($ques as $que_transaction) {
db_mysql::db_transaction_start();
!is_array($que_transaction) ? $que_transaction = array($que_transaction) : false;
foreach($que_transaction as $que) {
set_time_limit(120);
$QryResult = doquery($que);
//$msg .= '<hr>' . $que . '<hr>';
$que = str_replace(array('{{', '}}'), '', $que);
//$que = str_replace('{{', '', $que);
//$que = str_replace('}}', '', $que);
$msg .=
'<li>' . htmlspecialchars($que) .
' --- <span style="' . ($QryResult ? 'ok">OK' : 'error">FAILED!') . '</span> ' .
SN::$db->db_affected_rows() . ' ' . $lang['adm_records'] .
"</li>";
$debug->warning($que . ' --- ' . ($QryResult ? 'OK' : 'FAILED!') . ' ' . SN::$db->db_affected_rows() . ' ' . $lang['adm_records'], 'System maintenance', LOG_INFO_MAINTENANCE);
}
db_mysql::db_transaction_commit();
}
db_mysql::db_transaction_start();
SN::$config->pass()->stats_hide_player_list = sn_maintenance_pack_user_list(SN::$config->pass()->stats_hide_player_list);
$debug->warning('Упакован stats_hide_player_list', 'System maintenance', LOG_INFO_MAINTENANCE);
db_mysql::db_transaction_commit();
db_mysql::db_transaction_start();
SN::$config->db_saveItem('game_watchlist', sn_maintenance_pack_user_list(SN::$config->pass()->game_watchlist));
$debug->warning('Упакован game_watchlist', 'System maintenance', LOG_INFO_MAINTENANCE);
db_mysql::db_transaction_commit();
SN::$config->db_saveItem('users_amount', db_user_count());
SN::$config->db_saveItem('game_disable', $old_server_status);
$_GET['admin_update'] = 1;
include_once('../scheduler.php');
$totaltime = microtime(true) - $totaltime;
$result = $result ? "<li>{$lang['adm_stat_title']} - {$result}</li>" : '';
$result = '<div align="left"><ul>' . $msg . $result . '</ul></div>';
echo json_encode($result . ' ' . $totaltime);
================================================
FILE: admin/banned.php
================================================
<?php
/**
* @copyright Copyright (c) 2009 by Gorlum for http://supernova.ws
*/
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_MODERATOR);
global $lang, $user;
$mode = sys_get_param_str('mode', 'banit');
$name_unsafe = sys_get_param_str_unsafe('name');
$name_output = sys_safe_output($name_unsafe);
$action = sys_get_param_str('action');
$player_banned_row = db_user_by_username($name_unsafe);
if ($mode == 'banit' && $action) {
if ($player_banned_row) {
$reas = $_POST['why'];
$days = $_POST['days'];
$hour = $_POST['hour'];
$mins = $_POST['mins'];
$secs = $_POST['secs'];
$BanTime = $days * 86400;
$BanTime += $hour * 3600;
$BanTime += $mins * 60;
$BanTime += $secs;
sys_admin_player_ban($user, $player_banned_row, $BanTime, $is_vacation = sys_get_param_int('isVacation'), sys_get_param_str('why'));
$DoneMessage = "{$lang['adm_bn_thpl']} {$name_output} {$lang['adm_bn_isbn']}";
if ($is_vacation) {
$DoneMessage .= $lang['adm_bn_vctn'];
}
$DoneMessage .= $lang['adm_bn_plnt'];
} else {
$DoneMessage = sprintf($lang['adm_bn_errr'], $name_output);
}
SnTemplate::messageBoxAdmin($DoneMessage, $lang['adm_ban_title']);
} elseif ($mode == 'unbanit' && $action) {
sys_admin_player_ban_unset($user, $player_banned_row, ($reason = sys_get_param_str('why')) ? $reason : $lang['sys_unbanned']);
$DoneMessage = $lang['adm_unbn_thpl'] . " " . $name_output . " " . $lang['adm_unbn_isbn'];
SnTemplate::messageBoxAdmin($DoneMessage, $lang['adm_unbn_ttle']);
};
$parsetemplate = SnTemplate::gettemplate("admin/admin_ban", true);
$parsetemplate->assign_vars(array(
'name' => $name_output,
'mode' => $mode,
));
SnTemplate::display($parsetemplate, $lang['adm_ban_title']);
================================================
FILE: admin/includes/admin_planet_edit.inc.php
================================================
<?php
function admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list){return sn_function_call('admin_planet_edit_mode', array(&$template, &$admin_planet_edit_mode_list));}
function sn_admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list)
{
global $lang;
$admin_planet_edit_mode_list = array_merge(isset($admin_planet_edit_mode_list) ? $admin_planet_edit_mode_list : array(), array(
'structures' => $lang['tech'][UNIT_STRUCTURES],
'fleet' => $lang['tech'][UNIT_SHIPS],
'defense' => $lang['tech'][UNIT_DEFENCE],
'resources_loot' => $lang['tech'][UNIT_RESOURCES],
));
$mode = sys_get_param_str('mode');
$admin_planet_edit_mode_list_keys = array_keys($admin_planet_edit_mode_list);
$mode = in_array($mode, $admin_planet_edit_mode_list_keys) ? $mode : $admin_planet_edit_mode_list_keys[0];
return $mode;
}
function admin_planet_edit_template(&$template, $edit_planet_row, $mode){return sn_function_call('admin_planet_edit_template', array(&$template, $edit_planet_row, $mode));}
/**
* @param template $template
* @param $edit_planet_row
* @param $mode
*/
function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode)
{
global $lang;
$unit_list = sn_get_groups($mode);
if(empty($unit_list))
{
return;
}
$name_list = $lang['tech'];
foreach($unit_list as $unit_id)
{
$template->assign_block_vars('unit', array(
'ID' => $unit_id,
'NAME' => $name_list[$unit_id],
'TEXT' => HelperString::numberFloorAndFormat(mrc_get_level($user, $edit_planet_row, $unit_id, false, true)),
'VALUE' => '',
));
}
}
function admin_planet_edit_query_string($unit_id, $unit_amount, $mode){return sn_function_call('admin_planet_edit_query_string', array($unit_id, $unit_amount, $mode));}
function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode)
{
if($unit_amount && in_array($unit_id, sn_get_groups($mode)))
{
$unit_amount = round($unit_amount);
$unit_name = get_unit_param($unit_id, P_NAME);
$result = "{$unit_name} = GREATEST(0, {$unit_name} + ({$unit_amount}))";
}
else
{
$result = '';
}
return $result;
}
================================================
FILE: admin/index.html
================================================
================================================
FILE: admin/maintenance.php
================================================
<?php
/**
* maintenance.php
*
* @version 1.0
* @copyright 2009 by Gorlum for http://oGame.Triolan.COM.UA
*/
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
$script = '
<script type="text/javascript">
$(document).ready(function() {
$.post("admin/ajax_maintenance.php", function(result) {
$("#admin_message").html(result);
}, "json" );
});
</script>';
SnTemplate::messageBoxAdmin($script . '<img src=design/images/progressbar.gif><br>' . $lang['sys_wait'], $lang['adm_maintenance_title']);
================================================
FILE: admin/overview.php
================================================
<?php
/**
*
* admin/overview.php
*
* @version 2.0 copyright (c) 2014 Gorlum for http://supernova.ws
*
*/
define('ADMIN_USER_OVERVIEW', true);
require_once('userlist.php');
================================================
FILE: admin/planet_compensate.php
================================================
<?php
use DBAL\db_mysql;
use Planet\DBStaticPlanet;
use Unit\DBStaticUnit;
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
$template = SnTemplate::gettemplate('admin/planet_compensate', true);
$galaxy_src = sys_get_param_int('galaxy_src');
$system_src = sys_get_param_int('system_src');
$planet_src = sys_get_param_int('planet_src');
$galaxy_dst = sys_get_param_int('galaxy_dst');
$system_dst = sys_get_param_int('system_dst');
$planet_dst = sys_get_param_int('planet_dst');
$bonus = sys_get_param_float('bonus', 1);
$username_unsafe = sys_get_param_str_unsafe('username');
$username = sys_get_param_escaped('username');
if ($galaxy_src) {
$errors = array();
$owner = db_user_by_username($username_unsafe, true);
$planet = DBStaticPlanet::db_planet_by_gspt($galaxy_src, $system_src, $planet_src, PT_PLANET);
if (empty($planet)) {
$errors[] = $lang['adm_pl_comp_err_0'];
}
if ($planet['destruyed']) {
$errors[] = $lang['adm_pl_comp_err_1'];
}
if (empty($username) || empty($owner) || $planet['id_owner'] != $owner['id']) {
$errors[] = $lang['adm_pl_comp_err_4'];
}
$destination = DBStaticPlanet::db_planet_by_gspt($galaxy_dst, $system_dst, $planet_dst, PT_PLANET);
if (empty($destination)) {
$errors[] = $lang['adm_pl_comp_err_2'];
}
if ($planet['id'] == $destination['id']) {
$errors[] = $lang['adm_pl_comp_err_5'];
}
if ($planet['id_owner'] != $destination['id_owner']) {
$errors[] = $lang['adm_pl_comp_err_3'];
}
$moon = DBStaticPlanet::db_planet_by_gspt($galaxy_src, $system_src, $planet_src, PT_MOON);
if (!empty($errors)) {
foreach ($errors as $error) {
$template->assign_block_vars('error', array(
'TEXT' => $error,
));
}
} else {
db_mysql::db_transaction_start();
SN::$gc->db->lockRecords([
'users' => [$owner['id'],],
'planets' => [$planet['id'], $destination['id'], !empty($moon['id']) ? $moon['id'] : 0],
]);
$planet = sys_o_get_updated($owner['id'], $planet['id'], SN_TIME_NOW);
$que = $planet['que'];
$planet = $planet['planet'];
$destination = sys_o_get_updated($owner['id'], $destination['id'], SN_TIME_NOW);
$destination = $destination['planet'];
$template->assign_var('CHECK', 1);
$final_cost = killer_add_planet($planet);
if (!empty($moon)) {
$moon = sys_o_get_updated($owner['id'], $moon['id'], SN_TIME_NOW);
$moon = $moon['planet'];
$final_cost = killer_add_planet($moon, $final_cost);
}
foreach (sn_get_groups('resources_loot') as $resource_id) {
$resource_name = pname_resource_name($resource_id);
$template->assign_var("{$resource_name}_cost", $final_cost[$resource_id]);
$final_cost[$resource_id] = floor($final_cost[$resource_id] * $bonus);
$template->assign_var("{$resource_name}_bonus", $final_cost[$resource_id]);
}
if ($_GET['btn_confirm']) {
$time = SN_TIME_NOW + PERIOD_DAY;
DBStaticUnit::db_unit_list_delete($planet['id_owner'], LOC_PLANET, $planet['id']);
DBStaticPlanet::db_planet_set_by_id($planet['id'], "id_owner = 0, destruyed = {$time}");
if (!empty($moon)) {
DBStaticUnit::db_unit_list_delete($planet['id_owner'], LOC_PLANET, $moon['id']);
DBStaticPlanet::db_planet_set_by_id($moon['id'], "id_owner = 0, destruyed = {$time}");
}
DBStaticPlanet::db_planet_set_by_id($destination['id'], "metal = metal + '{$final_cost[RES_METAL]}', crystal = crystal + '{$final_cost[RES_CRYSTAL]}', deuterium = deuterium + '{$final_cost[RES_DEUTERIUM]}'");
$template->assign_var('CHECK', 2);
}
db_mysql::db_transaction_commit();
}
}
$template->assign_vars(array(
'galaxy_src' => $galaxy_src,
'system_src' => $system_src,
'planet_src' => $planet_src,
'galaxy_dst' => $galaxy_dst,
'system_dst' => $system_dst,
'planet_dst' => $planet_dst,
'bonus' => $bonus,
'username' => $username,
));
SnTemplate::display($template, $lang['adm_pl_comp_title']);
/**
* @param array $planet
* @param array $final_cost
*
* @return array|mixed
*/
function killer_add_planet($planet, $final_cost = []) {
$sn_group_resources_loot = sn_get_groups('resources_loot');
// Adding structures cost
foreach (sn_get_groups('structures') as $unit_id) {
$build_level = mrc_get_level($user, $planet, $unit_id, true, true);
if ($build_level > 0) {
$unit_cost = get_unit_param($unit_id, 'cost');
$build_factor = $unit_cost['factor'] != 1 ? (1 - pow($unit_cost['factor'], $build_level)) / (1 - $unit_cost['factor']) : $unit_cost['factor'];
foreach ($sn_group_resources_loot as $resource_id) {
$final_cost[$resource_id] += isset($unit_cost[$resource_id]) && $unit_cost[$resource_id] > 0 ? floor($unit_cost[$resource_id] * $build_factor) : 0;
}
}
}
// Adding fleet and defense cost
foreach (sn_get_groups(array('defense', 'fleet')) as $unit_id) {
$unit_count = mrc_get_level($user, $planet, $unit_id, true, true);
if ($unit_count > 0) {
$unit_cost = get_unit_param($unit_id, 'cost');
foreach ($sn_group_resources_loot as $resource_id) {
$final_cost[$resource_id] += isset($unit_cost[$resource_id]) && $unit_cost[$resource_id] > 0 ? floor($unit_cost[$resource_id] * $unit_count) : 0;
}
}
}
// Adding plain resources
foreach ($sn_group_resources_loot as $resource_id) {
$final_cost[$resource_id] += floor(mrc_get_level($user, $planet, $resource_id, true, true));
}
return $final_cost;
}
================================================
FILE: admin/planet_edit.php
================================================
<?php
use Planet\DBStaticPlanet;
use Player\RecordPlayer;
use Unit\DBStaticUnit;
define('INSIDE', true);
define('INSTALL', false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
//messageBoxAdmin('Временно не работает');
require("includes/admin_planet_edit.inc" . DOT_PHP_EX);
$template = SnTemplate::gettemplate('admin/admin_planet_edit', true);
$mode = admin_planet_edit_mode($template, $admin_planet_edit_mode_list);
$planet_id = sys_get_param_id('planet_id');
$unit_list = sys_get_param('unit_list');
if (sys_get_param('change_data') && !empty($unit_list)) {
planet_edit_model($planet_id, $unit_list, $mode);
}
if ($planet_id) {
$edit_planet_row = DBStaticPlanet::db_planet_by_id($planet_id);
admin_planet_edit_template($template, $edit_planet_row, $mode);
}
foreach ($admin_planet_edit_mode_list as $page_mode => $mode_locale) {
$template->assign_block_vars('page_menu', array(
'ID' => $page_mode,
'TEXT' => $mode_locale,
));
}
$template->assign_vars(array(
'MODE' => $mode,
'PLANET_ID' => $planet_id,
'PLANET_NAME' => empty($edit_planet_row) ? '' : $lang['sys_planet_type'][$edit_planet_row['planet_type']] . ' ' . uni_render_planet($edit_planet_row),
'PAGE_HINT' => $lang['adm_planet_edit_hint'],
));
SnTemplate::display($template, $lang['adm_am_ttle']);
/**
* @param $planet_id
* @param array $unit_list
* @param $mode
*/
function planet_edit_model($planet_id, array $unit_list, $mode) {
$thePlanet = DBStaticPlanet::db_planet_by_id($planet_id);
$theUserId = $thePlanet['id_owner'];
$thePlayer = RecordPlayer::findRecordById($theUserId);
$query_string = [];
foreach ($unit_list as $unit_id => $unit_amount) {
if ($mode === 'resources_loot') {
if (!floatval($unit_amount)) {
continue;
}
if ($unit_query_string = admin_planet_edit_query_string($unit_id, $unit_amount, $mode)) {
$query_string[] = $unit_query_string;
}
} elseif (in_array($mode, [UNIT_SHIPS_STR, UNIT_STRUCTURES_STR, UNIT_DEFENCE_STR,]) ) {
if (!floatval($unit_amount)) {
continue;
}
$currentAmount = mrc_get_level($thePlayer, $thePlanet, $unit_id);
$newAmount = $currentAmount + $unit_amount;
if ($newAmount <= 0) {
DBStaticUnit::db_unit_list_delete($theUserId, LOC_PLANET, $planet_id, $unit_id);
} else {
DBStaticUnit::dbChangeUnit($theUserId, $planet_id, $unit_id, $unit_amount);
DBStaticUnit::cache_clear();
}
}
}
if (!empty($query_string)) {
DBStaticPlanet::db_planet_set_by_id($planet_id, implode(', ', $query_string));
}
}
================================================
FILE: admin/settings.php
================================================
<?php
/** @noinspection PhpDefineCanBeReplacedWithConstInspection */
/** @noinspection PhpRedundantOptionalArgumentInspection */
/**
* settings.php
*
* @version 2.0 Full rewrite copyright (c) Gorlum 2009-2010 for http://supernova.ws
* @version 1.0
* @copyright 2008 by ??????? for XNova
*/
use Unit\DBStaticUnit;
define('INSIDE' , true);
define('INSTALL' , false);
define('IN_ADMIN', true);
require('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user, $sn_version_check_class;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
$template = SnTemplate::gettemplate('admin/settings', true);
if(sys_get_param('save')) {
SN::$config->game_name = sys_get_param_str_unsafe('game_name');
SN::$config->game_mode = sys_get_param_int('game_mode');
SN::$config->game_speed = sys_get_param_float('game_speed', 1);
SN::$config->fleet_speed = sys_get_param_float('fleet_speed', 1);
SN::$config->resource_multiplier = sys_get_param_float('resource_multiplier', 1);
SN::$config->user_vacation_disable = sys_get_param_int('user_vacation_disable', 0);
SN::$config->url_faq = sys_get_param_str_unsafe('url_faq');
SN::$config->url_forum = sys_get_param_str_unsafe('url_forum');
SN::$config->url_rules = sys_get_param_str_unsafe('url_rules');
SN::$config->url_purchase_metamatter = sys_get_param_str_unsafe('url_purchase_metamatter');
SN::$config->game_disable = sys_get_param_int('game_disable');
SN::$config->game_disable_reason = sys_get_param_str_unsafe('game_disable_reason');
SN::$config->server_updater_check_auto = sys_get_param_int('server_updater_check_auto');
SN::$config->game_user_changename = sys_get_param_int('game_user_changename', SN::$config->game_user_changename);
SN::$config->game_user_changename_cost = sys_get_param_int('game_user_changename_cost', SN::$config->game_user_changename_cost);
SN::$config->eco_scale_storage = sys_get_param_int('eco_scale_storage');
SN::$config->game_default_language = sys_get_param_str_unsafe('game_default_language', DEFAULT_LANG);
SN::$config->game_default_skin = sys_get_param_str_unsafe('game_default_skin', DEFAULT_SKINPATH);
SN::$config->game_default_template = sys_get_param_str_unsafe('game_default_template', SnTemplate::getServerDefaultTemplateName());
SN::$config->game_maxGalaxy = sys_get_param_int('game_maxGalaxy', 5);
SN::$config->game_maxSystem = sys_get_param_int('game_maxSystem', 199);
SN::$config->game_maxPlanet = sys_get_param_int('game_maxPlanet', 16);
SN::$config->player_max_colonies = sys_get_param_int('player_max_colonies', -1);
SN::$config->fleet_bashing_attacks = sys_get_param_int('fleet_bashing_attacks', 3);
SN::$config->fleet_bashing_interval = sys_get_param_int('fleet_bashing_interval', 30 * 60);
SN::$config->fleet_bashing_scope = sys_get_param_int('fleet_bashing_scope', 24 * 60 * 60);
SN::$config->fleet_bashing_war_delay = sys_get_param_int('fleet_bashing_war_delay', 12 * 60 * 60);
SN::$config->fleet_bashing_waves = sys_get_param_int('fleet_bashing_waves', 3);
SN::$config->allow_buffing = sys_get_param_int('allow_buffing');
SN::$config->ally_help_weak = sys_get_param_int('ally_help_weak');
SN::$config->game_email_pm = sys_get_param_int('game_email_pm');
SN::$config->rpg_exchange_metal = sys_get_param_int('rpg_exchange_metal', 1);
SN::$config->rpg_exchange_crystal = sys_get_param_int('rpg_exchange_crystal', 2);
SN::$config->rpg_exchange_deuterium = sys_get_param_int('rpg_exchange_deuterium', 4);
SN::$config->rpg_exchange_darkMatter = sys_get_param_int('rpg_exchange_darkMatter', 400);
SN::$config->tpl_minifier = sys_get_param_int('tpl_minifier', 0);
SN::$config->initial_fields = sys_get_param_int('initial_fields', 200);
SN::$config->eco_planet_starting_metal = sys_get_param_float('eco_planet_starting_metal', 500);
SN::$config->eco_planet_starting_crystal = sys_get_param_float('eco_planet_starting_crystal', 500);
SN::$config->eco_planet_starting_deuterium = sys_get_param_float('eco_planet_starting_deuterium', 0);
SN::$config->metal_basic_income = sys_get_param_float('metal_basic_income', 40);
SN::$config->crystal_basic_income = sys_get_param_float('crystal_basic_income', 20);
SN::$config->deuterium_basic_income = sys_get_param_float('deuterium_basic_income', 10);
SN::$config->energy_basic_income = sys_get_param_float('energy_basic_income', 0);
SN::$config->eco_planet_storage_metal = sys_get_param_float('eco_planet_storage_metal', BASE_STORAGE_SIZE);
SN::$config->eco_planet_storage_crystal = sys_get_param_float('eco_planet_storage_crystal', BASE_STORAGE_SIZE);
SN::$config->eco_planet_storage_deuterium = sys_get_param_float('eco_planet_storage_deuterium', BASE_STORAGE_SIZE);
SN::$config->chat_timeout = sys_get_param_int('chat_timeout', 5);
SN::$config->game_news_overview = sys_get_param_int('game_news_overview', 5);
SN::$config->advGoogleLeftMenuIsOn = sys_get_param_int('advGoogleLeftMenuIsOn');
SN::$config->advGoogleLeftMenuCode = sys_get_param('advGoogleLeftMenuCode');
SN::$config->debug = sys_get_param_int('debug');
SN::$config->game_counter = sys_get_param_int('game_counter');
SN::$config->geoip_whois_url = sys_get_param_str('geoip_whois_url');
SN::$config->uni_price_galaxy = sys_get_param_float('uni_price_galaxy');
SN::$config->uni_price_system = sys_get_param_float('uni_price_system');
SN::$config->user_birthday_gift = sys_get_param_float('user_birthday_gift');
SN::$config->user_birthday_range = sys_get_param_int('user_birthday_range');
SN::$config->stats_hide_admins = sys_get_param_int('stats_hide_admins');
SN::$config->stats_hide_player_list = sys_get_param_str('stats_hide_player_list');
SN::$config->stats_hide_pm_link = sys_get_param_int('stats_hide_pm_link');
SN::$config->stats_schedule = sys_get_param_str('stats_schedule');
SN::$config->empire_mercenary_base_period = sys_get_param_int('empire_mercenary_base_period');
if(SN::$config->empire_mercenary_temporary != sys_get_param_int('empire_mercenary_temporary')) {
if(SN::$config->empire_mercenary_temporary) {
DBStaticUnit::db_unit_list_admin_delete_mercenaries_finished();
} else {
DBStaticUnit::db_unit_list_admin_set_mercenaries_expire_time(SN::$config->empire_mercenary_base_period);
}
SN::$config->empire_mercenary_temporary = sys_get_param_int('empire_mercenary_temporary');
}
SN::$config->db_saveAll();
$template->assign_var('MESSAGE', $lang['adm_opt_saved']);
}
$template->assign_vars([
'ALLOW_BUFFING' => SN::$config->allow_buffing,
'ALLY_HELP_WEAK' => SN::$config->ally_help_weak,
'GAME_EMAIL_PM' => SN::$config->game_email_pm,
'game_mode' => SN::$config->game_mode,
'game_language' => SN::$config->game_default_language,
'ECO_SCALE_STORAGE' => SN::$config->eco_scale_storage,
'USER_VACATION_DISABLE' => SN::$config->user_vacation_disable,
'ADV_LEFT_MENU' => SN::$config->advGoogleLeftMenuIsOn,
'GAME_DISABLE' => SN::$config->game_disable,
'GAME_DEBUG' => SN::$config->debug,
'GAME_COUNTER' => SN::$config->game_counter,
'TPL_MINIFIER' => SN::$config->tpl_minifier,
'EMPIRE_MERCENARY_TEMPORARY' => SN::$config->empire_mercenary_temporary,
'SERVER_UPDATE_CHECK_AUTO' => SN::$config->server_updater_check_auto,
'CHECK_DATE' => SN::$config->server_updater_check_last ? date(FMT_DATE_TIME, SN::$config->server_updater_check_last) : 0,
'CHECK_RESULT' => isset($lang['adm_opt_ver_response'][SN::$config->server_updater_check_result]) ? $lang['adm_opt_ver_response'][SN::$config->server_updater_check_result] : $lang['adm_opt_ver_response'][SNC_VER_UNKNOWN_RESPONSE],
'CHECK_CLASS' => isset($sn_version_check_class[SN::$config->server_updater_check_result]) ? $sn_version_check_class[SN::$config->server_updater_check_result] : $sn_version_check_class[SNC_VER_UNKNOWN_RESPONSE],
'SERVER_UPDATE_ID' => SN::$config->server_updater_id,
'SERVER_UPDATE_KEY' => SN::$config->server_updater_key,
'STATS_HIDE_ADMINS' => SN::$config->stats_hide_admins,
'STATS_HIDE_PM_LINK' => SN::$config->stats_hide_pm_link,
'GAME_CHANGE_NAME' => SN::$config->game_user_changename,
'GAME_CHANGE_NAME_COST' => SN::$config->game_user_changename_cost,
]);
SnTemplate::tpl_assign_select($template, 'change_name_options', SN::$lang['adm_opt_player_change_name_options']);
SnTemplate::tpl_assign_select($template, 'sys_game_disable_reason', SN::$lang['sys_game_disable_reason'], 'ID', 'NAME');
SnTemplate::tpl_assign_select($template, 'game_modes', SN::$lang['sys_game_mode'], 'ID', 'NAME');
SnTemplate::tpl_assign_select($template, 'ver_response', SN::$lang['adm_opt_ver_response'], 'ID', 'NAME');
$lang_list = lng_get_list();
foreach($lang_list as $lang_id => $lang_data) {
$template->assign_block_vars('game_languages', array(
'ID' => $lang_id,
'NAME' => "{$lang_data['LANG_NAME_NATIVE']} ({$lang_data['LANG_NAME_ENGLISH']})",
));
}
SnTemplate::display($template, $lang['adm_opt_title']);
================================================
FILE: admin/statbuilder.php
================================================
<?php
/**
* StatBuilder.php
*
* @version 1.1 (c) copyright 2010 by Gorlum for http://supernova.ws
* [*] All calculations moved to StatFunctions.php - thus we can utilize them in automatized stats calculations
* @version 1
* @copyright 2008 by Chlorel for XNova
*/
define('INSIDE' , true);
define('INSTALL' , false);
define('IN_ADMIN', true);
require_once('../common.' . substr(strrchr(__FILE__, '.'), 1));
global $lang, $user;
SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR);
if(SN_TIME_NOW >= SN::$config->pass()->var_stat_update_admin_forced && SN_TIME_NOW >= SN::$config->pass()->var_stat_update_end)
{
SN::$config->pass()->var_stat_update_admin_forced = SN_TIME_NOW + 120;
$script = '<script type="text/javascript">
$(document).ready(function() {
// send requests
$.post("scheduler.php?admin_update=1&' . SN_TIME_NOW . '", function(result) {
// format result
// alert(xml);
// var result = [ $("message", xml).text() ];
// output result
// $("#admin_message").html(result.join(""));
$("#admin_message").html(result);
}, "json" );
});
</script>';
SnTemplate::messageBoxAdmin("{$script}<img src=\"design/images/progressbar.gif\"><br>{$lang['sys_wait']}", $lang['adm_stat_title'], '', 0);
}
else
{
SnTemplate::messageBoxAdmin($lang['adm_stat_already_started'], $lang['adm_stat_title'], 'admin/overview.php');
}
// require_once('../scheduler.php');
================================================
FILE: admin/sxd/.htaccess
================================================
<Files cfg.php>
order allow,deny
deny from all
</Files>
<Files ses.php>
order allow,deny
deny from all
</Files>
<Files tmpl.php>
order allow,deny
deny from all
</Files>
<Files sxd.lic.php>
order allow,deny
deny from all
</Files>
================================================
FILE: admin/sxd/backup/.htaccess
================================================
AddType application/octetstream .gz .bz2 .sql
<Files ~ "\.(php|log|rtl|stp)$">
order allow,deny
deny from all
</Files>
================================================
FILE: admin/sxd/backup/index.htm
================================================
================================================
FILE: admin/sxd/bsd_license.txt
================================================
Copyright (c) 2003-2009, zapimir
portions copyright (c) 2005-2009 Binovator
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Sypex nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: admin/sxd/img/index.htm
================================================
================================================
FILE: admin/sxd/index.php
================================================
<?php
/***************************************************************************\
| Sypex Dumper version 2.0.11 |
| (c) 2003-2011 zapimir zapimir@zapimir.net http://sypex.net/ |
| (c) 2005-2011 BINOVATOR info@sypex.net |
|---------------------------------------------------------------------------|
| created: 2003.09.02 19:07 modified: 2013.08.27 06:27 |
|---------------------------------------------------------------------------|
| Sypex Dumper is released under the terms of the BSD license |
| http://sypex.net/bsd_license.txt |
\***************************************************************************/
header("Expires: Wed, 19 Nov 2008 19:19:19 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Content-Type: text/html; charset=utf-8");
//error_reporting(E_ALL);
error_reporting(0);
if (!ini_get('zlib.output_compression') && function_exists('ob_gzhandler')) ob_start('ob_gzhandler');
set_error_handler('sxd_error_handler');
register_shutdown_function('sxd_shutdown');
$SXD = new Sypex_Dumper();
chdir(dirname(__FILE__));
$SXD->init(!empty($argc) && $argc > 1 ? $argv : false);
class Sypex_Dumper {
function Sypex_Dumper() {
define('C_DEFAULT', 1);
define('C_RESULT', 2);
define('C_ERROR', 3);
define('C_WARNING', 4);
define('SXD_DEBUG', false);
define('TIMER', array_sum(explode(' ', microtime())));
define('V_SXD', 20011);
define('V_PHP', sxd_ver2int(phpversion()));
$this->name = 'Sypex Dumper 2.0.11';
}
function loadLang($lng_name = 'auto'){
if($lng_name == 'auto'){
include('lang/list.php');
$this->langs = &$langs;
$lng = 'en';
if(preg_match_all('/[a-z]{2}(-[a-z]{2})?/', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $m)) {
foreach($m[0] AS $l){
if(isset($langs[$l])){
$lng_name = $l;
break;
}
}
}
}
if(file_exists("lang/lng_{$lng_name}.php")) include("lang/lng_{$lng_name}.php");
else include("lang/lng_en.php");
$this->LNG = &$LNG;
$this->LNG['name'] = $lng_name;
return true;
}
function init($args = false){
if (get_magic_quotes_gpc()) {
$_POST = sxd_antimagic($_POST);
}
include('cfg.php');
$this->loadLang($CFG['lang']);
if (!ini_get('safe_mode') && function_exists('set_time_limit') && strpos(ini_get('disable_functions'), 'set_time_limit') === false) @set_time_limit($CFG['time_web']);
elseif (ini_get('max_execution_time') < $CFG['time_web']) $CFG['time_web'] = ini_get('max_execution_time');
$this->CFG = &$CFG;
$this->try = false;
$this->virtualize = false;
$this->cron_mode = false;
// Проверяем авторизацию и делаем коннект к базе
if(empty($this->CFG['my_user'])){
$this->CFG['my_host'] = 'localhost';
$this->CFG['my_port'] = 3306;
$this->CFG['my_user'] = 'root';
$this->CFG['my_pass'] = '';
$this->CFG['my_comp'] = 0;
$this->CFG['my_db'] = '';
}
if ($args) { // консольный режим
foreach($args AS $key => $arg){
if (preg_match("/^-([hupoj])=(.*?)$/", $arg, $m)){
switch ($m[1]) {
case 'h': $this->CFG['my_host'] = $m[2]; break; // хост
case 'o': $this->CFG['my_port'] = $m[2]; break; // порт
case 'u': $this->CFG['my_user'] = $m[2]; break; // логин
case 'p': $this->CFG['my_pass'] = $m[2]; break; // пароль
case 'j': $this->CFG['sjob'] = $m[2]; break; // job-файл
}
}
}
$this->cron_mode = true;
set_time_limit($CFG['time_cron']);
// Загружаем конфиг файл, если нужно
$auth = $this->connect();
if($auth && !empty($this->CFG['sjob'])){
$this->ajax($this->loadJob($this->CFG['sjob']));
echo file_get_contents($this->JOB['file_log']);
if(file_exists($this->JOB['file_log'])) unlink($this->JOB['file_log']);
if(file_exists($this->JOB['file_rtl'])) unlink($this->JOB['file_rtl']);
}
else echo 'Auth error';
exit;
}
elseif(!empty($this->CFG['auth'])){ // Авторизация
$auth = false;
$sfile = 'ses.php';
if(!empty($_COOKIE['sxd']) && preg_match('/^[\da-f]{32}$/', $_COOKIE['sxd'])){
include($sfile);
if(isset($SES[$_COOKIE['sxd']])) {
$auth = true;
$this->CFG = $SES[$_COOKIE['sxd']]['cfg'];
$this->SES = &$SES;
$this->loadLang($this->CFG['lang']);
}
}
if(!$auth) {
$user = !empty($_POST['user']) ? $_POST['user'] : '';
$pass = !empty($_POST['pass']) ? $_POST['pass'] : '';
$host = !empty($_POST['host']) ? $_POST['host'] : (!empty($this->CFG['my_host']) ? $this->CFG['my_host'] : 'localhost');
$port = !empty($_POST['port']) && is_numeric($_POST['port']) ? $_POST['port'] : 3306;
$temp = preg_split('/\s+/', $this->CFG['auth']);
if(!empty($_REQUEST['lang']) && preg_match('/^[a-z]{2}(-[a-z]{2})?$/', $_REQUEST['lang'])) {$this->loadLang($_REQUEST['lang']);}
foreach($temp AS $a){
switch($a) {
case 'cfg': if(empty($user)) {continue;}
$auth = !empty($CFG['user']) && isset($CFG['pass']) && $CFG['user']== $user && $CFG['pass'] == $pass;
break;
case 'mysql': if(empty($user)) {continue;}
if($host != 'localhost' && !empty($this->CFG['my_host']) && $this->CFG['my_host'] != $host) {continue;}
$auth = $this->connect($host, $port, $user, $pass);
break;
default: $file = 'auth_' . $a . '.php';
if(!file_exists($file)) continue;
include $file;
}
if($auth) break;
}
if($auth){
$key = md5(rand(1,100000) . $user . microtime());
$CFG['lang'] = $this->LNG['name'];
$_COOKIE['sxd'] = $key;
$this->saveCFG();
if(V_PHP > 50200) setcookie('sxd', $key, !empty($_POST['save']) ? time() + 31536000 : 0, '', '', false, true);
else setcookie('sxd', $key, !empty($_POST['save']) ? time() + 31536000 : 0, '', '', false);
header("Location: ./");
exit;
}
foreach(array('user', 'pass', 'host', 'port') AS $key){
$_POST[$key] = !empty($_POST[$key]) ? htmlspecialchars($_POST[$key], ENT_NOQUOTES) : '';
}
$_POST['save'] = !empty($_POST['save']) ? ' CHECKED' : '';
}
if (!$auth) {
if(!empty($_POST['ajax'])){
echo "sxd.hideLoading();alert('Session not found');";
exit;
}
$this->lng_list = '<option value="auto">- auto -</opinion>';
if(!isset($this->langs)) {include('lang/list.php');$this->langs = &$langs;}
foreach($this->langs AS $k => $v){
$this->lng_list .= "<option value=\"{$k}\"" . ($k == (!empty($_REQUEST['lang']) ? $this->LNG['name'] : $this->CFG['lang']) ? ' SELECTED' : '') . ">{$v}</opinion>";
}
include('tmpl.php');
echo sxd_tpl_auth();
exit;
}
}
if(empty($_POST['ajax']['act']) || $_POST['ajax']['act'] != 'save_connect') $this->connect();
if(isset($_POST['ajax'])) $this->ajax($_POST['ajax']);
else $this->main();exit;
}
function saveToFile($name, $content){
$fp = fopen($name, "w");
fwrite($fp, $content);
fclose($fp);
}
function connect($host = null, $port = null, $user = null, $pass = null){
$this->error = '';
$this->try = true;
if(!empty($user) && isset($pass)) {
$this->CFG['my_host'] = $host;
$this->CFG['my_port'] = $port;
$this->CFG['my_user'] = $user;
$this->CFG['my_pass'] = $pass;
}
if(mysql_connect($this->CFG['my_host'] . ($this->CFG['my_host']{0} != ':' ? ":{$this->CFG['my_port']}" : ''), $this->CFG['my_user'], $this->CFG['my_pass'])) {
if(V_PHP > 50202) mysql_set_charset('utf8') or sxd_my_error();
else mysql_query('SET NAMES utf8') or sxd_my_error();
define('V_MYSQL', sxd_ver2int(mysql_get_server_info()));
}
else {
define('V_MYSQL', 0);
$this->error = "sxd.actions.tab_connects();alert(" . sxd_esc(mysql_error()) . ");";
}
$this->try = false;
return V_MYSQL ? true: false;
}
function main(){
// Тулбар
$this->VAR['toolbar'] = sxd_php2json(
array(
array('backup', $this->LNG['tbar_backup'], 1, 3),
array('restore', $this->LNG['tbar_restore'], 2, 3),
array('|'),
array('files', $this->LNG['tbar_files'], 3, 1),
array('services', $this->LNG['tbar_services'], 5, 1),
array('|'),
array('createdb', $this->LNG['tbar_createdb'], 7, 0),
array('connects', $this->LNG['tbar_connects'], 6, 0),
array('|'),
array('options', $this->LNG['tbar_options'], 4, 1),
array('|'),
array('exit', $this->LNG['tbar_exit'], 8, 1),
)
);
$this->db = 'temp';
$zip = array($this->LNG['zip_none']);
if (function_exists("gzopen")) {
for($i = 1; $i <10; $i++){
$zip[] = "GZip: {$i}";
}
$zip[1] .= " ({$this->LNG['zip_min']})";
$zip[7] .= " ({$this->LNG['default']})";
}
if (function_exists("bzopen")) {
$zip[10] = "BZip";
}
end($zip);
$zip[key($zip)] .= " ({$this->LNG['zip_max']})";
$this->VAR['combos'] =
$this->addCombo('backup_db', $this->db, 11, 'db', array()/*$this->getDBList()*/) .
$this->addCombo('backup_charset', 0, 9, 'charset', $this->getCharsetList()) .
$this->addCombo('backup_zip', 7, 10, 'zip', $zip) .
$this->addCombo('restore_db', $this->db, 11, 'db') .
$this->addCombo('restore_charset', 0, 9, 'charset') .
$this->addCombo('restore_file', 0, 12, 'files', $this->getFileList()) .
$this->addCombo('restore_type', 0, 13, 'types', array("CREATE + INSERT ({$this->LNG['default']})", 'TRUNCATE + INSERT', 'REPLACE', 'INSERT IGNORE')) .
$this->addCombo('services_db', $this->db, 11, 'db') .
$this->addCombo('services_check', 0, 5, 'check', array("- {$this->LNG['default']} -", 'QUICK', 'FAST', 'CHANGED', 'MEDIUM', 'EXTENDED')) .
$this->addCombo('services_repair', 0, 5, 'repair', array("- {$this->LNG['default']} -", 'QUICK', 'EXTENDED')) .
$this->addCombo('db_charset', 0, 9, 'collation', $this->getCollationList()) .
$this->addCombo('db_charset_col', 0, 15, 'collation:db_charset')
;
if (!V_MYSQL) $this->VAR['combos'] .= $this->error;
$this->VAR['combos'] .= $this->getSavedJobs() . "sxd.confirms = {$this->CFG['confirm']};sxd.actions.dblist();";
$this->LNG['del_date'] = sprintf($this->LNG['del_date'], '<input type="text" id="del_time" class=txt style="width:24px;" maxlength="3">');
$this->LNG['del_count'] = sprintf($this->LNG['del_count'], '<input id="del_count" type="text" class=txt style="width:18px;" maxlength="2">');
include('tmpl.php');
echo sxd_tpl_page();
}
function addCombo($name, $sel, $ico, $opt_name, $opts = ''){
$opts = !empty($opts) ? "{{$opt_name}:" . sxd_php2json($opts) . '}' : "'{$opt_name}'";
return "sxd.addCombo('{$name}', '{$sel}', {$ico}, {$opts});\n";
}
function ajax($req){
$res = '';
$act = $req['act'];
if($req['act'] == 'run_savedjob'){
$req = $this->loadJob($req);
}
switch($req['act']){
case 'load_db':
$res = $this->getObjects(str_replace('_db', '', $req['name']), $req['value']);
break;
case 'load_files':
$res = $this->getFileObjects('restore', $req['value']);
break;
case 'filelist':
$res = "sxd.clearOpt('files');sxd.addOpt(" . sxd_php2json(array('files' => $this->getFileList())) . ");";
break;
case 'dblist':
$res = "sxd.clearOpt('db');sxd.addOpt(" . sxd_php2json(array('db' => $this->getDBList())) . ");sxd.combos.restore_db.select(0,'-');sxd.combos.services_db.select(0,'-');sxd.combos.backup_db.select(0,'-');";
break;
case 'load_connect':
$CFG = $this->cfg2js($this->CFG);
$res = "z('con_host').value = '{$CFG['my_host']}', z('con_port').value = '{$CFG['my_port']}', z('con_user').value = '{$CFG['my_user']}',
z('con_pass').value = '', z('con_comp').checked = {$CFG['my_comp']}, z('con_db').value = '{$CFG['my_db']}', z('con_pass').changed = false;" ;
break;
case 'save_connect':
$res = $this->saveConnect($req);
break;
case 'save_job':
unset($req['act']);
$this->saveJob('sj_' . $req['job'] , $req);
$res = $this->getSavedJobs();
break;
case 'add_db':
$res = $this->addDb($req);
break;
case 'load_options':
$CFG = $this->cfg2js($this->CFG);
$res = "z('time_web').value = '{$CFG['time_web']}', z('time_cron').value = '{$CFG['time_cron']}', z('backup_path').value = '{$CFG['backup_path']}',
z('backup_url').value = '{$CFG['backup_url']}', z('globstat').checked = {$CFG['globstat']}, z('charsets').value = '{$CFG['charsets']}', z('only_create').value = '{$CFG['only_create']}', z('auth').value = '{$CFG['auth']}', z('conf_import').checked = {$CFG['confirm']} & 1, z('conf_file').checked = {$CFG['confirm']} & 2, z('conf_db').checked = {$CFG['confirm']} & 4;sxd.confirms = {$this->CFG['confirm']};";
break;
case 'save_options':
$res = $this->saveOptions($req);
break;
case 'delete_file':
if(preg_match('/^[^\/]+?\.sql(\.(gz|bz2))?$/', $req['name'])) {
$file = $this->CFG['backup_path'] . $req['name'];
if(file_exists($file)) unlink($file);
}
$res = $this->getFileListExtended();
break;
case 'delete_db':
$res = $this->deleteDB($req['name']);
break;
case 'load_files_ext':
$res .= $this->getFileListExtended();
break;
case 'services':
$this->runServices($req);
break;
case 'backup':
$this->addBackupJob($req);
break;
case 'restore':
$this->addRestoreJob($req);
break;
case 'resume':
$this->resumeJob($req);
break;
case 'exit':
setcookie('sxd', '', 0);
$res = "top.location.href = " . sxd_esc($this->CFG['exitURL']) . ";";
break;
}
echo $res;
}
function loadJob($job){
$file = $this->CFG['backup_path'] . 'sj_' . (is_array($job) ? $job['job'] : $job) . '.job.php';
if(!file_exists($file)) return;
include($file);
$JOB['act'] = $JOB['type'];
$JOB['type'] = 'run';
return $JOB;
}
function deleteDB($name){
$r = mysql_query('DROP DATABASE `' . sxd_esc($name, false) . '`') or sxd_my_error();
if($r){
echo "sxd.clearOpt('db');sxd.addOpt(" . sxd_php2json(array('db' => $this->getDBList())) . ");sxd.combos.services_db.select(0,'-');";
}
else
echo "alert(" . sxd_esc(mysql_error()) . ");";
}
function cfg2js($cfg){
foreach($cfg AS $k => $v){
$cfg[$k] = sxd_esc($v, false);
}
return $cfg;
}
function addDb($req){
$r = mysql_query('CREATE DATABASE `' . sxd_esc($req['name'], false) . '`' . (V_MYSQL > 40100 ? "CHARACTER SET {$req['charset']} COLLATE {$req['collate']}" : ''));
if($r)
echo "sxd.addOpt(" . sxd_php2json(array('db' => array($req['name'] => "{$req['name']} (0)"))) . ");";
else
sxd_my_error();
}
function saveConnect($req){
$this->CFG['my_host'] = $req['host'];
$this->CFG['my_port'] = (int)$req['port'];
$this->CFG['my_user'] = $req['user'];
if(isset($req['pass'])) $this->CFG['my_pass'] = $req['pass'];
$this->CFG['my_comp'] = $req['comp'] ? 1 : 0;
$this->CFG['my_db'] = $req['db'];
$this->saveCFG();
$this->connect();
if (V_MYSQL) {
$tmp = array(
'db' => $this->getDBList(),
'charset' => $this->getCharsetList(),
'collation' => $this->getCollationList()
);
echo "sxd.clearOpt('db');sxd.clearOpt('charset');sxd.clearOpt('collation');sxd.addOpt(" . sxd_php2json($tmp) . ");sxd.combos.backup_db.select(0,'-');sxd.combos.restore_db.select(0,'-');sxd.combos.services_db.select(0,'-');sxd.combos.backup_charset.select(0,'-');sxd.combos.services_db.select(0,'-');sxd.combos.db_charset.select(0,'-');";
}
else {
echo $this->error;
}
}
function saveOptions($req){
$this->CFG['time_web'] = $req['time_web'];
$this->CFG['time_cron'] = $req['time_cron'];
$this->CFG['backup_path'] = $req['backup_path'];
$this->CFG['backup_url'] = $req['backup_url'];
$this->CFG['globstat'] = $req['globstat'] ? 1 : 0;
$this->CFG['charsets'] = $req['charsets'];
$this->CFG['only_create'] = $req['only_create'];
$this->CFG['auth'] = $req['auth'];
$this->CFG['confirm'] = $req['confirm'];
$this->saveCFG();
}
function saveCFG(){
if (isset($_COOKIE['sxd'])) {
$this->SES[$_COOKIE['sxd']] = array('cfg' => $this->CFG, 'time' => time(), 'lng' => $this->LNG['name']);
$this->saveToFile('ses.php', "<?php\n\$SES = " . var_export($this->SES, true) . ";\n" . "?>");
}
if (!$this->virtualize){
$this->saveToFile('cfg.php', "<?php\n\$CFG = " . var_export($this->CFG, true) . ";\n" . "?>");
}
}
function runServices($job) {
$serv = array('optimize' => 'OPTIMIZE', 'analyze' => 'ANALYZE', 'check' => 'CHECK', 'repair' => 'REPAIR');
$add = array('check' => array('', 'QUICK', 'FAST', 'CHANGED', 'MEDIUM', 'EXTENDED'), 'repair' => array('', 'QUICK', 'EXTENDED'));
if(isset($serv[$job['type']])) {
mysql_select_db($job['db']);
$filter = $object = array();
$this->createFilters($job['obj'], $filter, $object);
$r = mysql_query('SHOW TABLE STATUS') or sxd_my_error();
if (!$r) return;
$tables = array();
while($item = mysql_fetch_assoc($r)){
if(V_MYSQL > 40101 && is_null($item['Engine']) && preg_match('/^VIEW/i', $item['Comment'])) continue;
if(sxd_check($item['Name'], $object['TA'], $filter['TA'])) $tables[] = "`{$item['Name']}`";
}
$sql = $serv[$job['type']] . ' TABLE ' . implode(',', $tables);
if ($job['type'] == 'check' || $job['type'] == 'repair') {
$sql .= isset($add[$job['type']][$job[$job['type']]]) ? ' ' . $add[$job['type']][$job[$job['type']]] : '';
}
$r = mysql_query($sql) or sxd_my_error();
if (!$r) return;
$res = array();
while($item = mysql_fetch_row($r)){
$res[] = $item;
}
echo 'sxd.result.add(' . sxd_php2json($res). ');';
}
}
function createFilters(&$obj, &$filter, &$object){
$types = array('TA', 'TC', 'VI', 'PR', 'FU', 'TR', 'EV');
foreach($types AS $type){
$filter[$type] = array();
$object[$type] = array();
if(!empty($obj[$type])){
foreach($obj[$type] AS $v){
if(strpos($v, '*') !== false) {
$filter[$type][] = str_replace('*', '.*?', $v);
}
else {
$object[$type][$v] = true;
}
}
$filter[$type] = count($filter[$type]) > 0 ? '/^(' . implode('|', $filter[$type]) . ')$/i' : '';
}
}
}
function closeConnect(){
//return;
@ignore_user_abort(1);
header("SXD: {$this->name}");
$size = ob_get_length();
// @fastcgi_finish_request();
header("Content-Length: {$size}");
header("Connection: close");
@ob_end_flush();
@flush();
}
function resumeJob($job){
$this->closeConnect();
include($this->CFG['backup_path'] . $job['job'] . '.job.php');
$this->JOB = &$JOB;
if(file_exists($this->JOB['file_stp'])) unlink($this->JOB['file_stp']);
$this->fh_rtl = fopen($this->JOB['file_rtl'], 'r+b');
$this->fh_log = fopen($this->JOB['file_log'], 'ab');
$t = fgets($this->fh_rtl);
if(!empty($t)){
$this->rtl = explode("\t", $t);
}
else {
$this->addLog($this->LNG['not_found_rtl']);
exit;
}
// TODO: проверить удаление кодировки
//$this->rtl[6] = '';
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
$this->rtl[9] = 0;
fwrite($this->fh_rtl, implode("\t", $this->rtl));
if ($this->JOB['act'] == 'backup') $this->runBackupJob(true);
elseif ($this->JOB['act'] == 'restore') $this->runRestoreJob(true);
}
function addRestoreJob($job) {
$this->closeConnect();
$this->JOB = $job;
// Создаем список объектов и фильтр
$filter = $object = array();
$this->createFilters($this->JOB['obj'], $filter, $object);
$objects = $this->getFileObjects('restore', $this->JOB['file'], false);
$todo = array();
$rows = 0;
$this->tab_rows = array();
$todo = array();
foreach($objects AS $t => $list){
if($t == 'TA' && (!empty($object['TC']) || !empty($filter['TC']))) {}
elseif(empty($object[$t]) && empty($filter[$t])) {continue;}
if (empty($list)) continue;
foreach($list AS $item){
switch($t){
case 'TA':
$type = '';
if(sxd_check($item[0], $object['TA'], $filter['TA'])){
$type = empty($item[1]) ? 'TC' : 'TA';
}
elseif(sxd_check($item[0], $object['TC'], $filter['TC'])) {
$type = 'TC';
}
else continue;
$todo['TA'][] = array($type, $item[0], $item[1], $item[2]);
$rows += $type == 'TA' ? $item[1] : 0;
break;
default:
if(sxd_check($item, $object[$t], $filter[$t])) {
$todo[$t][] = array($t, $item);
}
}
}
}
$this->JOB['file_tmp'] = $this->JOB['file_name'] = $this->CFG['backup_path'] . $this->JOB['file'];
$this->JOB['file_rtl'] = $this->CFG['backup_path'] . $this->JOB['job'] . '.rtl';
$this->JOB['file_log'] = $this->CFG['backup_path'] . $this->JOB['job'] . '.log';
$this->JOB['file_stp'] = $this->CFG['backup_path'] . $this->JOB['job'] . '.stp';
if(file_exists($this->JOB['file_stp'])) unlink($this->JOB['file_stp']);
$this->fh_tmp = $this->openFile($this->JOB['file_tmp'], 'r');
// Для чужих дампов определяем разделители строк
if(is_null($this->JOB['obj'])) {
$s = fread($this->fh_tmp, 2048);
if(strpos($s, "\r\n")) $this->JOB['eol'] = "\r\n";
elseif(strpos($s, "\n")) $this->JOB['eol'] = "\n";
else $this->JOB['eol'] = "\r";
$bom = strncmp($s, "\xEF\xBB\xBF", 3) == 0 ? 3 : ((strncmp($s, "\xFE\xFF", 2) == 0 || strncmp($s, "\xFF\xFE", 2) == 0) ? 2 : 0);
fseek($this->fh_tmp, $bom);
}
$this->JOB['todo'] = $todo;
$this->saveJob($this->JOB['job'], $this->JOB);
$this->fh_rtl = fopen($this->JOB['file_rtl'], 'wb');
$this->fh_log = fopen($this->JOB['file_log'], 'wb');
$this->rtl = array(time(), time(), $rows, 0, '', '', '', 0, 0, 0, 0, TIMER, "\n");
$this->addLog(sprintf($this->LNG['restore_begin'], $this->JOB['db']));
$this->addLog("{$this->LNG['combo_file']} {$this->JOB['file']}");
$this->runRestoreJob();
}
function runRestoreJob($continue = false){
$ei = false;
if($continue){
$this->fh_tmp = $this->openFile($this->JOB['file_tmp'], 'r');
fseek($this->fh_tmp, $this->rtl[3]);
if(!empty($this->rtl[6])) $this->setNames($this->JOB['correct'] == 1 && !empty($this->JOB['charset']) ? $this->JOB['charset'] : $this->rtl[6]);
if($this->rtl[7] < $this->rtl[10]) $ei = true;
}
mysql_select_db($this->JOB['db']);
if(is_null($this->JOB['obj'])) $this->runRestoreJobForeign($continue);
//mysql_query("SET NAMES 'UTF8'");
$types = array('VI' => 'View', 'PR' => 'Procedure', 'FU' => 'Function', 'TR' => 'Trigger', 'EV' => 'Event');
$fcache = '';
$writes = 0;
$old_charset = '';
$tab = '';
$seek = 0;
$this->rtl[3] = ftell($this->fh_tmp);
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
fwrite($this->fh_rtl, implode("\t", $this->rtl));
$c = 0;
switch($this->JOB['strategy']){
case 1: $tc = 'TRUNCATE'; $td = 'INSERT'; break;
case 2: $tc = ''; $td = 'REPLACE'; break;
case 3: $tc = ''; $td = 'INSERT IGNORE'; break;
default: $tc = 'DROP TABLE IF EXISTS'; $td = 'INSERT';
}
$tab_exists = array();
if($this->JOB['strategy'] > 0){
$r = mysql_query("SHOW TABLES") or sxd_my_error();
while($item = mysql_fetch_row($r)){
$tab_exists[$item[0]] = true;
}
}
$insert = $continue && $this->rtl[7] < $this->rtl[10] ? "{$td} INTO `{$this->rtl[5]}` VALUES " : '';
//$enable_index = array();
if(V_MYSQL > 40014) {
mysql_query("SET UNIQUE_CHECKS=0");
mysql_query("SET FOREIGN_KEY_CHECKS=0");
if(V_MYSQL > 40101) mysql_query("SET SQL_MODE='NO_AUTO_VALUE_ON_ZERO'");
if(V_MYSQL > 40111) mysql_query("SET SQL_NOTES=0");
}
$log_sql = false;
$fields = '';
$time_old = time();
$exit_time = $time_old + $this->CFG['time_web'] - 1;
while($q = sxd_read_sql($this->fh_tmp, $seek, $ei)){
if($time_old < time()) {
if(file_exists($this->JOB['file_stp'])){
$type = file_get_contents($this->JOB['file_stp']);
$this->rtl[9] = !empty($type) ? $type : 2;
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
fwrite($this->fh_rtl, implode("\t", $this->rtl));
/*if($type == 1) {
}*/
unset($this->rtl);
exit;
}
$time_old = time();
if($time_old >= $exit_time){
$this->rtl[9] = 3;
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
fwrite($this->fh_rtl, implode("\t", $this->rtl));
unset($this->rtl);
exit;
}
clearstatcache();
}
switch($q{0}){
case '(':
if($continue) {
$this->addLog(sprintf("{$this->LNG['restore_TC']} {$this->LNG['continue_from']}", $this->rtl[5], $this->rtl[3]));
$continue = false;
}
$q = $insert . $q;
$ex = 1;
$c = 1;
break;
case 'I':
if (preg_match('/^INSERT( INTO `(.+?)`) VALUES/', $q, $m)) {
$insert = $td . $m[1] . $fields . " VALUES \n";
$tab = $m[2];
$this->rtl[7] = 0;
$this->rtl[8] = 0;
foreach($this->JOB['todo']['TA'] AS $t){
if($t[1] == $tab) {
$this->rtl[8] = $t[2];
}
}
if($this->JOB['strategy']) {
$q = substr_replace($q, $insert, 0, strlen($m[0]));
}
//mysql_query("LOCK TABLES `{$tab}` WRITE") or die (mysql_error());
mysql_query("ALTER TABLE `{$tab}` DISABLE KEYS") or sxd_my_error();
//if(!empty($this->JOB['autoinc'])) mysql_query("ALTER TABLE `{$tab}` AUTO_INCREMENT = 1") or sxd_my_error();
$ex = 1;
}
break;
case 'C':
$ex = 1;
if (preg_match('/^CREATE TABLE `/', $q)) {
if($this->JOB['strategy'] != 0 && isset($tab_exists[$this->rtl[5]])) $ex = 0;
else {
$ex = 1;
if((!empty($this->JOB['correct']) && !empty($this->JOB['charset']))){
$q = preg_replace('/(DEFAULT)?\s*(CHARSET|CHARACTER SET|COLLATE)[=\s]+\w+/i', '', $q) . (V_MYSQL < 40100 ? '' : ' DEFAULT CHARSET=' . $this->JOB['charset']);
}
if(!empty($this->JOB['autoinc'])) $q = preg_replace("/AUTO_INCREMENT=\d+/", "AUTO_INCREMENT=1", $q);
}
// Достаем имена полей таблицы
$fields = $this->JOB['strategy'] > 0 && preg_match_all('/^\s+(`.+?`) /m', $q, $f, PREG_PATTERN_ORDER) ? '(' . implode(',', $f[1]) . ')' : '';
}
break;
case '#': // Команды для дампера
if (preg_match("/\#\t(TC|TD|VI|PR|FU|TR|EV)`(.+?)`(([^_]+?)_.+?)?$/", $q, $m)) {
//if(!empty($tab)) $enable_index[] = $tab;
// $this->setNames($this->JOB['correct'] == 1 && !empty($this->JOB['charset']) ? $this->JOB['charset'] : empty($m[3]) ? '' : $m[3]);
$this->setNames('binary');
if($m[1] == 'TC') {
$this->addLog(sprintf($this->LNG['restore_TC'], $m[2]));
$insert = '';
$tab = '';
$this->rtl[4] = 'TD';
$this->rtl[5] = $m[2];
$ei = 0;
if($tc && ($this->JOB['strategy'] == 0 || isset($tab_exists[$m[2]]))) {
mysql_query("{$tc} `{$m[2]}`") or sxd_my_error();
}
}
elseif($m[1] == 'TD'){
$ei = 1;
}
else {
$this->rtl[4] = $m[1];
$this->rtl[5] = $m[2];
$this->rtl[7] = 0;
$this->rtl[8] = 0;
mysql_query("DROP {$types[$m[1]]} IF EXISTS `{$m[2]}`") or sxd_my_error();
$this->addLog(sprintf($this->LNG["restore_{$m[1]}"], $m[2]));
$ei = 0;
}
}
$ex = 0;
break;
default:
$insert = '';
$ex = 1;
}
if($ex) {
$this->rtl[3] = ftell($this->fh_tmp) - $seek;
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
fwrite($this->fh_rtl, implode("\t", $this->rtl));
if(mysql_query($q)) {
if($insert) {
$c = 1;
}
}
else {
error_log(date('r') . "\n----------\n{$q}\n", 3, "backup/sql_error.log");
sxd_my_error();
}
if($c){
$i = mysql_affected_rows();
$this->rtl[3] = ftell($this->fh_tmp) - $seek;
$this->rtl[7] += $i;
$this->rtl[10] += $i;
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
fwrite($this->fh_rtl, implode("\t", $this->rtl));
$c = 1;
}
}
}
// Включаем ключи
$this->addLog($this->LNG['restore_keys']);
$this->rtl[4] = 'EK';
$this->rtl[5] = '';
$this->rtl[6] = '';
$this->rtl[7] = 0;
$this->rtl[8] = 0;
foreach($this->JOB['todo']['TA'] AS $tab){
if ($tab[0] == 'TC') continue;
mysql_query("ALTER TABLE `{$tab[1]}` ENABLE KEYS") or sxd_my_error();
$this->rtl[1] = time();
$this->rtl[5] = $tab[1];
fseek($this->fh_rtl, 0);
fwrite($this->fh_rtl, implode("\t", $this->rtl));
}
$this->rtl[4] = 'EOJ';
$this->rtl[5] = round(array_sum(explode(' ', microtime())) - $this->rtl[11], 4);
fseek($this->fh_rtl, 0);
fwrite($this->fh_rtl, implode("\t", $this->rtl));
$this->addLog(sprintf($this->LNG['restore_end'], $this->JOB['db']));
fclose($this->fh_log);
fclose($this->fh_rtl);
}
function runRestoreJobForeign($continue = false){
$ei = false;
$fcache = '';
$writes = 0;
$old_charset = '';
$tab = '';
$seek = 0;
$this->rtl[3] = ftell($this->fh_tmp);
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
fwrite($this->fh_rtl, implode("\t", $this->rtl));
$c = 0;
$log_sql = false;
$fields = '';
$insert = '';
$last_tab = '';
$time_old = time();
$exit_time = $time_old + $this->CFG['time_web'] - 1;
$delimiter = ";";
while($q = sxd_read_sql($this->fh_tmp, $seek, $ei, $delimiter, $this->JOB['eol'])){
$q = ltrim($q);
if(empty($q)) break;
if($time_old < time()) {
if(file_exists($this->JOB['file_stp'])){
$type = file_get_contents($this->JOB['file_stp']);
$this->rtl[9] = !empty($type) ? $type : 2;
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
fwrite($this->fh_rtl, implode("\t", $this->rtl));
/*if($type == 1) {
}*/
unset($this->rtl);
exit;
}
$time_old = time();
if($time_old >= $exit_time){
$this->rtl[9] = 3;
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
fwrite($this->fh_rtl, implode("\t", $this->rtl));
unset($this->rtl);
exit;
}
clearstatcache();
}
do {
$repeat = false;
//error_log("-----------------\n[{$q}]\n", 3, "q.log");
//if(empty($q)) {continue 2;}
switch($q{0}){
case '(':
if($continue) {
$this->addLog(sprintf("{$this->LNG['restore_TC']} {$this->LNG['continue_from']}", $this->rtl[5], $this->rtl[3]));
$continue = false;
}
$q = $insert . $q;
$ex = 1;
$c = 1;
break;
case 'I':
if (preg_match('/^(INSERT( INTO `?(.+?)`?).+?\sVALUES)/s', $q, $m)) {
$insert = trim($m[1]) . ' ';
$tab = $m[3];
$this->rtl[7] = 0;
$this->rtl[8] = 0;
$ex = 1;
}
break;
case 'C':
$ex = 1;
$ei = 1;
if (preg_match('/^CREATE TABLE.+?`(.+?)`/', $q, $m)) {
$ex = 1;
$tab = $m[1];
$this->addLog(sprintf($this->LNG['restore_TC'], $tab));
//mysql_query("DROP TABLE IF EXISTS `{$tab}`");
if((!empty($this->JOB['correct']) && !empty($this->JOB['charset']))){
$q = preg_replace('/(DEFAULT)?\s*(CHARSET|CHARACTER SET|COLLATE)[=\s]+\w+/i', '', $q) . (V_MYSQL < 40100 ? '' : ' DEFAULT CHARSET=' . $this->JOB['charset']);
}
elseif(empty($this->JOB['charset'])){
if(preg_match("/(CHARACTER SET|CHARSET)[=\s]+(\w+)/i", $q, $charset)){
$this->setNames($charset[2]);
}
}
}
break;
case '-' && $q{1} == '-':
case '#':
$repeat = true;
$q = ltrim(substr($q, strpos($q, $this->JOB['eol'])));
$ex = 0;
break;
case '/':
case 'S':
if (preg_match('/SET NAMES (\w+)/', $q, $m)) {
$this->JOB['charset'] = $m[1];
$this->setNames($this->JOB['charset']);
$ex = 0;
}
else $ex = 1;
break;
default:
$insert = '';
$ex = 1;
$ei = 0;
}
} while ($repeat);
if($ex) {
$this->rtl[3] = ftell($this->fh_tmp) - $seek;
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
fwrite($this->fh_rtl, implode("\t", $this->rtl));
error_log("-----------------\n{$q}\n", 3, "sql.log");
if(mysql_query($q)) {
if($insert) {
$c = 1;
}
}
else {
error_log("-----------------\n{$q}\n", 3, "error.log");
sxd_my_error();
}
if($c){
$i = mysql_affected_rows();
$this->rtl[3] = ftell($this->fh_tmp) - $seek;
$this->rtl[7] += $i;
$this->rtl[10] += $i;
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
fwrite($this->fh_rtl, implode("\t", $this->rtl));
$c = 1;
}
}
}
$this->rtl[4] = 'EOJ';
$this->rtl[5] = round(array_sum(explode(' ', microtime())) - $this->rtl[11], 4);
$this->rtl[7] = 0;
$this->rtl[8] = 0;
fseek($this->fh_rtl, 0);
fwrite($this->fh_rtl, implode("\t", $this->rtl));
$this->addLog(sprintf($this->LNG['restore_end'], $this->JOB['db']));
fclose($this->fh_log);
fclose($this->fh_rtl);
}
function addBackupJob($job) {
$this->closeConnect();
// Создаем новое задание
$this->JOB = $job;
mysql_select_db($this->JOB['db']);
// Создаем список объектов и фильтр
$filter = $object = array();
$this->createFilters($this->JOB['obj'], $filter, $object);
$queries = array(
array('TABLE STATUS', 'Name', 'TA')
);
if (V_MYSQL > 50014) {
$queries[] = array("PROCEDURE STATUS WHERE db='{$this->JOB['db']}'", 'Name', 'PR');
$queries[] = array("FUNCTION STATUS WHERE db='{$this->JOB['db']}'", 'Name', 'FU');
$queries[] = array('TRIGGERS', 'Trigger', 'TR');
if(V_MYSQL > 50100) $queries[] = array('EVENTS', 'Name', 'EV');
}
$todo = $header = array();
$tabs = $rows = 0;
$only_create = explode(' ', $this->CFG['only_create']);
foreach($queries AS $query){
$t = $query[2];
if($t == 'TA' && (!empty($object['TC']) || !empty($filter['TC']))) {}
elseif(empty($object[$t]) && empty($filter[$t])) continue;
$r = mysql_query('SHOW ' . $query[0]) or sxd_my_error();
if (!$r) continue;
$todo[$t] = array();
$header[$t] = array();
while($item = mysql_fetch_assoc($r)){
$n = $item[$query[1]];
switch($t){
case 'TA':
case 'TC':
if(V_MYSQL > 40101 && is_null($item['Engine']) && preg_match('/^VIEW/i', $item['Comment'])) {
if(sxd_check($n, $object['VI'], $filter['VI'])){
$todo['VI'] = array();
$header['VI']= array();
}
continue;
}
elseif(sxd_check($n, $object['TA'], $filter['TA'])){
$engine = V_MYSQL > 40101 ? $item['Engine'] : $item['Type'];
$t = in_array($engine, $only_create) ? 'TC' : 'TA';
}
elseif(sxd_check($n, $object['TC'], $filter['TC'])) {
$t = 'TC';
$item['Rows'] = $item['Data_length'] = '';
}
else continue;
$todo['TA'][] = array($t, $n, !empty($item['Collation']) ? $item['Collation'] : '', $item['Auto_increment'], $item['Rows'], $item['Data_length']);
$header['TA'][] = "{$n}`{$item['Rows']}`{$item['Data_length']}";
$tabs++;
$rows += $item['Rows'];
break;
default:
if(sxd_check($n, $object[$t], $filter[$t])) {
$todo[$t][] = array($t, $n, !empty($item['collation_connection']) ? $item['collation_connection'] : '');
$header[$t][] = $n;
}
}
}
}
if (V_MYSQL > 50014 && (!empty($object['VI']) || !empty($filter['VI']))) {
// Бэкап обзоров, нужно отсортировать зависимые
$r = mysql_query("SELECT table_name, view_definition /*!50121 , collation_connection */ FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_SCHEMA = '{$this->JOB['db']}'") or sxd_my_error();
$views = $dumped = $views_collation = array();
$re = "/`{$this->JOB['db']}`.`(.+?)`/";
while($item = mysql_fetch_assoc($r)){
preg_match_all($re, preg_replace("/^select.+? from/i", '', $item['view_definition']), $m);
$used = $m[1];
$views_collation[$item['table_name']] = !empty($item['collation_connection']) ? $item['collation_connection'] : '';
$views[$item['table_name']] = $used;
}
while (count($views) > 0) {
foreach($views AS $n => $view) {
$can_dumped = true;
foreach($view AS $k) {
if (isset($views[$k]) && !isset($dumped[$k])) $can_dumped = false;
}
if ($can_dumped) {
if(sxd_check($n, $object['VI'], $filter['VI'])){
$todo['VI'][] = array('VI', $n, $views_collation[$n]);
$header['VI'][] = $n;
}
$dumped[$n] = 1;
unset($views[$n]);
}
}
}
unset($dumped);
unset($views);
unset($views_collation);
}
$this->JOB['file_tmp'] = $this->CFG['backup_path'] . $this->JOB['job'] . '.tmp';
$this->JOB['file_rtl'] = $this->CFG['backup_path'] . $this->JOB['job'] . '.rtl';
$this->JOB['file_log'] = $this->CFG['backup_path'] . $this->JOB['job'] . '.log';
$this->JOB['file_stp'] = $this->CFG['backup_path'] . $this->JOB['job'] . '.stp';
if(file_exists($this->JOB['file_stp'])) unlink($this->JOB['file_stp']);
$this->fh_tmp = $this->openFile($this->JOB['file_tmp'], 'w');
$this->JOB['file'] = sprintf('%s_%s.%s', (isset($this->JOB['title']) ? $this->JOB['job'] : $this->JOB['db']), date('Y-m-d_H-i-s'), $this->JOB['file_ext']);
$this->JOB['file_name'] = $this->CFG['backup_path'] . $this->JOB['file'];
$this->JOB['todo'] = $todo;
$this->saveJob($this->JOB['job'], $this->JOB);
$fcache = implode('|', array('#SXD20', V_SXD, V_MYSQL, V_PHP, date('Y.m.d H:i:s'), $this->JOB['db'], $this->JOB['charset'], $tabs, $rows, sxd_esc($this->JOB['comment'], false))) . "\n";
foreach($header AS $t => $o){
if (!empty($o)) $fcache .= "#{$t} " . implode('|', $o) . "\n";
}
$this->fh_rtl = fopen($this->JOB['file_rtl'], 'wb');
$this->fh_log = fopen($this->JOB['file_log'], 'wb');
$this->rtl = array(time(), time(), $rows, 0, '', '', '', 0, 0, 0, 0, TIMER, "\n");
$fcache .= "#EOH\n\n";
$this->write($fcache);
$this->addLog(sprintf($this->LNG['backup_begin'], $this->JOB['db']));
$this->runBackupJob();
}
function runBackupJob($continue = false){
if($continue){
$this->fh_tmp = $this->openFile($this->JOB['file_tmp'], 'a');
mysql_select_db($this->JOB['db']);
}
mysql_query("SET SQL_QUOTE_SHOW_CREATE = 1");
$types = array('VI' => 'View', 'PR' => 'Procedure', 'FU' => 'Function', 'TR' => 'Trigger', 'EV' => 'Event');
$fcache = '';
$writes = 0;
if(V_MYSQL > 40101) mysql_query("SET SESSION character_set_results = '" . ($this->JOB['charset'] ? $this->JOB['charset'] : 'binary') ."'") or sxd_my_error();
$time_old = time();
$exit_time = $time_old + $this->CFG['time_web'] - 1;
$no_cache = V_MYSQL < 40101 ? 'SQL_NO_CACHE ' : '';
foreach($this->JOB['todo'] AS $t => $o){
if (empty($this->rtl[4])) $this->rtl[4] = $t;
elseif ($this->rtl[4] != $t) continue;
foreach($o AS $n){
if (empty($this->rtl[5])) {
$this->rtl[5] = $n[1];
$this->rtl[7] = 0;
$this->rtl[8] = !empty($n[4]) ? $n[4] : 0;
}
elseif ($this->rtl[5] != $n[1]) continue;
// Делаем бэкап
switch($n[0]){
case 'TC':
case 'TD':
case 'TA':
$from = '';
if ($n[0] == 'TC' || $this->rtl[7] == 0){
// Бэкап структуры таблицы
$r = mysql_query("SHOW CREATE TABLE `{$n[1]}`") or sxd_my_error();
$item = mysql_fetch_assoc($r);
$fcache .= "#\tTC`{$n[1]}`{$n[2]}\t;\n{$item['Create Table']}\t;\n";
$this->addLog(sprintf($this->LNG['backup_TC'], $n[1]));
$this->rtl[7] = 0;
if($n[0] == 'TC' || !$n[4]) break;
// Бэкапим данные таблицы
$fcache .= "#\tTD`{$n[1]}`{$n[2]}\t;\nINSERT INTO `{$n[1]}` VALUES \n";
}
else {
$from = " LIMIT {$this->rtl[7]}, {$this->rtl[8]}";
$this->addLog(sprintf("{$this->LNG['backup_TC']} {$this->LNG['continue_from']}", $n[1], $this->rtl[7]));
}
// Определяем типы полей
$notNum = array();
$r = mysql_query("SHOW COLUMNS FROM `{$n[1]}`") or sxd_my_error();
$fields = 0;
while($col = mysql_fetch_array($r)) {
// TODO: проверить типы SET, ENUM и BIT
$notNum[$fields] = preg_match("/^(tinyint|smallint|mediumint|bigint|int|float|double|real|decimal|numeric|year)/", $col['Type']) ? 0 : 1;
$fields++;
}
$time_old = time();
$z = 0;
// Достаем данные
$r = mysql_unbuffered_query("SELECT {$no_cache}* FROM `{$n[1]}`{$from}");
while($row = mysql_fetch_row($r)) {
if (strlen($fcache) >= 61440) {
$z = 0;
if($time_old < time()) {
if(file_exists($this->JOB['file_stp'])){
$type = file_get_contents($this->JOB['file_stp']);
$this->rtl[9] = !empty($type) ? $type : 2;
$this->write($fcache);
if($type == 1) {
}
unset($this->rtl);
exit;
}
$time_old = time();
if($time_old >= $exit_time){
$this->rtl[9] = 3;
$this->write($fcache);
unset($this->rtl);
exit;
}
clearstatcache();
}
$this->write($fcache);
}
for($k = 0; $k < $fields; $k++){
if(!isset($row[$k])) {$row[$k] = '\N';}
elseif($notNum[$k]) {$row[$k] = '\'' . mysql_real_escape_string($row[$k]) . '\'';} // TODO: Потестить скорость эскэйпинга строк
}
$fcache .= '(' . implode(',', $row) . "),\n";
$this->rtl[7]++;
$this->rtl[10]++;
}
unset($row);
mysql_free_result($r);
$fcache = substr_replace($fcache, "\t;\n", -2, 2);
break;
default:
if(V_MYSQL < 50121 && $n[0] == 'TR'){
// SHOW CREATE TRIGGER отсутствует до MySQL 5.1.21
$r = mysql_query("SELECT * FROM `INFORMATION_SCHEMA`.`TRIGGERS` WHERE `TRIGGER_SCHEMA` = '{$this->JOB['db']}' AND `TRIGGER_NAME` = '{$n[1]}'") or sxd_my_error();
$item = mysql_fetch_assoc($r);
$fcache .= "#\tTR`{$n[1]}`{$n[2]}\t;\nCREATE TRIGGER `{$item['TRIGGER_NAME']}` {$item['ACTION_TIMING']} {$item['EVENT_MANIPULATION']} ON `{$item['EVENT_OBJECT_TABLE']}` FOR EACH ROW {$item['ACTION_STATEMENT']}\t;\n";
}
else {
$this->addLog(sprintf($this->LNG['backup_' . $n[0]], $n[1]));
$r = mysql_query("SHOW CREATE {$types[$n[0]]} `{$n[1]}`") or sxd_my_error();
$item = mysql_fetch_assoc($r);
$fcache .= "#\t{$n[0]}`{$n[1]}`{$n[2]}\t;\n" . preg_replace("/DEFINER=`.+?`@`.+?` /", '', ($n[0] == 'TR' ? $item['SQL Original Statement'] : $item['Create ' . $types[$n[0]]])) . "\t;\n";
}
}
$this->rtl[5] = '';
}
$this->rtl[4] = '';
}
$this->rtl[4] = 'EOJ';
$this->rtl[5] = round(array_sum(explode(' ', microtime())) - $this->rtl[11], 4);
$this->rtl[6] = '';
$this->rtl[7] = 0;
$this->rtl[8] = 0;
$this->write($fcache);
fclose($this->fh_tmp);
rename($this->JOB['file_tmp'], $this->JOB['file_name']);
$this->addLog(sprintf($this->LNG['backup_end'], $this->JOB['db']));
if(file_exists('sxd2ftp.php')) include('sxd2ftp.php');
if ($this->JOB['del_time'] || $this->JOB['del_count']) {
$this->addLog($this->LNG['autodelete']);
$deldate = '';
if (!empty($this->JOB['del_time'])){ // Удаление по дням
$deldate = date("Y-m-d_H-i-s", time() - intval($this->JOB['del_time']) * 86400);
}
$deleted = false;
if ($dh = opendir($this->CFG['backup_path'])) {
$files = array();
$name = isset($this->JOB['title']) ? $this->JOB['job'] : $this->JOB['db'];
while (false !== ($file = readdir($dh))) {
if (preg_match("/^{$name}_(\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2})\.sql/", $file, $m)) {
if ($deldate && $m[1] < $deldate) {
if(unlink($this->CFG['backup_path'] . $file)) $this->addLog(sprintf($this->LNG['del_by_date'], $file));
else $this->addLog(sprintf($this->LNG['del_fail'], $file));
$deleted = true;
}
else {$files[$m[1]] = $file;}
}
}
closedir($dh);
// Сортируем файлы по дате и удаляем самые старые
if (!empty($this->JOB['del_count'])){
ksort($files);
$file_to_delete = count($files) - $this->JOB['del_count'];
foreach ($files AS $file){
if ($file_to_delete-- > 0){
if(unlink($this->CFG['backup_path'] . $file)) $this->addLog(sprintf($this->LNG['del_by_count'], $file));
else $this->addLog(sprintf($this->LNG['del_fail'], $file));
$deleted = true;
}
}
}
}
if(!$deleted) $this->addLog($this->LNG['del_nothing']);
}
fclose($this->fh_log);
fclose($this->fh_rtl);
}
function setNames($collation){
if(empty($collation)) return;
if($this->rtl[6] != $collation) {
mysql_query('SET NAMES \'' . preg_replace('/^(\w+?)_/', '\\1\' COLLATE \'\\1_', $collation) . '\'') or sxd_my_error();
/*if(!$this->rtl[7])*/ $this->addLog(sprintf($this->LNG['set_names'], $collation));
$this->rtl[6] = $collation;
}
}
function write(&$str){
fseek($this->fh_rtl, 0);
$this->rtl[1] = time();
$this->rtl[3] += fwrite($this->fh_tmp, $str);
fwrite($this->fh_rtl, implode("\t", $this->rtl));
$str = '';
}
function addLog($str, $type = 1){
fwrite($this->fh_log, date('Y.m.d H:i:s') . "\t{$type}\t{$str}\n");
}
function getDBList(){
$dbs = $items = array();
if (!V_MYSQL) return $dbs;
$qq = (V_MYSQL < 50000) ? '' : '\'';
if ($this->CFG['my_db']) {
$tmp = explode(',', $this->CFG['my_db']);
foreach($tmp AS $d){
$d = trim($d);
$items[] = $qq . sxd_esc($d, false) . $qq;
$dbs[$d] = "{$d} (0)";
}
}
else{
$result = mysql_query("SHOW DATABASES") or sxd_my_error();
while($item = mysql_fetch_row($result)){
if($item[0] == 'information_schema' || $item[0] == 'mysql' || $item[0] == 'performance_schema') continue;
$items[] = $qq . sxd_esc($item[0], false) . $qq;
$dbs[$item[0]] = "{$item[0]} (0)";
}
}
if(V_MYSQL < 50000){
foreach($items AS $item){
$tables = mysql_query("SHOW TABLES FROM `{$item}`") or sxd_my_error();
if ($tables) {
$tabs = mysql_num_rows($tables);
$dbs[$item] = "{$item} ({$tabs})";
}
}
}
else {
$where = (count($items) > 0) ? 'WHERE `table_schema` IN (' . implode(',', $items) . ')' : '';
$result = mysql_query("SELECT `table_schema`, COUNT(*) FROM `information_schema`.`tables` {$where} GROUP BY `table_schema`") or sxd_my_error();
while($item = mysql_fetch_row($result)){
if($item[0] == 'information_schema' || $item[0] == 'mysql' || $item[0] == 'performance_schema') continue;
$dbs[$item[0]] = "{$item[0]} ({$item[1]})";
}
}
return $dbs;
}
function getCharsetList(){
$tmp = array(0 => '- auto -');
if (!V_MYSQL) return $tmp;
if(V_MYSQL > 40101) {
$def_charsets = '';
if(!empty($this->CFG['charsets'])){
$def_charsets = preg_match_all("/([\w*?]+)\s*/", $this->CFG['charsets'], $m, PREG_PATTERN_ORDER) ? '/^(' . str_replace(array('?','*'), array('.','\w+?'), implode('|', $m[1])) . ')$/i' : '';
}
$r = mysql_query("SHOW CHARACTER SET") or sxd_my_error();
if ($r) {
while($item = mysql_fetch_assoc($r)){
if (empty($def_charsets) || preg_match($def_charsets, $item['Charset'])) $tmp[$item['Charset']] = "{$item['Charset']}"; // ({$item['Description']})
}
}
}
return $tmp;
}
function getCollationList(){
$tmp = array();
if (!V_MYSQL) return $tmp;
if(V_MYSQL > 40101) {
$def_charsets = '';
if(!empty($this->CFG['charsets'])){
$def_charsets = preg_match_all("/([\w*?]+)\s*/", $this->CFG['charsets'], $m, PREG_PATTERN_ORDER) ? '/^(' . str_replace(array('?','*'), array('.','\w+?'), implode('|', $m[1])) . ')$/i' : '';
}
$r = mysql_query("SHOW COLLATION") or sxd_my_error();
if ($r) {
while($item = mysql_fetch_assoc($r)){
if (empty($def_charsets) || preg_match($def_charsets, $item['Charset'])) $tmp[$item['Charset']][$item['Collation']] = $item['Default'] == 'Yes' ? 1 : 0;
}
}
}
return $tmp;
}
function getObjects($tree, $db_name){
mysql_select_db($db_name);
// Достаем таблицы
$r = mysql_query('SHOW TABLE STATUS');
$tab_prefix_last = $tab_prefix = '*';
$objects = array('TA' => array(), 'VI' => array(), 'PR' => array(), 'FU' => array(), 'TR' => array(), 'EV' => array());
if($r){
while($item = mysql_fetch_assoc($r)){
if(V_MYSQL > 40101 && is_null($item['Engine']) && preg_match('/^VIEW/i', $item['Comment'])) {
$objects['VI'][]= $item['Name'];
}
else{
$objects['TA'][] = array($item['Name'], $item['Rows'], $item['Data_length']);
}
}
if (V_MYSQL > 50014 && $tree != 'services') {
$shows = array(
"PROCEDURE STATUS WHERE db='{$db_name}'",
"FUNCTION STATUS WHERE db='{$db_name}'",
'TRIGGERS'
);
if(V_MYSQL > 50100) $shows[] = "EVENTS WHERE db='{$db_name}'";
// TODO: Поправить проверку событий и триггеров
for($i = 0, $l = count($shows); $i < $l; $i++){
$r = mysql_query('SHOW ' . $shows[$i]);
if($r && mysql_num_rows($r) > 0) {
$col_name = $shows[$i] == 'TRIGGERS' ? 'Trigger' : 'Name';
$type = substr($shows[$i], 0, 2);
while($item = mysql_fetch_assoc($r)){
$objects[$type][] = $item[$col_name];
}
}
}
}
else {
$objects['VI'] = array();
}
}
return $this->formatTree($tree, $objects);
}
function getFileObjects($tree, $name, $formatTree = true){
// Достаем таблицы
$objects = array('TA' => array(), 'VI' => array(), 'PR' => array(), 'FU' => array(), 'TR' => array(), 'EV' => array());
if(!preg_match('/\.sql(\.(gz|bz2))?$/i', $name, $m)) return '';
$name = $this->CFG['backup_path'] . $name;
if(!is_readable($name)) {return "sxd.tree.{$tree}.error(sxd.lng('err_fopen'))";}
$fp = $this->openFile($name, 'r');
$temp = fread($fp, 60000);
// Формат файла Sypex Dumper 2 - SXD20
//if(!preg_match('/^(#SXD20\|.+?)\n#EOH\n/s', $temp, $m)) return "sxd.tree.{$tree}.error(sxd.lng('err_sxd2'));z('restore_savejob').disabled = z('restore_runjob').disabled = true;";
if(preg_match('/^(#SXD20\|.+?)\n#EOH\n/s', $temp, $m)){
$head = explode("\n", $m[1]);
$h = explode('|', $head[0]);
for($i = 1, $c = count($head); $i < $c; $i++){
$objects[substr($head[$i], 1,2)] = explode('|', substr($head[$i], 4));
}
for($i = 0, $l = count($objects['TA']); $i < $l; $i++){
$objects['TA'][$i] = explode('`', $objects['TA'][$i]);
}
}
else {
$h[9] = '';
}
return $formatTree ? $this->formatTree($tree, $objects) . "sxd.comment.restore.value = '{$h[9]}';z('restore_savejob').disabled = z('restore_runjob').disabled = false;" : $objects;
}
function formatTree($tree, &$objects){
$obj = '';
$pid = $row = 1;
$info = array(
'TA' => array($this->LNG['obj_tables'], 1),
'VI' => array($this->LNG['obj_views'], 3),
'PR' => array($this->LNG['obj_procs'], 5),
'FU' => array($this->LNG['obj_funcs'], 7),
'TR' => array($this->LNG['obj_trigs'], 9),
'EV' => array($this->LNG['obj_events'], 11)
);
// Находим таблицы с префиксами
$tab_prefix_last = $tab_prefix = '*';
for($i = 0, $l = count($objects['TA']); $i < $l; $i++){
$t = $objects['TA'][$i];
$tab_prefix = preg_match("/^([a-z0-9]+_)/", $t[0], $m) ? $m[1] : '*';
if ($tab_prefix != $tab_prefix_last) {
if ($tab_prefix != '*') $objects['TA']['*'][] = $tab_prefix;
$tab_prefix_last = $tab_prefix;
}
$objects['TA'][$tab_prefix][] = $t;
unset($objects['TA'][$i]);
}
foreach($objects AS $type => $o){
if(!count($o)) continue;
if($type == 'TA') {
$open_childs = count($o['*']) > 1 ? 0 : 1;
$obj .= "[{$row},0," . sxd_esc($info[$type][0]) . ",1,1,1],";
$row++;
foreach($o['*'] AS $value){
if(is_string($value)){
if(count($o[$value]) > 1) {
$obj .= "[{$row},1,'{$value}*',1,1,{$open_childs}],";
$pid = $row++;
for($i = 0, $l = count($o[$value]); $i < $l; $i++){
$checked = ($o[$value][$i][1] == '' && $o[$value][$i][2] == '') ? 2 : 1;
$obj .= "[{$row},{$pid}," . sxd_esc($o[$value][$i][0]) . ",2,{$checked},{$o[$value][$i][2]}],";
$row++;
}
}
else {
$value = $o[$value][0];
}
}
//$pid = 1;
if (is_array($value)){
$checked = ($value[1] == '' && $value[2] == '') ? 2 : 1;
$obj .= "[{$row},1,'{$value[0]}',2,{$checked},{$value[2]}],";
$row++;
}
}
}
else {
$obj .= "[{$row},0," . sxd_esc($info[$type][0]) . ",{$info[$type][1]},1,1],";
$pid = $row++;
$info[$type][1]++;
for($i = 0, $l = count($o); $i < $l; $i++){
$o[$i] = sxd_esc($o[$i], false);
$obj .= "[{$row},{$pid},'{$o[$i]}',{$info[$type][1]},1,0],";
$row++;
}
}
}
$add = '';
if($tree == 'restore') $add = "z('autoinc').disabled = z('restore_type').disabled = " . ($obj ? 'false' : 'true') . ";";
return ($obj ? 'sxd.tree.' . $tree . '.drawTree([' . substr_replace($obj, ']', -1) . ");" : "sxd.tree.{$tree}.error(sxd.lng('err_sxd2'));") . $add;
}
function getFileList(){
$files = array();
if (is_dir($this->CFG['backup_path']) && false !== ($handle = opendir($this->CFG['backup_path']))) {
while (false !== ($file = readdir($handle))) {
if (preg_match("/^.+?\.sql(\.(gz|bz2))?$/", $file)) {
$files[$file] = $file;
}
}
closedir($handle);
}
ksort($files);
return $files;
}
function getSavedJobs(){
$sj = array('sj_backup' => array(), 'sj_restore' => array(),);
if (is_dir($this->CFG['backup_path']) && false !== ($handle = opendir($this->CFG['backup_path']))) {
while (false !== ($file = readdir($handle))) {
if (preg_match("/^sj_(.+?)\.job.php$/", $file)) {
include($this->CFG['backup_path'] . $file);
$sj['sj_' . $JOB['type']][$JOB['job']] = "<b>{$JOB['job']}</b><br><i>{$JOB['title']} </i>";
}
}
closedir($handle);
}
if(count($sj['sj_backup']) > 0){
ksort($sj['sj_backup']);
}
else {
$sj['sj_backup'] = array(0 => '<b>No Saved Jobs</b><br>' . $this->LNG['no_saved']);
}
if(count($sj['sj_restore']) > 0){
ksort($sj['sj_restore']);
}
else {
$sj['sj_restore'] = array(0 => '<b>No Saved Jobs</b><br>' . $this->LNG['no_saved']);
}
return "sxd.clearOpt('sj_backup');sxd.clearOpt('sj_restore');sxd.addOpt(" . sxd_php2json($sj) . ");";
}
function getFileListExtended(){
$files = array();
if (is_dir($this->CFG['backup_path']) && false !== ($handle = opendir($this->CFG['backup_path']))) {
while (false !== ($file = readdir($handle))) {
if (preg_match("/^.+?\.sql(\.(gz|bz2))?$/", $file, $m)) {
$fp = $this->openFile($this->CFG['backup_path'] . $file, 'r');
$ext = !empty($m[2]) ? $m[2] : 'sql';
$temp = fgets($fp);
if(preg_match('/^(#SXD20\|.+?)\n/s', $temp, $m)){
$h = explode('|', $m[1]);
$files[] = array($h[5], substr($h[4], 0, -3), $ext, $h[7], number_format($h[8], 0, '', ' '), filesize($this->CFG['backup_path'] . $file), $h[9], $file);
}
elseif(preg_match('/^(#SKD101\|.+?)\n/s', $temp, $m)){
$h = explode('|', $m[1]);
$files[] = array($h[1], substr($h[3], 0, -3), $ext, $h[2], number_format($h[4], 0, '', ' '), filesize($this->CFG['backup_path'] . $file), 'SXD 1.0.x', $file);
}
else {
$files[] = array($file, '-', $ext, '-', '-', filesize($this->CFG['backup_path'] . $file), '', $file);
}
}
}
closedir($handle);
}
function s($a, $b){
return strcmp($b[1], $a[1]);
}
usort($files, 's');
return 'sxd.files.clear();sxd.files.add(' . sxd_php2json($files) . ');';
}
function saveJob($job, $config){
$this->saveToFile($this->CFG['backup_path'] . $job . '.job.php', "<?php\n\$JOB = " . var_export($config, true) . ";\n" . "?>");
}
function openFile($name, $mode){
if($mode == 'r') {
if(preg_match('/\.(sql|sql\.bz2|sql\.gz)$/i', $name, $m)) $this->JOB['file_ext'] = strtolower($m[1]);
}
else{
switch($this->JOB['zip']) {
case 0 : $this->JOB['file_ext'] = 'sql'; break;
case 10: $this->JOB['file_ext'] = 'sql.bz2'; break;
default: $this->JOB['file_ext'] = 'sql.gz'; break;
}
}
switch ($this->JOB['file_ext']){
case 'sql':
return fopen($name, "{$mode}b");
break;
case 'sql.bz2':
return bzopen($name, $mode);
break;
case 'sql.gz':
return gzopen($name, $mode . ($mode == 'w' ? $this->JOB['zip'] : ''));
break;
default: return false;
}
}
}
function sxd_read_sql($f, &$seek, $ei, $delimiter = "\t;", $eol = "\n"){
static $l = '';
static $r = 0;
$fs = ftell($f);
$delim_len = strlen($delimiter . $eol);
while($r || $s = fread($f, 61440)){
if(!$r) $l .= $s;
$pos = strpos($l, $delimiter . $eol);
if ($pos !== false) {
// Есть окончание запроса
$q = substr($l, 0, $pos);
$l = substr($l, $pos+$delim_len);
$r = 1;
$seek = strlen($l);
return $q;
}
if($ei) {
$pos = strrpos($l, $eol);
if($pos > 0 && $l{$pos-1} === ',') {
// Окончание не найдено
$q = substr($l, 0, $pos-1);
$l = substr($l, $pos+ strlen($eol));
$seek = strlen($l);
$r = 0;
return $q;
}
}
$r = 0;
}
if (!empty($l)) {
return $l;
}
return false;
}
function sxd_check($n, $obj, $filt){
return isset($obj[$n]) || ($filt && preg_match($filt, $n));
}
function sxd_php2json($obj){
if(count($obj) == 0) return '[]';
$is_obj = isset($obj[0]) && isset($obj[count($obj) - 1]) ? false : true;
$str = $is_obj ? '{' : '[';
foreach ($obj AS $key => $value) {
$str .= $is_obj ? "'" . addcslashes($key, "\n\r\t'\\/") . "'" . ':' : '';
if (is_array($value)) $str .= sxd_php2json($value);
elseif (is_null($value)) $str .= 'null';
elseif (is_bool($value)) $str .= $value ? 'true' : 'false';
elseif (is_numeric($value)) $str .= $value;
else $str .= "'" . addcslashes($value, "\n\r\t'\\/") . "'";
$str .= ',';
}
return substr_replace($str, $is_obj ? '}' : ']', -1);
}
function sxd_ver2int($ver){
return preg_match("/^(\d+)\.(\d+)\.(\d+)/", $ver, $m) ? sprintf("%d%02d%02d", $m[1], $m[2], $m[3]) : 0;
}
function sxd_error_handler($errno, $errmsg, $filename, $linenum, $vars){
global $SXD;
if($SXD->try) return;
if($errno == 8192) return;
if(strpos($errmsg, 'timezone settings')) return;
$errortype = array(1 => 'Error', 2 => 'Warning', 4 => 'Parsing Error', 8 => 'Notice', 16 => 'Core Error', 32 => 'Core Warning', 64 => 'Compile Error',
128 => 'Compile Warning', 256 => 'MySQL Error', 512 => 'Warning', 1024 => 'Notice',
2048 => 'Strict', 8192 => 'Deprecated', 16384 => 'Deprecated');
$str = sxd_esc("{$errortype[$errno]}: {$errmsg} ({$filename}:{$linenum})", false);
if(SXD_DEBUG) error_log("[index.php]\n{$str}\n", 3, "backup/error.log");
if($errno == 8 || $errno == 1024) {
if (!$SXD->fh_log && !$SXD->fh_rtl) echo isset($_POST['ajax']) ? "alert('" . ($str) . "');" : $str;
else {
fwrite($SXD->fh_log, date('Y.m.d H:i:s') . "\t3\t{$str}\n");
}
}
elseif($errno < 1024) {
$SXD->error = true;
if (!$SXD->fh_log && !$SXD->fh_rtl) echo isset($_POST['ajax']) ? "alert('" . ($str) . "');" : $str;
else {
$SXD->rtl[1] = time();
$SXD->rtl[9] = 5;
fseek($SXD->fh_rtl, 0);
fwrite($SXD->fh_rtl, implode("\t", $SXD->rtl));
fwrite($SXD->fh_log, date('Y.m.d H:i:s') . "\t4\t{$str}\n");
unset($SXD->rtl);
}
die;
}
}
function sxd_esc($str, $quoted = true){
return $quoted ? "'" . addcslashes($str, "\\\0\n\r\t\'") . "'" : addcslashes($str, "\\\0\n\r\t\'");
}
function sxd_my_error(){
trigger_error(mysql_error(), E_USER_ERROR);
}
function sxd_shutdown(){
global $SXD;
if(isset($SXD->fh_rtl) && is_resource($SXD->fh_rtl) && !empty($SXD->rtl) && empty($SXD->error)) {
$SXD->rtl[1] = time();
if(!empty($SXD->JOB['file_stp']) && file_exists(dirname(__FILE__) . '/' . $SXD->JOB['file_stp'])){
$type = file_get_contents(dirname(__FILE__) . '/' . $SXD->JOB['file_stp']);
$SXD->rtl[9] = !empty($type) ? $type : 2;
}
else $SXD->rtl[9] = 5;
fseek($SXD->fh_rtl, 0);
fwrite($SXD->fh_rtl, implode("\t", $SXD->rtl));
}
}
function sxd_antimagic($arr){
return is_array($arr) ? array_map('sxd_antimagic', $arr) : stripslashes($arr);
}
================================================
FILE: admin/sxd/info.php
================================================
<?php
// Sypex Dumper 2
header("Content-Type: text/html; charset=utf-8");
error_reporting(0);
set_error_handler("sxd_error");
if(!empty($_POST['ajax']['job']) && preg_match("/^[\w-]+$/", $_POST['ajax']['job'])){
$d = date("'Y.m.d H:i:s'");
if(!empty($_COOKIE['sxd'])) {
include('ses.php');
if(!empty($SES[$_COOKIE['sxd']])) {
$CFG = &$SES[$_COOKIE['sxd']]['cfg'];
include(load_lang($SES[$_COOKIE['sxd']]['lng']));
}
}
if(empty($LNG)) {
include('cfg.php');
include(load_lang($CFG['lang']));
if(!empty($CFG['auth'])) {echo "sxd.log.add({$d},[" . esc($LNG['stop_5']) . " (1)]);sxd.hideLoading();"; exit;}
}
$job_name = $_POST['ajax']['job'];
$log_seek = !empty($_POST['ajax']['lseek']) ? (int) $_POST['ajax']['lseek'] : 0;
$job_file = "{$CFG['backup_path']}{$job_name}.job.php";
if (!file_exists($job_file)) exit;
include($job_file);
switch($_POST['ajax']['act']) {
case 'info':
if (!file_exists($JOB['file_rtl'])) exit;
$fh = fopen($JOB['file_rtl'], 'r+b');
$time = time();
$f = explode("\t", fgets($fh));
if(empty($f[0])) $f[0] = $time;
$pt = !empty($f[2]) ? round(100 * $f[10] / $f[2], 2) : 100;
$pc = !empty($f[8]) ? round(100 * $f[7] / $f[8], 2) : 100;
$lh = fopen($JOB['file_log'], 'rb');
fseek($lh, $log_seek);
$rawlog = fread($lh, 8192);
$log = '';
$old_time = '';
$logs = array();
if(!empty($rawlog)){
$temp = explode("\n", $rawlog);
foreach($temp AS $l){
if(empty($l)) continue;
$t = explode("\t", $l);
if(count($t) < 3) continue;
if($t[0] != $old_time){
if(!empty($logs)) $log .= "sxd.log.add('{$old_time}',[" . implode(',', $logs) . "]);";
$old_time = $t[0];
$logs = array();
}
$logs[] = esc($t[2]);
}
if(!empty($logs)) $log .= "sxd.log.add('{$old_time}',[" . implode(',', $logs) . "]);";
}
$log_seek = ftell($lh);
echo $log . "sxd.job.log_seek = {$log_seek};";
// Читаем лог
if($f[4] == 'EOJ') {
$pt = $pc = 100;
fclose($lh);
fclose($fh);
if (function_exists('usleep')) usleep(400000);
else sleep(1);
if($JOB['act'] == 'backup') $f[3] = filesize(file_exists($JOB['file_name']) ? $JOB['file_name'] : $JOB['file_tmp']);
// Обновляем список файлов
if($JOB['act'] == 'backup') print "sxd.actions.filelist(); z('btn_down').file = '{$JOB['file']}'; z('btn_down').style.display = '';";
echo "sxd.timer.set({$f[0]},{$f[1]},{$pt});sxd.progress.current.set({$pc}, 0, {$f[8]}, {$f[8]});sxd.progress.total.set({$pt},{$f[3]});";
echo "sxd.log.add({$d},['{$LNG['job_done']}', '{$LNG['js']['records']}: {$f[10]}', '{$LNG['file_size']}: ' + sxd.formatSize({$f[3]},2), '{$LNG['job_time']}: {$f[5]} {$LNG['seconds']}']);sxd.hideLoading();";
unlink($JOB['file_log']);
unlink($JOB['file_rtl']);
unlink($job_file);
}
else if($f[9] > 0){
echo "sxd.log.add({$d},[" . esc($LNG['stop_' . $f[9]]) . "]);" . (($f[9] == 3 || $f[9] == 4) ? 'sxd.resumeJob();' : 'sxd.hideLoading();');
}
else{
if($JOB['act'] == 'backup') $f[3] = filesize(file_exists($JOB['file_name']) ? $JOB['file_name'] : $JOB['file_tmp']);
if($f[4] != 'EK' && time() > $f[1] + 45) {
fopen($JOB['file_stp'],'w');
$f[9] = 0;
$f[1] = $time;
fwrite($fh, implode("\t", $f) . "\n");
echo "sxd.log.add({$d},[" . esc($LNG['job_freeze']) . "]);sxd.hideLoading();z('btn_resume').style.display = '';z('btn_pause').style.display = 'none';";
}
echo "sxd.timer.set({$f[0]},{$time},{$pt});sxd.progress.current.set({$pc},0,{$f[7]}, {$f[8]});sxd.progress.total.set({$pt},{$f[3]});";
}
break;
case 'stop':
$fs = fopen($JOB['file_stp'],'w');
fwrite($fs, 1);
echo "sxd.log.add({$d},[" . esc($LNG['stop_job']) . "]);";
break;
case 'pause':
fopen($JOB['file_stp'],'w');
echo "sxd.log.add({$d},[" . esc($LNG['stop_job']) . "]);";
break;
}
}
else echo "sxd.hideLoading();";
function load_lang($lng_name = 'auto'){
if($lng_name == 'auto'){
include('lang/list.php');
$lng = 'en';
if(preg_match_all('/[a-z]{2}(-[a-z]{2})?/', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $m)) {
foreach($m[0] AS $l){
if(isset($langs[$l])){
$lng_name = $l;
break;
}
}
}
}
if(file_exists("lang/lng_{$lng_name}.php")) return "lang/lng_{$lng_name}.php";
else return "lang/lng_en.php";
}
function esc($str){
return "'" . addcslashes($str, "\\\0\n\r\t\'") . "'";
}
function sxd_error($errno, $errmsg, $filename, $linenum, $vars){
global $JOB;
if($errno == 8192) return;
if(strpos($errmsg, 'timezone settings')) return;
if(!empty($JOB['file_stp'])) fopen($JOB['file_stp'],'w');
$errortype = array(1 => 'Error', 2 => 'Warning', 4 => 'Parsing Error', 8 => 'Notice', 16 => 'Core Error', 32 => 'Core Warning', 64 => 'Compile Error',
128 => 'Compile Warning', 256 => 'User Error', 512 => 'User Warning', 1024 => 'User Notice');
$str = "{$errortype[$errno]}: {$errmsg} ({$filename}:{$linenum})";
//error_log("[info.php]\n{$str}\n", 3, "error.log");
if($errno == 8 || $errno == 1024) {
echo "sxd.log.add('" . date("Y.m.d H:i:s") . "',[" . esc($str) . "], 4);sxd.hideLoading();";
}
elseif($errno < 1024) {
echo "sxd.log.add('" . date("Y.m.d H:i:s") . "',[" . esc($str) . "], 4);sxd.hideLoading();";
die;
}
}
================================================
FILE: admin/sxd/lang/index.htm
================================================
================================================
FILE: admin/sxd/lang/list.php
================================================
<?php
$langs = array (
'en' => 'English',
'ru' => 'Русский',
'uk' => 'Українська',
);
?>
================================================
FILE: admin/sxd/lang/lng_en.php
================================================
<?php
// Language File for Sypex Dumper 2
$LNG = array(
// Information about the language file
'ver' => 20005, // Dumper version
'translated' => 'zapimir (http://sypex.net/)', // Contacts
'name' => 'English', // Lang name
// Toolbar
'tbar_backup' => 'Export',
'tbar_restore' => 'Import',
'tbar_files' => 'Files',
'tbar_services' => 'Services',
'tbar_options' => 'Options',
'tbar_createdb' => 'Create DB',
'tbar_connects' => 'Connection',
'tbar_exit' => 'Exit',
// Names of objects in the tree
'obj_tables' => 'Tables',
'obj_views' => 'Views',
'obj_procs' => 'Procedures',
'obj_funcs' => 'Functions',
'obj_trigs' => 'Triggers',
'obj_events' => 'Events',
// Export
'zip_max' => 'max',
'zip_min' => 'min',
'zip_none' => 'Uncompressed',
'default' => 'default',
'combo_db' => 'Database (Schema):',
'combo_charset' => 'Charset:',
'combo_zip' => 'Compression:',
'combo_comments' => 'Comment:',
'del_legend' => 'Autodelete if:',
'del_date' => 'age of files more than %s days',
'del_count' => 'number of files more than %s',
'tree' => 'Select objects:',
'no_saved' => 'No saved jobs',
'btn_save' => 'Save',
'btn_exec' => 'Execute',
// Import
'combo_file' => 'File:',
'combo_strategy' => 'Restore strategy:',
'ext_legend' => 'Extended options:',
'correct' => 'Charset correction',
'autoinc' => 'Reset AUTO_INCREMENT',
// Log
'status_current' => 'Current status:',
'status_total' => 'Total status:',
'time_elapsed' => 'Elapsed:',
'time_left' => 'Left:',
'btn_stop' => 'Abort',
'btn_pause' => 'Pause',
'btn_resume' => 'Resume',
'btn_again' => 'Repeat',
'btn_clear' => 'Clear log',
// Files
'btn_delete' => 'Delete',
'btn_download' => 'Download',
'btn_open' => 'Open',
// Services
'opt_check' => 'Options for Check:',
'opt_repair' => 'Options for Repair:',
'btn_delete_db' => 'Delete DB',
'btn_check' => 'Check',
'btn_repair' => 'Repair',
'btn_analyze' => 'Analyze',
'btn_optimize' => 'Optimize',
// Options
'cfg_legend' => 'Basic settings:',
'cfg_time_web' => 'Timelimit web (seconds):',
'cfg_time_cron' => 'Timelimit cron (seconds):',
'cfg_backup_path' => 'Path to backup directory:',
'cfg_backup_url' => 'URL to backup directory:',
'cfg_globstat' => 'Global statistics:',
'cfg_extended' => 'Extended settings:',
'cfg_charsets' => 'Charset filter:',
'cfg_only_create' => 'Only create types:',
'cfg_auth' => 'Authorization chain:',
'cfg_confirm' => 'Ask confirmation for:',
'cfg_conf_import' => 'import',
'cfg_conf_file' => 'file delete',
'cfg_conf_db' => 'database delete',
// Connection
'con_header' => 'Connection Settings',
'connect' => 'Connection',
'my_host' => 'Host:',
'my_port' => 'Port:',
'my_user' => 'User:',
'my_pass' => 'Password:',
'my_pass_hidden' => 'Password is not shown',
'my_comp' => 'Compression protocol',
'my_db' => 'Databases:',
'btn_cancel' => 'Cancel',
// Save Job
'sj_header' => 'Save job',
'sj_job' => 'Job',
'sj_name' => 'Name (eng.):',
'sj_title' => 'Description:',
// Create DB
'cdb_header' => 'Create new database',
'cdb_detail' => 'Details',
'cdb_name' => 'Name:',
'combo_collate' => 'Collation:',
'btn_create' => 'Create',
// Authorization
'js_required' => 'JavaScript must be enabled',
'auth' => 'Authorization',
'auth_user' => 'User:',
'auth_remember' => 'remember',
'btn_enter' => 'Enter',
'btn_details' => 'Details',
// Log messages
'not_found_rtl' => 'RTL-file not exists',
'backup_begin' => 'Start export DB `%s`',
'backup_TC' => 'Export table `%s`',
'backup_VI' => 'Export view `%s`',
'backup_PR' => 'Export procedure `%s`',
'backup_FU' => 'Export function `%s`',
'backup_EV' => 'Export event `%s`',
'backup_TR' => 'Export trigger `%s`',
'continue_from' => 'from positions %s',
'backup_end' => 'Export database `%s` finished.',
'autodelete' => 'Autodelete of old files:',
'del_by_date' => '- `%s` - deleted (by date)',
'del_by_count' => '- `%s` - deleted (by count)',
'del_fail' => '- `%s` - delete fail',
'del_nothing' => '- no files to delete',
'set_names' => 'Set connection encoding: `%s`',
'restore_begin' => 'Start import DB `%s`',
'restore_TC' => 'Import table `%s`',
'restore_VI' => 'Import view `%s`',
'restore_PR' => 'Import procedure `%s`',
'restore_FU' => 'Import function `%s`',
'restore_EV' => 'Import event `%s`',
'restore_TR' => 'Import trigger `%s`',
'restore_keys' => 'Enable indexes',
'restore_end' => 'DB `%s` restored from a backup.',
'stop_1' => 'Execution aborted by user',
'stop_2' => 'Execution stopped by user',
'stop_3' => 'Execution stopped by timer',
'stop_4' => 'Execution stopped by timeout',
'stop_5' => 'Execution aborted because of an error',
'job_done' => 'Job successful',
'file_size' => 'File size',
'job_time' => 'Time spent',
'seconds' => 'seconds',
'job_freeze' => 'The process has not been updated for more than 30 seconds. Click Resume',
'stop_job' => 'Stop request',
// For JS
'js' => array(
// Tabs names
'backup' => 'Export database (schema)',
'restore' => 'Import database (schema)',
'log' => 'Log',
'result' => 'Results',
'files' => 'Files',
'services' => 'Services',
'options' => 'Options',
// Tables header
'dt' => 'Date/time',
'action' => 'Action',
'db' => 'Database',
'type' => 'Type',
'tab' => 'Tabs',
'records' => 'Records',
'size' => 'Size',
'comment' => 'Comments',
// AJAX Status
'load' => 'Loading',
'run' => 'Running...',
'sdb' => 'Create new database',
'sc' => 'Save connection',
'sj' => 'Save job',
'so' => 'Save options',
// Messages
'pro' => 'Option available only in Pro-version',
'err_fopen' => 'Unable to open file',
'err_sxd2' => 'View file contents available only for files created by Sypex Dumper 2',
'err_empty_db' => 'Database is empty',
'fdc' => 'Do you really want to delete file?',
'ddc' => 'Do you really want to delete database?',
'fic' => 'Do you really want to import file?',
// Sizes
'sizes' => array('B', 'KB', 'MB', 'GB'),
)
);
?>
================================================
FILE: admin/sxd/lang/lng_ru.php
================================================
<?php
// Language File for Sypex Dumper 2
$LNG = array(
// Информация о файле локализации
'ver' => 20005, // Для какой версии предназначен файл
'translated' => 'zapimir (http://sypex.net/)', // Контакты переводчика
'name' => 'Русский', // Название языка
// Панель инструментов
'tbar_backup' => 'Экспорт',
'tbar_restore' => 'Импорт',
'tbar_files' => 'Файлы',
'tbar_services' => 'Сервисы',
'tbar_options' => 'Опции',
'tbar_createdb' => 'Создать БД',
'tbar_connects' => 'Соединение',
'tbar_exit' => 'Выход',
// Названия объектов в дереве
'obj_tables' => 'Таблицы',
'obj_views' => 'Представления',
'obj_procs' => 'Процедуры',
'obj_funcs' => 'Функции',
'obj_trigs' => 'Триггеры',
'obj_events' => 'События',
// Экспорт
'zip_max' => 'максимум',
'zip_min' => 'минимум',
'zip_none' => 'Без сжатия',
'default' => 'по умолчанию',
'combo_db' => 'База данных:',
'combo_charset' => 'Кодировка:',
'combo_zip' => 'Сжатие:',
'combo_comments' => 'Комментарий:',
'del_legend' => 'Автоудаление, если:',
'del_date' => 'файлам больше %s дней',
'del_count' => 'количество файлов более %s',
'tree' => 'Выберите объекты:',
'no_saved' => '*Нет сохраненных задач',
'btn_save' => 'Сохранить',
'btn_exec' => 'Выполнить',
// Импорт
'combo_file' => 'Файл:',
'combo_strategy' => 'Стратегия восстановления:',
'ext_legend' => 'Дополнительные опции:',
'correct' => 'Коррекция кодировки',
'autoinc' => 'Обнулить AUTO_INCREMENT',
// Лог
'status_current' => 'Текущий статус:',
'status_total' => 'Общий статус:',
'time_elapsed' => 'Прошло:',
'time_left' => 'Осталось:',
'btn_stop' => 'Прервать',
'btn_pause' => 'Пауза',
'btn_resume' => 'Продолжить',
'btn_again' => 'Повторить',
'btn_clear' => 'Очистить лог',
// Файлы
'btn_delete' => 'Удалить',
'btn_download' => 'Скачать',
'btn_open' => 'Открыть',
// Сервисы
'opt_check' => 'Опции для Проверить:',
'opt_repair' => 'Опции для Починить:',
'btn_delete_db' => 'Удалить БД',
'btn_check' => 'Проверить',
'btn_repair' => 'Починить',
'btn_analyze' => 'Анализировать',
'btn_optimize' => 'Оптимизировать',
// Опции
'cfg_legend' => 'Основные настройки:',
'cfg_time_web' => 'Время выполнения в web (сек.):',
'cfg_time_cron' => 'Время выполнения в cron (сек.):',
'cfg_backup_path' => 'Путь к каталогу backup:',
'cfg_backup_url' => 'URL к каталогу backup:',
'cfg_globstat' => 'Глобальная статистика:',
'cfg_extended' => 'Расширенные настройки:',
'cfg_charsets' => 'Фильтр для кодировок:',
'cfg_only_create' => 'Бэкап только структуры:',
'cfg_auth' => 'Цепочка авторизации:',
'cfg_confirm' => 'Спрашивать подтверждение для:',
'cfg_conf_import' => 'импорта БД',
'cfg_conf_file' => 'удаления файла',
'cfg_conf_db' => 'удаления БД',
// Соединение
'con_header' => 'Параметры соединения',
'connect' => 'Соединение',
'my_host' => 'Хост:',
'my_port' => 'Порт:',
'my_user' => 'Пользователь:',
'my_pass' => 'Пароль:',
'my_pass_hidden' => 'Пароль не показан',
'my_comp' => 'Протокол со сжатием',
'my_db' => 'Базы данных:',
'btn_cancel' => 'Отмена',
// Сохранение задания
'sj_header' => 'Сохранение задания',
'sj_job' => 'Задание',
'sj_name' => 'Имя (англ.):',
'sj_title' => 'Описание:',
// Создание БД
'cdb_header' => 'Создание базы данных',
'cdb_detail' => 'Детали',
'cdb_name' => 'Название:',
'combo_collate' => 'Сравнение',
'btn_create' => 'Создать',
// Авторизация
'js_required' => 'JavaScript должен быть включен',
'auth' => 'Авторизация',
'auth_user' => 'Пользователь:',
'auth_remember' => 'Запомнить',
'btn_enter' => 'Войти',
'btn_details' => 'Детали',
// Сообщения в логе
'not_found_rtl' => 'Отсутствует RTL-файл',
'backup_begin' => 'Начало экспорта БД `%s`',
'backup_TC' => 'Экспорт таблицы `%s`',
'backup_VI' => 'Экспорт представления `%s`',
'backup_PR' => 'Экспорт процедуры `%s`',
'backup_FU' => 'Экспорт функции `%s`',
'backup_EV' => 'Экспорт события `%s`',
'backup_TR' => 'Экспорт триггера `%s`',
'continue_from' => 'с позиции %s',
'backup_end' => 'Резервная копия БД `%s` создана.',
'autodelete' => 'Автоудаление старых файлов:',
'del_by_date' => '- `%s` - удален (по дате)',
'del_by_count' => '- `%s` - удален (по дате)',
'del_fail' => '- `%s` - удалить не удалось',
'del_nothing' => '- нет файлов для удаления',
'set_names' => 'Установлена кодировка соединения: `%s`',
'restore_begin' => 'Начало импорта БД `%s`',
'restore_TC' => 'Импорт таблицы `%s`',
'restore_VI' => 'Импорт представления `%s`',
'restore_PR' => 'Импорт процедуры `%s`',
'restore_FU' => 'Импорт функции `%s`',
'restore_EV' => 'Импорт события `%s`',
'restore_TR' => 'Импорт триггера `%s`',
'restore_keys' => 'Включение индексов',
'restore_end' => 'БД `%s` восстановлена из резервной копии.',
'stop_1' => 'Выполнение прервано пользователем',
'stop_2' => 'Выполнение остановлено пользователем',
'stop_3' => 'Выполнение остановлено по таймеру',
'stop_4' => 'Выполнение остановлено по таймауту',
'stop_5' => 'Выполнение прервано из-за ошибки',
'job_done' => 'Задание успешно выполнено',
'file_size' => 'Размер файла',
'job_time' => 'Времени затрачено',
'seconds' => 'сек.',
'job_freeze' => 'Процесс не обновлялся более 30 секунд. Нажмите Продолжить',
'stop_job' => 'Запрос на остановку',
// Надписи в JS
'js' => array(
// Названия вкладок
'backup' => 'Экспорт базы данных',
'restore' => 'Импорт базы данных',
'log' => 'Лог действий',
'result' => 'Результат выполнения',
'files' => 'Файлы резервных копий',
'services' => 'Сервисы',
'options' => 'Опции',
// Заголовки таблиц
'dt' => 'Дата и время',
'action' => 'Действие',
'db' => 'База данных',
'type' => 'Тип',
'tab' => 'Табл.',
'records' => 'Записей',
'size' => 'Размер',
'comment' => 'Комментарий',
// Статусы
'load' => 'Загрузка',
'run' => 'Выполнение...',
'sdb' => 'Создание базы данных',
'sc' => 'Сохранение соединения',
'sj' => 'Сохранение задания',
'so' => 'Сохранение опций',
// Сообщения
'pro' => 'Опция доступна только в Pro-версии',
'err_fopen' => 'Не удается открыть файл',
'err_sxd2' => 'Просмотр содержимого файла доступен только для файлов созданных Sypex Dumper 2',
'err_empty_db' => 'База данных пустая',
'fdc' => 'Вы действительно хотите удалить файл?',
'ddc' => 'Вы действительно хотите удалить базу данных?',
'fic' => 'Вы действительно хотите импортировать файл?',
// Сокращения размеров файла
'sizes' => array('Б', 'КБ', 'МБ', 'ГБ'),
)
);
?>
================================================
FILE: admin/sxd/lang/lng_uk.php
================================================
<?php
// Language File for Sypex Dumper 2
$LNG = array(
// Информация о файле локализации
'ver' => 20005, // Для какой версии дампера предназначен файл
'translated' => 'dmytro (http://sypex.net/)', // Контакты переводчика
'name' => 'Українська', // Название языка
// Панель инструментов
'tbar_backup' => 'Експорт',
'tbar_restore' => 'Імпорт',
'tbar_files' => 'Файли',
'tbar_services' => 'Сервіси',
'tbar_options' => 'Опції',
'tbar_createdb' => 'Створити БД',
'tbar_connects' => 'З’єднання',
'tbar_exit' => 'Вихід',
// Названия объектов в дереве
'obj_tables' => 'Таблиці',
'obj_views' => 'Представлення',
'obj_procs' => 'Процедури',
'obj_funcs' => 'Функції',
'obj_trigs' => 'Тригери',
'obj_events' => 'Події',
// Экспорт
'zip_max' => 'максимум',
'zip_min' => 'мінімум',
'zip_none' => 'Без стиснення',
'default' => 'стандартно',
'combo_db' => 'База даних:',
'combo_charset' => 'Кодування:',
'combo_zip' => 'Стиснення:',
'combo_comments' => 'Коментар:',
'del_legend' => 'Автовидалення, якщо:',
'del_date' => 'файлам більше %s днів',
'del_count' => 'кількість файлів понад %s',
'tree' => 'Виберіть об’єкти:',
'no_saved' => 'Немає збережених завдань',
'btn_save' => 'Зберегти',
'btn_exec' => 'Виконати',
// Импорт
'combo_file' => 'Файл:',
'combo_strategy' => 'Стратегія відновлення:',
'ext_legend' => 'Додаткові опції:',
'correct' => 'Корекція кодування',
'autoinc' => 'Обнулити AUTO_INCREMENT',
// Лог
'status_current' => 'Поточний статус:',
'status_total' => 'Загальний статус:',
'time_elapsed' => 'Пройшло:',
'time_left' => 'Залишилося:',
'btn_stop' => 'Перервати',
'btn_pause' => 'Пауза',
'btn_resume' => 'Продовжити',
'btn_again' => 'Повторити',
'btn_clear' => 'Очистити лог',
// Файлы
'btn_delete' => 'Видалити',
'btn_download' => 'Завантажити',
'btn_open' => 'Відкрити',
// Сервисы
'opt_check' => 'Опції для Перевірити:',
'opt_repair' => 'Опції для Полагодити:',
'btn_delete_db' => 'Видалити БД',
'btn_check' => 'Перевірити',
'btn_repair' => 'Полагодити',
'btn_analyze' => 'Аналізувати',
'btn_optimize' => 'Оптимізувати',
// Опции
'cfg_legend' => 'Основні налаштування:',
'cfg_time_web' => 'Час виконання у web (сек.):',
'cfg_time_cron' => 'Час виконання у cron (сек.):',
'cfg_backup_path' => 'Шлях до каталогу backup:',
'cfg_backup_url' => 'URL до каталогу backup:',
'cfg_globstat' => 'Глобальна статистика:',
'cfg_extended' => 'Розширені налаштування:',
'cfg_charsets' => 'Фільтр для кодувань:',
'cfg_only_create' => 'Бекап лише структури:',
'cfg_auth' => 'Ланцюжок авторизації:',
'cfg_confirm' => 'Запитувати підтвердження для:',
'cfg_conf_import' => 'імпорту БД',
'cfg_conf_file' => 'видалення файлу',
'cfg_conf_db' => 'видалення БД',
// Соединение
'con_header' => 'Параметри з’єднання',
'connect' => 'З’єднання',
'my_host' => 'Хост:',
'my_port' => 'Порт:',
'my_user' => 'Користувач:',
'my_pass' => 'Пароль:',
'my_pass_hidden' => 'Пароль не відображається',
'my_comp' => 'Протокол із стисненням',
'my_db' => 'Бази даних:',
'btn_cancel' => 'Відміна',
// Сохранение задания
'sj_header' => 'Збереження завдання',
'sj_job' => 'Завдання',
'sj_name' => 'Ім’я (англ.):',
'sj_title' => 'Опис:',
// Создание БД
'cdb_header' => 'Створення бази даних',
'cdb_detail' => 'Деталі',
'cdb_name' => 'Назва:',
'combo_collate' => 'Порівняння',
'btn_create' => 'Створити',
// Авторизация
'js_required' => 'JavaScript має бути ввімкнено',
'auth' => 'Авторизація',
'auth_user' => 'Користувач:',
'auth_remember' => 'Запам’ятати',
'btn_enter' => 'Увійти',
'btn_details' => 'Деталі',
// Сообщения в логе
'not_found_rtl' => 'Відсутній RTL-файл',
'backup_begin' => 'Початок експорту БД `%s`',
'backup_TC' => 'Експорт таблиці `%s`',
'backup_VI' => 'Експорт представлення `%s`',
'backup_PR' => 'Експорт процедури `%s`',
'backup_FU' => 'Експорт функції `%s`',
'backup_EV' => 'Експорт події `%s`',
'backup_TR' => 'Експорт тригера `%s`',
'continue_from' => 'з позиції %s',
'backup_end' => 'Резервна копія БД `%s` створена.',
'autodelete' => 'Автовидалення старих файлів:',
'del_by_date' => '- `%s` - видалений (по даті)',
'del_by_count' => '- `%s` - видалений (по даті)',
'del_fail' => '- `%s` - видалити не вдалося',
'del_nothing' => '- немає файлів для видалення',
'set_names' => 'Встановлено кодування з’єднання: `%s`',
'restore_begin' => 'Початок імпорту БД `%s`',
'restore_TC' => 'Імпорт таблиці `%s`',
'restore_VI' => 'Імпорт представлення `%s`',
'restore_PR' => 'Імпорт процедури `%s`',
'restore_FU' => 'Імпорт функції `%s`',
'restore_EV' => 'Імпорт події `%s`',
'restore_TR' => 'Імпорт тригера `%s`',
'restore_keys' => 'Включення індексів',
'restore_end' => 'БД `%s` відновлена з резервної копії.',
'stop_1' => 'Виконання перервано користувачем',
'stop_2' => 'Виконання зупинено користувачем',
'stop_3' => 'Виконання зупинено по таймеру',
'stop_4' => 'Виконання зупинено по таймауту',
'stop_5' => 'Виконання перервано із-за помилки',
'job_done' => 'Завдання успішно виконано',
'file_size' => 'Розмір файлу',
'job_time' => 'Часу витрачено',
'seconds' => 'сек.',
'job_freeze' => 'Процес не оновлювався більше 30 секунд. Натисніть Продовжити',
'stop_job' => 'Запит на зупинку',
// Надписи в JS
'js' => array(
// Названия вкладок
'backup' => 'Експорт бази даних',
'restore' => 'Імпорт бази даних',
'log' => 'Лог дій',
'result' => 'Результат виконання',
'files' => 'Файли резервних копій',
'services' => 'Сервіси',
'options' => 'Опції',
// Заголовки таблиц
'dt' => 'Дата і час',
'action' => 'Дія',
'db' => 'База даних',
'type' => 'Тип',
'tab' => 'Табл.',
'records' => 'Записів',
'size' => 'Розмір',
'comment' => 'Коментар',
// Статусы
'load' => 'Завантаження',
'run' => 'Виконання...',
'sdb' => 'Створення бази даних',
'sc' => 'Збереження з’єднання',
'sj' => 'Збереження завдання',
'so' => 'Збереження опцій',
// Сообщения
'pro' => 'Опція доступна лише у версії Pro',
'err_fopen' => 'Не вдається відкрити файл',
'err_sxd2' => 'Перегляд вмісту файлу доступний лише для файлів створених Sypex Dumper 2',
'err_empty_db' => 'База даних порожня',
'fdc' => 'Ви дійсно бажаєте видалити файл?',
'ddc' => 'Ви дійсно бажаєте видалити базу даних?',
'fic' => 'Ви дійсно бажаєте імпортувати файл?',
// Сокращения размеров файла
'sizes' => array('Б', 'КБ', 'МБ', 'ГБ'),
)
);
?>
================================================
FILE: admin/sxd/lang/update.php
================================================
<?php
// Sypex Dumper 2 langfile updater
$path = './';
$langlist = array();
if (false !== ($handle = opendir($path))) {
while (false !== ($file = readdir($handle))) {
if (preg_match("/^lng_([a-z]{2}(-[a-z]{2})?)\.php$/", $file, $m)) {
include($path . $file);
$langlist[$m[1]] = $LNG['name'];
}
}
closedir($handle);
if(count($langlist) > 0){
$fp = fopen('list.php', 'w');
fwrite($fp, "<?php\n\$langs = " . var_export($langlist, 1) . ";\n?>");
}
}
echo 'Langlist updated';
?>
================================================
FILE: admin/sxd/load.php
================================================
<?php
error_reporting(0);
if(!empty($_SERVER['QUERY_STRING']) && preg_match("/^(\w+)(\.v\d+)?(pro)?\.(lng\.js|js|css|gif|png|ico)$/", $_SERVER['QUERY_STRING'], $m)){
$compress = true;
$skin = '';
$file = $skin;
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 1209600) . ' GMT');
header('Cache-Control: max-age=1209600, public');
switch($m[4]) {
case 'css': $type = 'text/css; charset=UTF-8'; break;
case 'js': $type = 'application/x-javascript; charset=UTF-8'; break;
case 'lng.js':
header('Content-Type: application/x-javascript; charset=UTF-8');
//if(!ini_get('zlib.output_compression') && function_exists('ob_gzhandler')) ob_start('ob_gzhandler');
include("lang/lng_{$m[1]}.php");
echo 'sxdlng = ' . sxd_php2json($LNG['js']) . ';';
exit;
case 'png': $file = 'img/'; $type = 'image/png';$compress = false; break;
case 'gif': $file = 'img/'; $type = 'image/gif';$compress = false; break;
case 'ico': $file = ''; $type = 'image/x-icon';$compress = false; break;
}
$file .= $m[1] . '.' . $m[4];
if(is_file($file)){
//if($compress) if(!ini_get('zlib.output_compression') && function_exists('ob_gzhandler')) ob_start('ob_gzhandler');
header('Content-Type: ' . $type);
readfile($file);exit;
}
}
function sxd_php2json($obj){
if(count($obj) == 0) return '[]';
$is_obj = isset($obj[count($obj) - 1]) ? false : true;
$str = $is_obj ? '{' : '[';
foreach ($obj AS $key => $value) {
$str .= $is_obj ? "'" . addcslashes($key, "\n\r\t'\\/") . "'" . ':' : '';
if (is_array($value)) $str .= sxd_php2json($value);
elseif (is_null($value)) $str .= 'null';
elseif (is_bool($value)) $str .= $value ? 'true' : 'false';
elseif (is_numeric($value)) $str .= $value;
else $str .= "'" . addcslashes($value, "\n\r\t'\\/") . "'";
$str .= ',';
}
return substr_replace($str, $is_obj ? '}' : ']', -1);
}
================================================
FILE: admin/sxd/readme_en.txt
================================================
Installing
1.Unzip it and upload the contents of the directory to the server.
2.Set chmod 777 for backup directory.
3.Set chmod 666 for files cfg.php and ses.php.
Using
1.Open an URL http://domain.com/sxd/ in browser.
2.Enter the username and password for your database.
Please report problems and bugs to the forum, indicating your versions of browser, php and mysql.
================================================
FILE: admin/sxd/readme_ru.txt
================================================
Sypex Dumper 2:
.
chmod 777 backup
chmod 666 777 cfg.php ses.php
url http://mysite.net/sxd/, mysql.
http://sypex.net/forum/ , php mysql
================================================
FILE: admin/sxd/sxd.css
================================================
html{height:100%;overflow:auto;margin:0;}body{min-height:100%;position:relative;overflow:hidden;background-color:#f0f0f0;margin:0;}* html body{height:100%;}td{border:0;padding:0;}td,input,select,textarea,div{font:11px tahoma,verdana;color:#000;}fieldset{padding:3px;}form{display:inline;margin:0;}#overlay{display:none;position:absolute;top:0;left:0;background-color:#000;z-index:100;width:100%;height:100%;opacity:.2;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);}legend{color:#215a91;padding:0 4px;}#main_div{position:absolute;left:50%;top:50%;width:580px;border:1px solid #919B9C;text-align:left;cursor:default;margin:-231px 0 0 -292px;padding:1px;}#header{font:13px verdana,arial;color:#fff;height:100%;font-weight:700;margin-bottom:1px;background-color:#306191;padding:3px 5px;}#name{font-size:12px;font-weight:700;background-color:#fff;border-bottom:1px solid #ccc9b8;padding:6px 5px;}#loading{float:right;padding-right:20px;height:16px;line-height:16px;font-size:10px;color:#777;background:url(load.php?load.gif) no-repeat right;visibility:hidden;}.content{height:100%;background-color:#fcfbfe;filter:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#FCFBFE,endColorStr=#F4F3EE);padding-top:2px;}.content td{padding:0 6px 6px;}input.text{border:1px solid #7f9db9;width:200px;}input.txt{width:100%;height:14px;border:1px solid;border-color:#abadb3 #dbdfe6 #e3e9ef #e2e3ea;margin:0;}input.txt2{height:20px;width:100%;border-width:0;padding:0;}textarea{border:0;width:100%;height:42px;overflow:auto;margin:0;}.border{border:1px solid;overflow:hidden;background-color:#fff;border-color:#abadb3 #dbdfe6 #e3e9ef #e2e3ea;}.dialog{display:none;z-index:1000;background-color:#f0f0f0;border:1px solid #919B9C;width:321px;position:absolute;top:50%;left:50%;margin:-83px 0 0 -160px;padding:1px;}.dialog .header{font:12px verdana,arial;color:#fff;height:100%;font-weight:700;margin-bottom:1px;background-color:#306191;padding:3px 5px;}#dia_auth{display:block;}.header a{text-decoration:none;color:#fff;}.dialog td{padding:0;}.i202{width:192px;}.zTree{overflow:auto;border:1px solid #828790;background-color:#fff;-moz-user-select:none;-khtml-user-select:none;user-select:none;cursor:default;width:312px;height:320px;}.zTree ul{margin:3px;padding:0;}.zTree .close ul{display:none;}.zTree li > ul{list-style-type:none;background:url(data:image/gif;base64,R0lGODlhAgACAIAAAB4dGf///yH5BAEAAAEALAAAAAACAAIAAAICRF4AOw==) 5px 0 repeat-y;padding-left:16px;margin:0;}.zTree li.dl > ul{background:none;}.zTree li{font:11px Tahoma;line-height:18px;margin:0;padding:0;}.zTree li > div{background:url(load.php?tree.png) no-repeat 0 18px;height:18px;white-space:nowrap;}.zTree a{text-decoration:none;color:#000;padding-right:3px;white-space:nowrap;cursor:default;min-height:16px;}.zTree a:hover{background-color:#eff8fd;}.zTree span{font:10px Tahoma;color:#bbb;margin-left:4px;}.zTree a:hover span{color:#555;}.zTree i{display:inline-block;vertical-align:middle;background:url(load.php?tree.png) no-repeat 0 18px;width:18px;height:18px;}.zTree a i{display:inline-block;vertical-align:middle;background:url(load.php?icons.png) no-repeat 16px 0;width:16px;height:16px;}.zTree .error{background-color:#f7f7f7;height:100%;}.zTree .error div{color:#777;text-align:center;padding-top:50%;display:block;}.zTBar{height:28px;padding-left:4px;cursor:default;-moz-user-select:none;-khtml-user-select:none;user-select:none;background:url(load.php?tb_bg.png) repeat-x;overflow:hidden;}.zTBar div{font:11px Tahoma;float:left;height:22px;background:url(load.php?tb_bg.png) repeat-x 0 26px;}.zTBar .lb,.zTBar .rb,.zTBar .mb{width:3px;}.zTBar .txt{height:16px;background:url(load.php?icons.png) no-repeat 0 0;white-space:nowrap;margin:4px 1px;padding:0 2px 0 22px;}.zTBar .spl{background-position:0 -50px;width:3px;margin:3px 2px;}.zTBar .more{width:7px;background-position:0 -160px;margin:0 2px;}.zTBar .ico{height:16px;width:16px;background:url(load.php?icons.png) no-repeat 0 -16px;margin:3px 1px;}.zSel{height:20px;background:url(load.php?sel_bg.png) repeat-x 0 0;-moz-user-select:none;-khtml-user-select:none;user-select:none;overflow:hidden;}.zSel div{cursor:default;float:left;height:20px;width:2px;background:url(load.php?sel_bg.png) repeat-x 0 0;}.zSel .arr{float:right;width:15px;}.zSel .txt{height:16px;line-height:14px;background:url(load.php?icons.png) no-repeat 0 -16px;white-space:nowrap;margin:2px 1px;padding:0 2px 0 22px;}.zSel .more{width:7px;background-position:0 -140px;margin:0 2px;}.zSelMenu{border:1px solid;background-color:red;border-color:#83868d #c6c7d2 #d2dbe5;}.zSelMenu div div{line-height:14px;padding:0 3px;}.zSelMenu i{font-size:11px;font-style:normal;color:#555;}.zSelMenu .ovr{background-color:#39f;color:#fff;}#sxdMenu{position:absolute;top:0;left:0;width:240px;height:100px;border:1px solid #828790;background-color:#fff;overflow:auto;cursor:default;display:none;}.zGrid table{table-layout:fixed;}.zGrid{border:1px solid #828790;overflow:hidden;margin-top:4px;background-color:#fff;cursor:default;padding:1px;}.zGrid th,.zGrid td{font-weight:400;text-align:left;text-overflow:ellipsis;white-space:nowrap;vertical-align:top;overflow:hidden;padding:2px 3px;}.zGrid td.wrap{white-space:normal;}.zGrid .header{overflow:hidden;background:url(load.php?log_bg.png) repeat-x;}.zGrid th{border:1px solid;border-color:#fff #e3e4e6 #d5d5d5 #fcfdfd;padding:3px 3px 4px;}.zGrid td{border:1px solid transparent;}.zGrid tr:hover td{background-color:#eff8fd;border-color:#eff8fd;}.zGrid tr.sel td{background-color:#d7effc;border-color:#d7effc;}.zProc{border:1px solid;float:left;height:14px;overflow:hidden;width:300px;background-color:#fff;}.zProc.green{border-color:#55994d;}.zProc.blue{border-color:#5170ab;}.zProc div{height:14px;}.zProc .top{position:inherit;margin-top:-14px;top:-14px;z-index:100;width:0;display:block;overflow:hidden;background:url(load.php?log_bg.png) repeat-x 0 22px;}.zProc.green .top{background-position:0 -22px;border-right:1px solid #55994d;}.zProc.blue .top{background-position:0 -36px;border-right:1px solid #5170ab;}.zProc .txt{width:300px;text-align:center;font-weight:700;}.zProc .bot .txt{color:#333;}.zProc .top .txt{color:#fff;}.progress td{padding:1px;}table,.i100{width:100%;}.caption,.zTBar .btn{margin:3px 0;}
================================================
FILE: admin/sxd/sxd.js
================================================
function z(el){return document.getElementById(el);}
var sxd={version:{num:20007,type:'lite',full:''},init:function(){var icons={' .lb':'0 -80px',' .rb':'-2px -80px',' .mb':'-4px -80px','.ovr':'0 -20px','.ovr .lb':'0 -100px','.ovr .rb':'-2px -100px','.ovr .mb':'-4px -100px','.ovr .arr':'0 -40px','.dwn':'0 -20px','.dwn .lb':'0 -100px','.dwn .rb':'-2px -120px','.dwn .mb':'-4px -120px','.dwn .arr':'0 -60px'};for(var ico in icons){this.css.add('.zSel'+ico+' {background-position:'+icons[ico]+';}');}
this.version.full=z('header').innerHTML;this.main=z('main_div');this.menu.el=z('sxdMenu');this.name=z('name').lastChild;this.loading=z('loading');this.overlay=z('overlay');this.progress.current=zProgressObject();this.progress.current.init('sxdProc1',1);this.progress.total=zProgressObject();this.progress.total.init('sxdProc2',2);this.tbar=zToolbarObject();this.tree.backup=zTreeObject();this.tree.backup.init('backup_tree',1);this.tree.restore=zTreeObject();this.tree.restore.init('restore_tree',2);this.tree.services=zTreeObject();this.tree.services.init('services_tree',3);this.comment.backup=z('backup_comment');this.comment.restore=z('restore_comment');this.timer.t1=z('sxdTime1');this.timer.t2=z('sxdTime2');this.timeout=null;this.log=zGridObject();this.log.init('sxdGrid1',{header:[[this.lng('dt'),120],[this.lng('action')]],width:565,height:286});this.files=zGridObject();this.files.init('sxdGrid2',{header:[[this.lng('db'),90],[this.lng('dt'),90],[this.lng('type'),30],[this.lng('tab'),30,1,this.lng('table')],[this.lng('records'),60,1],[this.lng('size'),45,1],[this.lng('comment')]],width:565,height:334});this.result=zGridObject();this.result.init('sxdGrid3',{header:[['Table',160],['Op',70],['Msg_type',50],['Msg_text']],width:565,height:334});this.addDialogs(['connect','createdb','savejob','charsets']);this.addTabs(['backup','restore','log','result','files','services','options']);},job:{name:'abcdefgh',stop:0,log_seek:0,type:''},menu:{el:null,type:'zSelMenu'},tabs:{},openTab:function(name){if(this.opened)this.tabs[this.opened].el.style.display='none';this.opened=name;this.name.innerHTML=this.tabs[name].name;this.tabs[name].el.style.display='';document.title=sxd.version.full;},addTabs:function(o){for(var i=0,l=o.length;i<l;i++){this.tabs[o[i]]={name:this.lng(o[i]),el:z('tab_'+o[i])};}
this.openTab(o[0]);},dialogs:{},addDialogs:function(o){for(var i=0,l=o.length;i<l;i++){this.dialogs[o[i]]=z('dia_'+o[i]);}},tbar:{},tree:{},options:{},progress:{},combos:{},comment:{},lng:function(s){return sxdlng[s]?sxdlng[s]:'[LNG: '+s+']';},timer:{set:function(time1,time2,proc){function lead0(i){return i<10?'0'+i:i;}
function sec2time(sec){return lead0(Math.floor(sec/60))+':'+lead0(sec%60);}
if(!time1&&!time2)this.t1.innerHTML='00:00',this.t2.innerHTML='00:00';else{var t=time2-time1;this.t1.innerHTML=sec2time(t);this.t2.innerHTML=sec2time(t>0&&proc>0?Math.round(t/(proc/100)-t):0);}}},actions:{db:function(){if(!this.value)return;if(this.name=='backup_db'||this.name=='services_db')sxd.ajax('index',sxd.lng('load'),{act:'load_db',name:this.name,value:this.value});},dblist:function(){sxd.ajax('index',sxd.lng('load'),{act:'dblist'});},filelist:function(){sxd.ajax('index',sxd.lng('load'),{act:'filelist'});},files:function(){if(!this.value)return;sxd.ajax('index',sxd.lng('load'),{act:'load_files',name:this.name,value:this.value});},tab_connects:function(){sxd.ajax('index',sxd.lng('load'),{act:'load_connect'});sxd.showDialog('connect');},tab_createdb:function(){sxd.showDialog('createdb');},tab_backup:function(){sxd.openTab('backup');if(sxd.tree.backup.load)sxd.combos.backup_db.action();},tab_restore:function(){sxd.openTab('restore');if(sxd.tree.restore.load)sxd.combos.restore_file.action();},tab_files:function(){sxd.ajax('index',sxd.lng('load'),{act:'load_files_ext'});sxd.openTab('files');},tab_services:function(){sxd.openTab('services');if(sxd.tree.services.load)sxd.combos.services_db.action();},tab_options:function(){sxd.ajax('index',sxd.lng('load'),{act:'load_options'});sxd.openTab('options');},tab_exit:function(){sxd.ajax('index',sxd.lng('load'),{act:'exit'});}},informer:function(){if(sxd.job.timer)clearTimeout(sxd.job.timer);if(sxd.job.stop)return;sxd.job.timer=setTimeout(function(){sxd.ajax('info',sxd.lng('run'),{job:sxd.job.name,act:'info',lseek:sxd.job.log_seek},1,function(){sxd.informer();});},250);},addDb:function(){sxd.ajax('index',this.lng('sdb'),{act:'add_db',name:z('db_name').value,charset:this.combos.db_charset.value,collate:this.combos.db_charset_col.value});sxd.hideDialog('createdb');},saveConnect:function(){sxd.ajax('index',this.lng('sc'),{act:'save_connect',host:z('con_host').value,port:z('con_port').value,user:z('con_user').value,pass:z('con_pass').changed?z('con_pass').value:null,comp:z('con_comp').checked?'1':'0',db:z('con_db').value});sxd.hideDialog('connect');z('con_pass').value='';},job2php:function(){return sxd.opened=='restore'||sxd.job.type=='restore'?{act:'restore',type:'restore',db:this.combos.restore_db.value,charset:this.combos.restore_charset.value,file:this.combos.restore_file.value,strategy:this.combos.restore_type.value,correct:z('correct').checked?1:0,autoinc:z('autoinc').checked?1:0,obj:this.tree.restore.save()}:{act:'backup',type:'backup',db:this.combos.backup_db.value,charset:this.combos.backup_charset.value,zip:this.combos.backup_zip.value,comment:this.comment.backup.value,del_time:z('del_time').value,del_count:z('del_count').value,obj:this.tree.backup.save()};},saveJob:function(){var t=this.job2php();t.job=z('sj_name').value,t.act='save_job',t.title=z('sj_title').value;sxd.ajax('index',this.lng('sj'),t);sxd.hideDialog('savejob');},runSavedJob:function(type,job){if(job==0)return;this.clearLogTab();sxd.job.name=job;sxd.job.type=type;sxd.job.act='run_savedjob';sxd.ajax('index',this.lng('run'),{act:'run_savedjob',type:type,job:job},1);this.openTab('log');z('btn_resume').style.display='none';z('btn_pause').style.display='';z('btn_stop').disabled=false;z('btn_pause').disabled=false;z('btn_again').disabled=true;sxd.job.stop=0;sxd.informer();},saveOptions:function(){sxd.confirms=z('conf_import').checked*1+z('conf_file').checked*2+z('conf_db').checked*4;sxd.ajax('index',this.lng('so'),{act:'save_options',time_web:z('time_web').value*1,time_cron:z('time_cron').value*1,backup_path:z('backup_path').value,backup_url:z('backup_url').value,globstat:z('globstat').checked?'1':'0',charsets:z('charsets').value,only_create:z('only_create').value,auth:z('auth').value,confirm:sxd.confirms});sxd.hideDialog('connect');z('con_pass').value='';},clearLogTab:function(){this.log.clear();this.timer.set(0);this.job.log_seek=0;this.progress.current.set(0);this.progress.total.set(0);},runBackup:function(){this.clearLogTab();z('btn_resume').style.display='none';z('btn_pause').style.display='';z('btn_down').style.display='none';z('btn_stop').disabled=false;z('btn_pause').disabled=false;z('btn_again').disabled=true;sxd.job.name=this.newJob();sxd.job.type='backup';var t=this.job2php();this.openTab('log');t.type='run',t.job=sxd.job.name;this.ajax('index',this.lng('run'),t,1);sxd.job.stop=0;sxd.informer();},stopJob:function(){z('btn_again').disabled=false;z('btn_stop').disabled=true;z('btn_pause').disabled=true;sxd.ajax('info',this.lng('run'),{job:sxd.job.name,act:'stop'},1);},pauseJob:function(){z('btn_again').disabled=false;z('btn_stop').disabled=true;z('btn_pause').disabled=true;sxd.ajax('info',this.lng('run'),{job:sxd.job.name,act:'pause'},1);z('btn_resume').style.display='';z('btn_pause').style.display='none';},resumeJob:function(){z('btn_stop').disabled=false;z('btn_pause').disabled=false;z('btn_again').disabled=true;sxd.ajax('index',this.lng('run'),{job:sxd.job.name,act:'resume'},1);z('btn_resume').style.display='none';z('btn_pause').style.display='';sxd.job.stop=0;sxd.informer();},runAgain:function(){if(sxd.job.act=='run_savedjob'){sxd.runSavedJob(sxd.job.type,sxd.job.name);}
else if(sxd.job.type=='backup'){sxd.runBackup();}
else if(sxd.job.type=='restore'){sxd.runRestore();}},runRestore:function(){if(sxd.confirms&1&&!confirm(sxd.lng('fic')))return;this.clearLogTab();z('btn_resume').style.display='none';z('btn_pause').style.display='';z('btn_down').style.display='none';z('btn_stop').disabled=false;z('btn_pause').disabled=false;z('btn_again').disabled=true;sxd.job.name=this.newJob();sxd.job.type='restore';var t=this.job2php();this.openTab('log');t.type='run',t.job=sxd.job.name;this.ajax('index',this.lng('run'),t,1);sxd.job.stop=0;sxd.informer();},runServices:function(type){switch(type){case'delete':if(sxd.confirms&4&&!confirm(sxd.lng('ddc')))return;sxd.ajax('index',sxd.lng('run'),{act:'delete_db',name:this.combos.services_db.value});return;}
this.result.clear();this.openTab('result');this.ajax('index',this.lng('run'),{act:'services',type:type,db:this.combos.services_db.value,check:this.combos.services_check.value,repair:this.combos.services_repair.value,obj:this.tree.services.save()});},runFiles:function(type,file){file=file||this.files.selected.file;switch(type){case'open':sxd.combos.restore_file.select(file);sxd.openTab('restore');break;case'download':location.href=sxd.backupUrl+file;break;case'delete':if(!file)return;if(sxd.confirms&2&&!confirm(sxd.lng('fdc')))return;sxd.ajax('index',sxd.lng('run'),{act:'delete_file',name:file});sxd.actions.filelist();break;}},ajax:function(url,txt,req,nothide,onload){function obj2php(obj,depth){var s='';depth=depth||'';for(var o in obj){s+=typeof obj[o]=='object'?obj2php(obj[o],depth+'['+o+']'):'ajax'+depth+'['+o+']='+encodeURIComponent(obj[o])+'&';}
return s;}
this.showLoading(txt);url+='.php';var params=obj2php(req);var xhr=window.XMLHttpRequest?new XMLHttpRequest():(window.ActiveXObject?new ActiveXObject('Microsoft.XMLHTTP'):null);xhr.open('POST',url,true);xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');var t=this;function oncomplete(){if(xhr&&xhr.readyState==4){if(xhr.status==200){eval(xhr.responseText);}
else{alert(xhr.statusText);}
if(onload)onload();xhr=null;clearInterval(iv);iv=null;if(!nothide)t.hideLoading();}}
var iv=setInterval(oncomplete,33);xhr.send(params);},css:{add:function(rule,index){var s=document.styleSheets[0];if(!index)index=s.cssRules?s.cssRules.length:s.rules.length;if(s.addRule){if(/^([^{]+)\{(.*)\}\s*$/.test(rule)){s.addRule(RegExp.$1,RegExp.$2,index);}}
else{s.insertRule(rule,index);}},swap:function(elem,classes,sel){var tmp=elem.cla
gitextract_i4qucyb1/ ├── .gitattributes ├── .gitignore ├── .htaccess ├── README.MD ├── _error-404.php ├── admin/ │ ├── add_moon.php │ ├── adm_flying_fleets.php │ ├── adm_log_main.php │ ├── adm_message_list.php │ ├── adm_metamatter.php │ ├── adm_planet_list.php │ ├── adm_quest.php │ ├── adm_user_analyze.php │ ├── adm_user_stat.php │ ├── admin_analyze_matter.php │ ├── admin_chat.php │ ├── admin_darkmatter.php │ ├── admin_locale.php │ ├── admin_user_activity.php │ ├── ajax_maintenance.php │ ├── banned.php │ ├── includes/ │ │ └── admin_planet_edit.inc.php │ ├── index.html │ ├── maintenance.php │ ├── overview.php │ ├── planet_compensate.php │ ├── planet_edit.php │ ├── settings.php │ ├── statbuilder.php │ ├── sxd/ │ │ ├── .htaccess │ │ ├── backup/ │ │ │ ├── .htaccess │ │ │ └── index.htm │ │ ├── bsd_license.txt │ │ ├── img/ │ │ │ └── index.htm │ │ ├── index.php │ │ ├── info.php │ │ ├── lang/ │ │ │ ├── index.htm │ │ │ ├── list.php │ │ │ ├── lng_en.php │ │ │ ├── lng_ru.php │ │ │ ├── lng_uk.php │ │ │ └── update.php │ │ ├── load.php │ │ ├── readme_en.txt │ │ ├── readme_ru.txt │ │ ├── sxd.css │ │ ├── sxd.js │ │ └── tmpl.php │ ├── tools.php │ └── userlist.php ├── affilates.php ├── ajax_version_check.php ├── alliance.php ├── annonce.php ├── announce.php ├── artifacts.php ├── banned.php ├── banner.php ├── blitz_register.php ├── buddy.php ├── buildings.php ├── captcha.php ├── classes/ │ ├── Account.php │ ├── AjaxController.php │ ├── Alliance/ │ │ ├── Alliance.php │ │ ├── AllianceHelper.php │ │ ├── AllianceMember.php │ │ ├── AllianceMemberList.php │ │ ├── AllianceTitle.php │ │ ├── AllianceTitleList.php │ │ ├── DBStaticAlly.php │ │ └── RecordAlliance.php │ ├── AuthProvider.php │ ├── BBCodeParser.php │ ├── BanHammer.php │ ├── Bonus/ │ │ ├── BonusAtom.php │ │ ├── BonusAtomAbility.php │ │ ├── BonusAtomAdd.php │ │ ├── BonusAtomMultiply.php │ │ ├── BonusAtomPercent.php │ │ ├── BonusCatalog.php │ │ ├── BonusFactory.php │ │ ├── BonusListAtom.php │ │ ├── ValueBonused.php │ │ └── ValueStorage.php │ ├── Chat/ │ │ └── Chat.php │ ├── Common/ │ │ ├── AccessAccessors.php │ │ ├── AccessLogged.php │ │ ├── AccessLoggedAbstract.php │ │ ├── AccessLoggedTranslatedV2.php │ │ ├── AccessLoggedV2.php │ │ ├── AccessMagic.php │ │ ├── AccessorsV2.php │ │ ├── ContainerPlus.php │ │ ├── EmptyCountableIterator.php │ │ ├── Exceptions/ │ │ │ ├── DbalFieldInvalidException.php │ │ │ └── ExceptionSnLocalized.php │ │ ├── Hooker/ │ │ │ ├── Hooker.php │ │ │ └── Pimp.php │ │ ├── Interfaces/ │ │ │ ├── IContainer.php │ │ │ └── ICountableIterator.php │ │ ├── Invoker.php │ │ ├── NullContainer.php │ │ ├── OutcomeManager.php │ │ ├── Pimple/ │ │ │ ├── Container.php │ │ │ └── ServiceProviderInterface.php │ │ ├── Tools/ │ │ │ └── VersionCheckerDeprecated.php │ │ ├── Traits/ │ │ │ ├── TContainer.php │ │ │ ├── TJsonSerializable.php │ │ │ └── TSingleton.php │ │ ├── Vector.php │ │ └── oldArrayAccessNd.php │ ├── Confirmation.php │ ├── Core/ │ │ ├── Autoloader.php │ │ ├── Crypto.php │ │ ├── Entity.php │ │ ├── EntityDb.php │ │ ├── GlobalContainer.php │ │ ├── HttpRequest.php │ │ ├── HttpUrl.php │ │ ├── RepoV2.php │ │ ├── Repository.php │ │ ├── Scheduler/ │ │ │ ├── Lock.php │ │ │ ├── TaskConditional.php │ │ │ ├── TaskPeriodic.php │ │ │ └── Watchdog.php │ │ ├── Singleton.php │ │ ├── SnBootstrap.php │ │ ├── SnPimp.php │ │ ├── StorageV2.php │ │ ├── Updater.php │ │ └── Worker.php │ ├── DBAL/ │ │ ├── ActiveRecord.php │ │ ├── ActiveRecordAbstract.php │ │ ├── ActiveRecordAbstractIndexed.php │ │ ├── DbAbstractResultIterator.php │ │ ├── DbFieldDescription.php │ │ ├── DbIndexDescription.php │ │ ├── DbIndexField.php │ │ ├── DbMysqliResultIterator.php │ │ ├── DbQuery.php │ │ ├── DbSqlPaging.php │ │ ├── OldDbChangeSet.php │ │ ├── PropertyDescription.php │ │ ├── RecordV2.php │ │ ├── RecordV3.php │ │ ├── Schema.php │ │ ├── StorageSqlV2.php │ │ ├── TableSchema.php │ │ └── db_mysql.php │ ├── Design.php │ ├── Fleet/ │ │ ├── Constants.php │ │ ├── DbFleetStatic.php │ │ ├── Fleet.php │ │ ├── FleetDispatchEvent.php │ │ ├── FleetDispatcher.php │ │ ├── FleetRowObject.php │ │ ├── FleetStatic.php │ │ ├── FleetWatchdog.php │ │ ├── MissionData.php │ │ ├── MissionEspionage.php │ │ ├── MissionEspionageReport.php │ │ ├── MissionExploreResult.php │ │ ├── RecordFleet.php │ │ └── TaskDispatchFleets.php │ ├── General/ │ │ ├── Helpers/ │ │ │ ├── PagingRenderer.php │ │ │ └── URLHelper.php │ │ ├── LogCounterShrinker.php │ │ ├── VisitAccumulator.php │ │ └── VisitMerger.php │ ├── General.php │ ├── HelperArray.php │ ├── HelperString.php │ ├── Meta/ │ │ └── Economic/ │ │ ├── BuildDataStatic.php │ │ ├── EconomicHelper.php │ │ └── ResourceCalculations.php │ ├── Modules/ │ │ ├── ModulesManager.php │ │ └── sn_module.php │ ├── Note/ │ │ └── Note.php │ ├── Notification/ │ │ └── RecordNotification.php │ ├── Old/ │ │ └── Avatar.php │ ├── PTLTag.php │ ├── Pages/ │ │ ├── Deprecated/ │ │ │ ├── PageAdminMining.php │ │ │ ├── PageAdminModules.php │ │ │ ├── PageAdminPayment.php │ │ │ ├── PageAdminUserView.php │ │ │ ├── PageDeprecated.php │ │ │ ├── PageFleet5Gathering.php │ │ │ ├── PageImperium.php │ │ │ ├── PageMercenary.php │ │ │ ├── PageMessage.php │ │ │ └── PageOverview.php │ │ ├── Helpers/ │ │ │ └── PageHelperAlly.php │ │ ├── IPage.php │ │ ├── PageAjax.php │ │ ├── PageAjaxIgnore.php │ │ ├── PageQuest.php │ │ └── PageTutorial.php │ ├── Payment/ │ │ ├── PaymentMethods.php │ │ └── PaymentsMethodsActive.php │ ├── Planet/ │ │ ├── DBStaticPlanet.php │ │ ├── Planet.php │ │ └── RecordPlanet.php │ ├── Player/ │ │ ├── PlayerLevelHelper.php │ │ ├── PlayerStatic.php │ │ ├── RecordPlayer.php │ │ ├── playerTimeDiff.php │ │ └── userOptions.php │ ├── PlayerToAccountTranslate.php │ ├── Pm/ │ │ ├── DecodeEspionage.php │ │ ├── PlayerIgnore.php │ │ └── RecordPlayerIgnore.php │ ├── Ptl/ │ │ └── PtlVariableDecorator.php │ ├── Que/ │ │ ├── DBStaticQue.php │ │ └── QueUnitStatic.php │ ├── RequestInfo.php │ ├── ResultMessages.php │ ├── SN.php │ ├── SkinInterface.php │ ├── SkinModel.php │ ├── SkinV2.php │ ├── SnTemplate.php │ ├── StatCalculator.php │ ├── StatUpdateLauncher.php │ ├── Storage.php │ ├── Template/ │ │ └── TemplateMeta.php │ ├── TextEntity.php │ ├── TextModel.php │ ├── TextRecordDescription.php │ ├── TheUser.php │ ├── Timer.php │ ├── Tools.php │ ├── Ube/ │ │ └── Ube4_1/ │ │ ├── Ube4_1Calc.php │ │ └── Ube4_1Prepare.php │ ├── Unit/ │ │ ├── DBStaticUnit.php │ │ ├── Governor.php │ │ ├── RecordUnit.php │ │ └── Unit.php │ ├── Universe/ │ │ └── Universe.php │ ├── Universe.php │ ├── Validators.php │ ├── auth_abstract.php │ ├── auth_local.php │ ├── classCache.php │ ├── classConfig.php │ ├── classLocale.php │ ├── classPersistent.php │ ├── core_auth.php │ ├── debug.php │ ├── sn_module_payment.php │ ├── template.php │ └── template_compile.php ├── common.php ├── composer.json ├── dark_matter.php ├── design/ │ ├── css/ │ │ ├── blitz_login_background.css │ │ ├── global-ie.css │ │ ├── global.css │ │ ├── index.html │ │ ├── jquery-ui.css │ │ ├── login.css │ │ ├── login_background.css │ │ └── menu_icons.css │ ├── images/ │ │ ├── index.html │ │ ├── lang/ │ │ │ └── index.html │ │ └── smileys/ │ │ └── index.html │ └── templates/ │ ├── OpenGame/ │ │ ├── .htaccess │ │ ├── _ajax.tpl.html │ │ ├── _number_color_maximum.tpl.html │ │ ├── _number_color_percent.tpl.html │ │ ├── _number_color_planet_fill_bg.tpl.html │ │ ├── _number_color_production_bg.tpl.html │ │ ├── _number_color_value.tpl.html │ │ ├── _number_percent_class.tpl.html │ │ ├── _page/ │ │ │ ├── _00_header.tpl.html │ │ │ ├── _01_head.tpl.html │ │ │ ├── _40_js.tpl.html │ │ │ ├── _99_footer.tpl.html │ │ │ ├── navbar.tpl.html │ │ │ ├── navbar_additions.tpl.html │ │ │ ├── navbar_buttons.tpl.html │ │ │ ├── navbar_planet_select.tpl.html │ │ │ ├── navbar_resources.tpl.html │ │ │ ├── navbar_resources_flex.tpl.html │ │ │ ├── navbar_resources_horizontal.tpl.html │ │ │ └── navbar_resources_vertical.tpl.html │ │ ├── _paging.tpl.html │ │ ├── _redirect.tpl.html │ │ ├── _result_message.tpl.html │ │ ├── _table.tpl.html │ │ ├── _template.css │ │ ├── _template.ini │ │ ├── admin/ │ │ │ ├── add_moon.tpl.html │ │ │ ├── adm_flying_fleets.tpl.html │ │ │ ├── adm_log_main.tpl.html │ │ │ ├── adm_log_main_detail.tpl.html │ │ │ ├── adm_messagelist.tpl.html │ │ │ ├── adm_metamatter.tpl.html │ │ │ ├── adm_overview.tpl.html │ │ │ ├── adm_planet_list.tpl.html │ │ │ ├── admin_ally_all.tpl.html │ │ │ ├── admin_ally_one.tpl.html │ │ │ ├── admin_analyze_matter.tpl.html │ │ │ ├── admin_ban.tpl.html │ │ │ ├── admin_chat.tpl.html │ │ │ ├── admin_darkmatter.tpl.html │ │ │ ├── admin_locale.tpl.html │ │ │ ├── admin_mining.tpl.html │ │ │ ├── admin_modules.tpl.html │ │ │ ├── admin_payment.tpl.html │ │ │ ├── admin_planet_edit.tpl.html │ │ │ ├── admin_ptl_test.tpl.html │ │ │ ├── admin_tools.tpl.html │ │ │ ├── admin_user.tpl.html │ │ │ ├── admin_user_activity.tpl.html │ │ │ ├── md5enc.tpl.html │ │ │ ├── planet_compensate.tpl.html │ │ │ ├── reset_body.tpl.html │ │ │ ├── settings.tpl.html │ │ │ ├── simple_header.tpl.html │ │ │ ├── tests/ │ │ │ │ └── _number_color_value.tpl.html │ │ │ └── userlist.tpl.html │ │ ├── affilates.tpl.html │ │ ├── agreement.tpl.html │ │ ├── ali_admin.tpl.html │ │ ├── ali_admin_diplomacy.tpl.html │ │ ├── ali_admin_mail.tpl.html │ │ ├── ali_admin_request.tpl.html │ │ ├── ali_admin_rights.tpl.html │ │ ├── ali_external.tpl.html │ │ ├── ali_external_make.tpl.html │ │ ├── ali_info.tpl.html │ │ ├── ali_members.tpl.html │ │ ├── ali_request.tpl.html │ │ ├── ali_request_waiting.tpl.html │ │ ├── ali_search.tpl.html │ │ ├── announce.tpl.html │ │ ├── artifacts.tpl.html │ │ ├── banned_body.tpl.html │ │ ├── blitz_register.tpl.html │ │ ├── buddy.tpl.html │ │ ├── buildings_builds.tpl.html │ │ ├── chat/ │ │ │ ├── chat_body.tpl.html │ │ │ ├── chat_frame.tpl.html │ │ │ ├── chat_header.tpl.html │ │ │ ├── chat_messages.tpl.html │ │ │ └── chat_online.tpl.html │ │ ├── contact.tpl.html │ │ ├── dark_matter.tpl.html │ │ ├── eco_bld_queue_list.tpl.html │ │ ├── eco_queue.tpl.html │ │ ├── fleet0.tpl.html │ │ ├── fleet1.tpl.html │ │ ├── fleet2.tpl.html │ │ ├── fleet3.tpl.html │ │ ├── fleet5.tpl.html │ │ ├── fleet_aks_invite.tpl.html │ │ ├── fleet_javascript.tpl.html │ │ ├── fleet_miniatures.tpl.html │ │ ├── fleet_page_0_buttons.tpl.html │ │ ├── fleet_page_0_buttons_action.tpl.html │ │ ├── flying_fleets.tpl.html │ │ ├── imperator.tpl.html │ │ ├── imperium.tpl.html │ │ ├── imperium_resource_cell.tpl.html │ │ ├── index.html │ │ ├── jumpgate.tpl.html │ │ ├── login_body.tpl.html │ │ ├── login_header.tpl.html │ │ ├── login_menu.tpl.html │ │ ├── login_player_register.tpl.html │ │ ├── lostpassword.tpl.html │ │ ├── market.tpl.html │ │ ├── market_fleet.tpl.html │ │ ├── market_info.tpl.html │ │ ├── market_trader.tpl.html │ │ ├── menu.tpl.html │ │ ├── message_body.tpl.html │ │ ├── metamatter.tpl.html │ │ ├── mrc_mercenary_hire.tpl.html │ │ ├── msg_message_class.tpl.html │ │ ├── msg_message_compose.tpl.html │ │ ├── msg_message_list.tpl.html │ │ ├── msg_message_list_paging.tpl.html │ │ ├── msg_message_spy.tpl.html │ │ ├── navbar_button_queued.tpl.html │ │ ├── navbar_news.tpl.html │ │ ├── navbar_notes.tpl.html │ │ ├── news_list.tpl.html │ │ ├── note_list.tpl.html │ │ ├── notes.tpl.html │ │ ├── novapedia.tpl.html │ │ ├── options.tpl.html │ │ ├── options_block.tpl.html │ │ ├── overview_fleet_event.tpl.html │ │ ├── page_hint.tpl.html │ │ ├── planet_fleet_list.tpl.html │ │ ├── planet_governor.tpl.html │ │ ├── planet_list.tpl.html │ │ ├── planet_list_info.tpl.html │ │ ├── planet_list_overview.tpl.html │ │ ├── planet_manage.tpl.html │ │ ├── planet_overview.tpl.html │ │ ├── planet_sector_bar.tpl.html │ │ ├── planet_sector_buy.tpl.html │ │ ├── que_total.tpl.html │ │ ├── quest.tpl.html │ │ ├── quest_edit_form.tpl.html │ │ ├── rank_list.tpl.html │ │ ├── records.tpl.html │ │ ├── registry_form.tpl.html │ │ ├── resources.tpl.html │ │ ├── search.tpl.html │ │ ├── server_info.tpl.html │ │ ├── simple_table.tpl.html │ │ ├── simulator.tpl.html │ │ ├── stat_statistics.tpl.html │ │ ├── techtree.tpl.html │ │ ├── techtree_computer.tpl.html │ │ ├── techtree_mobile.tpl.html │ │ ├── tutorial.tpl.html │ │ ├── ube_combat_report.tpl.html │ │ ├── universe.tpl.html │ │ ├── universe_navigation.tpl.html │ │ ├── universe_new.tpl.html │ │ ├── universe_old.tpl.html │ │ ├── universe_rename.tpl.html │ │ ├── vacation.tpl.html │ │ └── viewreport.tpl.html │ └── index.html ├── docs/ │ ├── SuperNova - All you didn't want to know but forced to.docx │ ├── balance.txt │ ├── changelog.dev.todo.txt │ ├── changelog.txt │ ├── changelog_dev.txt │ ├── class_tree.txt │ ├── config.php.sample │ ├── credits.txt │ ├── extra/ │ │ ├── readme.txt │ │ └── sql/ │ │ └── account_by_user_name.sql │ ├── html/ │ │ ├── .htaccess │ │ ├── changelog.html │ │ ├── coding-guidelines.html │ │ ├── developer.html │ │ ├── readme.html │ │ └── stylesheet.css │ ├── install-en.md │ ├── install.md │ ├── license.txt │ ├── readme-en.txt │ ├── readme.txt │ ├── similar_characters_detect.md │ ├── supernova-data.sql │ ├── supernova.sql │ ├── todo.txt │ ├── todo.xls │ ├── tricks.txt │ ├── txt2html.php │ └── work-fleets.txt ├── fleet.php ├── flotenajax.php ├── flying_fleets.php ├── galaxy.php ├── includes/ │ ├── .htaccess │ ├── alliance/ │ │ ├── ali_external_create_ally.inc │ │ ├── ali_external_request.inc │ │ ├── ali_info.inc │ │ ├── ali_internal_admin.inc │ │ ├── ali_internal_admin_diplomacy.inc │ │ ├── ali_internal_admin_mail.inc │ │ ├── ali_internal_admin_request.inc │ │ ├── ali_internal_admin_rights.inc │ │ └── ali_internal_members.inc │ ├── constants/ │ │ ├── constants.php │ │ ├── constants_fake.php │ │ ├── constants_params.php │ │ ├── constants_payments.php │ │ ├── constants_rpg.php │ │ ├── constants_ube.php │ │ └── constants_units.php │ ├── db/ │ │ ├── db_helpers.php │ │ ├── db_queries.php │ │ └── db_queries_users.php │ ├── db.php │ ├── debug.tools.php │ ├── functions/ │ │ ├── _deprecated.php │ │ ├── _news.php │ │ ├── ali_alliances.php │ │ ├── cht_message_parse.php │ │ ├── eco_get_build_data.php │ │ ├── eco_planet_update.php │ │ ├── eco_queue.php │ │ ├── flt_mission_missile.php │ │ ├── geoip.php │ │ ├── index.html │ │ ├── int_banner_create.php │ │ ├── int_fleet_events.php │ │ ├── lng_language.php │ │ ├── msg_send_simple_message.php │ │ ├── qst_quest.php │ │ ├── rpg_points.php │ │ ├── sys_maintenance.php │ │ ├── sys_user.php │ │ ├── tpl_helpers.php │ │ └── uni_functions.php │ ├── general/ │ │ ├── general.php │ │ ├── general_compatibility.php │ │ ├── general_formatters.php │ │ ├── general_math.php │ │ ├── general_nickRender.php │ │ ├── general_params.php │ │ ├── general_planetFunctions.php │ │ ├── general_playerFunctions.php │ │ ├── general_pname.php │ │ ├── general_unitFunctions.php │ │ ├── general_urlAndHttp.php │ │ └── general_validators.php │ ├── includes/ │ │ ├── art_artifact.php │ │ ├── coe_simulator_helpers.php │ │ ├── eco_bld_structures.php │ │ ├── flt_functions.php │ │ ├── flt_mission_attack.php │ │ ├── flt_mission_colonize.php │ │ ├── flt_mission_hold.php │ │ ├── flt_mission_recycle.php │ │ ├── flt_mission_relocate.php │ │ ├── flt_mission_transport.php │ │ ├── flt_page0.inc │ │ ├── flt_page1.inc │ │ ├── flt_page2.inc │ │ ├── flt_page3.inc │ │ ├── flt_page4.inc │ │ ├── market_fleeter.inc │ │ ├── market_info.inc │ │ ├── market_trader.inc │ │ ├── sys_avatar.php │ │ ├── ube_attack_calculate.php │ │ ├── ube_report.php │ │ ├── ube_zi_helpers.php │ │ ├── uni_rename.php │ │ └── user_birthday_celebrate.php │ ├── index.html │ ├── init.php │ ├── pages/ │ │ ├── admin/ │ │ │ └── admin_ally.php │ │ ├── battle_report.php │ │ ├── contact.php │ │ ├── imperator.php │ │ ├── options.php │ │ └── techtree.php │ ├── update.php │ ├── vars.php │ ├── vars_combats.php │ ├── vars_menu.php │ ├── vars_powerups.php │ └── vars_structures.php ├── index.php ├── infos.php ├── js/ │ ├── build_unit.js │ ├── chat_advanced.js │ ├── cnt.js │ ├── fleet.js │ ├── fleet_gather.js │ ├── generate.js │ ├── index.html │ ├── lib/ │ │ ├── fm.checkator.jquery.js │ │ ├── ion.sound.js │ │ ├── jquery-ui.js │ │ ├── jquery.bpopup.js │ │ ├── jquery.grayscale.js │ │ ├── jquery.js │ │ └── js.cookie.js │ ├── market.js │ ├── metamatter.js │ ├── planet_manage.js │ ├── sn_ajax_send_fleet.js │ ├── sn_global.js │ ├── sn_notes.js │ ├── sn_sound.js │ ├── sn_survey.js │ ├── sn_timer.js │ ├── sn_universe.js │ └── tutorial.js ├── jumpgate.php ├── language/ │ ├── .htaccess │ ├── de/ │ │ ├── admin.mo.php │ │ ├── affilates.mo.php │ │ ├── alliance.mo.php │ │ ├── announce.mo.php │ │ ├── artifacts.mo.php │ │ ├── buddy.mo.php │ │ ├── buildings.mo.php │ │ ├── chat_advanced.mo.php │ │ ├── fleet.mo.php │ │ ├── infos.mo.php │ │ ├── language.mo.php │ │ ├── login.mo.php │ │ ├── market.mo.php │ │ ├── menu.mo.php │ │ ├── messages.mo.php │ │ ├── mrc_mercenary.mo.php │ │ ├── notes.mo.php │ │ ├── options.mo.php │ │ ├── overview.mo.php │ │ ├── payment.mo.php │ │ ├── quest.mo.php │ │ ├── search.mo.php │ │ ├── stat.mo.php │ │ ├── system.mo.php │ │ ├── tech.mo.php │ │ └── universe.mo.php │ ├── en/ │ │ ├── admin.mo.php │ │ ├── affilates.mo.php │ │ ├── alliance.mo.php │ │ ├── announce.mo.php │ │ ├── artifacts.mo.php │ │ ├── buddy.mo.php │ │ ├── buildings.mo.php │ │ ├── chat_advanced.mo.php │ │ ├── fleet.mo.php │ │ ├── index.html │ │ ├── infos.mo.php │ │ ├── language.mo.php │ │ ├── login.mo.php │ │ ├── market.mo.php │ │ ├── menu.mo.php │ │ ├── messages.mo.php │ │ ├── mrc_mercenary.mo.php │ │ ├── notes.mo.php │ │ ├── options.mo.php │ │ ├── overview.mo.php │ │ ├── payment.mo.php │ │ ├── quest.mo.php │ │ ├── search.mo.php │ │ ├── stat.mo.php │ │ ├── system.mo.php │ │ ├── tech.mo.php │ │ └── universe.mo.php │ ├── es/ │ │ ├── admin.mo.php │ │ ├── affilates.mo.php │ │ ├── alliance.mo.php │ │ ├── announce.mo.php │ │ ├── artifacts.mo.php │ │ ├── buddy.mo.php │ │ ├── buildings.mo.php │ │ ├── chat_advanced.mo.php │ │ ├── fleet.mo.php │ │ ├── infos.mo.php │ │ ├── language.mo.php │ │ ├── login.mo.php │ │ ├── market.mo.php │ │ ├── menu.mo.php │ │ ├── messages.mo.php │ │ ├── mrc_mercenary.mo.php │ │ ├── notes.mo.php │ │ ├── options.mo.php │ │ ├── overview.mo.php │ │ ├── payment.mo.php │ │ ├── quest.mo.php │ │ ├── search.mo.php │ │ ├── stat.mo.php │ │ ├── system.mo.php │ │ ├── tech.mo.php │ │ └── universe.mo.php │ └── ru/ │ ├── admin.mo.php │ ├── affilates.mo.php │ ├── alliance.mo.php │ ├── announce.mo.php │ ├── artifacts.mo.php │ ├── buddy.mo.php │ ├── buildings.mo.php │ ├── chat_advanced.mo.php │ ├── fleet.mo.php │ ├── index.html │ ├── infos.mo.php │ ├── language.mo.php │ ├── login.mo.php │ ├── market.mo.php │ ├── menu.mo.php │ ├── messages.mo.php │ ├── mrc_mercenary.mo.php │ ├── notes.mo.php │ ├── options.mo.php │ ├── overview.mo.php │ ├── payment.mo.php │ ├── quest.mo.php │ ├── search.mo.php │ ├── stat.mo.php │ ├── system.mo.php │ ├── tech.mo.php │ └── universe.mo.php ├── login.php ├── logout.php ├── lostpassword.php ├── market.php ├── messages.php ├── metamatter.php ├── notes.php ├── officer.php ├── overview.php ├── phalanx.php ├── quest.php ├── ranks.php ├── records.php ├── reg.php ├── resources.php ├── robots.txt ├── scheduler.php ├── search.php ├── server_info.php ├── simulator.php ├── skins/ │ ├── EpicBlue/ │ │ ├── skin.css │ │ ├── skin.ini │ │ └── tmpl.ini │ ├── index.html │ └── supernova-ivash/ │ ├── skin.css │ ├── skin.ini │ └── tmpl.ini ├── sounds/ │ ├── beer_can_opening.aac │ ├── beer_can_opening.ogg │ ├── bell_ring.aac │ ├── bell_ring.ogg │ ├── branch_break.aac │ ├── branch_break.ogg │ ├── button_click.aac │ ├── button_click.ogg │ ├── button_click_on.aac │ ├── button_click_on.ogg │ ├── button_push.aac │ ├── button_push.ogg │ ├── button_tiny.aac │ ├── button_tiny.ogg │ ├── camera_flashing.aac │ ├── camera_flashing.ogg │ ├── camera_flashing_2.aac │ ├── camera_flashing_2.ogg │ ├── cd_tray.aac │ ├── cd_tray.ogg │ ├── computer_error.aac │ ├── computer_error.ogg │ ├── door_bell.aac │ ├── door_bell.ogg │ ├── door_bump.aac │ ├── door_bump.ogg │ ├── glass.aac │ ├── glass.ogg │ ├── keyboard_desk.aac │ ├── keyboard_desk.ogg │ ├── light_bulb_breaking.aac │ ├── light_bulb_breaking.ogg │ ├── metal_plate.aac │ ├── metal_plate.ogg │ ├── metal_plate_2.aac │ ├── metal_plate_2.ogg │ ├── pop_cork.aac │ ├── pop_cork.ogg │ ├── snap.aac │ ├── snap.ogg │ ├── staple_gun.aac │ ├── staple_gun.ogg │ ├── tap.aac │ ├── tap.ogg │ ├── water_droplet.aac │ ├── water_droplet.ogg │ ├── water_droplet_2.aac │ ├── water_droplet_2.ogg │ ├── water_droplet_3.aac │ └── water_droplet_3.ogg ├── stat.php ├── tests/ │ ├── Bonus/ │ │ ├── BonusAtomAbilityTest.php │ │ ├── BonusAtomAddTest.php │ │ ├── BonusAtomMultiplyTest.php │ │ ├── BonusAtomPercentTest.php │ │ ├── BonusAtomTest.php │ │ ├── BonusCatalogTest.php │ │ ├── BonusFactoryTest.php │ │ └── BonusListAtomTest.php │ ├── DBAL/ │ │ └── Tests/ │ │ ├── ActiveRecordAbstractTest.php │ │ └── Fixtures/ │ │ ├── ActiveAbstractObjectDump.php │ │ └── RecordActiveAbstractObject.php │ ├── Fixtures/ │ │ └── UnitInfo.php │ ├── Meta/ │ │ └── Economic/ │ │ └── EcoHelperTest.php │ ├── Tests/ │ │ └── Common/ │ │ ├── Hooker/ │ │ │ ├── HookerTest.php │ │ │ └── PimpTest.php │ │ └── Pimple/ │ │ ├── Fixtures/ │ │ │ ├── Invokable.php │ │ │ ├── NonInvokable.php │ │ │ ├── PimpleServiceProvider.php │ │ │ └── Service.php │ │ ├── PimpleServiceProviderInterfaceTest.php │ │ └── PimpleTest.php │ ├── bootstrap.php │ ├── classes/ │ │ ├── AccessAccessorsTest.php │ │ ├── AccessLoggedTest.php │ │ ├── AccessMagicTest.php │ │ ├── AccessorsV2Test.php │ │ ├── DbQueryTest.php │ │ ├── HelperArrayTest.php │ │ ├── InvokerTest.php │ │ ├── ToolsTest.php │ │ ├── ValidatorsTest.php │ │ └── VectorTest.php │ ├── includes/ │ │ ├── test_constants.php │ │ └── test_functions.php │ └── phpunit.xml ├── time_probe.php ├── tools/ │ ├── classes/ │ │ ├── ImageContainer.php │ │ ├── ImageFile.php │ │ ├── Sprite.php │ │ ├── SpriteLine.php │ │ ├── SpriteLineGif.php │ │ └── Spritify.php │ ├── generate.php │ ├── spritify.md │ └── spritify.php └── viewreport.php
Showing preview only (235K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2621 symbols across 326 files)
FILE: admin/adm_log_main.php
function admLogRender (line 39) | function admLogRender($value) {
FILE: admin/adm_metamatter.php
function admin_meta_matter_model (line 37) | function admin_meta_matter_model($lang, $user, $accountIdOrName_unsafe, ...
function admin_meta_matter_view (line 112) | function admin_meta_matter_view($user, $lang) {
FILE: admin/adm_user_analyze.php
function check_suspicious (line 26) | function check_suspicious(&$session, &$session_list_last_id, &$row) {
FILE: admin/adm_user_stat.php
function admin_date_sort (line 16) | function admin_date_sort($a, $b)
FILE: admin/admin_darkmatter.php
function admin_dark_matter_model (line 29) | function admin_dark_matter_model($lang, $user) {
function admin_dark_matter_view (line 75) | function admin_dark_matter_view($template = null) {
FILE: admin/admin_locale.php
function adm_lng_assign_string (line 20) | function adm_lng_assign_string($lang_id, $locale_string_name, $value) {
function adm_lng_load (line 35) | function adm_lng_load($full_filename) {
function adm_lng_parse_string (line 45) | function adm_lng_parse_string($string_name, $string_value, $ident = ' ') {
function adm_lng_write_string (line 101) | function adm_lng_write_string($string_name, $string_value, $ident = ' '...
FILE: admin/admin_user_activity.php
function visualize (line 24) | function visualize($userId) {
FILE: admin/ajax_maintenance.php
function sn_maintenance_pack_user_list (line 221) | function sn_maintenance_pack_user_list($user_list) {
FILE: admin/includes/admin_planet_edit.inc.php
function admin_planet_edit_mode (line 3) | function admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_lis...
function sn_admin_planet_edit_mode (line 4) | function sn_admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_...
function admin_planet_edit_template (line 22) | function admin_planet_edit_template(&$template, $edit_planet_row, $mode)...
function sn_admin_planet_edit_template (line 28) | function sn_admin_planet_edit_template(&$template, $edit_planet_row, $mode)
function admin_planet_edit_query_string (line 50) | function admin_planet_edit_query_string($unit_id, $unit_amount, $mode){r...
function sn_admin_planet_edit_query_string (line 51) | function sn_admin_planet_edit_query_string($unit_id, $unit_amount, $mode)
FILE: admin/planet_compensate.php
function killer_add_planet (line 135) | function killer_add_planet($planet, $final_cost = []) {
FILE: admin/planet_edit.php
function planet_edit_model (line 58) | function planet_edit_model($planet_id, array $unit_list, $mode) {
FILE: admin/sxd/index.php
class Sypex_Dumper (line 24) | class Sypex_Dumper {
method Sypex_Dumper (line 25) | function Sypex_Dumper() {
method loadLang (line 36) | function loadLang($lng_name = 'auto'){
method init (line 56) | function init($args = false){
method saveToFile (line 171) | function saveToFile($name, $content){
method connect (line 176) | function connect($host = null, $port = null, $user = null, $pass = null){
method main (line 197) | function main(){
method addCombo (line 251) | function addCombo($name, $sel, $ico, $opt_name, $opts = ''){
method ajax (line 255) | function ajax($req){
method loadJob (line 330) | function loadJob($job){
method deleteDB (line 338) | function deleteDB($name){
method cfg2js (line 346) | function cfg2js($cfg){
method addDb (line 352) | function addDb($req){
method saveConnect (line 359) | function saveConnect($req){
method saveOptions (line 380) | function saveOptions($req){
method saveCFG (line 392) | function saveCFG(){
method runServices (line 401) | function runServices($job) {
method createFilters (line 430) | function createFilters(&$obj, &$filter, &$object){
method closeConnect (line 448) | function closeConnect(){
method resumeJob (line 459) | function resumeJob($job){
method addRestoreJob (line 483) | function addRestoreJob($job) {
method runRestoreJob (line 546) | function runRestoreJob($continue = false){
function runRestoreJobForeign (line 750) | function runRestoreJobForeign($continue = false){
function addBackupJob (line 902) | function addBackupJob($job) {
function runBackupJob (line 1020) | function runBackupJob($continue = false){
function setNames (line 1184) | function setNames($collation){
function write (line 1192) | function write(&$str){
function addLog (line 1199) | function addLog($str, $type = 1){
function getDBList (line 1202) | function getDBList(){
function getCharsetList (line 1241) | function getCharsetList(){
function getCollationList (line 1258) | function getCollationList(){
function getObjects (line 1275) | function getObjects($tree, $db_name){
function getFileObjects (line 1316) | function getFileObjects($tree, $name, $formatTree = true){
function formatTree (line 1341) | function formatTree($tree, &$objects){
function getFileList (line 1408) | function getFileList(){
function getSavedJobs (line 1421) | function getSavedJobs(){
function getFileListExtended (line 1446) | function getFileListExtended(){
function saveJob (line 1475) | function saveJob($job, $config){
function openFile (line 1478) | function openFile($name, $mode){
function sxd_read_sql (line 1503) | function sxd_read_sql($f, &$seek, $ei, $delimiter = "\t;", $eol = "\n"){
function sxd_check (line 1537) | function sxd_check($n, $obj, $filt){
function sxd_php2json (line 1540) | function sxd_php2json($obj){
function sxd_ver2int (line 1555) | function sxd_ver2int($ver){
function sxd_error_handler (line 1558) | function sxd_error_handler($errno, $errmsg, $filename, $linenum, $vars){
function sxd_esc (line 1590) | function sxd_esc($str, $quoted = true){
function sxd_my_error (line 1593) | function sxd_my_error(){
function sxd_shutdown (line 1596) | function sxd_shutdown(){
function sxd_antimagic (line 1609) | function sxd_antimagic($arr){
FILE: admin/sxd/info.php
function load_lang (line 101) | function load_lang($lng_name = 'auto'){
function esc (line 117) | function esc($str){
function sxd_error (line 121) | function sxd_error($errno, $errmsg, $filename, $linenum, $vars){
FILE: admin/sxd/load.php
function sxd_php2json (line 29) | function sxd_php2json($obj){
FILE: admin/sxd/sxd.js
function z (line 1) | function z(el){return document.getElementById(el);}
function lead0 (line 4) | function lead0(i){return i<10?'0'+i:i;}
function sec2time (line 5) | function sec2time(sec){return lead0(Math.floor(sec/60))+':'+lead0(sec%60);}
function obj2php (line 9) | function obj2php(obj,depth){var s='';depth=depth||'';for(var o in obj){s...
function oncomplete (line 11) | function oncomplete(){if(xhr&&xhr.readyState==4){if(xhr.status==200){eva...
function zTreeObject (line 35) | function zTreeObject(){return{init:function(elem,num){this.el=z(elem);th...
function zToolbarObject (line 64) | function zToolbarObject(){return{init:function(elem,buttons){this.el=z(e...
function zProgressObject (line 72) | function zProgressObject(){return{init:function(elem,type){this.el=z(ele...
function zGridObject (line 73) | function zGridObject(){return{init:function(elem,cfg){this.el=z(elem);th...
FILE: admin/sxd/tmpl.php
function sxd_tpl_page (line 3) | function sxd_tpl_page(){
function sxd_tpl_auth (line 294) | function sxd_tpl_auth($error = ''){
FILE: alliance.php
function ally_pre_call (line 134) | function ally_pre_call() {
FILE: artifacts.php
function art_buy (line 39) | function art_buy($user, $unit_id, $planetrow, $lang) {
FILE: classes/Account.php
class Account (line 11) | class Account {
method reset (line 71) | public function reset() {
method __construct (line 84) | public function __construct($db = null) {
method password_check (line 105) | public function password_check($password_unsafe) {
method password_change (line 119) | public function password_change($old_password_unsafe, $new_password_un...
method assign_from_db_row (line 139) | public function assign_from_db_row($row) {
method db_get_by_id (line 170) | public function db_get_by_id($account_id_unsafe) {
method db_get_by_name (line 186) | public function db_get_by_name($account_name_unsafe) {
method db_get_by_email (line 202) | public function db_get_by_email($email_unsafe) {
method db_get_by_name_or_email (line 224) | public function db_get_by_name_or_email($account_name_unsafe, $email_u...
method dbGetByPlayerId (line 246) | public function dbGetByPlayerId($player_id_unsafe) {
method db_create (line 267) | public function db_create($account_name_unsafe, $password_raw, $email_...
method db_set_password (line 306) | public function db_set_password($password_unsafe, $salt_unsafe) {
method password_encode (line 338) | protected function password_encode($password, $salt) {
method password_salt_generate (line 347) | protected function password_salt_generate() {
method db_mm_log_insert (line 361) | protected function db_mm_log_insert($comment, $change_type, $metamatte...
method metamatter_change (line 409) | public function metamatter_change($change_type, $metamatter, $comment ...
method cookieSet (line 489) | public function cookieSet($rememberMe = false, $domain = null) {
method cookieClear (line 507) | public function cookieClear($domain = null) {
method cookieLogin (line 517) | public function cookieLogin(&$rememberMe = false) {
method password_encode_for_cookie (line 542) | protected function password_encode_for_cookie($password) {
method awardImmortal (line 550) | protected function awardImmortal($metamatter, $config) {
method getMetamatterSum (line 575) | public function getMetamatterSum($where = '', $group = '') {
FILE: classes/AjaxController.php
class AjaxController (line 8) | class AjaxController {
method controller (line 21) | public static function controller($template = null) {
method view (line 72) | public static function view($template = null) {
FILE: classes/Alliance/Alliance.php
class Alliance (line 22) | class Alliance extends RecordAlliance {
method ally_get_ranks (line 62) | public static function ally_get_ranks(&$ally) {
method sn_ali_fill_user_ally (line 90) | public static function sn_ali_fill_user_ally(&$user) {
method __construct (line 110) | public function __construct(GlobalContainer $services = null) {
method fromProperties (line 117) | protected function fromProperties(array $properties) {
method getMemberList (line 126) | public function getMemberList() {
method getTitleList (line 139) | public function getTitleList() {
method pass (line 151) | public function pass(AllianceMember $newOwnerMember) {
method getOwner (line 189) | public function getOwner() {
method asPtl (line 199) | public function asPtl() {
method recommend (line 226) | public static function recommend($points) {
FILE: classes/Alliance/AllianceHelper.php
class AllianceHelper (line 8) | class AllianceHelper {
method formatText (line 19) | public static function formatText($text) {
FILE: classes/Alliance/AllianceMember.php
class AllianceMember (line 18) | class AllianceMember {
method __construct (line 34) | public function __construct(Alliance $alliance, RecordPlayer $player) {
method changeTitle (line 48) | public function changeTitle(AllianceTitle $title) {
method getPlayerId (line 63) | public function getPlayerId() {
method getMemberName (line 70) | public function getMemberName() {
method isOwner (line 77) | public function isOwner() {
method asPtl (line 84) | public function asPtl() {
FILE: classes/Alliance/AllianceMemberList.php
class AllianceMemberList (line 12) | class AllianceMemberList {
method __construct (line 34) | public function __construct(db_mysql $db, Alliance $alliance) {
method getOwner (line 63) | public function getOwner() {
method asPtl (line 76) | public function asPtl() {
method isEmpty (line 92) | public function isEmpty() {
method getById (line 101) | public function getById($id) {
FILE: classes/Alliance/AllianceTitle.php
class AllianceTitle (line 15) | class AllianceTitle {
method __construct (line 39) | public function __construct(Alliance $alliance) {
method fromString (line 49) | public function fromString($titleIndex, $titleString) {
method __toString (line 74) | public function __toString() {
method rightsAsString (line 88) | public function rightsAsString() {
method getWeight (line 102) | public function getWeight() {
FILE: classes/Alliance/AllianceTitleList.php
class AllianceTitleList (line 9) | class AllianceTitleList {
method __construct (line 21) | public function __construct(Alliance $alliance) {
method getTitles (line 32) | public function getTitles() {
method __toString (line 41) | public function __toString() {
method getWeights (line 57) | public function getWeights() {
method updateTitles (line 69) | public function updateTitles() {
method extractTitles (line 73) | protected function extractTitles() {
method getTitle (line 96) | public function getTitle($titleIndex) {
method asPtl (line 104) | public function asPtl() {
FILE: classes/Alliance/DBStaticAlly.php
class DBStaticAlly (line 8) | class DBStaticAlly {
method db_ally_list_recalc_counts (line 11) | public static function db_ally_list_recalc_counts() {
method db_ally_request_list (line 16) | public static function db_ally_request_list($ally_id) {
method db_ally_request_get_by_user_id (line 20) | public static function db_ally_request_get_by_user_id($player_id) {
method db_ally_count (line 24) | public static function db_ally_count() {
method db_ally_get_by_id (line 35) | public static function db_ally_get_by_id($id_ally) {
method db_ally_list_search (line 46) | public static function db_ally_list_search($searchtext) {
method db_ally_get_by_name_or_tag (line 58) | public static function db_ally_get_by_name_or_tag($ally_tag, $ally_nam...
method db_ally_get_by_name (line 69) | public static function db_ally_get_by_name($ally_name) {
method db_ally_insert (line 80) | public static function db_ally_insert($ally_name, $ally_tag, $user) {
method db_ally_update_ally_user (line 98) | public static function db_ally_update_ally_user($ally_user_id, $ally_i...
method db_ally_request_insert (line 107) | public static function db_ally_request_insert($user, $id_ally, $POST_t...
method db_ally_request_delete_by_user (line 114) | public static function db_ally_request_delete_by_user($user) {
method db_ally_get_by_tag (line 124) | public static function db_ally_get_by_tag($tag) {
method db_ally_search_by_name_or_tag (line 135) | public static function db_ally_search_by_name_or_tag($ali_search_text) {
method db_ally_request_count_by_id (line 146) | public static function db_ally_request_count_by_id($ally) {
method db_ally_update_by_changeset (line 157) | public static function db_ally_update_by_changeset($ally_changeset, $a...
method db_ally_update_texts (line 167) | public static function db_ally_update_texts($text_list, $allyTextID, $...
method db_ally_update_owner (line 175) | public static function db_ally_update_owner($idNewLeader, $user) {
method db_ally_delete (line 182) | public static function db_ally_delete($ally) {
method db_ally_negotiation_delete (line 191) | public static function db_ally_negotiation_delete($user, $alliance_neg...
method db_ally_negotiation_get_by_offer_id (line 200) | public static function db_ally_negotiation_get_by_offer_id($offer_id) {
method db_ally_negotiation_delete_by_offer_id (line 209) | public static function db_ally_negotiation_delete_by_offer_id($offer_i...
method db_ally_negotiation_update_status_1 (line 216) | public static function db_ally_negotiation_update_status_1($offer_id) {
method db_ally_negotiatiion_delete_extended (line 224) | public static function db_ally_negotiatiion_delete_extended($negotiati...
method db_ally_list_get_by_not_user_ally (line 239) | public static function db_ally_list_get_by_not_user_ally($user) {
method db_ally_negotiation_list (line 250) | public static function db_ally_negotiation_list($user) {
method db_ally_request_deny (line 268) | public static function db_ally_request_deny($d) {
method db_ally_update_member_increase (line 275) | public static function db_ally_update_member_increase($ally) {
method db_ally_update_member_decrease (line 282) | public static function db_ally_update_member_decrease($ally) {
method db_ally_update_member_set (line 290) | public static function db_ally_update_member_set($i, $ally) {
method db_ally_request_delete_by_user_id (line 297) | public static function db_ally_request_delete_by_user_id($id_user) {
method db_ally_get_members_by_user_as_ally (line 307) | public static function db_ally_get_members_by_user_as_ally(&$user) {
method db_ally_update_ranklist (line 317) | public static function db_ally_update_ranklist($ranklist, $user) {
method db_ally_diplomacy_get_relations (line 327) | public static function db_ally_diplomacy_get_relations($ally_from, $al...
method db_ally_get_ally_count (line 350) | public static function db_ally_get_ally_count(&$user) {
FILE: classes/Alliance/RecordAlliance.php
class RecordAlliance (line 34) | class RecordAlliance extends ActiveRecord {
method ptlArray (line 60) | public function ptlArray() {
FILE: classes/AuthProvider.php
class AuthProvider (line 9) | class AuthProvider {
FILE: classes/BBCodeParser.php
class BBCodeParser (line 6) | class BBCodeParser {
method __construct (line 13) | public function __construct(Core\GlobalContainer $gc) {
method applyElements (line 17) | protected function applyElements($elements, $text, $authorAccessLevel ...
method expandBbCode (line 40) | public function expandBbCode($text, $authorAccessLevel = AUTH_LEVEL_RE...
method compactBbCode (line 49) | public function compactBbCode($text, $authorAccessLevel = AUTH_LEVEL_R...
FILE: classes/BanHammer.php
class BanHammer (line 10) | class BanHammer {
method getByIpV4 (line 26) | public static function getByIpV4($ipV4, $isExpired = self::EXPIRED_NOT) {
method checkIpV4 (line 48) | public static function checkIpV4($ipV4, $isExpired = self::EXPIRED_NOT) {
FILE: classes/Bonus/BonusAtom.php
class BonusAtom (line 15) | class BonusAtom {
method calcBonusType (line 49) | public static function calcBonusType($unitInfo) {
method calcBonusPower (line 63) | public static function calcBonusPower($unitInfo) {
method __construct (line 74) | public function __construct($bonusId, $ifBaseNonZero) {
method isReturnNothing (line 93) | protected function isReturnNothing($baseValue) {
method adjustValue (line 106) | public function adjustValue(&$currentValue, $bonusAmount, $baseValue) {
method calcAdjustment (line 117) | protected function calcAdjustment(&$currentValue, $bonusAmount, $baseV...
FILE: classes/Bonus/BonusAtomAbility.php
class BonusAtomAbility (line 9) | class BonusAtomAbility extends BonusAtom {
method calcAdjustment (line 14) | protected function calcAdjustment(&$currentValue, $bonusAmount, $baseV...
FILE: classes/Bonus/BonusAtomAdd.php
class BonusAtomAdd (line 9) | class BonusAtomAdd extends BonusAtom {
method calcAdjustment (line 14) | protected function calcAdjustment(&$currentValue, $bonusAmount, $baseV...
FILE: classes/Bonus/BonusAtomMultiply.php
class BonusAtomMultiply (line 9) | class BonusAtomMultiply extends BonusAtom {
method calcAdjustment (line 14) | protected function calcAdjustment(&$currentValue, $bonusAmount, $baseV...
FILE: classes/Bonus/BonusAtomPercent.php
class BonusAtomPercent (line 9) | class BonusAtomPercent extends BonusAtom {
method calcAdjustment (line 16) | protected function calcAdjustment(&$currentValue, $bonusAmount, $baseV...
FILE: classes/Bonus/BonusCatalog.php
class BonusCatalog (line 17) | class BonusCatalog {
method __construct (line 32) | public function __construct(GlobalContainer $gc) {
method loadDefaults (line 38) | protected function loadDefaults() {
method registerBonus (line 53) | public function registerBonus($bonusId, $baseBonusId, $ifBaseNonZero =...
method getBonusListAtom (line 68) | public function getBonusListAtom($bonusId) {
FILE: classes/Bonus/BonusFactory.php
class BonusFactory (line 16) | class BonusFactory {
method build (line 30) | public static function build($sourceUnitId, $ifBaseNonZero) {
FILE: classes/Bonus/BonusListAtom.php
class BonusListAtom (line 15) | class BonusListAtom implements \Countable {
method __construct (line 33) | public function __construct($bonusId) {
method getBonusAtoms (line 40) | public function getBonusAtoms() {
method addUnit (line 50) | public function addUnit($baseBonusId, $ifBaseNonZero = BonusAtom::RETU...
method bonusSort (line 58) | protected function bonusSort(BonusAtom $a, BonusAtom $b) {
method count (line 76) | public function count() {
FILE: classes/Bonus/ValueBonused.php
class ValueBonused (line 10) | class ValueBonused {
method __construct (line 44) | public function __construct($unitSnId, $baseValue, $context = []) {
method getValue (line 60) | public function getValue($context = []) {
method applyBonuses (line 87) | protected function applyBonuses($context = []) {
FILE: classes/Bonus/ValueStorage.php
class ValueStorage (line 21) | class ValueStorage extends ContainerPlus {
method getGlobalContainer (line 35) | public function getGlobalContainer() {
method __construct (line 39) | public function __construct(array $values = array()) {
method initValues (line 47) | protected function initValues() {
method getValueObject (line 88) | public function getValueObject($unitSnId, $context = []) {
method getValue (line 110) | public function getValue($unitSnId, $context = []) {
method getBase (line 127) | public function getBase($unitSnId, $context = []) {
method getLevel (line 144) | protected function getLevel($user, $planet, $unitSnId) {
method getLevelNonServer (line 154) | protected function getLevelNonServer($unitSnId, $context = []) {
FILE: classes/Chat/Chat.php
class Chat (line 14) | class Chat {
method chatModel (line 77) | public static function chatModel() {
method chatAddModel (line 81) | public static function chatAddModel() {
method chatView (line 85) | public static function chatView($template = null) {
method chatMsgView (line 89) | public static function chatMsgView($template = null) {
method chatFrameView (line 93) | public static function chatFrameView($template = null) {
method _chatView (line 97) | protected function _chatView($template = null) {
method _chatMsgView (line 121) | protected function _chatMsgView($template = null) {
method _chatFrameView (line 299) | protected function _chatFrameView($template = null) {
method _chatModel (line 309) | protected function _chatModel() {
method _chatAddModel (line 347) | protected function _chatAddModel() {
method update_chat_activity (line 574) | protected function update_chat_activity($refresh = false) {
method sn_chat_advanced_get_chat_player_record (line 588) | protected function sn_chat_advanced_get_chat_player_record($player_id,...
FILE: classes/Common/AccessAccessors.php
class AccessAccessors (line 28) | class AccessAccessors implements \ArrayAccess {
method __construct (line 46) | public function __construct() {
method setAccessors (line 54) | public function setAccessors($accessors) {
method __call (line 58) | public function __call($accessor, $arguments) {
method __set (line 76) | public function __set($name, $value) {
method __get (line 80) | public function __get($name) {
method __unset (line 84) | public function __unset($name) {
method __isset (line 88) | public function __isset($name) {
method isEmpty (line 92) | public function isEmpty() {
method clear (line 96) | public function clear() {
method offsetExists (line 114) | public function offsetExists($offset) {
method offsetGet (line 129) | public function offsetGet($offset) {
method offsetSet (line 147) | public function offsetSet($offset, $value) {
method offsetUnset (line 162) | public function offsetUnset($offset) {
FILE: classes/Common/AccessLogged.php
class AccessLogged (line 22) | class AccessLogged extends AccessLoggedAbstract {
method __set (line 24) | public function __set($name, $value) {
method valueSet (line 38) | protected function valueSet($name, $value) {
method valueDelta (line 56) | protected function valueDelta($name, $value) {
FILE: classes/Common/AccessLoggedAbstract.php
class AccessLoggedAbstract (line 11) | abstract class AccessLoggedAbstract extends AccessMagic {
method clear (line 42) | public function clear() {
method blockChange (line 52) | protected function blockChange($name) {
method blockDelta (line 63) | protected function blockDelta($name) {
method valueSet (line 104) | abstract protected function valueSet($name, $value);
method valueDelta (line 112) | abstract protected function valueDelta($name, $value);
method inc (line 120) | public function inc() {
method dec (line 131) | public function dec() {
method accept (line 142) | public function accept() {
method reject (line 152) | public function reject() {
method isChanged (line 164) | public function isChanged() {
method getChanges (line 171) | public function getChanges() {
method getDeltas (line 175) | public function getDeltas() {
FILE: classes/Common/AccessLoggedTranslatedV2.php
class AccessLoggedTranslatedV2 (line 20) | class AccessLoggedTranslatedV2 extends AccessLoggedV2 {
method importFieldDefinitions (line 52) | protected function importFieldDefinitions($fields) {
method convertToPropertyWithCallback (line 89) | protected function convertToPropertyWithCallback($array, $callBackName...
method fromFieldArray (line 121) | public function fromFieldArray(array $fieldArray) {
method toFieldArray (line 150) | public function toFieldArray($useDefaults = false) {
method changesToFields (line 191) | protected function changesToFields($propertyArray) {
method assignProperties (line 204) | public function assignProperties(array $propertyArray, $validate = fal...
method fillDefaults (line 215) | public function fillDefaults() {
FILE: classes/Common/AccessLoggedV2.php
class AccessLoggedV2 (line 20) | class AccessLoggedV2 extends AccessLoggedAbstract {
method __set (line 21) | public function __set($name, $value) {
method valueSet (line 36) | protected function valueSet($name, $value) {
method valueDelta (line 50) | protected function valueDelta($name, $value) {
FILE: classes/Common/AccessMagic.php
class AccessMagic (line 20) | class AccessMagic implements Interfaces\IContainer {
method __construct (line 39) | public function __construct(GlobalContainer $services = null) {
method __set (line 50) | public function __set($name, $value) {
method __isset (line 61) | public function __isset($name) {
method __get (line 72) | public function __get($name) {
method __unset (line 81) | public function __unset($name) {
method isEmpty (line 90) | public function isEmpty() {
method clear (line 97) | public function clear() {
method asArray (line 106) | public function asArray() {
FILE: classes/Common/AccessorsV2.php
class AccessorsV2 (line 17) | class AccessorsV2 implements Interfaces\IContainer {
method __set (line 48) | public function __set($functionName, $callable) {
method share (line 77) | public function share($functionName, $callable) {
method __isset (line 87) | public function __isset($functionName) {
method __unset (line 91) | public function __unset($functionName) {
method __get (line 106) | public function __get($functionName) {
method __call (line 117) | public function __call($functionName, $params) {
method isEmpty (line 135) | public function isEmpty() {
method clear (line 142) | public function clear() {
FILE: classes/Common/ContainerPlus.php
class ContainerPlus (line 14) | class ContainerPlus extends Container implements Interfaces\IContainer {
method __set (line 16) | public function __set($name, $value) {
method __get (line 20) | public function __get($name) {
method __isset (line 24) | public function __isset($name) {
method __unset (line 28) | public function __unset($name) {
method __call (line 32) | public function __call($name, $arguments) {
method isEmpty (line 41) | public function isEmpty() {
method clear (line 51) | public function clear() {
FILE: classes/Common/EmptyCountableIterator.php
class EmptyCountableIterator (line 10) | class EmptyCountableIterator extends \EmptyIterator implements ICountabl...
method count (line 21) | public function count() {
FILE: classes/Common/Exceptions/DbalFieldInvalidException.php
class DbalFieldInvalidException (line 16) | class DbalFieldInvalidException extends \Exception {
FILE: classes/Common/Exceptions/ExceptionSnLocalized.php
class ExceptionSnLocalized (line 17) | class ExceptionSnLocalized extends \Exception {
method __construct (line 32) | public function __construct($message = "", $code = 0, Throwable $previ...
method getPlayerLocalization (line 42) | protected function getPlayerLocalization($message) {
method getMessageLocalized (line 51) | public function getMessageLocalized() {
FILE: classes/Common/Hooker/Hooker.php
class Hooker (line 8) | class Hooker {
method __construct (line 24) | public function __construct($pimp) {
method addClient (line 32) | public function addClient($callable, $order = Pimp::ORDER_AS_IS) {
method serve (line 50) | public function serve($arguments) {
method __invoke (line 77) | public function __invoke() {
FILE: classes/Common/Hooker/Pimp.php
class Pimp (line 17) | class Pimp {
method __construct (line 38) | public function __construct($gc) {
method register (line 47) | public function register($hookName, $callable, $order = Pimp::ORDER_AS...
method __call (line 61) | public function __call($name, $arguments) {
FILE: classes/Common/Interfaces/IContainer.php
type IContainer (line 7) | interface IContainer {
method __set (line 15) | public function __set($name, $value);
method __isset (line 22) | public function __isset($name);
method __get (line 29) | public function __get($name);
method __unset (line 36) | public function __unset($name);
method isEmpty (line 43) | public function isEmpty();
method clear (line 48) | public function clear();
FILE: classes/Common/Interfaces/ICountableIterator.php
type ICountableIterator (line 9) | interface ICountableIterator extends \Iterator, \Countable {
FILE: classes/Common/Invoker.php
class Invoker (line 19) | class Invoker {
method __construct (line 28) | public function __construct($callable) {
method build (line 37) | public static function build($callable) {
method __invoke (line 49) | public function __invoke() {
FILE: classes/Common/NullContainer.php
class NullContainer (line 10) | class NullContainer extends Singleton implements Interfaces\IContainer {
method __set (line 12) | public function __set($name, $value) {
method __isset (line 15) | public function __isset($name) {
method __get (line 19) | public function __get($name) {
method __unset (line 23) | public function __unset($name) {
method isEmpty (line 31) | public function isEmpty() {
method clear (line 38) | public function clear() {
FILE: classes/Common/OutcomeManager.php
class OutcomeManager (line 15) | class OutcomeManager implements \Countable {
method __construct (line 32) | public function __construct() {
method rollArray (line 42) | public static function rollArray($iterable) {
method add (line 68) | public function add($outcome, $chance) {
method remove (line 79) | public function remove($outcome, $strict = null) {
method getMaxRange (line 92) | public function getMaxRange() {
method getOutcome (line 103) | public function getOutcome($rolled) {
method rollOutcome (line 121) | public function rollOutcome() {
method count (line 134) | public function count() {
FILE: classes/Common/Pimple/Container.php
class Container (line 34) | class Container implements \ArrayAccess
method __construct (line 50) | public function __construct(array $values = array())
method offsetSet (line 74) | public function offsetSet($id, $value)
method offsetGet (line 93) | public function offsetGet($id)
method offsetExists (line 128) | public function offsetExists($id)
method offsetUnset (line 138) | public function offsetUnset($id)
method factory (line 158) | public function factory($callable)
method protect (line 180) | public function protect($callable)
method raw (line 200) | public function raw($id)
method extend (line 226) | public function extend($id, $callable)
method keys (line 259) | public function keys()
method register (line 272) | public function register(ServiceProviderInterface $provider, array $va...
FILE: classes/Common/Pimple/ServiceProviderInterface.php
type ServiceProviderInterface (line 35) | interface ServiceProviderInterface
method register (line 45) | public function register(Container $pimple);
FILE: classes/Common/Tools/VersionCheckerDeprecated.php
class VersionCheckerDeprecated (line 11) | class VersionCheckerDeprecated {
method performCheckVersion (line 27) | public static function performCheckVersion() {
method handleCall (line 32) | public static function handleCall() {
method __construct (line 50) | public function __construct() {
method checkVersion (line 57) | protected function checkVersion($mode) {
method generateUrl (line 66) | protected function generateUrl($mode, $debug = false) {
method processContent (line 86) | protected function processContent($content) {
method preventDualRegistration (line 106) | protected function preventDualRegistration($mode, $ajax) {
method processRegistration (line 118) | protected function processRegistration($mode) {
FILE: classes/Common/Traits/TContainer.php
type TContainer (line 10) | trait TContainer {
method _getContainer (line 14) | public function _getContainer() {
method __set (line 18) | public function __set($name, $value) {
method __isset (line 24) | public function __isset($name) {
method __get (line 30) | public function __get($name) {
method __unset (line 36) | public function __unset($name) {
method isEmpty (line 47) | public function isEmpty() {
method clear (line 54) | public function clear() {
method __call (line 60) | public function __call($name, $arguments) {
method _containerTranslatePropertyName (line 64) | protected function _containerTranslatePropertyName($name) {
FILE: classes/Common/Traits/TJsonSerializable.php
type TJsonSerializable (line 9) | trait TJsonSerializable {
method fromJson (line 16) | public static function fromJson($json) {
method toJson (line 36) | public function toJson() {
FILE: classes/Common/Traits/TSingleton.php
type TSingleton (line 9) | trait TSingleton {
method me (line 16) | public static function me() {
FILE: classes/Common/Vector.php
class Vector (line 7) | class Vector {
method _staticInit (line 26) | public static function _staticInit($config) {
method readFromVector (line 41) | public function readFromVector($vector) {
method getParamInt (line 54) | protected function getParamInt($paramName, $planetRow) {
method readFromParamFleets (line 63) | public function readFromParamFleets($planetRow = array()) {
method __construct (line 80) | public function __construct($galaxy = 0, $system = 0, $planet = 0, $ty...
method distance (line 101) | public function distance($vector, $returnZero = false) {
method convertToVector (line 124) | public static function convertToVector($coordinates, $prefix = '') {
method convertToVectorDynamic (line 137) | public function convertToVectorDynamic($coordinates, $prefix = '') {
method toArray (line 153) | public function toArray($prefix = '') {
method distanceFromCoordinates (line 170) | public function distanceFromCoordinates($coordinates, $returnZero = fa...
method distanceBetweenCoordinates (line 181) | public static function distanceBetweenCoordinates($from, $to, $returnZ...
method isSameLocation (line 190) | public function isSameLocation($planetRow) {
method isInUniverse (line 197) | public function isInUniverse() {
method isInSystem (line 206) | public function isInSystem() {
method isInKnownSpace (line 213) | public function isInKnownSpace() {
FILE: classes/Common/oldArrayAccessNd.php
class oldArrayAccessNd (line 16) | abstract class oldArrayAccessNd implements ArrayAccess {
method __get (line 18) | abstract public function __get($offset);
method __set (line 20) | abstract public function __set($offset, $value = null);
method __isset (line 22) | abstract public function __isset($offset);
method __unset (line 24) | abstract public function __unset($offset);
method __flush (line 26) | public function __flush() {
method offsetExists (line 44) | public function offsetExists($offset) {
method offsetGet (line 70) | public function offsetGet($offset) {
method offsetSet (line 100) | public function offsetSet($offset, $value = null) {
method offsetUnset (line 152) | public function offsetUnset($offset) {
FILE: classes/Confirmation.php
class Confirmation (line 10) | class Confirmation {
method __construct (line 17) | public function __construct($db) {
method db_confirmation_get_latest_by_type_and_email (line 23) | public function db_confirmation_get_latest_by_type_and_email($confirma...
method db_confirmation_delete_by_type_and_email (line 37) | public function db_confirmation_delete_by_type_and_email($confirmation...
method db_confirmation_get_unique_code_by_type_and_email (line 45) | public function db_confirmation_get_unique_code_by_type_and_email($con...
method db_confirmation_get_by_type_and_code (line 66) | public function db_confirmation_get_by_type_and_code($confirmation_typ...
method make_password_reset_code (line 80) | protected function make_password_reset_code() {
FILE: classes/Core/Autoloader.php
class Autoloader (line 15) | class Autoloader {
method _constructorStatic (line 26) | protected static function _constructorStatic() {
method autoloader (line 36) | public static function autoloader($class) {
method register (line 60) | public static function register($absoluteClassRoot, $classPrefix = '') {
method reset (line 89) | public static function reset() {
FILE: classes/Core/Crypto.php
class Crypto (line 13) | class Crypto {
method __construct (line 19) | public function __construct(GlobalContainer $gc) {
method sign (line 28) | public function sign($string) {
method signCheck (line 32) | public function signCheck($string, $sign) {
method hash (line 43) | public function hash($string) {
FILE: classes/Core/Entity.php
class Entity (line 16) | class Entity {
method __construct (line 18) | public function __construct() {
FILE: classes/Core/EntityDb.php
class EntityDb (line 32) | class EntityDb extends Entity implements IContainer {
method __construct (line 61) | public function __construct() {
method reset (line 73) | public function reset() {
method reload (line 92) | public function reload() {
method isNew (line 114) | public function isNew() {
method dbLoadRecord (line 130) | public function dbLoadRecord($id) {
method setForUpdate (line 155) | public function setForUpdate($forUpdate = DbQuery::DB_FOR_UPDATE) {
method dbUpdate (line 166) | public function dbUpdate() {
method _getContainer (line 173) | public function _getContainer() {
method _containerTranslatePropertyName (line 186) | protected function _containerTranslatePropertyName($name) {
method save (line 196) | public function save() {
FILE: classes/Core/GlobalContainer.php
class GlobalContainer (line 104) | class GlobalContainer extends ContainerPlus {
method __construct (line 106) | public function __construct(array $values = array()) {
FILE: classes/Core/HttpRequest.php
class HttpRequest (line 8) | class HttpRequest {
method __construct (line 23) | public function __construct(GlobalContainer $gc) {
method fillCurrent (line 29) | public function fillCurrent() {
FILE: classes/Core/HttpUrl.php
class HttpUrl (line 9) | class HttpUrl {
method spawn (line 59) | public static function spawn(GlobalContainer $gc) {
method __construct (line 63) | public function __construct(GlobalContainer $gc) {
method parseUrl (line 67) | public function parseUrl($url) {
method fillCurrent (line 98) | public function fillCurrent() {
method serverRoot (line 123) | public function serverRoot() {
method url (line 127) | public function url() {
method uri (line 131) | public function uri() {
method urlSigned (line 140) | public function urlSigned($timeStamp = true) {
method isSigned (line 159) | public function isSigned() {
method explodeUri (line 182) | protected function explodeUri($uri) {
method parseGetParams (line 204) | protected function parseGetParams($paramString) {
method renderGetParams (line 229) | protected function renderGetParams() {
method removeSignature (line 243) | public function removeSignature() {
method setCypher (line 253) | public function setCypher($cypher) {
method addParams (line 264) | public function addParams($params) {
method addPath (line 278) | public function addPath($path) {
method isSignaturePresent (line 290) | public function isSignaturePresent() {
FILE: classes/Core/RepoV2.php
class RepoV2 (line 26) | class RepoV2 implements IContainer {
method __construct (line 50) | public function __construct(GlobalContainer $gc) { }
method addSynonym (line 58) | public function addSynonym($className, $synonym) {
method get (line 71) | public function get($className, $objectId) {
method version (line 83) | protected function version($className, $objectId) {
method getOrLoad (line 99) | public function getOrLoad($className, $objectId) {
method getPlanet (line 140) | public function getPlanet($planetId) {
method getFleet (line 151) | public function getFleet($fleetId) {
method set (line 166) | public function set($value) {
method getClassStoreName (line 190) | protected function getClassStoreName($className) {
method is_set (line 200) | public function is_set($className, $objectId) {
method un_set (line 210) | public function un_set($className, $objectId) {
method unsetByEntity (line 220) | public function unsetByEntity($entity) {
method isEmpty (line 233) | public function isEmpty() {
method clear (line 240) | public function clear() {
method __set (line 255) | public function __set($name, $value) {
method __get (line 266) | public function __get($name) {
method __isset (line 282) | public function __isset($name) {
method __unset (line 293) | public function __unset($name) {
FILE: classes/Core/Repository.php
class Repository (line 21) | class Repository {
method __construct (line 49) | public function __construct(GlobalContainer $gc) {
method getById (line 60) | public function getById($model, $id) {
method getCollectionName (line 85) | protected function getCollectionName($object) {
method get (line 89) | public function get($entityClass, $id) {
method getPool (line 98) | protected function getPool($entityClass) {
method registerFactory (line 102) | public function registerFactory($factory) {
FILE: classes/Core/Scheduler/Lock.php
class Lock (line 17) | class Lock {
method __construct (line 70) | public function __construct($gc, $configName, $maxLockInterval = PERIO...
method isLocked (line 86) | public function isLocked($time = SN_TIME_NOW) {
method lock (line 106) | public function lock($time = SN_TIME_NOW) {
method unLock (line 116) | public function unLock($selfTransaction = true) {
method configWrite (line 131) | protected function configWrite($data) {
method attemptLock (line 144) | public function attemptLock($callable = null, $time = SN_TIME_NOW) {
FILE: classes/Core/Scheduler/TaskConditional.php
class TaskConditional (line 19) | class TaskConditional {
method __construct (line 64) | public function __construct($gc = null) {
method __invoke (line 81) | public function __invoke() {
method isTaskAllowed (line 118) | protected function isTaskAllowed() {
method proceedLockExpiration (line 128) | protected function proceedLockExpiration() {
method condition (line 137) | protected function condition() {
method task (line 146) | protected function task() {
method updateTaskLastRunTime (line 153) | protected function updateTaskLastRunTime($time) {
FILE: classes/Core/Scheduler/TaskPeriodic.php
class TaskPeriodic (line 15) | class TaskPeriodic extends TaskConditional {
method isTaskAllowed (line 26) | protected function isTaskAllowed() {
method condition (line 33) | public function condition() {
FILE: classes/Core/Scheduler/Watchdog.php
class Watchdog (line 12) | class Watchdog {
method __construct (line 32) | public function __construct(GlobalContainer $gc) {
method register (line 41) | public function register(TaskConditional $task, $name = '') {
method getTask (line 54) | public function getTask($name) {
method execute (line 58) | public function execute() {
method checkConfigTimeDiff (line 76) | public function checkConfigTimeDiff($configName, $timeDiff, $callable,...
FILE: classes/Core/Singleton.php
class Singleton (line 9) | class Singleton {
method singleton (line 13) | public static function singleton() {
FILE: classes/Core/SnBootstrap.php
class SnBootstrap (line 13) | class SnBootstrap {
method install_benchmark (line 15) | public static function install_benchmark() {
method init_debug_state (line 98) | public static function init_debug_state() {
method performUpdate (line 139) | public static function performUpdate($config) {
FILE: classes/Core/SnPimp.php
class SnPimp (line 30) | class SnPimp extends Pimp {
method __construct (line 38) | public function __construct(GlobalContainer $gc) {
method add (line 65) | public function add($order = Pimp::ORDER_AS_IS) {
method name (line 89) | public function name() {
method __call (line 105) | public function __call($name, $arguments) {
method getHooker (line 127) | public function getHooker($name) {
FILE: classes/Core/StorageV2.php
class StorageV2 (line 11) | class StorageV2 {
method __construct (line 29) | public function __construct(GlobalContainer $gc) {
method setDb (line 37) | public function setDb(db_mysql $db) {
FILE: classes/Core/Updater.php
class Updater (line 16) | class Updater {
method __construct (line 37) | public function __construct() {
method __destruct (line 68) | public function __destruct() {
method upd_log_message (line 98) | public function upd_log_message($message) {
method upd_log_version_update (line 107) | public function upd_log_version_update() {
method upd_check_key (line 112) | public function upd_check_key($key, $default_value, $condition = false) {
method upd_create_table (line 135) | public function upd_create_table($table_name, $declaration, $tableOpti...
method upd_alter_table (line 169) | public function upd_alter_table($table, $alters, $condition = true) {
method upd_drop_table (line 197) | public function upd_drop_table($table_name) {
method indexDropIfExists (line 208) | public function indexDropIfExists($table, $index) {
method constraintDropIfExists (line 218) | public function constraintDropIfExists($table, $constraint) {
method indexReplace (line 233) | public function indexReplace($table, $index, $fields, $dropForeign = n...
method upd_add_more_time (line 259) | public function upd_add_more_time($time = 0) {
method updPatchExists (line 274) | public function updPatchExists($id) {
method updPatchRegister (line 283) | public function updPatchRegister($id) {
method updPatchApply (line 292) | public function updPatchApply($patchId, $callable, $preCheck = PATCH_R...
method upd_do_query (line 308) | public function upd_do_query($query, $no_log = false) {
method checkVersionSupport (line 325) | protected function checkVersionSupport() {
method getFieldDescription (line 351) | public function getFieldDescription($table, $field) {
method getIndexDescription (line 361) | public function getIndexDescription($table, $index) {
method isTableExists (line 365) | public function isTableExists($table) {
method isFieldExists (line 369) | public function isFieldExists($table, $field) {
method isIndexExists (line 373) | public function isIndexExists($table, $index) {
method isConstrainExists (line 377) | public function isConstrainExists($table, $index) {
method transactionStart (line 381) | public function transactionStart() {
method transactionCommit (line 386) | public function transactionCommit() {
FILE: classes/Core/Worker.php
class Worker (line 8) | class Worker {
method detachIncomingRequest (line 24) | public static function detachIncomingRequest() {
method __construct (line 44) | public function __construct(GlobalContainer $gc) {
method __call (line 48) | public function __call($name, $arguments) {
method registerWorker (line 57) | public function registerWorker($name, $callable) {
FILE: classes/DBAL/ActiveRecord.php
class ActiveRecord (line 15) | class ActiveRecord extends ActiveRecordAbstractIndexed {
FILE: classes/DBAL/ActiveRecordAbstract.php
class ActiveRecordAbstract (line 18) | abstract class ActiveRecordAbstract extends AccessLogged {
method tableName (line 66) | public static function tableName() {
method setDb (line 75) | public static function setDb(\DBAL\db_mysql $db) {
method db (line 84) | public static function db() {
method buildEvenEmpty (line 97) | public static function buildEvenEmpty(array $properties = []) {
method build (line 114) | public static function build(array $properties = []) {
method setForUpdate (line 127) | public static function setForUpdate($forUpdate = DbQuery::DB_FOR_UPDAT...
method find (line 138) | public static function find($propertyFilter) {
method findRecordFirst (line 160) | public static function findRecordFirst($propertyFilter) {
method findRecordsAll (line 174) | public static function findRecordsAll($propertyFilter) {
method findFirst (line 185) | public static function findFirst($propertyFilter) {
method findAll (line 205) | public static function findAll($propertyFilter) {
method __construct (line 215) | public function __construct(GlobalContainer $services = null) {
method insert (line 224) | public function insert() {
method ptlArray (line 252) | public function ptlArray() {
method getDefault (line 268) | public function getDefault($propertyName) {
method __get (line 284) | public function __get($propertyName) {
method __set (line 288) | public function __set($propertyName, $value) {
method calcTableName (line 310) | protected static function calcTableName() {
method dbGetFieldsDescription (line 325) | protected static function dbGetFieldsDescription() {
method dbPrepareQuery (line 334) | protected static function dbPrepareQuery() {
method haveTranslationToProperty (line 345) | protected static function haveTranslationToProperty($fieldName) {
method haveField (line 356) | protected static function haveField($fieldName) {
method getFieldName (line 367) | protected static function getFieldName($propertyName) {
method haveProperty (line 393) | protected static function haveProperty($propertyName) {
method getPropertyName (line 404) | protected static function getPropertyName($fieldName) {
method translateNames (line 425) | protected static function translateNames(array $names, $fieldToPropert...
method fromRecordList (line 454) | protected static function fromRecordList($records, $fieldToProperties ...
method defaultValues (line 480) | protected function defaultValues() {
method fromProperties (line 508) | protected function fromProperties(array $properties) {
method fromFields (line 524) | protected function fromFields(array $fields) {
method dbInsert (line 531) | protected function dbInsert() {
method shieldName (line 545) | protected function shieldName($propertyName) {
FILE: classes/DBAL/ActiveRecordAbstractIndexed.php
class ActiveRecordAbstractIndexed (line 15) | class ActiveRecordAbstractIndexed extends ActiveRecordAbstract {
method findRecordById (line 32) | public static function findRecordById($recordId) {
method findById (line 41) | public static function findById($recordId) {
method update (line 48) | public function update() {
method delete (line 67) | public function delete() {
method dbUpdate (line 114) | protected function dbUpdate() {
method getFieldName (line 135) | protected static function getFieldName($propertyName) {
method getPropertyName (line 145) | protected static function getPropertyName($fieldName) {
method insert (line 162) | public function insert() {
method dbLastInsertId (line 176) | protected function dbLastInsertId() {
FILE: classes/DBAL/DbAbstractResultIterator.php
class DbAbstractResultIterator (line 19) | abstract class DbAbstractResultIterator implements ICountableIterator {
method seekToFirst (line 37) | protected function seekToFirst() {
method rewind (line 46) | public function rewind() {
method valid (line 57) | public function valid() {
method next (line 64) | public function next() {
method key (line 74) | public function key() {
method current (line 81) | public function current() {
method count (line 88) | public function count() {
FILE: classes/DBAL/DbFieldDescription.php
class DbFieldDescription (line 14) | class DbFieldDescription {
method fromMySqlDescription (line 28) | public function fromMySqlDescription($mySqlDescription) {
FILE: classes/DBAL/DbIndexDescription.php
class DbIndexDescription (line 14) | class DbIndexDescription {
method addField (line 36) | public function addField($indexField) {
method signature (line 59) | public function signature() {
method sort (line 66) | protected function sort() {
FILE: classes/DBAL/DbIndexField.php
class DbIndexField (line 8) | class DbIndexField {
method __construct (line 17) | public function __construct($indexField = []) {
method fromMySqlDescription (line 24) | public function fromMySqlDescription($indexField) {
FILE: classes/DBAL/DbMysqliResultIterator.php
class DbMysqliResultIterator (line 17) | class DbMysqliResultIterator extends DbAbstractResultIterator {
method __construct (line 23) | public function __construct($mysqli_result) {
FILE: classes/DBAL/DbQuery.php
class DbQuery (line 21) | class DbQuery {
method __construct (line 102) | public function __construct($db = null) {
method build (line 111) | public static function build($db = null) {
method select (line 116) | public function select() {
method delete (line 129) | public function delete() {
method update (line 139) | public function update() {
method setInsertCommand (line 155) | protected function setInsertCommand($replace) {
method doInsert (line 177) | public function doInsert($replace = self::DB_INSERT_PLAIN, $forceSingl...
method doUpdate (line 181) | public function doUpdate() {
method doUpdateDb (line 185) | public function doUpdateDb() {
method doDelete (line 193) | public function doDelete() {
method doDeleteDb (line 198) | public function doDeleteDb() {
method doSelect (line 205) | public function doSelect() {
method doSelectFetch (line 212) | public function doSelectFetch() {
method insert (line 222) | public function insert($replace = self::DB_INSERT_PLAIN, $forceSingleI...
method setTable (line 247) | public function setTable($table) {
method setOneRow (line 258) | public function setOneRow($oneRow = self::DB_RECORD_ONE) {
method setForUpdate (line 269) | public function setForUpdate($forUpdate = self::DB_FOR_UPDATE) {
method setValues (line 284) | public function setValues($values = []) {
method setValuesDanger (line 295) | public function setValuesDanger($values = array()) {
method setAdjust (line 306) | public function setAdjust($values = array()) {
method setAdjustDanger (line 317) | public function setAdjustDanger($values = array()) {
method setFields (line 328) | public function setFields($fields = array()) {
method setWhereArray (line 341) | public function setWhereArray($whereArray = array()) {
method setWhereArrayDanger (line 356) | public function setWhereArrayDanger($whereArrayDanger = array()) {
method escape (line 370) | protected function escape($string) {
method escapeEmulator (line 374) | protected function escapeEmulator($value) {
method stringValue (line 390) | protected function stringValue($value) {
method quote (line 401) | public function quote($fieldName) {
method makeAdjustString (line 414) | public function makeAdjustString($fieldValue, $fieldName) {
method makeFieldEqualValue (line 435) | public function makeFieldEqualValue($fieldValue, $fieldName) {
method quoteTable (line 448) | protected function quoteTable($tableName) {
method makeValueSafe (line 459) | public function makeValueSafe($value) {
method buildCommand (line 493) | protected function buildCommand($command) {
method buildSetFields (line 516) | protected function buildSetFields() {
method buildFieldNames (line 543) | protected function buildFieldNames() {
method buildValuesVector (line 551) | protected function buildValuesVector() {
method buildWhere (line 566) | protected function buildWhere() {
method buildLimit (line 578) | protected function buildLimit() {
method buildForUpdate (line 584) | protected function buildForUpdate() {
method __toString (line 590) | public function __toString() {
FILE: classes/DBAL/DbSqlPaging.php
class DbSqlPaging (line 19) | class DbSqlPaging extends DbAbstractResultIterator {
method __construct (line 33) | public function __construct($sqlQuery, $pageSize = PAGING_PAGE_SIZE_DE...
method valid (line 46) | public function valid() {
method count (line 53) | public function count() {
method seekToFirst (line 60) | protected function seekToFirst() {
method getCurrentPageNumber (line 71) | public function getCurrentPageNumber() {
method getTotalRecords (line 80) | public function getTotalRecords() {
method getTotalPages (line 89) | public function getTotalPages() {
method getRecordsOnCurrentPage (line 98) | public function getRecordsOnCurrentPage() {
method getPageZeroRecordNum (line 107) | protected function getPageZeroRecordNum() {
method query (line 114) | protected function query() {
FILE: classes/DBAL/OldDbChangeSet.php
class OldDbChangeSet (line 20) | class OldDbChangeSet {
method db_changeset_prepare_unit (line 31) | public static function db_changeset_prepare_unit($unit_id, $unit_value...
method db_changeset_condition_compile (line 94) | public static function db_changeset_condition_compile(&$conditions, &$...
method db_changeset_apply (line 183) | public static function db_changeset_apply($db_changeset) {
FILE: classes/DBAL/PropertyDescription.php
class PropertyDescription (line 13) | class PropertyDescription {
method setName (line 93) | public function setName($propertyName) {
method fromDbFieldDescription (line 102) | public function fromDbFieldDescription(DbFieldDescription $fieldDescri...
method toInteger (line 167) | public static function toInteger($value) {
method intFromUser (line 170) | public static function intFromUser($value, PropertyDescription $descri...
method toUnixTime (line 180) | public static function toUnixTime($value) {
method fromUnixTime (line 184) | public static function fromUnixTime($value) {
method datetimeFromUser (line 196) | public static function datetimeFromUser($value, PropertyDescription $d...
method jsonDecode (line 205) | public static function jsonDecode($value) {
method jsonEncode (line 211) | public static function jsonEncode($value) {
FILE: classes/DBAL/RecordV2.php
class RecordV2 (line 27) | class RecordV2 extends AccessLoggedTranslatedV2 {
method tableName (line 46) | public static function tableName() {
method indexField (line 60) | public static function indexField() {
method __construct (line 64) | public function __construct(GlobalContainer $services = null) {
method setStorage (line 79) | public static function setStorage(StorageSqlV2 $storage) {
method getStorage (line 90) | public static function getStorage() {
method save (line 100) | public function save() {
method delete (line 126) | protected function delete() {
method toFieldArray (line 142) | public function toFieldArray($useDefaults = false, $skipId = false) {
method insert (line 156) | protected function insert() {
method update (line 182) | protected function update() {
method findById (line 202) | public function findById($id) {
method replaceFromFieldArray (line 210) | protected function replaceFromFieldArray(array $array) {
method clear (line 221) | public function clear() {
method isDeleted (line 228) | public function isDeleted() {
method isEmpty (line 237) | public function isEmpty() {
method markDelete (line 251) | public function markDelete($mark = true) {
method findByIdStatic (line 261) | public static function findByIdStatic($id) {
method findAllStatic (line 274) | public static function findAllStatic(GlobalContainer $services) {
method isNew (line 294) | public function isNew() {
FILE: classes/DBAL/RecordV3.php
class RecordV3 (line 6) | class RecordV3 {
method castTo (line 13) | public static function castTo($data) {
FILE: classes/DBAL/Schema.php
class Schema (line 9) | class Schema {
method __construct (line 29) | public function __construct(db_mysql $db) {
method getDb (line 33) | public function getDb() {
method clear (line 37) | public function clear() {
method loadTableNamesFromDb (line 43) | protected function loadTableNamesFromDb() {
method getAllTables (line 70) | public function getAllTables() {
method getSnTables (line 83) | public function getSnTables() {
method isSnTableExists (line 98) | public function isSnTableExists($tableName) {
method getTableSchema (line 107) | public function getTableSchema($tableName) {
method isIndexExists (line 121) | public function isIndexExists($table, $index) {
method isFieldExists (line 125) | public function isFieldExists($table, $field) {
method isConstrainExists (line 129) | public function isConstrainExists($table, $constrain) {
FILE: classes/DBAL/StorageSqlV2.php
class StorageSqlV2 (line 12) | class StorageSqlV2 {
method __construct (line 20) | public function __construct(GlobalContainer $services = null) {
method forUpdate (line 27) | public function forUpdate() {
method findIterator (line 57) | public function findIterator($tableName, $conditions) {
method findFirst (line 76) | public function findFirst($tableName, $conditions) {
method findAll (line 90) | public function findAll($tableName, $conditions) {
method fields (line 128) | public function fields($tableName) {
method insert (line 139) | public function insert($tableName, array $fieldList) {
method delete (line 156) | public function delete($tableName, $conditions) {
method update (line 165) | public function update($tableName, $conditions, $changes, $deltas) {
FILE: classes/DBAL/TableSchema.php
class TableSchema (line 9) | class TableSchema {
method __construct (line 37) | public function __construct($tableName, Schema $dbSchema) {
method isFieldExists (line 47) | public function isFieldExists($field) {
method isIndexExists (line 51) | public function isIndexExists($index) {
method isConstrainExists (line 55) | public function isConstrainExists($index) {
FILE: classes/DBAL/db_mysql.php
class db_mysql (line 21) | class db_mysql {
method __construct (line 114) | public function __construct($gc) {
method schema (line 123) | public function schema() {
method load_db_settings (line 131) | public function load_db_settings() {
method sn_db_connect (line 139) | public function sn_db_connect($external_db_settings = null) {
method mysql_connect_driver (line 180) | public function mysql_connect_driver($settings) {
method db_disconnect (line 212) | public function db_disconnect() {
method handlerQueryWarning (line 231) | public function handlerQueryWarning($errno, $errStr, $errFile, $errLin...
method prefixReplace (line 247) | public function prefixReplace($sql) {
method doquery (line 258) | public function doquery($query, $fetch = false, $skip_query_check = fa...
method dbGetAll (line 307) | public function dbGetAll($query, $skipQueryCheck = false, $asArray = t...
method doQueryAndFetch (line 318) | public function doQueryAndFetch($query) {
method doQueryFast (line 322) | public function doQueryFast($query, $fetch = false) {
method selectIterator (line 338) | public function selectIterator($query, $skip_query_check = false) {
method selectValue (line 348) | public function selectValue($query, $skip_query_check = false) {
method dbqSelectAndFetch (line 359) | public function dbqSelectAndFetch(DbQuery $dbQuery) {
method security_watch_user_queries (line 364) | public function security_watch_user_queries($query) {
method security_query_check_bad_words (line 386) | public function security_query_check_bad_words($query) {
method mysql_get_table_list (line 441) | public function mysql_get_table_list() {
method mysql_get_innodb_status (line 445) | public function mysql_get_innodb_status() {
method mysql_get_fields (line 454) | public function mysql_get_fields($tableName_unsafe) {
method mysql_get_indexes (line 474) | public function mysql_get_indexes($tableName_unsafe) {
method mysql_get_constraints (line 498) | public function mysql_get_constraints($tableName_unsafe) {
method db_sql_query (line 529) | public function db_sql_query($query_string) {
method db_fetch (line 545) | public function db_fetch($query_result) {
method db_escape (line 559) | public function db_escape($unescaped_string) {
method driver_disconnect (line 563) | public function driver_disconnect() {
method db_error (line 573) | public function db_error() {
method db_insert_id (line 580) | public function db_insert_id() {
method db_num_rows (line 584) | public function db_num_rows($result) {
method db_affected_rows (line 588) | public function db_affected_rows() {
method getClientInfo (line 592) | public function getClientInfo() {
method getServerInfo (line 596) | public function getServerInfo() {
method getHostInfo (line 600) | public function getHostInfo() {
method getServerStat (line 604) | public function getServerStat() {
method setDbSettings (line 611) | public function setDbSettings($dbSettings) {
method getDbSettings (line 618) | public function getDbSettings() {
method transactionStart (line 627) | public function transactionStart($level = '') {
method transactionCommit (line 640) | public function transactionCommit() {
method transactionRollback (line 648) | public function transactionRollback() {
method transactionCheck (line 658) | public function transactionCheck() {
method transactionWrap (line 670) | public function transactionWrap($callback, $level = '') {
method db_transaction_start (line 678) | public static function db_transaction_start($level = '') {
method db_transaction_rollback (line 697) | public static function db_transaction_rollback() {
method db_lock_tables (line 716) | public static function db_lock_tables($tables) {
method db_transaction_commit (line 725) | public static function db_transaction_commit() {
method db_transaction_check (line 749) | public static function db_transaction_check($status = self::DB_TRANSAC...
method lockRecords (line 776) | public function lockRecords($locks) {
FILE: classes/Design.php
class Design (line 15) | class Design {
method __construct (line 30) | public function __construct(GlobalContainer $gc) {
method detectElementsFormat (line 45) | protected function detectElementsFormat($elements, $accessLevel = AUTH...
method addElements (line 63) | protected function addElements(&$array, $elements, $accessLevel = AUTH...
method addBbCodes (line 81) | public function addBbCodes($bbCodes, $accessLevel = AUTH_LEVEL_REGISTE...
method addSmiles (line 93) | public function addSmiles($smiles, $accessLevel = AUTH_LEVEL_REGISTERE...
method getSmiles (line 122) | public function getSmiles() {
method getBbCodes (line 126) | public function getBbCodes() {
method getSmilesList (line 135) | public function getSmilesList() {
FILE: classes/Fleet/Constants.php
class Constants (line 6) | class Constants {
FILE: classes/Fleet/DbFleetStatic.php
class DbFleetStatic (line 20) | class DbFleetStatic {
method dbq (line 26) | protected static function dbq() {
method fleet_insert_set_dbq (line 40) | public static function fleet_insert_set_dbq($fieldArray) {
method fleet_update_set (line 63) | public static function fleet_update_set($fleet_id, $set, $delta = arra...
method db_fleet_update_set_safe_string (line 84) | protected static function db_fleet_update_set_safe_string($fleet_id, $...
method db_fleet_get (line 105) | public static function db_fleet_get($fleet_id) {
method db_fleet_delete (line 120) | public static function db_fleet_delete($fleet_id) {
method db_fleet_count (line 142) | public static function db_fleet_count($where_safe) {
method db_fleet_list (line 159) | public static function db_fleet_list($where_safe, $for_update = DB_SEL...
method db_fleet_list_delete_by_owner (line 192) | public static function db_fleet_list_delete_by_owner($owner_id) {
method db_fleet_list_query_all_stat (line 203) | public static function db_fleet_list_query_all_stat() {
method fleet_send_back (line 220) | public static function fleet_send_back(&$fleet_row) {
method fleet_count_flying (line 245) | public static function fleet_count_flying($player_id, $mission_id = 0) {
method fleet_count_incoming (line 271) | public static function fleet_count_incoming($galaxy, $system, $planet) {
method fleet_list_by_owner_id (line 287) | public static function fleet_list_by_owner_id($fleet_owner_id) {
method fleet_list_by_planet_coords (line 304) | public static function fleet_list_by_planet_coords($galaxy, $system, $...
method fleet_list_on_hold (line 338) | public static function fleet_list_on_hold($galaxy, $system, $planet, $...
method fleet_list_bashing (line 360) | public static function fleet_list_bashing($fleet_owner_id, $planet_row) {
method fleet_list_by_group (line 380) | public static function fleet_list_by_group($group_id) {
method db_missile_list (line 396) | public static function db_missile_list($where, $for_update = DB_SELECT...
method fleet_and_missiles_list_by_coordinates (line 423) | public static function fleet_and_missiles_list_by_coordinates($coordin...
method fleet_and_missiles_list_incoming (line 459) | public static function fleet_and_missiles_list_incoming($owner_id) {
method db_fleet_acs_purge (line 480) | public static function db_fleet_acs_purge() {
method dbAcsGetById (line 487) | public static function dbAcsGetById($acsId) {
method dbAcsGetByFleet (line 494) | public static function dbAcsGetByFleet($fleetId) {
method dbAcsDelete (line 506) | public static function dbAcsDelete($fleetList) {
method dbAcsAddUserByFleetId (line 529) | public static function dbAcsAddUserByFleetId($userToAddID, $fleetid) {
method dbAcsInsert (line 540) | public static function dbAcsInsert($userId, $fleetid, $fleet) {
method dbAcsGetAll (line 557) | public static function dbAcsGetAll() {
method acsAddUser (line 570) | public static function acsAddUser($user, $fleet, $userToAddRecord) {
method acsAddUser2 (line 599) | public static function acsAddUser2($aks, $fleet, $userToAddID, $userId) {
method acsIsAcsFull (line 667) | public static function acsIsAcsFull($acsId) {
method tpl_get_fleets_flying (line 679) | public static function tpl_get_fleets_flying(&$user) {
FILE: classes/Fleet/Fleet.php
class Fleet (line 52) | class Fleet extends EntityDb {
method __construct (line 99) | public function __construct() {
method returnForce (line 112) | public function returnForce($byPlayerId) {
method _getContainer (line 140) | public function _getContainer() {
method getUnitInfo (line 149) | protected static function getUnitInfo($shipId) {
method getShipsBasicCosts (line 162) | public function getShipsBasicCosts($resourceId = RES_METAL) {
method getShipCostInMetal (line 178) | public function getShipCostInMetal($shipId) {
method getCostInMetal (line 193) | public function getCostInMetal() {
method getShipCapacity (line 211) | public function getShipCapacity($shipId) {
method getCapacityActual (line 224) | public function getCapacityActual() {
method isEmpty (line 237) | public function isEmpty() {
method changeShipCount (line 249) | public function changeShipCount($shipSnId, $shipCount) {
method changeResource (line 259) | public function changeResource($resourceId, $resourceCount) {
method getShipListArray (line 266) | public function getShipListArray() {
method getResourceList (line 273) | public function getResourceList() {
method getShipCount (line 280) | public function getShipCount() {
method calcShipLossByMultiplier (line 289) | public function calcShipLossByMultiplier($multiplier) {
method setMission (line 305) | public function setMission($missionId) {
method setFleetOwnerRecord (line 317) | public function setFleetOwnerRecord($playerRecord) {
method getFleetOwnerRecord (line 327) | public function getFleetOwnerRecord() {
method setSourceFromPlanetRecord (line 341) | public function setSourceFromPlanetRecord($from) {
method setDestinationFromPlanetRecord (line 362) | public function setDestinationFromPlanetRecord($to) {
method setUnits (line 381) | public function setUnits($fleet) {
method setSpeedPercentInTenth (line 404) | public function setSpeedPercentInTenth($speedPercentTenth) {
method calcTravelTimes (line 416) | public function calcTravelTimes($launchTime = SN_TIME_NOW, $stayDurati...
method save (line 429) | public function save() {
method getTravelData (line 436) | protected function getTravelData() {
FILE: classes/Fleet/FleetDispatchEvent.php
class FleetDispatchEvent (line 27) | class FleetDispatchEvent {
method __construct (line 62) | public function __construct($fleetRow, $eventType) {
method lockEventRecords (line 151) | public function lockEventRecords() {
method sortEvents (line 166) | public static function sortEvents(&$eventList) {
method refreshMissionData (line 192) | public function refreshMissionData() {
method refreshFleet (line 210) | public function refreshFleet() {
method getSrcPlanetRowFromFleet (line 214) | public function getSrcPlanetRowFromFleet() {
method updateSrcPlanetRow (line 227) | public function updateSrcPlanetRow($srcPlanetRow) {
method getDstPlanetRowFromFleet (line 240) | public function getDstPlanetRowFromFleet() {
method updateDstPlanetRow (line 253) | public function updateDstPlanetRow($dstPlanetRow = null) {
FILE: classes/Fleet/FleetDispatcher.php
class FleetDispatcher (line 21) | class FleetDispatcher {
method __construct (line 48) | public function __construct(GlobalContainer $gc) {
method getLockOld (line 81) | protected function getLockOld() {
method releaseLock (line 108) | protected function releaseLock() {
method mark (line 119) | public static function mark($message = '') {
method flt_flying_fleet_handler (line 134) | public function flt_flying_fleet_handler() {
method logTermination (line 276) | public function logTermination($workTime, $eventsProcessed, $lastMissi...
method buildLock (line 295) | public function buildLock() {
method getFleetEvents (line 299) | public function getFleetEvents() {
method loadMissionFiles (line 337) | public function loadMissionFiles() {
method log_file (line 364) | public function log_file($msg) {
FILE: classes/Fleet/FleetRowObject.php
class FleetRowObject (line 37) | class FleetRowObject {
FILE: classes/Fleet/FleetStatic.php
class FleetStatic (line 12) | class FleetStatic {
method dbFleetsOnHoldOnPlanetsByIds (line 20) | public static function dbFleetsOnHoldOnPlanetsByIds($planetIds, $time ...
method flt_fleet_speed (line 36) | public static function flt_fleet_speed($user, $fleet, $shipData = []) {
FILE: classes/Fleet/FleetWatchdog.php
class FleetWatchdog (line 9) | class FleetWatchdog {
method __construct (line 40) | public function __construct() {
method acquireLock (line 53) | public function acquireLock() {
method begin (line 75) | public function begin(FleetDispatchEvent $fleetEvent) {
method logTermination (line 103) | public function logTermination() {
method unlock (line 111) | public function unlock() {
method getTerminationMessage (line 118) | public function getTerminationMessage() {
FILE: classes/Fleet/MissionData.php
class MissionData (line 11) | class MissionData {
method buildFromArray (line 41) | public static function buildFromArray($fleetEvent) {
method __construct (line 50) | public function __construct($fleetEvent) {
method changeGc (line 60) | public function changeGc($gc) {
method fromMissionArray (line 67) | protected function fromMissionArray($fleetEvent) {
method dbFleetFindRecordById (line 79) | protected function dbFleetFindRecordById($fleetId) {
method getDefaultLang (line 86) | protected function getDefaultLang() {
method getDefaultGeneral (line 93) | protected function getDefaultGeneral() {
FILE: classes/Fleet/MissionEspionage.php
class MissionEspionage (line 11) | class MissionEspionage extends MissionData {
method flt_mission_spy (line 20) | public function flt_mission_spy() {
method scanGroup (line 51) | protected function scanGroup($group_name) {
method doSpying (line 57) | protected function doSpying() {
method dbApplyChanges (line 81) | protected function dbApplyChanges() {
FILE: classes/Fleet/MissionEspionageReport.php
class MissionEspionageReport (line 18) | class MissionEspionageReport {
method __construct (line 82) | public function __construct(MissionData $missionData) {
method getEmpireSpyDiff (line 124) | public function getEmpireSpyDiff() {
method getProbesNumber (line 131) | public function getProbesNumber() {
method getAntiSpyDiff (line 135) | public function getAntiSpyDiff() {
method getPlanetSpyDiff (line 148) | public function getPlanetSpyDiff() {
method addUnit (line 156) | public function addUnit($unitId, $unitAmount) {
method getSimulatorLink (line 163) | public function getSimulatorLink() {
method getDetectionTrashold (line 183) | public function getDetectionTrashold() {
method rollChance (line 187) | public function rollChance() {
method isSpyDetected (line 195) | public function isSpyDetected() {
FILE: classes/Fleet/MissionExploreResult.php
class MissionExploreResult (line 9) | class MissionExploreResult {
method __construct (line 118) | public function __construct() {
method flt_mission_explore (line 126) | public function flt_mission_explore(FleetDispatchEvent $fleetEvent) {
method renderUnits (line 230) | protected function renderUnits(array $theFleet) {
method flt_mission_explore_addon (line 244) | protected function flt_mission_explore_addon(MissionExploreResult $out...
method resetExpedition (line 256) | protected function resetExpedition(FleetDispatchEvent $fleetEvent = nu...
method getShipData (line 284) | protected static function getShipData() {
method getExchangeRates (line 305) | protected static function getExchangeRates() {
method saveResult (line 318) | protected function saveResult() {
method sendReport (line 365) | protected function sendReport(array $fleetRow) {
method applyFleetChanges (line 441) | protected function applyFleetChanges() {
method calcSecondaryData (line 476) | protected function calcSecondaryData() {
method adjustNoneChance (line 497) | protected function adjustNoneChance(array $outcomeConfigs) {
method calculateRollValues (line 513) | protected function calculateRollValues(array $outcomeConfigs) {
method outcomeShipsLostPartially (line 533) | protected function outcomeShipsLostPartially() {
method outcomeLostFleetAll (line 547) | protected function outcomeLostFleetAll() {
method outcomeFoundResources (line 556) | protected function outcomeFoundResources() {
method outcomeFoundShips (line 586) | protected function outcomeFoundShips() {
method outcomeFoundDm (line 637) | protected function outcomeFoundDm() {
FILE: classes/Fleet/RecordFleet.php
class RecordFleet (line 43) | class RecordFleet extends ActiveRecord {
method __construct (line 69) | public function __construct(GlobalContainer $services = null) {
method fromProperties (line 76) | protected function fromProperties(array $properties) {
method update (line 91) | public function update() {
method changeShipCount (line 151) | public function changeShipCount($shipSnId, $shipCount) {
method changeResource (line 175) | public function changeResource($resourceId, $resourceCount) {
method isEmpty (line 202) | public function isEmpty() {
method getShipCount (line 206) | public function getShipCount() {
method getShipList (line 214) | public function getShipList() {
method getResourceCount (line 221) | public function getResourceCount() {
method getResourceList (line 228) | public function getResourceList() {
FILE: classes/Fleet/TaskDispatchFleets.php
class TaskDispatchFleets (line 15) | class TaskDispatchFleets extends TaskPeriodic {
method getLock (line 28) | public static function getLock($gc) {
method __construct (line 38) | public function __construct($gc = null) {
method isTaskAllowed (line 45) | protected function isTaskAllowed() {
method proceedLockExpiration (line 55) | protected function proceedLockExpiration() {
method task (line 62) | protected function task() {
FILE: classes/General.php
class General (line 15) | class General {
method __construct (line 31) | public function __construct(GlobalContainer $gc) {
method getGroupsByName (line 41) | public function getGroupsByName($groupNameList) {
method getGroupsById (line 50) | public function getGroupsById($groupIdList) {
method fleetNoobPoints (line 69) | public function fleetNoobPoints() {
method playerIsNoobByPoints (line 80) | public function playerIsNoobByPoints($playerTotalPoints) {
method playerIs1stStrongerThen2nd (line 92) | public function playerIs1stStrongerThen2nd($player1TotalPoints, $playe...
FILE: classes/General/Helpers/PagingRenderer.php
class PagingRenderer (line 11) | class PagingRenderer {
method __construct (line 34) | public function __construct(DbSqlPaging $pager, $rootUrl = '') {
method setDelta (line 44) | public function setDelta($delta) {
method href (line 50) | protected function href($pageNum, $link, $style = '', $href = true, $a...
method addNumbers (line 60) | protected function addNumbers() {
method addEllipsis (line 75) | protected function addEllipsis() {
method addPrevNext (line 84) | protected function addPrevNext() {
method addFirstLast (line 92) | protected function addFirstLast() {
method render (line 103) | public function render() {
FILE: classes/General/Helpers/URLHelper.php
class URLHelper (line 9) | class URLHelper {
method addParam (line 11) | public static function addParam($url, $param, $value = '') {
FILE: classes/General/LogCounterShrinker.php
class LogCounterShrinker (line 18) | class LogCounterShrinker extends VisitMerger {
method __construct (line 44) | public function __construct(GlobalContainer $gc) {
method buildIterator (line 58) | protected function buildIterator() {
method process (line 73) | public function process($cutTails = true) {
method batchSave (line 114) | protected function batchSave($forceSave = false) {
method flushVisit (line 144) | protected function flushVisit($sign) {
method deleteMergedRecords (line 158) | protected function deleteMergedRecords($array) {
method dbDeleteExecute (line 184) | protected function dbDeleteExecute(&$toDeleteArray) {
FILE: classes/General/VisitAccumulator.php
class VisitAccumulator (line 15) | class VisitAccumulator {
method build (line 35) | public static function build($row) {
method isChanged (line 55) | public function isChanged() {
FILE: classes/General/VisitMerger.php
class VisitMerger (line 19) | abstract class VisitMerger {
method __construct (line 68) | public function __construct(GlobalContainer $gc) {
method setIterator (line 76) | public function setIterator(ICountableIterator $iterator) {
method isSameVisit (line 90) | protected function isSameVisit($sign, $logRecord) {
method process (line 101) | public function process($cutTails = true) {
method processRecord (line 130) | protected function processRecord($logRecord) {
method cutTails (line 147) | protected function cutTails() {
method calcSignature (line 163) | protected function calcSignature($logRecord) {
method newVisit (line 179) | protected function newVisit($sign, $logRecord) {
method extendVisit (line 191) | protected function extendVisit($sign, $logRecord) {
method flushVisit (line 215) | protected function flushVisit($sign) { }
method resetVisit (line 223) | protected function resetVisit($sign, $logRecord) {
method addMoreTime (line 236) | protected function addMoreTime() {
method resetArrays (line 240) | protected function resetArrays() {
FILE: classes/HelperArray.php
class HelperArray (line 3) | class HelperArray {
method stringToArray (line 49) | public static function stringToArray($string, $delimiter = ',') {
method makeArrayRef (line 58) | public static function makeArrayRef(&$value, $index = 0) {
method makeArray (line 72) | public static function makeArray($value, $index = 0) {
method filter (line 86) | public static function filter(&$array, $callback) {
method map (line 110) | public static function map(&$array, $callback, $withKeys = false) {
method filterEmpty (line 131) | public static function filterEmpty($array) {
method stringToArrayFilterEmpty (line 141) | public static function stringToArrayFilterEmpty($string, $delimiter = ...
method merge (line 150) | public static function merge(&$arrayOld, $arrayNew = array(), $mergeSt...
method keyExistsOr (line 184) | public static function keyExistsOr(&$array, $key, $default) {
method cloneDeep (line 194) | public static function cloneDeep(&$array, $deep = self::CLONE_ARRAY_RE...
method array_repack (line 214) | public static function array_repack(&$array, $level = 0) {
method parseParamStrings (line 242) | public static function parseParamStrings($array, $delimiter = '=') {
method maxValueByField (line 264) | public static function maxValueByField(&$array, $fieldName) {
method topRecordsByField (line 278) | public static function topRecordsByField(&$array, $fieldName) {
method intersectByKeys (line 294) | public static function intersectByKeys(array &$array1, array &$array2) {
method array_key_first (line 306) | public static function array_key_first(&$array) {
FILE: classes/HelperString.php
class HelperString (line 6) | class HelperString {
method htmlEncode (line 20) | public static function htmlEncode($string, $params = HTML_ENCODE_PREFO...
method htmlSafe (line 35) | public static function htmlSafe($string) {
method nl2br (line 45) | public static function nl2br($string) {
method jsSafe (line 56) | public static function jsSafe($string) {
method space2nbsp (line 65) | public static function space2nbsp($string) {
method explodeCallable (line 69) | protected function explodeCallable(&$string) {
method implodeCallable (line 73) | protected function implodeCallable(&$array) {
method encode2ndValue (line 77) | protected function encode2ndValue(&$value) {
method encodeSkipHtml (line 83) | protected function encodeSkipHtml($string) {
method camelToUnderscore (line 94) | public static function camelToUnderscore($string) {
method numberFormat (line 104) | public static function numberFormat($number, $decimals) {
method numberFloorAndFormat (line 116) | public static function numberFloorAndFormat($number) {
FILE: classes/Meta/Economic/BuildDataStatic.php
class BuildDataStatic (line 11) | class BuildDataStatic {
method getStructuresTimeDivisor (line 22) | public static function getStructuresTimeDivisor($prevDivisor, $user, $...
method getMercenaryTimeDivisor (line 42) | public static function getMercenaryTimeDivisor($user, $planet, $unit_i...
method getCapitalTimeDivisor (line 65) | public static function getCapitalTimeDivisor($user, $planet, $unit_id) {
method getDestroyStatus (line 95) | public static function getDestroyStatus($user, $planet, $unit_id, $cos...
method getAutoconvertCount (line 117) | public static function getAutoconvertCount($user, $planet, $cost) {
method getBasicData (line 141) | public static function getBasicData(&$user, $planet, $unit_data, $unit...
method eco_get_resource_on_location (line 195) | public static function eco_get_resource_on_location($user, $planet, $r...
method getBuildStatus (line 217) | public static function getBuildStatus(&$user, $planet, $unit_id, $cost...
FILE: classes/Meta/Economic/EconomicHelper.php
class EconomicHelper (line 10) | class EconomicHelper {
method __construct (line 27) | public function __construct(GlobalContainer $gc) {
method resetResourcesExchange (line 42) | public function resetResourcesExchange() {
method getResourcesExchange (line 51) | public function getResourcesExchange() {
method getResourceExchangeIn (line 77) | public function getResourceExchangeIn($resourceId) {
FILE: classes/Meta/Economic/ResourceCalculations.php
class ResourceCalculations (line 10) | class ResourceCalculations {
method initStatic (line 38) | public static function initStatic() {
method __construct (line 67) | public function __construct() {
method eco_get_planet_caps (line 74) | public function eco_get_planet_caps(&$user, &$planet_row, $production_...
method getStorage (line 120) | public function getStorage($resourceId) {
method getProductionFull (line 127) | public function getProductionFull($resourceId) {
method getProduction (line 134) | public function getProduction($resourceId) {
method applyDensityModifiers (line 147) | protected function applyDensityModifiers($planetDensity) {
method applyCapitalRates (line 164) | protected function applyCapitalRates($isCapital) {
method applyProductionSpeed (line 185) | protected function applyProductionSpeed() {
method applyProductionModifiers (line 199) | protected function applyProductionModifiers(&$user, &$planet_row) {
method calculateEnergyBalance (line 207) | protected function calculateEnergyBalance() {
method applyEfficiency (line 226) | protected function applyEfficiency() {
method fillProductionMatrix (line 250) | protected function fillProductionMatrix(&$user, &$planet_row) {
FILE: classes/Modules/ModulesManager.php
class ModulesManager (line 20) | class ModulesManager {
method __construct (line 53) | public function __construct($gc) {
method loadModules (line 63) | public function loadModules($dir_name = SN_ROOT_MODULES) {
method initModules (line 78) | public function initModules() {
method loadModulesFromDirectory (line 104) | protected function loadModulesFromDirectory($dir_name, $load_extension) {
method getLoadOrder (line 130) | protected function getLoadOrder() {
method countModulesInGroup (line 177) | public function countModulesInGroup($groups = '', $active = true) {
method getModulesInGroup (line 189) | public function getModulesInGroup($groups = [], $active = true) {
method getModule (line 222) | public function getModule($moduleName, $active = true) {
method registerModule (line 234) | public function registerModule($moduleName, $module) {
FILE: classes/Modules/sn_module.php
class sn_module (line 12) | class sn_module {
method addFunctionHook (line 122) | public function addFunctionHook($functionName, $callable) {
method __assign_vars (line 134) | protected function __assign_vars() {
method __construct (line 166) | public function __construct($filename = __FILE__) {
method __patch_menu (line 213) | protected function __patch_menu(&$sn_menu_extra, &$menu_patch, $admin ...
method initialize (line 225) | public function initialize() {
method check_status (line 360) | public function check_status() {
method isActive (line 368) | public function isActive() {
method isInstalled (line 377) | public function isInstalled() {
method __mvcRegisterPagesOld (line 388) | protected function __mvcRegisterPagesOld($pages) {
method registerHooks (line 395) | protected function registerHooks() {
method getLoadOrder (line 416) | public function getLoadOrder() {
method getRootRelative (line 420) | public function getRootRelative() {
method getTemplateRootRelative (line 428) | protected function getTemplateRootRelative() {
method addModuleTemplate (line 441) | public function addModuleTemplate($templateName, $template) {
method addModuleJavascript (line 455) | protected function addModuleJavascript($jsName) {
method getVersion (line 471) | public function getVersion() {
method getFullName (line 486) | public function getFullName() {
FILE: classes/Note/Note.php
class Note (line 11) | class Note {
method note_assign (line 19) | public static function note_assign(&$template, $note_row) {
FILE: classes/Notification/RecordNotification.php
class RecordNotification (line 21) | class RecordNotification extends ActiveRecord {
FILE: classes/Old/Avatar.php
class Avatar (line 10) | class Avatar {
method sys_avatar_upload (line 12) | public static function sys_avatar_upload($subject_id, &$avatar_field, ...
FILE: classes/PTLTag.php
class PTLTag (line 6) | class PTLTag {
method __construct (line 46) | public function __construct($stringTag, $template = null, $allowedPara...
method resolveTemplateVars (line 93) | protected function resolveTemplateVars($rawTag) {
method removeParam (line 122) | public function removeParam($paramName) {
method getCacheKey (line 135) | public function getCacheKey() {
FILE: classes/Pages/Deprecated/PageAdminMining.php
class PageAdminMining (line 13) | class PageAdminMining extends PageDeprecated {
method viewStatic (line 20) | public static function viewStatic() {
FILE: classes/Pages/Deprecated/PageAdminModules.php
class PageAdminModules (line 12) | class PageAdminModules extends PageDeprecated {
method sortBy (line 29) | private static function sortBy($a, $b) {
method viewStatic (line 46) | public static function viewStatic($template = null) {
FILE: classes/Pages/Deprecated/PageAdminPayment.php
class PageAdminPayment (line 13) | class PageAdminPayment extends PageDeprecated {
method viewStatic (line 15) | public static function viewStatic() {
method getUsedModules (line 195) | protected static function getUsedModules() {
method getPayers (line 210) | protected static function getPayers() {
method getCurrencies (line 225) | protected static function getCurrencies() {
FILE: classes/Pages/Deprecated/PageAdminUserView.php
class PageAdminUserView (line 14) | class PageAdminUserView extends PageDeprecated {
method modelStatic (line 193) | public static function modelStatic($template = null) {
method viewStatic (line 220) | public static function viewStatic($template = null) {
method userBlockAssign (line 304) | private static function userBlockAssign(&$exclude, $title, $fields) {
method renderExtra (line 322) | private static function renderExtra($field) {
FILE: classes/Pages/Deprecated/PageDeprecated.php
class PageDeprecated (line 18) | class PageDeprecated {
method __construct (line 25) | public function __construct() {
method loadParams (line 29) | protected function loadParams() {
method route (line 36) | public function route() {
method resultAdd (line 47) | protected function resultAdd($message, $status = ERR_NONE) {
method resultCount (line 54) | protected function resultCount() {
method resultTemplatize (line 61) | protected function resultTemplatize(template $template) {
method resultReset (line 65) | protected function resultReset() {
FILE: classes/Pages/Deprecated/PageFleet5Gathering.php
class PageFleet5Gathering (line 14) | class PageFleet5Gathering {
method __construct (line 26) | public function __construct() {
method flt_build_gathering (line 40) | public function flt_build_gathering(&$user, &$planetCurrent, $resource...
method getTransportUnitsCapacity (line 134) | protected function getTransportUnitsCapacity() {
method calcPlanetResources (line 151) | protected function calcPlanetResources(&$user, $resources_taken, $plan...
method calcFleetCapacity (line 168) | protected function calcFleetCapacity(&$user, $planet_db_data) {
method calcShipAmount (line 185) | protected function calcShipAmount($fleetCapacityList, $maxResourcesToT...
method fillFleetResources (line 211) | protected function fillFleetResources(&$user, $resources_taken, $plane...
method modelFleet5Gathering (line 237) | public function modelFleet5Gathering(&$playerRecord, &$planetRecord, $...
method viewPage5Gathering (line 276) | public function viewPage5Gathering(&$user, &$planetrow, $template) {
FILE: classes/Pages/Deprecated/PageImperium.php
class PageImperium (line 17) | class PageImperium {
method viewStatic (line 35) | public static function viewStatic(template $template = null) {
method modelStatic (line 47) | public static function modelStatic(template $template = null) {
method __construct (line 56) | public function __construct() {
method view (line 66) | public function view(template $template = null) {
method modelAdjustMinePercent (line 96) | protected function modelAdjustMinePercent() {
method getUpdatedUserPlanetsAndQues (line 136) | protected function getUpdatedUserPlanetsAndQues($user) {
method imperiumTemplatizeUnitGroup (line 159) | protected function imperiumTemplatizeUnitGroup(&$user, $template, $uni...
method tplRenderUnitLine (line 221) | protected function tplRenderUnitLine($template, $unit_id, $block_vars,...
method tplRenderPlanets (line 259) | protected function tplRenderPlanets($user, &$planets, $fleets) {
method tplRenderFleets (line 325) | protected function tplRenderFleets($planets, $fleets) {
method fleetGetFlyingToPlanets (line 341) | protected function fleetGetFlyingToPlanets(&$planets) {
method tplTotalPlanetInfo (line 354) | function tplTotalPlanetInfo($template, $planets) {
method tplAddGlobals (line 405) | protected function tplAddGlobals(&$user, $template) {
FILE: classes/Pages/Deprecated/PageMercenary.php
class PageMercenary (line 15) | class PageMercenary {
method __construct (line 50) | public function __construct() {
method loadParams (line 63) | protected function loadParams() {
method mrc_mercenary_render (line 76) | public function mrc_mercenary_render($user) {
method mrc_mercenary_hire (line 138) | protected function mrc_mercenary_hire($user, $mercenary_id) {
method mrc_officer_accessible (line 203) | protected function mrc_officer_accessible(&$user, $mercenary_id) {
method fillDiscountTable (line 216) | protected function fillDiscountTable($template) {
method modelMercenaryHire (line 232) | protected function modelMercenaryHire($user) {
method mercenaryDismiss (line 255) | protected function mercenaryDismiss($user, $mercenary_id, $darkmater_c...
method renderMercenaryReq (line 279) | protected function renderMercenaryReq(&$user, $mercenary, $template) {
method renderMercenaryLevelsAvail (line 302) | protected function renderMercenaryLevelsAvail($user_dark_matter, $merc...
FILE: classes/Pages/Deprecated/PageMessage.php
class PageMessage (line 28) | class PageMessage extends PageDeprecated {
method __construct (line 143) | public function __construct() {
method route (line 156) | public function route() {
method modelCompose (line 187) | protected function modelCompose() {
method viewCompose (line 216) | protected function viewCompose() {
method modelDelete (line 253) | protected function modelDelete() {
method viewMessageList (line 297) | protected function viewMessageList() {
method viewCategories (line 409) | protected function viewCategories() {
method getRecipientData (line 453) | protected function getRecipientData() {
method getUserRef (line 471) | protected function getUserRef() {
method transformSubject (line 481) | protected function transformSubject() {
method loadParams (line 499) | protected function loadParams() {
method loadParamsCompose (line 518) | protected function loadParamsCompose() {
method loadParamsDelete (line 528) | protected function loadParamsDelete() {
method wrapSendPm (line 545) | protected function wrapSendPm() {
FILE: classes/Pages/Deprecated/PageOverview.php
class PageOverview (line 18) | class PageOverview extends PageDeprecated {
method __construct (line 42) | public function __construct() {
method setPlanetById (line 55) | public function setPlanetById($planetId) {
method getPlanet (line 60) | public function getPlanet() {
method route (line 68) | public function route() {
method overview (line 90) | public function overview($user, &$planetrow, $que, $user_option_list) {
method manage (line 225) | public function manage($user, &$planetrow) {
method templateSector (line 385) | protected function templateSector($user, $user_dark_matter) {
method templateQue (line 409) | protected function templateQue($template, $que_type, $que) {
method templateGridSizes (line 437) | protected function templateGridSizes($user, $user_option_list, $planet...
FILE: classes/Pages/Helpers/PageHelperAlly.php
class PageHelperAlly (line 16) | class PageHelperAlly {
method pageExternalSearch (line 23) | public static function pageExternalSearch($mode, array $user, classLoc...
method allyFetchFromResult (line 52) | public static function allyFetchFromResult(template $template, $result...
method externalSearchRecommend (line 78) | public static function externalSearchRecommend(array $user, template $...
FILE: classes/Pages/IPage.php
type IPage (line 9) | interface IPage {
method __construct (line 14) | public function __construct();
method loadParams (line 19) | public function loadParams();
method checkAction (line 26) | public function checkAction($action);
FILE: classes/Pages/PageAjax.php
class PageAjax (line 17) | class PageAjax implements IPage {
method __construct (line 35) | public function __construct() {
method loadParams (line 42) | public function loadParams() {
method checkAction (line 48) | public function checkAction($action) {
FILE: classes/Pages/PageAjaxIgnore.php
class PageAjaxIgnore (line 10) | class PageAjaxIgnore extends PageAjax {
method loadParams (line 26) | public function loadParams() {
method ignorePlayer (line 31) | public function ignorePlayer() {
method unIgnorePlayer (line 46) | public function unIgnorePlayer() {
FILE: classes/Pages/PageQuest.php
class PageQuest (line 10) | class PageQuest extends PageAjax {
method loadParams (line 25) | public function loadParams() {
method checkParams (line 30) | protected function checkParams() {
method saveFilter (line 48) | public function saveFilter() {
FILE: classes/Pages/PageTutorial.php
class PageTutorial (line 11) | class PageTutorial extends PageAjax {
method loadParams (line 30) | public function loadParams() {
method ajaxRender (line 34) | protected function ajaxRender($method = 'getById') {
method block2ValueList (line 52) | protected function block2ValueList() {
method isBlockEnabled (line 70) | protected function isBlockEnabled() {
method ajax (line 98) | public function ajax() {
method ajaxNext (line 107) | public function ajaxNext() {
method ajaxPrev (line 116) | public function ajaxPrev() {
method ajaxFinish (line 123) | public function ajaxFinish() {
method renderNavBar (line 133) | public static function renderNavBar($template) {
method setId (line 158) | public function setId($id) {
method setUserOptions (line 169) | public function setUserOptions($userOptions) {
FILE: classes/Payment/PaymentMethods.php
class PaymentMethods (line 11) | class PaymentMethods {
method addPaymentProvider (line 359) | public static function addPaymentProvider($type, $id, array $data) {
method renderPaymentMethodList (line 366) | public static function renderPaymentMethodList() {
method renderModulesForMethod (line 415) | public static function renderModulesForMethod($paymentMethodId, $playe...
method getCurrencyFromMethod (line 446) | public static function getCurrencyFromMethod($moduleName, $paymentMeth...
method getDefaultCurrency (line 471) | public static function getDefaultCurrency($paymentMethodId) {
method getActiveMethods (line 486) | public static function getActiveMethods() {
FILE: classes/Payment/PaymentsMethodsActive.php
class PaymentsMethodsActive (line 13) | class PaymentsMethodsActive {
method __construct (line 34) | public function __construct() {
method registerModuleOnMethod (line 63) | public function registerModuleOnMethod($module, $paymentMethodId) {
method getModulesOnMethod (line 76) | public function getModulesOnMethod($paymentMethodId) {
method getModuleCount (line 90) | public function getModuleCount($paymentMethodId) {
method getFirstModuleNameOnMethod (line 99) | public function getFirstModuleNameOnMethod($paymentMethodId) {
method isModuleInstalled (line 108) | public function isModuleInstalled($moduleName) {
method getInstalledModuleCount (line 115) | public function getInstalledModuleCount() {
method getFirstInstalledModuleName (line 123) | public function getFirstInstalledModuleName() {
method isModuleSupportMethod (line 136) | public function isModuleSupportMethod($moduleName, $paymentMethodId) {
method processInputParams (line 148) | public function processInputParams($moduleName, $paymentMethodId) {
FILE: classes/Planet/DBStaticPlanet.php
class DBStaticPlanet (line 6) | class DBStaticPlanet {
method db_planet_by_id (line 13) | public static function db_planet_by_id($planet_id, $for_update = false) {
method db_planet_by_gspt_safe (line 27) | public static function db_planet_by_gspt_safe($galaxy, $system, $plane...
method db_planet_by_gspt (line 32) | public static function db_planet_by_gspt($galaxy, $system, $planet, $p...
method db_planet_by_vector (line 36) | public static function db_planet_by_vector($vector, $prefix = '') {
method db_planet_by_parent (line 61) | public static function db_planet_by_parent($parent_id, $for_update = f...
method db_planet_by_id_and_owner (line 70) | public static function db_planet_by_id_and_owner($planet_id, $owner_id...
method db_planet_list_moon_other (line 80) | public static function db_planet_list_moon_other($user_id, $this_moon_...
method db_planet_list_in_system (line 89) | public static function db_planet_list_in_system($galaxy, $system) {
method db_planet_list_sorted (line 97) | public static function db_planet_list_sorted($user_row, $skip_planet_i...
method db_planet_list_by_user_or_planet (line 120) | public static function db_planet_list_by_user_or_planet($user_id, $pla...
method db_planet_set_by_id (line 129) | public static function db_planet_set_by_id($planet_id, $set) {
method db_planet_set_by_gspt (line 137) | public static function db_planet_set_by_gspt($ui_galaxy, $ui_system, $...
method db_planet_set_by_parent (line 150) | public static function db_planet_set_by_parent($ui_parent_id, $ss_set) {
method db_planet_set_by_owner (line 158) | public static function db_planet_set_by_owner($ui_owner_id, $ss_set) {
method db_planet_delete_by_id (line 167) | public static function db_planet_delete_by_id($planet_id) {
method db_planet_list_delete_by_owner (line 178) | public static function db_planet_list_delete_by_owner($ui_owner_id) {
method db_planet_count_by_type (line 190) | public static function db_planet_count_by_type($ui_user_id, $ui_planet...
method db_planet_list_resources_by_owner (line 200) | public static function db_planet_list_resources_by_owner() {
method dbDeletePlanetsWithoutUsers (line 205) | public static function dbDeletePlanetsWithoutUsers() {
FILE: classes/Planet/Planet.php
class Planet (line 74) | class Planet extends EntityDb {
method __construct (line 103) | public function __construct() {
method getGovernor (line 107) | public function getGovernor() {
method governorHire (line 116) | public function governorHire($hireId) {
method sn_sys_sector_buy (line 126) | public function sn_sys_sector_buy($redirect = 'overview.php') {
method sn_sys_planet_core_transmute (line 169) | public function sn_sys_planet_core_transmute(&$user) {
method planet_density_price_chart (line 248) | public function planet_density_price_chart() {
method tpl_planet_density_info (line 272) | public function tpl_planet_density_info($user_dark_matter) {
method int_planet_pretemplate (line 306) | public function int_planet_pretemplate($user) {
method reset (line 330) | public function reset() {
method _getContainer (line 345) | public function _getContainer() {
method changeResource (line 356) | public function changeResource($resourceId, $resourceCount) {
method dbLoadRecord (line 381) | public function dbLoadRecord($id) {
FILE: classes/Planet/RecordPlanet.php
class RecordPlanet (line 66) | class RecordPlanet extends ActiveRecord {
FILE: classes/Player/PlayerLevelHelper.php
class PlayerLevelHelper (line 14) | class PlayerLevelHelper {
method __construct (line 40) | public function __construct(GlobalContainer $gc) {
method getPlayerLevels (line 51) | public function getPlayerLevels() {
method getPointLevel (line 68) | public function getPointLevel($totalPoints, $authLevel = false) {
method renderRank (line 102) | public function renderRank($playerRank, $noTitle = false) {
method renderRankFromPoints (line 118) | public function renderRankFromPoints($playerPoints, $authLevel = AUTH_...
method isLevelExpired (line 127) | protected function isLevelExpired() {
method loadLevels (line 134) | protected function loadLevels() {
method storeLevels (line 152) | protected function storeLevels() {
method calcLevels (line 160) | protected function calcLevels() {
FILE: classes/Player/PlayerStatic.php
class PlayerStatic (line 24) | class PlayerStatic {
method getPlayerProduction (line 26) | public static function getPlayerProduction($userId) {
method DeleteSelectedUser (line 52) | public static function DeleteSelectedUser($UserID) {
method dbUpdateBotStatus (line 108) | public static function dbUpdateBotStatus($botType, $onlineTime = SN_TI...
method dbSelectOne (line 118) | public static function dbSelectOne($query) {
FILE: classes/Player/RecordPlayer.php
class RecordPlayer (line 97) | class RecordPlayer extends ActiveRecord {
FILE: classes/Player/playerTimeDiff.php
class playerTimeDiff (line 9) | class playerTimeDiff {
method user_time_diff_probe (line 39) | static protected function user_time_diff_probe() {
method user_time_diff_set (line 55) | static protected function user_time_diff_set($user_time_diff) {
method user_time_diff_get (line 65) | static protected function user_time_diff_get() {
method sn_options_timediff (line 73) | static public function sn_options_timediff($timeDiff, $force, $clear) {
method timeProbeAjax (line 95) | static public function timeProbeAjax() {
method defineTimeDiff (line 111) | static public function defineTimeDiff() {
method timeDiffTemplate (line 126) | static public function timeDiffTemplate() {
method getTimeDiffForced (line 141) | static public function getTimeDiffForced() {
method sortDiffArray (line 153) | protected static function sortDiffArray(array $user_time_diff) {
FILE: classes/Player/userOptions.php
class userOptions (line 20) | class userOptions extends oldArrayAccessNd {
method __get (line 114) | public function __get($offset) {
method __set (line 119) | public function __set($offset, $value = null) {
method __isset (line 127) | public function __isset($offset) {
method __unset (line 132) | public function __unset($offset) {
method __flush (line 138) | public function __flush() {
method __construct (line 177) | public function __construct($user_id) {
method user_change (line 181) | public function user_change($user_id, $forceLoad = false) {
method cached_name (line 187) | protected function cached_name() {
method load (line 191) | protected function load($forceLoad = false) {
FILE: classes/PlayerToAccountTranslate.php
class PlayerToAccountTranslate (line 14) | class PlayerToAccountTranslate {
method init (line 23) | protected static function init() {
method db_translate_register_user (line 40) | public static function db_translate_register_user($provider_id_unsafe,...
method db_translate_get_users_from_account_list (line 63) | public static function db_translate_get_users_from_account_list($provi...
method db_translate_get_account_by_user_id (line 92) | public static function db_translate_get_account_by_user_id($user_id_un...
method db_translate_unregister_user (line 112) | public static function db_translate_unregister_user($user_id_unsafe) {
FILE: classes/Pm/DecodeEspionage.php
class DecodeEspionage (line 12) | class DecodeEspionage {
method decode (line 18) | public static function decode($missionReport) {
FILE: classes/Pm/PlayerIgnore.php
class PlayerIgnore (line 14) | class PlayerIgnore {
method __construct (line 22) | public function __construct(GlobalContainer $gc) {
method ignore (line 25) | public function ignore($playerId, $ignoredId, $subsystem = self::IGNOR...
method unIgnore (line 33) | public function unIgnore($playerId, $ignoredId, $subsystem = self::IGN...
method isIgnored (line 41) | public function isIgnored($playerId, $ignoredId, $subsystem = self::IG...
method getIgnores (line 51) | public function getIgnores($playerId, $htmlEncode = true) {
FILE: classes/Pm/RecordPlayerIgnore.php
class RecordPlayerIgnore (line 22) | class RecordPlayerIgnore extends RecordV2 {
FILE: classes/Ptl/PtlVariableDecorator.php
class PtlVariableDecorator (line 11) | class PtlVariableDecorator {
method decorate (line 53) | public static function decorate($strTagFull, $phpCompiledVar, $templat...
method func (line 71) | protected static function func($funcName, $value, $params = []) {
method func2 (line 75) | protected static function func2($funcName, $params = []) {
method num (line 83) | protected static function num($phpCompiledVar, $ptlTag) {
method datetime (line 126) | protected static function datetime($phpCompiledVar, $ptlTag) {
FILE: classes/Que/DBStaticQue.php
class DBStaticQue (line 6) | class DBStaticQue {
method db_que_list_by_type_location (line 8) | public static function db_que_list_by_type_location($user_id, $planet_...
method db_que_list_stat (line 12) | public static function db_que_list_stat() {
method db_que_set_time_left_by_id (line 16) | public static function db_que_set_time_left_by_id($que_id, $que_time_l...
method db_que_set_insert (line 20) | public static function db_que_set_insert($set) {
method db_que_delete_by_id (line 24) | public static function db_que_delete_by_id($que_id) {
method db_que_planet_change_owner (line 28) | public static function db_que_planet_change_owner($planet_id, $new_own...
method db_que_research_change_origin (line 32) | public static function db_que_research_change_origin($planet_id, $new_...
FILE: classes/Que/QueUnitStatic.php
class QueUnitStatic (line 12) | class QueUnitStatic {
method que_unit_make_sql (line 26) | public static function que_unit_make_sql($prevSqlBlock = [], $unit_id,...
FILE: classes/RequestInfo.php
class RequestInfo (line 14) | class RequestInfo {
method __construct (line 95) | public function __construct() {
method db_security_entry_insert (line 164) | public function db_security_entry_insert($userId) {
method db_counter_insert (line 194) | public function db_counter_insert($user_id_unsafe) {
FILE: classes/ResultMessages.php
class ResultMessages (line 6) | class ResultMessages implements Countable {
method __construct (line 13) | public function __construct() {
method add (line 20) | public function add($message, $status = ERR_NONE) {
method count (line 27) | public function count() {
method templateAdd (line 34) | public function templateAdd(template $template) {
method reset (line 40) | public function reset() {
FILE: classes/SN.php
class SN (line 18) | class SN {
method __construct (line 194) | public function __construct() {
method log_file (line 199) | public static function log_file($message, $spaces = 0) {
method db_get_record_by_id (line 218) | public static function db_get_record_by_id($location_type, $record_id_...
method db_get_record_list (line 225) | public static function db_get_record_list($location_type, $filter = ''...
method db_upd_record_by_id (line 254) | public static function db_upd_record_by_id($location_type, $record_id,...
method db_upd_record_list (line 273) | public static function db_upd_record_list($location_type, $condition, ...
method db_ins_record (line 292) | public static function db_ins_record($location_type, $set) {
method db_del_record_by_id (line 309) | public static function db_del_record_by_id($location_type, $safe_recor...
method db_del_record_list (line 327) | public static function db_del_record_list($location_type, $condition) {
method db_que_list_by_type_location (line 366) | public static function db_que_list_by_type_location($user_id, $planet_...
method loadFileSettings (line 395) | public static function loadFileSettings() {
method init_global_objects (line 410) | public static function init_global_objects() {
method gameDisable (line 445) | public static function gameDisable($newStatus = GAME_DISABLE_REASON, $...
method gameIsDisabled (line 463) | public static function gameIsDisabled() {
method services (line 471) | public static function services() {
FILE: classes/SkinInterface.php
type SkinInterface (line 6) | interface SkinInterface {
method getName (line 13) | public function getName();
method imageFromPTLTag (line 22) | public function imageFromPTLTag($ptlTag);
method imageFromStringTag (line 32) | public function imageFromStringTag($stringTag, $template = null);
FILE: classes/SkinModel.php
class SkinModel (line 8) | class SkinModel {
method init (line 30) | public function init() {
method __construct (line 39) | public function __construct(GlobalContainer $gc) {
method getSkin (line 54) | public function getSkin($skinName) {
method getImageCurrent (line 71) | public function getImageCurrent($image_tag, $template = null) {
method isImageFileExists (line 81) | public function isImageFileExists($image_tag, $template = null) {
method getImageFrom (line 95) | public function getImageFrom($skinName, $image_tag, $template) {
method switchActive (line 104) | public function switchActive($skinName) {
method loadSkin (line 115) | protected function loadSkin($skinName) {
method sanitizeSkinName (line 131) | protected function sanitizeSkinName($skinName) {
FILE: classes/SkinV2.php
class SkinV2 (line 49) | class SkinV2 implements SkinInterface {
method image_url (line 170) | public static function image_url($image_tag, $template) {
method __construct (line 180) | public function __construct($skinName = DEFAULT_SKINPATH, $skinModel) {
method getName (line 219) | public function getName() {
method imageFromStringTag (line 226) | public function imageFromStringTag($stringTag, $template = null) {
method imageFromPTLTag (line 237) | public function imageFromPTLTag($ptlTag) {
method compile_try_path (line 278) | protected function compile_try_path($image_id, $file_path) {
method apply_params (line 293) | protected function apply_params(PTLTag $ptlTag) {
method loadIniFile (line 337) | protected function loadIniFile() {
method setParentFromConfig (line 353) | protected function setParentFromConfig() {
method tryWebp (line 373) | private function tryWebp($imageId) {
FILE: classes/SnTemplate.php
class SnTemplate (line 15) | class SnTemplate {
method displayP (line 30) | public static function displayP($template) {
method parsetemplate (line 50) | public static function parsetemplate($template, $array = false) {
method templateObjectParse (line 73) | public static function templateObjectParse($template, $array = false) {
method tpl_menu_merge_extra (line 98) | public static function tpl_menu_merge_extra(&$menu, &$extra) {
method tpl_menu_adminize (line 149) | public static function tpl_menu_adminize($menu) {
method tpl_menu_assign_to_template (line 165) | public static function tpl_menu_assign_to_template(&$sn_menu, &$templa...
method tpl_render_menu (line 214) | public static function tpl_render_menu($template) {
method renderFooter (line 256) | public static function renderFooter($page, $template_result) {
method renderHeader (line 280) | public static function renderHeader($page, $title, &$template_result, ...
method renderJavaScript (line 389) | public static function renderJavaScript() {
method renderCss (line 418) | public static function renderCss($is_login) {
method tpl_topnav_event_build_helper (line 480) | public static function tpl_topnav_event_build_helper($time, $event, $m...
method tpl_topnav_event_build (line 499) | public static function tpl_topnav_event_build(&$template, $fleet_flyin...
method playerFontSize (line 543) | public static function playerFontSize() {
method addFileName (line 571) | public static function addFileName($fileNames, $anArray, $ext = '.css') {
method renderFileListInclude (line 593) | public static function renderFileListInclude(&$template_result, &$sn_m...
method tpl_navbar_render_notes (line 614) | public static function tpl_navbar_render_notes(&$template, &$user) {
method tpl_navbar_render_news (line 626) | public static function tpl_navbar_render_news(&$template, &$user, $con...
method render_button_block (line 644) | public static function render_button_block(&$sn_mvc, $blockName) {
method tpl_navbar_extra_buttons (line 670) | public static function tpl_navbar_extra_buttons(&$sn_mvc, $template) {
method templateRenderToHtml (line 680) | public static function templateRenderToHtml($template) {
method tpl_login_lang (line 694) | public static function tpl_login_lang(&$template) {
method tpl_assign_select (line 731) | public static function tpl_assign_select(&$template, $blockName, $valu...
method tpl_render_unit_bonus_data (line 749) | public static function tpl_render_unit_bonus_data($unitInfo) {
method tplAddPlus (line 775) | public static function tplAddPlus($value) {
method tplPrettyPlus (line 786) | public static function tplPrettyPlus($value) {
method tplAddResult (line 799) | public static function tplAddResult($message, $status = ERR_NONE, $tem...
method messageBox (line 821) | public static function messageBox($message, $title = '', $redirectTo =...
method messageBoxAdmin (line 854) | public static function messageBoxAdmin($message, $title = '', $redirec...
method messageBoxAdminAccessDenied (line 858) | public static function messageBoxAdminAccessDenied($level = AUTH_LEVEL...
method sn_tpl_render_topnav (line 874) | public static function sn_tpl_render_topnav(&$prevUser, $user, $planet...
method gettemplate (line 1047) | public static function gettemplate($files, $template = null, $template...
method display (line 1086) | public static function display($page, $title = '') {
method __construct (line 1253) | public function __construct($gc = null) {
method registerTemplate (line 1257) | public function registerTemplate($templateName) {
method getServerDefaultTemplateName (line 1271) | public static function getServerDefaultTemplateName() {
method getPlayerTemplateName (line 1280) | public static function getPlayerTemplateName() {
method pathRelativeToCurrentTemplate (line 1291) | public static function pathRelativeToCurrentTemplate() {
method getCurrentTemplate (line 1298) | public static function getCurrentTemplate() {
method cacheFiles (line 1311) | protected static function cacheFiles($fileList, $extension = '.css') {
FILE: classes/StatCalculator.php
class StatCalculator (line 17) | class StatCalculator {
method sta_set_time_limit (line 28) | public static function sta_set_time_limit($sta_update_msg = 'updating ...
method sys_stat_calculate_flush (line 53) | public static function sys_stat_calculate_flush(&$data, $force = false) {
method sys_stat_calculate (line 70) | public static function sys_stat_calculate() {
FILE: classes/StatUpdateLauncher.php
class StatUpdateLauncher (line 15) | class StatUpdateLauncher {
method unlock (line 17) | public static function unlock() {
method scheduler_process (line 32) | public static function scheduler_process() {
FILE: classes/Storage.php
class Storage (line 13) | class Storage {
method __construct (line 20) | public function __construct(GlobalContainer $gc) {
method loadById (line 29) | public function loadById($recordDescription, $id) {
FILE: classes/Template/TemplateMeta.php
class TemplateMeta (line 16) | class TemplateMeta {
method __construct (line 60) | public function __construct($manager, $templateName, $templatePath = '...
method loadIniFile (line 87) | protected function loadIniFile() {
method setParentFromConfig (line 103) | protected function setParentFromConfig() {
method getTemplate (line 127) | public function getTemplate($template, $template_path, $fallBackPath =...
method getName (line 155) | public function getName() {
method getPathFull (line 159) | public function getPathFull() {
method cssAddFileName (line 163) | public function cssAddFileName($cssFileName, array $standard_css) {
method isTemplateExists (line 182) | public function isTemplateExists() {
method isRenderWhole (line 191) | public function isRenderWhole() {
FILE: classes/TextEntity.php
class TextEntity (line 22) | class TextEntity extends \Common\ContainerPlus {
method __construct (line 33) | public function __construct(array $values = array()) {
method toArray (line 43) | public function toArray() {
method toArrayHtml (line 59) | public function toArrayHtml($encodeOptions = HTML_ENCODE_MULTILINE) {
method toArrayParsedBBC (line 77) | public function toArrayParsedBBC($encodeOptions = HTML_ENCODE_MULTILIN...
FILE: classes/TextModel.php
class TextModel (line 9) | class TextModel {
method __construct (line 33) | public function __construct(GlobalContainer $gc) {
method getById (line 47) | public function getById($textId) {
method loadById (line 62) | public function loadById($textId) {
method parseArray (line 81) | public function parseArray($entity, $array) {
method next (line 96) | public function next($textId) {
method prev (line 117) | public function prev($textId) {
FILE: classes/TextRecordDescription.php
class TextRecordDescription (line 14) | class TextRecordDescription {
method __construct (line 27) | public function __construct($db = null) {
FILE: classes/TheUser.php
class TheUser (line 13) | class TheUser {
method __construct (line 25) | public function __construct($gc) {
method getSkinName (line 32) | public function getSkinName() {
method getSkinPath (line 43) | public function getSkinPath() {
method setSkinName (line 52) | public function setSkinName($skinName) {
method getTemplateName (line 63) | public function getTemplateName() {
method isWebpSupported (line 72) | public function isWebpSupported() {
method setWebpSupport (line 76) | public function setWebpSupport($isSupported) {
FILE: classes/Timer.php
class Timer (line 6) | class Timer {
method init (line 16) | public static function init() {
method mark (line 25) | public static function mark($message = '') {
method elapsed (line 51) | public static function elapsed($message = '', $fromStart = false) {
method msg (line 61) | public static function msg($message, $fromStart = false) {
method last (line 73) | public static function last() {
method first (line 80) | public static function first() {
method getLog (line 84) | public static function getLog() {
FILE: classes/Tools.php
class Tools (line 12) | class Tools {
method fillPercentStyle (line 30) | public static function fillPercentStyle($maximum, $value) {
method numberPercentSpan (line 71) | public static function numberPercentSpan($value, $sample) {
FILE: classes/Ube/Ube4_1/Ube4_1Calc.php
class Ube4_1Calc (line 10) | class Ube4_1Calc {
method __construct (line 27) | public function __construct() {
method sn_ube_combat (line 30) | public function sn_ube_combat(&$combat_data) {
method sn_ube_combat_round_prepare (line 56) | protected function sn_ube_combat_round_prepare(&$combat_data, $round) {
method sn_ube_combat_analyze (line 106) | protected function sn_ube_combat_analyze(&$combat_data) {
method sn_ube_combat_analyze_moon (line 256) | protected function sn_ube_combat_analyze_moon(&$outcome, $is_simulator) {
method sn_ube_combat_analyze_moon_destroy (line 297) | protected function sn_ube_combat_analyze_moon_destroy(&$combat_data) {
method sn_ube_combat_analyze_loot (line 323) | protected function sn_ube_combat_analyze_loot(&$combat_data) {
method sn_ube_combat_round_analyze (line 365) | protected function sn_ube_combat_round_analyze(&$combat_data, $round) {
method sn_ube_combat_round_crossfire_fleet (line 404) | protected function sn_ube_combat_round_crossfire_fleet(&$combat_data, ...
method sn_ube_combat_round_crossfire_unit2 (line 434) | protected function sn_ube_combat_round_crossfire_unit2(&$attack_fleet_...
method sn_ube_combat_round_crossfire_unit_damage_current (line 478) | protected function sn_ube_combat_round_crossfire_unit_damage_current(&...
method defenceGiveBack (line 534) | protected function defenceGiveBack($unit_count, $units_left, $isSimula...
FILE: classes/Ube/Ube4_1/Ube4_1Prepare.php
class Ube4_1Prepare (line 11) | class Ube4_1Prepare {
method prepareFromMissionArray (line 30) | public function prepareFromMissionArray($fleetEvent, $fleet_list_on_ho...
method ube_attack_prepare_player (line 72) | protected function ube_attack_prepare_player(&$combat_data, $player_id...
method ube_attack_prepare_fleet (line 106) | public function ube_attack_prepare_fleet(&$combat_data, &$fleet, $is_a...
method ube_attack_prepare_planet (line 153) | protected function ube_attack_prepare_planet(&$combat_data, &$planet) {
method sn_ube_simulator_fleet_converter (line 194) | public function sn_ube_simulator_fleet_converter($sym_attacker, $sym_d...
method sn_ube_simulator_fill_side (line 219) | protected function sn_ube_simulator_fill_side(&$combat_data, $side_inf...
method sn_ube_combat_prepare_first_round (line 258) | protected function sn_ube_combat_prepare_first_round(&$combat_data) {
FILE: classes/Unit/DBStaticUnit.php
class DBStaticUnit (line 12) | class DBStaticUnit {
method db_unit_time_restrictions (line 14) | public static function db_unit_time_restrictions($date = SN_TIME_NOW) {
method db_unit_by_id (line 29) | public static function db_unit_by_id($unit_id) {
method db_unit_by_location (line 41) | public static function db_unit_by_location($user_id, $location_type, $...
method db_get_unit_list_by_location (line 60) | public static function db_get_unit_list_by_location($location_type, $l...
method cache_clear (line 85) | public static function cache_clear() {
method db_unit_count_by_user_and_type_and_snid (line 89) | public static function db_unit_count_by_user_and_type_and_snid($user_i...
method db_unit_in_fleet_by_user (line 105) | public static function db_unit_in_fleet_by_user($user_id, $location_id...
method db_unit_list_laboratories (line 120) | public static function db_unit_list_laboratories($user_id) {
method db_unit_set_by_id (line 126) | public static function db_unit_set_by_id($unit_record_id, $set) {
method db_unit_set_insert (line 135) | public static function db_unit_set_insert($set) {
method db_unit_list_delete (line 139) | public static function db_unit_list_delete($user_id, $unit_location_ty...
method db_unit_list_stat_calculate (line 147) | public static function db_unit_list_stat_calculate() {
method db_unit_change_owner (line 157) | public static function db_unit_change_owner($location_type, $location_...
method db_unit_list_admin_delete_mercenaries_finished (line 162) | public static function db_unit_list_admin_delete_mercenaries_finished() {
method db_unit_list_admin_set_mercenaries_expire_time (line 167) | public static function db_unit_list_admin_set_mercenaries_expire_time(...
method dbChangeUnit (line 190) | public static function dbChangeUnit($playerId, $planetId, $unitSnId, $...
method dbAdd (line 238) | protected static function dbAdd($playerId, $planetId, $unitSnId, $amou...
method dbUserAdd (line 291) | public static function dbUserAdd($playerId, $unitSnId, $amount) {
FILE: classes/Unit/Governor.php
class Governor (line 13) | class Governor extends Unit {
method __construct (line 34) | public function __construct() {
method setPlanet (line 41) | public function setPlanet($planet) {
method hire (line 51) | public function hire($hireId) {
method getSnId (line 94) | public function getSnId() {
method getLevel (line 101) | public function getLevel() {
method getMaxLevel (line 108) | public function getMaxLevel() {
method addLevel (line 116) | protected function addLevel($hireId) {
method reset (line 129) | protected function reset() {
method setExternalData (line 140) | protected function setExternalData() {
method getExternalData (line 148) | protected function getExternalData() {
FILE: classes/Unit/RecordUnit.php
class RecordUnit (line 24) | class RecordUnit extends ActiveRecord {
FILE: classes/Unit/Unit.php
class Unit (line 9) | class Unit {
FILE: classes/Universe.php
class Universe (line 6) | class Universe {
method distance (line 14) | public static function distance($from, $to) {
method getBaseGalaxyDistance (line 28) | public static function getBaseGalaxyDistance() {
method flt_server_flight_speed_multiplier (line 39) | public static function flt_server_flight_speed_multiplier($plain = fal...
FILE: classes/Universe/Universe.php
class Universe (line 10) | class Universe {
method moonCalcChanceFromDebris (line 26) | public static function moonCalcChanceFromDebris($debrisTotal) {
method moonRollSizeSecondary (line 42) | protected static function moonRollSizeSecondary($rolledChance) {
method moonRollSize (line 56) | public static function moonRollSize($debrisTotal) {
method moonPercentCostInDebris (line 73) | public static function moonPercentCostInDebris() {
method moonMaxDebris (line 82) | public static function moonMaxDebris() {
method moonSizeRandom (line 91) | public static function moonSizeRandom() {
method fleetsReturn (line 104) | public static function fleetsReturn($galaxy = null, $system = null, $p...
FILE: classes/Validators.php
class Validators (line 7) | class Validators {
method isNotEmptyByRef (line 14) | public static function isNotEmptyByRef(&$value) {
method isNotEmpty (line 23) | public static function isNotEmpty($value) {
FILE: classes/auth_abstract.php
class auth_abstract (line 11) | class auth_abstract extends sn_module {
method __construct (line 40) | public function __construct($filename = __FILE__) {
method login (line 51) | public function login() {
method logout (line 58) | public function logout() {
method password_change (line 70) | public function password_change($old_password_unsafe, $new_password_un...
method impersonate (line 80) | public function impersonate($account_to_impersonate) {
method password_check (line 90) | public function password_check($password_unsafe) {
method is_feature_supported (line 104) | public function is_feature_supported($feature) {
method player_name_suggest (line 113) | public function player_name_suggest() {
FILE: classes/auth_local.php
class auth_local (line 9) | class auth_local extends auth_abstract {
method __construct (line 88) | public function __construct($filename = __FILE__) {
method login (line 140) | public function login() {
method logout (line 154) | public function logout() {
method password_change (line 168) | public function password_change($old_password_unsafe, $new_password_un...
method impersonate (line 177) | public function impersonate($account_to_impersonate) {
method login_with_account (line 184) | public function login_with_account($account) {
method password_reset_send_code (line 197) | protected function password_reset_send_code() {
method password_reset_confirm (line 266) | protected function password_reset_confirm() {
method prepare (line 362) | protected function prepare() {
method register (line 385) | protected function register() {
method login_cookie (line 436) | protected function login_cookie() {
method login_username (line 455) | protected function login_username() {
method cookie_set (line 498) | protected function cookie_set($account_to_impersonate = null) {
method cookie_clear (line 517) | protected function cookie_clear() {
method login_validate_input (line 529) | protected function login_validate_input() {
method register_validate_input (line 545) | protected function register_validate_input() {
method password_encode (line 586) | protected function password_encode($password, $salt) {
method password_salt_generate (line 590) | protected function password_salt_generate() {
method make_random_password (line 599) | protected function make_random_password() {
method flog (line 603) | protected function flog($message, $die = false) {
FILE: classes/classCache.php
class classCache (line 27) | class classCache implements ArrayAccess {
method __construct (line 59) | public function __construct($prefIn = 'CACHE_', $init_mode = false) {
method getInstance (line 79) | public static function getInstance($prefIn = 'CACHE_', $table_name = '...
method __clone (line 88) | public final function __clone() {
method getMode (line 96) | public function getMode() {
method getPrefix (line 103) | public function getPrefix() {
method setPrefix (line 110) | public function setPrefix($prefix) {
method __set (line 117) | public function __set($name, $value) {
method __get (line 129) | public function __get($name) {
method __isset (line 143) | public function __isset($name) {
method __unset (line 157) | public function __unset($name) {
method unset_by_prefix (line 169) | public function unset_by_prefix($prefix_unset = '') {
method make_element_name (line 202) | protected function make_element_name($args, $diff = 0) {
method array_set (line 219) | public function array_set() {
method array_get (line 242) | public function array_get() {
method array_count (line 251) | public function array_count() {
method array_unset (line 265) | public function array_unset() {
method dumpData (line 289) | public function dumpData() {
method reset (line 301) | public function reset() {
method init (line 307) | public function init($reInit = false) {
method isInitialized (line 311) | public function isInitialized() {
method offsetExists (line 329) | public function offsetExists($offset) {
method offsetGet (line 344) | public function offsetGet($offset) {
method offsetSet (line 362) | public function offsetSet($offset, $value) {
method offsetUnset (line 377) | public function offsetUnset($offset) {
FILE: classes/classConfig.php
class classConfig (line 232) | class classConfig extends classPersistent {
method __construct (line 540) | public function __construct($gamePrefix = 'sn_') {
method getInstance (line 544) | public static function getInstance($gamePrefix = 'sn_', $table_name = ...
method dateConvert (line 560) | public function dateConvert($date, $as) {
method dateWrite (line 581) | public function dateWrite($name, $date, $as = self::DATE_TYPE_SQL_STRI...
method dateRead (line 596) | public function dateRead($name, $as) {
method getCypher (line 600) | public function getCypher() {
FILE: classes/classLocale.php
class classLocale (line 3) | class classLocale implements ArrayAccess {
method __construct (line 26) | public function __construct($enable_stat_usage = false) {
method locale_string_fallback (line 55) | protected function locale_string_fallback($offset) {
method offsetSet (line 83) | public function offsetSet($offset, $value) {
method offsetExists (line 94) | public function offsetExists($offset) {
method offsetUnset (line 108) | public function offsetUnset($offset) {
method offsetGet (line 112) | public function offsetGet($offset) {
method merge (line 122) | public function merge($array) {
method usage_stat_load (line 129) | public function usage_stat_load() {
method usage_stat_save (line 141) | public function usage_stat_save() {
method usage_stat_log (line 156) | public function usage_stat_log(&$offset, &$value) {
method lng_try_filepath (line 178) | protected function lng_try_filepath($path, $file_path_relative) {
method make_fallback (line 184) | protected function make_fallback($language = '') {
method lng_include (line 197) | public function lng_include($filename, $path = '', $ext = '.mo.php') {
method lng_load_i18n (line 273) | public function lng_load_i18n($i18n) {
method lng_switch (line 289) | public function lng_switch($language_new) {
method lng_get_info (line 341) | public function lng_get_info($entry) {
method lng_get_list (line 351) | public function lng_get_list() {
FILE: classes/classPersistent.php
class classPersistent (line 17) | class classPersistent extends classCache {
method __construct (line 36) | public function __construct($gamePrefix = 'sn_', $table_name = 'table') {
method getInstance (line 48) | public static function getInstance($gamePrefix = 'sn_', $table_name = ...
method db_loadItem (line 61) | public function db_loadItem($index) {
method db_loadAll (line 74) | public function db_loadAll() {
method loadDefaults (line 85) | public function loadDefaults() {
method db_saveAll (line 91) | public function db_saveAll() {
method db_saveItem (line 95) | public function db_saveItem($item_list, $value = NULL) {
method pass (line 136) | public function pass() {
method __get (line 142) | public function __get($name) {
method __set (line 157) | public function __set($name, $value) {
method __unset (line 166) | public function __unset($name) {
FILE: classes/core_auth.php
class core_auth (line 18) | class core_auth extends sn_module {
method __construct (line 157) | public function __construct($filename = __FILE__) {
method player_register_model (line 173) | public function player_register_model() {
method player_register_view (line 228) | public function player_register_view($template = null) {
method login (line 267) | public function login() {
method logout (line 387) | public function logout($redirect = true) {
method impersonate (line 412) | public function impersonate($user_selected) {
method password_check (line 452) | public function password_check($password_unsafe) {
method password_change (line 479) | public function password_change($old_password_unsafe, $new_password_un...
method auth_reset (line 531) | protected function auth_reset() {
method register_player_db_create (line 548) | protected function register_player_db_create($player_name_unsafe) {
method get_accessible_user_list (line 613) | protected function get_accessible_user_list() {
method get_active_user (line 639) | protected function get_active_user() {
method make_return_array (line 678) | protected function make_return_array() {
method register_player_name_validate (line 759) | protected function register_player_name_validate($player_name_unsafe) {
method make_random_password (line 800) | public static function make_random_password() {
method password_encode (line 812) | public static function password_encode($password, $salt) {
method password_salt_generate (line 821) | public static function password_salt_generate() {
method cookie_set (line 829) | protected static function cookie_set($value, $impersonate = false, $pe...
method flog (line 833) | protected static function flog($message, $die = false) {
FILE: classes/debug.php
class debug (line 34) | class debug {
method log_file (line 39) | public function log_file($message, $ident_change = 0) {
method log_sql (line 60) | public function log_sql($message, $ident_change = 0) {
method __construct (line 82) | public function __construct() {
method add (line 87) | function add($mes) {
method add_to_array (line 92) | function add_to_array($mes) {
method echo_log (line 96) | function echo_log() {
method compact_backtrace (line 101) | public function compact_backtrace($backtrace, $long_comment = false, $...
method comment_query (line 168) | public function comment_query($backtrace, $sql) {
method dump (line 205) | function dump($dump = false, $force_base = false, $deadlock = false) {
method error_fatal (line 291) | function error_fatal($die_message, $details = 'There is a fatal error ...
method error (line 296) | public function error($message = 'There is a error on page', $title = ...
method warning (line 341) | function warning($message, $title = 'System Message', $httpCode = 300,...
method _writeLogMessage (line 372) | function _writeLogMessage($httpCode, $user, $title, $message, array $e...
function dump (line 389) | function dump($value, $varname = null, $level = 0, $dumper = '') {
function debug (line 440) | function debug($value, $varname = null) {
method log_file (line 39) | public function log_file($message, $ident_change = 0) {
method log_sql (line 60) | public function log_sql($message, $ident_change = 0) {
method __construct (line 82) | public function __construct() {
method add (line 87) | function add($mes) {
method add_to_array (line 92) | function add_to_array($mes) {
method echo_log (line 96) | function echo_log() {
method compact_backtrace (line 101) | public function compact_backtrace($backtrace, $long_comment = false, $...
method comment_query (line 168) | public function comment_query($backtrace, $sql) {
method dump (line 205) | function dump($dump = false, $force_base = false, $deadlock = false) {
method error_fatal (line 291) | function error_fatal($die_message, $details = 'There is a fatal error ...
method error (line 296) | public function error($message = 'There is a error on page', $title = ...
method warning (line 341) | function warning($message, $title = 'System Message', $httpCode = 300,...
method _writeLogMessage (line 372) | function _writeLogMessage($httpCode, $user, $title, $message, array $e...
function pr (line 444) | function pr($prePrint = false) {
function pc (line 451) | function pc($prePrint = false) {
function prep (line 461) | function prep($message) {
function backtrace_no_arg (line 465) | function backtrace_no_arg() {
FILE: classes/sn_module_payment.php
class sn_module_payment (line 12) | abstract class sn_module_payment extends sn_module {
method __construct (line 137) | public function __construct($filename = __FILE__) {
method debug (line 148) | public function debug($data) {
method compile_request (line 163) | public function compile_request($request, $payment_method_selected) {
method payment_request_process (line 218) | protected function payment_request_process($options = []) {
method payment_request_response (line 344) | public function payment_request_response() {
method getPrice (line 391) | public function getPrice($payment_method_selected, $player_currency, $...
method currency_convert (line 406) | public static function currency_convert($value, $currency_from = '', $...
method bonus_calculate (line 440) | public static function bonus_calculate($dark_matter, $direct = true, $...
method retranslate_error (line 471) | protected function retranslate_error($error_code, $options = array()) {
method db_insert (line 476) | protected function db_insert() {
method getMethodCurrency (line 539) | public function getMethodCurrency($paymentMethod) {
method payment_adjust_mm_new (line 549) | protected function payment_adjust_mm_new() {
method payment_cancel (line 566) | function payment_cancel(/** @noinspection PhpUnusedParameterInspection...
method db_get_by_id (line 594) | protected function db_get_by_id($payment_id_unsafe) {
method db_complete_payment (line 611) | protected function db_complete_payment() {
method payment_reset (line 625) | protected function payment_reset() {
method db_assign_payment (line 658) | protected function db_assign_payment($payment = null) {
method generate_description (line 700) | protected function generate_description() {
method isMethodSupported (line 727) | public function isMethodSupported($payment_method) {
method getMethodDetails (line 738) | public function getMethodDetails($payment_method) {
method getMethodList (line 742) | public function getMethodList() {
method getMethodExternalId (line 753) | public function getMethodExternalId($payment_method) {
FILE: classes/template.php
class template (line 25) | class template
method __construct (line 76) | public function __construct($rootPhysical = SN_ROOT_PHYSICAL) {
method set_template (line 85) | function set_template()
method set_custom_template (line 126) | function set_custom_template($template_path, $template_name, $fallback...
method set_filenames (line 168) | function set_filenames($filename_array)
method destroy (line 197) | function destroy()
method destroy_block_vars (line 207) | function destroy_block_vars($blockname)
method display (line 237) | function display($handle, $include_once = true)
method assign_display (line 264) | function assign_display($handle, $template_var = '', $return_content =...
method _tpl_load (line 284) | function _tpl_load(&$handle)
method assign_vars (line 464) | function assign_vars($vararray)
method assign_var (line 478) | function assign_var($varname, $varval)
method assign_block_vars (line 489) | function assign_block_vars($blockname, $vararray)
method alter_block_array (line 580) | function alter_block_array($blockname, $vararray, $key = false, $mode ...
method _tpl_include (line 666) | function _tpl_include($filename, $include = true)
method _php_include (line 697) | function _php_include($filename)
method assign_recursive (line 714) | function assign_recursive($values, $name = '')
method reRender (line 751) | public function reRender($stringTag) {
method evaluate (line 760) | protected function evaluate($code) {
FILE: classes/template_compile.php
class template_compile (line 40) | class template_compile
method __construct (line 53) | public function __construct($template) {
method _tpl_load_file (line 61) | function _tpl_load_file($handle, $store_in_db = false)
method remove_php_tags (line 114) | function remove_php_tags(&$code)
method compile (line 130) | function compile($code, $no_echo = false, $echo_var = '')
method compile_var_tags (line 301) | function compile_var_tags(&$text_blocks)
method compile_tag_block (line 376) | function compile_tag_block($tag_args)
method compile_tag_if (line 483) | function compile_tag_if($tag_args, $elseif)
method compile_tag_define (line 640) | function compile_tag_define($tag_args, $op)
method compile_tag_include (line 693) | function compile_tag_include($tag_args)
method compile_tag_include_php (line 708) | function compile_tag_include_php($tag_args)
method _parse_is_expr (line 718) | function _parse_is_expr($is_arg, $tokens)
method generate_block_varref (line 794) | private function generate_block_varref($namespace, $varname, $defop = ...
method generate_block_data_ref (line 818) | function generate_block_data_ref($blockname, $include_last_iterator, $...
method compile_write (line 856) | function compile_write($handle, $data)
method minify (line 881) | function minify($html)
FILE: docs/supernova.sql
type `sn_account` (line 24) | CREATE TABLE `sn_account`
type `sn_account_translate` (line 50) | CREATE TABLE `sn_account_translate`
type `sn_ad_promo_codes` (line 68) | CREATE TABLE `sn_ad_promo_codes`
type `sn_ad_promo_codes_uses` (line 91) | CREATE TABLE `sn_ad_promo_codes_uses`
type `sn_aks` (line 110) | CREATE TABLE `sn_aks`
type `sn_alliance` (line 134) | CREATE TABLE `sn_alliance`
type `sn_alliance_diplomacy` (line 172) | CREATE TABLE `sn_alliance_diplomacy`
type `sn_alliance_negotiation` (line 201) | CREATE TABLE `sn_alliance_negotiation`
type `sn_alliance_requests` (line 234) | CREATE TABLE `sn_alliance_requests`
type `sn_annonce` (line 254) | CREATE TABLE `sn_annonce`
type `sn_announce` (line 280) | CREATE TABLE `sn_announce`
type `sn_auth_vkontakte_account` (line 300) | CREATE TABLE `sn_auth_vkontakte_account`
type `sn_banned` (line 322) | CREATE TABLE `sn_banned`
type `sn_bashing` (line 349) | CREATE TABLE `sn_bashing`
type `sn_blitz_registrations` (line 372) | CREATE TABLE `sn_blitz_registrations`
type `sn_blitz_statpoints` (line 401) | CREATE TABLE `sn_blitz_statpoints`
type `sn_buddy` (line 443) | CREATE TABLE `sn_buddy`
type `sn_captain` (line 466) | CREATE TABLE `sn_captain`
type `sn_chat` (line 489) | CREATE TABLE `sn_chat`
type `sn_chat_player` (line 517) | CREATE TABLE `sn_chat_player`
type `sn_config` (line 541) | CREATE TABLE `sn_config`
type `sn_confirmations` (line 556) | CREATE TABLE `sn_confirmations`
type `sn_counter` (line 579) | CREATE TABLE `sn_counter`
type `sn_festival` (line 607) | CREATE TABLE `sn_festival`
type `sn_festival_gifts` (line 625) | CREATE TABLE `sn_festival_gifts`
type `sn_festival_highspot` (line 647) | CREATE TABLE `sn_festival_highspot`
type `sn_festival_highspot_activity` (line 670) | CREATE TABLE `sn_festival_highspot_activity`
type `sn_festival_ois_player` (line 693) | CREATE TABLE `sn_festival_ois_player`
type `sn_festival_unit` (line 711) | CREATE TABLE `sn_festival_unit`
type `sn_festival_unit_log` (line 733) | CREATE TABLE `sn_festival_unit_log`
type `sn_fleets` (line 758) | CREATE TABLE `sn_fleets`
type `sn_iraks` (line 812) | CREATE TABLE `sn_iraks`
type `sn_lng_usage_stat` (line 843) | CREATE TABLE `sn_lng_usage_stat`
type `sn_log_dark_matter` (line 861) | CREATE TABLE `sn_log_dark_matter`
type `sn_log_halloween_2015` (line 887) | CREATE TABLE `sn_log_halloween_2015`
type `sn_log_metamatter` (line 906) | CREATE TABLE `sn_log_metamatter`
type `sn_log_users_online` (line 934) | CREATE TABLE `sn_log_users_online`
type `sn_logs` (line 949) | CREATE TABLE `sn_logs`
type `sn_messages` (line 978) | CREATE TABLE `sn_messages`
type `sn_notes` (line 1003) | CREATE TABLE `sn_notes`
type `sn_payment` (line 1031) | CREATE TABLE `sn_payment`
type `sn_planets` (line 1068) | CREATE TABLE `sn_planets`
type `sn_player_award` (line 1137) | CREATE TABLE `sn_player_award`
type `sn_player_ignore` (line 1161) | CREATE TABLE `sn_player_ignore`
type `sn_player_name_history` (line 1182) | CREATE TABLE `sn_player_name_history`
type `sn_player_options` (line 1199) | CREATE TABLE `sn_player_options`
type `sn_powerup` (line 1215) | CREATE TABLE `sn_powerup`
type `sn_que` (line 1244) | CREATE TABLE `sn_que`
type `sn_quest` (line 1278) | CREATE TABLE `sn_quest`
type `sn_quest_status` (line 1300) | CREATE TABLE `sn_quest_status`
type `sn_referrals` (line 1323) | CREATE TABLE `sn_referrals`
type `sn_security_browser` (line 1341) | CREATE TABLE `sn_security_browser`
type `sn_security_device` (line 1358) | CREATE TABLE `sn_security_device`
type `sn_security_player_entry` (line 1375) | CREATE TABLE `sn_security_player_entry`
type `sn_security_query_strings` (line 1396) | CREATE TABLE `sn_security_query_strings`
type `sn_security_url` (line 1412) | CREATE TABLE `sn_security_url`
type `sn_server_patches` (line 1428) | CREATE TABLE `sn_server_patches`
type `sn_statpoints` (line 1443) | CREATE TABLE `sn_statpoints`
type `sn_survey` (line 1494) | CREATE TABLE `sn_survey`
type `sn_survey_answers` (line 1513) | CREATE TABLE `sn_survey_answers`
type `sn_survey_votes` (line 1531) | CREATE TABLE `sn_survey_votes`
type `sn_text` (line 1555) | CREATE TABLE `sn_text`
type `sn_ube_report` (line 1584) | CREATE TABLE `sn_ube_report`
type `sn_ube_report_fleet` (line 1628) | CREATE TABLE `sn_ube_report_fleet`
type `sn_ube_report_outcome_fleet` (line 1660) | CREATE TABLE `sn_ube_report_outcome_fleet`
type `sn_ube_report_outcome_unit` (line 1689) | CREATE TABLE `sn_ube_report_outcome_unit`
type `sn_ube_report_player` (line 1712) | CREATE TABLE `sn_ube_report_player`
type `sn_ube_report_unit` (line 1737) | CREATE TABLE `sn_ube_report_unit`
type `sn_unit` (line 1772) | CREATE TABLE `sn_unit`
type `sn_universe` (line 1800) | CREATE TABLE `sn_universe`
type `sn_users` (line 1816) | CREATE TABLE `sn_users`
FILE: docs/txt2html.php
function dump (line 3) | function dump($value, $varname = "", $level = 0, $dumper = "") {
function pdump (line 53) | function pdump($value, $varname = '') {
function debug (line 57) | function debug($value, $varname = '') {
function buf_print (line 61) | function buf_print($string) {
FILE: flying_fleets.php
function flyingFleetsModel (line 19) | function flyingFleetsModel($userId, $debug) {
FILE: includes/db.php
function db_change_units_perform (line 21) | function db_change_units_perform($query, $tableName, $object_id) {
function db_change_units (line 42) | function db_change_units(&$user, &$planet, $unit_list = [], $query = nul...
function doquery (line 95) | function doquery($query, $table = '', $fetch = false, $skip_query_check ...
function db_fetch (line 110) | function db_fetch(&$query) {
function db_escape (line 121) | function db_escape($unescaped_string) {
FILE: includes/db/db_helpers.php
function db_normalize_id (line 18) | function db_normalize_id($db_row, $field_name = 'id') {
function db_set_make_safe_string (line 30) | function db_set_make_safe_string($set, $delta = false) {
function missile_list_convert_to_fleet (line 62) | function missile_list_convert_to_fleet(&$missile_db_list, &$fleet_db_lis...
function dbPatchGetCurrent (line 82) | function dbPatchGetCurrent() {
FILE: includes/db/db_queries.php
function db_planet_list_admin_list (line 11) | function db_planet_list_admin_list($table_parent_columns, $planet_active...
function db_planet_list_search (line 20) | function db_planet_list_search($searchtext) {
function db_user_list_search (line 39) | function db_user_list_search($searchtext) {
function db_buddy_list_by_user (line 57) | function db_buddy_list_by_user($user_id) {
function db_unit_records_sum (line 81) | function db_unit_records_sum($unit_id, $user_skip_list_unit) {
function db_unit_records_plain (line 92) | function db_unit_records_plain($unit_id, $user_skip_list_unit) {
function db_stat_list_statistic (line 102) | function db_stat_list_statistic($who, $is_common_stat, $Rank, $start, $s...
function db_stat_list_delete_ally_player (line 176) | function db_stat_list_delete_ally_player() {
function db_chat_player_list_online (line 181) | function db_chat_player_list_online($chat_refresh_rate, $ally_add) {
function db_referrals_list_by_id (line 195) | function db_referrals_list_by_id($user_id) {
function db_message_list_admin_by_type (line 199) | function db_message_list_admin_by_type($int_type_selected, $StartRec) {
function db_message_insert_all (line 218) | function db_message_insert_all($message_type, $from, $subject, $text) {
function db_get_set_unique_id_value (line 233) | function db_get_set_unique_id_value($db_table_name, $db_id_field_name, $...
function db_player_name_exists (line 275) | function db_player_name_exists($player_name_unsafe) {
function db_player_get_max_id (line 291) | function db_player_get_max_id() {
FILE: includes/db/db_queries_users.php
function db_user_by_id (line 24) | function db_user_by_id($user_id_unsafe, $for_update = false, $player = n...
function db_user_by_username (line 40) | function db_user_by_username($username_unsafe, $like = false) {
function dbPlayerByIdOrName (line 64) | function dbPlayerByIdOrName($playerIdOrName, $player = null, $like = fal...
function db_user_list (line 77) | function db_user_list($filter = '', $for_update = false, $fields = '*') {
function db_user_set_by_id (line 85) | function db_user_set_by_id($user_id, $set) {
function db_user_list_set_mass_mail (line 93) | function db_user_list_set_mass_mail($owners_list, $set) {
function db_user_list_set_by_ally_and_rank (line 100) | function db_user_list_set_by_ally_and_rank($ally_id, $ally_rank_id, $set) {
function db_user_list_set_ally_deprecated_convert_ranks (line 107) | function db_user_list_set_ally_deprecated_convert_ranks($ally_id, $i, $r...
function db_user_change_active_planet_to_capital (line 112) | function db_user_change_active_planet_to_capital($user_id, $captured_pla...
function db_user_last_registered_username (line 123) | function db_user_last_registered_username() {
function db_user_count (line 129) | function db_user_count($online = false) {
function db_user_list_to_celebrate (line 135) | function db_user_list_to_celebrate($config_user_birthday_range) {
function db_user_list_admin_multi_accounts (line 153) | function db_user_list_admin_multi_accounts() {
function db_user_list_admin_sorted (line 157) | function db_user_list_admin_sorted($sort, $online = false, $desc = false) {
function db_user_list_by_id (line 175) | function db_user_list_by_id($user_id_list) {
FILE: includes/debug.tools.php
function dieHere (line 10) | function dieHere($msg = '')
function pre (line 23) | function pre()
function here (line 53) | function here()
function hered (line 65) | function hered() {
function pred (line 71) | function pred()
function prej (line 83) | function prej()
function predj (line 101) | function predj()
function gLog (line 107) | function gLog($data, $force = true, $filename = '_log.txt')
function dT (line 120) | function dT($msg = '', $die = null)
function pdump (line 135) | function pdump($var, $msg = '', $die = null)
function ptrace (line 145) | function ptrace($die = false)
function dT2 (line 169) | function dT2($msg = '', $die = null)
FILE: includes/functions/_deprecated.php
function RestoreFleetToPlanet (line 21) | function RestoreFleetToPlanet(&$fleet_row, $start = true, $only_resource...
function sn_RestoreFleetToPlanet (line 36) | function sn_RestoreFleetToPlanet(&$fleet_row, $start = true, $only_resou...
FILE: includes/functions/_news.php
function nws_render (line 12) | function nws_render(&$user, &$template, $query_where = '', $query_limit ...
function nws_mark_read (line 146) | function nws_mark_read(&$user) {
function survey_vote (line 155) | function survey_vote(&$user) {
FILE: includes/functions/ali_alliances.php
function ali_rank_list_save (line 3) | function ali_rank_list_save($ranks) {
function ali_relations (line 18) | function ali_relations($ally_from, $ally_to = 0) {
function ali_relation (line 44) | function ali_relation($ally_from, $ally_to) {
FILE: includes/functions/eco_get_build_data.php
function eco_lab_sort_effectivness (line 6) | function eco_lab_sort_effectivness($a, $b) {
function eco_get_lab_max_effective_level (line 16) | function eco_get_lab_max_effective_level(&$user, $lab_require) {
function eco_get_build_data (line 67) | function eco_get_build_data(&$user, $planet, $unit_id, $unit_level = 0, ...
function eco_can_build_unit (line 112) | function eco_can_build_unit($user, $planet, $unit_id) {
function sn_eco_can_build_unit (line 118) | function sn_eco_can_build_unit($user, $planet, $unit_id, &$result) {
function eco_is_builds_in_que (line 138) | function eco_is_builds_in_que($planet_que, $unit_list) {
function eco_unit_busy (line 156) | function eco_unit_busy(&$user, &$planet, $unit_id) {
function sn_eco_unit_busy (line 162) | function sn_eco_unit_busy(&$user, &$planet, $unit_id, &$result) {
FILE: includes/functions/eco_planet_update.php
function sys_o_get_updated (line 19) | function sys_o_get_updated($userId, $planet, $UpdateTime, $simulation = ...
FILE: includes/functions/eco_queue.php
function que_get_unit_que (line 9) | function que_get_unit_que($unit_id) {
function que_get_max_que_length (line 22) | function que_get_max_que_length($user, $planet, $que_id, $que_data = nul...
function eco_que_str2arr (line 44) | function eco_que_str2arr($que_str) {
function eco_que_arr2str (line 57) | function eco_que_arr2str($que_arr) {
function que_build (line 66) | function que_build($user, $planet, $build_mode = BUILD_CREATE, $redirect...
function que_recalculate (line 382) | function que_recalculate($old_que) {
function que_get (line 414) | function que_get($user_id, $planet_id = null, $que_type = false, $for_up...
function que_delete (line 418) | function que_delete($que_type, $user = array(), $planet = array(), $clea...
function que_tpl_parse_element (line 469) | function que_tpl_parse_element($que_element, $short_names = false) {
function que_tpl_parse (line 497) | function que_tpl_parse(&$template, $que_type, $user, $planet = array(), ...
function que_process (line 534) | function que_process(&$user, $planet = null, $on_time = SN_TIME_NOW) {
FILE: includes/functions/flt_mission_missile.php
function COE_missileAttack (line 11) | function COE_missileAttack($defenceTech, $attackerTech, $MIPs, $structur...
function coe_o_missile_calculate (line 105) | function coe_o_missile_calculate() {
FILE: includes/functions/geoip.php
function geoip_status (line 3) | function geoip_status(){return sn_function_call('geoip_status', array(&$...
function sn_geoip_status (line 4) | function sn_geoip_status(&$result) {
function geoip_ip_info (line 8) | function geoip_ip_info($ip){return sn_function_call('geoip_ip_info', arr...
function sn_geoip_ip_info (line 9) | function sn_geoip_ip_info($ip, &$result) {
FILE: includes/functions/int_banner_create.php
function int_banner_create (line 16) | function int_banner_create($id, $type = 'userbar', $format = 'png') {
FILE: includes/functions/int_fleet_events.php
function flt_parse_fleets_to_events (line 6) | function flt_parse_fleets_to_events($fleet_list, $planet_scanned = false)
function flt_register_fleet_event (line 85) | function flt_register_fleet_event($fleet, $ov_label, $planet_end_type)
function int_planet_pretemplate (line 139) | function int_planet_pretemplate($planetrow, &$template)
FILE: includes/functions/lng_language.php
function lng_try_filepath (line 4) | function lng_try_filepath($path, $file_path_relative)
function lng_die_not_an_object (line 10) | function lng_die_not_an_object()
function lng_include (line 20) | function lng_include($filename, $path = '', $ext = '.mo.php')
function lng_get_list (line 26) | function lng_get_list()
function lng_get_info (line 32) | function lng_get_info($entry)
function lng_switch (line 38) | function lng_switch($language_new)
function lng_load_i18n (line 44) | function lng_load_i18n($i18n)
FILE: includes/functions/msg_send_simple_message.php
function msg_ali_send (line 18) | function msg_ali_send($message, $subject, $ally_rank_id = 0, $ally_id = 0)
function msg_send_simple_message (line 52) | function msg_send_simple_message($owners, $sender, $timestamp, $message_...
FILE: includes/functions/qst_quest.php
function roughQuestRenderWrapper (line 6) | function roughQuestRenderWrapper() {
function qst_render_page (line 21) | function qst_render_page(classLocale $lang, array $user, template $templ...
function questPageModelManage (line 83) | function questPageModelManage(classLocale $lang, template $template, &$m...
function questTemplatizeReward (line 149) | function questTemplatizeReward(&$quest_templatized, $lang) {
function questGetRewardsStringFromParams (line 175) | function questGetRewardsStringFromParams($lang) {
function questGetConditionFromParams (line 204) | function questGetConditionFromParams($lang) {
function questAllowedRewardsList (line 221) | function questAllowedRewardsList() {
function questUnitsAllowed (line 228) | function questUnitsAllowed() {
function qst_get_quests (line 232) | function qst_get_quests($user_id = false, $status = QUEST_STATUS_ALL) {
function qst_assign_to_template (line 269) | function qst_assign_to_template(&$template, $quest_templatized, $block_n...
function qst_quest_parse (line 282) | function qst_quest_parse($quest) {
function qst_templatize (line 290) | function qst_templatize($quest, $for_display = true) {
function qst_active_triggers (line 317) | function qst_active_triggers($quest_list) {
function qst_reward (line 335) | function qst_reward(&$user, &$rewards, &$quest_list, &$quest_statuses) {
function get_quest_amount_complete (line 451) | function get_quest_amount_complete($user_id) {
function get_quest_amount_in_progress (line 455) | function get_quest_amount_in_progress($user_id) {
FILE: includes/functions/rpg_points.php
function rpg_points_change (line 32) | function rpg_points_change($user_id, $change_type, $dark_matter, $commen...
function rpg_level_up (line 111) | function rpg_level_up(&$user, $type, $xp_to_add = 0)
function rpg_xp_for_level (line 173) | function rpg_xp_for_level($level, $b1, $q)
function rpg_get_miner_xp (line 178) | function rpg_get_miner_xp($level)
function RPG_get_raider_xp (line 183) | function RPG_get_raider_xp($level)
function rpg_get_tech_xp (line 188) | function rpg_get_tech_xp($level)
function rpg_get_explore_xp (line 193) | function rpg_get_explore_xp($level)
FILE: includes/functions/sys_maintenance.php
function sys_maintenance (line 3) | function sys_maintenance()
function sys_schedule_get_prev_run (line 47) | function sys_schedule_get_prev_run($scheduleList, $recorded_run = SN_TIM...
FILE: includes/functions/sys_user.php
function sys_user_vacation (line 13) | function sys_user_vacation($user) {
function sys_is_multiaccount (line 46) | function sys_is_multiaccount($user1, $user2) {
function sys_admin_player_ban (line 59) | function sys_admin_player_ban($banner, $banned, $term, $is_vacation = tr...
function sys_admin_player_ban_unset (line 92) | function sys_admin_player_ban_unset($banner, $banned, $reason = '') {
function player_create (line 133) | function player_create($username_unsafe, $email_unsafe, $options) {
FILE: includes/functions/tpl_helpers.php
function tpl_assign_fleet_compare (line 7) | function tpl_assign_fleet_compare($a, $b) {
function tpl_assign_fleet_generate (line 25) | function tpl_assign_fleet_generate($fleets, $js_name = 'fleets') {
function tpl_assign_fleet (line 55) | function tpl_assign_fleet(&$template, $fleets, $js_name = 'fleets') {
function tpl_parse_fleet_sn (line 71) | function tpl_parse_fleet_sn($fleet, $fleet_id) {
function tpl_parse_fleet_db (line 108) | function tpl_parse_fleet_db($fleet, $index, $user_data = false) {
function sn_tpl_parse_fleet_db (line 122) | function sn_tpl_parse_fleet_db($fleet, $index, $user_data = false, &$res...
function tpl_parse_planet_que (line 214) | function tpl_parse_planet_que($que, $planet, $que_id) {
function tpl_parse_planet_result_fleet (line 233) | function tpl_parse_planet_result_fleet($planet, $fleet_list) {
function tpl_parse_planet_moon (line 248) | function tpl_parse_planet_moon($parentPlanetId) {
function tpl_parse_planet (line 275) | function tpl_parse_planet($user, $planet) {
function flt_get_fleets_to_planet (line 331) | function flt_get_fleets_to_planet($planet, $fleet_db_list = 0) {
function tpl_set_resource_info (line 391) | function tpl_set_resource_info(&$template, $planetrow, $fleets_to_planet...
function templateFillPercent (line 436) | function templateFillPercent() {
FILE: includes/functions/uni_functions.php
function uni_create_planet_get_density (line 7) | function uni_create_planet_get_density($position_data, $user_row, $plane...
function uni_create_planet (line 66) | function uni_create_planet($Galaxy, $System, $Position, $PlanetOwnerID, ...
function uni_create_moon (line 182) | function uni_create_moon($pos_galaxy, $pos_system, $pos_planet, $user_id...
function SetSelectedPlanet (line 247) | function SetSelectedPlanet(&$user) {
function uni_render_coordinates (line 282) | function uni_render_coordinates($from, $prefix = '') {
function uni_render_planet (line 286) | function uni_render_planet($from) {
function uni_render_planet_full (line 290) | function uni_render_planet_full($from, $prefix = '', $html_safe = true, ...
function uni_render_coordinates_planet_object (line 315) | function uni_render_coordinates_planet_object($from) {
function uni_render_planet_object_full (line 327) | function uni_render_planet_object_full($from, $html_safe = true, $includ...
function uni_render_coordinates_url (line 345) | function uni_render_coordinates_url($from, $prefix = '', $page = 'galaxy...
function uni_render_coordinates_href (line 349) | function uni_render_coordinates_href($from, $prefix = '', $mode = 0, $fl...
function uni_get_time_to_jump (line 353) | function uni_get_time_to_jump($moon_row) {
function uni_coordinates_valid (line 359) | function uni_coordinates_valid($coordinates, $prefix = '') {
function uni_planet_teleport_check (line 373) | function uni_planet_teleport_check($user, $planetrow, $new_coordinates =...
FILE: includes/general/general.php
function sn_function_call (line 31) | function sn_function_call($func_name, $func_arg = array()) {
function execute_hooks (line 68) | function execute_hooks(&$hook_list, &$template, $hook_type = null, $page...
function sn_sys_handler_add (line 78) | function sn_sys_handler_add(&$functions, $handler_list, $class_module_na...
function sys_handler_add_one (line 95) | function sys_handler_add_one(&$functions, $function_name, $function_data...
function sys_file_read (line 155) | function sys_file_read($filename) {
function sys_file_write (line 160) | function sys_file_write($filename, $content) {
function sn_sys_load_php_files (line 164) | function sn_sys_load_php_files($dir_name, $load_extension = 'php') {
function getValueFromStorage (line 191) | function getValueFromStorage($unitSnId, $plain = false) {
function game_resource_multiplier (line 204) | function game_resource_multiplier($plain = false) {
function get_game_speed (line 215) | function get_game_speed($plain = false) {
function get_mm_cost (line 226) | function get_mm_cost($plain = false) {
function sn_get_mm_cost (line 232) | function sn_get_mm_cost($plain = false, &$result) {
function get_exchange_rate (line 243) | function get_exchange_rate($currency_symbol) {
function sys_stat_get_user_skip_list (line 251) | function sys_stat_get_user_skip_list() {
function market_get_autoconvert_cost (line 282) | function market_get_autoconvert_cost() {
function sn_powerup_get_price_matrix (line 294) | function sn_powerup_get_price_matrix($powerup_id, $powerup_unit = false,...
function sn_sn_powerup_get_price_matrix (line 312) | function sn_sn_powerup_get_price_matrix($powerup_id, $powerup_unit = fal...
function price_matrix_templatize (line 365) | function price_matrix_templatize(&$price_matrix_plain, &$price_matrix_or...
function sys_random_string (line 406) | function sys_random_string($length = 16, $allowed_chars = SN_SYS_SEC_CHA...
function array_merge_recursive_numeric (line 417) | function array_merge_recursive_numeric($array1, $array2) {
function sn_sys_array_cumulative_sum (line 427) | function sn_sys_array_cumulative_sum(&$array) {
function print_rr (line 435) | function print_rr($var, $capture = false) {
function getUniqueFleetId (line 453) | function getUniqueFleetId($planetTemplatized) {
function getLocationFromContext (line 462) | function getLocationFromContext($context = []) {
function mymail (line 480) | function mymail($email_unsafe, $title, $body, $from = '', $html = false) {
function sn_version_compare_extra (line 509) | function sn_version_compare_extra($version) {
function sn_version_compare (line 518) | function sn_version_compare($ver1, $ver2) {
function moduleAward (line 531) | function moduleAward() {
function moduleCaptain (line 542) | function moduleCaptain() {
function dbUpdateUsersOnline (line 553) | function dbUpdateUsersOnline($usersOnline) {
function dbUpdateUsersCount (line 564) | function dbUpdateUsersCount($userCount) {
FILE: includes/general/general_compatibility.php
function is_iterable (line 19) | function is_iterable($var) {
FILE: includes/general/general_formatters.php
function idval (line 14) | function idval($value, $default = 0) {
function prettyNumberGetClass (line 30) | function prettyNumberGetClass($number, $compareTo) {
function prettyNumberStyledDefault (line 53) | function prettyNumberStyledDefault($number) {
function prettyNumberStyledCompare (line 65) | function prettyNumberStyledCompare($number, $compareTo) {
function pretty_time (line 73) | function pretty_time($seconds, $daysNumeric = false) {
function pretty_time_short (line 85) | function pretty_time_short($seconds, $daysNumeric = true) {
function sys_time_human (line 97) | function sys_time_human($time, $full = false) {
function sys_time_human_system (line 114) | function sys_time_human_system($time) {
function strptime (line 119) | function strptime($date, $format) {
function js_safe_string (line 149) | function js_safe_string($string) {
function sys_safe_output (line 153) | function sys_safe_output($string) {
function str_raw2unsafe (line 157) | function str_raw2unsafe($raw) {
function ip2longu (line 161) | function ip2longu($ip) {
function datePart (line 170) | function datePart($fullDate) {
function unserializeOrJsonDecode (line 183) | function unserializeOrJsonDecode($var, $asArray = true) {
FILE: includes/general/general_math.php
function geometry_progression_sum (line 3) | function geometry_progression_sum($n, $b1, $q) {
function sn_floor (line 7) | function sn_floor($value)
function sn_rand_gauss (line 15) | function sn_rand_gauss($mu = 0, $sigma = 1, $strict = false)
function sn_rand_gauss_range (line 46) | function sn_rand_gauss_range($range_start, $range_end, $round = true, $s...
function median (line 64) | function median() {
function avg (line 101) | function avg($array)
function linear_calc (line 105) | function linear_calc(&$linear, $from = 0, $debug = false)
function sign (line 161) | function sign($number) {
FILE: includes/general/general_nickRender.php
function playerNickOrder (line 76) | function playerNickOrder($array, $options = null) {
function player_nick_render_to_html (line 95) | function player_nick_render_to_html($result, $options = false) {
function player_nick_compact (line 119) | function player_nick_compact($nick_array) {
function player_nick_uncompact (line 130) | function player_nick_uncompact($nick_string) {
function player_nick_render_array_to_html (line 142) | function player_nick_render_array_to_html($nick_array) {
function sn_player_nick_render_array_to_html (line 154) | function sn_player_nick_render_array_to_html($nick_array, &$result) {
function player_nick_render_current_to_array (line 238) | function player_nick_render_current_to_array($render_user, $options = fa...
function sn_player_nick_render_current_to_array (line 257) | function sn_player_nick_render_current_to_array($render_user, $options =...
FILE: includes/general/general_params.php
function isParamExists (line 6) | function isParamExists($paramName) {
function sys_get_param (line 16) | function sys_get_param($param_name, $default = '') {
function sys_get_param_id (line 26) | function sys_get_param_id($param_name, $default = 0) {
function sys_get_param_int (line 36) | function sys_get_param_int($param_name, $default = 0) {
function sys_get_param_float (line 48) | function sys_get_param_float($param_name, $default = 0.0) {
function sys_get_param_escaped (line 58) | function sys_get_param_escaped($param_name, $default = '') {
function sys_get_param_unit_array (line 70) | function sys_get_param_unit_array($param_name, $default = []) {
function sys_get_param_date_sql (line 89) | function sys_get_param_date_sql($param_name, $default = '2000-01-01') {
function sys_get_param_str_unsafe (line 101) | function sys_get_param_str_unsafe($param_name, $default = '') {
function sys_get_param_str (line 111) | function sys_get_param_str($param_name, $default = '') {
function sys_get_param_str_both (line 121) | function sys_get_param_str_both($param_name, $default = '') {
function sys_get_param_phone (line 138) | function sys_get_param_phone($param_name, $default = '') {
FILE: includes/general/general_planetFunctions.php
function eco_planet_fields_max (line 10) | function eco_planet_fields_max($planet) {
function GetPhalanxRange (line 14) | function GetPhalanxRange($phalanx_level) {
function CheckAbandonPlanetState (line 23) | function CheckAbandonPlanetState(&$planet) {
function can_capture_planet (line 33) | function can_capture_planet() { $result = null; return sn_function_call(...
function sn_can_capture_planet (line 35) | function sn_can_capture_planet(&$result) {
FILE: includes/general/general_playerFunctions.php
function sys_user_options_pack (line 10) | function sys_user_options_pack(&$user) {
function sys_user_options_unpack (line 34) | function sys_user_options_unpack(&$user) {
function get_player_max_expeditons (line 63) | function get_player_max_expeditons(&$user, $astrotech = -1) { $result = ...
function sn_get_player_max_expeditons (line 65) | function sn_get_player_max_expeditons(&$user, $astrotech = -1, &$result ...
function get_player_max_expedition_duration (line 78) | function get_player_max_expedition_duration(&$user, $astrotech = -1) {
function get_player_max_colonies (line 82) | function get_player_max_colonies(&$user, $astrotech = -1) {
function get_player_current_colonies (line 102) | function get_player_current_colonies(&$user) {
function GetSpyLevel (line 106) | function GetSpyLevel(&$user) {
function GetMaxFleets (line 110) | function GetMaxFleets(&$user) {
function sys_player_new_adjust (line 122) | function sys_player_new_adjust($user_id, $capitalPlanetId) { $result = n...
function sn_sys_player_new_adjust (line 124) | function sn_sys_player_new_adjust($user_id, $planet_id, &$result) {
function flt_get_missile_range (line 130) | function flt_get_missile_range($user) {
FILE: includes/general/general_pname.php
function pname_factory_production_field_name (line 5) | function pname_factory_production_field_name($factory_unit_id)
function pname_resource_name (line 10) | function pname_resource_name($resource_id)
FILE: includes/general/general_unitFunctions.php
function eco_get_total_cost (line 9) | function eco_get_total_cost($unit_id, $unit_level) {
function sn_unit_purchase (line 40) | function sn_unit_purchase($unit_id) { }
function sn_unit_relocate (line 42) | function sn_unit_relocate($unit_id, $from, $to) { }
function mrc_get_level (line 55) | function mrc_get_level(&$user, $planet = [], $unit_id, $for_update = fal...
function sn_mrc_get_level (line 73) | function sn_mrc_get_level(&$user, $planet = [], $unit_id, $for_update = ...
function mrc_modify_value (line 96) | function mrc_modify_value(&$user, $planet = array(), $mercenaries, $valu...
function sn_mrc_modify_value (line 98) | function sn_mrc_modify_value(&$user, $planet = array(), $mercenaries, $v...
function sys_unit_str2arr (line 133) | function sys_unit_str2arr($fleet_string) {
function sys_unit_arr2str (line 150) | function sys_unit_arr2str($unit_list) {
function sys_get_unit_location (line 168) | function sys_get_unit_location($user, $planet, $unit_id) { return sn_fun...
function sn_sys_get_unit_location (line 170) | function sn_sys_get_unit_location($user, $planet, $unit_id) {
function get_engine_data (line 175) | function get_engine_data($user, $engine_info, $user_tech_level = null) {
function get_ship_data (line 193) | function get_ship_data($ship_id, $user) {
function getUnitInfo (line 217) | function getUnitInfo($unitSnId) {
function get_unit_param (line 231) | function get_unit_param($unit_id, $param_name = null, $user = null, $pla...
function sn_get_unit_param (line 248) | function sn_get_unit_param($unit_id, $param_name = null, $user = null, $...
function sn_get_groups (line 266) | function sn_get_groups($groups) {
function sn_sn_get_groups (line 272) | function sn_sn_get_groups($groups, &$result) {
function unit_requirements_render (line 282) | function unit_requirements_render($user, $planetrow, $unit_id, $field = ...
function sn_unit_requirements_render (line 288) | function sn_unit_requirements_render($user, $planetrow, $unit_id, $field...
function get_unit_cost_in (line 320) | function get_unit_cost_in($cost, $in_resource = RES_METAL) {
function getStackableUnitsCost (line 350) | function getStackableUnitsCost($units, $costResourceId = RES_METAL) {
FILE: includes/general/general_urlAndHttp.php
function sys_redirect (line 7) | function sys_redirect($url) {
function sys_redirect_js (line 18) | function sys_redirect_js($url) {
function setHeader (line 37) | function setHeader($header) {
function sn_get_url_contents (line 43) | function sn_get_url_contents($url) {
function sn_post_url_contents (line 70) | function sn_post_url_contents($url, $data) {
function invokeUrl (line 91) | function invokeUrl($url) {
function sn_setcookie (line 96) | function sn_setcookie($name, $value = null, $expire = null, $path = SN_R...
function sec_player_ip (line 111) | function sec_player_ip() {
FILE: includes/general/general_validators.php
function is_email (line 6) | function is_email($email) {
function is_id (line 10) | function is_id($value) {
FILE: includes/includes/art_artifact.php
function art_use (line 9) | function art_use(&$user, &$planetrow, $unit_id)
FILE: includes/includes/coe_simulator_helpers.php
function sn_ube_simulator_encode_replay (line 3) | function sn_ube_simulator_encode_replay($combat, $type) {
function sn_ube_simulator_decode_replay (line 17) | function sn_ube_simulator_decode_replay($str_data) {
FILE: includes/includes/eco_bld_structures.php
function eco_build (line 16) | function eco_build($que_type, &$user, &$planet) { return sn_function_cal...
function sn_eco_build (line 18) | function sn_eco_build($que_type, &$auser, &$planet) {
FILE: includes/includes/flt_functions.php
function flt_get_max_distance (line 17) | function flt_get_max_distance($ship_id, $speed_percent = 100, $shipsData...
function calcDistance (line 33) | function calcDistance($speed_percent, $single_ship_data) {
function flt_travel_data (line 48) | function flt_travel_data($user_row, $from, $to, $fleet_array, $speed_per...
function flt_bashing_check (line 91) | function flt_bashing_check($user, $enemy, $planet_dst, $mission, $flight...
function flt_can_attack (line 184) | function flt_can_attack($planet_src, $planet_dst, $fleet = [], $mission,...
function sn_flt_can_attack (line 201) | function sn_flt_can_attack($planet_src, $planet_dst, $fleet = [], $missi...
function flt_t_send_fleet (line 487) | function flt_t_send_fleet($user, &$from, $to, $fleet, $resources, $missi...
function fltSendFleetAdjustPlanetUnits (line 557) | function fltSendFleetAdjustPlanetUnits($user, $fromId, $fleet) {
function fltSendFleetAdjustPlanetResources (line 578) | function fltSendFleetAdjustPlanetResources($fromId, $resources, $consump...
function flt_calculate_ship_to_transport_sort (line 592) | function flt_calculate_ship_to_transport_sort($a, $b) {
function flt_calculate_fleet_to_transport (line 601) | function flt_calculate_fleet_to_transport($ship_list, $resource_amount, ...
FILE: includes/includes/flt_mission_attack.php
function flt_planet_capture (line 24) | function flt_planet_capture(&$fleet_row, &$combat_data) {
function sn_flt_planet_capture (line 31) | function sn_flt_planet_capture(&$fleet_row, &$combat_data, $result) {
function flt_mission_attack (line 41) | function flt_mission_attack($fleetEvent) {
FILE: includes/includes/flt_mission_colonize.php
function flt_mission_colonize (line 11) | function flt_mission_colonize($fleetEvent) {
FILE: includes/includes/flt_mission_hold.php
function flt_mission_hold (line 11) | function flt_mission_hold($fleetEvent) {
FILE: includes/includes/flt_mission_recycle.php
function flt_mission_recycle (line 12) | function flt_mission_recycle($fleetEvent) {
FILE: includes/includes/flt_mission_relocate.php
function flt_mission_relocate (line 12) | function flt_mission_relocate($fleetEvent) {
FILE: includes/includes/flt_mission_transport.php
function flt_mission_transport (line 12) | function flt_mission_transport($fleetEvent) {
FILE: includes/includes/sys_avatar.php
function sys_avatar_upload (line 3) | function sys_avatar_upload($subject_id, &$avatar_field, $prefix = 'avata...
FILE: includes/includes/ube_attack_calculate.php
function sn_ube_message_send (line 65) | function sn_ube_message_send(&$combat_data) {
function ube_combat_result_apply (line 129) | function ube_combat_result_apply(&$combat_data) { return sn_function_cal...
function sn_ube_combat_result_apply (line 131) | function sn_ube_combat_result_apply(&$combat_data) {
FILE: includes/includes/ube_report.php
function sn_ube_report_save (line 5) | function sn_ube_report_save(&$combat_data) {
function sn_ube_report_load (line 270) | function sn_ube_report_load($report_cypher) {
function sn_ube_report_round_fleet (line 447) | function sn_ube_report_round_fleet(&$combat_data, $round) {
function sn_ube_report_table_render (line 497) | function sn_ube_report_table_render(&$array, $header) {
function sn_ube_report_generate (line 520) | function sn_ube_report_generate(&$combat_data, &$template_result) {
FILE: includes/includes/ube_zi_helpers.php
function sn_ube_combat_helper_round_header (line 3) | function sn_ube_combat_helper_round_header($round) {
function sn_ube_combat_helper_round_footer (line 40) | function sn_ube_combat_helper_round_footer($round = 0) {
function sn_ube_combat_helper_round_row (line 44) | function sn_ube_combat_helper_round_row(&$debug_unit_crossfire_result) {
FILE: includes/includes/user_birthday_celebrate.php
function sn_user_birthday_celebrate (line 5) | function sn_user_birthday_celebrate()
FILE: includes/pages/admin/admin_ally.php
function sn_admin_ally_model (line 9) | function sn_admin_ally_model($template = null) {
function sn_admin_ally_view_one (line 55) | function sn_admin_ally_view_one($template, $alliance) {
function sn_admin_ally_view_all (line 74) | function sn_admin_ally_view_all($template = null) {
function sn_admin_ally_view (line 90) | function sn_admin_ally_view($template = null) {
FILE: includes/pages/battle_report.php
function sn_battle_report_view (line 8) | function sn_battle_report_view($template = null) {
FILE: includes/pages/contact.php
function sn_contact_view (line 7) | function sn_contact_view($template = null) {
FILE: includes/pages/imperator.php
function sn_imperator_view (line 11) | function sn_imperator_view($template = null) {
FILE: includes/pages/options.php
function sn_options_model (line 16) | function sn_options_model() {
function sn_options_view (line 97) | function sn_options_view($template = null) {
function sn_options_gender (line 295) | function sn_options_gender($user) {
function sn_options_change_birthday (line 308) | function sn_options_change_birthday($user) {
function sn_options_change_password (line 356) | function sn_options_change_password() {
function sn_options_player_standard (line 382) | function sn_options_player_standard() {
function sn_options_change_username (line 407) | function sn_options_change_username($user) {
function sn_options_deprecated (line 480) | function sn_options_deprecated($user) {
function sn_options_admin_protection (line 503) | function sn_options_admin_protection($user) {
function sn_options_vacation (line 521) | function sn_options_vacation($user) {
function sn_options_render_block (line 573) | function sn_options_render_block($template, $blockName, $blockId, $optio...
function sn_options_add_standard (line 593) | function sn_options_add_standard($template) {
FILE: includes/pages/techtree.php
function sn_techtree_view (line 9) | function sn_techtree_view($template = null)
FILE: js/build_unit.js
function eco_struc_make_resource_row (line 3) | function eco_struc_make_resource_row(unitData, resourceName) {
function eco_struc_make_resource_rows_all (line 36) | function eco_struc_make_resource_rows_all(unit) {
function buildUnitProcessResult (line 43) | function buildUnitProcessResult(e, result) {
function extracted (line 183) | function extracted(j, balance_header) {
function eco_struc_show_unit_info (line 209) | function eco_struc_show_unit_info(unit_id, no_color) {
function eco_struc_select_unit (line 390) | function eco_struc_select_unit(unit_id) {
FILE: js/chat_advanced.js
function addSmiley (line 241) | function addSmiley(smiley, onStart) {
function addMessage (line 246) | function addMessage(message) {
function showMessage (line 266) | function showMessage(initial) {
FILE: js/cnt.js
function t (line 3) | function t() {
FILE: js/fleet.js
function changeMission (line 15) | function changeMission(mission) {
function speed_percent (line 58) | function speed_percent() {
function setTarget (line 63) | function setTarget(galaxy, solarsystem, planet, planet_type) {
function setMission (line 76) | function setMission(mission) {
function setACS (line 81) | function setACS(fleet_group) {
function setACS_target (line 87) | function setACS_target(acs_target_mr) {
function min (line 92) | function min(a, b) {
function distance (line 102) | function distance() {
function duration (line 139) | function duration() {
function consumption (line 144) | function consumption() {
function shortInfo (line 160) | function shortInfo() {
function fl_calc_stats (line 203) | function fl_calc_stats(event, ui) {
function calculateTransportCapacity (line 251) | function calculateTransportCapacity() {
function setNumber (line 272) | function setNumber(name,number){
function abs (line 278) | function abs(a) {
function zero_fleet (line 285) | function zero_fleet()
function expe_fleet (line 299) | function expe_fleet(expeditions)
function max_fleet (line 319) | function max_fleet()
function check_resource (line 335) | function check_resource(id)
function zero_resource (line 347) | function zero_resource(id)
function zero_resources (line 359) | function zero_resources()
function max_resource (line 368) | function max_resource(id) {
function max_resources (line 380) | function max_resources() {
function fleet_dialog_show (line 387) | function fleet_dialog_show(caller, fleet_id) {
function fleet_table_make (line 391) | function fleet_table_make(fleet_id)
function fleet_page_2_loaded (line 441) | function fleet_page_2_loaded() {
function fleet_page_2_prepare_slider (line 456) | function fleet_page_2_prepare_slider(resourceID, resourceOnPlanet, fleet...
FILE: js/fleet_gather.js
function reCalcGathering (line 4) | function reCalcGathering() {
FILE: js/generate.js
function rndnumber (line 230) | function rndnumber(max)
function profundity (line 239) | function profundity()
FILE: js/lib/jquery-ui.js
function e (line 6) | function e(e,s){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n...
function i (line 6) | function i(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack(...
function s (line 6) | function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"pa...
function r (line 6) | function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-st...
function i (line 6) | function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}
function e (line 6) | function e(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFl...
function i (line 6) | function i(e,i){return parseInt(t.css(e,i),10)||0}
function s (line 6) | function s(e){var i=e[0];return 9===i.nodeT
Condensed preview — 814 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,726K chars).
[
{
"path": ".gitattributes",
"chars": 189,
"preview": ".gitattributes export-ignore\n.gitignore export-ignore\n\n*.jpg binary\n*.gif binary\n*.png binary\n*.ttf binary\n*.zip binary\n"
},
{
"path": ".gitignore",
"chars": 1119,
"preview": "# Ignore config.php in any directory\nconfig.php\n*config.php\n\nbadqrys.txt\n\n# Ignore Yandex and Google placeholders\n/yande"
},
{
"path": ".htaccess",
"chars": 386,
"preview": "AddDefaultCharset UTF-8\n\n# Disable index list\nOptions -Indexes\n\n# Disable access to config.php\n<Files config.php>\n orde"
},
{
"path": "README.MD",
"chars": 4439,
"preview": "# We Want YOU!\nSuperNova need YOU! We need maintainers for localizations. Any language is\nfine! Currently we need m"
},
{
"path": "_error-404.php",
"chars": 408,
"preview": "/* <?php\n$redirectFrom = !empty($_SERVER[\"REDIRECT_URL\"]) ? $_SERVER[\"REDIRECT_URL\"] : '';\n// $serverProtocol = !empty($"
},
{
"path": "admin/add_moon.php",
"chars": 1048,
"preview": "<?php\n\n/**\n * admin/add_moon.php\n *\n * @version 2\n * @copyright 2014 Gorlum for http://supernova.ws\n */\n\nuse DBAL\\db_mys"
},
{
"path": "admin/adm_flying_fleets.php",
"chars": 1359,
"preview": "<?php\n\n/**\n * adm_flying_fleets.php\n *\n * @copyright 2014 by Gorlum for http://supernova.ws/\n */\n\nuse Fleet\\DbFleetStati"
},
{
"path": "admin/adm_log_main.php",
"chars": 2670,
"preview": "<?php\n\n/**\n * admin/adm_log_main.php\n *\n * @version 2.0 - full rewrote\n * @copyright 2014 by Gorlum for http://supernova"
},
{
"path": "admin/adm_message_list.php",
"chars": 3107,
"preview": "<?php\n\n/**\n * admin/adm_message_list.php\n *\n * @version 2\n * @copyright 2014 by Gorlum for http://supernova.ws/\n *\n */\n\n"
},
{
"path": "admin/adm_metamatter.php",
"chars": 4631,
"preview": "<?php\n\n/**\n * adm_meta_matter.php\n *\n * Adjust Meta Matter quantity\n *\n * @version 2.0 (c) copyright 2013-2017 by Gorlum"
},
{
"path": "admin/adm_planet_list.php",
"chars": 1843,
"preview": "<?php\n\ndefine('INSIDE' , true);\ndefine('INSTALL' , false);\ndefine('IN_ADMIN', true);\n\nrequire('../common.' . substr(str"
},
{
"path": "admin/adm_quest.php",
"chars": 327,
"preview": "<?php\n\n/**\n * quest.php\n *\n * @v1 (c) copyright 2011 by Gorlum for http://supernova.ws\n *\n */\n\ndefine('INSIDE' , true);"
},
{
"path": "admin/adm_user_analyze.php",
"chars": 4133,
"preview": "<?php\n\n/**\n * adm_payment.php\n *\n * @version 1.0\n * @copyright 2013 by Gorlum for http://supernova.ws\n*/\ndefine('INSIDE'"
},
{
"path": "admin/adm_user_stat.php",
"chars": 6375,
"preview": "<?php\n\n/**\n * adm_payment.php\n *\n * @version 1.0\n * @copyright 2013 by Gorlum for http://supernova.ws\n*/\ndefine('INSIDE'"
},
{
"path": "admin/admin_analyze_matter.php",
"chars": 2955,
"preview": "<?php\n/**\n * Created by Gorlum 18.02.2017 19:37\n */\n\ndefine('INSIDE', true);\ndefine('INSTALL', false);\ndefine('IN_ADMIN'"
},
{
"path": "admin/admin_chat.php",
"chars": 1160,
"preview": "<?php\n\n/**\n * Project \"SuperNova.WS\" copyright (c) 2009-2017 Gorlum\n * @version #45d0#\n **/\n\ndefine('INSIDE', true);\ndef"
},
{
"path": "admin/admin_darkmatter.php",
"chars": 2684,
"preview": "<?php\n\n/**\n * admin_darkmatter.php\n *\n * Adjust Dark Matter quantity\n *\n * @version 2.0 (c) copyright 2010-2017 by Gorlu"
},
{
"path": "admin/admin_locale.php",
"chars": 7890,
"preview": "<?php\n\n/**\n * adm_locale.php\n *\n * @v1 (c) copyright 2011 by Gorlum for http://supernova.ws\n *\n */\n\ndefine('INSIDE' , t"
},
{
"path": "admin/admin_user_activity.php",
"chars": 3448,
"preview": "<?php\n/** @noinspection SqlResolve */\n\nini_set('memory_limit', '512M');\n\ndefine('INSIDE', true);\ndefine('INSTALL', false"
},
{
"path": "admin/ajax_maintenance.php",
"chars": 12930,
"preview": "<?php /** @noinspection SqlResolve */\n\nuse DBAL\\db_mysql;\n\ndefine('IN_ADMIN', true);\n\nrequire('../includes/init.' . subs"
},
{
"path": "admin/banned.php",
"chars": 1896,
"preview": "<?php\n\n/**\n * @copyright Copyright (c) 2009 by Gorlum for http://supernova.ws\n */\ndefine('INSIDE', true);\ndefine('INSTAL"
},
{
"path": "admin/includes/admin_planet_edit.inc.php",
"chars": 2161,
"preview": "<?php\n\nfunction admin_planet_edit_mode(&$template, &$admin_planet_edit_mode_list){return sn_function_call('admin_planet_"
},
{
"path": "admin/index.html",
"chars": 0,
"preview": ""
},
{
"path": "admin/maintenance.php",
"chars": 682,
"preview": "<?php\n\n/**\n * maintenance.php\n *\n * @version 1.0\n * @copyright 2009 by Gorlum for http://oGame.Triolan.COM.UA\n */\ndefine"
},
{
"path": "admin/overview.php",
"chars": 181,
"preview": "<?php\n\n/**\n *\n * admin/overview.php\n *\n * @version 2.0 copyright (c) 2014 Gorlum for http://supernova.ws\n *\n */\n\ndefine("
},
{
"path": "admin/planet_compensate.php",
"chars": 5654,
"preview": "<?php\n\nuse DBAL\\db_mysql;\nuse Planet\\DBStaticPlanet;\nuse Unit\\DBStaticUnit;\n\ndefine('INSIDE', true);\ndefine('INSTALL', f"
},
{
"path": "admin/planet_edit.php",
"chars": 2758,
"preview": "<?php\n\nuse Planet\\DBStaticPlanet;\nuse Player\\RecordPlayer;\nuse Unit\\DBStaticUnit;\n\ndefine('INSIDE', true);\ndefine('INSTA"
},
{
"path": "admin/settings.php",
"chars": 9319,
"preview": "<?php\n\n/** @noinspection PhpDefineCanBeReplacedWithConstInspection */\n/** @noinspection PhpRedundantOptionalArgumentInsp"
},
{
"path": "admin/statbuilder.php",
"chars": 1447,
"preview": "<?php\n\n/**\n * StatBuilder.php\n *\n * @version 1.1 (c) copyright 2010 by Gorlum for http://supernova.ws\n * [*] All calcu"
},
{
"path": "admin/sxd/.htaccess",
"chars": 231,
"preview": "<Files cfg.php>\norder allow,deny\ndeny from all\n</Files>\n\n<Files ses.php>\norder allow,deny\ndeny from all\n</Files>\n\n<Files"
},
{
"path": "admin/sxd/backup/.htaccess",
"chars": 120,
"preview": "AddType application/octetstream .gz .bz2 .sql\n\n<Files ~ \"\\.(php|log|rtl|stp)$\">\norder allow,deny\ndeny from all\n</Files>\n"
},
{
"path": "admin/sxd/backup/index.htm",
"chars": 0,
"preview": ""
},
{
"path": "admin/sxd/bsd_license.txt",
"chars": 1517,
"preview": "Copyright (c) 2003-2009, zapimir\nportions copyright (c) 2005-2009 Binovator\nAll rights reserved.\n\nRedistribution and use"
},
{
"path": "admin/sxd/img/index.htm",
"chars": 0,
"preview": ""
},
{
"path": "admin/sxd/index.php",
"chars": 60923,
"preview": "<?php\n/***************************************************************************\\\n| Sypex Dumper version"
},
{
"path": "admin/sxd/info.php",
"chars": 5264,
"preview": "<?php\n// Sypex Dumper 2\nheader(\"Content-Type: text/html; charset=utf-8\");\nerror_reporting(0);\nset_error_handler(\"sxd_err"
},
{
"path": "admin/sxd/lang/index.htm",
"chars": 0,
"preview": ""
},
{
"path": "admin/sxd/lang/list.php",
"chars": 94,
"preview": "<?php\n$langs = array (\n 'en' => 'English',\n 'ru' => 'Русский',\n 'uk' => 'Українська',\n);\n?>"
},
{
"path": "admin/sxd/lang/lng_en.php",
"chars": 6039,
"preview": "<?php\n// Language File for Sypex Dumper 2\n$LNG = array(\n\n// Information about the language file\n'ver'\t\t\t\t=> 20005, // Du"
},
{
"path": "admin/sxd/lang/lng_ru.php",
"chars": 6478,
"preview": "<?php\n// Language File for Sypex Dumper 2\n$LNG = array(\n\n// Информация о файле локализации\n'ver'\t\t\t\t=> 20005, // Для как"
},
{
"path": "admin/sxd/lang/lng_uk.php",
"chars": 6435,
"preview": "<?php\n// Language File for Sypex Dumper 2\n$LNG = array(\n\n// Информация о файле локализации\n'ver'\t\t\t\t=> 20005, // Для как"
},
{
"path": "admin/sxd/lang/update.php",
"chars": 541,
"preview": "<?php\n// Sypex Dumper 2 langfile updater\n$path = './';\n$langlist = array();\nif (false !== ($handle = opendir($path))) {\n"
},
{
"path": "admin/sxd/load.php",
"chars": 1912,
"preview": "<?php\nerror_reporting(0);\nif(!empty($_SERVER['QUERY_STRING']) && preg_match(\"/^(\\w+)(\\.v\\d+)?(pro)?\\.(lng\\.js|js|css|gif"
},
{
"path": "admin/sxd/readme_en.txt",
"chars": 372,
"preview": "Installing\n\n1.Unzip it and upload the contents of the directory to the server.\n2.Set chmod 777 for backup directory.\n3.S"
},
{
"path": "admin/sxd/readme_ru.txt",
"chars": 173,
"preview": " Sypex Dumper 2:\n\n .\n chmod 777 backup\n chmod 666 777 cfg.php ses.php\n\n url http://mysite.net/sxd/, m"
},
{
"path": "admin/sxd/sxd.css",
"chars": 6271,
"preview": "html{height:100%;overflow:auto;margin:0;}body{min-height:100%;position:relative;overflow:hidden;background-color:#f0f0f0"
},
{
"path": "admin/sxd/sxd.js",
"chars": 27040,
"preview": "function z(el){return document.getElementById(el);}\nvar sxd={version:{num:20007,type:'lite',full:''},init:function(){var"
},
{
"path": "admin/sxd/tmpl.php",
"chars": 15210,
"preview": "<?php\n// Templates\nfunction sxd_tpl_page(){\nglobal $SXD;\nreturn <<<HTML\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN"
},
{
"path": "admin/tools.php",
"chars": 10633,
"preview": "<?php\n/**\n * erreurs.php\n *\n * @version 1.0\n * @copyright 2009 by Gorlum for http://oGame.Triolan.COM.UA\n */\n\ndefine('IN"
},
{
"path": "admin/userlist.php",
"chars": 6955,
"preview": "<?php\n/** @noinspection SqlResolve */\n/** @noinspection PhpUnnecessaryCurlyVarSyntaxInspection */\n/** @noinspection PhpD"
},
{
"path": "affilates.php",
"chars": 1495,
"preview": "<?php\n\n/**\n * affilates.php\n *\n * v2 (c) copyright 2010 by Gorlum for http://supernova.ws\n * [~] Complies with PCG1\n * "
},
{
"path": "ajax_version_check.php",
"chars": 130,
"preview": "<?php\n\nrequire_once('includes/init.' . substr(strrchr(__FILE__, '.'), 1));\n\n\\Common\\Tools\\VersionCheckerDeprecated::hand"
},
{
"path": "alliance.php",
"chars": 4050,
"preview": "<?php\n\nuse Alliance\\Alliance;\nuse Pages\\Helpers\\PageHelperAlly;\n\ninclude('common.' . substr(strrchr(__FILE__, '.'), 1));"
},
{
"path": "annonce.php",
"chars": 4652,
"preview": "<?php\n\n/**\n * annonce.php\n *\n * Announces for trading between players\n *\n * @version 1.0s - Security checked for SQL-inj"
},
{
"path": "announce.php",
"chars": 5334,
"preview": "<?php\n/** @noinspection PhpUnnecessaryCurlyVarSyntaxInspection */\n\n/**\n * announce.php\n *\n * @copyright (c) 2010-2016 Go"
},
{
"path": "artifacts.php",
"chars": 3489,
"preview": "<?php\n\n/**\n * artifacts.php\n * Artifact actions\n *\n * @package roleplay\n * @version 1.0\n *\n * Revision History\n * ======"
},
{
"path": "banned.php",
"chars": 973,
"preview": "<?php\n\n/**\n * banned.php\n *\n * List of all issued bans\n *\n * 2.0 (c) copyright 2010-2011 by Gorlum for http://supernova."
},
{
"path": "banner.php",
"chars": 575,
"preview": "<?php\n/**\n* banner.php\n* @version 1.0s - Security checks by Gorlum for http://supernova.ws\n* @version 1.0\n*\n* Simple wra"
},
{
"path": "blitz_register.php",
"chars": 10613,
"preview": "<?php\n\nuse DBAL\\db_mysql;\nuse Universe\\Universe;\n\ninclude('common.' . substr(strrchr(__FILE__, '.'), 1));\n\nif ($user['au"
},
{
"path": "buddy.php",
"chars": 6847,
"preview": "<?php\n\n/**\n * buddy.php\n * Friend system\n *\n * v3.0 Fully rewrote by Gorlum for http://supernova.ws\n * [!] Full rewr"
},
{
"path": "buildings.php",
"chars": 2081,
"preview": "<?php\n\n/**\n * buildings.php\n *\n * Allow building of... hmm... buildings\n *\n * @version 1.3s Security checks by Gorlum f"
},
{
"path": "captcha.php",
"chars": 486,
"preview": "<?php\n// Captcha code for registration - really didn't work alot :(\n\nsession_start();\n$en = 100;\n$boy = 25;\n$sayi = mt_r"
},
{
"path": "classes/Account.php",
"chars": 18528,
"preview": "<?php\n\nuse DBAL\\db_mysql;\nuse \\DBAL\\DbQuery;\n\n/**\n * User: Gorlum\n * Date: 24.08.2015\n * Time: 6:00\n */\nclass Account {\n"
},
{
"path": "classes/AjaxController.php",
"chars": 1850,
"preview": "<?php\n\nuse Pages\\IPage;\n\n/**\n * Created by Gorlum 10.02.2017 6:36\n */\nclass AjaxController {\n\n /**\n *\n * Request fo"
},
{
"path": "classes/Alliance/Alliance.php",
"chars": 5605,
"preview": "<?php\n/**\n * Created by Gorlum 28.11.2017 6:01\n */\n\nnamespace Alliance;\n\nuse Core\\GlobalContainer;\nuse DBAL\\db_mysql;\nus"
},
{
"path": "classes/Alliance/AllianceHelper.php",
"chars": 825,
"preview": "<?php\n/**\n * Created by Gorlum 11.11.2018 4:57\n */\n\nnamespace Alliance;\n\nclass AllianceHelper {\n protected static $patt"
},
{
"path": "classes/Alliance/AllianceMember.php",
"chars": 2105,
"preview": "<?php\n/**\n * Created by Gorlum 28.11.2017 11:15\n */\n\nnamespace Alliance;\n\n\nuse Player\\RecordPlayer;\n\n/**\n * Class Allian"
},
{
"path": "classes/Alliance/AllianceMemberList.php",
"chars": 2335,
"preview": "<?php\n/**\n * Created by Gorlum 28.11.2017 11:16\n */\n\nnamespace Alliance;\n\n\nuse DBAL\\db_mysql;\nuse Player\\RecordPlayer;\n\n"
},
{
"path": "classes/Alliance/AllianceTitle.php",
"chars": 2362,
"preview": "<?php\n/**\n * Created by Gorlum 28.11.2017 7:14\n */\n\nnamespace Alliance;\n\n/**\n * Class AllianceTitle\n *\n * Alliance title"
},
{
"path": "classes/Alliance/AllianceTitleList.php",
"chars": 2453,
"preview": "<?php\n/**\n * Created by Gorlum 28.11.2017 7:15\n */\n\nnamespace Alliance;\n\n\nclass AllianceTitleList {\n\n /**\n * @var All"
},
{
"path": "classes/Alliance/DBStaticAlly.php",
"chars": 10860,
"preview": "<?php\n\nnamespace Alliance;\n\nuse classLocale;\nuse mysqli_result;\n\nclass DBStaticAlly {\n\n// ALLY *************************"
},
{
"path": "classes/Alliance/RecordAlliance.php",
"chars": 2708,
"preview": "<?php\n/**\n * Created by Gorlum 15.06.2017 10:37\n */\n\nnamespace Alliance;\n\n\nuse DBAL\\ActiveRecord;\n\n/**\n * Class RecordAl"
},
{
"path": "classes/AuthProvider.php",
"chars": 112,
"preview": "<?php\n\n/**\n * Created by PhpStorm.\n * User: Gorlum\n * Date: 24.08.2015\n * Time: 6:00\n */\nclass AuthProvider {\n\n}"
},
{
"path": "classes/BBCodeParser.php",
"chars": 1753,
"preview": "<?php\n\n/**\n * Created by Gorlum 14.02.2017 11:18\n */\nclass BBCodeParser {\n\n /**\n * @var Design $design\n */\n protec"
},
{
"path": "classes/BanHammer.php",
"chars": 1762,
"preview": "<?php\n\n/** Created by Gorlum 25.02.2025 13:16 */\n\n/**\n *\n * MySQL: INET_ATON() -> string to int, INET_NTOA() -> int to s"
},
{
"path": "classes/Bonus/BonusAtom.php",
"chars": 3064,
"preview": "<?php\n/**\n * Created by Gorlum 01.12.2017 6:00\n */\n\nnamespace Bonus;\n\n/**\n * Class BonusAtom\n *\n * Info about one single"
},
{
"path": "classes/Bonus/BonusAtomAbility.php",
"chars": 344,
"preview": "<?php\n/**\n * Created by Gorlum 02.12.2017 11:59\n */\n\nnamespace Bonus;\n\n\nclass BonusAtomAbility extends BonusAtom {\n\n /*"
},
{
"path": "classes/Bonus/BonusAtomAdd.php",
"chars": 323,
"preview": "<?php\n/**\n * Created by Gorlum 02.12.2017 12:04\n */\n\nnamespace Bonus;\n\n\nclass BonusAtomAdd extends BonusAtom {\n\n /**\n "
},
{
"path": "classes/Bonus/BonusAtomMultiply.php",
"chars": 378,
"preview": "<?php\n/**\n * Created by Gorlum 02.12.2017 12:08\n */\n\nnamespace Bonus;\n\n\nclass BonusAtomMultiply extends BonusAtom {\n\n /"
},
{
"path": "classes/Bonus/BonusAtomPercent.php",
"chars": 403,
"preview": "<?php\n/**\n * Created by Gorlum 02.12.2017 12:07\n */\n\nnamespace Bonus;\n\n\nclass BonusAtomPercent extends BonusAtom {\n\n //"
},
{
"path": "classes/Bonus/BonusCatalog.php",
"chars": 1829,
"preview": "<?php\n/**\n * Created by Gorlum 01.12.2017 4:31\n */\n\nnamespace Bonus;\n\nuse Core\\GlobalContainer;\n\n/**\n * Class BonusCatal"
},
{
"path": "classes/Bonus/BonusFactory.php",
"chars": 905,
"preview": "<?php\n/**\n * Created by Gorlum 02.12.2017 11:40\n */\n\nnamespace Bonus;\n\n\n/**\n * Class BonusFactory\n *\n * Bonus factory - "
},
{
"path": "classes/Bonus/BonusListAtom.php",
"chars": 1907,
"preview": "<?php\n/**\n * Created by Gorlum 01.12.2017 5:23\n */\n\nnamespace Bonus;\n\n/**\n * Class BonusListAtom\n *\n * Lists all bonuses"
},
{
"path": "classes/Bonus/ValueBonused.php",
"chars": 2421,
"preview": "<?php\n/**\n * Created by Gorlum 01.12.2017 8:34\n */\n\nnamespace Bonus;\n\nuse \\SN;\n\nclass ValueBonused {\n\n public $base = 0"
},
{
"path": "classes/Bonus/ValueStorage.php",
"chars": 4497,
"preview": "<?php\n/**\n * Created by Gorlum 01.12.2017 6:54\n */\n\nnamespace Bonus;\n\nuse Common\\ContainerPlus;\nuse \\SN;\n\n\n/**\n * Class "
},
{
"path": "classes/Chat/Chat.php",
"chars": 28271,
"preview": "<?php\n/**\n * Created by Gorlum 13.05.2020 13:02\n */\n\nnamespace Chat;\n\n\nuse classCache;\nuse Common\\Traits\\TSingleton;\nuse"
},
{
"path": "classes/Common/AccessAccessors.php",
"chars": 3786,
"preview": "<?php\n\nnamespace Common;\n\n/**\n * Class Common\\AccessAccessors\n *\n * Support accessors for properties: getter, setter, un"
},
{
"path": "classes/Common/AccessLogged.php",
"chars": 1483,
"preview": "<?php\n/**\n * Created by Gorlum 16.06.2017 14:32\n */\n\nnamespace Common;\n\n\nuse Exception;\n\n/**\n * Class AccessLogged\n *\n *"
},
{
"path": "classes/Common/AccessLoggedAbstract.php",
"chars": 3546,
"preview": "<?php\n/**\n * Created by Gorlum 14.11.2018 0:43\n */\n\nnamespace Common;\n\n\nuse Exception;\n\nabstract class AccessLoggedAbstr"
},
{
"path": "classes/Common/AccessLoggedTranslatedV2.php",
"chars": 5970,
"preview": "<?php\n/**\n * Created by Gorlum 14.11.2018 0:27\n */\n\nnamespace Common;\n\nuse DBAL\\DbFieldDescription;\nuse DBAL\\PropertyDes"
},
{
"path": "classes/Common/AccessLoggedV2.php",
"chars": 1315,
"preview": "<?php\n/**\n * Created by Gorlum 16.06.2017 14:32\n */\n\nnamespace Common;\n\n\nuse Exception;\n\n/**\n * Class AccessLoggedV2\n *\n"
},
{
"path": "classes/Common/AccessMagic.php",
"chars": 1874,
"preview": "<?php\n\n/**\n * Created by Gorlum 30.07.2016 9:54\n */\n\nnamespace Common;\nuse Core\\GlobalContainer;\nuse \\ArrayObject;\nuse S"
},
{
"path": "classes/Common/AccessorsV2.php",
"chars": 3477,
"preview": "<?php\n/**\n * Created by Gorlum 19.08.2016 20:35\n */\n\nnamespace Common;\n\n/**\n * AccessorsV2 storage\n *\n * V2 will use mag"
},
{
"path": "classes/Common/ContainerPlus.php",
"chars": 1068,
"preview": "<?php\n\nnamespace Common;\n\nuse Common\\Pimple\\Container;\n\n/**\n * Class ContainerPlus\n *\n * Extends original container to a"
},
{
"path": "classes/Common/EmptyCountableIterator.php",
"chars": 481,
"preview": "<?php\n/**\n * Created by Gorlum 19.10.2017 15:07\n */\n\nnamespace Common;\n\nuse Common\\Interfaces\\ICountableIterator;\n\nclass"
},
{
"path": "classes/Common/Exceptions/DbalFieldInvalidException.php",
"chars": 260,
"preview": "<?php\n/**\n * Created by Gorlum 13.07.2017 17:27\n */\n\nnamespace Common\\Exceptions;\n\n\n/**\n * Class DbalFieldInvalidExcepti"
},
{
"path": "classes/Common/Exceptions/ExceptionSnLocalized.php",
"chars": 1322,
"preview": "<?php\n/**\n * Created by Gorlum 04.06.2017 15:18\n */\n\nnamespace Common\\Exceptions;\n\nuse Throwable;\n\n/**\n * Class Exceptio"
},
{
"path": "classes/Common/Hooker/Hooker.php",
"chars": 1537,
"preview": "<?php\n/**\n * Created by Gorlum 18.03.2018 16:31\n */\n\nnamespace Common\\Hooker;\n\nclass Hooker {\n /**\n * @var Pimp $pimp"
},
{
"path": "classes/Common/Hooker/Pimp.php",
"chars": 1258,
"preview": "<?php\n/**\n * Created by Gorlum 18.03.2018 16:27\n */\n\nnamespace Common\\Hooker;\n\nuse Core\\GlobalContainer;\n\n/**\n * Class P"
},
{
"path": "classes/Common/Interfaces/IContainer.php",
"chars": 686,
"preview": "<?php\n\nnamespace Common\\Interfaces;\n/**\n * Created by Gorlum 09.02.2017 11:43\n */\ninterface IContainer {\n\n /**\n * @pa"
},
{
"path": "classes/Common/Interfaces/ICountableIterator.php",
"chars": 148,
"preview": "<?php\n/**\n * Created by Gorlum 19.10.2017 15:01\n */\n\nnamespace Common\\Interfaces;\n\n\ninterface ICountableIterator extends"
},
{
"path": "classes/Common/Invoker.php",
"chars": 1091,
"preview": "<?php\n/**\n * Created by Gorlum 21.08.2016 13:33\n */\n\nnamespace Common;\n\n/**\n * Class Invoker\n *\n * Invoker incapsulates "
},
{
"path": "classes/Common/NullContainer.php",
"chars": 566,
"preview": "<?php\n/**\n * Created by Gorlum 08.01.2018 15:31\n */\n\nnamespace Common;\n\nuse Core\\Singleton;\n\nclass NullContainer extends"
},
{
"path": "classes/Common/OutcomeManager.php",
"chars": 2943,
"preview": "<?php\n/**\n * Created by Gorlum 17.02.2018 23:55\n */\n\nnamespace Common;\n\n/**\n * Class OutcomeManager\n *\n * Manage outcome"
},
{
"path": "classes/Common/Pimple/Container.php",
"chars": 8743,
"preview": "<?php\n\n/*\n * This file is part of Pimple.\n *\n * Copyright (c) 2009 Fabien Potencier\n *\n * Permission is hereby granted, "
},
{
"path": "classes/Common/Pimple/ServiceProviderInterface.php",
"chars": 1626,
"preview": "<?php\n\n/*\n * This file is part of Pimple.\n *\n * Copyright (c) 2009 Fabien Potencier\n *\n * Permission is hereby granted, "
},
{
"path": "classes/Common/Tools/VersionCheckerDeprecated.php",
"chars": 3480,
"preview": "<?php\n/**\n * Created by Gorlum 01.10.2017 13:12\n */\n\nnamespace Common\\Tools;\n\nuse \\classConfig;\nuse \\SN;\n\nclass VersionC"
},
{
"path": "classes/Common/Traits/TContainer.php",
"chars": 1582,
"preview": "<?php\n/**\n * Created by Gorlum 08.01.2018 15:16\n */\n\nnamespace Common\\Traits;\n\nuse Common\\Interfaces\\IContainer;\n\ntrait "
},
{
"path": "classes/Common/Traits/TJsonSerializable.php",
"chars": 772,
"preview": "<?php\n/**\n * Created by Gorlum 12.10.2017 13:20\n */\n\nnamespace Common\\Traits;\n\n\ntrait TJsonSerializable {\n\n /**\n * @p"
},
{
"path": "classes/Common/Traits/TSingleton.php",
"chars": 304,
"preview": "<?php\n/**\n * Created by Gorlum 03.09.2019 1:26\n */\n\nnamespace Common\\Traits;\n\n\ntrait TSingleton {\n\n private static $_me"
},
{
"path": "classes/Common/Vector.php",
"chars": 6181,
"preview": "<?php\n\nnamespace Common;\n\nuse classConfig;\n\nclass Vector {\n\n const READ_VECTOR = 'readVector';\n const READ_PARAMS_FLEE"
},
{
"path": "classes/Common/oldArrayAccessNd.php",
"chars": 5347,
"preview": "<?php\n\nnamespace Common;\nuse ArrayAccess;\n\n/**\n * Класс упрощает операции с многомерными индексами для ArrayAccess - ста"
},
{
"path": "classes/Confirmation.php",
"chars": 2740,
"preview": "<?php\n\nuse DBAL\\db_mysql;\n\n/**\n * User: Gorlum\n * Date: 17.09.2015\n * Time: 14:11\n */\nclass Confirmation {\n\n /**\n * @"
},
{
"path": "classes/Core/Autoloader.php",
"chars": 2806,
"preview": "<?php\n/**\n * Created by Gorlum 18.06.2017 13:24\n */\n\nnamespace Core;\n\n/**\n * Class Autoloader\n *\n * One of core class to"
},
{
"path": "classes/Core/Crypto.php",
"chars": 676,
"preview": "<?php\n/**\n * Created by Gorlum 13.02.2020 11:49\n */\n\nnamespace Core;\n\n/**\n * Cryptography & signature-related tools\n *\n "
},
{
"path": "classes/Core/Entity.php",
"chars": 250,
"preview": "<?php\n/**\n * Created by Gorlum 08.01.2018 14:47\n */\n\nnamespace Core;\n\n/**\n * Class Entity\n *\n * Represents base in-game "
},
{
"path": "classes/Core/EntityDb.php",
"chars": 5204,
"preview": "<?php\n/**\n * Created by Gorlum 08.01.2018 14:46\n */\n\nnamespace Core;\n\n\nuse Common\\Interfaces\\IContainer;\nuse DBAL\\db_mys"
},
{
"path": "classes/Core/GlobalContainer.php",
"chars": 8652,
"preview": "<?php\n\nnamespace Core;\n\nuse BBCodeParser;\nuse Bonus\\BonusCatalog;\nuse Bonus\\ValueStorage;\nuse classCache;\nuse classConfi"
},
{
"path": "classes/Core/HttpRequest.php",
"chars": 540,
"preview": "<?php\n/**\n * Created by Gorlum 13.02.2020 10:28\n */\n\nnamespace Core;\n\nclass HttpRequest {\n const REQUEST_GET = 'GET';\n "
},
{
"path": "classes/Core/HttpUrl.php",
"chars": 6193,
"preview": "<?php\n/**\n * Created by Gorlum 13.02.2020 10:46\n */\n\nnamespace Core;\n\n\nclass HttpUrl {\n const SCHEME_HTTPS = 'https';\n "
},
{
"path": "classes/Core/RepoV2.php",
"chars": 6838,
"preview": "<?php\n/**\n * Created by Gorlum 21.04.2018 16:13\n */\n\nnamespace Core;\n\nuse Common\\Interfaces\\IContainer;\nuse DBAL\\db_mysq"
},
{
"path": "classes/Core/Repository.php",
"chars": 1833,
"preview": "<?php\n\n/**\n * Created by Gorlum 10.02.2017 0:07\n */\n\nnamespace Core;\n\nuse \\Common\\ContainerPlus;\nuse Core\\GlobalContaine"
},
{
"path": "classes/Core/Scheduler/Lock.php",
"chars": 4517,
"preview": "<?php\n/**\n * Created by Gorlum 08.02.2020 16:42\n */\n\nnamespace Core\\Scheduler;\n\nuse classConfig;\nuse Core\\GlobalContaine"
},
{
"path": "classes/Core/Scheduler/TaskConditional.php",
"chars": 3241,
"preview": "<?php\n/**\n * Created by Gorlum 08.02.2020 15:31\n */\n\nnamespace Core\\Scheduler;\n\nuse DBAL\\db_mysql;\nuse Core\\GlobalContai"
},
{
"path": "classes/Core/Scheduler/TaskPeriodic.php",
"chars": 780,
"preview": "<?php\n/**\n * Created by Gorlum 08.02.2020 15:44\n */\n\nnamespace Core\\Scheduler;\n\nuse classConfig;\n\n/**\n * Periodic task -"
},
{
"path": "classes/Core/Scheduler/Watchdog.php",
"chars": 2003,
"preview": "<?php\n/**\n * Created by Gorlum 15.06.2017 5:07\n */\n\nnamespace Core\\Scheduler;\n\nuse Exception;\nuse classConfig;\nuse Core\\"
},
{
"path": "classes/Core/Singleton.php",
"chars": 286,
"preview": "<?php\n/**\n * Created by Gorlum 08.01.2018 15:33\n */\n\nnamespace Core;\n\n\nclass Singleton {\n\n private static $_singleton;\n"
},
{
"path": "classes/Core/SnBootstrap.php",
"chars": 6693,
"preview": "<?php\n/**\n * Created by Gorlum 11.06.2017 9:58\n */\n\nnamespace Core;\n\n\nuse core_auth;\nuse DBAL\\db_mysql;\nuse \\SN;\n\nclass "
},
{
"path": "classes/Core/SnPimp.php",
"chars": 3859,
"preview": "<?php\n/**\n * Created by Gorlum 18.03.2018 17:53\n */\n\nnamespace Core;\n\n\nuse Common\\Hooker\\Pimp;\nuse Exception;\nuse Meta\\E"
},
{
"path": "classes/Core/StorageV2.php",
"chars": 528,
"preview": "<?php\n/**\n * Created by Gorlum 21.04.2018 16:13\n */\n\nnamespace Core;\n\n\nuse DBAL\\db_mysql;\n\nclass StorageV2 {\n\n /**\n *"
},
{
"path": "classes/Core/Updater.php",
"chars": 11272,
"preview": "<?php /** @noinspection PhpUnnecessaryCurlyVarSyntaxInspection */\n\n/**\n * Created by Gorlum 01.03.2019 6:03\n */\n\nnamespa"
},
{
"path": "classes/Core/Worker.php",
"chars": 1277,
"preview": "<?php\n/**\n * Created by Gorlum 18.02.2020 15:23\n */\n\nnamespace Core;\n\nclass Worker {\n /**\n * @var GlobalContainer $gc"
},
{
"path": "classes/DBAL/ActiveRecord.php",
"chars": 249,
"preview": "<?php\n/**\n * Created by Gorlum 12.06.2017 14:41\n */\n\nnamespace DBAL;\n\n/**\n * Class ActiveRecord\n *\n * Represent table in"
},
{
"path": "classes/DBAL/ActiveRecordAbstract.php",
"chars": 14593,
"preview": "<?php\n/**\n * Created by Gorlum 12.07.2017 10:27\n */\n\nnamespace DBAL;\n\nuse Common\\AccessLogged;\nuse Core\\GlobalContainer;"
},
{
"path": "classes/DBAL/ActiveRecordAbstractIndexed.php",
"chars": 3614,
"preview": "<?php\n/**\n * Created by Gorlum 04.10.2017 8:23\n */\n\nnamespace DBAL;\n\n/**\n * Class ActiveRecordAbstractIndexed\n * @packag"
},
{
"path": "classes/DBAL/DbAbstractResultIterator.php",
"chars": 1866,
"preview": "<?php\n/**\n * Created by Gorlum 25.11.2017 20:02\n */\n\nnamespace DBAL;\n\nuse \\mysqli_result;\nuse Common\\Interfaces\\ICountab"
},
{
"path": "classes/DBAL/DbFieldDescription.php",
"chars": 1344,
"preview": "<?php\n/**\n * Created by Gorlum 04.10.2017 8:55\n */\n\nnamespace DBAL;\n\n/**\n * Class DbFieldDescription\n * @package DBAL\n *"
},
{
"path": "classes/DBAL/DbIndexDescription.php",
"chars": 2496,
"preview": "<?php\n/**\n * Created by Gorlum 04.10.2017 8:55\n */\n\nnamespace DBAL;\n\n/**\n * Class DbIndexDescription\n * @package DBAL\n *"
},
{
"path": "classes/DBAL/DbIndexField.php",
"chars": 1926,
"preview": "<?php\n/**\n * Created by Gorlum 01.03.2019 9:06\n */\n\nnamespace DBAL;\n\nclass DbIndexField {\n public $Column_name; // Colu"
},
{
"path": "classes/DBAL/DbMysqliResultIterator.php",
"chars": 531,
"preview": "<?php\n/**\n * Created by Gorlum 17.10.2017 10:48\n */\n\nnamespace DBAL;\n\nuse \\mysqli_result;\n\n/**\n * Class DbMysqliResultIt"
},
{
"path": "classes/DBAL/DbQuery.php",
"chars": 13218,
"preview": "<?php\n/**\n * Created by Gorlum 07.08.2016 2:36\n */\n\nnamespace DBAL;\n\nuse \\HelperArray;\nuse DBAL\\db_mysql;\nuse \\SN;\n\n/**\n"
},
{
"path": "classes/DBAL/DbSqlPaging.php",
"chars": 3154,
"preview": "<?php\n/**\n * Created by Gorlum 25.11.2017 18:49\n */\n\nnamespace DBAL;\n\nuse mysqli_result;\n\n/**\n * Class DbSqlPaging\n *\n *"
},
{
"path": "classes/DBAL/OldDbChangeSet.php",
"chars": 7126,
"preview": "<?php\n\n/**\n * Created by Gorlum 03.03.2017 22:32\n */\n\nnamespace DBAL;\n\nuse SN;\nuse Unit\\DBStaticUnit;\n\n/**\n * Class DBAL"
},
{
"path": "classes/DBAL/PropertyDescription.php",
"chars": 5738,
"preview": "<?php\n/**\n * Created by Gorlum 13.11.2018 15:50\n */\n\nnamespace DBAL;\n\n/**\n * Class PropertyDescription\n *\n * @package DB"
},
{
"path": "classes/DBAL/RecordV2.php",
"chars": 6650,
"preview": "<?php\n/**\n * Created by Gorlum 13.11.2018 14:07\n */\n\nnamespace DBAL;\n\n\nuse Common\\AccessLoggedTranslatedV2;\nuse Core\\Glo"
},
{
"path": "classes/DBAL/RecordV3.php",
"chars": 451,
"preview": "<?php\n/** Created by Gorlum 23.10.2025 20:24 */\n\nnamespace DBAL;\n\nclass RecordV3 {\n\n /**\n * @param array|object $data"
},
{
"path": "classes/DBAL/Schema.php",
"chars": 2767,
"preview": "<?php\n/**\n * Created by Gorlum 12.06.2017 15:29\n */\n\nnamespace DBAL;\n\n\nclass Schema {\n /**\n * @var db_mysql $db\n */"
},
{
"path": "classes/DBAL/StorageSqlV2.php",
"chars": 3615,
"preview": "<?php\n/**\n * Created by Gorlum 13.11.2018 14:08\n */\n\nnamespace DBAL;\n\n\nuse Core\\GlobalContainer;\nuse SN;\n\nclass StorageS"
},
{
"path": "classes/DBAL/TableSchema.php",
"chars": 1151,
"preview": "<?php\n/**\n * Created by Gorlum 19.06.2017 15:21\n */\n\nnamespace DBAL;\n\n\nclass TableSchema {\n\n /**\n * @var \\DBAL\\db_mys"
},
{
"path": "classes/DBAL/db_mysql.php",
"chars": 23999,
"preview": "<?php /** @noinspection PhpRedundantOptionalArgumentInspection */\n\n/** @noinspection PhpDeprecationInspection */\n/** @no"
},
{
"path": "classes/Design.php",
"chars": 4493,
"preview": "<?php\n\n/**\n * Created by Gorlum 15.02.2017 10:08\n */\n\nuse Core\\GlobalContainer;\n\n/**\n * Class Design\n *\n * Describes des"
},
{
"path": "classes/Fleet/Constants.php",
"chars": 1487,
"preview": "<?php\n/** Created by Gorlum 10.05.2025 23:27 */\n\nnamespace Fleet;\n\nclass Constants {\n // Mission outcome types\n /** @v"
},
{
"path": "classes/Fleet/DbFleetStatic.php",
"chars": 19656,
"preview": "<?php /** @noinspection SqlResolve */\n\n/**\n * Created by Gorlum 26.04.2018 14:00\n */\n\nnamespace Fleet;\n\nuse DBAL\\DbQuery"
},
{
"path": "classes/Fleet/Fleet.php",
"chars": 12919,
"preview": "<?php\n/**\n * Created by Gorlum 18.04.2018 16:30\n */\n\nnamespace Fleet;\n\n\nuse Core\\EntityDb;\nuse SN;\n\n/**\n * Class Fleet\n "
},
{
"path": "classes/Fleet/FleetDispatchEvent.php",
"chars": 10217,
"preview": "<?php /** @noinspection PhpUnnecessaryCurlyVarSyntaxInspection, PhpCastIsUnnecessaryInspection, PhpDeprecationInspection"
},
{
"path": "classes/Fleet/FleetDispatcher.php",
"chars": 10915,
"preview": "<?php /** @noinspection PhpUnnecessaryCurlyVarSyntaxInspection */\n/** @noinspection PhpDeprecationInspection */\n\n/**\n * "
},
{
"path": "classes/Fleet/FleetRowObject.php",
"chars": 2089,
"preview": "<?php\n/** Created by Gorlum 09.05.2025 22:39 */\n\nnamespace Fleet;\n\n/**\n * Class FleetRowObject\n * @package Fleet\n *\n * @"
},
{
"path": "classes/Fleet/FleetStatic.php",
"chars": 1418,
"preview": "<?php\n/**\n * Created by Gorlum 21.03.2018 13:27\n */\n\nnamespace Fleet;\n\nuse SN;\nuse Common\\EmptyCountableIterator;\nuse \\D"
},
{
"path": "classes/Fleet/FleetWatchdog.php",
"chars": 4135,
"preview": "<?php\n/** Created by Gorlum 27.10.2024 18:43 */\n\nnamespace Fleet;\n\nuse Core\\Scheduler\\Lock;\nuse SN;\n\nclass FleetWatchdog"
},
{
"path": "classes/Fleet/MissionData.php",
"chars": 2214,
"preview": "<?php\n/**\n * Created by Gorlum 11.10.2017 13:17\n */\n\nnamespace Fleet;\n\n\nuse Core\\GlobalContainer;\n\nclass MissionData {\n\n"
},
{
"path": "classes/Fleet/MissionEspionage.php",
"chars": 3310,
"preview": "<?php\n/**\n * Created by Gorlum 11.10.2017 13:16\n */\n\nnamespace Fleet;\n\nuse SN;\nuse Planet\\DBStaticPlanet;\n\nclass Mission"
},
{
"path": "classes/Fleet/MissionEspionageReport.php",
"chars": 6313,
"preview": "<?php\n/**\n * Created by Gorlum 12.10.2017 13:10\n */\n\nnamespace Fleet;\n\nuse Common\\Traits\\TJsonSerializable;\n\n\n/**\n * Cla"
},
{
"path": "classes/Fleet/MissionExploreResult.php",
"chars": 22959,
"preview": "<?php /** @noinspection PhpDeprecationInspection */\n\n/** Created by Gorlum 09.05.2025 18:56 */\n\nnamespace Fleet;\n\nuse SN"
},
{
"path": "classes/Fleet/RecordFleet.php",
"chars": 6793,
"preview": "<?php\n/**\n * Created by Gorlum 07.12.2017 14:38\n */\n\nnamespace Fleet;\n\n\nuse Core\\GlobalContainer;\nuse DBAL\\ActiveRecord;"
},
{
"path": "classes/Fleet/TaskDispatchFleets.php",
"chars": 1847,
"preview": "<?php\n/**\n * Created by Gorlum 08.02.2020 18:54\n */\n\nnamespace Fleet;\n\nuse Core\\GlobalContainer;\nuse Core\\HttpUrl;\nuse S"
},
{
"path": "classes/General/Helpers/PagingRenderer.php",
"chars": 3194,
"preview": "<?php\n/**\n * Created by Gorlum 25.11.2017 21:45\n */\n\nnamespace General\\Helpers;\n\nuse DBAL\\DbSqlPaging;\nuse SnTemplate;\n\n"
},
{
"path": "classes/General/Helpers/URLHelper.php",
"chars": 659,
"preview": "<?php\n/**\n * Created by Gorlum 25.11.2017 22:10\n */\n\nnamespace General\\Helpers;\n\n\nclass URLHelper {\n\n public static fun"
},
{
"path": "classes/General/LogCounterShrinker.php",
"chars": 4677,
"preview": "<?php\n/**\n * Created by Gorlum 17.10.2017 8:36\n */\n\nnamespace General;\n\nuse Core\\GlobalContainer;\nuse \\DBAL\\DbMysqliResu"
},
{
"path": "classes/General/VisitAccumulator.php",
"chars": 1288,
"preview": "<?php\n/**\n * Created by Gorlum 17.10.2017 7:28\n */\n\nnamespace General;\n\n/**\n * Class VisitAccumulator\n *\n * Class used f"
},
{
"path": "classes/General/VisitMerger.php",
"chars": 6069,
"preview": "<?php\n/**\n * Created by Gorlum 17.10.2017 10:20\n */\n\nnamespace General;\n\nuse Common\\EmptyCountableIterator;\nuse Core\\Glo"
},
{
"path": "classes/General.php",
"chars": 2110,
"preview": "<?php\n/**\n * Created by Gorlum 12.10.2017 15:19\n */\n\nuse Core\\GlobalContainer;\n\n/**\n * Class General\n *\n * Wrapper for /"
},
{
"path": "classes/HelperArray.php",
"chars": 7428,
"preview": "<?php\n\nclass HelperArray {\n\n /**\n * Overwrites old array with new\n */\n const MERGE_OVERWRITE = 0;\n /**\n * Merge"
},
{
"path": "classes/HelperString.php",
"chars": 2936,
"preview": "<?php\n\n/**\n * Created by Gorlum 12.02.2017 11:12\n */\nclass HelperString {\n\n /**\n * Encodes non-html characters in UTF"
},
{
"path": "classes/Meta/Economic/BuildDataStatic.php",
"chars": 7475,
"preview": "<?php\n/**\n * Created by Gorlum 24.03.2018 21:54\n */\n\nnamespace Meta\\Economic;\n\n\nuse SN;\n\nclass BuildDataStatic {\n\n /**\n"
},
{
"path": "classes/Meta/Economic/EconomicHelper.php",
"chars": 2311,
"preview": "<?php\n/**\n * Created by Gorlum 01.10.2017 15:07\n */\n\nnamespace Meta\\Economic;\n\nuse Core\\GlobalContainer;\n\nclass Economic"
},
{
"path": "classes/Meta/Economic/ResourceCalculations.php",
"chars": 9542,
"preview": "<?php\n/**\n * Created by Gorlum 13.10.2017 2:34\n */\n\nnamespace Meta\\Economic;\n\nuse \\SN;\n\nclass ResourceCalculations {\n /"
},
{
"path": "classes/Modules/ModulesManager.php",
"chars": 6123,
"preview": "<?php\n/**\n * Created by Gorlum 19.03.2018 19:56\n */\n\nnamespace Modules;\n\nuse Modules\\sn_module;\nuse Core\\GlobalContainer"
},
{
"path": "classes/Modules/sn_module.php",
"chars": 16300,
"preview": "<?php\n\nnamespace Modules;\n\nuse Common\\Hooker\\Pimp;\nuse Core\\Autoloader;\nuse Exception;\nuse SN;\nuse SnTemplate;\nuse templ"
},
{
"path": "classes/Note/Note.php",
"chars": 1553,
"preview": "<?php\n/**\n * Created by Gorlum 04.12.2017 5:10\n */\n\nnamespace Note;\n\nuse template;\nuse HelperString;\n\nclass Note {\n\n /*"
},
{
"path": "classes/Notification/RecordNotification.php",
"chars": 513,
"preview": "<?php\n\n/**\n * Created by Gorlum 12.06.2017 14:47\n */\n\nnamespace Notification;\n\nuse DBAL\\ActiveRecord;\n\n/**\n * Class Reco"
},
{
"path": "classes/Old/Avatar.php",
"chars": 2860,
"preview": "<?php\n/**\n * Created by Gorlum 15.08.2019 6:16\n */\n\nnamespace Old;\n\nuse Exception;\n\nclass Avatar {\n\n public static func"
},
{
"path": "classes/PTLTag.php",
"chars": 4416,
"preview": "<?php\n\n/**\n * Created by Gorlum 23.02.2017 14:34\n */\nclass PTLTag {\n\n /**Raw tag\n *\n * @var string $raw\n */\n pub"
},
{
"path": "classes/Pages/Deprecated/PageAdminMining.php",
"chars": 5137,
"preview": "<?php\n/**\n * Created by Gorlum 05.03.2018 12:57\n */\n\nnamespace Pages\\Deprecated;\n\nuse SN;\nuse DBAL\\DbSqlPaging;\nuse Gene"
},
{
"path": "classes/Pages/Deprecated/PageAdminModules.php",
"chars": 2035,
"preview": "<?php\n/**\n * Created by Gorlum 05.03.2018 12:57\n */\n\nnamespace Pages\\Deprecated;\n\nuse Modules\\sn_module;\nuse SN;\nuse SnT"
},
{
"path": "classes/Pages/Deprecated/PageAdminPayment.php",
"chars": 8155,
"preview": "<?php\n/**\n * Created by Gorlum 05.03.2018 12:57\n */\n\nnamespace Pages\\Deprecated;\n\nuse SN;\nuse DBAL\\DbSqlPaging;\nuse Gene"
},
{
"path": "classes/Pages/Deprecated/PageAdminUserView.php",
"chars": 8068,
"preview": "<?php\n/**\n * Created by Gorlum 05.03.2018 12:57\n */\n\nnamespace Pages\\Deprecated;\n\nuse Account;\nuse Planet\\DBStaticPlanet"
},
{
"path": "classes/Pages/Deprecated/PageDeprecated.php",
"chars": 1188,
"preview": "<?php\n/**\n * Created by Gorlum 08.10.2017 17:36\n */\n\nnamespace Pages\\Deprecated;\n\nuse \\template;\nuse \\ResultMessages;\n\n/"
},
{
"path": "classes/Pages/Deprecated/PageFleet5Gathering.php",
"chars": 9929,
"preview": "<?php\n/**\n * Created by Gorlum 30.09.2017 11:01\n */\n\nnamespace Pages\\Deprecated;\n\nuse DBAL\\db_mysql;\nuse Planet\\DBStatic"
},
{
"path": "classes/Pages/Deprecated/PageImperium.php",
"chars": 14522,
"preview": "<?php\n/**\n * Created by Gorlum 01.10.2017 17:53\n */\n\nnamespace Pages\\Deprecated;\n\nuse DBAL\\db_mysql;\nuse Fleet\\DbFleetSt"
},
{
"path": "classes/Pages/Deprecated/PageMercenary.php",
"chars": 12815,
"preview": "<?php\n/**\n * Created by Gorlum 30.09.2017 8:28\n */\n\nnamespace Pages\\Deprecated;\n\nuse DBAL\\db_mysql;\nuse \\Exception;\nuse "
},
{
"path": "classes/Pages/Deprecated/PageMessage.php",
"chars": 17338,
"preview": "<?php /** @noinspection PhpDeprecationInspection */\n/** @noinspection SqlIdentifier */\n/** @noinspection SqlRedundantOrd"
},
{
"path": "classes/Pages/Deprecated/PageOverview.php",
"chars": 18153,
"preview": "<?php\n/**\n * Created by Gorlum 25.01.2018 7:50\n */\n\nnamespace Pages\\Deprecated;\n\nuse DBAL\\db_mysql;\nuse Fleet\\DbFleetSta"
},
{
"path": "classes/Pages/Helpers/PageHelperAlly.php",
"chars": 2805,
"preview": "<?php\n/**\n * Created by Gorlum 19.08.2019 19:12\n */\n\nnamespace Pages\\Helpers;\n\n\nuse Alliance\\Alliance;\nuse classLocale;\n"
},
{
"path": "classes/Pages/IPage.php",
"chars": 351,
"preview": "<?php\n/**\n * Created by Gorlum 04.03.2017 16:36\n */\n\nnamespace Pages;\n\n\ninterface IPage {\n\n /**\n * IPage constructor."
},
{
"path": "classes/Pages/PageAjax.php",
"chars": 794,
"preview": "<?php\n/**\n * Created by Gorlum 04.03.2017 16:38\n */\n\nnamespace Pages;\n\nuse Player\\userOptions;\n\n/**\n * Class PageAjax\n *"
},
{
"path": "classes/Pages/PageAjaxIgnore.php",
"chars": 1215,
"preview": "<?php\n/**\n * Created by Gorlum 14.08.2019 22:41\n */\n\nnamespace Pages;\n\nuse SN;\n\nclass PageAjaxIgnore extends PageAjax {\n"
},
{
"path": "classes/Pages/PageQuest.php",
"chars": 1327,
"preview": "<?php\n/**\n * Created by Gorlum 12.02.2017 8:51\n */\n\nnamespace Pages;\n\nuse \\SN;\n\nclass PageQuest extends PageAjax {\n /**"
},
{
"path": "classes/Pages/PageTutorial.php",
"chars": 3834,
"preview": "<?php\n/**\n * Created by Gorlum 12.02.2017 8:51\n */\n\nnamespace Pages;\n\nuse \\SN;\nuse Player\\userOptions;\n\nclass PageTutori"
},
{
"path": "classes/Payment/PaymentMethods.php",
"chars": 16981,
"preview": "<?php\n/**\n * Created by Gorlum 21.08.2019 11:53\n */\n\nnamespace Payment;\n\nuse SN;\nuse sn_module_payment;\n\nclass PaymentMe"
},
{
"path": "classes/Payment/PaymentsMethodsActive.php",
"chars": 5761,
"preview": "<?php\n/**\n * Created by Gorlum 22.08.2019 3:38\n */\n\nnamespace Payment;\n\n\nuse HelperArray;\nuse SN;\nuse sn_module_payment;"
}
]
// ... and 614 more files (download for full content)
About this extraction
This page contains the full source code of the supernova-ws/SuperNova GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 814 files (6.7 MB), approximately 1.8M tokens, and a symbol index with 2621 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.