Browse Source

initial commit

pull/13/head
lopar 5 years ago
commit
46c75d1542
  1. 10
      .idea/battles-game.iml
  2. 9
      .idea/composerJson.xml
  3. 8
      .idea/modules.xml
  4. 6
      .idea/vcs.xml
  5. 280
      .idea/workspace.xml
  6. 1170
      11city.php
  7. 11
      Database/Exception.php
  8. 1040
      Database/Mysql.php
  9. 167
      Database/Statement.php
  10. 31
      Database/db.php
  11. 29
      README.md
  12. 147
      __modules/clan_modules/kazna.php
  13. 117
      __modules/clan_modules/main.php
  14. 105
      __modules/clan_panel.php
  15. 193
      add_me.php
  16. 126
      add_novyj_shmot.php
  17. 1009
      admin.php
  18. 279
      ahero_shop.php
  19. 55
      ajax/change_login.php
  20. 18
      ajax/clan_log.php
  21. 94
      ajax/downgrade_art.php
  22. 339
      ajax/fontan_luck.php
  23. 22
      ajax/rate_ruins.php
  24. 95
      ajax/update_art.php
  25. 0
      ajax_hostel.php
  26. 206
      akadem.php
  27. 214
      aren_of_angels.php
  28. 214
      aren_of_angels2.php
  29. 379
      ashop.php
  30. 1
      backup/logs/battle3259.txt
  31. 1
      backup/logs/battle3260.txt
  32. 1
      backup/logs/battle3261.txt
  33. 1
      backup/logs/battle3262.txt
  34. 1
      backup/logs/battle3263.txt
  35. 1
      backup/logs/battle3264.txt
  36. 1
      backup/logs/battle3265.txt
  37. 43
      bank.balans.php
  38. 912
      bank.php
  39. 10
      bankekr.php
  40. 275
      battle.php
  41. 45
      bench.php
  42. 28
      bench_m.php
  43. 45
      bench_s.php
  44. 71
      blocknote.php
  45. 9
      blog.log
  46. 867
      boloto.php
  47. 268
      boloto_vxod.php
  48. 0
      bots_razmen.php
  49. 1
      bottom.html
  50. 101
      bt.php
  51. 0
      buttons.html
  52. 984
      buttons.php
  53. 120
      c_forest.php
  54. 279
      c_haos.php
  55. 432
      c_haos_in.php
  56. 249
      c_park.php
  57. 788
      canalizaciya.php
  58. 195
      canalization_mod.php
  59. 1405
      cave.php
  60. 21
      cave/cave_bots.php
  61. 12
      cave/caveitems.php
  62. 22
      cave/lose.php
  63. 66
      cave/win.php
  64. 5
      cavedata.php
  65. 1
      cavedata/0-.dat
  66. 1
      cavedata/10019-1.dat
  67. 1
      cavedata/10019-2.dat
  68. 1
      cavedata/10019-3.dat
  69. 1
      cavedata/10019-4.dat
  70. 1
      cavedata/10022-.dat
  71. 1
      cavedata/10022-1.dat
  72. 1
      cavedata/10022-2.dat
  73. 1
      cavedata/10022-3.dat
  74. 1
      cavedata/10022-4.dat
  75. 1
      cavedata/10029-1.dat
  76. 1
      cavedata/10029-2.dat
  77. 1
      cavedata/10029-3.dat
  78. 1
      cavedata/10029-4.dat
  79. 1
      cavedata/10035-1.dat
  80. 1
      cavedata/10035-2.dat
  81. 1
      cavedata/10035-3.dat
  82. 1
      cavedata/10035-4.dat
  83. 1
      cavedata/10036-1.dat
  84. 1
      cavedata/10038-1.dat
  85. 1
      cavedata/10038-2.dat
  86. 1
      cavedata/10038-3.dat
  87. 1
      cavedata/10038-4.dat
  88. 1
      cavedata/10041-1.dat
  89. 1
      cavedata/10041-2.dat
  90. 1
      cavedata/10041-3.dat
  91. 1
      cavedata/10041-4.dat
  92. 1
      cavedata/10044-1.dat
  93. 1
      cavedata/10044-2.dat
  94. 1
      cavedata/10044-3.dat
  95. 1
      cavedata/10044-4.dat
  96. 1
      cavedata/10045-1.dat
  97. 1
      cavedata/10045-2.dat
  98. 1
      cavedata/10045-3.dat
  99. 1
      cavedata/10045-4.dat
  100. 1
      cavedata/10046-1.dat
  101. Some files were not shown because too many files have changed in this diff Show More

10
.idea/battles-game.iml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

9
.idea/composerJson.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ComposerJsonPluginSettings">
<unboundedVersionInspectionSettings>
<excludedPackages />
</unboundedVersionInspectionSettings>
<customRepositories />
</component>
</project>

8
.idea/modules.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/battles-game.iml" filepath="$PROJECT_DIR$/.idea/battles-game.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

280
.idea/workspace.xml

@ -0,0 +1,280 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="099ac1fa-d110-4265-9475-c5ca8779a3f9" name="Default" comment="" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-7" />
<option name="y" value="30" />
<option name="width" value="1094" />
<option name="height" value="1017" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="battles-game" type="b2602c69:ProjectViewProjectNode" />
<item name="battles-game" type="2a2b976b:PhpTreeStructureProvider$1" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scratches" />
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="C:/Program Files/Git/bin/git.exe" />
<property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="099ac1fa-d110-4265-9475-c5ca8779a3f9" name="Default" comment="" />
<created>1517154442513</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1517154442513</updated>
<workItem from="1517155484792" duration="987000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="987000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1696" height="1026" extended-state="6" />
<layout>
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32969433" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<ignored-roots>
<path value="$PROJECT_DIR$" />
</ignored-roots>
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/11city.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<marker date="1517151066611" expanded="true" signature="149:212" ph="SELECT * FRO... users" />
<marker date="1517151066611" expanded="true" signature="256:316" ph="SELECT * FRO... clans" />
<marker date="1517151066611" expanded="true" signature="362:426" ph="SELECT * FRO... digger" />
<marker date="1517151066611" expanded="true" signature="691:772" ph="SELECT `id`,... cit_haos_status" />
<marker date="1517151066611" expanded="true" signature="917:1009" ph="SELECT `id`,... digger" />
<marker date="1517151066611" expanded="true" signature="1201:1315" ph="SELECT SUM(`... inventory" />
<marker date="1517151066611" expanded="true" signature="1546:1630" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="1847:1948" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="2355:2439" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="2660:2761" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="2978:3126" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="4016:4100" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="4312:4413" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="4626:4774" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="5246:5351" ph="..." />
<marker date="1517151066611" expanded="true" signature="5268:5306" ph="{...}" />
<marker date="1517151066611" expanded="true" signature="5363:5464" ph="..." />
<marker date="1517151066611" expanded="true" signature="5707:5791" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="6006:6107" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="6325:6473" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="6950:7055" ph="..." />
<marker date="1517151066611" expanded="true" signature="6972:7010" ph="{...}" />
<marker date="1517151066611" expanded="true" signature="7067:7171" ph="..." />
<marker date="1517151066611" expanded="true" signature="7440:7524" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="7741:7842" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="8063:8215" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="8671:8776" ph="..." />
<marker date="1517151066611" expanded="true" signature="8693:8731" ph="{...}" />
<marker date="1517151066611" expanded="true" signature="8788:8886" ph="..." />
<marker date="1517151066611" expanded="true" signature="9157:9241" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="9460:9561" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="9785:9937" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="10419:10524" ph="..." />
<marker date="1517151066611" expanded="true" signature="10441:10479" ph="{...}" />
<marker date="1517151066611" expanded="true" signature="10536:10627" ph="..." />
<marker date="1517151066611" expanded="true" signature="10892:10976" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="11188:11289" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="11503:11651" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="12072:12177" ph="..." />
<marker date="1517151066611" expanded="true" signature="12094:12132" ph="{...}" />
<marker date="1517151066611" expanded="true" signature="12189:12285" ph="..." />
<marker date="1517151066611" expanded="true" signature="12560:12644" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="12860:12961" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="13181:13333" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="13755:13860" ph="..." />
<marker date="1517151066611" expanded="true" signature="13777:13815" ph="{...}" />
<marker date="1517151066611" expanded="true" signature="13872:13968" ph="..." />
<marker date="1517151066611" expanded="true" signature="14241:14325" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="14541:14642" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="14862:15014" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="15436:15541" ph="..." />
<marker date="1517151066611" expanded="true" signature="15458:15496" ph="{...}" />
<marker date="1517151066611" expanded="true" signature="15553:15646" ph="..." />
<marker date="1517151066611" expanded="true" signature="16511:16659" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="16771:16919" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="16970:17055" ph="update `user... " />
<marker date="1517151066611" expanded="true" signature="17170:17318" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="17421:17569" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="18665:18813" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="19045:19193" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="19563:19711" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="20298:20446" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="20681:20829" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="20880:20965" ph="update `user... " />
<marker date="1517151066611" expanded="true" signature="21166:21250" ph="SELECT `id` effects" />
<marker date="1517151066611" expanded="true" signature="21397:21545" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="21742:21890" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="22801:22953" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="23387:23537" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="23661:23811" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="23904:24054" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="24396:24544" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="24676:24824" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="25019:25169" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="25432:25580" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="25831:25983" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="26284:26436" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="26817:26967" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="27476:27626" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="27986:28138" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="28241:28393" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="28577:28725" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="29078:29228" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="29543:29632" ph="update `user... " />
<marker date="1517151066611" expanded="true" signature="29758:29906" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="30022:30172" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="30286:30436" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="30557:30707" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="30838:30988" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="31320:31470" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="31695:31847" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="32001:32149" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="33354:33415" ph="SELECT * FRO... online" />
<marker date="1517151066611" expanded="true" signature="35345:35406" ph="..." />
<marker date="1517151066611" expanded="true" signature="35408:35666" ph="..." />
<marker date="1517151066611" expanded="true" signature="35593:35660" ph="..." />
<marker date="1517151066611" expanded="true" signature="36076:36137" ph="..." />
<marker date="1517151066611" expanded="true" signature="36139:36397" ph="..." />
<marker date="1517151066611" expanded="true" signature="36324:36391" ph="..." />
<marker date="1517151066611" expanded="true" signature="36953:36988" ph="..." />
<marker date="1517151066611" expanded="true" signature="39788:39823" ph="..." />
<marker date="1517151066611" expanded="true" signature="41822:41857" ph="..." />
<marker date="1517151066611" expanded="true" signature="44083:44118" ph="..." />
<marker date="1517151066611" expanded="true" signature="46023:46058" ph="..." />
<marker date="1517151066611" expanded="true" signature="47195:47230" ph="..." />
<marker date="1517151066611" expanded="true" signature="48785:48842" ph="SELECT `boch... users" />
<marker date="1517151066611" expanded="true" signature="48926:48996" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="49118:49188" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="49391:49400" ph="..." />
<marker date="1517151066611" expanded="true" signature="49439:49448" ph="..." />
<marker date="1517151066611" expanded="true" signature="49560:49652" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="49767:49776" ph="..." />
<marker date="1517151066611" expanded="true" signature="49888:49980" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="50089:50098" ph="..." />
<marker date="1517151066611" expanded="true" signature="50137:50146" ph="..." />
<marker date="1517151066611" expanded="true" signature="50257:50348" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="50549:50558" ph="..." />
<marker date="1517151066611" expanded="true" signature="50597:50606" ph="..." />
<marker date="1517151066611" expanded="true" signature="50750:50888" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="50968:50977" ph="..." />
<marker date="1517151066611" expanded="true" signature="51016:51025" ph="..." />
<marker date="1517151066611" expanded="true" signature="51151:51287" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="51384:51393" ph="..." />
<marker date="1517151066611" expanded="true" signature="51432:51441" ph="..." />
<marker date="1517151066611" expanded="true" signature="51575:51711" ph="UPDATE `user... " />
<marker date="1517151066611" expanded="true" signature="51904:51913" ph="..." />
<marker date="1517151066611" expanded="true" signature="51952:51961" ph="..." />
<marker date="1517151066611" expanded="true" signature="52077:52337" ph="INSERT INTO `inventory`... " />
<marker date="1517151066611" expanded="true" signature="52441:52450" ph="..." />
<marker date="1517151066611" expanded="true" signature="52489:52498" ph="..." />
<marker date="1517151066611" expanded="true" signature="52679:52688" ph="..." />
<marker date="1517151066611" expanded="true" signature="52727:52736" ph="..." />
<marker date="1517151066611" expanded="true" signature="52900:52909" ph="..." />
<marker date="1517151066611" expanded="true" signature="52948:52957" ph="..." />
<marker date="1517151066611" expanded="true" signature="53795:53830" ph="..." />
<marker date="1517151066611" expanded="true" signature="54808:54843" ph="..." />
</folding>
</state>
</provider>
</entry>
</component>
</project>

1170
11city.php

File diff suppressed because it is too large Load Diff

11
Database/Exception.php

@ -0,0 +1,11 @@
<?php
/**
* @author Vasiliy Makogon, makogon-vs@yandex.ru
* @link https://github.com/Vasiliy-Makogon/Database/
*/
namespace Krugozor\Database\Mysql;
class Exception extends \Exception
{
}

1040
Database/Mysql.php

File diff suppressed because it is too large Load Diff

167
Database/Statement.php

@ -0,0 +1,167 @@
<?php
/**
* @author Vasiliy Makogon, makogon-vs@yandex.ru
* @link https://github.com/Vasiliy-Makogon/Database/
*
* Обёртка над объектом mysqli_result.
*/
namespace Krugozor\Database\Mysql;
class Statement
{
/**
* Рузультат SQL-операции в виде объекта mysqli_result.
*
* @var mysqli_result
*/
private $mysqli_result = null;
/**
* @param mysqli_result
*/
public function __construct(\mysqli_result $mysqli_result)
{
$this->mysqli_result = $mysqli_result;
}
/**
* Извлекает результирующий ряд в виде ассоциативного массива.
*
* @see mysqli_fetch_assoc
* @param void
* @return array
*/
public function fetch_assoc()
{
return mysqli_fetch_assoc($this->mysqli_result);
}
/**
* Извлекает результирующий ряд в виде массива.
*
* @see mysqli_fetch_row
* @param void
* @return array
*/
public function fetch_row()
{
return mysqli_fetch_row($this->mysqli_result);
}
/**
* Извлекает результирующий ряд в виде объекта.
*
* @see mysqli_fetch_object
* @param void
* @return stdClass
*/
public function fetch_object()
{
return mysqli_fetch_object($this->mysqli_result);
}
/**
* Возвращает результат в виде массива ассоциативных массивов.
*
* @param void
* @return array
*/
public function fetch_assoc_array()
{
$array = array();
while ($row = mysqli_fetch_assoc($this->mysqli_result)) {
$array[] = $row;
}
return $array;
}
/**
* Возвращает результат в виде массива массивов.
*
* @param void
* @return array
*/
public function fetch_row_array()
{
$array = array();
while ($row = mysqli_fetch_row($this->mysqli_result)) {
$array[] = $row;
}
return $array;
}
/**
* Возвращает результат в виде массива объектов.
*
* @param void
* @return array
*/
public function fetch_object_array()
{
$array = array();
while ($row = mysqli_fetch_object($this->mysqli_result)) {
$array[] = $row;
}
return $array;
}
/**
* Возвращает значение первого поля результирующей таблицы.
*
* @param void
* @return string
*/
public function getOne()
{
$row = mysqli_fetch_row($this->mysqli_result);
return $row[0];
}
/**
* Возвращает количество рядов в результате.
* Эта команда верна только для операторов SELECT.
*
* @see mysqli_num_rows
* @param void
* @return int
*/
public function getNumRows()
{
return mysqli_num_rows($this->mysqli_result);
}
/**
* Возвращает объект результата mysqli_result.
*
* @param void
* @return mysqli_result
*/
public function getResult()
{
return $this->mysqli_result;
}
/**
* Освобождает память занятую результатами запроса.
*
* @param void
* @return void
*/
public function free()
{
$this->mysqli_result->free();
}
public function __destruct()
{
$this->free();
}
}

31
Database/db.php

@ -0,0 +1,31 @@
<?php
/**
* Created by PhpStorm.
* User: lopiu
* Date: 28.01.2018
* Time: 16:35
*/
class db
{
private static $_instance = null;
private function __clone() {}
private function __construct() {}
/**
* @return \Krugozor\Database\Mysql\Mysql
*/
public static function c()
{
if (!self::$_instance)
{
self::$_instance = Krugozor\Database\Mysql\Mysql::create("192.168.20.100", "combats_full", "JuUn1hWq4J")
// Выбор базы данных
->setDatabaseName("combats_game")
// Выбор кодировки
->setCharset("utf8");
}
return self::$_instance;
}
}

29
README.md

@ -0,0 +1,29 @@
# README #
This README would normally document whatever steps are necessary to get your application up and running.
### What is this repository for? ###
* Quick summary
* Version
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
### How do I get set up? ###
* Summary of set up
* Configuration
* Dependencies
* Database configuration
* How to run tests
* Deployment instructions
### Contribution guidelines ###
* Writing tests
* Code review
* Other guidelines
### Who do I talk to? ###
* Repo owner or admin
* Other community or team contact

147
__modules/clan_modules/kazna.php

@ -0,0 +1,147 @@
<?
session_start();
if(!isset($_SESSION['uid'])) { header('Location: ../../index.php'); exit(); }
include('../../config.php');
include('../../functions.php');
if($user['klan'] == '') { header('Location: ../../main.php'); exit(); }
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `money`, `ekr`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$user['klan'].'" LIMIT 1'));
$err = '';
if($user['clan_prava'] != 'glava') {
$utitl = mysql_fetch_array(mysql_query('SELECT * FROM `clan_tituls` WHERE `id` = "'.$user['clan_prava'].'" LIMIT 1'));
if(!isset($utitl['id'])) {
$utitl = mysql_fetch_array(mysql_query('SELECT * FROM `clan_tituls` WHERE `id` = 2 LIMIT 1'));
}
} else {
$utitl = mysql_fetch_array(mysql_query('SELECT * FROM `clan_tituls` WHERE `id` = 1 LIMIT 1'));
}
if(isset($utitl['id'])) {
$i = 1;
while($i < count($clan_acces)) {
if($utitl['prava'][$i] > 0) {
$clan_acces[$i][0] = 1;
}
$i++;
}
}
if($_GET['addcredits']) {
if($clan_acces[7][0] == 1) {
if($user['money'] >= $_GET['sums'] && $_GET['sums'] > 0) {
if(isset($_GET['comment']) && $_GET['comment'] != '') {
$user['money'] -= (int)$_GET['sums'];
$clan['money'] += (int)$_GET['sums'];
$text = mysql_real_escape_string(iconv("utf-8", "utf-8", $_GET['comment']));
mysql_query('UPDATE `users` SET `money` = "'.$user['money'].'" WHERE `id` = "'.$user['id'].'" LIMIT 1');
mysql_query('UPDATE `clans` SET `money` = "'.$clan['money'].'" WHERE `id` = "'.$clan['id'].'" LIMIT 1');
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"".$user['login']."\" Пополнил казну клана: ($clan[name] / $clan[id]) на сумму: ".(int)$_GET['sums']." кр. С пометкой : $text', '1', '".time()."')");
mysql_query('INSERT INTO `clan_log` (`clan_id`, `user_id`, `time`, `type`, `suma`, `comment`) VALUES ("'.$clan['id'].'", "'.$user['id'].'", "'.time().'", "1", "'.(int)$_GET['sums'].'", "'.$text.'")');
$err = '<b style="color: Red;">Казна пополненна на '.(int)$_GET['sums'].' кр.</b>';
} else {
$err = '<b style="color: Red;">Введите комментарий</b>';
}
} elseif($_GET['sums'] <= 0) {
$err = '<b style="color: Red;">Введите сумму</b>';
} else {
$err = '<b style="color: Red;">Недостаточно средств</b>';
}
} else {
$err = '<b style="color: Red;">У Вас нет прав на выполнение данной операции</b>';
}
}
if($_GET['addecredits']) {
if($clan_acces[7][0] == 1) {
if(isset($banks['id'])) {
if($banks['ekr'] >= (int)$_GET['sums'] && $_GET['sums'] > 0) {
if(isset($_GET['comment']) && $_GET['comment'] != '') {
$banks['ekr'] -= (int)$_GET['sums'];
$clan['ekr'] += (int)$_GET['sums'];
$text = mysql_real_escape_string(iconv("utf-8", "utf-8", $_GET['comment']));
mysql_query('UPDATE `bank` SET `ekr` = "'.$banks['ekr'].'" WHERE `id` = "'.$banks['id'].'" LIMIT 1');
mysql_query('UPDATE `clans` SET `ekr` = "'.$clan['ekr'].'" WHERE `id` = "'.$clan['id'].'" LIMIT 1');
mysql_query("INSERT INTO `delo` (`author`, `pers`, `text`, `type`, `date`) VALUES ('0', '{$user['id']}', '\"".$user['login']."\" Пополнил казну клана: ($clan[name] / $clan[id]) на сумму: ".(int)$_GET['sums']." екр, со счёта : $banks[id]. С пометкой : $text', '1', '".time()."')");
mysql_query('INSERT INTO `clan_log` (`clan_id`, `user_id`, `time`, `type`, `suma`, `comment`) VALUES ("'.$clan['id'].'", "'.$user['id'].'", "'.time().'", "2", "'.(int)$_GET['sums'].'", "'.$text.'")');
$err = '<b style="color: Red;">Казна пополненна на '.(int)$_GET['sums'].' eкр.</b>';
} else {
$err = '<b style="color: Red;">Введите комментарий</b>';
}
} elseif($_GET['sums'] <= 0) {
$err = '<b style="color: Red;">Введите сумму</b>';
} else {
$err = '<b style="color: Red;">Недостаточно средств</b>';
}
} else {
$err = '<b style="color: Red;">Авторизируйтесь в банковском счету</b>';
}
} else {
$err = '<b style="color: Red;">У Вас нет прав на выполнение данной операции</b>';
}
}
function form_pay($us, $clan) {
global $clan_acces, $banks;
$user = mysql_fetch_array(mysql_query('SELECT `id`, `login`, `level`, `money` FROM `users` WHERE `id` = "'.$us.'" LIMIT 1'));
$r = '';
if($clan_acces[7][0] == 1) {
$r .= 'У Вас в наличии : <b>'.$user['money'].'</b> .кр<br />';
$r .= '<a href="javascript: void(0);" onclick="addCredits();">Пополнить (кредиты)</a><br />';
if(isset($banks['id'])) {
$r .= '<br />Счёт #'.$banks['id'].': <b>'.$banks['cr'].'</b> .кр и <b>'.$banks['ekr'].'</b> .екр<br />';
$r .= '<a href="javascript: void(0);" onclick="addeCredits();">Пополнить (еврокредиты)</a>';
} else {
$r .= '<br />Авторизируйтесь в банке через Инвентарь';
}
}
return $r;
}
?>
<script>
function proverka(input) {
input.value = input.value.replace(/[^\d]/g, '');
}
function addCredits() {
new miDialog({title : 'Пополнить казну кредитами'}, {addcredits : 1}, function() {
document.location = '/__modules/clan_panel.php?razdel=kazna&'+$.param(this.data);
},
$('<div>Комментарий</div>').append(miDialog._simpleInput({name : 'comment'})).append('<div>Сумма</div>').append(miDialog._oneInput({name : 'sums', onkeyup : 'return proverka(this);', onchange : 'return proverka(this);', value : '0'})), {width : 280});
}
function addeCredits() {
new miDialog({title : 'Пополнить казну еврокредитами'}, {addecredits : 1}, function() {
document.location = '/__modules/clan_panel.php?razdel=kazna&'+$.param(this.data);
},
$('<div>Комментарий</div>').append(miDialog._simpleInput({name : 'comment'})).append('<div>Сумма</div>').append(miDialog._oneInput({name : 'sums', onkeyup : 'return proverka(this);', onchange : 'return proverka(this);', value : '0'})), {width : 280});
}
</script>
<table width="100%" border="0">
<tbody>
<tr>
<td align="center">
<table valign="top" align="center" width="100%">
<tbody>
<tr>
<td><br />
<center><br />
<? if($err != '') { echo $err.'<br />'; } ?>
<b>Клановая казна: <font color="#339900"><?=$clan['money']; ?></font> кр, <font color="#339900"><?=$clan['ekr']; ?></font> екр.</b><br /><br />
<fieldset style="width: 300px; height: 100px;">
<legend align="center"><b>Пополнить казну:</b></legend>
<? if($clan_acces[7][0] == 1) { echo form_pay($user['id'], $clan['id']); } else { echo '<b>Вы не можете пополнять казну</b>'; } ?>
</fieldset>
<? if($clan_acces[6][0] == 1) { ?>
<a href="http://capitalcity.old-dark.ru/clan_log.php?act=caznalog&clan=<?=$clan['id'];?>&hash=<?=md5($user['id'].'|'.$user['login']);?>" target="_blank">Просмотр действий с казной</a>
<? } ?>
</center>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

117
__modules/clan_modules/main.php

@ -0,0 +1,117 @@
<?
session_start();
if(!isset($_SESSION['uid'])) { header('Location: ../../index.php'); exit(); }
include('../../config.php');
include('../../functions.php');
if($user['klan'] == '') { header('Location: ../../main.php'); exit(); }
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$user['klan'].'" LIMIT 1'));
if($clan['recruits'] > 0) {
$recrut = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$clan['recruits'].'" LIMIT 1'));
}
function show_klan_members($pl) {
global $rooms;
$r = '';
$clan = mysql_fetch_array(mysql_query('SELECT `id`, `recruits`, `short`, `name`, `descr`, `glava`, `vozm`, `align`, `mshadow`, `wshadow`, `homepage`, `rating`, `zbor`, `zamok`, `izamok`, `ifon` FROM `clans` WHERE `id` = "'.$pl.'" LIMIT 1'));
if(isset($clan['id'])) {
$sp = mysql_query('SELECT `id`, `login`, `invis`, `align`, `level`, `status`, `room`, (SELECT `id` FROM `online` WHERE `date` >= "'.(time()-60).'" AND `id` = `users`.`id`) AS `online` FROM `users` WHERE `klan` = "'.$pl.'" ORDER BY `level` DESC');
while($us = mysql_fetch_array($sp)) {
if($us['online'] > 0 && $us['invis'] == 0) {
$r .= '<a href="javascript: top.AddToPrivate(\''.nick7($us['id']).'\', top.CtrlPress)" target="refreshed"><img src="../../i/lock.gif" width="20" height="15" /></a>';
} else {
$r .= '<font style=\'color: Grey;\'><img src="../../i/offline.gif" width="20" height="15" /></font>';
}
$r .= ' <img src=\'../../i/align_'.$us['align'].'.gif\' /> <img src=\'../../i/klan/'.ClanImage($pl).'.gif\' /> <b>'.$us['login'].'</b> ['.$us['level'].'] ';
$r .= '<a href=\'../../inf.php?id='.$us['id'].'\' target=\'_blank\'><img src=\'../../i/inf.gif\' /></a>';
$r .= $us['status']?" - ".$us['status']:" - Нет звания";
if($us['online'] > 0 && $us['invis'] == 0) {
$r .= ' - <i>'.$rooms[$us['room']].'</i>';
}
$r .= '<br />';
}
} else {
$r = 'Клан не найден ..';
}
return $r;
}
?>
<table>
<tbody>
<tr>
<td colspan="3" valign="top" align="center">
<center>
<h3>
<img src="../..//i/align_<?=$clan['align']?>.gif" /><img src="../../i/klan/<? echo ClanImage($clan['id']); ?>.gif" />
<b><?=$clan['short']; ?></b>
<br />
Клан-основа - <img src="../../i/align_<?=$clan['align']?>.gif" /><img src="../../i/klan/<? echo ClanImage($clan['id']); ?>.gif" />
<b><?=$clan['name']?></b>
<br />
<? if($clan['recruits'] > 0) { ?>
Клан-рекрут - <img src="../../i/align_<?=$recrut['align']?>.gif" /><img src="../../i/klan/<? echo ClanImage($recrut['id']); ?>.gif" />
<b><?=$recrut['name']?></b>
<? } ?>
</h3>
</center>
</td>
</tr>
<tr>
<td valign="top">
<fieldset>
<legend><b>Каналы чата: </b></legend>
<table border="0">
<tbody>
<tr align="left">
<td width="30">&nbsp;</td>
<td align="left">
<font color="#850404">
<b><a href="#" onclick="top.AddToPrivate('klan', top.CtrlPress)" target="refreshed"><img src="../../i/lock.gif" width="20" height="15" /></a> klan - <img src="../../i/klan/<? echo ClanImage($clan['id']); ?>.gif" /><?=$clan['name']; ?> <br /></b>
</font>
</td>
<td width="30">&nbsp;</td>
</tr>
<tr>
<td></td>
<td height="10"></td>
<td></td>
</tr>
</tbody>
</table>
</fieldset>
<fieldset>
<legend><b>Клановые реликты:</b></legend>
<table border="0">
<tbody>
<tr>
<td width="500" align="left">В разработке</td>
</tr>
</tbody>
</table>
</fieldset>
</td>
<td width="25">&nbsp;</td>
<td valign="top" align="center">
<fieldset>
<legend><b>Состав клана: </b></legend>
<table>
<tbody>
<tr>
<td align="left">
<h3>CapitalCity</h3>
<? echo show_klan_members($clan['id']); ?>
</td>
</tr>
</tbody>
</table>
</fieldset>
</td>
</tr>
</tbody>
</table>

105
__modules/clan_panel.php

@ -0,0 +1,105 @@
<?
session_start();
if(!isset($_SESSION['uid'])) { header('Location: ../index.php'); exit(); }
include('../config.php');
include('../functions.php');
$user ='';
if($user['klan'] == '') { header('Location: ../main.php'); exit(); }
if(!isset($_SESSION['razdel_panel'])) { $_SESSION['razdel_panel'] = 'main'; }
if($_GET['razdel']) {
switch ($_GET['razdel']) {
case "main": $_SESSION['razdel_panel'] = 'main'; break;
case "kazna": $_SESSION['razdel_panel'] = 'kazna'; break;
case "arsenal": $_SESSION['razdel_panel'] = 'arsenal'; break;
case "wars": $_SESSION['razdel_panel'] = 'wars'; break;
case "message": $_SESSION['razdel_panel'] = 'message'; break;
case "castle": $_SESSION['razdel_panel'] = 'castle'; break;
case "maintains": $_SESSION['razdel_panel'] = 'maintains'; break;
default: $_SESSION['razdel_panel'] = 'razdel_panel'; break;
}
}
?>
<html>
<head>
<title>404</title>
<link rel="stylesheet" type="text/css" href="../css/main.css" />
<script src="../js/jquery-1.7.2.min.js"></script>
<script src="../js/jquery.simplemodal.js"></script>
<script src="../js/jquery.ui.js?100"></script>
<script src="../js/mi.js"></script>
<link rel="stylesheet" href="../css/bkstyle.css?101" />
<link rel="stylesheet" href="../css/mi.css" />
<style>
.m { background: #99CCCC; text-align: center; }
.s { background: #BBDDDD; text-align: center; }
.s2 { background: #C0D6D4; text-align: center; }
a.menu { font-weight: bold; font-size: 8pt; color:#959595; text-decoration: none; text-align: center; }
a.menu2 { font-weight: bold; font-size: 8pt; color: #8F0000; text-decoration: none; text-align: center; }
a.menu:hover { font-weight:bold; font-size: 8pt; color: #8F0000; text-decoration: none; text-align: center; }
.menu22 { font-weight: bold; font-size: 8pt; color: #003388; text-decoration: none; text-align: center; }
.menu221 { background-color: #A5A5A5; text-align: center; }
.menu222 { font-weight: bold; font-size: 8pt; color: #000000; text-decoration: none; }
.body {margin: 5px; background: #D7D7D7}
</style>
</head>
<body>
<table width="100%">
<tbody>
<tr>
<td align="right">
<input type="button" onclick="location.href='../main.php';" value="Вернуться" />
</td>
</tr>
<tr>
<td width="100%" valign="top" align="center">
<table border="0" width="956">
<tbody>
<tr>
<td width="956" style="background-image: url(../i/clan_panel/menu_bg33.jpg); background-repeat: no-repeat">
<table border="0" cellpadding="4" cellspacing="3">
<tbody>
<tr height="38">
<td width="15">&nbsp;</td>
<td align="center" width="127" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'main') { echo "2"; }?>" href="?razdel=main">Главная</a></td>
<td align="center" width="127" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'kazna') { echo "2"; }?>" href="?razdel=kazna">Казна</a></td>
<!-- <td align="center" width="140" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'arsenal') { echo "2"; }?>" href="klan_arsenal.php">Арсенал</a></td> -->
<td align="center" width="143" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'wars') { echo "2"; }?>" href="?razdel=wars">Войны и враги</a></td>
<td align="center" width="140" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'message') { echo "2"; }?>" href="?razdel=message">Сообщения</a></td>
<!-- <td align="center" width="132" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'castle') { echo "2"; }?>" href="klan_castles.php">Замки</a></td> -->
<td align="center" width="122" valign="top"><a class="menu<? if($_SESSION['razdel_panel'] == 'maintains') { echo "2"; }?>" href="?razdel=maintains">Управление</a></td>
<td width="5">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table border="0" width="1100">
<tbody>
<tr>
<td>
<table width="100%" border="0">
<tbody>
<tr>
<td align="center">
<? include('clan_modules/'.$_SESSION['razdel_panel'].'.php'); ?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>

193
add_me.php

@ -0,0 +1,193 @@
<?
include('config.php');
if($_POST['name']) {
$goden_tmp=$_POST['goden'];
if ($_POST['shop']==1) if (mysql_query("insert into shop(name,duration,maxdur,cost,ecost,nlevel,nsila,nlovk,ninta,nvinos,nintel,nmudra,nnoj,ntopor,ndubina,nmech,nalign,minu,maxu,goden,gsila,glovk,ginta,gintel,ghp,mfkrit,mfakrit,mfuvorot,mfauvorot,gnoj,gtopor,gdubina,gmech,img,count,bron1,bron2,bron3,bron4,magic,type,massa,needident,nfire,nwater,nair,nearth,nlight,ngray,ndark,gfire,gwater,gair,gearth,glight,ggray,gdark,encicl,artefact,letter,isrep,razdel) values ('".$_POST['name']."','".$_POST['duration']."','".$_POST['maxdur']."','".$_POST['cost']."','".$_POST['ecost']."','".$_POST['nlevel']."','".$_POST['nsila']."','".$_POST['nlovk']."','".$_POST['ninta']."','".$_POST['nvinos']."','".$_POST['nintel']."','".$_POST['nmudra']."','".$_POST['nnoj']."','".$_POST['ntopor']."','".$_POST['ndubina']."','".$_POST['nmech']."','".$_POST['nalign']."','".$_POST['minu']."','".$_POST['maxu']."','".$goden_tmp."','".$_POST['gsila']."','".$_POST['glovk']."','".$_POST['ginta']."','".$_POST['gintel']."','".$_POST['ghp']."','".$_POST['mfkrit']."','".$_POST['mfakrit']."','".$_POST['mfuvorot']."','".$_POST['mfauvorot']."','".$_POST['gnoj']."','".$_POST['gtopor']."','".$_POST['gdubina']."','".$_POST['gmech']."','".$_POST['img']."','".$_POST['count']."','".$_POST['bron1']."','".$_POST['bron2']."','".$_POST['bron3']."','".$_POST['bron4']."','".$_POST['magic']."','".$_POST['type']."','".$_POST['massa']."','".$_POST['needident']."','".$_POST['nfire']."','".$_POST['nwater']."','".$_POST['nair']."','".$_POST['nearth']."','".$_POST['nlight']."','".$_POST['ngray']."','".$_POST['ndark']."','".$_POST['gfire']."','".$_POST['gwater']."','".$_POST['gair']."','".$_POST['gearth']."','".$_POST['glight']."','".$_POST['ggray']."','".$_POST['gdark']."','".$_POST['encicl']."','0','".$_POST['letter']."','".$_POST['isrep']."','".$_POST['razdel']."');"))
{
echo "Предмет '$_POST[name]' успешно добавлен";
}
else
{ echo "Предмет не был добавлен!-1";
};
if ($_POST['shop']==2) if (mysql_query("insert into fshop(name,duration,maxdur,cost,ecost,nlevel,nsila,nlovk,ninta,nvinos,nintel,nmudra,nnoj,ntopor,ndubina,nmech,nalign,minu,maxu,goden,gsila,glovk,ginta,gintel,ghp,mfkrit,mfakrit,mfuvorot,mfauvorot,gnoj,gtopor,gdubina,gmech,img,count,bron1,bron2,bron3,bron4,magic,type,massa,needident,nfire,nwater,nair,nearth,nlight,ngray,ndark,gfire,gwater,gair,gearth,glight,ggray,gdark,letter,isrep,razdel) values ('".$_POST['name']."','".$_POST['duration']."','".$_POST['maxdur']."','".$_POST['cost']."','".$_POST['ecost']."','".$_POST['nlevel']."','".$_POST['nsila']."','".$_POST['nlovk']."','".$_POST['ninta']."','".$_POST['nvinos']."','".$_POST['nintel']."','".$_POST['nmudra']."','".$_POST['nnoj']."','".$_POST['ntopor']."','".$_POST['ndubina']."','".$_POST['nmech']."','".$_POST['nalign']."','".$_POST['minu']."','".$_POST['maxu']."','".$goden_tmp."','".$_POST['gsila']."','".$_POST['glovk']."','".$_POST['ginta']."','".$_POST['gintel']."','".$_POST['ghp']."','".$_POST['mfkrit']."','".$_POST['mfakrit']."','".$_POST['mfuvorot']."','".$_POST['mfauvorot']."','".$_POST['gnoj']."','".$_POST['gtopor']."','".$_POST['gdubina']."','".$_POST['gmech']."','".$_POST['img']."','".$_POST['count']."','".$_POST['bron1']."','".$_POST['bron2']."','".$_POST['bron3']."','".$_POST['bron4']."','".$_POST['magic']."','".$_POST['type']."','".$_POST['massa']."','".$_POST['needident']."','".$_POST['nfire']."','".$_POST['nwater']."','".$_POST['nair']."','".$_POST['nearth']."','".$_POST['nlight']."','".$_POST['ngray']."','".$_POST['ndark']."','".$_POST['gfire']."','".$_POST['gwater']."','".$_POST['gair']."','".$_POST['gearth']."','".$_POST['glight']."','".$_POST['ggray']."','".$_POST['gdark']."','".$_POST['letter']."','".$_POST['isrep']."','".$_POST['razdel']."');"))
{
echo "Предмет '$_POST[name]' успешно добавлен";
}
else
{ echo "Предмет не был добавлен!".mysql_error();
};
if ($_POST['shop']==3) if (mysql_query("insert into ashop(name,duration,maxdur,cost,ecost,nlevel,nsila,nlovk,ninta,nvinos,nintel,nmudra,nnoj,ntopor,ndubina,nmech,nalign,minu,maxu,goden,gsila,glovk,ginta,gintel,ghp,mfkrit,mfakrit,mfuvorot,mfauvorot,gnoj,gtopor,gdubina,gmech,img,count,bron1,bron2,bron3,bron4,magic,type,massa,needident,nfire,nwater,nair,nearth,nlight,ngray,ndark,gfire,gwater,gair,gearth,glight,ggray,gdark,encicl,artefact,letter,isrep,razdel) values ('".$_POST['name']."','".$_POST['duration']."','".$_POST['maxdur']."','".$_POST['cost']."','".$_POST['ecost']."','".$_POST['nlevel']."','".$_POST['nsila']."','".$_POST['nlovk']."','".$_POST['ninta']."','".$_POST['nvinos']."','".$_POST['nintel']."','".$_POST['nmudra']."','".$_POST['nnoj']."','".$_POST['ntopor']."','".$_POST['ndubina']."','".$_POST['nmech']."','".$_POST['nalign']."','".$_POST['minu']."','".$_POST['maxu']."','".$goden_tmp."','".$_POST['gsila']."','".$_POST['glovk']."','".$_POST['ginta']."','".$_POST['gintel']."','".$_POST['ghp']."','".$_POST['mfkrit']."','".$_POST['mfakrit']."','".$_POST['mfuvorot']."','".$_POST['mfauvorot']."','".$_POST['gnoj']."','".$_POST['gtopor']."','".$_POST['gdubina']."','".$_POST['gmech']."','".$_POST['img']."','".$_POST['count']."','".$_POST['bron1']."','".$_POST['bron2']."','".$_POST['bron3']."','".$_POST['bron4']."','".$_POST['magic']."','".$_POST['type']."','".$_POST['massa']."','".$_POST['needident']."','".$_POST['nfire']."','".$_POST['nwater']."','".$_POST['nair']."','".$_POST['nearth']."','".$_POST['nlight']."','".$_POST['ngray']."','".$_POST['ndark']."','".$_POST['gfire']."','".$_POST['gwater']."','".$_POST['gair']."','".$_POST['gearth']."','".$_POST['glight']."','".$_POST['ggray']."','".$_POST['gdark']."','".$_POST['encicl']."','1','".$_POST['letter']."','".$_POST['isrep']."','".$_POST['razdel']."');"))
{
echo "Предмет '$_POST[name]' успешно добавлен";
}
else
{ echo "Предмет не был добавлен!".mysql_error();
};
}
?>
<html>
<head>
<title>404</title>
<script src="js/jquery-1.7.2.min.js"></script>
<script>
window.onload = function() {
for(var i = 0, l = document.getElementsByTagName('input').length; i < l; i++) {
if(document.getElementsByTagName('input').item(i).type == 'text') {
document.getElementsByTagName('input').item(i).setAttribute('autocomplete', 'off');
};
};
}
$(function() {
$("#nbrons").keyup(function() {
var val = $("#nbrons").val();
$('#bron1').val(val);
$('#bron2').val(val);
$('#bron3').val(val);
$('#bron4').val(val);
});
});
</script>
</head>
<body>
<form method=post>
<table>
<tr><td>Название </td><td><input type=text name=name value=''> </td></tr>
<tr><td>Картинка </td><td><input type=text name=img value=''> </td></tr>
<tr><td>Магазин
</td><td><select name="shop">
<option value="1" selected="selected">Обычный</option>
<option value="2">Цветной</option>
<option value="3">Артефактный</option>
</select> </td></tr>
<tr><td>Количество (шт.) </td><td><input type=text name=count value="999999"></td></tr>
<tr><td>Тип предмета
</td><td><select name="type">
<option value="3">Оружие</option>
<option value="11">Сапоги</option>
<option value="9">Перчатки</option>
<option value="22">Лёгкая броня</option>
<option value="4">Броня</option>
<option value="8">Шлемы</option>
<option value="10">Щиты</option>
<option value="1">Серьги</option>
<option value="2" selected="selected">Ожерелья</option>
<option value="5">Кольца</option>
<option value="12">Заклинания</option>
</select> </td></tr>
<tr><td>Масса </td><td><input type=text name=massa value="2"> </td></tr>
<!--
<tr><td>Нужно идентифицировать </td><td><input type=text name=needident value="0"></td></tr>
<tr><td>Кол-во знаков </td><td><input type=text name=letter value="0"> </td></tr>
-->
<tr><td>Подлежит ремонту </td><td><input type=text name=isrep value="1"> </td></tr>
<!--
<tr><td>Годен (дней)</td><td><input type=text name=goden value="0"> </td></tr>
-->
<tr><td>Раздел магазина
</td><td><select name="razdel">
<option value="1">Оружие - Кастеты, ножи</option>
<option value="11">Оружие - Топоры</option>
<option value="12">Оружие - Дубины, Булавы</option>
<option value="13">Оружие - Мечи</option>
<option disabled="disabled">--------------------</option>
<option value="2">Одежда - Сапоги</option>
<option value="21">Одежда - Перчатки</option>
<option value="22">Одежда - Броня: легкая</option>
<option value="23">Одежда - Броня: тяжелая</option>
<option value="24">Одежда - Шлемы</option>
<option value="3">Щиты</option>
<option disabled="disabled">--------------------</option>
<option value="4">Ювелирные товары - Серьги</option>
<option value="41" selected="selected">Ювелирные товары - Ожерелья</option>
<option value="42">Ювелирные товары - Кольца</option>
<option disabled="disabled">--------------------</option>
<option value="5">Заклинания - Нейтральные</option>
<option value="51">Заклинания - Боевые, Защитные</option>
<option value="6">Аммуниция</option>
<option disabled="disabled">--------------------</option>
<option value="7">Артефакты: Букеты</option>
</select> </td></tr>
<!--
<tr><td>Мин. износ </td><td><input type=text name=duration value="0"></td></tr>
-->
<tr><td>Макс. износ </td><td><input type=text name=maxdur value="80"></td></tr>
<tr><td>Цена (кр.) </td><td><input type=text name=cost value="253"></td></tr>
<!--
<tr><td>Цена (Е-кр.) </td><td><input type=text name=ecost value="0"></td></tr>
-->
</table>
<b>Требования</b>
<table>
<tr><td>Уровень </td><td><input id="nlevel" type=text name=nlevel value="13" /></td></tr>
<tr><td>Сила </td><td><input type=text name=nsila value="0"></td></tr>
<tr><td>Ловкость </td><td><input type=text name=nlovk value="0"></td></tr>
<tr><td>Интуиция </td><td><input type=text name=ninta value="0"></td></tr>
<tr><td>Вынос </td><td><input type=text name=nvinos value="0"></td></tr>
<!--
<tr><td>Интеллект </td><td><input type=text name=nintel value="0"> </td></tr>
<tr><td>Ум.ножи </td><td><input type=text name=nnoj value="0"></td></tr>
<tr><td>Ум.топоры </td><td><input type=text name=ntopor value="0"></td></tr>
<tr><td>Ум.дубины </td><td><input type=text name=ndubina value="0"></td></tr>
<tr><td>Ум.мечи </td><td><input type=text name=nmech value="0"></td></tr>
-->
<tr><td>Склонность </td><td><input type=text name=nalign value="0"></td></tr>
<!--
<tr><td>Мастерство огня </td><td><input type=text name=nfire value="0"></td></tr>
<tr><td>Мастерство воды </td><td><input type=text name=nwater value="0"></td></tr>
<tr><td>Мастерство воздуха </td><td><input type=text name=nair value="0"></td></tr>
<tr><td>Мастерство земли </td><td><input type=text name=nearth value="0"> </td></tr>
<tr><td>Светлая магия </td><td><input type=text name=nlight value="0"></td></tr>
<tr><td>Серая магия </td><td><input type=text name=ngray value="0"></td></tr>
<tr><td>Темная магия </td><td><input type=text name=ndark value="0"></td></tr>
-->
</table>
<b>Характеристики</b>
<table>
<!--
<tr><td>Мин.урон </td><td><input type=text name=minu value="0"></td></tr>
<tr><td>Макс.урон </td><td><input type=text name=maxu value="0"></td></tr>
-->
<tr><td>Сила </td><td><input type=text name=gsila value="0"></td></tr>
<tr><td>Ловкость </td><td><input type=text name=glovk value="0"></td></tr>
<tr><td>Интуиция </td><td><input type=text name=ginta value="0"></td></tr>
<tr><td>Интеллект </td><td><input type=text name=gintel value="0"></td></tr>
<tr><td>НР </td><td><input type=text name=ghp value="0"></td></tr>
<tr><td>Мф.крит </td><td><input type=text name=mfkrit value="0"></td></tr>
<tr><td>Мф.антикрит </td><td><input type=text name=mfakrit value="0"></td></tr>
<tr><td>Мф.уворот </td><td><input type=text name=mfuvorot value="0"></td></tr>
<tr><td>Мф.антиуворот </td><td><input type=text name=mfauvorot value="0"></td></tr>
<tr><td><b>Всем брони</b></td><td><input id="nbrons" value="0" /></td></tr>
<tr><td>Ум.ножи </td><td><input type=text name=gnoj value="0"></td></tr>
<tr><td>Ум.топоры </td><td><input type=text name=gtopor value="0"></td></tr>
<tr><td>Ум.дубины </td><td><input type=text name=gdubina value="0"></td></tr>
<tr><td>Ум.мечи </td><td><input type=text name=gmech value="0"></td></tr>
<tr><td>Броня головы </td><td><input id="bron1" type=text name=bron1 value="0"></td></tr>
<tr><td>Броня корпуса </td><td><input id="bron2" type=text name=bron2 value="0"></td></tr>
<tr><td>Броня пояса</td><td><input id="bron3" type=text name=bron3 value="0"></td></tr>
<tr><td>Броня ног </td><td><input id="bron4" type=text name=bron4 value="0"></td></tr>
<!--
<tr><td>Мастерство огня </td><td><input type=text name=gfire value="0"></td></tr>
<tr><td>Мастерство воды </td><td><input type=text name=gwater value="0"></td></tr>
<tr><td>Мастерство воздуха </td><td><input type=text name=gair value="0"></td></tr>
<tr><td>Мастерство земли </td><td><input type=text name=gearth value="0"></td></tr>
<tr><td>Светлая магия </td><td><input type=text name=glight value="0"></td></tr>
<tr><td>Серая магия </td><td><input type=text name=ggray value="0"></td></tr>
<tr><td>Темная магия </td><td><input type=text name=gdark value="0"></td></tr>
<tr><td>В энциклопедию </td><td><input type=text name=encicl value=''> </td></tr>
<tr><td>Наложенно заклятие </td><td><input type=text name=magic value=""></td></tr>
-->
</table>
<INPUT TYPE="submit" value="Добавить">
</form>
</body>
</html>

126
add_novyj_shmot.php

@ -0,0 +1,126 @@
<?php
session_start();
if ($_SESSION['uid'] == null) header("Location: index.php");
include "config.php";
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
if ($user['admin']=="1") {
?>
DO NOT USE - NOT TESTED. INS.
<form method=post action="add_novyj_shmot.php">
<b>Вещи</b>
<table>
<tr><td>Название </td><td><input type=text name=name value=''> </td></tr>
<tr><td>Картинка </td><td><input type=text name=img value=''> </td></tr>
<tr><td>Количество в магазине </td><td><input type=text name=count value='0'></td></tr>
<tr><td>Тип предмета </td>
<td><select name='type'>
<option value='0'></option>
<option value='3'>Оружие</option>
<option value='11'>сапоги</option>
<option value='9'>перчатки</option>
<option value='4'>Броня</option>
<option value='8'>шлемы</option>
<option value='10'>Щиты</option>
<option value='1'>серьги</option>
<option value='2'>ожерелья</option>
<option value='5'>кольца</option>
<option value='12'>Заклинания</option>
</select></td></tr>
<tr><td>Масса </td><td><input type=text name=massa value='0'> </td></tr>
<tr><td>Нужна идентификация </td><td><input type=text name=needident value='0'></td></tr>
<tr><td>Количество знаков </td><td><input type=text name=letter value='0'> </td></tr>
<tr><td>Может чиниться </td><td><input type=text name=isrep value='1'> </td></tr>
<tr><td>Раздел магазина </td>
<td><select name='razdel'>
<option value='0'></option>
<option value='1'>Оружие: кастеты,ножи</option>
<option value='11'>Оружие: топоры</option>
<option value='12'>Оружие: дубины,булавы</option>
<option value='13'>Оружие: мечи</option>
<option value='2'>Одежда: сапоги</option>
<option value='21'>Одежда: перчатки</option>
<option value='22'>&Одежда: легкая броня</option>
<option value='23'>Одежда: тяжелая броня</option>
<option value='24'>Одежда: шлемы</option>
<option value='3'>Щиты</option>
<option value='4'>Ювелирные товары: серьги</option>
<option value='41'>Ювелирные товары: ожерелья</option>
<option value='42'>Ювелирные товары: кольца</option>
<option value='5'>Заклинания: нейтральные</option>
<option value='51'>3аклинания: боевые и защитные</option>
<option value='6'>Амуниция</option>
</select></td></tr>
<tr><td>Мин.износ </td><td><input type=text name=duration value='0'></td></tr>
<tr><td>Макс.износ </td><td><input type=text name=maxdur value='0'></td></tr>
<tr><td>Цена </td><td><input type=text name=cost value='0'></td></tr>
</table>
<b>Требования:</b>
<table>
<tr><td>Уровень </td><td><input type=text name=nlevel value='0'></td></tr>
<tr><td>Сила </td><td><input type=text name=nsila value='0'></td></tr>
<tr><td>Ловкость </td><td><input type=text name=nlovk value='0'></td></tr>
<tr><td>Интуиция </td><td><input type=text name=ninta value='0'></td></tr>
<tr><td>Вынос </td><td><input type=text name=nvinos value='0'></td></tr>
<tr><td>Интеллект </td><td><input type=text name=nintel value='0'> </td></tr>
<tr><td>Мудрость </td><td><input type=text name=nmudra value='0'></td></tr>
<tr><td>Ум.ножи </td><td><input type=text name=nnoj value='0'></td></tr>
<tr><td>Ум.топоры </td><td><input type=text name=ntopor value='0'></td></tr>
<tr><td>Ум.дубины </td><td><input type=text name=ndubina value='0'><