From 462ab5a6d17f3f426fff8676d240c8f28fd559ce Mon Sep 17 00:00:00 2001 From: mumin Date: Wed, 17 Jun 2009 23:00:25 +0900 Subject: [PATCH] Initial commit at SoulDrops 2nd season analyzer module. --- public_html/modules/sd2nd/admin/index.php | 13 + public_html/modules/sd2nd/images/down.gif | Bin 0 -> 212 bytes public_html/modules/sd2nd/images/icon/mapchip1.jpg | Bin 0 -> 1097 bytes .../modules/sd2nd/images/icon/mapchip10.jpg | Bin 0 -> 997 bytes .../modules/sd2nd/images/icon/mapchip11.jpg | Bin 0 -> 1126 bytes .../modules/sd2nd/images/icon/mapchip12.jpg | Bin 0 -> 1164 bytes .../modules/sd2nd/images/icon/mapchip13.jpg | Bin 0 -> 1030 bytes .../modules/sd2nd/images/icon/mapchip14.jpg | Bin 0 -> 1285 bytes .../modules/sd2nd/images/icon/mapchip15.jpg | Bin 0 -> 1121 bytes .../modules/sd2nd/images/icon/mapchip16.jpg | Bin 0 -> 1109 bytes .../modules/sd2nd/images/icon/mapchip17.jpg | Bin 0 -> 973 bytes .../modules/sd2nd/images/icon/mapchip18.jpg | Bin 0 -> 1190 bytes .../modules/sd2nd/images/icon/mapchip19.jpg | Bin 0 -> 1240 bytes public_html/modules/sd2nd/images/icon/mapchip2.jpg | Bin 0 -> 949 bytes .../modules/sd2nd/images/icon/mapchip20.jpg | Bin 0 -> 759 bytes .../modules/sd2nd/images/icon/mapchip21.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip22.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip23.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip24.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip25.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip26.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip27.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip28.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip29.jpg | Bin 0 -> 1120 bytes public_html/modules/sd2nd/images/icon/mapchip3.jpg | Bin 0 -> 1336 bytes .../modules/sd2nd/images/icon/mapchip30.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip31.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip32.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip33.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip34.jpg | Bin 0 -> 1120 bytes .../modules/sd2nd/images/icon/mapchip35.jpg | Bin 0 -> 1120 bytes public_html/modules/sd2nd/images/icon/mapchip4.jpg | Bin 0 -> 1030 bytes public_html/modules/sd2nd/images/icon/mapchip5.jpg | Bin 0 -> 1282 bytes public_html/modules/sd2nd/images/icon/mapchip6.jpg | Bin 0 -> 1221 bytes public_html/modules/sd2nd/images/icon/mapchip7.jpg | Bin 0 -> 1058 bytes public_html/modules/sd2nd/images/icon/mapchip8.jpg | Bin 0 -> 1289 bytes public_html/modules/sd2nd/images/icon/mapchip9.jpg | Bin 0 -> 1195 bytes public_html/modules/sd2nd/images/index.html | 1 + public_html/modules/sd2nd/images/sd2nd.png | Bin 0 -> 1983 bytes public_html/modules/sd2nd/images/up.gif | Bin 0 -> 212 bytes public_html/modules/sd2nd/index.php | 13 + .../modules/sd2nd/language/english/admin.php | 10 + .../sd2nd/language/english/help/delegate.html | 37 + .../modules/sd2nd/language/english/help/help.html | 4 + .../modules/sd2nd/language/english/help/index.html | 1 + .../modules/sd2nd/language/english/index.html | 1 + .../modules/sd2nd/language/english/main.php | 10 + .../modules/sd2nd/language/english/modinfo.php | 10 + public_html/modules/sd2nd/language/index.html | 1 + .../modules/sd2nd/language/ja_utf8/admin.php | 10 + .../sd2nd/language/ja_utf8/help/delegate.html | 37 + .../modules/sd2nd/language/ja_utf8/help/help.html | 4 + .../modules/sd2nd/language/ja_utf8/help/index.html | 1 + .../modules/sd2nd/language/ja_utf8/index.html | 1 + .../modules/sd2nd/language/ja_utf8/main.php | 10 + .../modules/sd2nd/language/ja_utf8/modinfo.php | 10 + .../modules/sd2nd/language/japanese/admin.php | 10 + .../sd2nd/language/japanese/help/delegate.html | 37 + .../modules/sd2nd/language/japanese/help/help.html | 4 + .../sd2nd/language/japanese/help/index.html | 1 + .../modules/sd2nd/language/japanese/index.html | 1 + .../modules/sd2nd/language/japanese/main.php | 10 + .../modules/sd2nd/language/japanese/modinfo.php | 10 + .../modules/sd2nd/preload/AssetPreload.class.php | 18 + public_html/modules/sd2nd/preload/index.html | 1 + public_html/modules/sd2nd/xoops_version.php | 16 + .../sd2nd/actions/AbilityListAction.class.php | 77 ++ .../actions/ActiveAbilityListAction.class.php | 94 ++ .../sd2nd/actions/CostumeListAction.class.php | 77 ++ .../modules/sd2nd/actions/IndexAction.class.php | 43 + .../actions/LearnedAbilityListAction.class.php | 94 ++ .../actions/LearnedCostumeListAction.class.php | 76 ++ .../sd2nd/actions/LearnedSkillListAction.class.php | 94 ++ .../modules/sd2nd/actions/MapViewAction.class.php | 73 ++ .../sd2nd/actions/SkillListAction.class.php | 101 ++ .../admin/class/Sd2ndAdminRenderSystem.class.php | 304 +++++ .../class/installer/Sd2ndInstallUtils.class.php | 1234 ++++++++++++++++++++ .../admin/class/installer/Sd2ndInstaller.class.php | 299 +++++ .../class/installer/Sd2ndUninstaller.class.php | 277 +++++ .../admin/class/installer/Sd2ndUpdater.class.php | 357 ++++++ trust_path/modules/sd2nd/admin/index.php | 18 + .../modules/sd2nd/class/AbstractAction.class.php | 162 +++ .../sd2nd/class/AbstractDeleteAction.class.php | 62 + .../sd2nd/class/AbstractEditAction.class.php | 185 +++ .../sd2nd/class/AbstractFilterForm.class.php | 184 +++ .../sd2nd/class/AbstractListAction.class.php | 143 +++ .../sd2nd/class/AbstractViewAction.class.php | 109 ++ .../modules/sd2nd/class/AssetManager.class.php | 295 +++++ trust_path/modules/sd2nd/class/Module.class.php | 461 ++++++++ .../modules/sd2nd/class/Sd2ndUtils.class.php | 59 + .../modules/sd2nd/class/handler/Ability.class.php | 70 ++ .../sd2nd/class/handler/ActiveAbility.class.php | 68 ++ .../modules/sd2nd/class/handler/Char.class.php | 357 ++++++ .../modules/sd2nd/class/handler/Costume.class.php | 85 ++ .../sd2nd/class/handler/EnoPnoLink.class.php | 68 ++ .../modules/sd2nd/class/handler/Icon.class.php | 97 ++ .../modules/sd2nd/class/handler/Image.class.php | 94 ++ .../modules/sd2nd/class/handler/Kind.class.php | 118 ++ .../sd2nd/class/handler/LearnedAbility.class.php | 68 ++ .../sd2nd/class/handler/LearnedCostume.class.php | 74 ++ .../sd2nd/class/handler/LearnedSkill.class.php | 68 ++ .../modules/sd2nd/class/handler/Map.class.php | 370 ++++++ .../modules/sd2nd/class/handler/MapCache.class.php | 76 ++ .../modules/sd2nd/class/handler/MapName.class.php | 108 ++ .../modules/sd2nd/class/handler/MapSpot.class.php | 69 ++ .../modules/sd2nd/class/handler/Race.class.php | 67 ++ .../modules/sd2nd/class/handler/Skill.class.php | 125 ++ .../sd2nd/class/handler/SkillElementLink.class.php | 132 +++ .../modules/sd2nd/class/handler/Status.class.php | 100 ++ .../modules/sd2nd/class/handler/Target.class.php | 116 ++ .../modules/sd2nd/class/handler/Update.class.php | 126 ++ .../sd2nd/class/updater/AbstractProcess.class.php | 291 +++++ .../sd2nd/class/updater/Sd2ndUpdateUtils.class.php | 393 +++++++ .../sd2nd/class/updater/Sd2ndUpdater.class.php | 151 +++ .../sd2nd/class/updater/dispose/Backup.class.php | 221 ++++ .../updater/dispose/GarbageCollection.class.php | 100 ++ .../sd2nd/class/updater/dispose/MapCache.class.php | 50 + .../sd2nd/class/updater/dispose/Update.class.php | 53 + .../sd2nd/class/updater/execute/Chardata.class.php | 132 +++ .../sd2nd/class/updater/execute/Charlist.class.php | 38 + .../updater/execute/parser/Show_CharList.class.php | 37 + .../parser/charParser/Costume_Data.class.php | 130 +++ .../execute/parser/charParser/Field_Data.class.php | 81 ++ .../execute/parser/charParser/Icon_Data.class.php | 80 ++ .../execute/parser/charParser/Map_Data.class.php | 61 + .../parser/charParser/SAbility_Data.class.php | 122 ++ .../execute/parser/charParser/Show_Image.class.php | 73 ++ .../execute/parser/charParser/Show_Map.class.php | 183 +++ .../execute/parser/charParser/Show_Name.class.php | 34 + .../parser/charParser/Show_Profile.class.php | 57 + .../parser/charParser/Show_Status.class.php | 112 ++ .../parser/charParser/WSkill_Data.class.php | 183 +++ .../class/updater/prepare/AbilityList.class.php | 58 + .../class/updater/prepare/CostumeList.class.php | 58 + .../class/updater/prepare/DataConvert.class.php | 216 ++++ .../sd2nd/class/updater/prepare/KindList.class.php | 58 + .../class/updater/prepare/MapCollection.class.php | 71 ++ .../sd2nd/class/updater/prepare/RaceList.class.php | 58 + .../class/updater/prepare/RefleshTable.class.php | 152 +++ .../sd2nd/class/updater/prepare/Setup.class.php | 55 + .../class/updater/prepare/SkillList.class.php | 58 + .../sd2nd/class/updater/prepare/SpotList.class.php | 58 + .../class/updater/prepare/TargetList.class.php | 58 + .../sd2nd/forms/AbilityFilterForm.class.php | 83 ++ .../sd2nd/forms/ActiveAbilityFilterForm.class.php | 76 ++ .../sd2nd/forms/CostumeFilterForm.class.php | 104 ++ .../sd2nd/forms/LearnedAbilityFilterForm.class.php | 76 ++ .../sd2nd/forms/LearnedSkillFilterForm.class.php | 76 ++ .../modules/sd2nd/forms/SkillFilterForm.class.php | 99 ++ trust_path/modules/sd2nd/index.php | 17 + .../modules/sd2nd/language/english/admin.php | 8 + .../sd2nd/language/english/help/delegate.html | 37 + .../modules/sd2nd/language/english/help/help.html | 4 + trust_path/modules/sd2nd/language/english/main.php | 93 ++ .../modules/sd2nd/language/english/modinfo.php | 69 ++ .../modules/sd2nd/language/ja_utf8/admin.php | 8 + .../sd2nd/language/ja_utf8/help/delegate.html | 37 + .../modules/sd2nd/language/ja_utf8/help/help.html | 4 + trust_path/modules/sd2nd/language/ja_utf8/main.php | 93 ++ .../modules/sd2nd/language/ja_utf8/modinfo.php | 69 ++ .../modules/sd2nd/language/japanese/admin.php | 8 + .../sd2nd/language/japanese/help/delegate.html | 37 + .../modules/sd2nd/language/japanese/help/help.html | 4 + .../modules/sd2nd/language/japanese/main.php | 93 ++ .../modules/sd2nd/language/japanese/modinfo.php | 69 ++ .../modules/sd2nd/preload/AssetPreload.class.php | 108 ++ trust_path/modules/sd2nd/sql/mysql.sql | 246 ++++ .../sd2nd/templates/sd2nd_ability_list.html | 48 + .../sd2nd/templates/sd2nd_active_ability_list.html | 38 + .../sd2nd/templates/sd2nd_costume_list.html | 70 ++ .../modules/sd2nd/templates/sd2nd_index.html | 21 + .../templates/sd2nd_learned_ability_list.html | 19 + .../sd2nd/templates/sd2nd_learned_skill_list.html | 19 + .../modules/sd2nd/templates/sd2nd_map_view.html | 30 + .../modules/sd2nd/templates/sd2nd_skill_list.html | 73 ++ trust_path/modules/sd2nd/update.php | 38 + trust_path/modules/sd2nd/xoops_version.php | 181 +++ 177 files changed, 13153 insertions(+) create mode 100644 public_html/modules/sd2nd/admin/index.php create mode 100644 public_html/modules/sd2nd/images/down.gif create mode 100644 public_html/modules/sd2nd/images/icon/mapchip1.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip10.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip11.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip12.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip13.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip14.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip15.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip16.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip17.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip18.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip19.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip2.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip20.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip21.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip22.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip23.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip24.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip25.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip26.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip27.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip28.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip29.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip3.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip30.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip31.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip32.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip33.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip34.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip35.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip4.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip5.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip6.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip7.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip8.jpg create mode 100644 public_html/modules/sd2nd/images/icon/mapchip9.jpg create mode 100644 public_html/modules/sd2nd/images/index.html create mode 100644 public_html/modules/sd2nd/images/sd2nd.png create mode 100644 public_html/modules/sd2nd/images/up.gif create mode 100644 public_html/modules/sd2nd/index.php create mode 100644 public_html/modules/sd2nd/language/english/admin.php create mode 100644 public_html/modules/sd2nd/language/english/help/delegate.html create mode 100644 public_html/modules/sd2nd/language/english/help/help.html create mode 100644 public_html/modules/sd2nd/language/english/help/index.html create mode 100644 public_html/modules/sd2nd/language/english/index.html create mode 100644 public_html/modules/sd2nd/language/english/main.php create mode 100644 public_html/modules/sd2nd/language/english/modinfo.php create mode 100644 public_html/modules/sd2nd/language/index.html create mode 100644 public_html/modules/sd2nd/language/ja_utf8/admin.php create mode 100644 public_html/modules/sd2nd/language/ja_utf8/help/delegate.html create mode 100644 public_html/modules/sd2nd/language/ja_utf8/help/help.html create mode 100644 public_html/modules/sd2nd/language/ja_utf8/help/index.html create mode 100644 public_html/modules/sd2nd/language/ja_utf8/index.html create mode 100644 public_html/modules/sd2nd/language/ja_utf8/main.php create mode 100644 public_html/modules/sd2nd/language/ja_utf8/modinfo.php create mode 100644 public_html/modules/sd2nd/language/japanese/admin.php create mode 100644 public_html/modules/sd2nd/language/japanese/help/delegate.html create mode 100644 public_html/modules/sd2nd/language/japanese/help/help.html create mode 100644 public_html/modules/sd2nd/language/japanese/help/index.html create mode 100644 public_html/modules/sd2nd/language/japanese/index.html create mode 100644 public_html/modules/sd2nd/language/japanese/main.php create mode 100644 public_html/modules/sd2nd/language/japanese/modinfo.php create mode 100644 public_html/modules/sd2nd/preload/AssetPreload.class.php create mode 100644 public_html/modules/sd2nd/preload/index.html create mode 100644 public_html/modules/sd2nd/xoops_version.php create mode 100644 trust_path/modules/sd2nd/actions/AbilityListAction.class.php create mode 100644 trust_path/modules/sd2nd/actions/ActiveAbilityListAction.class.php create mode 100644 trust_path/modules/sd2nd/actions/CostumeListAction.class.php create mode 100644 trust_path/modules/sd2nd/actions/IndexAction.class.php create mode 100644 trust_path/modules/sd2nd/actions/LearnedAbilityListAction.class.php create mode 100644 trust_path/modules/sd2nd/actions/LearnedCostumeListAction.class.php create mode 100644 trust_path/modules/sd2nd/actions/LearnedSkillListAction.class.php create mode 100644 trust_path/modules/sd2nd/actions/MapViewAction.class.php create mode 100644 trust_path/modules/sd2nd/actions/SkillListAction.class.php create mode 100644 trust_path/modules/sd2nd/admin/class/Sd2ndAdminRenderSystem.class.php create mode 100644 trust_path/modules/sd2nd/admin/class/installer/Sd2ndInstallUtils.class.php create mode 100644 trust_path/modules/sd2nd/admin/class/installer/Sd2ndInstaller.class.php create mode 100644 trust_path/modules/sd2nd/admin/class/installer/Sd2ndUninstaller.class.php create mode 100644 trust_path/modules/sd2nd/admin/class/installer/Sd2ndUpdater.class.php create mode 100644 trust_path/modules/sd2nd/admin/index.php create mode 100644 trust_path/modules/sd2nd/class/AbstractAction.class.php create mode 100644 trust_path/modules/sd2nd/class/AbstractDeleteAction.class.php create mode 100644 trust_path/modules/sd2nd/class/AbstractEditAction.class.php create mode 100644 trust_path/modules/sd2nd/class/AbstractFilterForm.class.php create mode 100644 trust_path/modules/sd2nd/class/AbstractListAction.class.php create mode 100644 trust_path/modules/sd2nd/class/AbstractViewAction.class.php create mode 100644 trust_path/modules/sd2nd/class/AssetManager.class.php create mode 100644 trust_path/modules/sd2nd/class/Module.class.php create mode 100644 trust_path/modules/sd2nd/class/Sd2ndUtils.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Ability.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/ActiveAbility.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Char.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Costume.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/EnoPnoLink.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Icon.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Image.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Kind.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/LearnedAbility.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/LearnedCostume.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/LearnedSkill.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Map.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/MapCache.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/MapName.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/MapSpot.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Race.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Skill.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/SkillElementLink.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Status.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Target.class.php create mode 100644 trust_path/modules/sd2nd/class/handler/Update.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/AbstractProcess.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/Sd2ndUpdateUtils.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/Sd2ndUpdater.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/dispose/Backup.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/dispose/GarbageCollection.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/dispose/MapCache.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/dispose/Update.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/Chardata.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/Charlist.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/Show_CharList.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Costume_Data.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Field_Data.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Icon_Data.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Map_Data.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/SAbility_Data.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Image.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Map.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Name.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Profile.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Status.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/execute/parser/charParser/WSkill_Data.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/AbilityList.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/CostumeList.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/DataConvert.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/KindList.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/MapCollection.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/RaceList.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/RefleshTable.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/Setup.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/SkillList.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/SpotList.class.php create mode 100644 trust_path/modules/sd2nd/class/updater/prepare/TargetList.class.php create mode 100644 trust_path/modules/sd2nd/forms/AbilityFilterForm.class.php create mode 100644 trust_path/modules/sd2nd/forms/ActiveAbilityFilterForm.class.php create mode 100644 trust_path/modules/sd2nd/forms/CostumeFilterForm.class.php create mode 100644 trust_path/modules/sd2nd/forms/LearnedAbilityFilterForm.class.php create mode 100644 trust_path/modules/sd2nd/forms/LearnedSkillFilterForm.class.php create mode 100644 trust_path/modules/sd2nd/forms/SkillFilterForm.class.php create mode 100644 trust_path/modules/sd2nd/index.php create mode 100644 trust_path/modules/sd2nd/language/english/admin.php create mode 100644 trust_path/modules/sd2nd/language/english/help/delegate.html create mode 100644 trust_path/modules/sd2nd/language/english/help/help.html create mode 100644 trust_path/modules/sd2nd/language/english/main.php create mode 100644 trust_path/modules/sd2nd/language/english/modinfo.php create mode 100644 trust_path/modules/sd2nd/language/ja_utf8/admin.php create mode 100644 trust_path/modules/sd2nd/language/ja_utf8/help/delegate.html create mode 100644 trust_path/modules/sd2nd/language/ja_utf8/help/help.html create mode 100644 trust_path/modules/sd2nd/language/ja_utf8/main.php create mode 100644 trust_path/modules/sd2nd/language/ja_utf8/modinfo.php create mode 100644 trust_path/modules/sd2nd/language/japanese/admin.php create mode 100644 trust_path/modules/sd2nd/language/japanese/help/delegate.html create mode 100644 trust_path/modules/sd2nd/language/japanese/help/help.html create mode 100644 trust_path/modules/sd2nd/language/japanese/main.php create mode 100644 trust_path/modules/sd2nd/language/japanese/modinfo.php create mode 100644 trust_path/modules/sd2nd/preload/AssetPreload.class.php create mode 100644 trust_path/modules/sd2nd/sql/mysql.sql create mode 100644 trust_path/modules/sd2nd/templates/sd2nd_ability_list.html create mode 100644 trust_path/modules/sd2nd/templates/sd2nd_active_ability_list.html create mode 100644 trust_path/modules/sd2nd/templates/sd2nd_costume_list.html create mode 100644 trust_path/modules/sd2nd/templates/sd2nd_index.html create mode 100644 trust_path/modules/sd2nd/templates/sd2nd_learned_ability_list.html create mode 100644 trust_path/modules/sd2nd/templates/sd2nd_learned_skill_list.html create mode 100644 trust_path/modules/sd2nd/templates/sd2nd_map_view.html create mode 100644 trust_path/modules/sd2nd/templates/sd2nd_skill_list.html create mode 100644 trust_path/modules/sd2nd/update.php create mode 100644 trust_path/modules/sd2nd/xoops_version.php diff --git a/public_html/modules/sd2nd/admin/index.php b/public_html/modules/sd2nd/admin/index.php new file mode 100644 index 0000000..923b23f --- /dev/null +++ b/public_html/modules/sd2nd/admin/index.php @@ -0,0 +1,13 @@ + diff --git a/public_html/modules/sd2nd/images/down.gif b/public_html/modules/sd2nd/images/down.gif new file mode 100644 index 0000000000000000000000000000000000000000..eef0c4056fe663b52434642f65f76dd7b59ba8a3 GIT binary patch literal 212 zcmZ?wbhEHb72TtFA@c6~c*Eeq5 zy>j*Tn|FUpO4|1BKmGOR|3^>096ECT?fXyn?mxVA_0j+T{~7QC#h)yU3=E}>2{B_t954=@OFFo-aSFf%GKFbOg;3o`yc!XOWHJ}cOHAYXt1BNHWnyY(ZeeNV?BeR??&0Yb91<+v*#~fzWVs-^OvvRzW@073*;|G24;x2fFxFb2?G7a1d0Q8 zkiQt2%7K_!kcCyzkWI)jkUg=?T_li#PZdD)TCtl z5AVPE>6PW4^tC_kz57%$>)p3YuU^iQuC==+@g#KjG{bUjM!`={lf|Fy@B72~*uV9k z$<;cUKW-nEEnb-YOZLyUsAIjWZ|>cDb?TX%Fps6Z2U1EC9D|HF)_ebLHm$$0{qTQ= zt?cbz_y5q4Z?g$pTcf+R?_F%U$A`|NPoFHh<(w<#a$!Ty`KRqSmCWuuY>)c&{M(7Y z3+mI>|IpswS~6d##{Pr(!TXJMhL`tvuBqsLq~5(J{;~CH*121yZ%(>*Ok&BTSI>hJ z^RshJ`dO5$%j)$k9)%xfs4Kb{xBjwB~x zoo9ZT8rOku-<&3iU`+)bHPnUWNFRwU3t{{Kw? DM6Zou literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip10.jpg b/public_html/modules/sd2nd/images/icon/mapchip10.jpg new file mode 100644 index 0000000000000000000000000000000000000000..df67951222e7c8613711097675dfff659b9b9d56 GIT binary patch literal 997 zcmex=+mK z4OFmI0O)*XW}u^4fi4EBt_8|7un4jWDH=Mm2?r*!D;0_uHBMZ}q3pErplHy=4=Tn< zMNOPsV&W2#QmSg|8k$-rre@|AmR8O#u5Rugo?gKrp<&?>kx|JhscGpMnOVgprDf$6 zl~v6xt!?ccon4bAPnkMx`iz;g7A;<~blLJ1D_3pWyk+aQ?K^hvI&}ER(PPI?oIG{u z@|COCuHU$M>*1rvPo6$|{^I4UkDoq&`TFhqkDtFl{$gZchIk7|V)d6G&|gfTIA90) zi;<}uh?xahSQQP~gd79e6AOivj2byaoF*>Zc#u=sIOv0DQqe^&F%^@CsvkjK1N)3P zk2R6yGq}eP{<_7$!^{YbJZ3=#dxjsAzg7O=e{6p%{L#6YAKDLWzm+=o?ys|^=T@$Z zU%R$%ZZ?a*>CwAq&K?OkDw6l+&Kx}km4!*N^x0c|T3_;}UejvBRB;LS`~KBmHf@{d_ivy3;y-mC=fBy!>c^&I zm%nBFuwM7lPVRC^#agx9AH()smulNsvdQCot%=3wK6=a?i*(>^Nvfp)K z+rx=IeGx4Z%<5Z3zMHO$3Qc=C-tT-2q({Qo8Z<&#w0 literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip11.jpg b/public_html/modules/sd2nd/images/icon/mapchip11.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fbf79eefc4521dbd5e6693a748d507d6a5757790 GIT binary patch literal 1126 zcmex=+mK z4OFmI0O)*XW}u^4fi4EBt_8|7un4jWDH=Mm2?r*!D;0_uHBMZ}q3pErplHy=4=Tn< zMNOPsV&W2#QmSg|8k$-rre@|AmR8O#u5Rugo?gKrp<&?>kx|JhscGpMnOVgprDf$6 zl~v6xt!?ccon4bAPnkMx`iz;g7A;<~blLJ1D_3pWyk+aQ?K^hvI&}ER(PPI?oIG{u z@|COCuHU$M>*1rvPo6$|{^I4UkDoq&`TFhqkDtFl{$gZchIk7|V)d6G&|gfTIA90) zi;<}uh?xahSQQP~gd79e6AOivj2byaoF*>Zc#u=sIOv0DQqe^&F%^@CsvkjK1N)3P zk2R6yGq}eP{<_7$!^{YbJZ3=#dxj5ptsh?9-<-R4t!X`P#(#zn6S8($&UTM}S$CO# zzD%Ll1(QhYw2Jwy1#aI03@5lmrA_>p_URY5z0e=7%S$ewdHmL~#x^%4O#Bv4e8!DM zO6-a=-p6@bu1FfgKm0z~>)OrttI|I|Z`;Rs;iG!{ zt2AwslGjc_EmuCg3k>$2S#7z-C1ufr#}`fY(sspP*pvHkM~&g5*=L3QcUI5NNK?A^ zV8!1@WtNh>FL!#fOUeYst$cX@R{!z;4BTHTY~ zg~VB$R6TKel2^xL<5H1nvYzG7z5bPL5B?D2XWg-3M(2fvt*sS~J63I6Gik--O|$$s zm+D^1w6+bZl2g?&JU1_9^~9I68n>)gJEyFyZpnM8OZ#@F@z*|)M|ujUULWUgJ{G#v f_muuLQFV#Cr!;rFE-l+qd)g$>)%da8^Zz#i>qC$; literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip12.jpg b/public_html/modules/sd2nd/images/icon/mapchip12.jpg new file mode 100644 index 0000000000000000000000000000000000000000..56b17f7fcb6f683d688424d55fa73a9ec3b669bb GIT binary patch literal 1164 zcmex=}>2{B_t954=@OFFo-aSFf%GKFbOg;3o`yc!XOWHJ}cOHAYXt1BNHWnyY(ZeeNV?BeR??&0Yb91<+v*#~fzWVs-^OvvRzW@073*;|G24;x2fFxFb2?G7a1d0Q8 zkiQt2%7K_!kcCyzkWI)jkUg9@6755!s*P0*5$F*|>vDtuekwxC|U{|vvS z#lDvdSb9Eo+y*=S@pLvSpg(+_0-|_NCV7&N@6o3BSm40*fUiq@` zo4x)y3(p6ey{>3niJ3Ur>-X)Y=lMRwzg7Nt{^7eRyTqISsb!UwWq#MalyGYC2IdK(J;K{k~Ztu3~ W+WPwXidP|%r_6i1?e^E4|2F}%(X06Y literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip13.jpg b/public_html/modules/sd2nd/images/icon/mapchip13.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d5a9c8f91d9e940c46723f97c0185ea59b47904c GIT binary patch literal 1030 zcmex=+mK z4OFmI0O)*XW}u^4fi4EBt_8|7un4jWDH=Mm2?r*!D;0_uHBMZ}q3pErplHy=4=Tn< zMNOPsV&W2#QmSg|8k$-rre@|AmR8O#u5Rugo?gKrp<&?>kx|JhscGpMnOVgprDf$6 zl~v6xt!?ccon4bAPnkMx`iz;g7A;<~blLJ1D_3pWyk+aQ?K^hvI&}ER(PPI?oIG{u z@|COCuHU$M>*1rvPo6$|{^I4UkDoq&`TFhqkDtFl{$gZchIk7|V)d6G&|gfTIA90) zi;<}uh?xahSQQP~gd79e6AOivj2byaoF*>Zc#u=sIOv0DQqe^&F%^@CsvkjK1N)3P zk2R6yGq}eP{<_7$!^{YbJZ3=#dxpQO@s{MbLPKG`gJ`5%|Adw&%Dx2DE=LFTNM{b|1X-cu#+WqDi@*yL%tVy0N> zBc+c=49=?k_>=!p|G~HQi*B!Pv(u?ayB~bxO3!GsRq!sebvkeLW=6fbX6fTQ<4gzNrNR?m jY`!gDwI+L`2*VBr#{SROx-=LII2FEqU(}_+{Qo8ZD1Tx9 literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip14.jpg b/public_html/modules/sd2nd/images/icon/mapchip14.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7998a18a2f57b46635ae62fe64616fcfaf8b8343 GIT binary patch literal 1285 zcmex=}>2{B_t954=@OFFo-aSFf%GKFbOg;3o`yc!XOWHJ}cOHAYXt1BNHWnyY(ZeeNV?BeR??&0Yb91<+v*#~fzWVs-^OvvRzW@073*;|G24;x2fFxFb2?G7a1d0Q8 zkiQt2%7K_!kcCyzkWI)jkUgEl?x#||H!ZDh(4 zjLBNbdvw`Ml^&H{5mO)ces`P1`$=rdLU~0M&0p=0)Q`m94E{FjNA#on?ejONzn!?~ zNAsiDY3+q8UPi^Xekt~~iWaRDGu*|%%|F3&f5QFA6KB2t$MwTG;6wP4{Q`etFaAla z+Aj5MuGs9tWit}ZPV-bpM)S08e}3lYcAicSg||T#@;BT6aqj)C@$b02aLSLvzilei zKD&J6nHBS^{*@NYm`NYnPLs*z>Oc zBl+dH1NaMwAz=~u)Vx#FIwTAdbK<4eBX6OZc;DJiRJeK+svn|G0XZVoT1 zN@cCD?z9PCXYaki?D4x}d%k>I)OB3zQJw0kPp7sRRNT6;@<8)rndHka>N?kALY+Izd$mlr|1cJ0_V=X|-g#~cxYop0 whOIZZJbCw&@3z}_w|&k1o_;a$!xw`o%5E(pilV6!OD1`zOuDFgQ~v)=0NPpecK`qY literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip15.jpg b/public_html/modules/sd2nd/images/icon/mapchip15.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e3e292d1dc88e4b103799df5594ef39b90b59337 GIT binary patch literal 1121 zcmex=}>2{B_t954=@OFFo-aSFf%GKFbOg;3o`yc!XOWHJ}cOHAYXt1BNHWnyY(ZeeNV?BeR??&0Yb91<+v*#~fzWVs-^OvvRzW@073*;|G24;x2fFxFb2?G7a1d0Q8 zkiQt2%7K_!kcCyzkWI)jkUgMj2nwmolF-5|8S zWqoXVx7JFdX^M+7*;%Wm1|R$t{wb`m1ivqtvuNkKdwuV|ZMwXT=Q^j{t#~`7`D@{F@T! dnzzOM$(@KhJ0^>(@1C81c5n38{IL4}Hvu32n5_T+ literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip16.jpg b/public_html/modules/sd2nd/images/icon/mapchip16.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9913a2c20881e561bd2c28c6564bf9bd7a12a183 GIT binary patch literal 1109 zcmex=}>2{B_t954=@OFFo-aSFf%GKFbOg;3o`yc!XOWHJ}cOHAYXt1BNHWnyY(ZeeNV?BeR??&0Yb91<+v*#~fzWVs-^OvvRzW@073*;|G24;x2fFxFb2?G7a1d0Q8 zkiQt2%7K_!kcCyzkWI)jkUgwErWu6P;$p|7Ip(!F=D zRn|KLAEN0fhiQuo96N9-kEK91jTRsG_T zNq1Rty}T=J7Fw;Id*I|06`_JpxvV?X)_49BuQ9yzr}&}1pzDKN-IVFaw$0D&iCoe5 z#6uEcTRS@wZ41(o5h0Gv7+9U ze-0blaLBoo{0vP_yXQ3N*#5?=HfCB~Ph)n?Uv;lw+OD~N#(z})@@cFWzOYaI-{oEV zW=y}w^rLurMZb^EOSZ*p?zt|z`&44FyNTd=4IypKyQc(h1~un-#^r4I+%qe;_Qh3C z<7<0DAIkGq-1f@lKU(Dyer;aX{>f&AJ4%#U1S)N9eWRt)=Iko}W_82)n`?`cZq34{ zKP#Bi?#(VdW|h>Xt-U*9kv#v8?8EznFAF<;*w>oA?54|^i?<@8*BELhMRvF_@N881 Pc;%w2$h}>2{B_t954=@OFFo-aSFf%GKFbOg;3o`yc!XOWHJ}cOHAYXt1BNHWnyY(ZeeNV?BeR??&0Yb91<+v*#~fzWVs-^OvvRzW@073*;|G24;x2fFxFb2?G7a1d0Q8 zkiQt2%7K_!kcCyzkWI)jkUgEz==hjVnly>;r@WcHz`{QEiasjKJ7U%Y?B>TiGhqbs_)QolZFm+rcv$70|V zd+7Zn=R*qTBKsMbs>8$A-KcPWsJ8U+{MLEO7fs|PvOEr!mg z6t3xor=?61PVBg?_JEOT|K`Qfyi>1KL}`_3`R{(f=)-s%2R6U4-VoPrp(vw431IVt7o@l$3!3AxXg6`yBy cbgdTb>e}?5!T!t%jYVAxxHJ|u*#Ex?04se%mjD0& literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip18.jpg b/public_html/modules/sd2nd/images/icon/mapchip18.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9f0024f9730d41fda4f87fd2192bc2412e8b9c9b GIT binary patch literal 1190 zcmex=}>2{B_t954=@OFFo-aSFf%GKFbOg;3o`yc!XOWHJ}cOHAYXt1BNHWnyY(ZeeNV?BeR??&0Yb91<+v*#~fzWVs-^OvvRzW@073*;|G24;x2fFxFb2?G7a1d0Q8 zkiQt2%7K_!kcCyzkWI)jkUg^!bj=l_T-{>SP5LHtnt<|F?Zwyb}X`rvH2 zXY=9kYv1OnUM!UjKi|4m!gJpbn@@Y@B}{yKVUgK|CEG5xnSOfzNBH^i{|sB*56X*V z?U&l08e8IAnQ zI^B-%W82ilFaGgdP-+gl($=1BH*Z$&!EJr+tu2!_PF0>bcdCa(g1K0!#J}8W#ghZ4 z7<@W%NTw@miHz`+<#zEYSHrCjy8UP1>VE#NUj2c^{=+%^TuDZAQuV)mKl3*8J8 z)<;JLUUp46-?DuBylcU%XY{3eQe{1qm6e-a<38$5UiEU;kqcShC;AthiG1cgb#k5O z&(3phRiB%i_$)<24|xUp8b5h?rPnLVb9vou@fzlj_K(;Py>*HWJ|L&H>(aBiOg`7% z7%E5}d#cdfGbg2Ra+r literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip19.jpg b/public_html/modules/sd2nd/images/icon/mapchip19.jpg new file mode 100644 index 0000000000000000000000000000000000000000..99024d157d5511201588027aa61f9861d2eef97b GIT binary patch literal 1240 zcmex=}>2{B_t954=@OFFo-aSFf%GKFbOg;3o`yc!XOWHJ}cOHAYXt1BNHWnyY(ZeeNV?BeR??&0Yb91<+v*#~fzWVs-^OvvRzW@073*;|G24;x2fFxFb2?G7a1d0Q8 zkiQt2%7K_!kcCyzkWI)jkUg{~4OHV(Tv7 z-Mu6C((%^Et#7{X-JOy1$KeBi=RV1bZJ!Uu>2LgP`*+IhREL}F7aQO4ihikodvVFj zU(1huxsv~-;!@=oZTFcffjcAGPS`zO{?N51E^(rbo!L^WqVK_%e&6`B-{PTq(^>6+ z#eqd`zS{5errTwFtnaq*ef+-V`hKQ8$?NaEk`ua8Gk;q~ajZq>pOrxoKZ7L8_GCD) z)ZX{{bf2g0^nR8<(vRlaAB&Uvuw>h=wyE`^@8%o53THn#OP#NW+47vElQ{mdgQZ_dBLw@SCR1PR$H}vPZj0vyK-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-771b%&I5OX}oP~d_1ada`M7hhmT1Sd{BxM+RFbkD0LXOl8at4}Q7 zk*4!m_0-AzDu0eVSGKJ@c#vJDOFP2TOLJMt<&{!Xu1xm(yUlpTqOQ#ji@G$J|K9`v D)H^po literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip20.jpg b/public_html/modules/sd2nd/images/icon/mapchip20.jpg new file mode 100644 index 0000000000000000000000000000000000000000..101282cc5883f7733aadf96f18ab8b59aeb0061d GIT binary patch literal 759 zcmex=}>2{B_t954=@OFFo-aSFf%GKFbOg;3o`yc!XOWHJ}cOHAYXt1BNHWnyY(ZeeNV?BeR??&0Yb91<+v*#~fzWVs-^OvvRzW@073*;|G24;x2fFxFb2?G7a1d0Q8 zkiQt2%7K_!kcCyzkWI)jkUgW{0A<&Kgd|t*8C^qKZBIU5{088 Kfesh{-vj^-R@e>z literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip21.jpg b/public_html/modules/sd2nd/images/icon/mapchip21.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip22.jpg b/public_html/modules/sd2nd/images/icon/mapchip22.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip23.jpg b/public_html/modules/sd2nd/images/icon/mapchip23.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip24.jpg b/public_html/modules/sd2nd/images/icon/mapchip24.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip25.jpg b/public_html/modules/sd2nd/images/icon/mapchip25.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip26.jpg b/public_html/modules/sd2nd/images/icon/mapchip26.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip27.jpg b/public_html/modules/sd2nd/images/icon/mapchip27.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip28.jpg b/public_html/modules/sd2nd/images/icon/mapchip28.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip29.jpg b/public_html/modules/sd2nd/images/icon/mapchip29.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip3.jpg b/public_html/modules/sd2nd/images/icon/mapchip3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8d9d1db87dcee25c365360dcc1c7c9772adc2fe9 GIT binary patch literal 1336 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7Uo$I4j7 z0E125O&oXZ>hQ_`cFX@zEpNL1NdJ$pJ5aTdsePN-KJ$;JPoFL3J#%a6ttDr9qFT>r z{yuJhXyUO2=@z2*>u&5*_&a@n@_EJ|=||^T{$R+@t8uT}mYpcyu}&$v^3=+kdyLzx zXJ{Na_~c1=Smca~(nELT{UtjOM@{M~nlmLm=#yvc&7G@1N2;t{?Y;8rKe5C=dMhU< ze5%>4HrMN_qU7guCU-qg1?2hP_6zj9J^OCYq@LJGp09tHf9!wA-&@D~$8rA${q8Tt zyhr!UepnGYOY>n;nWwaXxuWcE0Y`==#<=VM8CZpW%zu2A{oAgOajg&63!Tqhbo(^- zi!z}-Lbg-aT+}^uAVNcT!7oN`QRDf_)Os8e}?rTzm|HVr+lzr9>4w3#1B)o-R5Zd83whQt1MPqb8B_l)wQMjo@@U$`_FLDtv;9kru<>! z3hf8-$EDv&yUlyJJXfunJNkCX#Em-_d(T)RDBR$8cBjpp>#>jPf9UYPegDzu*1hwO z%#ZSN$Ms#j`BpgMNByEZI(!A(8r4pW3du`F!iA0{J#YIav{Ie_>F%e$x7qyJ-D%OS z8~AIP(OSFs_DM?~=X;yxPyGC!;YfbRKBFI7AJ@7+GCv}l{Px$mwf1vs%XA;NSSM(3 u%XqDnYGrg<)fxcI&aNWi(s_PwKCB8^8MSz2;C8ilx36ydp8GZD|4jhboc@3S literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip30.jpg b/public_html/modules/sd2nd/images/icon/mapchip30.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip31.jpg b/public_html/modules/sd2nd/images/icon/mapchip31.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip32.jpg b/public_html/modules/sd2nd/images/icon/mapchip32.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip33.jpg b/public_html/modules/sd2nd/images/icon/mapchip33.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip34.jpg b/public_html/modules/sd2nd/images/icon/mapchip34.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip35.jpg b/public_html/modules/sd2nd/images/icon/mapchip35.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb6f1634414558aa6cd92bb8ec3eb36a313ff95a GIT binary patch literal 1120 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7{+)6-=l;#@A5WW}Y@INBr-IX&^CBH*H`G=?JTLqs`}IZGULX?Hgfo?4#Y< z6)bJ{E`|mtxb|H$oqAYOF5NZs+~e<8lcyEh#YPKC1|JSxn&*{SeRbWeEy-Njp%PB! zRhH)J>6*r;yVo|Ym9Rc%boWdD>ipIDPnWyYE_Y4-p?&m)K+WH4?Q}dNCmv-;f z`p+O}lgs*a%~_t0MmtzUOD!x8Yla1#I(1}y%WAK+QhjqhcAU(cwK;C(yg8|o+RICF zLgfX2#2=0`ycF&DF~9xIR&ViHnsMg?wt6ngRGOIDd&)v#lSjv^!U?CA6tRi~wLJIB a3M|VGx%RTzbG6Yoh8G%(x+c#5e-i+dIgJDW literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip4.jpg b/public_html/modules/sd2nd/images/icon/mapchip4.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fbbc9666ca88dc982c677c5a1ea540c433fbfcad GIT binary patch literal 1030 zcmex=K-INCc?K3iRv|@0M>gTWM0TY@5u?V53ptdXHXalWy7)oG zIH{I3zSIJR&kGIVCkMJtH%#xTLhK zyrQzIxuvzOy`!^h(&Q;qr%j(RbJn88OO`HMzGCI7O`ErD-L`$l&RvHNA31vL_=%IJ zE?vHI_1g6tH*Y5(N5-2^0tH zAb&A3l>;%eAPcLaA)An6AbVn=u#!j7{Xt-7i(c8~@ z&%RDbU+etny@-Bm&RadU`Kp)iWlg&l=+-07mKn-Dsfv{+;@4x*W5-uius>Gs&eh$@ z&vS3~Y>#zI+MX`smY z+9gkOf7Tya*AIsU--%hfBk8;G37eBk z$}{EMkFh-~OS9pN>NMEXpH95L{d*>~W2d)WD m??M?S`1$*nsefG5#l0z|(NRU_L*YT?ZPm3Ii@F&8-vj^}YG}#; literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip5.jpg b/public_html/modules/sd2nd/images/icon/mapchip5.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0bf3dbc761ada8d650e4acc4593c984f90a5ebc2 GIT binary patch literal 1282 zcmex=+mK z4OFmI0O)*XW}u^4fi4EBt_8|7un4jWDH=Mm2?r*!D;0_uHBMZ}q3pErplHy=4=Tn< zMNOPsV&W2#QmSg|8k$-rre@|AmR8O#u5Rugo?gKrp<&?>kx|JhscGpMnOVgprDf$6 zl~v6xt!?ccon4bAPnkMx`iz;g7A;<~blLJ1D_3pWyk+aQ?K^hvI&}ER(PPI?oIG{u z@|COCuHU$M>*1rvPo6$|{^I4UkDoq&`TFhqkDtFl{$gZchIk7|V)d6G&|gfTIA90) zi;<}uh?xahSQQP~gd79e6AOivj2byaoF*>Zc#u=sIOv0DQqe^&F%^@CsvkjK1N)3P zk2R6yGq}eP{<_7$!^{YbJZ3=#dxmee?Eg6WKWIOC|0a7ujpq;1kL@8>{wZYrlis#} zt8P8ZuGFWGkF8f-KW$>=M1~{BBz9`J#mKpq#BbF9Bd|K+hwn%Ef5P)`XCI!W-)T~M zDR#?Sd7oW7=5ge+beYFAO63L0d9b`ynbX{mUHy+^=JFr656W*`dcWsCLwY`6MSbwc zw(XC)Td%$S7F}MkOnZ;SXNe@gYqu6#{OM<(l%U=mwAQ}L>-Wv0rc2jK zXFe}4e)yxfX-B>3!GzDP%{{3n#ZS$iBK=*S+L?;TWeLPwSwvsfP2X=iR#!9{itywfuw5JjTEK|CBF} z`EmSrUiIx6`sq7=D;<6+spzD5=!4UW0FGCNbLLD6KmAx^jh$A>^qaZ0Xa1ExlFFJ^ z+uhXE6{?=GI#Mq^WzsIsvVH9>721!MA9>$)?)-=MkMwpgm_9RY@^AUDS+{GtIKu3r zc_v6Us4qyep7rXV%)cA;TiFlEvoCM36R#=!$kw>neTDSZ%Uf1o=1D7Z)Ny)TR@Srf zgoR9?YpT>#rOUp{wpnhtxh}JL$;*KC7Ow9WYpVS7yz%f)|bABsacsmvCrFBZdsSc%G{H8-xYcV&6%_0-Oc|u0YOOS(f|Me literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip6.jpg b/public_html/modules/sd2nd/images/icon/mapchip6.jpg new file mode 100644 index 0000000000000000000000000000000000000000..138dc374247686b1f7a80b9d98fb876085dd218c GIT binary patch literal 1221 zcmex=+mK z4OFmI0O)*XW}u^4fi4EBt_8|7un4jWDH=Mm2?r*!D;0_uHBMZ}q3pErplHy=4=Tn< zMNOPsV&W2#QmSg|8k$-rre@|AmR8O#u5Rugo?gKrp<&?>kx|JhscGpMnOVgprDf$6 zl~v6xt!?ccon4bAPnkMx`iz;g7A;<~blLJ1D_3pWyk+aQ?K^hvI&}ER(PPI?oIG{u z@|COCuHU$M>*1rvPo6$|{^I4UkDoq&`TFhqkDtFl{$gZchIk7|V)d6G&|gfTIA90) zi;<}uh?xahSQQP~gd79e6AOivj2byaoF*>Zc#u=sIOv0DQqe^&F%^@CsvkjK1N)3P zk2R6yGq}eP{<_7$!^{YbJZ3=#dxk@QyZ$pI%y0eAu$8YrdG#N^AA3_DWNYuvOpV?d zJ(EXu@d5p*tX;+e1$=DMDvH0DkH&v+<-f7q`NHh*_J3T=S}XWOFS|Fr*saBW=%`HN z>^8sl)r_zEXY5fooBlZe#@aV~EI+n~f0(xQp|$nx6<=+oUb$v_Pe{-3Jz}_cb_f5A zHOV(_Z~WAI`lzjVy{z4<1K9&5jt>~+oS zmwe}k@4N+1eI`xy3#g*LmmKy|N5C?X!Kmj$TU-*EcXLE`r=Nr cm-{VQEWXQk$v=;WCsm%z(pa=-@tprR0gdX#5dZ)H literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip7.jpg b/public_html/modules/sd2nd/images/icon/mapchip7.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ab5ca7453645510d731d538ba4bfdc2a2b79a6de GIT binary patch literal 1058 zcmex=+mK z4OFmI0O)*XW}u^4fi4EBt_8|7un4jWDH=Mm2?r*!D;0_uHBMZ}q3pErplHy=4=Tn< zMNOPsV&W2#QmSg|8k$-rre@|AmR8O#u5Rugo?gKrp<&?>kx|JhscGpMnOVgprDf$6 zl~v6xt!?ccon4bAPnkMx`iz;g7A;<~blLJ1D_3pWyk+aQ?K^hvI&}ER(PPI?oIG{u z@|COCuHU$M>*1rvPo6$|{^I4UkDoq&`TFhqkDtFl{$gZchIk7|V)d6G&|gfTIA90) zi;<}uh?xahSQQP~gd79e6AOivj2byaoF*>Zc#u=sIOv0DQqe^&F%^@CsvkjK1N)3P zk2R6yGq}eP{<_7$!^{YbJZ3=#dxjs^oiCc^3uRr%sFLlzbN9}^6Nx=V$A9q@c|KsA z9NXV%pZ1@jd!E>3m8-+d=fHu%7bxx?K?Kw_|9;){LJ*f}ZyHvMqs+2qvcvQ|=CZ$a)qC}QAAwE9tRe4dC z)YK>2h0okxIxCagdVY|<%0<`W!~9NDo?1An>)!G-fAwo#&+BU|StU+mK z4OFmI0O)*XW}u^4fi4EBt_8|7un4jWDH=Mm2?r*!D;0_uHBMZ}q3pErplHy=4=Tn< zMNOPsV&W2#QmSg|8k$-rre@|AmR8O#u5Rugo?gKrp<&?>kx|JhscGpMnOVgprDf$6 zl~v6xt!?ccon4bAPnkMx`iz;g7A;<~blLJ1D_3pWyk+aQ?K^hvI&}ER(PPI?oIG{u z@|COCuHU$M>*1rvPo6$|{^I4UkDoq&`TFhqkDtFl{$gZchIk7|V)d6G&|gfTIA90) zi;<}uh?xahSQQP~gd79e6AOivj2byaoF*>Zc#u=sIOv0DQqe^&F%^@CsvkjK1N)3P zk2R6yGq}eP{<_7$!^{YbJZ3=#dxjr<=MR|O7ygr3y?Fhxe!dFV2bYtk-Ln^ti@6;g z<7KwkY0`0#j=m6+ol}l2pUSfBs`>i=3~APTrTuqa)8C&xztvlI>6XbGwtk%QUFbw0 zH;c!^#<_PpxEAoOF>*L5@A&V4z34xU4NAx(#vKZ%AIz-(B~Sl8oxK! ze2iJ?s;wDyO6%IqoVv^zK@mBnUa_;?ZN+Bke4Y46S2~y>~>x5yxd5yQt8RNcmBT#089YtX8-^I literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/icon/mapchip9.jpg b/public_html/modules/sd2nd/images/icon/mapchip9.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f9ba25a098515f548f6d5ead12fe37c1a9f69877 GIT binary patch literal 1195 zcmex=+mK z4OFmI0O)*XW}u^4fi4EBt_8|7un4jWDH=Mm2?r*!D;0_uHBMZ}q3pErplHy=4=Tn< zMNOPsV&W2#QmSg|8k$-rre@|AmR8O#u5Rugo?gKrp<&?>kx|JhscGpMnOVgprDf$6 zl~v6xt!?ccon4bAPnkMx`iz;g7A;<~blLJ1D_3pWyk+aQ?K^hvI&}ER(PPI?oIG{u z@|COCuHU$M>*1rvPo6$|{^I4UkDoq&`TFhqkDtFl{$gZchIk7|V)d6G&|gfTIA90) zi;<}uh?xahSQQP~gd79e6AOivj2byaoF*>Zc#u=sIOv0DQqe^&F%^@CsvkjK1N)3P zk2R6yGq}eP{<_7$!^{YbJZ3=#dxkIPZ=L?frMvp|e+Hg^8b9t(kIcWtX~$a={4s6u+LyD|O*gq{ zw&mc{ZF7~4(kwmhIC7l|m{Y`Yklpk@!-JLo88-U2{}b@9{Ow(#e&n+1`Ysy}rK=^9 zi&Wf8tRaY7JSzIB|4r=U{|vYD{eHOGx9!ufvAME-tE_y~yi@ny z9}&BxdS=>-iBnZi>(ARg^T70Hci8V)EZSGMOfFz{@8#_?|4L5#XeVuO;PR2*QWKtg ze%j&ndRJA6-NYXgKU_XgFK(k;`oO-^PGZ|Nli8d0)lR)McS#dRLP(n%`-D@Da$BFp z^VdI^XTM4O(0QqdKMo(l57lpewJY|}+2wb9*T$VuoRG{X^-&rtdZRXU z_oQ5^OD{85JNfa(sfr#ysX4FQGra_-Or3jmw(n}&(0TpAw>EGpeEYtrOIvUGy88b& E0a>`c>i_@% literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/index.html b/public_html/modules/sd2nd/images/index.html new file mode 100644 index 0000000..2c5cdd3 --- /dev/null +++ b/public_html/modules/sd2nd/images/index.html @@ -0,0 +1 @@ + diff --git a/public_html/modules/sd2nd/images/sd2nd.png b/public_html/modules/sd2nd/images/sd2nd.png new file mode 100644 index 0000000000000000000000000000000000000000..225d105bfa72a562641efb1266653acb894f2164 GIT binary patch literal 1983 zcmd^<`#;l*AICqe!ip}4Q#z9*kKCq%$+fx9TxXWc5@(oZ-BiPe}2DTGzU9Naqt;10080$D>KwVQVvE| z6m;NUGT(L{git8T(gdg(kefSzLwL9?8~`3Oj_!FKK45vA70MO>NJ;=eO$30QgB5ia z0K%aFFz*QfdQ1S22`c0|8UO$YaIis}p9f)c64_yJ7pBv-AFtbACpw_y9b-Jx^%O`{ zQ|q--SOt@Zf!{Sa?u^ok&hiQGO7Z9TIS`yO=QGtu8@R0O_U0f{q$X8RC+}@bFHdF@ z{;*qkh=!lVQ-g}MB?+7bYD1M?wzaa$kN6-5{4+$q#N>b3WE z)LY%|SEYgzyx0p>u~Tw6pWdT;CO9FIttt_~!XYM7G)z_EA3yAJ(o3kysanm~=!?=R zps`3d($tT*G2-g3tKhQH7FSPt)RX+StE@;wZXmXrO{>6}#W6h`x5ozG(A}_??4oe_ zCW>J@Y}MN0uAAnmDfrA+G+bpEem>W5tgQtJ%l5QoMH^YHavTxAIn#skwPhodv6RUY zFFUmeM?+>fu9g+^K(P5~r_#W~vfvsdC@uQ08%D9i6zIhxK3PfCyc9PlMR$sCjh1LQ5a;dLphOwbE|cqz3CC)>)IX^B{G2PEWL1{Y8#-vA)(}rJI@;Z))XDHceoU#Cn&Tcv?dmzQ zxf-pmoVQi1IS`|lN2`v+W~hmHW?}3Nq;LfHrd|GAe_^t3mw1dHlx}^7{hu;Egm9W^l9>vO9+nI_53=ia$^CeJ|bgY23|nno*Dw*bp8- z)FUT-Y$$)`TpC`SwR#8amxzvp5$@lW<|1|JG?92r}*1NCPVtD5BhoF(=qP6YurEKY{=k-&*(MD-LeN89R$G)@QA~&0s_N<4Z z3If)bR`U&aW(OI!_rLTUn-u;@u6Yy_6*{b=rPVm(5TQ(VnDrxKTwVO!#pK%gSe5LD zXOSDQ*23dT6TYtfsQ!9P51wPXkM!^3TX6qUTqy@7)UdhTTfTo9$ws%+zR)6R)5AY}iu;uGbNojki`h5N8=y_kC|L%c! z#0ejxzE%+g=}HbP!stP3bM3wc9sdv)PS66pP4X6cw{|Zc?tvtiERKVzqOREIp(Ouv z+fadks8cwXnPIH+?Yh*L&>wl%?GFj#dq<<}jS=Lxs+Je-YDMToY!b*m`acCD8?Y7s zCJn{OcM$wHxh~CFg?3}UeeaHcN!tZWDN6O3w2tkYVKywxyGOCw$zpkDNisjDO>9vL zSHv+>3q6}H4XL}O%-O@S9xE7zs2lP3n32nc@>>6LjzYB3f*H=cJ1fK^QtiPY-A^Xs zm}`lc{<*xXHj^^n^wn|1D2OO?o)AWBo#VdummoaTMDswOU7%v%iTED=>EY*6 z_a)I`skO$1JA@aM4Z$G8Ya^GE>Ox;V&cG7oqO*q1Vf4CH`cTg zr`u){rA6H*3q(PX^Rfv=Z5ei7Q`bczD7Tj_whrxKZU33MXx^+g4FLQdVQll2z5OWH z{wi&F?=8H3_~w)0{&S6g6rZ(}IiF>!>^DQ(929BQ_i;&99sv9P#0{C>rvPrk$(PwB S*xUc_PlUOhS&fNj{Qm$5n>OtL literal 0 HcmV?d00001 diff --git a/public_html/modules/sd2nd/images/up.gif b/public_html/modules/sd2nd/images/up.gif new file mode 100644 index 0000000000000000000000000000000000000000..dfc0ef56c3fb9a01bd93afcc96fb8086c6b42308 GIT binary patch literal 212 zcmZ?wbhEHb72TtFA@c6~c*Eeq5 zy>j*Tn|FUpO4|1BKmGOR|3^>096WOV?fXyn?mxVA_0j+T{~7QC#h)yU3=Ejyrl0WGqtd)3O4ri diff --git a/public_html/modules/sd2nd/language/english/admin.php b/public_html/modules/sd2nd/language/english/admin.php new file mode 100644 index 0000000..9f66454 --- /dev/null +++ b/public_html/modules/sd2nd/language/english/admin.php @@ -0,0 +1,10 @@ + diff --git a/public_html/modules/sd2nd/language/english/help/delegate.html b/public_html/modules/sd2nd/language/english/help/delegate.html new file mode 100644 index 0000000..8b13be9 --- /dev/null +++ b/public_html/modules/sd2nd/language/english/help/delegate.html @@ -0,0 +1,37 @@ +

Delegate List

+ +
Module.sd2nd.Global.Event.GetAssetManager
+
+
Sd2nd_AssetManager
&$obj
+
string
$dirname
+
+ +
Module.sd2nd.Global.Event.Exception.ActionNotFound
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.ActionNotFound
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Preparation
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Preparation
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Permission
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Permission
+
+
void
+
diff --git a/public_html/modules/sd2nd/language/english/help/help.html b/public_html/modules/sd2nd/language/english/help/help.html new file mode 100644 index 0000000..794fd16 --- /dev/null +++ b/public_html/modules/sd2nd/language/english/help/help.html @@ -0,0 +1,4 @@ +

Input the title here

+
Summary
+

Even if the help is poor, some information shall help users. Try writing. Take it easy.

+
">Delegate List
diff --git a/public_html/modules/sd2nd/language/english/help/index.html b/public_html/modules/sd2nd/language/english/help/index.html new file mode 100644 index 0000000..2c5cdd3 --- /dev/null +++ b/public_html/modules/sd2nd/language/english/help/index.html @@ -0,0 +1 @@ + diff --git a/public_html/modules/sd2nd/language/english/index.html b/public_html/modules/sd2nd/language/english/index.html new file mode 100644 index 0000000..2c5cdd3 --- /dev/null +++ b/public_html/modules/sd2nd/language/english/index.html @@ -0,0 +1 @@ + diff --git a/public_html/modules/sd2nd/language/english/main.php b/public_html/modules/sd2nd/language/english/main.php new file mode 100644 index 0000000..d1a2125 --- /dev/null +++ b/public_html/modules/sd2nd/language/english/main.php @@ -0,0 +1,10 @@ + diff --git a/public_html/modules/sd2nd/language/english/modinfo.php b/public_html/modules/sd2nd/language/english/modinfo.php new file mode 100644 index 0000000..4350f09 --- /dev/null +++ b/public_html/modules/sd2nd/language/english/modinfo.php @@ -0,0 +1,10 @@ + diff --git a/public_html/modules/sd2nd/language/index.html b/public_html/modules/sd2nd/language/index.html new file mode 100644 index 0000000..2c5cdd3 --- /dev/null +++ b/public_html/modules/sd2nd/language/index.html @@ -0,0 +1 @@ + diff --git a/public_html/modules/sd2nd/language/ja_utf8/admin.php b/public_html/modules/sd2nd/language/ja_utf8/admin.php new file mode 100644 index 0000000..7bde059 --- /dev/null +++ b/public_html/modules/sd2nd/language/ja_utf8/admin.php @@ -0,0 +1,10 @@ + diff --git a/public_html/modules/sd2nd/language/ja_utf8/help/delegate.html b/public_html/modules/sd2nd/language/ja_utf8/help/delegate.html new file mode 100644 index 0000000..8b13be9 --- /dev/null +++ b/public_html/modules/sd2nd/language/ja_utf8/help/delegate.html @@ -0,0 +1,37 @@ +

Delegate List

+ +
Module.sd2nd.Global.Event.GetAssetManager
+
+
Sd2nd_AssetManager
&$obj
+
string
$dirname
+
+ +
Module.sd2nd.Global.Event.Exception.ActionNotFound
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.ActionNotFound
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Preparation
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Preparation
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Permission
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Permission
+
+
void
+
diff --git a/public_html/modules/sd2nd/language/ja_utf8/help/help.html b/public_html/modules/sd2nd/language/ja_utf8/help/help.html new file mode 100644 index 0000000..794fd16 --- /dev/null +++ b/public_html/modules/sd2nd/language/ja_utf8/help/help.html @@ -0,0 +1,4 @@ +

Input the title here

+
Summary
+

Even if the help is poor, some information shall help users. Try writing. Take it easy.

+
">Delegate List
diff --git a/public_html/modules/sd2nd/language/ja_utf8/help/index.html b/public_html/modules/sd2nd/language/ja_utf8/help/index.html new file mode 100644 index 0000000..2c5cdd3 --- /dev/null +++ b/public_html/modules/sd2nd/language/ja_utf8/help/index.html @@ -0,0 +1 @@ + diff --git a/public_html/modules/sd2nd/language/ja_utf8/index.html b/public_html/modules/sd2nd/language/ja_utf8/index.html new file mode 100644 index 0000000..2c5cdd3 --- /dev/null +++ b/public_html/modules/sd2nd/language/ja_utf8/index.html @@ -0,0 +1 @@ + diff --git a/public_html/modules/sd2nd/language/ja_utf8/main.php b/public_html/modules/sd2nd/language/ja_utf8/main.php new file mode 100644 index 0000000..d142880 --- /dev/null +++ b/public_html/modules/sd2nd/language/ja_utf8/main.php @@ -0,0 +1,10 @@ + diff --git a/public_html/modules/sd2nd/language/ja_utf8/modinfo.php b/public_html/modules/sd2nd/language/ja_utf8/modinfo.php new file mode 100644 index 0000000..56a96ca --- /dev/null +++ b/public_html/modules/sd2nd/language/ja_utf8/modinfo.php @@ -0,0 +1,10 @@ + diff --git a/public_html/modules/sd2nd/language/japanese/admin.php b/public_html/modules/sd2nd/language/japanese/admin.php new file mode 100644 index 0000000..7378151 --- /dev/null +++ b/public_html/modules/sd2nd/language/japanese/admin.php @@ -0,0 +1,10 @@ + diff --git a/public_html/modules/sd2nd/language/japanese/help/delegate.html b/public_html/modules/sd2nd/language/japanese/help/delegate.html new file mode 100644 index 0000000..8b13be9 --- /dev/null +++ b/public_html/modules/sd2nd/language/japanese/help/delegate.html @@ -0,0 +1,37 @@ +

Delegate List

+ +
Module.sd2nd.Global.Event.GetAssetManager
+
+
Sd2nd_AssetManager
&$obj
+
string
$dirname
+
+ +
Module.sd2nd.Global.Event.Exception.ActionNotFound
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.ActionNotFound
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Preparation
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Preparation
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Permission
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Permission
+
+
void
+
diff --git a/public_html/modules/sd2nd/language/japanese/help/help.html b/public_html/modules/sd2nd/language/japanese/help/help.html new file mode 100644 index 0000000..794fd16 --- /dev/null +++ b/public_html/modules/sd2nd/language/japanese/help/help.html @@ -0,0 +1,4 @@ +

Input the title here

+
Summary
+

Even if the help is poor, some information shall help users. Try writing. Take it easy.

+
">Delegate List
diff --git a/public_html/modules/sd2nd/language/japanese/help/index.html b/public_html/modules/sd2nd/language/japanese/help/index.html new file mode 100644 index 0000000..2c5cdd3 --- /dev/null +++ b/public_html/modules/sd2nd/language/japanese/help/index.html @@ -0,0 +1 @@ + diff --git a/public_html/modules/sd2nd/language/japanese/index.html b/public_html/modules/sd2nd/language/japanese/index.html new file mode 100644 index 0000000..2c5cdd3 --- /dev/null +++ b/public_html/modules/sd2nd/language/japanese/index.html @@ -0,0 +1 @@ + diff --git a/public_html/modules/sd2nd/language/japanese/main.php b/public_html/modules/sd2nd/language/japanese/main.php new file mode 100644 index 0000000..8b76e91 --- /dev/null +++ b/public_html/modules/sd2nd/language/japanese/main.php @@ -0,0 +1,10 @@ + diff --git a/public_html/modules/sd2nd/language/japanese/modinfo.php b/public_html/modules/sd2nd/language/japanese/modinfo.php new file mode 100644 index 0000000..5aa6db6 --- /dev/null +++ b/public_html/modules/sd2nd/language/japanese/modinfo.php @@ -0,0 +1,10 @@ + diff --git a/public_html/modules/sd2nd/preload/AssetPreload.class.php b/public_html/modules/sd2nd/preload/AssetPreload.class.php new file mode 100644 index 0000000..8b393ea --- /dev/null +++ b/public_html/modules/sd2nd/preload/AssetPreload.class.php @@ -0,0 +1,18 @@ + diff --git a/public_html/modules/sd2nd/preload/index.html b/public_html/modules/sd2nd/preload/index.html new file mode 100644 index 0000000..2c5cdd3 --- /dev/null +++ b/public_html/modules/sd2nd/preload/index.html @@ -0,0 +1 @@ + diff --git a/public_html/modules/sd2nd/xoops_version.php b/public_html/modules/sd2nd/xoops_version.php new file mode 100644 index 0000000..ffa2bbd --- /dev/null +++ b/public_html/modules/sd2nd/xoops_version.php @@ -0,0 +1,16 @@ + diff --git a/trust_path/modules/sd2nd/actions/AbilityListAction.class.php b/trust_path/modules/sd2nd/actions/AbilityListAction.class.php new file mode 100644 index 0000000..f91045b --- /dev/null +++ b/trust_path/modules/sd2nd/actions/AbilityListAction.class.php @@ -0,0 +1,77 @@ +mAsset->getObject('handler', 'ability'); + return $handler; + } + + /** + * &_getFilterForm + * + * @param void + * + * @return Sd2nd_AbilityFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Sd2nd_AbilityFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'ability',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } + + /** + * _getBaseUrl + * + * @param void + * + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=AbilityList'; + } + + /** + * executeViewIndex + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_ability_list.html'); + #cubson::lazy_load_array('ability', $this->mObjects); + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + $render->setAttribute('updateHandler',$this->_mUpdateHandler); + } +} + +?> diff --git a/trust_path/modules/sd2nd/actions/ActiveAbilityListAction.class.php b/trust_path/modules/sd2nd/actions/ActiveAbilityListAction.class.php new file mode 100644 index 0000000..6d8ff5e --- /dev/null +++ b/trust_path/modules/sd2nd/actions/ActiveAbilityListAction.class.php @@ -0,0 +1,94 @@ +mAsset->getObject('handler', 'char'); + return $handler; + } + + /** + * &_getFilterForm + * + * @param void + * + * @return Sd2nd_ActiveAbilityFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Sd2nd_ActiveAbilityFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'activeAbility',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } + + /** + * _getBaseUrl + * + * @param void + * + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=ActiveAbilityList'; + } + + /** + * getDefaultView + * + * @param void + * + * @return Enum + **/ + public function getDefaultView() + { + $this->mFilter =& $this->_getFilterForm(); + $this->mFilter->fetch(); + + $handler =& $this->_getHandler(); + $this->mObjects =& $handler->getActiveAbility($this->mFilter->getCriteria()); + + return SD2ND_FRAME_VIEW_INDEX; + } + + /** + * executeViewIndex + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_active_ability_list.html'); + #cubson::lazy_load_array('active_ability', $this->mObjects); + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + } +} + +?> diff --git a/trust_path/modules/sd2nd/actions/CostumeListAction.class.php b/trust_path/modules/sd2nd/actions/CostumeListAction.class.php new file mode 100644 index 0000000..2d91eea --- /dev/null +++ b/trust_path/modules/sd2nd/actions/CostumeListAction.class.php @@ -0,0 +1,77 @@ +mAsset->getObject('handler', 'costume'); + return $handler; + } + + /** + * &_getFilterForm + * + * @param void + * + * @return Sd2nd_CostumeFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Sd2nd_CostumeFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'costume',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } + + /** + * _getBaseUrl + * + * @param void + * + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=CostumeList'; + } + + /** + * executeViewIndex + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_costume_list.html'); + #cubson::lazy_load_array('costume', $this->mObjects); + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + $render->setAttribute('updateHandler',$this->_mUpdateHandler); + } +} + +?> diff --git a/trust_path/modules/sd2nd/actions/IndexAction.class.php b/trust_path/modules/sd2nd/actions/IndexAction.class.php new file mode 100644 index 0000000..6fd4175 --- /dev/null +++ b/trust_path/modules/sd2nd/actions/IndexAction.class.php @@ -0,0 +1,43 @@ +setTemplateName($this->mAsset->mDirname . '_index.html'); + } +} + +?> diff --git a/trust_path/modules/sd2nd/actions/LearnedAbilityListAction.class.php b/trust_path/modules/sd2nd/actions/LearnedAbilityListAction.class.php new file mode 100644 index 0000000..42ab0cf --- /dev/null +++ b/trust_path/modules/sd2nd/actions/LearnedAbilityListAction.class.php @@ -0,0 +1,94 @@ +mAsset->getObject('handler', 'char'); + return $handler; + } + + /** + * &_getFilterForm + * + * @param void + * + * @return Sd2nd_LearnedAbilityFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Sd2nd_LearnedAbilityFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'learnedAbility',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } + + /** + * _getBaseUrl + * + * @param void + * + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=LearnedAbilityList'; + } + + /** + * getDefaultView + * + * @param void + * + * @return Enum + **/ + public function getDefaultView() + { + $this->mFilter =& $this->_getFilterForm(); + $this->mFilter->fetch(); + + $handler =& $this->_getHandler(); + $this->mObjects =& $handler->getLearnedAbility($this->mFilter->getCriteria()); + + return SD2ND_FRAME_VIEW_INDEX; + } + + /** + * executeViewIndex + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_learned_ability_list.html'); + #cubson::lazy_load_array('learned_ability', $this->mObjects); + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + } +} + +?> diff --git a/trust_path/modules/sd2nd/actions/LearnedCostumeListAction.class.php b/trust_path/modules/sd2nd/actions/LearnedCostumeListAction.class.php new file mode 100644 index 0000000..0f1b5e7 --- /dev/null +++ b/trust_path/modules/sd2nd/actions/LearnedCostumeListAction.class.php @@ -0,0 +1,76 @@ +mAsset->getObject('handler', 'learned_costume'); + return $handler; + } + + /** + * &_getFilterForm + * + * @param void + * + * @return Sd2nd_LearnedCostumeFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Sd2nd_LearnedCostumeFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'learned_costume',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } + + /** + * _getBaseUrl + * + * @param void + * + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=LearnedCostumeList'; + } + + /** + * executeViewIndex + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_learned_costume_list.html'); + #cubson::lazy_load_array('learned_costume', $this->mObjects); + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + } +} + +?> diff --git a/trust_path/modules/sd2nd/actions/LearnedSkillListAction.class.php b/trust_path/modules/sd2nd/actions/LearnedSkillListAction.class.php new file mode 100644 index 0000000..f50fead --- /dev/null +++ b/trust_path/modules/sd2nd/actions/LearnedSkillListAction.class.php @@ -0,0 +1,94 @@ +mAsset->getObject('handler', 'char'); + return $handler; + } + + /** + * &_getFilterForm + * + * @param void + * + * @return Sd2nd_LearnedSkillFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Sd2nd_LearnedSkillFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'learnedSkill',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } + + /** + * _getBaseUrl + * + * @param void + * + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=LearnedSkillList'; + } + + /** + * getDefaultView + * + * @param void + * + * @return Enum + **/ + public function getDefaultView() + { + $this->mFilter =& $this->_getFilterForm(); + $this->mFilter->fetch(); + + $handler =& $this->_getHandler(); + $this->mObjects =& $handler->getLearnedSkill($this->mFilter->getCriteria()); + + return SD2ND_FRAME_VIEW_INDEX; + } + + /** + * executeViewIndex + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_learned_skill_list.html'); + #cubson::lazy_load_array('learned_skill', $this->mObjects); + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + } +} + +?> diff --git a/trust_path/modules/sd2nd/actions/MapViewAction.class.php b/trust_path/modules/sd2nd/actions/MapViewAction.class.php new file mode 100644 index 0000000..acc7d1e --- /dev/null +++ b/trust_path/modules/sd2nd/actions/MapViewAction.class.php @@ -0,0 +1,73 @@ +_mUpdateHandler =& $this->mAsset->getObject('handler','update'); + $this->_mMapNameHandler =& $this->mAsset->getObject('handler','mapName'); + if(!$this->_mMapNameHandler->isValid($mapId = $this->mRoot->mContext->mRequest->getRequest('map'))) + { + $mapId = 1; + } + if(intval($updateTime = $this->mRoot->mContext->mRequest->getRequest('update_time')) == null) + { + $updateTime = $this->_mUpdateHandler->getLatestUpdate()->get('update_time'); + } + if($updateTime == null) + { + $updateTime = 999999; + } + + $handler =& $this->mAsset->getObject('handler', 'map'); + $this->_mMapCollection = $handler->getCollection($updateTime,$updateTime,$mapId); + $this->_mMapNameObject =& $this->_mMapNameHandler->get($mapId); + + return SD2ND_FRAME_VIEW_INDEX; + } + + /** + * executeViewIndex + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_map_view.html'); + + $render->setAttribute('map',$this->_mMapCollection); + $render->setAttribute('updateHandler',$this->_mUpdateHandler); + $render->setAttribute('mapNameHandler',$this->_mMapNameHandler); + $render->setAttribute('mapName',$this->_mMapNameObject); + } +} + +?> diff --git a/trust_path/modules/sd2nd/actions/SkillListAction.class.php b/trust_path/modules/sd2nd/actions/SkillListAction.class.php new file mode 100644 index 0000000..a32d894 --- /dev/null +++ b/trust_path/modules/sd2nd/actions/SkillListAction.class.php @@ -0,0 +1,101 @@ +mAsset->getObject('handler', 'skill'); + return $handler; + } + + /** + * &_getFilterForm + * + * @param void + * + * @return Sd2nd_SkillFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Sd2nd_SkillFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'skill',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } + + /** + * _getBaseUrl + * + * @param void + * + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=SkillList'; + } + + /** + * getDefaultView + * + * @param void + * + * @return Enum + **/ + public function getDefaultView() + { + $this->mFilter =& $this->_getFilterForm(); + $this->mFilter->fetch(); + + $handler =& $this->_getHandler(); + $this->mObjects =& $handler->getObjects($this->mFilter->getCriteria(),null,null,true); + + return SD2ND_FRAME_VIEW_INDEX; + } + + /** + * executeViewIndex + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_skill_list.html'); + #cubson::lazy_load_array('skill', $this->mObjects); + $handler =& $this->mAsset->getObject('handler','SkillElementLink'); + $handler->setupSkillElement($this->mObjects); + + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + $render->setAttribute('updateHandler',$this->_mUpdateHandler); + $render->setAttribute('targetHandler',$this->mAsset->getObject('handler','target')); + $render->setAttribute('kindHandler',$this->mAsset->getObject('handler','kind')); + $render->setAttribute('elementLinkHandler',$handler); + } +} + +?> diff --git a/trust_path/modules/sd2nd/admin/class/Sd2ndAdminRenderSystem.class.php b/trust_path/modules/sd2nd/admin/class/Sd2ndAdminRenderSystem.class.php new file mode 100644 index 0000000..0793c92 --- /dev/null +++ b/trust_path/modules/sd2nd/admin/class/Sd2ndAdminRenderSystem.class.php @@ -0,0 +1,304 @@ +mController =& $controller; + + $this->mSmarty =& new Legacy_AdminSmarty(); // TODO will be use other class? + $this->mSmarty->register_modifier('theme',array($this,'modifierTheme')); + $this->mSmarty->register_function('stylesheet',array($this,'functionStylesheet')); + + $this->mSmarty->assign( + array( + 'xoops_url' => XOOPS_URL, + 'xoops_rootpath' => XOOPS_ROOT_PATH, + 'xoops_langcode' => _LANGCODE, + 'xoops_charset' => _CHARSET, + 'xoops_version' => XOOPS_VERSION, + 'xoops_upload_url' => XOOPS_UPLOAD_URL + ) + ); + + // TODO event name is this? + XCube_DelegateUtils::call('XoopsTpl.New',new XCube_Ref($this->mSmarty)); + + $this->mSmarty->force_compile = ( + $controller->mRoot->mSiteConfig['Legacy_AdminRenderSystem']['ThemeDevelopmentMode'] || + $controller->mRoot->mContext->getXoopsConfig('theme_fromfile') + ); + } + + /** + * renderBlock + * + * @param XCube_RenderTarget &$target + * + * @return void + **/ + public function renderBlock(/*** XCube_RenderTarget ***/ &$target) + { + parent::renderBlock($target); // TODO will be use other method + } + + /** + * renderTheme + * + * @param XCube_RenderTarget &$target + * + * @return void + **/ + public function renderTheme(/*** XCube_RenderTarget ***/ &$target) + { + $module =& $this->mController->getVirtualCurrentModule(); + $context =& $this->mController->mRoot->getContext(); + $this->mSmarty->assign($target->getAttributes()); + $this->mSmarty->assign( + array( + 'stdout_buffer' => $this->_mStdoutBuffer, + 'currentModule' => $module, + 'legacy_sitename' => $context->getAttribute('legacy_sitename'), + 'legacy_pagetitle' => $context->getAttribute('legacy_pagetitle'), + 'legacy_slogan' => $context->getAttribute('legacy_slogan') + ) + ); + + $blocks = array(); + foreach($context->mAttributes['legacy_BlockContents'][0] as $block) + { + $blocks[$block['name']] = $block; + } + $this->mSmarty->assign('xoops_lblocks',$blocks); + + $info = Sd2nd_AdminRenderSystem::getOverrideFileInfo('admin_theme.html'); + $this->mSmarty->template_dir = ($info['file'] != null) ? + substr($file['path'],0,-15) : + SD2ND_ADMIN_RENDER_FALLBACK_PATH; + $this->mSmarty->setModulePrefix(''); + + $target->setResult($this->mSmarty->fetch('file:admin_theme.html')); + } + + /** + * renderMain + * + * @param XCube_RenderTarget &$target + * + * @return void + **/ + public function renderMain(/*** XCube_RenderTarget ***/ &$target) + { + $info = Sd2nd_AdminRenderSystem::getOverrideFileInfo($target->getTemplateName()); + $this->mSmarty->compile_id = $info['dirname']; + $this->mSmarty->assign($target->getAttributes()); + $this->mSmarty->template_dir = substr($info['path'],0,-strlen($info['file'])); + + $res =& $this->mSmarty->fetch('file:' . $info['file']); + $target->setResult($res); + $this->_mStdoutBuffer .= $target->getAttribute('stdout_buffer'); + + foreach($target->getAttributes() as $key => $val) + { + $this->mSmarty->clear_assign($key); + } + } + + /** + * getOverrideFileInfo + * + * @param string $file + * @param string $prefix + * @param bool $isSpDirName + * + * @return {string 'theme',string 'file',string 'dirname'} + **/ + public static function getOverrideFileInfo(/*** string ***/ $file,/*** string ***/ $prefix = null,/*** bool ***/ $isSpDirName = false) + { + $ret = array( + 'url' => null, + 'path' => null, + 'theme' => null, + 'dirname' => null, + 'file' => null + ); + if(strpos($file,'..') !== false || strpos($prefix,'..' !== false)) + { + return $ret; + } + $root =& XCube_Root::getSingleton(); + + $module =& $root->mContext->mXoopsModule; + $dirName = $root->mContext->mRequest->getRequest('dirname'); + if($isSpDirName && preg_match('/^\w+$/',$dirName)) + { + $handler =& Sd2nd_Utils::getXoopsHandler('module'); + $module =& $handler->getByDirname($dirName); + } + + $isModule = is_object($module); + $theme = $root->mSiteConfig['Legacy']['Theme']; + $ret['theme'] = $theme; + $dirName = $isModule ? $module->get('dirname') : null; + $trustDirName = $isModule ? $module->getInfo('trust_dirname') : null; + $ret['file'] = $file; + + $file = $prefix . $file; + + switch(true) + { + case $isModule && file_exists( + $path = sprintf( + '%s/modules/%s/%s', + XOOPS_THEME_PATH,$theme,$dirName,$file + ) + ): + $ret['url'] = sprintf( + '%s/%s/modules/%s/%s', + XOOPS_THEME_URL,$theme,$dirName,$file + ); + $ret['path'] = $path; + return $ret; + case $isModule && file_exists( + $path = sprintf( + '%s/themes/%s/modules/%s/%s', + XOOPS_TRUST_PATH,$theme,$trustDirName,$file + ) + ): + $ret['path'] = $path; + $ret['dirname'] = $trustDirName; + return $ret; + case file_exists( + $path = sprintf( + '%s/%s/%s', + XOOPS_THEME_PATH,$theme,$file + ) + ): + $ret['url'] = sprintf( + '%s/%s/%s', + XOOPS_THEME_URL,$theme,$file + ); + $ret['path'] = $path; + $ret['dirname'] = null; + return $ret; + case file_exists( + $path = sprintf( + '%s/themes/%s/%s', + XOOPS_TRUST_PATH,$theme,$file + ) + ): + $ret['path'] = $path; + $ret['dirname'] = null; + return $ret; + case $isModule && file_exists( + $path = sprintf( + '%s/%s/admin/templates/%s', + XOOPS_MODULE_PATH,$dirName,$file + ) + ): + $ret['url'] = sprintf( + '%s/%s/admin/templates/%s', + XOOPS_MODULE_URL,$dirName,$file + ); + $ret['path'] = $path; + $ret['theme'] = null; + return $ret; + case $isModule && file_exists( + $path = sprintf( + '%s/modules/%s/admin/templates/%s', + XOOPS_TRUST_PATH,$trustDirName,$file + ) + ): + $ret['path'] = $path; + $ret['theme'] = null; + $ret['dirname'] = $trustDirName; + return $ret; + case file_exists($path = SD2ND_ADMIN_RENDER_FALLBACK_PATH . '/' .$file): + $ret['url'] = SD2ND_ADMIN_RENDER_FALLBACK_URL . '/' . $file; + $ret['path'] = $path; + $ret['theme'] = null; + $ret['dirname'] = null; + return $ret; + default: + $ret['theme'] = null; + $ret['dirname'] = null; + $ret['file'] = null; + return $ret; + } + } + + /** + * modifierTheme + * + * @param string $str + * + * @return string + **/ + public static function modifierTheme(/*** string ***/ $str) + { + $info = Sd2nd_AdminRenderSystem::getOverrideFileInfo($str); + if($info['url'] != null) + { + return $info['url']; + } + return SD2ND_ADMIN_RENDER_FALLBACK_URL . '/' . $str; + } + + /** + * functionStylesheet + * + * @param {string 'file',string 'media'} $param + * @param Smarty &$smarty + * + * @return void + **/ + public static function functionStylesheet(/*** {string 'file',string 'media'} ***/ $param,/*** Smarty ***/ &$smarty) + { + if(!isset($params['file']) || strpos($params['file'],'..') !== false) + { + return; + } + + $info = Sd2nd_AdminRenderSystem::getOverrideFileInfo($params['file'],'stylesheets/'); + if($info['file'] == null) + { + return; + } + + // TODO will be use other method + printf( + '', + (isset($params['media']) ? $params['media'] : 'all'), + XOOPS_MODULE_URL, + $info['file'], + ($info['dirname'] != null ? '&dirname=' . $info['dirname'] : ''), + ($info['theme'] != null ? '&theme=' . $info['theme'] : '') + ); + } +} + +?> diff --git a/trust_path/modules/sd2nd/admin/class/installer/Sd2ndInstallUtils.class.php b/trust_path/modules/sd2nd/admin/class/installer/Sd2ndInstallUtils.class.php new file mode 100644 index 0000000..be06ce5 --- /dev/null +++ b/trust_path/modules/sd2nd/admin/class/installer/Sd2ndInstallUtils.class.php @@ -0,0 +1,1234 @@ +getInfo('sqlfile'); + if(!isset($sqlFileInfo[XOOPS_DB_TYPE])) + { + return true; + } + $sqlFile = $sqlFileInfo[XOOPS_DB_TYPE]; + + $dirname = $module->getVar('dirname'); + $sqlFilePath = sprintf('%s/%s/%s',XOOPS_MODULE_PATH,$dirname,$sqlFile); + if(!file_exists($sqlFilePath)) + { + $sqlFilePath = sprintf( + '%s/modules/%s/%s', + XOOPS_TRUST_PATH, + $module->modinfo['trust_dirname'], + $sqlFile + ); + } + + require_once XOOPS_MODULE_PATH . '/legacy/admin/class/Legacy_SQLScanner.class.php'; // TODO will be use other class? + $scanner =& new Legacy_SQLScanner(); + $scanner->setDB_PREFIX(XOOPS_DB_PREFIX); + $scanner->setDirname($dirname); + if(!$scanner->loadFile($sqlFilePath)) + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_SQL_FILE_NOT_FOUND, + $sqlFile + ) + ); + return false; + } + + $scanner->parse(); + $root =& XCube_Root::getSingleton(); + $db =& $root->mController->getDB(); + + foreach($scanner->getSQL() as $sql) + { + if(!$db->query($sql)) + { + $log->addError($db->error()); + return false; + } + } + $log->addReport(_MI_SD2ND_INSTALL_MSG_DB_SETUP_FINISHED); + return true; + } + + /** + * DBquery + * + * @param string $query + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function DBquery(/*** string ***/ $query,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + require_once XOOPS_MODULE_PATH . '/legacy/admin/class/Legacy_SQLScanner.class.php'; // TODO will be use other class? + $scanner =& new Legacy_SQLScanner(); + $scanner->setDB_PREFIX(XOOPS_DB_PREFIX); + $scanner->setDirname($module->get('dirname')); + $scanner->setBuffer($query); + $scanner->parse(); + $sqls = $scanner->getSQL(); + + $root =& XCube_Root::getSingleton(); + + $successFlag = true; + foreach($sqls as $sql) + { + if($root->mController->mDB->query($sql)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_SQL_SUCCESS, + $sql + ) + ); + } + else + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_SQL_ERROR, + $sql + ) + ); + $successFlag = false; + } + } + return $successFlag; + } + + /** + * replaceDirname + * + * @param string $from + * @param string $dirname + * @param string $trustDirname + * + * @return {string 'public',string 'trust'} + **/ + public static function replaceDirname(/*** string ***/ $from,/*** string ***/ $dirname,/*** string ***/ $trustDirname = null) + { + return array( + 'public' => str_replace('{dirname}',$dirname,$from), + 'trust' => ($trustDirname != null) ? str_replace('{dirname}',$trustDirname,$from) : null + ); + } + + /** + * readTemplateFile + * + * @param string $dirname + * @param string $trustDirname + * @param string $filename + * @param bool $isBlock + * + * @return string + **/ + public static function readTemplateFile(/*** string ***/ $dirname,/*** string ***/ $trustDirname,/*** string ***/ $filename,/*** bool ***/ $isBlock = false) + { + $filePath = sprintf( + '%s/%s/templates/%s%s', + XOOPS_MODULE_PATH, + $dirname, + ($isBlock ? 'blocks/' : ''), + $filename + ); + + if(!file_exists($filePath)) + { + $filePath = sprintf( + '%s/modules/%s/templates/%s%s', + XOOPS_TRUST_PATH, + $trustDirname, + ($isBlock ? 'blocks/' : ''), + $filename + ); + if(!file_exists($filePath)) + { + return false; + } + } + + if(!($lines = file($filePath))) + { + return false; + } + + $tplData = ''; + foreach($lines as $line) + { + $tplData .= str_replace("\n","\r\n",str_replace("\r\n","\n",$line)); + } + + return $tplData; + } + + /** + * installAllOfModuleTemplates + * + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return void + **/ + public static function installAllOfModuleTemplates(/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $templates =& $module->getInfo('templates'); + if(is_array($templates) && count($templates) > 0) + { + foreach($templates as $template) + { + Sd2nd_InstallUtils::installModuleTemplate($module,$template,$log); + } + } + } + + /** + * installModuleTemplate + * + * @param XoopsModule &$module + * @param string[] $template + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function installModuleTemplate(/*** XoopsModule ***/ &$module,/*** string[] ***/ $template,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $dirname = $module->getVar('dirname'); + $trustDirname =& $module->getInfo('trust_dirname'); + $tplHandler =& Sd2nd_Utils::getXoopsHandler('tplfile'); + $filename = Sd2nd_InstallUtils::replaceDirname(trim($template['file']),$dirname,$trustDirname); + $tplData = Sd2nd_InstallUtils::readTemplateFile($dirname,$trustDirname,$filename['trust']); + + if($tplData == false) + { + return false; + } + + $tplFile =& $tplHandler->create(); + $tplFile->setVar('tpl_refid' ,$module->getVar('mid')); + $tplFile->setVar('tpl_lastimported',0); + $tplFile->setVar('tpl_lastmodified',time()); + $tplFile->setVar('tpl_type' ,(substr($filename['trust'],-4) == '.css') ? 'css' : 'module'); + $tplFile->setVar('tpl_source' ,$tplData,true); + $tplFile->setVar('tpl_module' ,$module->getVar('dirname')); + $tplFile->setVar('tpl_tplset' ,'default'); + $tplFile->setVar('tpl_file' ,$filename['public'],true); + $tplFile->setVar('tpl_desc' ,isset($template['desctiption']) ? $template['description'] : '',true); + + if($tplHandler->insert($tplFile)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_TPL_INSTALLED, + $filename['public'] + ) + ); + } + else + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_TPL_INSTALLED, + $filename['public'] + ) + ); + return false; + } + + return true; + } + + /** + * uninstallAllOfModuleTemplates + * + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * @param bool $defaultOnly + * + * @return void + **/ + public static function uninstallAllOfModuleTemplates(/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log,/*** bool ***/ $defaultOnly = true) + { + $tplHandler =& Sd2nd_Utils::getXoopsHandler('tplfile'); + + $delTemplates =& $tplHandler->find($defaultOnly ? 'default' : null,'module',$module->get('mid')); + + if(is_array($delTemplates) && count($delTemplates) > 0) + { + $xoopsTpl =& new XoopsTpl(); + $xoopsTpl->clear_cache(null,'mod_' . $module->get('dirname')); + foreach($delTemplates as $tpl) + { + if(!$tplHandler->delete($tpl)) + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_TPL_UNINSTALLED, + $tpl->get('tpl_file') + ) + ); + } + } + } + } + + /** + * installAllOfBlocks + * + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function installAllOfBlocks(/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $blocks =& $module->getInfo('blocks'); + if(is_array($blocks) && count($blocks) > 0) + { + foreach($blocks as $block) + { + $newBlock =& Sd2nd_InstallUtils::createBlockByInfo($module,$block); + Sd2nd_InstallUtils::installBlock($module,$newBlock,$block,$log); + } + } + return true; + } + + /** + * &createBlockByInfo + * + * @param XoopsModule &$module + * @param string[] $block + * + * @return XoopsBlock + **/ + public static function &createBlockByInfo(/*** XoopsModule ***/ &$module,/*** string[] ***/ $block) + { + $visible = isset($block['visible']) ? + $block['visible'] : + (isset($block['visible_any']) ? $block['visible_any'] : 0); + $filename = isset($block['template']) ? + Sd2nd_InstallUtils::replaceDirname($block['template'],$module->get('dirname')) : + null; + + $blockHandler =& Sd2nd_Utils::getXoopsHandler('block'); + $blockObj =& $blockHandler->create(); + + $blockObj->set('mid',$module->getVar('mid')); + $blockObj->set('options',isset($block['options']) ? $block['options'] : null); + $blockObj->set('name',$block['name']); + $blockObj->set('title',$block['name']); + $blockObj->set('block_type','M'); + $blockObj->set('c_type','1'); + $blockObj->set('isactive',1); + $blockObj->set('dirname',$module->getVar('dirname')); + $blockObj->set('func_file',$block['file']); + $blockObj->set('show_func','cl::' . $block['class']); + $blockObj->set('template',$filename['public']); + $blockObj->set('last_modified',time()); + $blockObj->set('visible',$visible); + $blockObj->set('func_num',intval($block['func_num'])); + return $blockObj; + } + + /** + * installBlock + * + * @param XoopsModule &$module + * @param XoopsBlock &$blockObj + * @param string[] &$block + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function installBlock(/*** XoopsModule ***/ &$module,/*** XoopsBlock ***/ &$blockObj,/*** string[] ***/ &$block,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $isNew = $blockObj->isNew(); + $blockHandler =& Sd2nd_Utils::getXoopsHandler('block'); + $autoLink = isset($block['show_all_module']) ? $block['show_all_module'] : false; + + if(!$blockHandler->insert($blockObj,$autoLink)) + { + $log->addError( + XCube_Utils::formatString( + _MI_SNEWS_INSTALL_ERROR_BLOCK_INSTALLED, + $blockObj->getVar('name') + ) + ); + return false; + } + + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_BLOCK_INSTALLED, + $blockObj->getVar('name') + ) + ); + + Sd2nd_InstallUtils::installBlockTemplate($blockObj,$module,$log); + + if(!$isNew) + { + return true; + } + + if($autoLink) + { + $sql = sprintf( + 'insert into `%s` set (`block_id`,`module_id`) values (%d,0);', + $blockHandler->db->prefix('block_module_link'), + $blockObj->getVar('bid') + ); + if(!$blockHandler->db->query($sql)) + { + $log->addWarning( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_BLOCK_COULD_NOT_LINK, + $blockObj->getVar('name') + ) + ); + } + } + + $gpermHandler =& Sd2nd_Utils::getXoopsHandler('groupperm'); + $perm =& $gpermHandler->create(); + $perm->setVar('gperm_itemid',$blockObj->getVar('bid')); + $perm->setVar('gperm_name','block_read'); + $perm->setVar('gperm_modid',1); + if(isset($block['visible_any']) && $block['visible_any']) + { + $memberHandler =& Sd2nd_Utils::getXoopsHandler('member'); + $groups =& $memberHandler->getGroups(); + foreach($groups as $group) + { + $perm->setVar('gperm_groupid',$group->getVar('groupid')); + $perm->setNew(); + if(!$gpermHandler->insert($perm)) + { + $log->addWarning( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_PERM_COULD_NOT_SET, + $blockObj->getVar('name') + ) + ); + } + } + } + else + { + $root =& XCube_Root::getSingleton(); + $groups = $root->mContext->mXoopsUser->getGroups(); + foreach($groups as $group) + { + $perm->setVar('gperm_groupid',$group); + $perm->setNew(); + if(!$gpermHandler->insert($perm)) + { + $log->addWarning( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_BLOCK_PERM_SET, + $blockObj->getVar('name') + ) + ); + } + } + } + + return true; + } + + /** + * installBlockTemplate + * + * @param XoopsBlock &$block + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function installBlockTemplate(/*** XoopsBlock ***/ &$block,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + if($block->get('template') == null) + { + return true; + } + + $info =& $module->getInfo('blocks'); + $filename = Sd2nd_InstallUtils::replaceDirname( + $info[$block->get('func_num')]['template'], + $module->get('dirname'), + $module->getInfo('trust_dirname') + ); + $tplHandler =& Sd2nd_Utils::getXoopsHandler('tplfile'); + + $cri =& new CriteriaCompo(); + $cri->add(new Criteria('tpl_type','block')); + $cri->add(new Criteria('tpl_tplset','default')); + $cri->add(new Criteria('tpl_module',$module->get('dirname'))); + $cri->add(new Criteria('tpl_file',$filename['public'])); + + $tpls =& $tplHandler->getObjects($cri); + + if(count($tpls) > 0) + { + $tplFile =& $tpls[0]; + } + else + { + $tplFile =& $tplHandler->create(); + $tplFile->set('tpl_refid',$block->get('bid')); + $tplFile->set('tpl_tplset','default'); + $tplFile->set('tpl_file',$filename['public']); + $tplFile->set('tpl_module',$module->get('dirname')); + $tplFile->set('tpl_type','block'); + //$tplFile->set('tpl_desc',$block->get('description')); + $tplFile->set('tpl_lastimported',0); + } + + $tplSource = Sd2nd_InstallUtils::readTemplateFile( + $module->get('dirname'), + $module->getInfo('trust_dirname'), + $filename['trust'], + true + ); + + $tplFile->set('tpl_source',$tplSource); + $tplFile->set('tpl_lastmodified',time()); + if($tplHandler->insert($tplFile)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_BLOCK_TPL_INSTALLED, + $filename['public'] + ) + ); + return true; + } + + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_BLOCK_TPL_INSTALLED, + $filename['public'] + ) + ); + return false; + } + + /** + * uninstallAllOfBlocks + * + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function uninstallAllOfBlocks(/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $successFlag = true; + + $blockHandler =& Sd2nd_Utils::getXoopsHandler('block'); + $gpermHandler =& Sd2nd_Utils::getXoopsHandler('groupperm'); + $cri =& new Criteria('mid',$module->get('mid')); + $blocks =& $blockHandler->getObjectsDirectly($cri); + + foreach($blocks as $block) + { + if($blockHandler->delete($block)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_BLOCK_UNINSTALLED, + $block->get('name') + ) + ); + } + else + { + $log->addWarning( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_BLOCK_UNINSTALLED, + $block->get('name') + ) + ); + $successFlag = false; + } + + $cri =& new CriteriaCompo(); + $cri->add(new Criteria('gperm_name','block_read')); + $cri->add(new Criteria('gperm_itemid',$block->get('bid'))); + $cri->add(new Criteria('gperm_modid',1)); + if(!$gpermHandler->deleteAll($cri)) + { + $log->addWarning( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_BLOCK_PERM_DELETE, + $block->get('name') + ) + ); + $successFlag = false; + } + } + + return $successFlag; + } + + /** + * smartUpdateAllOfBlocks + * + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return void + **/ + public static function smartUpdateAllOfBlocks(/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $dirname = $module->get('dirname'); + + $fileReader =& new Legacy_ModinfoX2FileReader($dirname); + $dbReader =& new Legacy_ModinfoX2DBReader($dirname); + + $blocks =& $dbReader->loadBlockInformations(); + $blocks->update($fileReader->loadBlockInformations()); + + foreach($blocks->mBlocks as $block) + { + switch($block->mStatus) + { + case LEGACY_INSTALLINFO_STATUS_LOADED: + Sd2nd_InstallUtils::updateBlockTemplateByInfo($block,$module,$log); + break; + case LEGACY_INSTALLINFO_STATUS_UPDATED: + Sd2nd_InstallUtils::updateBlockByInfo($block,$module,$log); + break; + case LEGACY_INSTALLINFO_STATUS_NEW: + Sd2nd_InstallUtils::installBlockByInfo($block,$module,$log); + break; + case LEGACY_INSTALLINFO_STATUS_DELETED: + Sd2nd_InstallUtils::uninstallBlockByFuncNum($block->mFuncNum,$module,$log); + break; + default: + break; + } + } + } + + /** + * updateBlockTemplateByInfo + * + * @param Legacy_BlockInformation &$info + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return void + **/ + public static function updateBlockTemplateByInfo(/*** Legacy_BlockInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $blockHandler =& Sd2nd_Utils::getModuleHandler('newblocks','legacy'); + $cri =& new CriteriaCompo(); + $cri->add(new Criteria('dirname',$module->get('dirname'))); + $cri->add(new Criteria('func_num',$info->mFuncNum)); + $blocks =& $blockHandler->getObjects($cri); + + foreach($blocks as $block) + { + Sd2nd_InstallUtils::uninstallBlockTemplate($block,$module,$log,true); + Sd2nd_InstallUtils::installBlockTemplate($block,$module,$log); + } + } + + /** + * updateBlockByInfo + * + * @param Legacy_BlockInformation &$info + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return void + **/ + public static function updateBlockByInfo(/*** Legacy_BlockInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $blockHandler =& Sd2nd_Utils::getModuleHandler('newblocks','legacy'); + $cri =& new CriteriaCompo(); + $cri->add(new Criteria('dirname',$module->get('dirname'))); + $cri->add(new Criteria('func_num',$info->mFuncNum)); + $blocks =& $blockHandler->getObjects($cri); + + foreach($blocks as $block) + { + $filename = Sd2nd_InstallUtils::replaceDirname( + $info->mTemplate, + $module->get('dirname'), + $module->getInfo('trust_dirname') + ); + $block->set('options',$info->mOptions); + $block->set('name',$info->mName); + $block->set('func_file',$info->mFuncFile); + $block->set('show_func',$info->mShowFunc); + //$block->set('edit_func',$info->mEditFunc); + $block->set('template',$filename['public']); + if($blockHandler->insert($block)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_BLOCK_UPDATED, + $block->get('name') + ) + ); + } + else + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_BLOCK_UPDATED, + $block->get('name') + ) + ); + } + Sd2nd_InstallUtils::uninstallBlockTemplate($block,$module,$log,true); + Sd2nd_InstallUtils::installBlockTemplate($block,$module,$log); + } + } + + /** + * installBlockByInfo + * + * @param Legacy_BlockInformation &$info + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function installBlockByInfo(/*** Legacy_BlockInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $filename = Sd2nd_InstallUtils::replaceDirname( + $info->mTemplate, + $module->get('dirname'), + $module->getInfo('trust_dirname') + ); + + $blockHandler =& Sd2nd_Utils::getXoopsHandler('block'); + + $block =& $blockHandler->create(); + $block->set('mid',$module->get('mid')); + $block->set('func_num',$info->mFuncNum); + $block->set('options',$info->mOptions); + $block->set('name',$info->mName); + $block->set('title',$info->mName); + $block->set('dirname',$module->get('dirname')); + $block->set('func_file',$info->mFuncFile); + $block->set('show_func',$info->mShowFunc); + //$block->set('edit_func',$info->mEditFunc); + $block->set('template',$filename['public']); + $block->set('block_type','M'); + $block->set('c_type',1); + + if(!$blockHandler->insert($block)) + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_BLOCK_INSTALLED, + $block->get('name') + ) + ); + return false; + } + + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_BLOCK_INSTALLED, + $block->get('name') + ) + ); + + Sd2nd_InstallUtils::installBlockTemplate($block,$module,$log); + return true; + } + + /** + * uninstallBlockByFuncNum + * + * @param int $func_num + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function uninstallBlockByFuncNum(/*** int ***/ $func_num,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $blockHandler =& Sd2nd_Utils::getModuleHandler('newblocks','legacy'); + $cri =& new CriteriaCompo(); + $cri->add(new Criteria('dirname',$module->get('dirname'))); + $cri->add(new Criteria('func_num',$func_num)); + $blocks =& $blockHandler->getObjects($cri); + + $successFlag = true; + foreach($blocks as $block) + { + if($blockHandler->delete($block)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_BLOCK_UNINSTALLED, + $block->get('name') + ) + ); + } + else + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_BLOCK_UNINSTALLED, + $block->get('name') + ) + ); + $successFlag = false; + } + } + return $successFlag; + } + + /** + * uninstallBlockTemplate + * + * @param XoopsBlock &$block + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * @param bool $defaultOnly + * + * @return bool + **/ + public static function uninstallBlockTemplate(/*** XoopsBlock ***/ &$block,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log,/*** bool ***/ $defaultOnly = false) + { + $tplHandler =& Sd2nd_Utils::getXoopsHandler('tplfile'); + $delTemplates =& $tplHandler->find($defaultOnly ? 'default' : null,'block',$module->get('mid'),$module->get('dirname'),$block->get('template')); + + if(is_array($delTemplates) && count($delTemplates) > 0) + { + foreach($delTemplates as $tpl) + { + if(!$tplHandler->delete($tpl)) + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_TPL_UNINSTALLED, + $tpl->get('tpl_file') + ) + ); + } + } + } + + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_BLOCK_TPL_UNINSTALLED, + $block->get('template') + ) + ); + return true; + } + + /** + * installAllOfConfigs + * + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function installAllOfConfigs(/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $successFlag = true; + $configHandler =& Sd2nd_Utils::getXoopsHandler('config'); + $fileReader =& new Legacy_ModinfoX2FileReader($module->get('dirname')); // TODO will be use other class? + $preferences =& $fileReader->loadPreferenceInformations(); + + foreach($preferences->mPreferences as $info) + { + $config =& $configHandler->createConfig(); + $config->set('conf_modid',$module->get('mid')); + $config->set('conf_catid',0); + $config->set('conf_name',$info->mName); + $config->set('conf_title',$info->mTitle); + $config->set('conf_desc',$info->mDescription); + $config->set('conf_formtype',$info->mFormType); + $config->set('conf_valuetype',$info->mValueType); + $config->setConfValueForInput($info->mDefault); + $config->set('conf_order',$info->mOrder); + + if(count($info->mOption->mOptions) > 0) + { + foreach($info->mOption->mOptions as $opt) + { + $option = $configHandler->createConfigOption(); + $option->set('confop_name',$opt->mName); + $option->set('confop_value',$opt->mValue); + $config->setConfOptions($option); + unset($option); + } + } + + if($configHandler->insertConfig($config)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_CONFIG_ADDED, + $config->get('conf_name') + ) + ); + } + else + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_CONFIG_ADDED, + $config->get('conf_name') + ) + ); + $successFlag = false; + } + } + + return $successFlag; + } + + /** + * installConfigByInfo + * + * @param Legacy_PreferenceInformation &$info + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return void + **/ + public static function installConfigByInfo(/*** Legacy_PreferenceInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $configHandler =& Sd2nd_Utils::getXoopsHandler('config'); + $config =& $configHandler->createConfig(); + $config->set('conf_modid',$module->get('mid')); + $config->set('conf_catid',0); + $config->set('conf_name',$info->mName); + $config->set('conf_title',$info->mTitle); + $config->set('conf_desc',$info->mDescription); + $config->set('conf_formtype',$info->mFormType); + $config->set('conf_valuetype',$info->mValueType); + $config->setConfValueForInput($info->mDefault); + $config->set('conf_order',$info->mOrder); + + if(count($info->mOption->mOptions) > 0) + { + foreach($info->mOption->mOptions as $opt) + { + $option = $configHandler->createConfigOption(); + $option->set('confop_name',$opt->mName); + $option->set('confop_value',$opt->mValue); + $config->setConfOptions($option); + unset($option); + } + } + + if($configHandler->insertConfig($config)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_CONFIG_ADDED, + $config->get('conf_name') + ) + ); + } + else + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_CONFIG_ADDED, + $config->get('conf_name') + ) + ); + } + + } + + /** + * uninstallAllOfConfigs + * + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function uninstallAllOfConfigs(/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + if($module->get('hasconfig') == 0) + { + return true; + } + + $configHandler =& Sd2nd_Utils::getXoopsHandler('config'); + $configs =& $configHandler->getConfigs(new Criteria('conf_mofid',$module->get('mid'))); + + if(count($configs) == 0) + { + return true; + } + + $sucessFlag = true; + foreach($configs as $config) + { + if($configHandler->deleteConfig($config)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_CONFIG_DELETED, + $config->getVar('conf_name') + ) + ); + } + else + { + $log->addWarning( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_CONFIG_DELETED, + $config->getVar('conf_name') + ) + ); + $sucessFlag = false; + } + } + return $sucessFlag; + } + + /** + * uninstallConfigByOrder + * + * @param int $order + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return void + **/ + public static function uninstallConfigByOrder(/*** int ***/ $order,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $configHandler =& Sd2nd_Utils::getXoopsHandler('config'); + + $cri =& new CriteriaCompo(); + $cri->add(new Criteria('conf_modid',$module->get('mid'))); + $cri->add(new Criteria('conf_catid',0)); + $cri->add(new Criteria('conf_order',$order)); + $configs = $configHandler->getConfigs($cri); + + foreach($configs as $config) + { + if($configHandler->deleteConfig($config)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_CONFIG_DELETED, + $config->get('conf_name') + ) + ); + } + else + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_CONFIG_DELETED, + $config->get('conf_name') + ) + ); + } + } + } + + /** + * smartUpdateAllOfConfigs + * + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return void + **/ + public static function smartUpdateAllOfConfigs(/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $dirname = $module->get('dirname'); + + $fileReader =& new Legacy_ModinfoX2FileReader($dirname); + $dbReader =& new Legacy_ModinfoX2DBReader($dirname); + + $configs =& $dbReader->loadPreferenceInformations(); + $configs->update($fileReader->loadPreferenceInformations()); + + foreach($configs->mPreferences as $config) + { + switch($config->mStatus) + { + case LEGACY_INSTALLINFO_STATUS_UPDATED: + Sd2nd_InstallUtils::updateConfigByInfo($config,$module,$log); + break; + case LEGACY_INSTALLINFO_STATUS_ORDER_UPDATED: + Sd2nd_InstallUtils::updateConfigOrderByInfo($config,$module,$log); + break; + case LEGACY_INSTALLINFO_STATUS_NEW: + Sd2nd_InstallUtils::installConfigByInfo($config,$module,$log); + break; + case LEGACY_INSTALLINFO_STATUS_DELETED: + Sd2nd_InstallUtils::uninstallConfigByOrder($config->mOrder,$module,$log); + break; + default: + break; + } + } + } + + /** + * updateConfigByInfo + * + * @param Legacy_PreferenceInformation &$info + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function updateConfigByInfo(/*** Legacy_PreferenceInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $configHandler =& Sd2nd_Utils::getXoopsHandler('config'); + $cri =& new CriteriaCompo(); + $cri->add(new Criteria('conf_modid',$module->get('mid'))); + $cri->add(new Criteria('conf_catid',0)); + $cri->add(new Criteria('conf_name',$info->mName)); + $configs =& $configHandler->getConfigs($cri); + + if(!(count($configs) > 0 && is_object($configs[0]))) + { + $log->addError(_MISD2ND_INSTALL_ERROR_CONFIG_NOT_FOUND); + return false; + } + + $config =& $configs[0]; + $config->set('conf_title',$info->mTitle); + $config->set('conf_desc',$info->mDescription); + if($config->get('conf_formtype') != $info->mFormType && $config->get('conf_valuetype') != $info->mValueType) + { + $config->set('conf_formtype',$info->mFormType); + $config->set('conf_valuetype',$info->mValueType); + $config->setConfValueForInput($info->mDefault); + } + else + { + $config->set('conf_formtype',$info->mFormType); + $config->set('conf_valuetype',$info->mValueType); + } + $config->set('conf_order',$info->mOrder); + + $options =& $configHandler->getConfigOptions(new Criteria('conf_id',$config->get('conf_id'))); + if(is_array($options)) + { + foreach($options as $opt) + { + $configHandler->_oHandler->delete($opt); // TODO will be use other method + } + } + + if(count($info->mOption->mOptions) > 0) + { + foreach($info->mOption->mOptions as $opt) + { + $option =& $configHandler->createConfigOption(); + $option->set('confop_name',$opt->mName); + $option->set('confop_value',$opt->mValue); + $option->set('conf_id',$option->get('conf_id')); // TODO check conf_id is right + $config->setConfOptions($option); + unset($option); + } + } + + if($configHandler->insertConfig($config)) + { + $log->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_CONFIG_UPDATED, + $config->get('conf_name') + ) + ); + return true; + } + + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_CONFIG_UPDATED, + $config->get('conf_name') + ) + ); + return false; + } + + /** + * updateConfigOrderByInfo + * + * @param Legacy_PreferenceInformation &$info + * @param XoopsModule &$module + * @param Legacy_ModuleInstallLog &$log + * + * @return bool + **/ + public static function updateConfigOrderByInfo(/*** Legacy_PreferenceInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) + { + $configHandler =& Sd2nd_Utils::getXoopsHandler('config'); + $cri =& new CriteriaCompo(); + $cri->add(new Criteria('conf_modid',$module->get('mid'))); + $cri->add(new Criteria('conf_catid',0)); + $cri->add(new Criteria('conf_name',$info->mName)); + $configs =& $configHandler->getConfigs($cri); + + if(!(count($configs) > 0 && is_object($configs[0]))) + { + $log->addError(_MI_SD2ND_INSTALL_ERROR_CONFIG_NOT_FOUND); + return false; + } + + $config =& $configs[0]; + $config->set('conf_order',$info->mOrder); + if(!$configHandler->insertConfig($config)) + { + $log->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_CONFIG_UPDATED, + $config->get('conf_name') + ) + ); + return false; + } + return true; + } +} + +?> diff --git a/trust_path/modules/sd2nd/admin/class/installer/Sd2ndInstaller.class.php b/trust_path/modules/sd2nd/admin/class/installer/Sd2ndInstaller.class.php new file mode 100644 index 0000000..1bb13f4 --- /dev/null +++ b/trust_path/modules/sd2nd/admin/class/installer/Sd2ndInstaller.class.php @@ -0,0 +1,299 @@ +mLog =& new Legacy_ModuleInstallLog(); + } + + /** + * setCurrentXoopsModule + * + * @param XoopsModule &$xoopsModule + * + * @return void + **/ + public function setCurrentXoopsModule(/*** XoopsModule ***/ &$xoopsModule) + { + $this->_mXoopsModule =& $xoopsModule; + } + + /** + * setForceMode + * + * @param bool $isForceMode + * + * @return void + **/ + public function setForceMode(/*** bool ***/ $isForceMode) + { + $this->_mForceMode = $isForceMode; + } + + /** + * _installTables + * + * @param void + * + * @return bool + **/ + private function _installTables() + { + return Sd2nd_InstallUtils::installSQLAutomatically( + $this->_mXoopsModule, + $this->mLog + ); + } + + /** + * _installModule + * + * @param void + * + * @return bool + **/ + private function _installModule() + { + $moduleHandler =& Sd2nd_Utils::getXoopsHandler('module'); + if(!$moduleHandler->insert($this->_mXoopsModule)) + { + $this->mLog->addError(_MI_SD2ND_INSTALL_ERROR_MODULE_INSTALLED); + return false; + } + + $gpermHandler =& Sd2nd_Utils::getXoopsHandler('groupperm'); + + if($this->_mXoopsModule->getInfo('hasAdmin')) + { + $adminPerm =& $this->_createPermission(XOOPS_GROUP_ADMIN); + $adminPerm->setVar('gperm_name','module_admin'); + if(!$gpermHandler->insert($adminPerm)) + { + $this->mLog->addError(_MI_SD2ND_INSTALL_ERROR_PERM_ADMIN_SET); + } + } + + if($this->_mXoopsModule->getInfo('hasMain')) + { + if($this->_mXoopsModule->getInfo('read_any')) + { + $memberHandler =& Sd2nd_Utils::getXoopsHandler('member'); + $groupObjects =& $memberHandler->getGroups(); + foreach($groupObjects as $group) + { + $readPerm =& $this->_createPermission($group->getVar('groupid')); + $readPerm->setVar('gperm_name','module_read'); + if(!$gpermHandler->insert($readPerm)) + { + $this->mLog->addError(_MI_SD2ND_INSTALL_ERROR_PERM_READ_SET); + } + } + } + else + { + $root =& XCube_Root::getSingleton(); + $groups = $root->mContext->mXoopsUser->getGroups(); + foreach($groups as $group) + { + $readPerm =& $this->_createPermission($group); + $readPerm->setVar('gperm_name','module_read'); + if(!$gpermHandler->insert($readPerm)) + { + $this->mLog->addError(_MI_SD2ND_INSTALL_ERROR_PERM_READ_SET); + } + } + } + } + + return true; + } + + /** + * &_createPermission + * + * @param int $group + * + * @return XoopsGroupPerm + **/ + private function &_createPermission(/*** int ***/ $group) + { + $gpermHandler =& Sd2nd_Utils::getXoopsHandler('groupperm'); + $perm =& $gpermHandler->create(); + $perm->setVar('gperm_groupid',$group); + $perm->setVar('gperm_itemid',$this->_mXoopsModule->getVar('mid')); + $perm->setVar('gperm_modid',1); + + return $perm; + } + + /** + * _installTemplates + * + * @param void + * + * @return void + **/ + private function _installTemplates() + { + Sd2nd_InstallUtils::installAllOfModuleTemplates( + $this->_mXoopsModule, + $this->mLog + ); + } + + /** + * _installBlocks + * + * @param void + * + * @return void + **/ + private function _installBlocks() + { + Sd2nd_InstallUtils::installAllOfBlocks( + $this->_mXoopsModule, + $this->mLog + ); + } + + /** + * _installPreferences + * + * @param void + * + * @return void + **/ + private function _installPreferences() + { + Sd2nd_InstallUtils::installAllOfConfigs( + $this->_mXoopsModule, + $this->mLog + ); + } + + /** + * _processReport + * + * @param void + * + * @return void + **/ + private function _processReport() + { + if(!$this->mLog->hasError()) + { + $this->mLog->add( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_MODULE_INSTALLED, + $this->_mXoopsModule->getInfo('name') + ) + ); + } + else if(is_object($this->_mXoopsModule)) + { + $this->mLog->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_MODULE_INSTALLED, + $this->_mXoopsModule->getInfo('name') + ) + ); + } + else + { + $this->mLog->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_MODULE_INSTALLED, + 'something' + ) + ); + } + } + + /** + * executeInstall + * + * @param void + * + * @return bool + **/ + public function executeInstall() + { + $this->_installTables(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_installModule(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_installTemplates(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_installBlocks(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_installPreferences(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_processReport(); + return true; + } +} + +?> diff --git a/trust_path/modules/sd2nd/admin/class/installer/Sd2ndUninstaller.class.php b/trust_path/modules/sd2nd/admin/class/installer/Sd2ndUninstaller.class.php new file mode 100644 index 0000000..6c6d8cc --- /dev/null +++ b/trust_path/modules/sd2nd/admin/class/installer/Sd2ndUninstaller.class.php @@ -0,0 +1,277 @@ +mLog =& new Legacy_ModuleInstallLog(); + } + + /** + * setCurrentXoopsModule + * + * @param XoopsModule &$xoopsModule + * + * @return void + **/ + public function setCurrentXoopsModule(/*** XoopsModule ***/ &$xoopsModule) + { + $this->_mXoopsModule =& $xoopsModule; + } + + /** + * setForceMode + * + * @param bool $isForceMode + * + * @return void + **/ + public function setForceMode(/*** bool ***/ $isForceMode) + { + $this->_mForceMode = $isForceMode; + } + + /** + * _uninstallModule + * + * @param void + * + * @return void + **/ + private function _uninstallModule() + { + $moduleHandler =& Sd2nd_Utils::getXoopsHandler('module'); + + if($moduleHandler->delete($this->_mXoopsModule)) + { + $this->mLog->addReport(_MI_SD2ND_INSTALL_MSG_MODULE_INFORMATION_DELETED); + } + else + { + $this->mLog->addError(_MI_SD2ND_INSTALL_ERROR_MODULE_INFORMATION_DELETED); + } + } + + /** + * _uninstallTables + * + * @param void + * + * @return void + **/ + private function _uninstallTables() + { + $root =& XCube_Root::getSingleton(); + $db =& $root->mController->getDB(); + $dirname = $this->_mXoopsModule->get('dirname'); + + $tables =& $this->_mXoopsModule->getInfo('tables'); + if(is_array($tables)) + { + foreach($tables as $table) + { + $tableName = str_replace( + array('{prefix}','{dirname}'), + array(XOOPS_DB_PREFIX,$dirname), + $table + ); + $sql = sprintf('drop table `%s`;',$tableName); + + if($db->query($sql)) + { + $this->mLog->addReport( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_TABLE_DOROPPED, + $tableName + ) + ); + } + else + { + $this->mLog->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_TABLE_DOROPPED, + $tableName + ) + ); + } + } + } + } + + /** + * _uninstallTemplates + * + * @param void + * + * @return void + **/ + private function _uninstallTemplates() + { + Sd2nd_InstallUtils::uninstallAllOfModuleTemplates($this->_mXoopsModule,$this->mLog,false); + } + + /** + * _uninstallBlocks + * + * @param void + * + * @return void + **/ + private function _uninstallBlocks() + { + Sd2nd_InstallUtils::uninstallAllOfBlocks($this->_mXoopsModule,$this->mLog); + + $tplHandler =& Sd2nd_Utils::getXoopsHandler('tplfile'); + $cri =& new Criteria('tpl_module',$this->_mXoopsModule->get('dirname')); + if(!$tplHandler->deleteAll($cri)) + { + $this->mLog->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_BLOCK_TPL_DELETED, + $tplHandler->db->error() + ) + ); + } + } + + /** + * _uninstallPreferences + * + * @param void + * + * @return void + **/ + private function _uninstallPreferences() + { + Sd2nd_InstallUtils::uninstallAllOfConfigs($this->_mXoopsModule,$this->mLog); + } + + /** + * _processReport + * + * @param void + * + * @return void + **/ + private function _processReport() + { + if(!$this->mLog->hasError()) + { + $this->mLog->add( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_MODULE_UNINSTALLED, + $this->_mXoopsModule->get('name') + ) + ); + } + else if(is_object($this->_mXoopsModule)) + { + $this->mLog->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_MODULE_UNINSTALLED, + $this->_mXoopsModule->get('name') + ) + ); + } + else + { + $this->mLog->addError( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_MODULE_UNINSTALLED, + 'something' + ) + ); + } + } + + /** + * executeUninstall + * + * @param void + * + * @return bool + **/ + public function executeUninstall() + { + $this->_uninstallTables(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + if($this->_mXoopsModule->get('mid') != null) + { + $this->_uninstallModule(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_uninstallTemplates(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_uninstallBlocks(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_uninstallPreferences(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + } + + $this->_processReport(); + return true; + } +} + +?> diff --git a/trust_path/modules/sd2nd/admin/class/installer/Sd2ndUpdater.class.php b/trust_path/modules/sd2nd/admin/class/installer/Sd2ndUpdater.class.php new file mode 100644 index 0000000..e8e1df9 --- /dev/null +++ b/trust_path/modules/sd2nd/admin/class/installer/Sd2ndUpdater.class.php @@ -0,0 +1,357 @@ +mLog =& new Legacy_ModuleInstallLog(); + } + + /** + * setForceMode + * + * @param bool $isForceMode + * + * @return void + **/ + public function setForceMode(/*** bool ***/ $isForceMode) + { + $this->_mForceMode = $isForceMode; + } + + /** + * setCurrentXoopsModule + * + * @param XoopsModule &$module + * + * @return void + **/ + public function setCurrentXoopsModule(/*** XoopsModule ***/ &$module) + { + $moduleHandler =& Sd2nd_Utils::getXoopsHandler('module'); + $cloneModule =& $moduleHandler->create(); + + $cloneModule->unsetNew(); + $cloneModule->set('mid',$module->get('mid')); + $cloneModule->set('name',$module->get('name')); + $cloneModule->set('version',$module->get('version')); + $cloneModule->set('last_update',$module->get('last_update')); + $cloneModule->set('weight',$module->get('weight')); + $cloneModule->set('isactive',$module->get('isactive')); + $cloneModule->set('dirname',$module->get('dirname')); + //$cloneModule->set('trust_dirname',$module->get('trust_dirname')); + $cloneModule->set('hasmain',$module->get('hasmain')); + $cloneModule->set('hasadmin',$module->get('hasadmin')); + $cloneModule->set('hasconfig',$module->get('hasconfig')); + + $this->_mCurrentXoopsModule =& $cloneModule; + $this->_mCurrentVersion = $cloneModule->get('version'); + } + + /** + * setTargetXoopsModule + * + * @param XoopsModule &$module + * + * @return void + **/ + public function setTargetXoopsModule(/*** XoopsModule ***/ &$module) + { + $this->_mTargetXoopsModule =& $module; + $this->_mTargetVersion = $this->getTargetPhase(); + } + + /** + * getCurrentVersion + * + * @param void + * + * @return int + **/ + public function getCurrentVersion() + { + return intval($this->_mCurrentVersion); + } + + /** + * getTargetPhase + * + * @param void + * + * @return int + **/ + public function getTargetPhase() + { + ksort($this->_mMileStone); + + foreach($this->_mMileStone as $tVer => $tMethod) + { + if($tVer >= $this->getCurrentVersion()) + { + return intval($tVer); + } + } + + return $this->_mTargetXoopsModule->get('version'); + } + + /** + * hasUpgradeMethod + * + * @param void + * + * @return bool + **/ + public function hasUpgradeMethod() + { + ksort($this->_mMileStone); + + foreach($this->_mMileStone as $tVer => $tMethod) + { + if($tVer >= $this->getCurrentVersion() && is_callable(array($this,$tMethod))) + { + return true; + } + } + + return false; + } + + /** + * isLatestUpgrade + * + * @param void + * + * @return bool + **/ + public function isLatestUpgrade() + { + return ($this->_mTargetXoopsModule->get('version') == $this->getTargetPhase()); + } + + /** + * _updateModuleTemplates + * + * @param void + * + * @return void + **/ + private function _updateModuleTemplates() + { + Sd2nd_InstallUtils::uninstallAllOfModuleTemplates($this->_mTargetXoopsModule,$this->mLog); + Sd2nd_InstallUtils::installAllOfModuleTemplates($this->_mTargetXoopsModule,$this->mLog); + } + + /** + * _updateBlocks + * + * @param void + * + * @return void + **/ + private function _updateBlocks() + { + Sd2nd_InstallUtils::smartUpdateAllOfBlocks($this->_mTargetXoopsModule,$this->mLog); + } + + /** + * _updatePreferences + * + * @param void + * + * @return void + **/ + private function _updatePreferences() + { + Sd2nd_InstallUtils::smartUpdateAllOfConfigs($this->_mTargetXoopsModule,$this->mLog); + } + + /** + * executeUpgrade + * + * @param void + * + * @return bool + **/ + public function executeUpgrade() + { + return ($this->hasUpgradeMethod() ? + $this->_callUpgradeMethod() : + $this->executeAutomaticUpgrade()); + } + + /** + * _callUpgradeMethod + * + * @param void + * + * @return bool + **/ + private function _callUpgradeMethod() + { + ksort($this->_mMileStone); + + foreach($this->_mMileStone as $tVer => $tMethod) + { + if($tVer >= $this->getCurrentVersion() && is_callable(array($this,$tMethod))) + { + return $this->$tMethod(); + } + } + + return false; + } + + /** + * executeAutomaticUpgrade + * + * @param void + * + * @return bool + **/ + public function executeAutomaticUpgrade() + { + $this->mLog->addReport(_MI_SD2ND_INSTALL_MSG_UPDATE_STARTED); + + $this->_updateModuleTemplates(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_updateBlocks(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_updatePreferences(); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->saveXoopsModule($this->_mTargetXoopsModule); + if(!$this->_mForceMode && $this->mLog->hasError()) + { + $this->_processReport(); + return false; + } + + $this->_processReport(); + + return true; + } + + /** + * saveXoopsModule + * + * @param XoopsModule &$module + * + * @return void + **/ + public function saveXoopsModule(/*** XoopsModule ***/ &$module) + { + $moduleHandler =& Sd2nd_Utils::getXoopsHandler('module'); + + if($moduleHandler->insert($module)) + { + $this->mLog->addReport(_MI_SD2ND_INSTALL_MSG_UPDATE_FINISHED); + } + else + { + $this->mLog->addError(_MI_SD2ND_INSTALL_ERROR_UPDATE_FINISHED); + } + } + + /** + * _processReport + * + * @param void + * + * @return void + **/ + private function _processReport() + { + if(!$this->mLog->hasError()) + { + $this->mLog->add( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_MSG_MODULE_UPDATED, + $this->_mCurrentXoopsModule->get('name') + ) + ); + } + else + { + $this->mLog->add( + XCube_Utils::formatString( + _MI_SD2ND_INSTALL_ERROR_MODULE_UPDATED, + $this->_mCurrentXoopsModule->get('name') + ) + ); + } + } +} + +?> diff --git a/trust_path/modules/sd2nd/admin/index.php b/trust_path/modules/sd2nd/admin/index.php new file mode 100644 index 0000000..85bc48f --- /dev/null +++ b/trust_path/modules/sd2nd/admin/index.php @@ -0,0 +1,18 @@ +mContext->mModule->setAdminMode(true); +$root->mController->execute(); + +require_once XOOPS_ROOT_PATH . '/footer.php'; + +?> diff --git a/trust_path/modules/sd2nd/class/AbstractAction.class.php b/trust_path/modules/sd2nd/class/AbstractAction.class.php new file mode 100644 index 0000000..a43812b --- /dev/null +++ b/trust_path/modules/sd2nd/class/AbstractAction.class.php @@ -0,0 +1,162 @@ +mRoot =& XCube_Root::getSingleton(); + $this->mModule =& $this->mRoot->mContext->mModule; + $this->mAsset =& $this->mModule->mAssetManager; + } + + /** + * prepare + * + * @param void + * + * @return bool + **/ + public function prepare() + { + return true; + } + + /** + * hasPermission + * + * @param void + * + * @return bool + **/ + public function hasPermission() + { + return true; + } + + /** + * getDefaultView + * + * @param void + * + * @return Enum + **/ + public function getDefaultView() + { + return SD2ND_FRAME_VIEW_NONE; + } + + /** + * execute + * + * @param void + * + * @return Enum + **/ + public function execute() + { + return SD2ND_FRAME_VIEW_NONE; + } + + /** + * executeViewSuccess + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewSuccess(/*** XCube_RenderTarget ***/ &$render) + { + } + + /** + * executeViewError + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewError(/*** XCube_RenderTarget ***/ &$render) + { + } + + /** + * executeViewIndex + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + } + + /** + * executeViewInput + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewInput(/*** XCube_RenderTarget ***/ &$render) + { + } + + /** + * executeViewPreview + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewPreview(/*** XCube_RenderTarget ***/ &$render) + { + } + + /** + * executeViewCancel + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewCancel(/*** XCube_RenderTarget ***/ &$render) + { + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/AbstractDeleteAction.class.php b/trust_path/modules/sd2nd/class/AbstractDeleteAction.class.php new file mode 100644 index 0000000..06e040d --- /dev/null +++ b/trust_path/modules/sd2nd/class/AbstractDeleteAction.class.php @@ -0,0 +1,62 @@ +mObject); + } + + /** + * _doExecute + * + * @param void + * + * @return Enum + **/ + protected function _doExecute() + { + if($this->mObjectHandler->delete($this->mObject)) + { + return SD2ND_FRAME_VIEW_SUCCESS; + } + + return SD2ND_FRAME_VIEW_ERROR; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/AbstractEditAction.class.php b/trust_path/modules/sd2nd/class/AbstractEditAction.class.php new file mode 100644 index 0000000..a4dcd0f --- /dev/null +++ b/trust_path/modules/sd2nd/class/AbstractEditAction.class.php @@ -0,0 +1,185 @@ +_getId(); + + $this->mObjectHandler =& $this->_getHandler(); + + $this->mObject =& $this->mObjectHandler->get($id); + + if($this->mObject == null && $this->_isEnableCreate()) + { + $this->mObject =& $this->mObjectHandler->create(); + } + } + + /** + * _isEnableCreate + * + * @param void + * + * @return bool + **/ + protected function _isEnableCreate() + { + return true; + } + + /** + * prepare + * + * @param void + * + * @return bool + **/ + public function prepare() + { + $this->_setupObject(); + $this->_setupActionForm(); + + return true; + } + + /** + * getDefaultView + * + * @param void + * + * @return Enum + **/ + public function getDefaultView() + { + if($this->mObject == null) + { + return SD2ND_FRAME_VIEW_ERROR; + } + + $this->mActionForm->load($this->mObject); + + return SD2ND_FRAME_VIEW_INPUT; + } + + /** + * execute + * + * @param void + * + * @return Enum + **/ + public function execute() + { + if ($this->mObject == null) + { + return SD2ND_FRAME_VIEW_ERROR; + } + + if ($this->mRoot->mContext->mRequest->getRequest('_form_control_cancel') != null) + { + return SD2ND_FRAME_VIEW_CANCEL; + } + + $this->mActionForm->load($this->mObject); + + $this->mActionForm->fetch(); + $this->mActionForm->validate(); + + if ($this->mActionForm->hasError()) + { + return SD2ND_FRAME_VIEW_INPUT; + } + + $this->mActionForm->update($this->mObject); + + return $this->_doExecute(); + } + + /** + * _doExecute + * + * @param void + * + * @return Enum + **/ + protected function _doExecute() + { + if($this->mObjectHandler->insert($this->mObject)) + { + return SD2ND_FRAME_VIEW_SUCCESS; + } + + return SD2ND_FRAME_VIEW_ERROR; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/AbstractFilterForm.class.php b/trust_path/modules/sd2nd/class/AbstractFilterForm.class.php new file mode 100644 index 0000000..2e82428 --- /dev/null +++ b/trust_path/modules/sd2nd/class/AbstractFilterForm.class.php @@ -0,0 +1,184 @@ +_mCriteria =& new CriteriaCompo(); + } + + /** + * prepare + * + * @param XCube_PageNavigator &$navi + * @param XoopsObjectGenericHandler &$handler + * + * @return void + **/ + public function prepare(/*** XCube_PageNavigator ***/ &$navi,/*** XoopsObjectGenericHandler ***/ &$handler) + { + $this->mNavi =& $navi; + $this->_mHandler =& $handler; + + $this->mNavi->mGetTotalItems->add(array(&$this, 'getTotalItems')); + } + + /** + * getTotalItems + * + * @param int &$total + * + * @return void + **/ + public function getTotalItems(/*** int ***/ &$total) + { + $total = $this->_mHandler->getCount($this->getCriteria()); + } + + /** + * fetchSort + * + * @param void + * + * @return void + **/ + protected function fetchSort() + { + $root =& XCube_Root::getSingleton(); + $this->mSort = intval($root->mContext->mRequest->getRequest($this->mNavi->mPrefix . 'sort')); + + if(!isset($this->mSortKeys[abs($this->mSort)])) + { + $this->mSort = $this->getDefaultSortKey(); + } + + $this->mNavi->mSort[$this->mNavi->mPrefix . 'sort'] = $this->mSort; + } + + /** + * fetch + * + * @param void + * + * @return void + **/ + public function fetch() + { + $this->mNavi->fetch(); + $this->fetchSort(); + } + + /** + * getSort + * + * @param void + * + * @return Enum + **/ + public function getSort() + { + $sortkey = abs($this->mSort); + return $this->mSortKeys[$sortkey]; + } + + /** + * getOrder + * + * @param void + * + * @return Enum + **/ + public function getOrder() + { + return ($this->mSort < 0) ? 'desc' : 'asc'; + } + + /** + * &getCriteria + * + * @param int $start + * @param int $limit + * + * @return Criteria + **/ + public function &getCriteria(/*** int ***/ $start = null,/*** int ***/ $limit = null) + { + $t_start = ($start === null) ? $this->mNavi->getStart() : intval($start); + $t_limit = ($limit === null) ? $this->mNavi->getPerpage() : intval($limit); + + $criteria = $this->_mCriteria; + + $criteria->setStart($t_start); + $criteria->setLimit($t_limit); + return $criteria; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/AbstractListAction.class.php b/trust_path/modules/sd2nd/class/AbstractListAction.class.php new file mode 100644 index 0000000..ad111cb --- /dev/null +++ b/trust_path/modules/sd2nd/class/AbstractListAction.class.php @@ -0,0 +1,143 @@ +_getBaseUrl(), XCUBE_PAGENAVI_START); + return $navi; + } + + /** + * getDefaultView + * + * @param void + * + * @return Enum + **/ + public function getDefaultView() + { + $this->mFilter =& $this->_getFilterForm(); + $this->mFilter->fetch(); + + $handler =& $this->_getHandler(); + $this->mObjects =& $handler->getObjects($this->mFilter->getCriteria()); + + return SD2ND_FRAME_VIEW_INDEX; + } + + /** + * execute + * + * @param void + * + * @return Enum + **/ + public function execute() + { + return $this->getDefaultView(); + } +} + + +/** + * @class Sd2nd_AbstractUpdateListAction +**/ +class Sd2nd_AbstractUpdateListAction extends Sd2nd_AbstractListAction +{ + /** + * @brief Sd2nd_UpdateHandler + **/ + protected $_mUpdateHandler = null; + + /** + * prepare + * + * @param void + * + * @return bool + **/ + public function prepare() + { + if(!parent::prepare()) + { + return false; + } + + $this->_mUpdateHandler =& $this->mAsset->getObject('handler',Sd2nd_AssetManager::HANDLER_UPDATE); + if(!isset($_GET['regist_time'])) + { + $update =& $this->_mUpdateHandler->getLatestUpdate(); + $_GET['regist_time'] = $update->get('update_time'); + } + + return true; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/AbstractViewAction.class.php b/trust_path/modules/sd2nd/class/AbstractViewAction.class.php new file mode 100644 index 0000000..c98e4b5 --- /dev/null +++ b/trust_path/modules/sd2nd/class/AbstractViewAction.class.php @@ -0,0 +1,109 @@ +_getId(); + + $this->mObjectHandler =& $this->_getHandler(); + + $this->mObject =& $this->mObjectHandler->get($id); + } + + /** + * prepare + * + * @param void + * + * @return bool + **/ + public function prepare() + { + $this->_setupObject(); + return is_object($this->mObject); + } + + /** + * getDefaultView + * + * @param void + * + * @return Enum + **/ + public function getDefaultView() + { + if($this->mObject == null) + { + return SD2ND_FRAME_VIEW_ERROR; + } + + return SD2ND_FRAME_VIEW_SUCCESS; + } + + /** + * execute + * + * @param void + * + * @return Enum + **/ + public function execute() + { + return $this->getDefaultView(); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/AssetManager.class.php b/trust_path/modules/sd2nd/class/AssetManager.class.php new file mode 100644 index 0000000..b574f99 --- /dev/null +++ b/trust_path/modules/sd2nd/class/AssetManager.class.php @@ -0,0 +1,295 @@ +mDirname = $dirname; + } + + /** + * &getInstance + * + * @param string $dirname + * + * @return Sd2nd_AssetManager + **/ + public function &getInstance(/*** string ***/ $dirname) + { + /** + * @var Sd2nd_AssetManager[] + **/ + static $instance = array(); + + if(!isset($instance[$dirname])) + { + $instance[$dirname] = new Sd2nd_AssetManager($dirname); + } + + return $instance[$dirname]; + } + + /** + * &getObject + * + * @param string $type + * @param string $name + * @param bool $isAdmin + * @param string $mode + * + * @return &object + **/ + public function &getObject(/*** string ***/ $type,/*** string ***/ $name,/*** bool ***/ $isAdmin = false,/*** string ***/ $mode = null) + { + if(isset($this->_mCache[$type][$name])) + { + return $this->_mCache[$type][$name]; + } + + $instance = null; + + $methodName = 'create' . ucfirst($name) . ucfirst($mode) . ucfirst($type); + if(method_exists($this,$methodName)) + { + $instance =& $this->$methodName(); + } + + if($instance === null) + { + $instance =& $this->_fallbackCreate($type,$name,$isAdmin,$mode); + } + + $this->_mCache[$type][$name] =& $instance; + + return $instance; + } + + /** + * getRoleName + * + * @param string $role + * + * @return string + **/ + public function getRoleName(/*** string ***/ $role) + { + return 'Module.' . $this->mDirname . '.' . $role; + } + + /** + * &_fallbackCreate + * + * @param string $type + * @param string $name + * @param bool $isAdmin + * @param string $mode + * + * @return &object + **/ + private function &_fallbackCreate(/*** string ***/ $type,/*** string ***/ $name,/*** bool ***/ $isAdmin = false,/*** string ***/ $mode = null) + { + $className = null; + $instance = null; + + if(isset($this->mAssetList[$type][$name]['class'])) + { + $asset = $this->mAssetList[$type][$name]; + if(isset($asset['absPath']) && $this->_loadClassFile($asset['absPath'],$asset['class'])) + { + $className = $asset['class']; + } + + if($className == null && isset($asset['path'])) + { + if($this->_loadClassFile($this->_getPublicPath() . $asset['path'],$asset['class'])) + { + $className = $asset['class']; + } + + if($className == null && $this->_loadClassFile($this->_getTrustPath() . $asset['path'],$asset['class'])) + { + $className = $asset['class']; + } + } + } + + if($className == null) + { + switch($type) + { + case 'filter': + $className = $this->_getFilterName($name,$isAdmin); + break; + case 'form': + $className = $this->_getActionFormName($name,$isAdmin,$mode); + break; + case 'handler': + $className = $this->_getHandlerName($name); + break; + default: + return $instance; + } + } + + if($type == 'handler') + { + $root =& XCube_Root::getSingleton(); + $instance =& new $className($root->mController->getDB(),$this->mDirname); + } + else + { + $instance =& new $className(); + } + return $instance; + } + + /** + * _getFilterName + * + * @param string $name + * @param bool $isAdmin + * + * @return string + **/ + private function _getFilterName(/*** string ***/ $name,/*** bool ***/ $isAdmin = false) + { + $name = ucfirst($name) . 'FilterForm'; + $path = 'forms/' . $name . '.class.php'; + $className = ucfirst($this->mTrustDirname) . ($isAdmin ? '_Admin_' : '_') . $name; + return ( + $this->_loadClassFile($this->_getPublicPath($isAdmin) . $path,$className) || + $this->_loadClassFile($this->_getTrustPath($isAdmin) . $path,$className) + ) ? $className : null; + } + + /** + * _getActionFormName + * + * @param string $name + * @param bool $isAdmin + * @param string $mode + * + * @return string + **/ + private function _getActionFormName(/*** string ***/ $name,/*** bool ***/ $isAdmin = false,/*** string ***/ $mode = null) + { + $name = ucfirst($name) . ucfirst($mode) . 'Form'; + $path = 'forms/' . $name . '.class.php'; + $className = ucfirst($this->mTrustDirname) . ($isAdmin ? '_Admin_' : '_') . $name; + return ( + $this->_loadClassFile($this->_getPublicPath($isAdmin) . $path,$className) || + $this->_loadClassFile($this->_getTrustPath($isAdmin) . $path,$className) + ) ? $className : null; + } + + /** + * _getHandlerName + * + * @param string $name + * + * @return string + **/ + private function _getHandlerName(/*** string ***/ $name) + { + $path = 'class/handler/' . ucfirst($name) . '.class.php'; + $className = ucfirst($this->mTrustDirname) . '_' . ucfirst($name) . 'Handler'; + return ( + $this->_loadClassFile($this->_getPublicPath() . $path,$className) || + $this->_loadClassFile($this->_getTrustPath() . $path,$className) + ) ? $className : null; + } + + /** + * _loadClassFile + * + * @param string $path + * @param string $class + * + * @return bool + **/ + private function _loadClassFile(/*** string ***/ $path,/*** string ***/ $class) + { + if(!file_exists($path)) + { + return false; + } + require_once $path; + + return class_exists($class); + } + + /** + * _getPublicPath + * + * @param bool $isAdmin + * + * @return string + **/ + private function _getPublicPath(/*** bool ***/ $isAdmin = false) + { + return XOOPS_MODULE_PATH . '/' . $this->mDirname . ($isAdmin ? '/admin/' : '/'); + } + + /** + * _getTrustPath + * + * @param bool $isAdmin + * + * @return string + **/ + private function _getTrustPath(/*** bool ***/ $isAdmin = false) + { + return SD2ND_TRUST_PATH . ($isAdmin ? '/admin/' : '/'); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/Module.class.php b/trust_path/modules/sd2nd/class/Module.class.php new file mode 100644 index 0000000..be809b8 --- /dev/null +++ b/trust_path/modules/sd2nd/class/Module.class.php @@ -0,0 +1,461 @@ +mAssetManager),$this->mXoopsModule->get('dirname')); + + $root =& XCube_Root::getSingleton(); + $root->mController->mExecute->add(array(&$this, 'execute')); + + // + // TODO/Insert your initialization code. + // + } + + /** + * setAdminMode + * + * @param bool $flag + * + * @return void + **/ + public function setAdminMode(/*** bool ***/ $flag) + { + $this->mAdminFlag = $flag; + } + + /** + * _getDefaultActionName + * + * @param void + * + * @return string + **/ + private function _getDefaultActionName() + { + // TODO insert your default action name + return 'index'; + } + + /** + * setActionName + * + * @param string $name + * + * @return void + **/ + public function setActionName(/*** string ***/ $name) + { + $this->mActionName = $name; + } + + /** + * getRenderSystemName + * + * @param void + * + * @return string + **/ + public function getRenderSystemName() + { + if(!$this->mAdminFlag) + { + return parent::getRenderSystemName(); + } + + // TODO will be use site config + if(!defined('SD2ND_ADMIN_RENDER_REGISTED')) + { + define('SD2ND_ADMIN_RENDER_REGISTED',true); + $root =& XCube_Root::getSingleton(); + $root->overrideSiteConfig( + array( + 'RenderSystems' => array( + 'Sd2nd_AdminRenderSystem' => 'Sd2nd_AdminRenderSystem' + ), + 'Sd2nd_AdminRenderSystem' => array( + 'root' => SD2ND_TRUST_PATH, + 'path' => '/admin/class/Sd2ndAdminRenderSystem.class.php', + 'class' => 'Sd2nd_AdminRenderSystem' + ) + ) + ); + } + + return 'Sd2nd_AdminRenderSystem'; + } + + /** + * getAdminMenu + * + * @param void + * + * @return {string 'title',string 'link',string 'keywords',bool 'show',bool 'absolute'}[] + **/ + public function getAdminMenu() + { + if(is_array($this->mAdminMenu)) + { + return $this->mAdminMenu; + } + + $root =& XCube_Root::getSingleton(); + + // load admin menu + $adminMenu = $this->mXoopsModule->getInfo('adminmenu'); + if(!is_array($adminMenu)) + { + $adminMenu = array(); + } + + // add preference menu + if($url = $this->getPreferenceEditUrl()) + { + $adminMenu[] = array( + 'title' => _PREFERENCES, + 'link' => $url, + 'absolute' => true + ); + } + + // add help menu + if($url = $this->getHelpViewUrl()) + { + $adminMenu[] = array( + 'title' => _HELP, + 'link' => $url, + 'absolute' => true + ); + } + + $this->mAdminMenu = array(); + foreach($adminMenu as $menu) + { + if(!(isset($menu['absolute']) && $menu['absolute'])) + { + $menu['link'] = XOOPS_MODULE_URL . '/' . $this->mXoopsModule->get('dirname') . '/' . $menu['link']; + } + $this->mAdminMenu[] = $menu; + } + + return $this->mAdminMenu; + } + + /** + * getPreferenceEditUrl + * + * @param void + * + * @return string + **/ + public function getPreferenceEditUrl() + { + if($this->_mPreferenceEditUrl === null) + { + if(is_array($this->mXoopsModule->getInfo('config')) && count($this->mXoopsModule->getInfo('config')) > 0) + { + $root =& XCube_Root::getSingleton(); + $this->_mPreferenceEditUrl = $root->mController->getPreferenceEditUrl($this->mXoopsModule); + } + else + { + $this->_mPreferenceEditUrl = false; + } + } + + return $this->_mPreferenceEditUrl; + } + + /** + * getHelpViewUrl + * + * @param void + * + * @return string + **/ + public function getHelpViewUrl() + { + if($this->_mHelpViewUrl === null) + { + if($this->mXoopsModule->hasHelp()) + { + $root =& XCube_Root::getSingleton(); + $this->_mHelpViewUrl = $root->mController->getHelpViewUrl($this->mXoopsModule); + } + else + { + $this->_mHelpViewUrl = false; + } + } + + return $this->_mHelpViewUrl; + } + + /** + * execute + * + * @param XCube_Controller &$controller + * + * @return void + **/ + public function execute(/*** XCube_Controller ***/ &$controller) + { + if($this->_createAction() === false) + { + $this->doActionNotFoundError(); + die(); + } + + if($this->mAction->prepare() === false) + { + $this->doPreparationError(); + die(); + } + + if($this->mAction->hasPermission() === false) + { + $this->doPermissionError(); + die(); + } + + $viewStatus = (Sd2nd_Utils::getEnv('REQUEST_METHOD') == 'POST') ? + $this->mAction->execute() : + $this->mAction->getDefaultView(); + + if(in_array($viewStatus,$this->_mAllowViewNames)) + { + $methodName = 'executeView' . ucfirst($viewStatus); + if(is_callable(array($this->mAction,$methodName))) + { + $this->mAction->$methodName($this->getRenderTarget()); + } + } + } + + /** + * _createAction + * + * @param void + * + * @return bool + **/ + private function _createAction() + { + $root =& XCube_Root::getSingleton(); + + if($this->mActionName == null) + { + $this->mActionName = $root->mContext->mRequest->getRequest('action'); + if($this->mActionName == null) + { + $this->mActionName = $this->_getDefaultActionName(); + } + } + + if(!ctype_alnum($this->mActionName)) + { + return false; + } + + $fileName = ($this->mAdminFlag ? '/admin' : '') + . '/actions/' . ucfirst($this->mActionName) . 'Action.class.php'; + switch(true) + { + case file_exists( + $path = XOOPS_MODULE_PATH . '/' . $this->mXoopsModule->get('dirname') . $fileName + ): + break; + case file_exists( + $path = SD2ND_TRUST_PATH . '/' . $fileName + ): + break; + default: + return false; + } + + require_once $path; + + $className = 'Sd2nd_' . ($this->mAdminFlag ? 'Admin_' : '') + . ucfirst($this->mActionName) . 'Action'; + if(class_exists($className)) + { + $this->mAction =& new $className(); + } + if(!$this->mAction instanceof Sd2nd_AbstractAction) + { + return false; + } + + return true; + } + + /** + * doActionNotFoundError + * + * @param void + * + * @return void + **/ + private function doActionNotFoundError() + { + /** + * Module.sd2nd.Global.Event.Exception.ActionNotFound + * + * @param string $dirname + * + * @return void + **/ + XCube_DelegateUtils::call('Module.sd2nd.Global.Event.Exception.ActionNotFound',$this->mAssetManager->mDirname); + /** + * Module.{dirname}.Event.Exception.ActionNotFound + * + * @param void + * + * @return void + **/ + XCube_DelegateUtils::call('Module.' . $this->mXoopsModule->get('dirname') . '.Event.Exception.ActionNotFound'); + $root =& XCube_Root::getSingleton(); + $root->mController->executeForward(XOOPS_URL); + } + + /** + * doPreparationError + * + * @param void + * + * @return void + **/ + private function doPreparationError() + { + /** + * Module.sd2nd.Global.Event.Exception.Preparation + * + * @param string $dirname + * + * @return void + **/ + XCube_DelegateUtils::call('Module.sd2nd.Global.Event.Exception.Preparation',$this->mAssetManager->mDirname); + /** + * Module.{dirname}.Event.Exception.Preparation + * + * @param void + * + * @return void + **/ + XCube_DelegateUtils::call('Module.' . $this->mXoopsModule->get('dirname') . '.Event.Exception.Preparation'); + $root =& XCube_Root::getSingleton(); + $root->mController->executeForward(XOOPS_URL); + } + + /** + * doPermissionError + * + * @param void + * + * @return void + **/ + private function doPermissionError() + { + /** + * Module.sd2nd.Global.Event.Exception.Permission + * + * @param string $dirname + * + * @return void + **/ + XCube_DelegateUtils::call('Module.sd2nd.Global.Event.Exception.Permission',$this->mAssetManager->mDirname); + /** + * Module.{dirname}.Event.Exception.Permission + * + * @param void + * + * @return void + **/ + XCube_DelegateUtils::call('Module.' . $this->mXoopsModule->get('dirname') . '.Event.Exception.Permission'); + $root =& XCube_Root::getSingleton(); + $root->mController->executeForward(XOOPS_URL); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/Sd2ndUtils.class.php b/trust_path/modules/sd2nd/class/Sd2ndUtils.class.php new file mode 100644 index 0000000..90f6ae0 --- /dev/null +++ b/trust_path/modules/sd2nd/class/Sd2ndUtils.class.php @@ -0,0 +1,59 @@ + diff --git a/trust_path/modules/sd2nd/class/handler/Ability.class.php b/trust_path/modules/sd2nd/class/handler/Ability.class.php new file mode 100644 index 0000000..5286630 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Ability.class.php @@ -0,0 +1,70 @@ +initVar('ability_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('ability_name', XOBJ_DTYPE_STRING, '', false, 50); + $this->initVar('description', XOBJ_DTYPE_STRING, '', false, 255); + $this->initVar('ability_cost', XOBJ_DTYPE_INT, '', false); + $this->initVar('regist_time', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_AbilityHandler +**/ +class Sd2nd_AbilityHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_ability'; + + /** + * @brief string + **/ + public $mPrimary = 'ability_id'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_AbilityObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/ActiveAbility.class.php b/trust_path/modules/sd2nd/class/handler/ActiveAbility.class.php new file mode 100644 index 0000000..13faade --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/ActiveAbility.class.php @@ -0,0 +1,68 @@ +initVar('eno', XOBJ_DTYPE_INT, '', false); + $this->initVar('slot', XOBJ_DTYPE_INT, '', false); + $this->initVar('ability_id', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_ActiveAbilityHandler +**/ +class Sd2nd_ActiveAbilityHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_active_ability'; + + /** + * @brief string + **/ + public $mPrimary = 'eno'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_ActiveAbilityObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Char.class.php b/trust_path/modules/sd2nd/class/handler/Char.class.php new file mode 100644 index 0000000..47e84a2 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Char.class.php @@ -0,0 +1,357 @@ +initVar('eno', XOBJ_DTYPE_INT, '', false); + $this->initVar('full_name', XOBJ_DTYPE_STRING, '', false, 40); + $this->initVar('nick_name', XOBJ_DTYPE_STRING, '', false, 16); + $this->initVar('battle_name', XOBJ_DTYPE_STRING, '', false, 16); + $this->initVar('sex', XOBJ_DTYPE_INT, '', false); + $this->initVar('age', XOBJ_DTYPE_INT, '', false); + $this->initVar('height', XOBJ_DTYPE_INT, '', false); + $this->initVar('weight', XOBJ_DTYPE_INT, '', false); + $this->initVar('profile', XOBJ_DTYPE_TEXT, '', false); + $this->initVar('race', XOBJ_DTYPE_INT, '', false); + $this->initVar('element_base', XOBJ_DTYPE_INT, '', false); + $this->initVar('element_ext', XOBJ_DTYPE_INT, '', false); + $this->initVar('active_costume', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_DummyCharObject +**/ +class Sd2nd_DummyCharObject extends XoopsSimpleObject +{ + /** + * __construct + * + * @param string[] $columns + * + * @return void + **/ + public function __construct(/*** string[] ***/ $columns = array()) + { + $this->initVar('eno',XOBJ_DTYPE_INT); + $this->initVar('name',XOBJ_DTYPE_STRING); + foreach($columns as $col) + { + $this->initVar($col,XOBJ_DTYPE_STRING); + } + } +} + +/** + * Sd2nd_CharHandler +**/ +class Sd2nd_CharHandler extends XoopsObjectGenericHandler +{ + public /*** string ***/ $mTable = '{dirname}_char'; + public /*** string ***/ $mPrimary = 'eno'; + public /*** string ***/ $mClass = 'Sd2nd_CharObject'; + protected /*** string ***/ $_mAbilityTable = '{dirname}_ability'; + protected /*** string ***/ $_mSkillTable = '{dirname}_skill'; + protected /*** string ***/ $_mActiveAbilityTable = '{dirname}_active_ability'; + protected /*** string ***/ $_mLearnedAbilityTable = '{dirname}_learned_ability'; + protected /*** string ***/ $_mLearnedSkillTable = '{dirname}_learned_skill'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $replace = array('{dirname}' => $dirname); + $this->mTable = strtr($this->mTable,$replace); + $this->_mAbilityTable = $db->prefix(strtr($this->_mAbilityTable,$replace)); + $this->_mSkillTable = $db->prefix(strtr($this->_mSkillTable,$replace)); + $this->_mActiveAbilityTable = $db->prefix(strtr($this->_mActiveAbilityTable,$replace)); + $this->_mLearnedAbilityTable = $db->prefix(strtr($this->_mLearnedAbilityTable,$replace)); + $this->_mLearnedSkillTable = $db->prefix(strtr($this->_mLearnedSkillTable,$replace)); + parent::XoopsObjectGenericHandler($db); + } + + /** + * _escape + * + * @param string $str + * + * @return string + **/ + protected function _escape(/*** string ***/ $str) + { + return mysql_real_escape_string($str,$this->db->conn); + } + + /** + * &getActiveAbility + * + * @param CriteriaElement $cri + * + * @return Sd2nd_DummyCharObject[] + **/ + public function &getActiveAbility(CriteriaElement $cri) + { + $ret = array(); + $sqlBase = 'SELECT `c`.`eno` AS eno,`c`.`full_name` AS name,{0} FROM `{1}` AS c {2} WHERE {3} GROUP BY `c`.`eno` ORDER BY `c`.`eno` ASC'; + $columns = array(); + $tables = array(); + $where = array(); + for($i = 1;$i <= 5;$i++) + { + $columns[] = XCube_Utils::formatString('`a{0}`.`ability_name` AS slot{0}',$i); + $tables[] = XCube_Utils::formatString( + 'LEFT JOIN `{0}` AS s{1} ON `c`.`eno` = `s{1}`.`eno` AND `s{1}`.`slot` = {1} ' + . 'LEFT JOIN `{2}` AS a{1} ON `a{1}`.`ability_id` = `s{1}`.`ability_id`', + $this->_mActiveAbilityTable,$i,$this->_mAbilityTable + ); + } + for($i = 0;$i < $cri->getCountChildElements();$i++) + { + $c = $cri->getChildElement($i); + $tables[] = XCube_Utils::formatString( + 'LEFT JOIN `{0}` AS w{1} ON `c`.`eno` = `w{1}`.`eno` ' + . 'LEFT JOIN `{2}` AS n{1} ON `n{1}`.`ability_id` = `w{1}`.`ability_id`', + $this->_mActiveAbilityTable,$i,$this->_mAbilityTable + ); + $where[] = XCube_Utils::formatString( + "`n{0}`.`ability_name` LIKE '{1}%'", + $i,$this->_escape($c->getValue()) + ); + } + $sql = XCube_Utils::formatString($sqlBase,implode(',',$columns),$this->mTable,implode(' ',$tables),implode(' AND ',$where)); + if($res = $this->db->query($sql,$cri->getLimit(),$cri->getStart())) + { + while($row = $this->db->fetchArray($res)) + { + $obj = new Sd2nd_DummyCharObject(array('slot1','slot2','slot3','slot4','slot5')); + $obj->setVars($row); + $ret[] =& $obj; + unset($obj); + } + } + return $ret; + } + + /** + * getActiveAbilityCount + * + * @param CriteriaElement $cri + * + * @return int + **/ + public function getActiveAbilityCount(CriteriaElement $cri) + { + $ret = null; + $c = $cri->getChildElement(0); + $sql = XCube_Utils::formatString( + 'SELECT COUNT(DISTINCT `w0`.`eno`) AS c FROM `{0}` AS w0 ' + . 'LEFT JOIN `{1}` AS n0 ON `n0`.`ability_id` = `w0`.`ability_id` ', + $this->_mActiveAbilityTable,$this->_mAbilityTable + ); + $where = "`n0`.`ability_name` LIKE '" . $this->_escape($c->getValue()) . "%' "; + for($i = 1;$i < $cri->getCountChildElements();$i++) + { + $c = $cri->getChildElement($i); + $sql .= XCube_Utils::formatString( + 'LEFT JOIN `{0}` AS w{1} ON `w0`.`eno` = `w{1}`.`eno` ' + . 'LEFT JOIN `{2}` AS n{1} ON `n{1}`.`ability_id` = `w{1}`.`ability_id` ', + $this->_mActiveAbilityTable,$i,$this->_mAbilityTable + ); + $where .= XCube_Utils::formatString( + "AND `n{0}`.`ability_name` LIKE '{1}%' ", + $i,$this->_escape($c->getValue()) + ); + } + if($res = $this->db->query($sql . ' WHERE ' . $where)) + { + $row = $this->db->fetchArray($res); + $ret = $row['c']; + } + return $ret; + } + + /** + * &getLearnedAbility + * + * @param CriteriaElement $cri + * + * @return Sd2nd_DummyCharObject[] + **/ + public function &getLearnedAbility(CriteriaElement $cri) + { + $ret = array(); + $sqlBase = 'SELECT `c`.`eno` AS eno,`c`.`full_name` AS name FROM `{0}` AS c {1} WHERE {2} GROUP BY `c`.`eno` ORDER BY `c`.`eno` ASC'; + $tables = array(); + $where = array(); + for($i = 0;$i < $cri->getCountChildElements();$i++) + { + $c = $cri->getChildElement($i); + $tables[] = XCube_Utils::formatString( + 'LEFT JOIN `{0}` AS w{1} ON `c`.`eno` = `w{1}`.`eno` ' + . 'LEFT JOIN `{2}` AS n{1} ON `n{1}`.`ability_id` = `w{1}`.`ability_id`', + $this->_mLearnedAbilityTable,$i,$this->_mAbilityTable + ); + $where[] = XCube_Utils::formatString( + "`n{0}`.`ability_name` LIKE '{1}%'", + $i,$this->_escape($c->getValue()) + ); + } + $sql = XCube_Utils::formatString($sqlBase,$this->mTable,implode(' ',$tables),implode(' AND ',$where)); + if($res = $this->db->query($sql,$cri->getLimit(),$cri->getStart())) + { + while($row = $this->db->fetchArray($res)) + { + $obj = new Sd2nd_DummyCharObject(); + $obj->setVars($row); + $ret[] =& $obj; + unset($obj); + } + } + return $ret; + } + + /** + * getLearnedAbilityCount + * + * @param CriteriaElement $cri + * + * @return int + **/ + public function getLearnedAbilityCount(CriteriaElement $cri) + { + $ret = null; + $c = $cri->getChildElement(0); + $sql = XCube_Utils::formatString( + 'SELECT COUNT(DISTINCT `w0`.`eno`) AS c FROM `{0}` AS w0 ' + . 'LEFT JOIN `{1}` AS n0 ON `n0`.`ability_id` = `w0`.`ability_id` ', + $this->_mLearnedAbilityTable,$this->_mAbilityTable + ); + $where = "`n0`.`ability_name` LIKE '" . $this->_escape($c->getValue()) . "%' "; + for($i = 1;$i < $cri->getCountChildElements();$i++) + { + $c = $cri->getChildElement($i); + $sql .= XCube_Utils::formatString( + 'LEFT JOIN `{0}` AS w{1} ON `w0`.`eno` = `w{1}`.`eno` ' + . 'LEFT JOIN `{2}` AS n{1} ON `n{1}`.`ability_id` = `w{1}`.`ability_id` ', + $this->_mLearnedAbilityTable,$i,$this->_mAbilityTable + ); + $where .= XCube_Utils::formatString( + "AND `n{0}`.`ability_name` LIKE '{1}%' ", + $i,$this->_escape($c->getValue()) + ); + } + if($res = $this->db->query($sql . ' WHERE ' . $where)) + { + $row = $this->db->fetchArray($res); + $ret = $row['c']; + } + return $ret; + } + + /** + * &getLearnedSkill + * + * @param CriteriaElement $cri + * + * @return Sd2nd_DummyCharObject[] + **/ + public function &getLearnedSkill(CriteriaElement $cri) + { + $ret = array(); + $sqlBase = 'SELECT `c`.`eno` AS eno,`c`.`full_name` AS name FROM `{0}` AS c {1} WHERE {2} GROUP BY `c`.`eno` ORDER BY `c`.`eno` ASC'; + $tables = array(); + $where = array(); + for($i = 0;$i < $cri->getCountChildElements();$i++) + { + $c = $cri->getChildElement($i); + $tables[] = XCube_Utils::formatString( + 'LEFT JOIN `{0}` AS w{1} ON `c`.`eno` = `w{1}`.`eno` ' + . 'LEFT JOIN `{2}` AS n{1} ON `n{1}`.`skill_id` = `w{1}`.`skill_id`', + $this->_mLearnedSkillTable,$i,$this->_mSkillTable + ); + $where[] = XCube_Utils::formatString( + "`n{0}`.`skill_name` LIKE '{1}%'", + $i,$this->_escape($c->getValue()) + ); + } + $sql = XCube_Utils::formatString($sqlBase,$this->mTable,implode(' ',$tables),implode(' AND ',$where)); + if($res = $this->db->query($sql,$cri->getLimit(),$cri->getStart())) + { + while($row = $this->db->fetchArray($res)) + { + $obj = new Sd2nd_DummyCharObject(); + $obj->setVars($row); + $ret[] =& $obj; + unset($obj); + } + } + return $ret; + } + + /** + * getLearnedSkillCount + * + * @param CriteriaElement $cri + * + * @return int + **/ + public function getLearnedSkillCount(CriteriaElement $cri) + { + $ret = null; + $c = $cri->getChildElement(0); + $sql = XCube_Utils::formatString( + 'SELECT COUNT(DISTINCT `w0`.`eno`) AS c FROM `{0}` AS w0 ' + . 'LEFT JOIN `{1}` AS n0 ON `n0`.`skill_id` = `w0`.`skill_id` ', + $this->_mLearnedSkillTable,$this->_mSkillTable + ); + $where = "`n0`.`skill_name` LIKE '" . $this->_escape($c->getValue()) . "%' "; + for($i = 1;$i < $cri->getCountChildElements();$i++) + { + $c = $cri->getChildElement($i); + $sql .= XCube_Utils::formatString( + 'LEFT JOIN `{0}` AS w{1} ON `w0`.`eno` = `w{1}`.`eno` ' + . 'LEFT JOIN `{2}` AS n{1} ON `n{1}`.`skill_id` = `w{1}`.`skill_id` ', + $this->_mLearnedSkillTable,$i,$this->_mSkillTable + ); + $where .= XCube_Utils::formatString( + "AND `n{0}`.`ability_name` LIKE '{1}%' ", + $i,$this->_escape($c->getValue()) + ); + } + if($res = $this->db->query($sql . ' WHERE ' . $where)) + { + $row = $this->db->fetchArray($res); + $ret = $row['c']; + } + return $ret; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Costume.class.php b/trust_path/modules/sd2nd/class/handler/Costume.class.php new file mode 100644 index 0000000..e376868 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Costume.class.php @@ -0,0 +1,85 @@ +initVar('costume_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('costume_name', XOBJ_DTYPE_STRING, '', false, 50); + $this->initVar('grow_life', XOBJ_DTYPE_INT, '', false); + $this->initVar('grow_soul', XOBJ_DTYPE_INT, '', false); + $this->initVar('grow_pow', XOBJ_DTYPE_INT, '', false); + $this->initVar('grow_str', XOBJ_DTYPE_INT, '', false); + $this->initVar('grow_dex', XOBJ_DTYPE_INT, '', false); + $this->initVar('grow_speed', XOBJ_DTYPE_INT, '', false); + $this->initVar('grow_mag', XOBJ_DTYPE_INT, '', false); + $this->initVar('grow_reg', XOBJ_DTYPE_INT, '', false); + $this->initVar('grow_con', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_hp', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_tp', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_at', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_df', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_mat', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_mdf', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_act', XOBJ_DTYPE_INT, '', false); + $this->initVar('move_cost', XOBJ_DTYPE_INT, '', false); + $this->initVar('regist_time', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_CostumeHandler +**/ +class Sd2nd_CostumeHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_costume'; + + /** + * @brief string + **/ + public $mPrimary = 'costume_id'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_CostumeObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/EnoPnoLink.class.php b/trust_path/modules/sd2nd/class/handler/EnoPnoLink.class.php new file mode 100644 index 0000000..7fa0d46 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/EnoPnoLink.class.php @@ -0,0 +1,68 @@ +initVar('eno', XOBJ_DTYPE_INT, '', false); + $this->initVar('pno', XOBJ_DTYPE_INT, '', false); + $this->initVar('regist_time', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_EnoPnoLinkHandler +**/ +class Sd2nd_EnoPnoLinkHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_eno_pno_link'; + + /** + * @brief string + **/ + public $mPrimary = 'eno'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_EnoPnoLinkObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Icon.class.php b/trust_path/modules/sd2nd/class/handler/Icon.class.php new file mode 100644 index 0000000..d0a8938 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Icon.class.php @@ -0,0 +1,97 @@ +initVar('icon_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('eno', XOBJ_DTYPE_INT, '', false); + $this->initVar('slot', XOBJ_DTYPE_INT, '', false); + $this->initVar('icon_url', XOBJ_DTYPE_STRING, '', false, 255); + $this->initVar('icon_height', XOBJ_DTYPE_INT, '', false); + $this->initVar('icon_width', XOBJ_DTYPE_INT, '', false); + $this->initVar('update_time', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_IconHandler +**/ +class Sd2nd_IconHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_icon'; + + /** + * @brief string + **/ + public $mPrimary = 'icon_id'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_IconObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } + + /** + * &getByUnique + * + * @param int $eno + * @param int $slot + * + * @return Sd2nd_IconObject + **/ + public function &getByUnique(/*** int ***/ $eno,/*** int ***/ $slot) + { + $cri = new CriteriaCompo(); + $cri->add(new Criteria('eno',$eno)); + $cri->add(new Criteria('slot',$slot)); + $cri->setSort('update_time','desc'); + $ret =& $this->getObjects($cri); + + if(!is_array($ret) || count($ret) != 1) + { + $ret = null; + return $ret; + } + + return $ret[0]; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Image.class.php b/trust_path/modules/sd2nd/class/handler/Image.class.php new file mode 100644 index 0000000..cf76b56 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Image.class.php @@ -0,0 +1,94 @@ +initVar('image_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('eno', XOBJ_DTYPE_INT, '', false); + $this->initVar('image_url', XOBJ_DTYPE_STRING, '', false, 255); + $this->initVar('image_height', XOBJ_DTYPE_INT, '', false); + $this->initVar('image_width', XOBJ_DTYPE_INT, '', false); + $this->initVar('image_link', XOBJ_DTYPE_STRING, '', false, 255); + $this->initVar('update_time', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_ImageHandler +**/ +class Sd2nd_ImageHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_image'; + + /** + * @brief string + **/ + public $mPrimary = 'image_id'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_ImageObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } + + /** + * getByUnique + * + * @paarm int $eno + * + * @return Sd2nd_ImageObject + **/ + public function getByUnique(/*** int ***/ $eno) + { + $cri = new Criteria('eno',$eno); + $cri->setSort('update_time','desc'); + $ret =& $this->getObjects($cri); + + if(!is_array($ret) || count($ret) != 1) + { + $ret = null; + return $ret; + } + + return $ret[0]; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Kind.class.php b/trust_path/modules/sd2nd/class/handler/Kind.class.php new file mode 100644 index 0000000..aa7df3c --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Kind.class.php @@ -0,0 +1,118 @@ +initVar('kind_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('kind_name', XOBJ_DTYPE_STRING, '', false, 20); + $this->initVar('kind_kind', XOBJ_DTYPE_INT, '', false); + $this->initVar('weight', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_KindHandler +**/ +class Sd2nd_KindHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_kind'; + + /** + * @brief string + **/ + public $mPrimary = 'kind_id'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_KindObject'; + + /** + * @brief Sd2nd_KindObject{} + **/ + protected $_mConvertTable = null; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } + + /** + * _setupConvertTable + * + * @param void + * + * @return void + **/ + protected function _setupConvertTable() + { + if($this->_mConvertTable == null) + { + $cri = new CriteriaCompo(); + $cri->setSort('weight','ASC'); + $cri->addSort('kind_name','ASC'); + $this->_mConvertTable =& $this->getObjects($cri,null,null,true); + } + } + + /** + * getList + * + * @param void + * + * @return Sd2nd_KindObject{} + **/ + public function getList() + { + $this->_setupConvertTable(); + return $this->_mConvertTable; + } + + /** + * convertToView + * + * @param int $key + * + * @return string + **/ + public function convertToView(/*** int ***/ $key) + { + $this->_setupConvertTable(); + return isset($this->_mConvertTable[$key]) ? $this->_mConvertTable[$key]->getShow('kind_name') : null; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/LearnedAbility.class.php b/trust_path/modules/sd2nd/class/handler/LearnedAbility.class.php new file mode 100644 index 0000000..b820ba6 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/LearnedAbility.class.php @@ -0,0 +1,68 @@ +initVar('eno', XOBJ_DTYPE_INT, '', false); + $this->initVar('ability_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('regist_time', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_LearnedAbilityHandler +**/ +class Sd2nd_LearnedAbilityHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_learned_ability'; + + /** + * @brief string + **/ + public $mPrimary = 'eno'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_LearnedAbilityObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/LearnedCostume.class.php b/trust_path/modules/sd2nd/class/handler/LearnedCostume.class.php new file mode 100644 index 0000000..22295ab --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/LearnedCostume.class.php @@ -0,0 +1,74 @@ +initVar('eno', XOBJ_DTYPE_INT, '', false); + $this->initVar('costume_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('costume_lv', XOBJ_DTYPE_INT, '', false); + $this->initVar('costume_point', XOBJ_DTYPE_INT, '', false); + $this->initVar('regist_time', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_LearnedCostumeHandler +**/ +class Sd2nd_LearnedCostumeHandler extends XoopsObjectGenericHandler +{ + public /*** string ***/ $mTable = '{dirname}_learned_costume'; + public /*** string ***/ $mPrimary = 'eno'; + public /*** string ***/ $mClass = 'Sd2nd_LearnedCostumeObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } + + /** + * _update + * + * @param XoopsSimpleObject $obj + * + * @return string + **/ + public function _update(XoopsSimpleObject $obj) + { + return sprintf( + 'UPDATE `%s` SET `costume_lv` = %d,`costume_point` = %d,`regist_time` = %d WHERE `eno` = %d AND `costume_id` = %d', + $this->mTable,$obj->get('costume_lv'),$obj->get('costume_point'),$obj->get('regist_time'),$obj->get('eno'),$obj->get('costume_id') + ); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/LearnedSkill.class.php b/trust_path/modules/sd2nd/class/handler/LearnedSkill.class.php new file mode 100644 index 0000000..ab3e7a5 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/LearnedSkill.class.php @@ -0,0 +1,68 @@ +initVar('eno', XOBJ_DTYPE_INT, '', false); + $this->initVar('skill_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('regist_time', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_LearnedSkillHandler +**/ +class Sd2nd_LearnedSkillHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_learned_skill'; + + /** + * @brief string + **/ + public $mPrimary = 'eno'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_LearnedSkillObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Map.class.php b/trust_path/modules/sd2nd/class/handler/Map.class.php new file mode 100644 index 0000000..29a5ea8 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Map.class.php @@ -0,0 +1,370 @@ +initVar('map_id', XOBJ_DTYPE_INT, 1, false); + $this->initVar('x', XOBJ_DTYPE_INT, '', false); + $this->initVar('y', XOBJ_DTYPE_INT, '', false); + $this->initVar('spot_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('update_time', XOBJ_DTYPE_INT, '', false); + } +} + + +/** + * @class Sd2nd_MapCollection +**/ +class Sd2nd_MapCollection implements Iterator +{ + const /*** Enum ***/ UNKNOWN_ID = 1; + const /*** Enum ***/ IGNORE_UDON_ID = 6; + const /*** Enum ***/ IGNORE_MOUNTAIN = 12; + const /*** Enum ***/ IGNORE_DUNGEON_ID = 19; + protected /*** int ***/ $_mMapId = null; + protected /*** int{} ***/ $_mRange = array('minX' => 0,'maxX' => 0,'minY' => 0,'maxY' => 0); + protected /*** Enum{}{} ***/ $_mMap = array(); + protected /*** Sd2nd_MapCacheHandler ***/ $_mCacheHandler = null; + protected /*** Sd2nd_MapSpotObject{} ***/ $_mSpot = null; + protected /*** int ***/ $_mUpdateTime = null; + protected /*** int{} ***/ $_mCurrent = array('x' => null,'y' => null); + protected /*** bool ***/ $_mIsLast = false; + + /** + * __construct + * + * @param string $dirname + * @param int $updateTime + * @param int $mapId + * + * @return void + **/ + public function __construct(/*** string ***/ $dirname,/*** int ***/ $updateTime,/*** int ***/ $mapId = 1) + { + $asset =& Sd2nd_AssetManager::getInstance($dirname); + $this->_mMapId = $mapId; + $this->_mUpdateTime = $updateTime; + $this->_mCacheHandler =& $asset->getObject('handler',Sd2nd_AssetManager::HANDLER_MAP_CACHE); + $spotHandler =& $asset->getObject('handler',Sd2nd_AssetManager::HANDLER_MAP_SPOT); + $this->_mSpot =& $spotHandler->getObjects(null,null,null,true); + } + + /** + * add + * + * @param Sd2nd_MapObject $obj + * + * @return void + **/ + public function add(Sd2nd_MapObject $obj) + { + $this->_add($obj->get('x'),$obj->get('y'),$obj->get('spot_id')); + } + + /** + * addBySpotList + * + * @param int $baseX + * @param int $baseY + * @param int[][] $spotList + * + * @return + **/ + public function addBySpotList(/*** int ***/ $baseX,/*** int ***/ $baseY,/*** int[][] ***/ $spotList) + { + foreach($spotList as $relativeY => $line) + { + foreach($line as $relativeX => $spot) + { + $x = $baseX + $relativeX; + $y = $baseY + $relativeY; + if($spot != self::UNKNOWN_ID && (!isset($this->_mMap[$x][$y]) || !in_array($spot,array($this->_mMap[$x][$y],self::IGNORE_UDON_ID,self::IGNORE_MOUNTAIN,self::IGNORE_DUNGEON_ID)))) + { + $this->_add($x,$y,$spot); + $map =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_MAP); + $map->setVars(array('map_id' => $this->_mMapId,'x' => $x,'y' => $y,'spot_id' => $spot,'update_time' => $this->_mUpdateTime)); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_MAP,$map); + } + } + } + } + + /** + * load + * + * @param int $updateTime + * @param int $mapId + * + * @return bool + **/ + public function load(/*** int ***/ $updateTime,/*** int ***/ $mapId) + { + if($cache =& $this->_mCacheHandler->getByUnique($mapId,$updateTime)) + { + $this->_mMapId = $mapId; + $this->_mRange = unserialize($cache->get('map_range')); + $this->_mMap = unserialize($cache->get('map_body')); + return true; + } + + return false; + } + + /** + * _add + * + * @param int $x + * @param int $y + * @param Enum $spot + * + * @return void + **/ + protected function _add(/*** int ***/ $x,/*** int ***/ $y,/*** Enum ***/ $spot) + { + if($x < $this->_mRange['minX']) + { + $this->_mRange['minX'] = $x; + } + if($x > $this->_mRange['maxX']) + { + $this->_mRange['maxX'] = $x; + } + if($y < $this->_mRange['minY']) + { + $this->_mRange['minY'] = $y; + } + if($y > $this->_mRange['maxY']) + { + $this->_mRange['maxY'] = $y; + } + + $this->_mMap[$x][$y] = $spot; + } + + /** + * save + * + * @param void + * + * @return void + **/ + public function save() + { + $cache =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_MAP_CACHE); + $cache->setVars(array('map_id' => $this->_mMapId,'update_time' => $this->_mUpdateTime,'map_range' => serialize($this->_mRange),'map_body' => serialize($this->_mMap))); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_MAP_CACHE,$cache); + } + + /** + * get + * + * @param int $x + * @param int $y + * + * @return Sd2nd_MapSpotObject + **/ + public function get(/*** int ***/ $x,/*** int ***/ $y) + { + $id = isset($this->_mMap[$x][$y]) ? $this->_mMap[$x][$y] : self::UNKNOWN_ID; + return isset($this->_mSpot[$id]) ? $this->_mSpot[$id] : $this->_mSpot[self::UNKNOWN_ID]; + } + + /** + * current + * + * @param void + * + * @return Sd2nd_MapSpotObject + **/ + public function current() + { + return $this->get($this->_mCurrent['x'],$this->_mCurrent['y']); + } + + /** + * key + * + * @param void + * + * @return int{} + **/ + public function key() + { + return $this->_mCurrent; + } + + /** + * next + * + * @param void + * + * @return void + **/ + public function next() + { + $this->_mCurrent['x']++; + if($this->_mCurrent['x'] > $this->_mRange['maxX']) + { + $this->_mCurrent['x'] = $this->_mRange['minX']; + $this->_mCurrent['y']++; + if($this->_mCurrent['y'] > $this->_mRange['maxY']) + { + $this->_mIsLast = true; + $this->_mCurrent['y'] = $this->_mRange['maxY']; + } + } + } + + /** + * rewind + * + * @param void + * + * @return void + **/ + public function rewind() + { + $this->_mCurrent = array('x' => $this->_mRange['minX'],'y' => $this->_mRange['minY']); + $this->_mIsLast = false; + } + + /** + * seek + * + * @param int{} $key + * + * @return void + **/ + public function seek(/*** int{} ***/ $key) + { + if(!isset($key['x']) || !isset($key['y'])) + { + return; + } + + $x = $key['x']; + $y = $key['y']; + if($x < $this->_mRange['minX'] || $x > $this->_mRange['maxX'] || $y < $this->_mRange['minY'] || $y > $this->_mMapSize['maxY']) + { + return; + } + + $this->_mCurrent = array('x' => $x,'y' => $y); + $this->_mIsLast = ($this->isMaxX() && $this->isMaxY()); + } + + /** + * valid + * + * @param void + * + * @return bool + **/ + public function valid() + { + return !$this->_mIsLast; + } + + /** + * isMaxX + * + * @param void + * + * @return bool + **/ + public function isMaxX() + { + return $this->_mCurrent['x'] == $this->_mRange['maxX']; + } + + /** + * isMaxY + * + * @param void + * + * @return bool + **/ + public function isMaxY() + { + return $this->_mCurrent['y'] == $this->_mRange['maxY']; + } + + /** + * getDistance + * + * @param void + * + * @return int + **/ + public function getDistance() + { + return abs($this->_mCurrent['x']) + abs($this->_mCurrent['y']); + } +} + + +/** + * Sd2nd_MapHandler +**/ +class Sd2nd_MapHandler extends XoopsObjectGenericHandler +{ + public /*** string ***/ $mTable = '{dirname}_map'; + public /*** string ***/ $mPrimary = 'x'; + public /*** string ***/ $mClass = 'Sd2nd_MapObject'; + protected /*** string ***/ $_mDirname = null; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->_mDirname = $dirname; + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } + + /** + * getCollection + * + * @param int $baseTime + * @param int $loadTime + * @param int $mapId + * + * @return Sd2nd_MapCollection + **/ + public function getCollection(/*** int ***/ $baseTime,/*** int ***/ $loadTime = null,/*** int ***/ $mapId = 1) + { + $collection = new Sd2nd_MapCollection($this->_mDirname,$baseTime,$mapId); + $collection->load($loadTime == null ? $baseTime : $loadTime,$mapId); + return $collection; + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/handler/MapCache.class.php b/trust_path/modules/sd2nd/class/handler/MapCache.class.php new file mode 100644 index 0000000..5b238e3 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/MapCache.class.php @@ -0,0 +1,76 @@ +initVar('map_id', XOBJ_DTYPE_INT, 1, false); + $this->initVar('update_time', XOBJ_DTYPE_INT, '', false); + $this->initVar('map_range', XOBJ_DTYPE_STRING, '', false); + $this->initVar('map_body', XOBJ_DTYPE_TEXT, '', false); + } +} + + +/** + * Sd2nd_MapCacheHandler +**/ +class Sd2nd_MapCacheHandler extends XoopsObjectGenericHandler +{ + public /*** string ***/ $mTable = '{dirname}_map_cache'; + public /*** string ***/ $mPrimary = 'update_time'; + public /*** string ***/ $mClass = 'Sd2nd_MapCacheObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } + + /** + * getByUnique + * + * @param int $mapId + * @param int $updateTime + * + * @return Sd2nd_MapCacheObject + **/ + public function getByUnique(/*** int ***/ $mapId,/*** int ***/ $updateTime) + { + $cri = new CriteriaCompo(); + $cri->add(new Criteria('map_id',$mapId)); + $cri->add(new Criteria('update_time',$updateTime)); + $objs = $this->getObjects($cri); + return isset($objs[0]) ? $objs[0] : null; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/MapName.class.php b/trust_path/modules/sd2nd/class/handler/MapName.class.php new file mode 100644 index 0000000..d4e85fa --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/MapName.class.php @@ -0,0 +1,108 @@ +initVar('map_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('map_name', XOBJ_DTYPE_STRING, '', false, 50); + $this->initVar('base_spot', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_MapNameHandler +**/ +class Sd2nd_MapNameHandler extends XoopsObjectGenericHandler +{ + public /*** string ***/ $mTable = '{dirname}_map_name'; + public /*** string ***/ $mPrimary = 'map_id'; + public /*** string ***/ $mClass = 'Sd2nd_MapNameObject'; + protected /*** Sd2nd_MapNameObject{} ***/ $_mList = null; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = strtr($this->mTable,array('{dirname}' => $dirname)); + parent::XoopsObjectGenericHandler($db); + } + + /** + * _setupList + * + * @param void + * + * @return void + **/ + protected function _setupList() + { + $this->_mList =& $this->getObjects(null,null,null,true); + } + + /** + * getList + * + * @param void + * + * @return Sd2nd_MapNameObject{} + **/ + public function getList() + { + $this->_setupList(); + return $this->_mList; + } + + /** + * convertToShow + * + * @param int $key + * + * @return string + **/ + public function convertToShow(/*** int ***/ $key) + { + return $this->isValid($key) ? $this->_mList[$key] : null; + } + + /** + * isValid + * + * @param int $key + * + * @return bool + **/ + public function isValid(/*** int ***/ $key) + { + $this->_setupList(); + return isset($this->_mList[$key]); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/MapSpot.class.php b/trust_path/modules/sd2nd/class/handler/MapSpot.class.php new file mode 100644 index 0000000..1dde919 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/MapSpot.class.php @@ -0,0 +1,69 @@ +initVar('spot_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('spot_name', XOBJ_DTYPE_STRING, '', false, 50); + $this->initVar('description', XOBJ_DTYPE_TEXT, '', false); + $this->initVar('regist_time', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_MapSpotHandler +**/ +class Sd2nd_MapSpotHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_map_spot'; + + /** + * @brief string + **/ + public $mPrimary = 'spot_id'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_MapSpotObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Race.class.php b/trust_path/modules/sd2nd/class/handler/Race.class.php new file mode 100644 index 0000000..04385f5 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Race.class.php @@ -0,0 +1,67 @@ +initVar('race_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('race_name', XOBJ_DTYPE_STRING, '', false, 50); + } +} + +/** + * Sd2nd_RaceHandler +**/ +class Sd2nd_RaceHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_race'; + + /** + * @brief string + **/ + public $mPrimary = 'race_id'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_RaceObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Skill.class.php b/trust_path/modules/sd2nd/class/handler/Skill.class.php new file mode 100644 index 0000000..1cc09fe --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Skill.class.php @@ -0,0 +1,125 @@ +initVar('skill_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('skill_name', XOBJ_DTYPE_STRING, '', false, 50); + $this->initVar('description', XOBJ_DTYPE_STRING, '', true, 255); + $this->initVar('range', XOBJ_DTYPE_INT, '', false); + $this->initVar('target', XOBJ_DTYPE_INT, '', false); + $this->initVar('kind', XOBJ_DTYPE_INT, '', false); + $this->initVar('tp', XOBJ_DTYPE_INT, '', false); + $this->initVar('regist_time', XOBJ_DTYPE_INT, '', false); + } + + /** + * getShow + * + * @param string $key + * + * @return string + **/ + public function getShow(/*** string ***/ $key) + { + $ret = null; + if($key == 'range') + { + $value = $this->get($key) * 0.1; + $ret = ($value == 0 ? _MD_SD2ND_LANG_ELEMENT_EMPTY : sprintf('%1.1f',$value)); + } + else + { + $ret = parent::getShow($key); + } + + return $ret; + } + + /** + * addElement + * + * @param Enum $element + * + * @return void + **/ + public function addElement(/*** Enum ***/ $element) + { + $this->_mElements[] = $element; + } + + /** + * getElements + * + * @param void + * + * @return Enum[] + **/ + public function getElements() + { + return $this->_mElements; + } +} + +/** + * Sd2nd_SkillHandler +**/ +class Sd2nd_SkillHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_skill'; + + /** + * @brief string + **/ + public $mPrimary = 'skill_id'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_SkillObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/SkillElementLink.class.php b/trust_path/modules/sd2nd/class/handler/SkillElementLink.class.php new file mode 100644 index 0000000..72fdc4b --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/SkillElementLink.class.php @@ -0,0 +1,132 @@ +initVar('skill_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('element', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_SkillElementLinkHandler +**/ +class Sd2nd_SkillElementLinkHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_skill_element_link'; + + /** + * @brief string + **/ + public $mPrimary = 'skill_id'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_SkillElementLinkObject'; + + /** + * @brief Enum{} + **/ + protected $_mElements = array(); + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + + $this->_mElements = array( + -3 => _MD_SD2ND_LANG_ELEMENT_RANDOM, + -2 => _MD_SD2ND_LANG_ELEMENT_UNDEFINED, + -1 => _MD_SD2ND_LANG_ELEMENT_EMPTY + ); + for($i = 0;$i <= 12;$i++) + { + $this->_mElements[$i] = constant('_MD_SD2ND_LANG_ELEMENT_' . $i); + } + } + + /** + * setupSkillElement + * + * @param Sd2nd_SkillObject{} &$obs + * + * @return void + **/ + public function setupSkillElement(/*** Sd2nd_SkillElementLinkObject{} ***/ &$objs) + { + if(count($objs) < 1) + { + return; + } + + $cri = new CriteriaCompo(); + foreach(array_keys($objs) as $key) + { + $cri->add(new Criteria('skill_id',$key),'or'); + } + + foreach($this->getObjects($cri) as $obj) + { + $objs[$obj->get('skill_id')]->addElement($obj->get('element')); + } + } + + /** + * convertToData + * + * @param string $value + * + * @return int + **/ + public function convertToData(/*** string ***/ $value) + { + return array_search($value,$this->_mElements); + } + + /** + * convertToView + * + * @param int $value + * + * @return string + **/ + public function convertToView(/*** int ***/ $value) + { + return isset($this->_mElements[$value]) ? $this->_mElements[$value] : null; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Status.class.php b/trust_path/modules/sd2nd/class/handler/Status.class.php new file mode 100644 index 0000000..c4298fb --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Status.class.php @@ -0,0 +1,100 @@ +initVar('eno', XOBJ_DTYPE_INT, '', false); + $this->initVar('lv', XOBJ_DTYPE_INT, '', false); + $this->initVar('life', XOBJ_DTYPE_INT, '', false); + $this->initVar('soul', XOBJ_DTYPE_INT, '', false); + $this->initVar('pow', XOBJ_DTYPE_INT, '', false); + $this->initVar('str', XOBJ_DTYPE_INT, '', false); + $this->initVar('dex', XOBJ_DTYPE_INT, '', false); + $this->initVar('speed', XOBJ_DTYPE_INT, '', false); + $this->initVar('mag', XOBJ_DTYPE_INT, '', false); + $this->initVar('reg', XOBJ_DTYPE_INT, '', false); + $this->initVar('con', XOBJ_DTYPE_INT, '', false); + $this->initVar('exp', XOBJ_DTYPE_INT, '', false); + $this->initVar('money', XOBJ_DTYPE_INT, '', false); + $this->initVar('sp', XOBJ_DTYPE_INT, '', false); + $this->initVar('base_hp', XOBJ_DTYPE_INT, '', false); + $this->initVar('base_at', XOBJ_DTYPE_INT, '', false); + $this->initVar('base_df', XOBJ_DTYPE_INT, '', false); + $this->initVar('base_mat', XOBJ_DTYPE_INT, '', false); + $this->initVar('base_mdf', XOBJ_DTYPE_INT, '', false); + $this->initVar('base_act', XOBJ_DTYPE_INT, '', false); + $this->initVar('base_move', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_hp', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_at', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_df', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_mat', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_mdf', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_act', XOBJ_DTYPE_INT, '', false); + $this->initVar('modify_move', XOBJ_DTYPE_INT, '', false); + $this->initVar('equip_hp', XOBJ_DTYPE_INT, '', false); + $this->initVar('equip_at', XOBJ_DTYPE_INT, '', false); + $this->initVar('equip_df', XOBJ_DTYPE_INT, '', false); + $this->initVar('equip_mat', XOBJ_DTYPE_INT, '', false); + $this->initVar('equip_mdf', XOBJ_DTYPE_INT, '', false); + $this->initVar('equip_act', XOBJ_DTYPE_INT, '', false); + $this->initVar('equip_move', XOBJ_DTYPE_INT, '', false); + } +} + +/** + * Sd2nd_StatusHandler +**/ +class Sd2nd_StatusHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_status'; + + /** + * @brief string + **/ + public $mPrimary = 'eno'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_StatusObject'; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Target.class.php b/trust_path/modules/sd2nd/class/handler/Target.class.php new file mode 100644 index 0000000..16e5a59 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Target.class.php @@ -0,0 +1,116 @@ +initVar('target_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('target_name', XOBJ_DTYPE_STRING, '', false, 10); + $this->initVar('point', XOBJ_DTYPE_STRING, '', false, 40); + } +} + +/** + * Sd2nd_TargetHandler +**/ +class Sd2nd_TargetHandler extends XoopsObjectGenericHandler +{ + /** + * @brief string + **/ + public $mTable = '{dirname}_target'; + + /** + * @brief string + **/ + public $mPrimary = 'target_id'; + + /** + * @brief string + **/ + public $mClass = 'Sd2nd_TargetObject'; + + /** + * @brief Sd2nd_TargetObject{} + **/ + protected $_mConvertTable = null; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } + + /** + * _setupConvertTable + * + * @param void + * + * @return void + **/ + protected function _setupConvertTable() + { + if($this->_mConvertTable == null) + { + $cri = new CriteriaCompo(); + $cri->setSort('target_name','ASC'); + $this->_mConvertTable =& $this->getObjects($cri,null,null,true); + } + } + + /** + * getList + * + * @param void + * + * @return Sd2nd_TargetObject{} + **/ + public function getList() + { + $this->_setupConvertTable(); + return $this->_mConvertTable; + } + + /** + * convertToView + * + * @param int $key + * + * @return string + **/ + public function convertToView(/*** int ***/ $key) + { + $this->_setupConvertTable(); + return isset($this->_mConvertTable[$key]) ? $this->_mConvertTable[$key]->getShow('target_name') : null; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/handler/Update.class.php b/trust_path/modules/sd2nd/class/handler/Update.class.php new file mode 100644 index 0000000..c0c4b62 --- /dev/null +++ b/trust_path/modules/sd2nd/class/handler/Update.class.php @@ -0,0 +1,126 @@ +initVar('update_time', XOBJ_DTYPE_INT, '', false); + } + + /** + * getFormatDate + * + * @param string $format + * 'Y' YYYY + * 'y' yy + * 'm' mm + * 'd' dd + * + * @param string + **/ + public function getFormatDate(/*** string ***/ $format = 'Y/m/d') + { + $updateTime = $this->get('update_time') + 20000000; + $pat = array('Y','y','m','d'); + $rep = array( + intval($updateTime / 10000), + substr($updateTime,2,2), + substr($updateTime,4,2), + substr($updateTime,6,2) + ); + + return str_replace($pat,$rep,$format); + } +} + +/** + * Sd2nd_UpdateHandler +**/ +class Sd2nd_UpdateHandler extends XoopsObjectGenericHandler +{ + public /*** string ***/ $mTable = '{dirname}_update'; + public /*** string ***/ $mPrimary = 'update_time'; + public /*** string ***/ $mClass = 'Sd2nd_UpdateObject'; + protected /*** Sd2nd_UpdateObject[] ***/ $_mUpdateTimes = null; + + /** + * __construct + * + * @param XoopsDatabase &$db + * @param string $dirname + * + * @return void + **/ + public function __construct(/*** XoopsDatabase ***/ &$db,/*** string ***/ $dirname) + { + $this->mTable = str_replace('{dirname}',$dirname,$this->mTable); + parent::XoopsObjectGenericHandler($db); + } + + /** + * _setupUpdateTimes + * + * @param void + * + * @return void + **/ + protected function _setupUpdateTimes() + { + if($this->_mUpdateTimes != null) + { + return; + } + + $cri = new Criteria(1,1); + $cri->setSort($this->mPrimary,'desc'); + $this->_mUpdateTimes = $this->getObjects($cri); + } + + /** + * getLatestUpdate + * + * @param void + * + * @return Sd2nd_UpdateObject + **/ + public function getLatestUpdate() + { + $this->_setupUpdateTimes(); + return isset($this->_mUpdateTimes[0]) ? $this->_mUpdateTimes[0] : null; + } + + /** + * getUpdateTimeList + * + * @param void + * + * @return Sd2nd_UpdateObject[] + **/ + public function getUpdateTimeList() + { + $this->_setupUpdateTimes(); + return $this->_mUpdateTimes; + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/AbstractProcess.class.php b/trust_path/modules/sd2nd/class/updater/AbstractProcess.class.php new file mode 100644 index 0000000..6d229fa --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/AbstractProcess.class.php @@ -0,0 +1,291 @@ +getMethods(); + usort($methods,array('Sd2nd_AbstractProcess','compareMethodName')); + + foreach($methods as $method) + { + if(substr($name = $method->name,0,7) == 'execute' && ctype_digit($date = substr($name,7)) && $date >= $updateTime) + { + $this->_mFunc = $method; + break; + } + } + + if(!$this->_mFunc instanceof ReflectionMethod) + { + $this->_mFunc = new ReflectionMethod($this,'executeLatest'); + } + } + + /** + * compareMethodName + * + * @param ReflactionMethod $a + * @paramm ReflectionMethod $b + * + * @return bool + **/ + public static function compareMethodName(ReflectionMethod $a,ReflectionMethod $b) + { + return ($a->name > $b->name); + } + + /** + * execute + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute() + { + $this->_mFunc->invoke($this); + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + abstract public function executeLatest(); +} + + +/** + * @class Sd2nd_AbstractFilter +**/ +abstract class Sd2nd_AbstractFilter extends Sd2nd_AbstractProcess +{ + /** + * getPriority + * + * @param void + * + * @return Enum + **/ + public function getPriority() + { + return XCUBE_DELEGATE_PRIORITY_NORMAL; + } +} + + +/** + * @class Sd2nd_AbstractParser +**/ +abstract class Sd2nd_AbstractParser extends Sd2nd_AbstractProcess +{ + /** + * @brief int + **/ + protected $_mActiveId = null; + + /** + * @brief Sd2nd_AbstractExecute + **/ + protected $_mExecute = null; + + /** + * @brief string + **/ + protected $_mLine = null; + + /** + * @brief int + **/ + protected $_mUpdateTime = null; + + /** + * prepare + * + * @param int $updateTime + * + * @return void + **/ + public function prepare(/*** int ***/ $updateTime) + { + parent::prepare($updateTime); + $this->_mUpdateTime = $updateTime; + } + + /** + * reset + * + * @param int $id + * @param Sd2nd_AbstractExecute &$execute + * @param string $line + * + * @return void + **/ + public function reset(/*** int ***/ $id,Sd2nd_AbstractExecute &$execute,/*** string ***/ $line) + { + $this->_mActiveId = $id; + $this->_mExecute =& $execute; + $this->_mLine = $line; + } +} + + +/** + * @class Sd2nd_AbstractExecute +**/ +abstract class Sd2nd_AbstractExecute extends Sd2nd_AbstractProcess +{ + /** + * @brief int + **/ + protected $_mActiveId = null; + + /** + * @brief string + **/ + protected $_mText = null; + + /** + * @brief string + **/ + protected $_mParserPath = 'execute/parser'; + + /** + * @brief string + **/ + protected $_mFilterPattern = '/^(?P\w+)/'; + + /** + * reset + * + * @param int $id + * @param string $text + * + * @return void + **/ + public function reset(/*** int ***/ $id,/*** string ***/ $text) + { + $this->_mActiveId = $id; + $this->_mText = $text; + } + + /** + * execute + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute() + { + $this->_mFunc->invoke($this); + $this->_save(); + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + $this->_parse(); + } + + /** + * _parse + * + * @param void + * + * @return void + **/ + protected function _parse() + { + foreach(explode("\n",$this->_mText) as $line) + { + $arr = array(); + $line = trim($line); + if(preg_match($this->_mFilterPattern,$line,$arr)) + { + $instance =& Sd2nd_UpdateUtils::getProcess($this->_mParserPath,$arr['name']); + if($instance instanceof Sd2nd_AbstractParser) + { + $instance->reset($this->_mActiveId,$this,$line); + try + { + $instance->execute(); + } + catch(Sd2nd_Exception $e) + { + Sd2nd_UpdateUtils::displayError($e); + if($e->isFatal()) + { + throw $e; + } + } + unset($instance); + } + } + } + } + + /** + * _save + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + abstract protected function _save(); +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/Sd2ndUpdateUtils.class.php b/trust_path/modules/sd2nd/class/updater/Sd2ndUpdateUtils.class.php new file mode 100644 index 0000000..6b2893b --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/Sd2ndUpdateUtils.class.php @@ -0,0 +1,393 @@ +getObject('handler',$name); + if(!$ret instanceof XoopsObjectGenericHandler) + { + throw new Sd2nd_Exception('Handler "' . $name . '" is not found.'); + } + + return $ret; + } + + /** + * displayError + * + * @param Sd2nd_Exception $e + * + * @return void + **/ + public static function displayError(Sd2nd_Exception $e) + { + // htrace($e->__toString()); + // echo mb_convert_encoding($e->__toString(),SD2ND_ECHO_ENCODING,mb_internal_encoding()); + file_put_contents(SD2ND_TRUST_PATH . '/class/updater/backup/error.txt',$e->__toString()); + } + + #region for sub process methods + /** + * executeFilter + * + * @param string $kind + * + * @return void + **/ + public static function executeFilter(/*** string ***/ $kind) + { + $process = new XCube_Delegate(); + + foreach(glob(SD2ND_TRUST_PATH . '/class/updater/' . $kind . '/*.class.php') as $file) + { + require_once $file; + if(class_exists($class = Sd2nd_UpdateUtils::makeClassNameFromPath($kind,$file))) + { + $filter = new $class(); + if($filter instanceof Sd2nd_AbstractFilter) + { + $filter->prepare(SD2ND_UPDATE_TIME); + $process->add(array($filter,'execute'),$filter->getPriority()); + } + unset($filter); + } + } + + try + { + $process->call(); + } + catch(Sd2nd_Exception $e) + { + Sd2nd_UpdateUtils::displayError($e); + if($e->isFatal()) + { + die(); + } + } + } + + /** + * &getProcess + * + * @param string $kind + * @param string $name + * + * @return Sd2nd_AbstractProcess + **/ + public static function &getProcess(/*** string ***/ $kind,/*** string ***/ $name) + { + static $processes = array(); + $ret = null; + + if(!isset($processes[$kind])) + { + $processes[$kind] = array(); + foreach(glob(SD2ND_TRUST_PATH . '/class/updater/' . $kind . '/*.class.php') as $file) + { + require_once $file; + $class = Sd2nd_UpdateUtils::makeClassNameFromPath($kind,$file); + if(class_exists($class)) + { + $instance = new $class(); + if($instance instanceof Sd2nd_AbstractProcess) + { + $processes[$kind][$class] =& $instance; + $processes[$kind][$class]->prepare(SD2ND_UPDATE_TIME); + } + unset($instance); + } + } + } + + if(isset($processes[$kind][$name = Sd2nd_UpdateUtils::makeClassName($kind,$name)])) + { + $ret =& $processes[$kind][$name]; + } + + return $ret; + } + + /** + * makeClassName + * + * @param string $kind + * @param string $name + * + * @return string + **/ + public static function makeClassName(/*** string ***/ $kind,/*** string ***/ $name) + { + return 'Sd2nd_' . ucfirst($name) . ucfirst(basename($kind)); + } + + /** + * makeClassNameFromPath + * + * @param string $kind + * @param string $path + * + * @return string + **/ + public static function makeClassNameFromPath(/*** string ***/ $kind,/*** string ***/ $path) + { + return Sd2nd_UpdateUtils::makeClassName($kind,substr(basename($path),0,-10)); + } + #endregion + + #region for convert methods + /** + * convertString + * + * @param string $str + * + * @return string + **/ + public static function convertString(/*** string ***/ $str) + { + return mb_convert_kana($str,'as',mb_internal_encoding()); + } + + /** + * convertTableName + * + * @param Enum $type + * + * @return string + **/ + public static function convertTableName(/*** Enum ***/ $type) + { + $handler =& Sd2nd_UpdateUtils::getHandler($type); + return $handler->mTable; + } + #endregion + + #region for parse methods + /** + * parseByRegex + * + * @param string $line + * @param string $pattern + * + * @return string[] + * @throw Sd2nd_Exception + **/ + public static function parseByRegex(/*** string ***/ $line,/*** string ***/ $pattern) + { + $ret = array(); + if(!preg_match($pattern,$line,$ret)) + { + throw new Sd2nd_Exception(array('line' => $line,'pattern' => $pattern)); + } + + return $ret; + } + + /** + * parseByExplode + * + * @param string $line + * @param int $count + * @param int $offset + * @param int $end + * @param string[] $column + * @param string $spliter + * + * @return string[] + * @throw Sd2nd_Exception + **/ + public static function parseByExplode(/*** string ***/ $line,/*** int ***/ $count,/*** int ***/ $offset,/*** int ***/ $end = null,/*** string[] ***/ $column = null,/*** string ***/ $spliter = ',') + { + $ret = $end != null ? explode($spliter,substr($line,$offset,$end)) : explode($spliter,substr($line,$offset)); + if(count($ret) != $count) + { + throw new Sd2nd_Exception(array('line' => $line,'count' => $count,'offset' => $offset,'end' => $end,'column' => $column,'spliter' => $spliter,'result' => $ret)); + } + + if(is_array($column) && count($column) && $count) + { + $ret = array_combine($column,$ret); + } + + return $ret; + } + #endregion + + #region for query methods + /** + * &createObject + * + * @param Enum $type + * + * @return XoopsSimpleObject + **/ + public static function &createObject(/*** Enum ***/ $type) + { + $handler =& Sd2nd_UpdateUtils::getHandler($type); + return $handler->create(true); + } + + /** + * insertObject + * + * @param Enum $type + * @param XoopsSimpleObject &$obj + * + * @return void + * @throw Sd2nd_Exception + **/ + public static function insertObject(/*** Enum ***/ $type,XoopsSimpleObject &$obj) + { + $handler =& Sd2nd_UpdateUtils::getHandler($type); + if(!$handler->insert($obj,true)) + { + throw new Sd2nd_QueryException(array('type' => $type,'object' => $obj)); + } + } + + /** + * deleteObject + * + * @param Enum $type + * @param XoopsSimpleObject $obj + * + * @return void + * @throw Sd2nd_Exception + **/ + public static function deleteObject(/*** Enum ***/ $type,XoopsSimpleObject $obj) + { + $handler =& Sd2nd_UpdateUtils::getHandler($type); + if(!$handler->delete($obj,true)) + { + throw new Sd2nd_QueryException(array('type' => $type,'object' => $obj)); + } + } + + /** + * deleteMultiObjects + * + * @param Enum $type + * @param CriteriaElement $cri + * + * @return void + * @throw Sd2nd_Exception + **/ + public static function deleteMultiObjects(/*** Enum ***/ $type,CriteriaElement $cri) + { + $handler =& Sd2nd_UpdateUtils::getHandler($type); + if(!$handler->deleteAll($cri,true)) + { + throw new Sd2nd_QueryException(array('type' => $type,'criteria' => $cri)); + } + } + #endregion +} + + + +/** + * @class Sd2nd_Exception +**/ +class Sd2nd_Exception extends Exception +{ + /** + * __construct + * + * @param string/mixed{} $message + * + * @return void + **/ + public function __construct(/*** string/mixed{} ***/ $message = null) + { + if(is_array($message)) + { + $message = print_r($message,true); + } + + parent::__construct($message); + } + + /** + * isFatal + * + * @param void + * + * @return bool + **/ + public function isFatal() + { + return true; + } + + /** + * __toString + * + * @param void + * + * @return string + **/ + public function __toString() + { + return print_r($this,true); + } +} + +/** + * @class Sd2nd_QueryException +**/ +class Sd2nd_QueryException extends Sd2nd_Exception +{ + /** + * @brief string{} + **/ + protected $_mQuery = null; + + /** + * __construct + * + * @param string/mixed{} $message + * + * @return void + **/ + public function __construct(/*** string/mixed{} ***/ $message) + { + parent::__construct($message); + + $root =& XCube_Root::getSingleton(); + $this->_mQuery = end($root->mController->mLogger->queries); + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/Sd2ndUpdater.class.php b/trust_path/modules/sd2nd/class/updater/Sd2ndUpdater.class.php new file mode 100644 index 0000000..725bb7d --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/Sd2ndUpdater.class.php @@ -0,0 +1,151 @@ + 'process started...', + 'prepare' => 'execute prepare process...', + 'execute' => 'execute main process...', + 'dispose' => 'execute dispose process...', + 'finish' => 'process completed.' + ); + + /** + * @brief int + **/ + const PROGRESS_NORMAL = 100; + + /** + * @brief int + **/ + const PROGRESS_SPECIAL = 1000; + + /** + * __construct + * + * @param string $zipName + * + * @return void + **/ + public function __construct(/*** string ***/ $zipName) + { + $this->_showMessage('start'); + $this->_mZipName = $zipName; + } + + /** + * prepare + * + * @param void + * + * @return void + **/ + public function prepare() + { + $this->_showMessage('prepare'); + Sd2nd_UpdateUtils::executeFilter('prepare'); + } + + /** + * execute + * + * @param void + * + * @return void + **/ + public function execute() + { + $this->_showMessage('execute'); + $zip = new ZipArchive(); + $zip->open($this->_mZipName); + + for($i = 0;$i < $zip->numFiles;$i++) + { + $arr = array(); + if(preg_match(SD2ND_EXTRACTION_PATTERN,$zip->getNameIndex($i),$arr)) + { + $instance =& Sd2nd_UpdateUtils::getProcess('execute',ucfirst($arr['name'])); + if($instance instanceof Sd2nd_AbstractExecute) + { + $instance->reset(intval($arr['id']),mb_convert_encoding($zip->getFromIndex($i),mb_internal_encoding(),SD2ND_RESULT_ENCODING)); + try + { + $instance->execute(); + } + catch(Sd2nd_Exception $e) + { + Sd2nd_UpdateUtils::displayError($e); + if($e->isFatal()) + { + $zip->close(); + die(); + } + } + } + unset($instance); + } + + if($i % self::PROGRESS_NORMAL == 0) + { + echo ($i % self::PROGRESS_SPECIAL == 0 ? '+' : '*'); + } + } + echo "\n"; + + $zip->close(); + } + + /** + * dispose + * + * @param void + * + * @return void + **/ + public function dispose() + { + $this->_showMessage('dispose'); + Sd2nd_UpdateUtils::executeFilter('dispose'); + $this->_showMessage('finish'); + } + + /** + * _showMessage + * + * @param Enum $key + * + * @return void + **/ + protected function _showMessage(/*** Enum ***/ $key) + { + if(isset($this->_mMessages[$key]) && $this->_mMessages[$key] != null) + { + echo $this->_mMessages[$key],"\n"; + } + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/dispose/Backup.class.php b/trust_path/modules/sd2nd/class/updater/dispose/Backup.class.php new file mode 100644 index 0000000..a777c9e --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/dispose/Backup.class.php @@ -0,0 +1,221 @@ +_mFileName = SD2ND_TRUST_PATH . self::EXPORT_PATH . '/' . sprintf($this->_mFileName,$updateTime); + } + + /** + * getPriority + * + * @param void + * + * @return Enum + **/ + public function getPriority() + { + return XCUBE_DELEGATE_PRIORITY_FINAL; + } + + /** + * _export + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + protected function _export() + { + $this->_mTableName = array_map(array('Sd2nd_UpdateUtils','convertTableName'),$this->_mTableName); + $this->_mHandler = fopen($this->_mFileName,'wb'); + $this->_exportHeader(); + $this->_exportMain(); + $this->_exportFooter(); + fclose($this->_mHandler); + } + + /** + * _save + * + * @param string $str + * + * @return void + * @throw Sd2nd_Exception + **/ + protected function _save(/*** string ***/ $str) + { + if(!is_resource($this->_mHandler)) + { + throw new Sd2nd_Exception('Backup file "' . $this->_mFileName . '" cannot opened.'); + } + + fwrite($this->_mHandler,$str); + } + + /** + * _exportHeader + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + protected function _exportHeader() + { + $clear = array(); + $disable = array(); + $sql = sprintf("-- %s\n\nSET NAMES %s;\n\n-- reflesh tables\n",basename($this->_mFileName),SD2ND_DATABASE_ENCODING); + + foreach($this->_mTableName as $name) + { + $clear[] = 'TRUNCATE TABLE `' . $name . '`;'; + $disable[] = 'ALTER TABLE `' . $name . '` DISABLE KEYS;'; + } + + $this->_save($sql . implode("\n",$clear) . "\n-- disable keys\n" . implode("\n",$disable) . "\n"); + } + + /** + * _exportMain + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + protected function _exportMain() + { + $root =& XCube_Root::getSingleton(); + $db =& $root->mController->mDB; + + $this->_save("-- SQL dump\n"); + + foreach($this->_mTableName as $name) + { + if(!$res = $db->query(sprintf('select * from `%s`',$name))) + { + throw new Sd2nd_QueryException('Table "' . $name . '" is not readable.'); + } + + $cols = array(); + $type = array(); + for($i = 0;$i < $db->getFieldsNum($res);$i++) + { + $cols[] = $db->getFieldName($res,$i); + $type[] = $db->getFieldType($res,$i); + } + + $base = sprintf("insert delayed into `%s` (`%s`) values \n",$name,implode('`,`',$cols)); + $sql = array(); + $cnt = 0; + while($row = $db->fetchArray($res)) + { + $row = array_map(array($db,'quoteString'),$row); + $sql[] = '(' . implode(',',$row) . ')'; + $cnt++; + + if($cnt >= self::MAX_INSERT_ROWS) + { + $this->_save($base . implode(",\n",$sql) . ";\n"); + $sql = array(); + $cnt = 0; + } + } + + if(count($sql) > 0) + { + $this->_save($base . implode(",\n",$sql) . ";\n\n"); + } + } + } + + /** + * _exportFooter + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + protected function _exportFooter() + { + $enable = array(); + $optimize = array(); + foreach($this->_mTableName as $name) + { + $enable[] = 'ALTER TABLE `' . $name . '` ENABLE KEYS;'; + $optimize[] = '`' . $name . "`"; + } + + $this->_save("-- enable keys\n" . implode("\n",$enable) . "\n\n-- optimize tables\nOPTIMIZE TABLE \n" . implode(",\n",$optimize) . "\n"); + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_QueryException + **/ + public function executeLatest() + { + $this->_mTableName = array( + Sd2nd_AssetManager::HANDLER_ABILITY, + Sd2nd_AssetManager::HANDLER_ACTIVE_ABILITY, + Sd2nd_AssetManager::HANDLER_CHAR, + Sd2nd_AssetManager::HANDLER_COSTUME, + Sd2nd_AssetManager::HANDLER_ENO_PNO_LINK, + Sd2nd_AssetManager::HANDLER_ICON, + Sd2nd_AssetManager::HANDLER_IMAGE, + Sd2nd_AssetManager::HANDLER_KIND, + Sd2nd_AssetManager::HANDLER_LEARNED_ABILITY, + Sd2nd_AssetManager::HANDLER_LEARNED_COSTUME, + Sd2nd_AssetManager::HANDLER_LEARNED_SKILL, + Sd2nd_AssetManager::HANDLER_MAP, + Sd2nd_AssetManager::HANDLER_MAP_CACHE, + Sd2nd_AssetManager::HANDLER_MAP_NAME, + Sd2nd_AssetManager::HANDLER_MAP_SPOT, + Sd2nd_AssetManager::HANDLER_RACE, + Sd2nd_AssetManager::HANDLER_SKILL, + Sd2nd_AssetManager::HANDLER_SKILL_ELEMENT_LINK, + Sd2nd_AssetManager::HANDLER_STATUS, + Sd2nd_AssetManager::HANDLER_TARGET, + Sd2nd_AssetManager::HANDLER_UPDATE + ); + $this->_export(); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/dispose/GarbageCollection.class.php b/trust_path/modules/sd2nd/class/updater/dispose/GarbageCollection.class.php new file mode 100644 index 0000000..f738958 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/dispose/GarbageCollection.class.php @@ -0,0 +1,100 @@ +mController->mDB; + + if(!$res = $db->query('select `m`.`eno` as `eno` from `' . Sd2nd_UpdateUtils::convertTableName(self::ACTIVE_TABLE) . '` as m left join `' . Sd2nd_UpdateUtils::convertTableName(self::CHAR_TABLE) . '` as c on `m`.`eno` = `c`.`eno` where isnull(`c`.`full_name`) group by `m`.`eno`')) + { + throw new Sd2nd_QueryException(array('active' => self::ACTIVE_TABLE,'char' => self::CHAR_TABLE)); + } + + $cri = new CriteriaCompo(); + while($row = $db->fetchArray($res)) + { + $cri->add(new Criteria('eno',$row['eno'])); + } + + if($cri->hasChildElements()) + { + foreach($this->_mTableName as $type) + { + Sd2nd_UpdateUtils::deleteMultiObjects($type,$cri); + } + } + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_QueryException + **/ + public function executeLatest() + { + $this->_mTableName = array( + Sd2nd_AssetManager::HANDLER_ICON, + Sd2nd_AssetManager::HANDLER_IMAGE, + Sd2nd_AssetManager::HANDLER_LEARNED_ABILITY, + Sd2nd_AssetManager::HANDLER_LEARNED_COSTUME, + Sd2nd_AssetManager::HANDLER_LEARNED_SKILL + ); + + $this->_executeGC(); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/dispose/MapCache.class.php b/trust_path/modules/sd2nd/class/updater/dispose/MapCache.class.php new file mode 100644 index 0000000..8097cf5 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/dispose/MapCache.class.php @@ -0,0 +1,50 @@ +mContext->mAttributes['sd2nd.mapCollection']; + foreach(array_keys($maps) as $key) + { + $maps[$key]->save(); + } + } + + /** + * execute090211 + * + * @param void + * + * @return void + * @throw Sd2nd_QueryException + **/ + public function execute090211() + { + $root =& XCube_Root::getSingleton(); + $root->mContext->mAttributes['sd2nd.mapCollection']->save(); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/dispose/Update.class.php b/trust_path/modules/sd2nd/class/updater/dispose/Update.class.php new file mode 100644 index 0000000..b97ed8b --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/dispose/Update.class.php @@ -0,0 +1,53 @@ +_mUpdateTime = $updateTime; + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_QueryException + **/ + public function executeLatest() + { + $update =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_UPDATE); + $update->set('update_time',$this->_mUpdateTime); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_UPDATE,$update); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/Chardata.class.php b/trust_path/modules/sd2nd/class/updater/execute/Chardata.class.php new file mode 100644 index 0000000..f4bf2e8 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/Chardata.class.php @@ -0,0 +1,132 @@ + null, + Sd2nd_AssetManager::HANDLER_STATUS => null + ); + public /*** XoopsSimpleObject{}[] ***/ $mCharDataList = array( + Sd2nd_AssetManager::HANDLER_ICON => array(), + Sd2nd_AssetManager::HANDLER_LEARNED_ABILITY => array(), + Sd2nd_AssetManager::HANDLER_LEARNED_COSTUME => array(), + Sd2nd_AssetManager::HANDLER_LEARNED_SKILL => array() + ); + public /*** string ***/ $mActiveCostume = null; + public /*** string{} ***/ $mActiveAbilities = array(); + public /*** string{}[] ***/ $mWeaponLv = array(); + public /*** Sd2nd_ImageObject ***/ $mImage = null; + public /*** int{} ***/ $mSpots = array(); + public /*** int[] ***/ $mMaps = array(); + public /*** int{} ***/ $mPoint = array('x' => 0,'y' => 0); + protected /*** string ***/ $_mParserPath = 'execute/parser/charParser'; + protected /*** string ***/ $_mFilterPattern = '/^(?P\w+)[\(\[]/'; + protected /*** XCube_HttpContext ***/ $_mContext = null; + + /** + * __construct + * + * @param void + * + * @return void + **/ + public function __construct() + { + parent::__construct(); + + $root =& XCube_Root::getSingleton(); + $this->_mContext =& $root->mContext; + } + + /** + * reset + * + * @param int $id + * @param string $text + * + * @return void + **/ + public function reset(/*** int ***/ $id,/*** string ***/ $text) + { + parent::reset($id,$text); + + foreach(array_keys($this->mCharData) as $type) + { + $this->mCharData[$type] =& Sd2nd_UpdateUtils::createObject($type); + $this->mCharData[$type]->set('eno',$id); + } + + foreach(array_keys($this->mCharDataList) as $type) + { + $this->mCharDataList[$type] = array(); + } + + $this->mActiveCostume = null; + $this->mActiveAbilities = array(); + $this->mWeaponLv = array(); + $this->mImage = null; + $this->mSpots = array(); + $this->mMaps = array(); + $this->mPoint = array('x' => 0,'y' => 0); + } + + /** + * _save + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + protected function _save() + { + foreach(array_keys($this->mCharData) as $type) + { + if($this->mCharData[$type] instanceof XoopsSimpleObject) + { + Sd2nd_UpdateUtils::insertObject($type,$this->mCharData[$type]); + } + } + + foreach(array_keys($this->mCharDataList) as $type) + { + foreach(array_keys($this->mCharDataList[$type]) as $key) + { + Sd2nd_UpdateUtils::insertObject($type,$this->mCharDataList[$type][$key]); + } + } + + foreach($this->mActiveAbilities as $key => $abilityName) + { + $ability =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_ACTIVE_ABILITY); + $ability->setVars(array('eno' => $this->_mActiveId,'slot' => $key,'ability_id' => $this->_mContext->mAttributes['sd2nd.ability'][$abilityName])); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_ACTIVE_ABILITY,$ability); + } + + foreach(array_keys($this->mWeaponLv) as $key) + { + } + + if($this->mImage instanceof Sd2nd_ImageObject) + { + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_IMAGE,$this->mImage); + } + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/Charlist.class.php b/trust_path/modules/sd2nd/class/updater/execute/Charlist.class.php new file mode 100644 index 0000000..dbb234f --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/Charlist.class.php @@ -0,0 +1,38 @@ +Show_CharList)\(/'; + + /** + * _save + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + protected function _save() + { + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/Show_CharList.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/Show_CharList.class.php new file mode 100644 index 0000000..ef76ef3 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/Show_CharList.class.php @@ -0,0 +1,37 @@ +_mLine,3,14,-1,array('eno','pno','name')); + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_ENO_PNO_LINK); + $obj->setVars(array('eno' => $arr['eno'],'pno' => $arr['pno'],'regist_time' => $this->_mUpdateTime)); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_ENO_PNO_LINK,$obj); + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Costume_Data.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Costume_Data.class.php new file mode 100644 index 0000000..2aefebb --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Costume_Data.class.php @@ -0,0 +1,130 @@ +_mAttrs =& $root->mContext->mAttributes; + $this->_mDB =& $root->mController->mDB; + } + + /** + * reset + * + * @param int $id + * @param Sd2nd_AbstractExecute &$execute + * @param string $line + * + * @return void + * @throw Sd2nd_QueryException + **/ + public function reset(/*** int ***/ $id,Sd2nd_AbstractExecute &$execute,/*** string ***/ $line) + { + parent::reset($id,$execute,$line); + + $this->_mLearnedCostume = array(); + if(!$res = $this->_mDB->query('select `costume_id`,`costume_lv`,`costume_point` from `' . Sd2nd_UpdateUtils::convertTableName(Sd2nd_AssetManager::HANDLER_LEARNED_COSTUME) . '` where `eno` = ' . intval($this->_mActiveId))) + { + throw new Sd2nd_QueryException('LearnedCostume data is not readable.'); + } + + while($row = $this->_mDB->fetchArray($res)) + { + $this->_mLearnedCostume[$row['costume_id']] = array('costume_lv' => $row['costume_lv'],'costume_point' => $row['costume_point']); + } + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + $arr = Sd2nd_UpdateUtils::parseByExplode($this->_mLine,22,strpos($this->_mLine,'(') + 1,-1,array('costume_id','costume_name','costume_lv','costume_exp','costume_point','grow_life','grow_soul','grow_pow','grow_str','grow_dex','grow_speed','grow_mag','grow_reg','grow_con','modify_hp','modify_tp','modify_at','modify_df','modify_mat','modify_mdf','modify_act','move_cost')); + $arr['costume_name'] = trim($arr['costume_name'],"'"); + if(!isset($this->_mAttrs['sd2nd.costume'][$arr['costume_name']])) + { + $this->_appendCostume($arr); + } + if(!isset($this->_mLearnedCostume[$arr['costume_id']]) || $this->_mLearnedCostume[$arr['costume_id']]['costume_lv'] != $arr['costume_lv'] || $this->_mLearnedCostume[$arr['costume_id']]['costume_point'] != $arr['costume_point']) + { + $this->_appendLearnedCostume($arr['costume_id'],$arr['costume_lv'],$arr['costume_point']); + } + } + + /** + * _appendCostume + * + * @param mixed{} $params + * + * @return void + **/ + protected function _appendCostume(/*** mixed{} ***/ $params) + { + $this->_mAttrs['sd2nd.costume'][$params['costume_name']] = $params['costume_id']; + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_COSTUME); + unset($params['costume_lv'],$params['costume_exp'],$params['costume_point']); + $obj->setVars($params); + $obj->set('regist_time',$this->_mUpdateTime); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_COSTUME,$obj); + } + + /** + * _appendLearnedCostume + * + * @param int $id + * @param int $lv + * @param int $point + * + * @return void + **/ + protected function _appendLearnedCostume(/*** int ***/ $id,/*** int ***/ $lv,/*** int ***/ $point) + { + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_LEARNED_COSTUME); + $obj->set('eno',$this->_mActiveId); + $obj->set('costume_id',$id); + $obj->set('costume_lv',$lv); + $obj->set('costume_point',$point); + $obj->set('regist_time',$this->_mUpdateTime); + if(isset($this->_mLearnedCostume[$id])) + { + $obj->unsetNew(); + } + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_LEARNED_COSTUME,$obj); + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Field_Data.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Field_Data.class.php new file mode 100644 index 0000000..4d6f139 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Field_Data.class.php @@ -0,0 +1,81 @@ +_mLine,"/\[(?P\d+)\] = new TableData_Set\('(?P[^']+)','(?P[^']+)',(?P\d+),(?P\d+)\)/"); + if($arr['id'] == 0) + { + $dir = array(); + $x = 0; + $y = 0; + if(preg_match_all('/(?P\D+)(?P\d+)+/',$arr['pos'],$dir,PREG_SET_ORDER)) + { + foreach($dir as $d) + { + switch($d['direction']) + { + case _MD_SD2ND_LANG_DIRECTION_NORTH: + $y = $d['distance']; + break; + case _MD_SD2ND_LANG_DIRECTION_EAST: + $x = -$d['distance']; + break; + case _MD_SD2ND_LANG_DIRECTION_SOUTH: + $y = -$d['distance']; + break; + case _MD_SD2ND_LANG_DIRECTION_WEST: + $x = $d['distance']; + break; + } + } + } + if($map == null) + { + $map =& XCube_Root::getSingleton()->mContext->mAttributes['sd2nd.mapCollection']; + } + $map->addBySpotList($x - 4,$y - 4,array_chunk($this->_mExecute->mMaps,9)); + } + + /// @todo set eno field link data? + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Icon_Data.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Icon_Data.class.php new file mode 100644 index 0000000..fd52320 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Icon_Data.class.php @@ -0,0 +1,80 @@ +_mHandler =& Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_ICON); + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + try + { + $arr = Sd2nd_UpdateUtils::parseByRegex($this->_mLine,'/Icon_Data\[(?P\d+)\] = new TableData_Set\("(?P.+)",(?P\d+),(?P\d+)\)/'); + } + catch(Exception $ex) + { + return; + } + $obj =& $this->_mHandler->getByUnique($this->_mActiveId,$arr['slot']); + if(!$obj instanceof $this->_mHandler->mClass || $obj->get('icon_url') != $arr['icon_url'] || $obj->get('icon_width') != $arr['icon_width'] || $obj->get('icon_height') != $arr['icon_height']) + { + $this->_appendIcon($arr); + } + } + + /** + * _appendIcon + * + * @param mixed{} $params + * + * @return void + **/ + protected function _appendIcon(/*** mixed{} ***/ $params) + { + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_ICON); + $obj->set('eno',$this->_mActiveId); + $obj->set('slot',$params['slot']); + $obj->set('icon_url',$params['icon_url']); + $obj->set('icon_height',$params['icon_height']); + $obj->set('icon_width',$params['icon_width']); + $obj->set('update_time',$this->_mUpdateTime); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_ICON,$obj); + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Map_Data.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Map_Data.class.php new file mode 100644 index 0000000..e39adc6 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Map_Data.class.php @@ -0,0 +1,61 @@ +_mSpot =& XCube_Root::getSingleton()->mContext->mAttributes['sd2nd.spot']; + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + $arr = Sd2nd_UpdateUtils::parseByRegex($this->_mLine,"/\[(?P\d+)\] = new TableData_Set\('#[\dA-F]{6}','(?P[^']+)'\)/"); + $arr['spot_name'] = trim($arr['spot_name'],"'"); + $arr['regist_time'] = $this->_mUpdateTime; + + if(!isset($this->_mSpot[$arr['spot_name']])) + { + $spot =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_MAP_SPOT); + $spot->setVars($arr); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_MAP_SPOT,$spot); + $this->_mSpot[$arr['spot_name']] = $spot->get('spot_id'); + } + + $this->_mExecute->mSpots[$arr['id']] = $this->_mSpot[$arr['spot_name']]; + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/SAbility_Data.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/SAbility_Data.class.php new file mode 100644 index 0000000..95309c6 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/SAbility_Data.class.php @@ -0,0 +1,122 @@ +_mAttrs =& $root->mContext->mAttributes; + $this->_mDB =& $root->mController->mDB; + } + + /** + * reset + * + * @param int $id + * @param Sd2nd_AbstractExecute &$execute + * @param string $line + * + * @return void + **/ + public function reset(/*** int ***/ $id,Sd2nd_AbstractExecute &$execute,/*** string ***/ $line) + { + parent::reset($id,$execute,$line); + + $this->_mLearnedAbility = array(); + if(!$res = $this->_mDB->query('select `ability_id` from `' . Sd2nd_UpdateUtils::convertTableName(Sd2nd_AssetManager::HANDLER_LEARNED_ABILITY) . '` where `eno` = ' . intval($this->_mActiveId))) + { + throw new Sd2nd_QueryException('LearnedAbility data is not readable.'); + } + + while($row = $this->_mDB->fetchArray($res)) + { + $this->_mLearnedAbility[$row['ability_id']] = $row['ability_id']; + } + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + $arr = Sd2nd_UpdateUtils::parseByExplode($this->_mLine,4,strpos($this->_mLine,'(') + 1,-1,array('ability_id','ability_name','description','ability_cost')); + $arr['ability_name'] = trim($arr['ability_name'],"'"); + if(!isset($this->_mAttrs['sd2nd.ability'][$arr['ability_name']])) + { + $this->_appendAbility($arr); + } + if(!isset($this->_mLearnedAbility[$arr['ability_id']])) + { + $this->_appendLearnedAbility($arr['ability_id']); + } + } + + /** + * _appendAbility + * + * @param string{} $params + * + * @return void + **/ + protected function _appendAbility(/*** string{} ***/ $params) + { + $this->_mAttrs['sd2nd.ability'][$params['ability_name']] = $params['ability_id']; + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_ABILITY); + $obj->set('ability_id',$params['ability_id']); + $obj->set('ability_name',$params['ability_name']); + $obj->set('description',strtr(trim($params['description'],"'"),array('
' => "\n"))); + $obj->set('ability_cost',$params['ability_cost']); + $obj->set('regist_time',$this->_mUpdateTime); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_ABILITY,$obj); + } + + /** + * _appendLearnedAbility + * + * @param int $id + * + * @return void + **/ + protected function _appendLearnedAbility(/*** int ***/ $id) + { + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_LEARNED_ABILITY); + $obj->set('eno',$this->_mActiveId); + $obj->set('ability_id',$id); + $obj->set('regist_time',$this->_mUpdateTime); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_LEARNED_ABILITY,$obj); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Image.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Image.class.php new file mode 100644 index 0000000..3a2b6dd --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Image.class.php @@ -0,0 +1,73 @@ +_mHandler =& Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_IMAGE); + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + $arr = Sd2nd_UpdateUtils::parseByRegex($this->_mLine,'/\((?P\d+),(?P\d+),"(?P[^"]+)","(?P[^"]*)"\);/'); + $obj =& $this->_mHandler->getByUnique($this->_mActiveId); + if(!$obj instanceof $this->_mHandler->mClass || $obj->get('image_url') != $arr['image_url'] || $obj->get('image_width') != $arr['image_width'] || $obj->get('image_height') != $arr['image_height'] || $obj->get('image_link') != $arr['image_link']) + { + $this->_appendImage($arr); + } + } + + /** + * _appendImage + * + * @param mixed{} $params + * + * @return void + **/ + protected function _appendImage(/*** mixed{} ***/ $params) + { + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_IMAGE); + $obj->set('eno',$this->_mActiveId); + $obj->set('image_url',$params['image_url']); + $obj->set('image_height',$params['image_height']); + $obj->set('image_width',$params['image_width']); + $obj->set('image_link',$params['image_link']); + $obj->set('update_time',$this->_mUpdateTime); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_IMAGE,$obj); + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Map.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Map.class.php new file mode 100644 index 0000000..0f0c94e --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Map.class.php @@ -0,0 +1,183 @@ +_mLine,9,-1)); + list($name,$flag,$width,$point) = array_splice($arr,0,4); + $name = trim($name,"'"); + $len = count($arr); + if($attr == null) + { + $attr =& XCube_Root::getSingleton()->mContext->mAttributes; + } + $baseSpot = $attr['sd2nd.mapName'][$name]->get('base_spot'); + /// @todo + if($baseSpot != 3) + { + return; + } + for($i = 0;$i < $len;$i += 2) + { + $key = $i >> 1; + $maps[] = ($id = $this->_mExecute->mSpots[$arr[$i]]); + if($id == $baseSpot) + { + $x = - ($key % $width); + $y = - intval($key / $width); + } + } + $attr['sd2nd.mapCollection'][$name]->addBySpotList($x,$y,array_chunk($maps,$width)); + } + + /** + * execute090211 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute090211() + { + static $map = null; + $x = 0; + $y = 0; + $maps = array(); + $arr = explode(',',substr($this->_mLine,9,-1)); + list($name,$flag,$width,$point) = array_splice($arr,0,4); + $len = count($arr); + for($i = 0;$i < $len;$i += 2) + { + $key = $i >> 1; + $maps[] = ($id = $this->_mExecute->mSpots[$arr[$i]]); + if($id == self::BASE_SPOT) + { + $x = - ($key % $width); + $y = - intval($key / $width); + } + } + if($map == null) + { + $map =& XCube_Root::getSingleton()->mContext->mAttributes['sd2nd.mapCollection']; + } + $map->addBySpotList($x,$y,array_chunk($maps,$width)); + } + + /** + * execute090128 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute090128() + { + static $map = null; + $x = 0; + $y = 0; + $maps = array(); + $arr = explode(',',substr($this->_mLine,9,-1)); + list($flag,$width,$point) = array_splice($arr,0,3); + $len = count($arr); + for($i = 0;$i < $len;$i += 2) + { + $key = $i >> 1; + $maps[] = ($id = $this->_mExecute->mSpots[$arr[$i]]); + if($id == self::BASE_SPOT) + { + $x = - ($key % $width); + $y = - intval($key / $width); + } + } + if($map == null) + { + $map =& XCube_Root::getSingleton()->mContext->mAttributes['sd2nd.mapCollection']; + } + $map->addBySpotList($x,$y,array_chunk($maps,$width)); + } + + /** + * execute090107 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute090107() + { + static $map = null; + $x = 0; + $y = 0; + $maps = array(); + $arr = explode(',',substr($this->_mLine,9,-1)); + list($flag,$width,$point) = array_splice($arr,0,3); + foreach($arr as $i => $spot) + { + $maps[] = ($id = $this->_mExecute->mSpots[$spot]); + if($id == self::BASE_SPOT) + { + $x = - ($i % $width); + $y = - intval($i / $width); + } + } + if($map == null) + { + $map =& XCube_Root::getSingleton()->mContext->mAttributes['sd2nd.mapCollection']; + } + $map->addBySpotList($x,$y,array_chunk($maps,$width)); + } + + /** + * execute081217 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute081217() + { + $arr = Sd2nd_UpdateUtils::parseByExplode($this->_mLine,82,9,-1); + $flag = array_shift($arr); + + foreach($arr as $spot) + { + $this->_mExecute->mMaps[] = $this->_mExecute->mSpots[$spot]; + } + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Name.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Name.class.php new file mode 100644 index 0000000..6136acb --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Name.class.php @@ -0,0 +1,34 @@ +_mExecute->mCharData[Sd2nd_AssetManager::HANDLER_CHAR]->set('full_name',substr($this->_mLine,11,-2)); + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Profile.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Profile.class.php new file mode 100644 index 0000000..701ae56 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Profile.class.php @@ -0,0 +1,57 @@ +_mSexList[constant($value)] = $i++; + } + $this->_mPattern = sprintf("/\('.*(?P%s) ?(?:(?P\d+)%s )?(?:(?P\d+)%s )?(?:(?P\d+)%s )?','(?P[^']*)'\)/",implode('|',array_keys($this->_mSexList)),_MD_SD2ND_LANG_AGE_UNIT,_MD_SD2ND_LANG_HEIGHT_UNIT,_MD_SD2ND_LANG_WEIGTH_UNIT); + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + $arr = Sd2nd_UpdateUtils::parseByRegex($this->_mLine,$this->_mPattern); + $arr['sex'] = $this->_mSexList[$arr['sex']]; + $arr['profile'] = strtr($arr['profile'],array('
' => "\n")); + $this->_mExecute->mCharData[Sd2nd_AssetManager::HANDLER_CHAR]->setVars($arr); + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Status.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Status.class.php new file mode 100644 index 0000000..7ad2eba --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/Show_Status.class.php @@ -0,0 +1,112 @@ +_mContext =& $root->mContext; + + $i = 0; + while(defined($value = '_MD_SD2ND_LANG_ELEMENT_' . $i)) + { + $this->_mElements[constant($value)] = $i++; + } + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + $arr = Sd2nd_UpdateUtils::parseByRegex($this->_mLine,"/\(\d+,'(?P[\d,]+)','(?P[\d,]+)','(?P[^']+)','(?P[^']+)','(?P[^']+)','(?P[^']+)Lv\.\d+','\d\/\d,(?P[^']+)','(?P[^']+)'\)/"); + $params = Sd2nd_UpdateUtils::parseByExplode($arr['params'],13,0,null,array('lv','life','soul','pow','str','dex','speed','mag','reg','con','exp','money','sp')); + $grows = Sd2nd_UpdateUtils::parseByExplode($arr['grows'],10,0,null,array('lv','life','soul','pow','str','dex','speed','mag','reg','con')); + $elementBase = mb_substr($arr['profile'],0,1); + $elementExtra = mb_substr($arr['profile'],2,1); + $raceName = mb_substr($arr['profile'],4); + $ability = explode(',',$arr['ability']); + $weapon = explode(',',$arr['weapon']); + + if(!isset($this->_mContext->mAttributes['sd2nd.race'][$raceName])) + { + $race =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_RACE); + $race->set('race_name',$raceName); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_RACE,$race); + $this->_mContext->mAttributes['sd2nd.race'][$raceName] = $race->get('race_id'); + } + + if(!isset($this->_mElements[$elementBase])) + { + throw new Sd2nd_Exception('Base element "' . $elementBase . '" is not defined.'); + } + + if(!isset($this->_mElements[$elementExtra])) + { + throw new Sd2nd_Exception('Base element "' . $elementExtra . '" is not defined.'); + } + + $this->_mExecute->mCharData[Sd2nd_AssetManager::HANDLER_CHAR]->setVars(array('nick_name' => $arr['nick_name'],'battle_name' => $arr['battle_name'],'race' => $this->_mContext->mAttributes['sd2nd.race'][$raceName],'element_base' => $this->_mElements[$elementBase],'element_ext' => $this->_mElements[$elementExtra])); + $this->_mExecute->mCharData[Sd2nd_AssetManager::HANDLER_STATUS]->setVars($params); + $this->_mExecute->mActiveCostume = $arr['class']; + + foreach($ability as $key => $val) + { + if($val != null) + { + $this->_mExecute->mActiveAbilities[$key + 1] = substr($val,0,strrpos($val,'(')); + } + } + + $cnt = count($weapon); + for($i = 1;$i < $cnt;$i++) + { + $weaponLv = array(); + if(preg_match('/^(?P.+)Lv(?P\d+)$/',$weapon[$i],$weaponLv)) + { + $this->_mExecute->mWeaponLv[] = $weaponLv; + } + } + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/WSkill_Data.class.php b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/WSkill_Data.class.php new file mode 100644 index 0000000..d28c042 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/execute/parser/charParser/WSkill_Data.class.php @@ -0,0 +1,183 @@ +_mAttributes =& $root->mContext->mAttributes; + $this->_mDB =& $root->mController->mDB; + } + + /** + * reset + * + * @param int $id + * @param Sd2nd_AbstractExecute &$execute + * @param string $line + * + * @return void + **/ + public function reset(/*** int ***/ $id,Sd2nd_AbstractExecute &$execute,/*** string ***/ $line) + { + parent::reset($id,$execute,$line); + + $this->_mLearnedSkill = array(); + if(!$res = $this->_mDB->query('select `skill_id` from `' . Sd2nd_UpdateUtils::convertTableName(Sd2nd_AssetManager::HANDLER_LEARNED_SKILL) . '` where `eno` = ' . intval($this->_mActiveId))) + { + throw new Sd2nd_QueryException('LearnedSkill data is not readable.'); + } + + while($row = $this->_mDB->fetchArray($res)) + { + $this->_mLearnedSkill[$row['skill_id']] = $row['skill_id']; + } + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + $arr = Sd2nd_UpdateUtils::parseByRegex($this->_mLine,"/TableData_Set\((?P\d+),'(?P[^']+)','(?P[^']*)',(?P[^,]+),'(?P[^']+)',(?P'?[\d,]+'?),(?P'?[\-\d,]+'?),'(?P[^']+)',(?P\d+)\)/"); + if(!isset($this->_mLearnedSkill[$arr['skill_id']])) + { + $this->_registLearnedSkill($arr); + } + } + + /** + * _registLearnedSkill + * + * @param mixed{} $param + * + * @return void + **/ + protected function _registLearnedSkill(/*** mixed{} ***/ $param) + { + if(!isset($this->_mAttributes['sd2nd.skill'][$param['skill_name']])) + { + $this->_registSkill($param); + } + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_LEARNED_SKILL); + $obj->setVars(array('eno' => $this->_mActiveId,'skill_id' => $param['skill_id'],'regist_time' => $this->_mUpdateTime)); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_LEARNED_SKILL,$obj); + } + + /** + * _registSkill + * + * @param mixed{} $param + * + * @return void + **/ + protected function _registSkill(/*** mixed{} ***/ $param) + { + if(!isset($this->_mAttributes['sd2nd.target'][$param['target']])) + { + $this->_registTarget($param['target'],trim($param['point'],"'")); + } + if(!isset($this->_mAttributes['sd2nd.kind'][$param['kind']])) + { + $this->_registKind($param['kind']); + } + $this->_mAttributes['sd2nd.skill'][$param['skill_name']] = $param['skill_id']; + $skill =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_SKILL); + $skill->set('skill_id',$param['skill_id']); + $skill->set('skill_name',$param['skill_name']); + $skill->set('description',strtr($param['description'],array('
' => "\n"))); + $skill->set('range',$param['range'] * 10); + $skill->set('target',$this->_mAttributes['sd2nd.target'][$param['target']]); + $skill->set('kind',$this->_mAttributes['sd2nd.kind'][$param['kind']]); + $skill->set('tp',$param['tp']); + $skill->set('regist_time',$this->_mUpdateTime); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_SKILL,$skill); + $this->_registSkillElement($param['skill_id'],explode(',',$param['element'])); + } + + /** + * _registTarget + * + * @param string $target + * @param string $point + * + * @return void + **/ + protected function _registTarget(/*** string ***/ $target,/*** string ***/ $point) + { + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_TARGET); + $obj->set('target_name',$target); + $obj->set('point',$point); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_TARGET,$obj); + $this->_mAttributes['sd2nd.target'][$target] = $obj->get('target_id'); + } + + /** + * _registKind + * + * @param string $kind + * + * @return void + **/ + protected function _registKind(/*** string ***/ $kind) + { + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_KIND); + $obj->set('kind_name',$kind); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_KIND,$obj); + $this->_mAttributes['sd2nd.kind'][$kind] = $obj->get('kind_id'); + } + + /** + * _registSkillElement + * + * @param int $id + * @param int[] $elements + * + * @return void + **/ + protected function _registSkillElement(/*** int ***/ $id,/*** int[] ***/ $elements) + { + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_SKILL_ELEMENT_LINK); + $obj->set('skill_id',$id); + foreach($elements as $e) + { + $obj->set('element',$e); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_SKILL_ELEMENT_LINK,$obj); + } + } +} + + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/AbilityList.class.php b/trust_path/modules/sd2nd/class/updater/prepare/AbilityList.class.php new file mode 100644 index 0000000..b141bca --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/AbilityList.class.php @@ -0,0 +1,58 @@ +mController->mDB; + $arr = array(); + + if(!$res = $db->query('select `ability_id`,`ability_name` from `' . Sd2nd_UpdateUtils::convertTableName(Sd2nd_AssetManager::HANDLER_ABILITY) . '`')) + { + throw new Sd2nd_QueryException('Ability data is not readable.'); + } + + while($row = $db->fetchArray($res)) + { + $arr[$row['ability_name']] = $row['ability_id']; + } + + $root->mContext->setAttribute('sd2nd.ability',$arr); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/CostumeList.class.php b/trust_path/modules/sd2nd/class/updater/prepare/CostumeList.class.php new file mode 100644 index 0000000..a26cc79 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/CostumeList.class.php @@ -0,0 +1,58 @@ +mController->mDB; + $arr = array(); + + if(!$res = $db->query('select `costume_id`,`costume_name` from `' . Sd2nd_UpdateUtils::convertTableName(Sd2nd_AssetManager::HANDLER_COSTUME) . '`')) + { + throw new Sd2nd_QueryException('Costume data is not readable.'); + } + + while($row = $db->fetchArray($res)) + { + $arr[$row['costume_name']] = $row['costume_id']; + } + + $root->mContext->setAttribute('sd2nd.costume',$arr); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/DataConvert.class.php b/trust_path/modules/sd2nd/class/updater/prepare/DataConvert.class.php new file mode 100644 index 0000000..4ce81c7 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/DataConvert.class.php @@ -0,0 +1,216 @@ +getMethods(); + usort($methods,array('Sd2nd_AbstractProcess','compareMethodName')); + + foreach($methods as $method) + { + if($method->name == 'execute' . $updateTime) + { + $this->_mFunc = $method; + break; + } + } + + if(!$this->_mFunc instanceof ReflectionMethod) + { + $this->_mFunc = new ReflectionMethod($this,'executeLatest'); + } + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + } + + /** + * execute090415 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute090415() + { + $obj =& Sd2nd_UpdateUtils::createObject(Sd2nd_AssetManager::HANDLER_MAP_NAME); + $obj->setVars( + array( + 'map_id' => 3, + 'map_name' => _MD_SD2ND_MAP_NAME_TUNNEL_B1F, + 'base_spot' => 0 + ) + ); + Sd2nd_UpdateUtils::insertObject(Sd2nd_AssetManager::HANDLER_MAP_NAME,$obj); + } + + /** + * execute090214 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute090214() + { + $handler =& Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_MAP_NAME); + $obj =& $handler->create(); + $obj->setVars( + array( + 'map_id' => 2, + 'map_name' => _MD_SD2ND_MAP_NAME_TUNNEL, + 'base_spot' => self::BASE_SPOT_TUNNEL + ) + ); + /// @ todo backup convert + $handler->db->queryF('UPDATE `' . Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_MAP)->mTable . '` SET `map_id` = 1'); + $handler->db->queryF('UPDATE `' . Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_MAP_CACHE)->mTable . '` SET `map_id` = 1'); + } + + /** + * execute090121 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute090121() + { + $cri = new Criteria('skill_id',456); + Sd2nd_UpdateUtils::deleteMultiObjects(Sd2nd_AssetManager::HANDLER_SKILL,$cri); + Sd2nd_UpdateUtils::deleteMultiObjects(Sd2nd_AssetManager::HANDLER_SKILL_ELEMENT_LINK,$cri); + } + + /** + * execute090117 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute090117() + { + $cri = new Criteria('skill_id',456); + Sd2nd_UpdateUtils::deleteMultiObjects(Sd2nd_AssetManager::HANDLER_SKILL,$cri); + Sd2nd_UpdateUtils::deleteMultiObjects(Sd2nd_AssetManager::HANDLER_SKILL_ELEMENT_LINK,$cri); + } + + /** + * execute081004 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute081004() + { + $cri = new CriteriaCompo(); + $cri->add(new Criteria('skill_id',807)); + Sd2nd_UpdateUtils::deleteMultiObjects(Sd2nd_AssetManager::HANDLER_SKILL,$cri); + Sd2nd_UpdateUtils::deleteMultiObjects(Sd2nd_AssetManager::HANDLER_SKILL_ELEMENT_LINK,$cri); + } + + /** + * execute080903 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute080903() + { + $cri = new CriteriaCompo(); + $cri->add(new Criteria('ability_id',1,'>=')); + $cri->add(new Criteria('ability_id',5,'<=')); + Sd2nd_UpdateUtils::deleteMultiObjects(Sd2nd_AssetManager::HANDLER_ABILITY,$cri); + } + + /** + * execute080625 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute080625() + { + $cri = new Criteria('ability_id',1220); + Sd2nd_UpdateUtils::deleteMultiObjects(Sd2nd_AssetManager::HANDLER_ABILITY,$cri); + } + + /** + * execute080524 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute080524() + { + $handler =& Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_MAP_NAME); + $obj =& $handler->create(); + $obj->setVars( + array( + 'map_id' => 1, + 'map_name' => _MD_SD2ND_MAP_NAME_WORLD, + 'base_spot' => self::BASE_SPOT_WORLD + ) + ); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/KindList.class.php b/trust_path/modules/sd2nd/class/updater/prepare/KindList.class.php new file mode 100644 index 0000000..6cf3016 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/KindList.class.php @@ -0,0 +1,58 @@ +mController->mDB; + $arr = array(); + + if(!$res = $db->query('select `kind_id`,`kind_name` from `' . Sd2nd_UpdateUtils::convertTableName(Sd2nd_AssetManager::HANDLER_KIND) . '`')) + { + throw new Sd2nd_QueryException('Kind data is not readable.'); + } + + while($row = $db->fetchArray($res)) + { + $arr[$row['kind_name']] = $row['kind_id']; + } + + $root->mContext->setAttribute('sd2nd.kind',$arr); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/MapCollection.class.php b/trust_path/modules/sd2nd/class/updater/prepare/MapCollection.class.php new file mode 100644 index 0000000..e69066e --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/MapCollection.class.php @@ -0,0 +1,71 @@ +mContext->mAttributes; + $attr['sd2nd.mapName'] = array(); + $attr['sd2nd.mapCollection'] = array(); + $mapHandler =& Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_MAP); + $update = Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_UPDATE)->getLatestUpdate(); + foreach(Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_MAP_NAME)->getObjects() as $name) + { + $attr['sd2nd.mapName'][$name->get('map_name')] = $name; + $attr['sd2nd.mapCollection'][$name->get('map_name')] = $mapHandler->getCollection(SD2ND_UPDATE_TIME,$update->get('update_time'),$name->get('map_id')); + } + } + + /** + * execute090211 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute090211() + { + $update = Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_UPDATE)->getLatestUpdate(); + if($update == null) + { + $update = SD2ND_UPDATE_TIME; + } + XCube_Root::getSingleton()->mContext->setAttribute('sd2nd.mapCollection',Sd2nd_UpdateUtils::getHandler(Sd2nd_AssetManager::HANDLER_MAP)->getCollection(SD2ND_UPDATE_TIME,$update->get('update_time'))); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/RaceList.class.php b/trust_path/modules/sd2nd/class/updater/prepare/RaceList.class.php new file mode 100644 index 0000000..4e498f4 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/RaceList.class.php @@ -0,0 +1,58 @@ +mController->mDB; + $arr = array(); + + if(!$res = $db->query('select `race_id`,`race_name` from `' . Sd2nd_UpdateUtils::convertTableName(Sd2nd_AssetManager::HANDLER_RACE) . '`')) + { + throw new Sd2nd_QueryException('Race data is not readable.'); + } + + while($row = $db->fetchArray($res)) + { + $arr[$row['race_name']] = $row['race_id']; + } + + $root->mContext->setAttribute('sd2nd.race',$arr); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/RefleshTable.class.php b/trust_path/modules/sd2nd/class/updater/prepare/RefleshTable.class.php new file mode 100644 index 0000000..7d75d95 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/RefleshTable.class.php @@ -0,0 +1,152 @@ +mController->mDB; + + $arr = array_map(array('Sd2nd_UpdateUtils','convertTableName'),$this->_mRegistTableName); + foreach($arr as $table) + { + if(!$db->queryF('delete from `' . $table . '` where `regist_time` >= ' . SD2ND_UPDATE_TIME)) + { + throw new Sd2nd_QueryException('Table "' . $table . '" cannot reflesh.'); + } + } + + $arr = array_map(array('Sd2nd_UpdateUtils','convertTableName'),$this->_mUpdateTableName); + foreach($arr as $table) + { + if(!$db->queryF('delete from `' . $table .'` where `update_time` >= ' . SD2ND_UPDATE_TIME)) + { + throw new Sd2nd_QueryException('Table "' . $table . '" cannot reflesh.'); + } + } + + $arr = array_map(array('Sd2nd_UpdateUtils','convertTableName'),$this->_mTruncateTableName); + foreach($arr as $table) + { + if(!$db->queryF('truncate `' . $table . '`')) + { + throw new Sd2nd_QueryException('Table "' . $table . '" cannot truncate.'); + } + } + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function executeLatest() + { + /* + Sd2nd_AssetManager::HANDLER_SKILL_ELEMENT_LINK, + */ + $this->_mRegistTableName = array( + Sd2nd_AssetManager::HANDLER_ABILITY, + Sd2nd_AssetManager::HANDLER_COSTUME, + Sd2nd_AssetManager::HANDLER_ENO_PNO_LINK, + Sd2nd_AssetManager::HANDLER_LEARNED_ABILITY, + Sd2nd_AssetManager::HANDLER_LEARNED_COSTUME, + Sd2nd_AssetManager::HANDLER_LEARNED_SKILL, + Sd2nd_AssetManager::HANDLER_MAP_SPOT, + Sd2nd_AssetManager::HANDLER_SKILL + ); + + $this->_mUpdateTableName = array( + Sd2nd_AssetManager::HANDLER_ICON, + Sd2nd_AssetManager::HANDLER_IMAGE, + Sd2nd_AssetManager::HANDLER_MAP, + Sd2nd_AssetManager::HANDLER_MAP_CACHE, + Sd2nd_AssetManager::HANDLER_UPDATE + ); + + $this->_mTruncateTableName = array( + Sd2nd_AssetManager::HANDLER_ACTIVE_ABILITY, + Sd2nd_AssetManager::HANDLER_CHAR, + Sd2nd_AssetManager::HANDLER_STATUS + ); + + $this->_reflesh(); + } + + /** + * execute080524 + * + * @param void + * + * @return void + * @throw Sd2nd_Exception + **/ + public function execute080524() + { + $this->_mTruncateTableName = array( + Sd2nd_AssetManager::HANDLER_ABILITY, + Sd2nd_AssetManager::HANDLER_ACTIVE_ABILITY, + Sd2nd_AssetManager::HANDLER_CHAR, + Sd2nd_AssetManager::HANDLER_COSTUME, + Sd2nd_AssetManager::HANDLER_ENO_PNO_LINK, + Sd2nd_AssetManager::HANDLER_ICON, + Sd2nd_AssetManager::HANDLER_IMAGE, + Sd2nd_AssetManager::HANDLER_LEARNED_ABILITY, + Sd2nd_AssetManager::HANDLER_LEARNED_COSTUME, + Sd2nd_AssetManager::HANDLER_LEARNED_SKILL, + Sd2nd_AssetManager::HANDLER_MAP, + Sd2nd_AssetManager::HANDLER_MAP_CACHE, + Sd2nd_AssetManager::HANDLER_MAP_SPOT, + Sd2nd_AssetManager::HANDLER_RACE, + Sd2nd_AssetManager::HANDLER_SKILL, + Sd2nd_AssetManager::HANDLER_SKILL_ELEMENT_LINK, + Sd2nd_AssetManager::HANDLER_STATUS, + Sd2nd_AssetManager::HANDLER_TARGET, + Sd2nd_AssetManager::HANDLER_UPDATE + ); + + $this->_reflesh(); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/Setup.class.php b/trust_path/modules/sd2nd/class/updater/prepare/Setup.class.php new file mode 100644 index 0000000..3984d0c --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/Setup.class.php @@ -0,0 +1,55 @@ +[a-zA-Z]+)(?P\d*)\.html?$/'); + +/** + * @class Sd2nd_SetupPrepare +**/ +class Sd2nd_SetupPrepare extends Sd2nd_AbstractFilter +{ + /** + * getPriority + * + * @param void + * + * @return Enum + **/ + public function getPriority() + { + return XCUBE_DELEGATE_PRIORITY_FIRST; + } + + /** + * executeLatest + * + * @param void + * + * @return void + * @throw Sd_Exception + **/ + public function executeLatest() + { + $root =& XCube_Root::getSingleton(); + if(!mysql_set_charset(SD2ND_DATABASE_ENCODING,$root->mController->mDB->conn)) + { + throw new Sd2nd_QueryException('set charset "' . SD2ND_DATABASE_ENCODING. '" is not valid.'); + } + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/SkillList.class.php b/trust_path/modules/sd2nd/class/updater/prepare/SkillList.class.php new file mode 100644 index 0000000..db6e9af --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/SkillList.class.php @@ -0,0 +1,58 @@ +mController->mDB; + $arr = array(); + + if(!$res = $db->query('select `skill_id`,`skill_name` from `' . Sd2nd_UpdateUtils::convertTableName(Sd2nd_AssetManager::HANDLER_SKILL) . '`')) + { + throw new Sd2nd_QueryException('Skill data is not readable.'); + } + + while($row = $db->fetchArray($res)) + { + $arr[$row['skill_name']] = $row['skill_id']; + } + + $root->mContext->setAttribute('sd2nd.skill',$arr); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/SpotList.class.php b/trust_path/modules/sd2nd/class/updater/prepare/SpotList.class.php new file mode 100644 index 0000000..69236df --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/SpotList.class.php @@ -0,0 +1,58 @@ +mController->mDB; + $arr = array(); + + if(!$res = $db->query('select `spot_id`,`spot_name` from `' . Sd2nd_UpdateUtils::convertTableName(Sd2nd_AssetManager::HANDLER_MAP_SPOT) . '`')) + { + throw new Sd2nd_QueryException('MapSpot data is not readable.'); + } + + while($row = $db->fetchArray($res)) + { + $arr[$row['spot_name']] = $row['spot_id']; + } + + $root->mContext->setAttribute('sd2nd.spot',$arr); + } +} + +?> diff --git a/trust_path/modules/sd2nd/class/updater/prepare/TargetList.class.php b/trust_path/modules/sd2nd/class/updater/prepare/TargetList.class.php new file mode 100644 index 0000000..5f5ff78 --- /dev/null +++ b/trust_path/modules/sd2nd/class/updater/prepare/TargetList.class.php @@ -0,0 +1,58 @@ +mController->mDB; + $arr = array(); + + if(!$res = $db->query('select `target_id`,`target_name` from `' . Sd2nd_UpdateUtils::convertTableName(Sd2nd_AssetManager::HANDLER_TARGET) . '`')) + { + throw new Sd2nd_QueryException('Target data is not readable.'); + } + + while($row = $db->fetchArray($res)) + { + $arr[$row['target_name']] = $row['target_id']; + } + + $root->mContext->setAttribute('sd2nd.target',$arr); + } +} + +?> diff --git a/trust_path/modules/sd2nd/forms/AbilityFilterForm.class.php b/trust_path/modules/sd2nd/forms/AbilityFilterForm.class.php new file mode 100644 index 0000000..6417238 --- /dev/null +++ b/trust_path/modules/sd2nd/forms/AbilityFilterForm.class.php @@ -0,0 +1,83 @@ + 'ability_id', + SD2ND_ABILITY_SORT_KEY_ABILITY_NAME => 'ability_name', + SD2ND_ABILITY_SORT_KEY_DESCRIPTION => 'description', + SD2ND_ABILITY_SORT_KEY_ABILITY_COST => 'ability_cost', + SD2ND_ABILITY_SORT_KEY_REGIST_TIME => 'regist_time' + ); + + /** + * getDefaultSortKey + * + * @param void + * + * @return void + **/ + public function getDefaultSortKey() + { + return SD2ND_ABILITY_SORT_KEY_DEFAULT; + } + + /** + * fetch + * + * @param void + * + * @return void + **/ + public function fetch() + { + parent::fetch(); + + $request =& XCube_Root::getSingleton()->mContext->mRequest; + + if (($value = $request->getRequest('regist_time')) != null) { + $this->_mCriteria->add(new Criteria('regist_time', $value)); + } + $this->mNavi->addExtra('regist_time', $value); + + if (ctype_digit($value = $request->getRequest('ability_cost'))) { + $this->_mCriteria->add(new Criteria('ability_cost', $value)); + } + else + { + $value = null; + } + $this->mNavi->addExtra('ability_cost', $value); + + $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); + } +} + +?> diff --git a/trust_path/modules/sd2nd/forms/ActiveAbilityFilterForm.class.php b/trust_path/modules/sd2nd/forms/ActiveAbilityFilterForm.class.php new file mode 100644 index 0000000..349070e --- /dev/null +++ b/trust_path/modules/sd2nd/forms/ActiveAbilityFilterForm.class.php @@ -0,0 +1,76 @@ +_mHandler->getActiveAbilityCount($this->getCriteria()); + } + + /** + * fetch + * + * @param void + * + * @return void + * + * @public + **/ + function fetch() + { + $this->mNavi->fetch(); + + $root =& XCube_Root::getSingleton(); + + if (($value = $root->mContext->mRequest->getRequest('eno')) !== null) { + $this->mNavi->addExtra('eno', $value); + $this->_mCriteria->add(new Criteria('eno', $value)); + } + + if (($value = $root->mContext->mRequest->getRequest('ability_name')) !== null) { + $ext = array(); + foreach(explode(' ',mb_convert_kana($value,'as')) as $v) + { + if($v != null) + { + $ext[] = $v; + $this->_mCriteria->add(new Criteria('ability_name',$v)); + } + } + $this->mNavi->addExtra('ability_name',implode(' ',$ext)); + } + + if(!$this->_mCriteria->hasChildElements()) + { + $this->_mCriteria->add(new Criteria('ability_name','dummy')); + } + + $this->_mCriteria->addSort('`c`.`eno`', 'ASC'); + } +} + +?> diff --git a/trust_path/modules/sd2nd/forms/CostumeFilterForm.class.php b/trust_path/modules/sd2nd/forms/CostumeFilterForm.class.php new file mode 100644 index 0000000..70bfb6a --- /dev/null +++ b/trust_path/modules/sd2nd/forms/CostumeFilterForm.class.php @@ -0,0 +1,104 @@ + 'costume_id', + SD2ND_COSTUME_SORT_KEY_COSTUME_NAME => 'costume_name', + SD2ND_COSTUME_SORT_KEY_GROW_LIFE => 'grow_life', + SD2ND_COSTUME_SORT_KEY_GROW_SOUL => 'grow_soul', + SD2ND_COSTUME_SORT_KEY_GROW_POW => 'grow_pow', + SD2ND_COSTUME_SORT_KEY_GROW_STR => 'grow_str', + SD2ND_COSTUME_SORT_KEY_GROW_DEX => 'grow_dex', + SD2ND_COSTUME_SORT_KEY_GROW_SPEED => 'grow_speed', + SD2ND_COSTUME_SORT_KEY_GROW_MAG => 'grow_mag', + SD2ND_COSTUME_SORT_KEY_GROW_REG => 'grow_reg', + SD2ND_COSTUME_SORT_KEY_GROW_CON => 'grow_con', + SD2ND_COSTUME_SORT_KEY_MODIFY_HP => 'modify_hp', + SD2ND_COSTUME_SORT_KEY_MODIFY_TP => 'modify_tp', + SD2ND_COSTUME_SORT_KEY_MODIFY_AT => 'modify_at', + SD2ND_COSTUME_SORT_KEY_MODIFY_DF => 'modify_df', + SD2ND_COSTUME_SORT_KEY_MODIFY_MAT => 'modify_mat', + SD2ND_COSTUME_SORT_KEY_MODIFY_MDF => 'modify_mdf', + SD2ND_COSTUME_SORT_KEY_MODIFY_ACT => 'modify_act', + SD2ND_COSTUME_SORT_KEY_MOVE_COST => 'move_cost', + SD2ND_COSTUME_SORT_KEY_REGIST_TIME => 'regist_time' + ); + + /** + * getDefaultSortKey + * + * @param void + * + * @return void + **/ + public function getDefaultSortKey() + { + return SD2ND_COSTUME_SORT_KEY_DEFAULT; + } + + /** + * fetch + * + * @param void + * + * @return void + **/ + public function fetch() + { + parent::fetch(); + + $root =& XCube_Root::getSingleton(); + + if (($value = $root->mContext->mRequest->getRequest('regist_time')) != null) { + $this->_mCriteria->add(new Criteria('regist_time', $value)); + } + $this->mNavi->addExtra('regist_time', $value); + + $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); + } +} + +?> diff --git a/trust_path/modules/sd2nd/forms/LearnedAbilityFilterForm.class.php b/trust_path/modules/sd2nd/forms/LearnedAbilityFilterForm.class.php new file mode 100644 index 0000000..606f896 --- /dev/null +++ b/trust_path/modules/sd2nd/forms/LearnedAbilityFilterForm.class.php @@ -0,0 +1,76 @@ +_mHandler->getLearnedAbilityCount($this->getCriteria()); + } + + /** + * fetch + * + * @param void + * + * @return void + * + * @public + **/ + function fetch() + { + $this->mNavi->fetch(); + + $root =& XCube_Root::getSingleton(); + + if (($value = $root->mContext->mRequest->getRequest('eno')) !== null) { + $this->mNavi->addExtra('eno', $value); + $this->_mCriteria->add(new Criteria('eno', $value)); + } + + if (($value = $root->mContext->mRequest->getRequest('ability_name')) !== null) { + $ext = array(); + foreach(explode(' ',mb_convert_kana($value,'as')) as $v) + { + if($v != null) + { + $ext[] = $v; + $this->_mCriteria->add(new Criteria('ability_name',$v)); + } + } + $this->mNavi->addExtra('ability_name',implode(' ',$ext)); + } + + if(!$this->_mCriteria->hasChildElements()) + { + $this->_mCriteria->add(new Criteria('ability_name','dummy')); + } + + $this->_mCriteria->addSort('`c`.`eno`', 'ASC'); + } +} + +?> diff --git a/trust_path/modules/sd2nd/forms/LearnedSkillFilterForm.class.php b/trust_path/modules/sd2nd/forms/LearnedSkillFilterForm.class.php new file mode 100644 index 0000000..d617090 --- /dev/null +++ b/trust_path/modules/sd2nd/forms/LearnedSkillFilterForm.class.php @@ -0,0 +1,76 @@ +_mHandler->getLearnedSkillCount($this->getCriteria()); + } + + /** + * fetch + * + * @param void + * + * @return void + * + * @public + **/ + function fetch() + { + $this->mNavi->fetch(); + + $root =& XCube_Root::getSingleton(); + + if (($value = $root->mContext->mRequest->getRequest('eno')) !== null) { + $this->mNavi->addExtra('eno', $value); + $this->_mCriteria->add(new Criteria('eno', $value)); + } + + if (($value = $root->mContext->mRequest->getRequest('skill_name')) !== null) { + $ext = array(); + foreach(explode(' ',mb_convert_kana($value,'as')) as $v) + { + if($v != null) + { + $ext[] = $v; + $this->_mCriteria->add(new Criteria('skill_name',$v)); + } + } + $this->mNavi->addExtra('skill_name',implode(' ',$ext)); + } + + if(!$this->_mCriteria->hasChildElements()) + { + $this->_mCriteria->add(new Criteria('skill_name','dummy')); + } + + $this->_mCriteria->addSort('`c`.`eno`', 'ASC'); + } +} + +?> diff --git a/trust_path/modules/sd2nd/forms/SkillFilterForm.class.php b/trust_path/modules/sd2nd/forms/SkillFilterForm.class.php new file mode 100644 index 0000000..2622548 --- /dev/null +++ b/trust_path/modules/sd2nd/forms/SkillFilterForm.class.php @@ -0,0 +1,99 @@ + 'skill_id', + SD2ND_SKILL_SORT_KEY_SKILL_NAME => 'skill_name', + SD2ND_SKILL_SORT_KEY_DESCRIPTION => 'description', + SD2ND_SKILL_SORT_KEY_RANGE => 'range', + SD2ND_SKILL_SORT_KEY_TARGET => 'target', + SD2ND_SKILL_SORT_KEY_KIND => 'kind', + SD2ND_SKILL_SORT_KEY_TP => 'tp', + SD2ND_SKILL_SORT_KEY_REGIST_TIME => 'regist_time' + ); + + /** + * getDefaultSortKey + * + * @param void + * + * @return void + **/ + public function getDefaultSortKey() + { + return SD2ND_SKILL_SORT_KEY_DEFAULT; + } + + /** + * fetch + * + * @param void + * + * @return void + **/ + public function fetch() + { + parent::fetch(); + + $request =& XCube_Root::getSingleton()->mContext->mRequest; + + if (($value = $request->getRequest('regist_time')) != null) { + $this->_mCriteria->add(new Criteria('regist_time', $value)); + } + $this->mNavi->addExtra('regist_time', $value); + + if (ctype_digit($value = $request->getRequest('range'))) { + $this->_mCriteria->add(new Criteria('range', $value)); + } + else + { + $value = null; + } + $this->mNavi->addExtra('range', $value); + + if (($value = $request->getRequest('target')) != null) { + $this->_mCriteria->add(new Criteria('target', $value)); + } + $this->mNavi->addExtra('target', $value); + + if (($value = $request->getRequest('kind')) != null) { + $this->_mCriteria->add(new Criteria('kind', $value)); + } + $this->mNavi->addExtra('kind', $value); + + $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); + } +} + +?> diff --git a/trust_path/modules/sd2nd/index.php b/trust_path/modules/sd2nd/index.php new file mode 100644 index 0000000..cdf2ef5 --- /dev/null +++ b/trust_path/modules/sd2nd/index.php @@ -0,0 +1,17 @@ +mController->execute(); + +require_once XOOPS_ROOT_PATH . '/footer.php'; + +?> diff --git a/trust_path/modules/sd2nd/language/english/admin.php b/trust_path/modules/sd2nd/language/english/admin.php new file mode 100644 index 0000000..6d4a5b1 --- /dev/null +++ b/trust_path/modules/sd2nd/language/english/admin.php @@ -0,0 +1,8 @@ + diff --git a/trust_path/modules/sd2nd/language/english/help/delegate.html b/trust_path/modules/sd2nd/language/english/help/delegate.html new file mode 100644 index 0000000..8b13be9 --- /dev/null +++ b/trust_path/modules/sd2nd/language/english/help/delegate.html @@ -0,0 +1,37 @@ +

Delegate List

+ +
Module.sd2nd.Global.Event.GetAssetManager
+
+
Sd2nd_AssetManager
&$obj
+
string
$dirname
+
+ +
Module.sd2nd.Global.Event.Exception.ActionNotFound
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.ActionNotFound
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Preparation
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Preparation
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Permission
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Permission
+
+
void
+
diff --git a/trust_path/modules/sd2nd/language/english/help/help.html b/trust_path/modules/sd2nd/language/english/help/help.html new file mode 100644 index 0000000..794fd16 --- /dev/null +++ b/trust_path/modules/sd2nd/language/english/help/help.html @@ -0,0 +1,4 @@ +

Input the title here

+
Summary
+

Even if the help is poor, some information shall help users. Try writing. Take it easy.

+
">Delegate List
diff --git a/trust_path/modules/sd2nd/language/english/main.php b/trust_path/modules/sd2nd/language/english/main.php new file mode 100644 index 0000000..a87e569 --- /dev/null +++ b/trust_path/modules/sd2nd/language/english/main.php @@ -0,0 +1,93 @@ + diff --git a/trust_path/modules/sd2nd/language/english/modinfo.php b/trust_path/modules/sd2nd/language/english/modinfo.php new file mode 100644 index 0000000..7725acc --- /dev/null +++ b/trust_path/modules/sd2nd/language/english/modinfo.php @@ -0,0 +1,69 @@ +{0}"); +define('_MI_SD2ND_INSTALL_ERROR_BLOCK_TPL_INSTALLED', "Block template '{0}' could not installed."); +define('_MI_SD2ND_INSTALL_ERROR_BLOCK_UNINSTALLED', "Block '{0}' could not uninstalled."); +define('_MI_SD2ND_INSTALL_ERROR_BLOCK_UPDATED', "Block '{0}' could not updated."); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_ADDED', "Config '{0}' could not added."); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_DELETED', "Config '{0}' could not deleted."); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_NOT_FOUND', "Config is not found."); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_UPDATED', "Config '{0}' could not updated."); +define('_MI_SD2ND_INSTALL_ERROR_MODULE_INFORMATION_DELETED', "Module information could not deleted."); +define('_MI_SD2ND_INSTALL_ERROR_MODULE_INSTALLED', "Module not installed."); +define('_MI_SD2ND_INSTALL_ERROR_MODULE_UPDATED', "Module '{0}' could not updated."); +define('_MI_SD2ND_INSTALL_ERROR_MODULOE_UNINSTALLED', "Module '{0}' could not uninstalled."); +define('_MI_SD2ND_INSTALL_ERROR_PERM_ADMIN_SET', "Module admin permission could not set."); +define('_MI_SD2ND_INSTALL_ERROR_PERM_COULD_NOT_SET', "Block permission of '{0}' could not set."); +define('_MI_SD2ND_INSTALL_ERROR_PERM_READ_SET', "Module read permission could not set."); +define('_MI_SD2ND_INSTALL_ERROR_SQL_FILE_NOT_FOUND', "SQL file '{0}' is not found."); +define('_MI_SD2ND_INSTALL_ERROR_TABLE_DOROPPED', "Table '{0}' could not doropped."); +define('_MI_SD2ND_INSTALL_ERROR_TPL_INSTALLED', "Template '{0}' could not installed."); +define('_MI_SD2ND_INSTALL_ERROR_TPL_UNINSTALLED', "Template '{0}' could not uninstalled."); +define('_MI_SD2ND_INSTALL_ERROR_UPDATE_FINISHED', "Module could not updated."); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_INSTALLED', "Block '{0}' is installed."); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_TPL_INSTALLED', "Block template '{0}' is installed."); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_TPL_UNINSTALLED', "Block template '{0}' is uninstalled."); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_UNINSTALLED', "Block '{0}' is uninstalled."); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_UPDATED', "Block '{0}' is updated."); +define('_MI_SD2ND_INSTALL_MSG_CONFIG_ADDED', "Config '{0}' is added."); +define('_MI_SD2ND_INSTALL_MSG_CONFIG_DELETED', "Config '{0}' is deleted."); +define('_MI_SD2ND_INSTALL_MSG_CONFIG_UPDATED', "Config '{0}' is updated."); +define('_MI_SD2ND_INSTALL_MSG_DB_SETUP_FINISHED', "Database setup is finished."); +define('_MI_SD2ND_INSTALL_MSG_MODULE_INFORMATION_DELETED', "Module information is deleted."); +define('_MI_SD2ND_INSTALL_MSG_MODULE_INSTALLED', "Module '{0}' has installed."); +define('_MI_SD2ND_INSTALL_MSG_MODULE_UNINSTALLED', "Module '{0}' is uninstalled."); +define('_MI_SD2ND_INSTALL_MSG_MODULE_UPDATED', "Module '{0}' is updated."); +define('_MI_SD2ND_INSTALL_MSG_SQL_ERROR', "SQL error : {0}"); +define('_MI_SD2ND_INSTALL_MSG_SQL_SUCCESS', "SQL success : {0}"); +define('_MI_SD2ND_INSTALL_MSG_TABLE_DOROPPED', "Table '{0}' is doropped."); +define('_MI_SD2ND_INSTALL_MSG_TPL_INSTALLED', "Template '{0}' is installed."); +define('_MI_SD2ND_INSTALL_MSG_UPDATE_FINISHED', "Module update is finished."); +define('_MI_SD2ND_INSTALL_MSG_UPDATE_STARTED', "Module update started."); +define('_MI_SD2ND_LANG_AUTHOR', "AUTHOR"); +define('_MI_SD2ND_LANG_CREDITS', "CREDITS"); +define('_MI_SD2ND_LANG_SD2ND', "SD2ND"); +define('_MI_SD2ND_TPL_ABILITY_LIST', "ABILITY_LIST"); +define('_MI_SD2ND_TPL_ACTIVE_ABILITY_LIST', "ACTIVE_ABILITY_LIST"); +define('_MI_SD2ND_TPL_COSTUME_LIST', "COSTUME_LIST"); +define('_MI_SD2ND_TPL_DROP_LIST', "DROP_LIST"); +define('_MI_SD2ND_TPL_INDEX', "INDEX"); +define('_MI_SD2ND_TPL_KIND_LIST', "KIND_LIST"); +define('_MI_SD2ND_TPL_LEARNED_ABILITY_LIST', "LEARNED_ABILITY_LIST"); +define('_MI_SD2ND_TPL_LEARNED_COSTUME_LIST', "LEARNED_COSTUME_LIST"); +define('_MI_SD2ND_TPL_LEARNED_SKILL_LIST', "LEARNED_SKILL_LIST"); +define('_MI_SD2ND_TPL_MAP_VIEW', "MAP_VIEW"); +define('_MI_SD2ND_TPL_RACE_LIST', "RACE_LIST"); +define('_MI_SD2ND_TPL_SKILL_LIST', "SKILL_LIST"); +define('_MI_SD2ND_TPL_TARGET_LIST', "TARGET_LIST"); + +?> diff --git a/trust_path/modules/sd2nd/language/ja_utf8/admin.php b/trust_path/modules/sd2nd/language/ja_utf8/admin.php new file mode 100644 index 0000000..6d4a5b1 --- /dev/null +++ b/trust_path/modules/sd2nd/language/ja_utf8/admin.php @@ -0,0 +1,8 @@ + diff --git a/trust_path/modules/sd2nd/language/ja_utf8/help/delegate.html b/trust_path/modules/sd2nd/language/ja_utf8/help/delegate.html new file mode 100644 index 0000000..8b13be9 --- /dev/null +++ b/trust_path/modules/sd2nd/language/ja_utf8/help/delegate.html @@ -0,0 +1,37 @@ +

Delegate List

+ +
Module.sd2nd.Global.Event.GetAssetManager
+
+
Sd2nd_AssetManager
&$obj
+
string
$dirname
+
+ +
Module.sd2nd.Global.Event.Exception.ActionNotFound
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.ActionNotFound
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Preparation
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Preparation
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Permission
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Permission
+
+
void
+
diff --git a/trust_path/modules/sd2nd/language/ja_utf8/help/help.html b/trust_path/modules/sd2nd/language/ja_utf8/help/help.html new file mode 100644 index 0000000..794fd16 --- /dev/null +++ b/trust_path/modules/sd2nd/language/ja_utf8/help/help.html @@ -0,0 +1,4 @@ +

Input the title here

+
Summary
+

Even if the help is poor, some information shall help users. Try writing. Take it easy.

+
">Delegate List
diff --git a/trust_path/modules/sd2nd/language/ja_utf8/main.php b/trust_path/modules/sd2nd/language/ja_utf8/main.php new file mode 100644 index 0000000..876664c --- /dev/null +++ b/trust_path/modules/sd2nd/language/ja_utf8/main.php @@ -0,0 +1,93 @@ + diff --git a/trust_path/modules/sd2nd/language/ja_utf8/modinfo.php b/trust_path/modules/sd2nd/language/ja_utf8/modinfo.php new file mode 100644 index 0000000..7400117 --- /dev/null +++ b/trust_path/modules/sd2nd/language/ja_utf8/modinfo.php @@ -0,0 +1,69 @@ +{0}"); +define('_MI_SD2ND_INSTALL_ERROR_BLOCK_TPL_INSTALLED', "ぶろっくてんぷれ『{0}』がいんすとーるできませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_BLOCK_UNINSTALLED', "ぶろっく『{0}』があんいんすとーるできませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_BLOCK_UPDATED', "ぶろっく『{0}』があっぷでーとできませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_ADDED', "一般設定『{0}』が追加できませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_DELETED', "一般設定『{0}』が削除できませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_NOT_FOUND', "一般設定が見つかりません。"); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_UPDATED', "一般設定『{0}』があっぷでーとできませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_MODULE_INFORMATION_DELETED', "もじゅーる情報が削除できませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_MODULE_INSTALLED', "もじゅーるのいんすとーるができませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_MODULE_UPDATED', "もじゅーる『{0}』があっぷでーとできませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_MODULOE_UNINSTALLED', "もじゅーる『{0}』があんいんすとーるできませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_PERM_ADMIN_SET', "もじゅーるの管理権限を付加できませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_PERM_COULD_NOT_SET', "ぶろっく『{0}』に権限を付加できませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_PERM_READ_SET', "もじゅーるのあくせす権限を付加できませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_SQL_FILE_NOT_FOUND', "SQLふぁいる『{0}』が見つかりませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_TABLE_DOROPPED', "てーぶる『{0}』が削除できませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_TPL_INSTALLED', "てんぷれ『{0}』のいんすとーるができませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_TPL_UNINSTALLED', "てんぷれ『{0}』のあんいんすとーるができませんでした。"); +define('_MI_SD2ND_INSTALL_ERROR_UPDATE_FINISHED', "もじゅーるのあっぷでーとに失敗しました。"); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_INSTALLED', "ぶろっく『{0}』をいんすとーるしました。"); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_TPL_INSTALLED', "ぶろっくてんぷれ『{0}』をいんすとーるしました。"); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_TPL_UNINSTALLED', "ぶろっくてんぷれ『{0}』をあんいんすとーるしました。"); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_UNINSTALLED', "ぶろっく『{0}』をあんいんすとーるしました。"); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_UPDATED', "ぶろっく『{0}』をあっぷでーとしました。"); +define('_MI_SD2ND_INSTALL_MSG_CONFIG_ADDED', "一般設定『{0}』を追加しました。"); +define('_MI_SD2ND_INSTALL_MSG_CONFIG_DELETED', "一般設定『{0}』を削除しました。"); +define('_MI_SD2ND_INSTALL_MSG_CONFIG_UPDATED', "一般設定『{0}』をあっぷでーとしました。"); +define('_MI_SD2ND_INSTALL_MSG_DB_SETUP_FINISHED', "でーたべーすのせっとあっぷが完了しました。"); +define('_MI_SD2ND_INSTALL_MSG_MODULE_INFORMATION_DELETED', "もじゅーる情報を削除しました。"); +define('_MI_SD2ND_INSTALL_MSG_MODULE_INSTALLED', "もじゅーる『{0}』をいんすとーるしました。"); +define('_MI_SD2ND_INSTALL_MSG_MODULE_UNINSTALLED', "もじゅーる『{0}』をあんいんすとーるしました。"); +define('_MI_SD2ND_INSTALL_MSG_MODULE_UPDATED', "もじゅーる『{0}』をあっぷでーとしました。"); +define('_MI_SD2ND_INSTALL_MSG_SQL_ERROR', "SQL error : {0}"); +define('_MI_SD2ND_INSTALL_MSG_SQL_SUCCESS', "SQL success : {0}"); +define('_MI_SD2ND_INSTALL_MSG_TABLE_DOROPPED', "てーぶる『{0}』を削除しました。"); +define('_MI_SD2ND_INSTALL_MSG_TPL_INSTALLED', "てんぷれ『{0}』をいんすとーるしました。"); +define('_MI_SD2ND_INSTALL_MSG_UPDATE_FINISHED', "もじゅーるのあっぷでーとが終了しました。"); +define('_MI_SD2ND_INSTALL_MSG_UPDATE_STARTED', "もじゅーるのあっぷでーとを開始します。"); +define('_MI_SD2ND_LANG_AUTHOR', "AUTHOR"); +define('_MI_SD2ND_LANG_CREDITS', "CREDITS"); +define('_MI_SD2ND_LANG_SD2ND', "SD2ND"); +define('_MI_SD2ND_TPL_ABILITY_LIST', "ABILITY_LIST"); +define('_MI_SD2ND_TPL_COSTUME_LIST', "COSTUME_LIST"); +define('_MI_SD2ND_TPL_DROP_LIST', "DROP_LIST"); +define('_MI_SD2ND_TPL_INDEX', "INDEX"); +define('_MI_SD2ND_TPL_KIND_LIST', "KIND_LIST"); +define('_MI_SD2ND_TPL_MAP_VIEW', "MAP_VIEW"); +define('_MI_SD2ND_TPL_RACE_LIST', "RACE_LIST"); +define('_MI_SD2ND_TPL_SKILL_LIST', "SKILL_LIST"); +define('_MI_SD2ND_TPL_TARGET_LIST', "TARGET_LIST"); +define('_MI_SD2ND_TPL_ACTIVE_ABILITY_LIST', "ACTIVE_ABILITY_LIST"); +define('_MI_SD2ND_TPL_LEARNED_ABILITY_LIST', "LEARNED_ABILITY_LIST"); +define('_MI_SD2ND_TPL_LEARNED_SKILL_LIST', "LEARNED_SKILL_LIST"); +define('_MI_SD2ND_TPL_LEARNED_COSTUME_LIST', "LEARNED_COSTUME_LIST"); + +?> diff --git a/trust_path/modules/sd2nd/language/japanese/admin.php b/trust_path/modules/sd2nd/language/japanese/admin.php new file mode 100644 index 0000000..6d4a5b1 --- /dev/null +++ b/trust_path/modules/sd2nd/language/japanese/admin.php @@ -0,0 +1,8 @@ + diff --git a/trust_path/modules/sd2nd/language/japanese/help/delegate.html b/trust_path/modules/sd2nd/language/japanese/help/delegate.html new file mode 100644 index 0000000..8b13be9 --- /dev/null +++ b/trust_path/modules/sd2nd/language/japanese/help/delegate.html @@ -0,0 +1,37 @@ +

Delegate List

+ +
Module.sd2nd.Global.Event.GetAssetManager
+
+
Sd2nd_AssetManager
&$obj
+
string
$dirname
+
+ +
Module.sd2nd.Global.Event.Exception.ActionNotFound
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.ActionNotFound
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Preparation
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Preparation
+
+
void
+
+ +
Module.sd2nd.Global.Event.Exception.Permission
+
+
string
$dirname
+
+ +
Module.{dirname}.Event.Exception.Permission
+
+
void
+
diff --git a/trust_path/modules/sd2nd/language/japanese/help/help.html b/trust_path/modules/sd2nd/language/japanese/help/help.html new file mode 100644 index 0000000..794fd16 --- /dev/null +++ b/trust_path/modules/sd2nd/language/japanese/help/help.html @@ -0,0 +1,4 @@ +

Input the title here

+
Summary
+

Even if the help is poor, some information shall help users. Try writing. Take it easy.

+
">Delegate List
diff --git a/trust_path/modules/sd2nd/language/japanese/main.php b/trust_path/modules/sd2nd/language/japanese/main.php new file mode 100644 index 0000000..697b775 --- /dev/null +++ b/trust_path/modules/sd2nd/language/japanese/main.php @@ -0,0 +1,93 @@ + diff --git a/trust_path/modules/sd2nd/language/japanese/modinfo.php b/trust_path/modules/sd2nd/language/japanese/modinfo.php new file mode 100644 index 0000000..5f34755 --- /dev/null +++ b/trust_path/modules/sd2nd/language/japanese/modinfo.php @@ -0,0 +1,69 @@ +{0}"); +define('_MI_SD2ND_INSTALL_ERROR_BLOCK_TPL_INSTALLED', "¤Ö¤í¤Ã¤¯¤Æ¤ó¤×¤ì¡Ø{0}¡Ù¤¬¤¤¤ó¤¹¤È¡¼¤ë¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_BLOCK_UNINSTALLED', "¤Ö¤í¤Ã¤¯¡Ø{0}¡Ù¤¬¤¢¤ó¤¤¤ó¤¹¤È¡¼¤ë¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_BLOCK_UPDATED', "¤Ö¤í¤Ã¤¯¡Ø{0}¡Ù¤¬¤¢¤Ã¤×¤Ç¡¼¤È¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_ADDED', "°ìÈÌÀßÄê¡Ø{0}¡Ù¤¬ÄɲäǤ­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_DELETED', "°ìÈÌÀßÄê¡Ø{0}¡Ù¤¬ºï½ü¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_NOT_FOUND', "°ìÈÌÀßÄ꤬¸«¤Ä¤«¤ê¤Þ¤»¤ó¡£"); +define('_MI_SD2ND_INSTALL_ERROR_CONFIG_UPDATED', "°ìÈÌÀßÄê¡Ø{0}¡Ù¤¬¤¢¤Ã¤×¤Ç¡¼¤È¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_MODULE_INFORMATION_DELETED', "¤â¤¸¤å¡¼¤ë¾ðÊ󤬺ï½ü¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_MODULE_INSTALLED', "¤â¤¸¤å¡¼¤ë¤Î¤¤¤ó¤¹¤È¡¼¤ë¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_MODULE_UPDATED', "¤â¤¸¤å¡¼¤ë¡Ø{0}¡Ù¤¬¤¢¤Ã¤×¤Ç¡¼¤È¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_MODULOE_UNINSTALLED', "¤â¤¸¤å¡¼¤ë¡Ø{0}¡Ù¤¬¤¢¤ó¤¤¤ó¤¹¤È¡¼¤ë¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_PERM_ADMIN_SET', "¤â¤¸¤å¡¼¤ë¤Î´ÉÍý¸¢¸Â¤òÉղäǤ­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_PERM_COULD_NOT_SET', "¤Ö¤í¤Ã¤¯¡Ø{0}¡Ù¤Ë¸¢¸Â¤òÉղäǤ­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_PERM_READ_SET', "¤â¤¸¤å¡¼¤ë¤Î¤¢¤¯¤»¤¹¸¢¸Â¤òÉղäǤ­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_SQL_FILE_NOT_FOUND', "SQL¤Õ¤¡¤¤¤ë¡Ø{0}¡Ù¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_TABLE_DOROPPED', "¤Æ¡¼¤Ö¤ë¡Ø{0}¡Ù¤¬ºï½ü¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_TPL_INSTALLED', "¤Æ¤ó¤×¤ì¡Ø{0}¡Ù¤Î¤¤¤ó¤¹¤È¡¼¤ë¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_TPL_UNINSTALLED', "¤Æ¤ó¤×¤ì¡Ø{0}¡Ù¤Î¤¢¤ó¤¤¤ó¤¹¤È¡¼¤ë¤¬¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_ERROR_UPDATE_FINISHED', "¤â¤¸¤å¡¼¤ë¤Î¤¢¤Ã¤×¤Ç¡¼¤È¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_INSTALLED', "¤Ö¤í¤Ã¤¯¡Ø{0}¡Ù¤ò¤¤¤ó¤¹¤È¡¼¤ë¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_TPL_INSTALLED', "¤Ö¤í¤Ã¤¯¤Æ¤ó¤×¤ì¡Ø{0}¡Ù¤ò¤¤¤ó¤¹¤È¡¼¤ë¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_TPL_UNINSTALLED', "¤Ö¤í¤Ã¤¯¤Æ¤ó¤×¤ì¡Ø{0}¡Ù¤ò¤¢¤ó¤¤¤ó¤¹¤È¡¼¤ë¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_UNINSTALLED', "¤Ö¤í¤Ã¤¯¡Ø{0}¡Ù¤ò¤¢¤ó¤¤¤ó¤¹¤È¡¼¤ë¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_BLOCK_UPDATED', "¤Ö¤í¤Ã¤¯¡Ø{0}¡Ù¤ò¤¢¤Ã¤×¤Ç¡¼¤È¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_CONFIG_ADDED', "°ìÈÌÀßÄê¡Ø{0}¡Ù¤òÄɲä·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_CONFIG_DELETED', "°ìÈÌÀßÄê¡Ø{0}¡Ù¤òºï½ü¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_CONFIG_UPDATED', "°ìÈÌÀßÄê¡Ø{0}¡Ù¤ò¤¢¤Ã¤×¤Ç¡¼¤È¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_DB_SETUP_FINISHED', "¤Ç¡¼¤¿¤Ù¡¼¤¹¤Î¤»¤Ã¤È¤¢¤Ã¤×¤¬´°Î»¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_MODULE_INFORMATION_DELETED', "¤â¤¸¤å¡¼¤ë¾ðÊó¤òºï½ü¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_MODULE_INSTALLED', "¤â¤¸¤å¡¼¤ë¡Ø{0}¡Ù¤ò¤¤¤ó¤¹¤È¡¼¤ë¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_MODULE_UNINSTALLED', "¤â¤¸¤å¡¼¤ë¡Ø{0}¡Ù¤ò¤¢¤ó¤¤¤ó¤¹¤È¡¼¤ë¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_MODULE_UPDATED', "¤â¤¸¤å¡¼¤ë¡Ø{0}¡Ù¤ò¤¢¤Ã¤×¤Ç¡¼¤È¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_SQL_ERROR', "SQL error : {0}"); +define('_MI_SD2ND_INSTALL_MSG_SQL_SUCCESS', "SQL success : {0}"); +define('_MI_SD2ND_INSTALL_MSG_TABLE_DOROPPED', "¤Æ¡¼¤Ö¤ë¡Ø{0}¡Ù¤òºï½ü¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_TPL_INSTALLED', "¤Æ¤ó¤×¤ì¡Ø{0}¡Ù¤ò¤¤¤ó¤¹¤È¡¼¤ë¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_UPDATE_FINISHED', "¤â¤¸¤å¡¼¤ë¤Î¤¢¤Ã¤×¤Ç¡¼¤È¤¬½ªÎ»¤·¤Þ¤·¤¿¡£"); +define('_MI_SD2ND_INSTALL_MSG_UPDATE_STARTED', "¤â¤¸¤å¡¼¤ë¤Î¤¢¤Ã¤×¤Ç¡¼¤È¤ò³«»Ï¤·¤Þ¤¹¡£"); +define('_MI_SD2ND_LANG_AUTHOR', "AUTHOR"); +define('_MI_SD2ND_LANG_CREDITS', "CREDITS"); +define('_MI_SD2ND_LANG_SD2ND', "SD2ND"); +define('_MI_SD2ND_TPL_ABILITY_LIST', "ABILITY_LIST"); +define('_MI_SD2ND_TPL_COSTUME_LIST', "COSTUME_LIST"); +define('_MI_SD2ND_TPL_DROP_LIST', "DROP_LIST"); +define('_MI_SD2ND_TPL_INDEX', "INDEX"); +define('_MI_SD2ND_TPL_KIND_LIST', "KIND_LIST"); +define('_MI_SD2ND_TPL_MAP_VIEW', "MAP_VIEW"); +define('_MI_SD2ND_TPL_RACE_LIST', "RACE_LIST"); +define('_MI_SD2ND_TPL_SKILL_LIST', "SKILL_LIST"); +define('_MI_SD2ND_TPL_TARGET_LIST', "TARGET_LIST"); +define('_MI_SD2ND_TPL_ACTIVE_ABILITY_LIST', "ACTIVE_ABILITY_LIST"); +define('_MI_SD2ND_TPL_LEARNED_ABILITY_LIST', "LEARNED_ABILITY_LIST"); +define('_MI_SD2ND_TPL_LEARNED_SKILL_LIST', "LEARNED_SKILL_LIST"); +define('_MI_SD2ND_TPL_LEARNED_COSTUME_LIST', "LEARNED_COSTUME_LIST"); + +?> diff --git a/trust_path/modules/sd2nd/preload/AssetPreload.class.php b/trust_path/modules/sd2nd/preload/AssetPreload.class.php new file mode 100644 index 0000000..275919d --- /dev/null +++ b/trust_path/modules/sd2nd/preload/AssetPreload.class.php @@ -0,0 +1,108 @@ +mController); + $root->mController->addActionFilter($instance); + } + + /** + * preBlockFilter + * + * @param void + * + * @return void + **/ + public function preBlockFilter() + { + $this->mRoot->mDelegateManager->add('Module.sd2nd.Global.Event.GetAssetManager','Sd2nd_AssetPreloadBase::getManager'); + $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateModule','Sd2nd_AssetPreloadBase::getModule'); + $this->mRoot->mDelegateManager->add('Legacy_Utils.CreateBlockProcedure','Sd2nd_AssetPreloadBase::getBlock'); + } + + /** + * getManager + * + * @param Sd2nd_AssetManager &$obj + * @param string $dirname + * + * @return void + **/ + public static function getManager(/*** Sd2nd_AssetManager ***/ &$obj,/*** string ***/ $dirname) + { + require_once SD2ND_TRUST_PATH . '/class/AssetManager.class.php'; + $obj = Sd2nd_AssetManager::getInstance($dirname); + } + + /** + * getModule + * + * @param Legacy_AbstractModule &$obj + * @param XoopsModule $module + * + * @return void + **/ + public static function getModule(/*** Legacy_AbstractModule ***/ &$obj,/*** XoopsModule ***/ $module) + { + if($module->getInfo('trust_dirname') == 'sd2nd') + { + require_once SD2ND_TRUST_PATH . '/class/Module.class.php'; + $obj = new Sd2nd_Module($module); + } + } + + /** + * getBlock + * + * @param Legacy_AbstractBlockProcedure &$obj + * @param XoopsBlock $block + * + * @return void + **/ + public static function getBlock(/*** Legacy_AbstractBlockProcedure ***/ &$obj,/*** XoopsBlock ***/ $block) + { + $moduleHandler =& Sd2nd_Utils::getXoopsHandler('module'); + $module =& $moduleHandler->get($block->get('mid')); + if(is_object($module) && $module->getInfo('trust_dirname') == 'sd2nd') + { + require_once SD2ND_TRUST_PATH . '/blocks/' . $block->get('func_file'); + $className = 'Sd2nd_' . substr($block->get('show_func'), 4); + $obj = new $className($block); + } + } +} + +?> diff --git a/trust_path/modules/sd2nd/sql/mysql.sql b/trust_path/modules/sd2nd/sql/mysql.sql new file mode 100644 index 0000000..707df5d --- /dev/null +++ b/trust_path/modules/sd2nd/sql/mysql.sql @@ -0,0 +1,246 @@ +CREATE TABLE `{prefix}_{dirname}_ability` ( + `ability_id` smallint(5) unsigned NOT NULL, + `ability_name` varchar(50) NOT NULL, + `description` varchar(255) NOT NULL, + `ability_cost` tinyint(4) NOT NULL, + `regist_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`ability_id`), + UNIQUE KEY `ability_name` (`ability_name`), + KEY `regist_time` (`regist_time`,`ability_id`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_active_ability` ( + `eno` smallint(5) unsigned NOT NULL, + `slot` tinyint(3) unsigned NOT NULL, + `ability_id` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`ability_id`,`eno`), + UNIQUE KEY `eno` (`eno`,`slot`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_char` ( + `eno` smallint(5) unsigned NOT NULL, + `full_name` varchar(40) NOT NULL, + `nick_name` varchar(16) NOT NULL, + `battle_name` varchar(16) NOT NULL, + `sex` tinyint(3) unsigned NOT NULL, + `age` smallint(5) unsigned NOT NULL, + `height` smallint(5) unsigned NOT NULL, + `weight` smallint(5) unsigned NOT NULL, + `profile` text NOT NULL, + `race` tinyint(3) unsigned NOT NULL, + `element_base` tinyint(3) unsigned NOT NULL, + `element_ext` tinyint(3) unsigned NOT NULL, + `active_costume` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`eno`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_costume` ( + `costume_id` smallint(5) unsigned NOT NULL, + `costume_name` varchar(50) NOT NULL, + `grow_life` tinyint(4) NOT NULL, + `grow_soul` tinyint(4) NOT NULL, + `grow_pow` tinyint(4) NOT NULL, + `grow_str` tinyint(4) NOT NULL, + `grow_dex` tinyint(4) NOT NULL, + `grow_speed` tinyint(4) NOT NULL, + `grow_mag` tinyint(4) NOT NULL, + `grow_reg` tinyint(4) NOT NULL, + `grow_con` tinyint(4) NOT NULL, + `modify_hp` tinyint(4) NOT NULL, + `modify_tp` tinyint(4) NOT NULL, + `modify_at` tinyint(4) NOT NULL, + `modify_df` tinyint(4) NOT NULL, + `modify_mat` tinyint(4) NOT NULL, + `modify_mdf` tinyint(4) NOT NULL, + `modify_act` tinyint(4) NOT NULL, + `move_cost` tinyint(3) unsigned NOT NULL, + `regist_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`costume_id`), + KEY `regist_time` (`regist_time`,`costume_id`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_eno_pno_link` ( + `eno` smallint(5) unsigned NOT NULL, + `pno` smallint(5) unsigned NOT NULL, + `regist_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`eno`,`regist_time`), + KEY `pno` (`pno`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_icon` ( + `icon_id` smallint(5) unsigned NOT NULL auto_increment, + `eno` smallint(5) unsigned NOT NULL, + `slot` tinyint(3) unsigned NOT NULL, + `icon_url` varchar(255) NOT NULL, + `icon_height` tinyint(3) unsigned NOT NULL, + `icon_width` tinyint(3) unsigned NOT NULL, + `update_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`icon_id`), + UNIQUE KEY `eno` (`eno`,`slot`,`update_time`), + KEY `update_time` (`update_time`,`eno`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_image` ( + `image_id` smallint(5) unsigned NOT NULL auto_increment, + `eno` smallint(5) unsigned NOT NULL, + `image_url` varchar(255) NOT NULL, + `image_height` smallint(5) unsigned NOT NULL, + `image_width` smallint(5) unsigned NOT NULL, + `image_link` varchar(255) NOT NULL, + `update_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`image_id`), + UNIQUE KEY `eno` (`eno`,`update_time`), + KEY `update_time` (`update_time`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_kind` ( + `kind_id` tinyint(3) unsigned NOT NULL auto_increment, + `kind_name` varchar(20) NOT NULL, + `kind_kind` tinyint(3) unsigned NOT NULL, + `weight` tinyint(3) unsigned NOT NULL, + PRIMARY KEY (`kind_id`), + UNIQUE KEY `kind_name` (`kind_name`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_learned_ability` ( + `eno` smallint(5) unsigned NOT NULL, + `ability_id` smallint(5) unsigned NOT NULL, + `regist_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`eno`,`ability_id`), + KEY `ability_id` (`ability_id`), + KEY `regist_time` (`regist_time`,`eno`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_learned_costume` ( + `eno` smallint(5) unsigned NOT NULL, + `costume_id` smallint(5) unsigned NOT NULL, + `costume_lv` tinyint(3) unsigned NOT NULL, + `costume_point` tinyint(3) unsigned NOT NULL, + `regist_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`eno`,`costume_id`), + KEY `costume_id` (`costume_id`), + KEY `regist_time` (`regist_time`,`eno`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_learned_skill` ( + `eno` smallint(5) unsigned NOT NULL, + `skill_id` smallint(5) unsigned NOT NULL, + `regist_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`eno`,`skill_id`), + KEY `skill_id` (`skill_id`), + KEY `regist_time` (`regist_time`,`eno`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_map` ( + `map_id` tinyint(3) unsigned NOT NULL, + `x` tinyint(4) NOT NULL, + `y` tinyint(4) NOT NULL, + `spot_id` tinyint(3) unsigned NOT NULL, + `update_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`map_id`,`x`,`y`,`update_time`), + KEY `spot_id` (`spot_id`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_map_cache` ( + `map_id` tinyint(3) unsigned NOT NULL, + `update_time` int(10) unsigned NOT NULL, + `map_range` varchar(255) NOT NULL, + `map_body` text NOT NULL, + PRIMARY KEY (`map_id`,`update_time`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_map_name` ( + `map_id` tinyint(3) unsigned NOT NULL, + `map_name` varchar(50) NOT NULL, + `base_spot` tinyint(3) unsigned NOT NULL, + PRIMARY KEY (`map_id`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_map_spot` ( + `spot_id` tinyint(3) unsigned NOT NULL auto_increment, + `spot_name` varchar(50) NOT NULL, + `description` text NOT NULL, + `regist_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`spot_id`), + UNIQUE KEY `spot_name` (`spot_name`), + KEY `regist_time` (`regist_time`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_race` ( + `race_id` tinyint(4) unsigned NOT NULL auto_increment, + `race_name` varchar(50) NOT NULL, + PRIMARY KEY (`race_id`), + UNIQUE KEY `race_name` (`race_name`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_skill` ( + `skill_id` smallint(5) unsigned NOT NULL, + `skill_name` varchar(50) NOT NULL, + `description` varchar(255) default NULL, + `range` tinyint(3) unsigned NOT NULL, + `target` tinyint(3) unsigned NOT NULL, + `kind` tinyint(3) unsigned NOT NULL, + `tp` smallint(5) unsigned NOT NULL, + `regist_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`skill_id`), + KEY `kind` (`kind`,`tp`), + KEY `regist_time` (`regist_time`,`kind`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_skill_element_link` ( + `skill_id` smallint(5) unsigned NOT NULL, + `element` tinyint(4) NOT NULL, + PRIMARY KEY (`skill_id`,`element`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_status` ( + `eno` smallint(5) unsigned NOT NULL, + `lv` tinyint(3) unsigned NOT NULL, + `life` smallint(5) unsigned NOT NULL, + `soul` smallint(5) unsigned NOT NULL, + `pow` smallint(5) unsigned NOT NULL, + `str` smallint(5) unsigned NOT NULL, + `dex` smallint(5) unsigned NOT NULL, + `speed` smallint(5) unsigned NOT NULL, + `mag` smallint(5) unsigned NOT NULL, + `reg` smallint(5) unsigned NOT NULL, + `con` smallint(5) unsigned NOT NULL, + `exp` smallint(5) unsigned NOT NULL, + `money` smallint(5) unsigned NOT NULL, + `sp` smallint(5) unsigned NOT NULL, + `base_hp` smallint(5) unsigned NOT NULL, + `base_at` smallint(5) unsigned NOT NULL, + `base_df` smallint(5) unsigned NOT NULL, + `base_mat` smallint(5) unsigned NOT NULL, + `base_mdf` smallint(5) unsigned NOT NULL, + `base_act` smallint(5) unsigned NOT NULL, + `base_move` smallint(5) unsigned NOT NULL, + `modify_hp` smallint(6) NOT NULL, + `modify_at` smallint(6) NOT NULL, + `modify_df` smallint(6) NOT NULL, + `modify_mat` smallint(6) NOT NULL, + `modify_mdf` smallint(6) NOT NULL, + `modify_act` smallint(6) NOT NULL, + `modify_move` smallint(6) NOT NULL, + `equip_hp` smallint(6) NOT NULL, + `equip_at` smallint(6) NOT NULL, + `equip_df` smallint(6) NOT NULL, + `equip_mat` smallint(6) NOT NULL, + `equip_mdf` smallint(6) NOT NULL, + `equip_act` smallint(6) NOT NULL, + `equip_move` smallint(6) NOT NULL, + PRIMARY KEY (`eno`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_target` ( + `target_id` tinyint(3) unsigned NOT NULL auto_increment, + `target_name` varchar(10) NOT NULL, + `point` varchar(40) NOT NULL, + PRIMARY KEY (`target_id`), + UNIQUE KEY `target_name` (`target_name`) +) ENGINE=MyISAM; + +CREATE TABLE `{prefix}_{dirname}_update` ( + `update_time` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`update_time`) +) ENGINE=MyISAM; diff --git a/trust_path/modules/sd2nd/templates/sd2nd_ability_list.html b/trust_path/modules/sd2nd/templates/sd2nd_ability_list.html new file mode 100644 index 0000000..74d2ef9 --- /dev/null +++ b/trust_path/modules/sd2nd/templates/sd2nd_ability_list.html @@ -0,0 +1,48 @@ +

<{$smarty.const._MD_SD2ND_LANG_ABILITY_LIST}>

+

<{$smarty.const._MD_SD2ND_MES_ABILITY_LIST}>

+ +
+
+ + : + + : + + +
+
+ +<{if count($objects) > 0}> + + + + + + + + + + + + <{foreach from=$objects item=obj}> + + + + + + + <{/foreach}> + +
IDNameDescriptionCost
<{$obj->getShow('ability_id')}><{$obj->getShow('ability_name')}><{$obj->getShow('description')}><{$obj->getShow('ability_cost')}>
+ +<{/if}> \ No newline at end of file diff --git a/trust_path/modules/sd2nd/templates/sd2nd_active_ability_list.html b/trust_path/modules/sd2nd/templates/sd2nd_active_ability_list.html new file mode 100644 index 0000000..2f1ee39 --- /dev/null +++ b/trust_path/modules/sd2nd/templates/sd2nd_active_ability_list.html @@ -0,0 +1,38 @@ +

<{$smarty.const._MD_SD2ND_LANG_ACTIVE_ABILITY_LIST}>

+

<{$smarty.const._MD_SD2ND_MES_ACTIVE_ABILITY_LIST}>

+
+
+ + + +
+
+ +<{if count($objects) > 0}> + + + + + + + + + + + + + + <{foreach from=$objects item=obj}> + + + + + + + + + <{/foreach}> + +
<{$smarty.const._MD_SD2ND_LANG_FULL_NAME}><{$smarty.const._MD_SD2ND_LANG_SLOT}>1<{$smarty.const._MD_SD2ND_LANG_SLOT}>2<{$smarty.const._MD_SD2ND_LANG_SLOT}>3<{$smarty.const._MD_SD2ND_LANG_SLOT}>4<{$smarty.const._MD_SD2ND_LANG_SLOT}>5
<{$obj->getShow('name')}> (<{$obj->getShow('eno')}>)<{$obj->getShow('slot1')}><{$obj->getShow('slot2')}><{$obj->getShow('slot3')}><{$obj->getShow('slot4')}><{$obj->getShow('slot5')}>
+ +<{/if}> diff --git a/trust_path/modules/sd2nd/templates/sd2nd_costume_list.html b/trust_path/modules/sd2nd/templates/sd2nd_costume_list.html new file mode 100644 index 0000000..423f08e --- /dev/null +++ b/trust_path/modules/sd2nd/templates/sd2nd_costume_list.html @@ -0,0 +1,70 @@ +

<{$smarty.const._MD_SD2ND_LANG_COSTUME_LIST}>

+

<{$smarty.const._MD_SD2ND_MES_COSTUME_LIST}>

+ +
+
+ + + +
+
+ +<{if count($objects) > 0}> + + + + + + + + + + + + + + + + + + + + + + + + + + + <{foreach from=$objects item=obj}> + + + + + + + + + + + + + + + + + + + + + + <{/foreach}> + +
<{$smarty.const._MD_SD2ND_LANG_COSTUME_ID}><{$smarty.const._MD_SD2ND_LANG_COSTUME_NAME}><{$smarty.const._MD_SD2ND_LANG_GROW_LIFE}><{$smarty.const._MD_SD2ND_LANG_GROW_SOUL}><{$smarty.const._MD_SD2ND_LANG_GROW_POW}><{$smarty.const._MD_SD2ND_LANG_GROW_STR}><{$smarty.const._MD_SD2ND_LANG_GROW_DEX}><{$smarty.const._MD_SD2ND_LANG_GROW_SPEED}><{$smarty.const._MD_SD2ND_LANG_GROW_MAG}><{$smarty.const._MD_SD2ND_LANG_GROW_REG}><{$smarty.const._MD_SD2ND_LANG_GROW_CON}><{$smarty.const._MD_SD2ND_LANG_MODIFY_HP}><{$smarty.const._MD_SD2ND_LANG_MODIFY_TP}><{$smarty.const._MD_SD2ND_LANG_MODIFY_AT}><{$smarty.const._MD_SD2ND_LANG_MODIFY_DF}><{$smarty.const._MD_SD2ND_LANG_MODIFY_MAT}><{$smarty.const._MD_SD2ND_LANG_MODIFY_MDF}><{$smarty.const._MD_SD2ND_LANG_MODIFY_ACT}><{$smarty.const._MD_SD2ND_LANG_MOVE_COST}>
<{$obj->getShow('costume_id')}><{$obj->getShow('costume_name')}><{$obj->getShow('grow_life')}><{$obj->getShow('grow_soul')}><{$obj->getShow('grow_pow')}><{$obj->getShow('grow_str')}><{$obj->getShow('grow_dex')}><{$obj->getShow('grow_speed')}><{$obj->getShow('grow_mag')}><{$obj->getShow('grow_reg')}><{$obj->getShow('grow_con')}><{$obj->getShow('modify_hp')}><{$obj->getShow('modify_tp')}><{$obj->getShow('modify_at')}><{$obj->getShow('modify_df')}><{$obj->getShow('modify_mat')}><{$obj->getShow('modify_mdf')}><{$obj->getShow('modify_act')}><{$obj->getShow('move_cost')}>
+ +<{/if}> diff --git a/trust_path/modules/sd2nd/templates/sd2nd_index.html b/trust_path/modules/sd2nd/templates/sd2nd_index.html new file mode 100644 index 0000000..7649254 --- /dev/null +++ b/trust_path/modules/sd2nd/templates/sd2nd_index.html @@ -0,0 +1,21 @@ +

<{$smarty.const._MD_SD2ND_LANG_MAP}>

+ +

<{$smarty.const._MD_SD2ND_LANG_PERSONAL}>

+
+
<{$smarty.const._MD_SD2ND_LANG_ACTIVE_ABILITY_LIST}>
+
<{$smarty.const._MD_SD2ND_INFO_ACTIVE_ABILITY_LIST}>
+
<{$smarty.const._MD_SD2ND_LANG_LEARNED_ABILITY_LIST}>
+
<{$smarty.const._MD_SD2ND_INFO_LEARNED_ABILITY_LIST}>
+
<{$smarty.const._MD_SD2ND_LANG_LEARNED_SKILL_LIST}>
+
<{$smarty.const._MD_SD2ND_INFO_LEARNED_SKILL_LIST}>
+
+ +

<{$smarty.const._MD_SD2ND_LANG_GENERAL}>

+
+
<{$smarty.const._MD_SD2ND_LANG_ABILITY_LIST}>
+
<{$smarty.const._MD_SD2ND_INFO_ABILITY_LIST}>
+
<{$smarty.const._MD_SD2ND_LANG_COSTUME_LIST}>
+
<{$smarty.const._MD_SD2ND_INFO_COSTUME_LIST}>
+
<{$smarty.const._MD_SD2ND_LANG_SKILL_LIST}>
+
<{$smarty.const._MD_SD2ND_INFO_SKILL_LIST}>
+
diff --git a/trust_path/modules/sd2nd/templates/sd2nd_learned_ability_list.html b/trust_path/modules/sd2nd/templates/sd2nd_learned_ability_list.html new file mode 100644 index 0000000..bc4a778 --- /dev/null +++ b/trust_path/modules/sd2nd/templates/sd2nd_learned_ability_list.html @@ -0,0 +1,19 @@ +

<{$smarty.const._MD_SD2ND_LANG_LEARNED_ABILITY_LIST}>

+

<{$smarty.const._MD_SD2ND_MES_LEARNED_ABILITY_LIST}>

+
+
+ + + +
+
+ +<{if count($objects) > 0}> + + + +<{/if}> diff --git a/trust_path/modules/sd2nd/templates/sd2nd_learned_skill_list.html b/trust_path/modules/sd2nd/templates/sd2nd_learned_skill_list.html new file mode 100644 index 0000000..17b237c --- /dev/null +++ b/trust_path/modules/sd2nd/templates/sd2nd_learned_skill_list.html @@ -0,0 +1,19 @@ +

<{$smarty.const._MD_SD2ND_LANG_LEARNED_SKILL_LIST}>

+

<{$smarty.const._MD_SD2ND_MES_LEARNED_SKILL_LIST}>

+
+
+ + + +
+
+ +<{if count($objects) > 0}> + + + +<{/if}> diff --git a/trust_path/modules/sd2nd/templates/sd2nd_map_view.html b/trust_path/modules/sd2nd/templates/sd2nd_map_view.html new file mode 100644 index 0000000..f39f0be --- /dev/null +++ b/trust_path/modules/sd2nd/templates/sd2nd_map_view.html @@ -0,0 +1,30 @@ +

<{$smarty.const._MD_SD2ND_LANG_MAP}> » <{$mapName->getShow('map_name')}>

+ +
+
+ + Type : + Date : + +
+
+ + + + <{foreach from=$map item=spot}> + + <{if $map->isMaxX() && !$map->isMaxY()}> + + + <{/if}> + <{/foreach}> + +
<{$spot->getShow('spot_name')}>(<{$map->getDistance()}>)
\ No newline at end of file diff --git a/trust_path/modules/sd2nd/templates/sd2nd_skill_list.html b/trust_path/modules/sd2nd/templates/sd2nd_skill_list.html new file mode 100644 index 0000000..13894f2 --- /dev/null +++ b/trust_path/modules/sd2nd/templates/sd2nd_skill_list.html @@ -0,0 +1,73 @@ +

<{$smarty.const._MD_SD2ND_LANG_SKILL_LIST}>

+

<{$smarty.const._MD_SD2ND_MES_SKILL_LIST}>

+ +
+
+ + : + + : + + : + + : + + +
+
+ +<{if count($objects) > 0}> + + + + + + + + + + + + + + <{foreach from=$objects item=obj}> + + + + + + + + + + + <{/foreach}> + +
<{$smarty.const._MD_SD2ND_LANG_HP}><{$smarty.const._MD_SD2ND_LANG_NAME}><{$smarty.const._MD_SD2ND_LANG_DESC}><{$smarty.const._MD_SD2ND_LANG_RANGE}><{$smarty.const._MD_SD2ND_LANG_TARGET}><{$smarty.const._MD_SD2ND_LANG_ELEMENT}><{$smarty.const._MD_SD2ND_LANG_KIND}><{$smarty.const._MD_SD2ND_LANG_TP}>
<{$obj->getShow('skill_id')}><{$obj->getShow('skill_name')}><{$obj->getShow('description')}><{$obj->getShow('range')}><{$targetHandler->convertToView($obj->get('target'))}> + <{foreach from=$obj->getElements() item=elem}> + <{$elementLinkHandler->convertToView($elem)}> + <{/foreach}> + <{$kindHandler->convertToView($obj->get('kind'))}><{$obj->getShow('tp')}>
+ +<{/if}> \ No newline at end of file diff --git a/trust_path/modules/sd2nd/update.php b/trust_path/modules/sd2nd/update.php new file mode 100644 index 0000000..05c1113 --- /dev/null +++ b/trust_path/modules/sd2nd/update.php @@ -0,0 +1,38 @@ +mController->executeCommonSubset(); +$root->mController->_setupLanguage(); +require_once XOOPS_ROOT_PATH . '/preload/lib/mydebugutils/htrace.php'; +require_once SD2ND_TRUST_PATH . '/class/AssetManager.class.php'; +require_once SD2ND_TRUST_PATH . '/class/updater/Sd2ndUpdater.class.php'; +require_once SD2ND_TRUST_PATH . '/language/japanese/main.php'; + +$updater = new Sd2nd_Updater($argv[1]); +$updater->prepare(); +$updater->execute(); +$updater->dispose(); + +file_put_contents(SD2ND_TRUST_PATH . '/class/updater/backup/queries.txt',var_export($root->mController->mLogger->queries,true)); + +?> diff --git a/trust_path/modules/sd2nd/xoops_version.php b/trust_path/modules/sd2nd/xoops_version.php new file mode 100644 index 0000000..023fca2 --- /dev/null +++ b/trust_path/modules/sd2nd/xoops_version.php @@ -0,0 +1,181 @@ + array( + 'class' => 'Installer', + 'namespace' => 'Sd2nd', + 'filepath' => SD2ND_TRUST_PATH . '/admin/class/installer/Sd2ndInstaller.class.php' + ), + 'uninstaller' => array( + 'class' => 'Uninstaller', + 'namespace' => 'Sd2nd', + 'filepath' => SD2ND_TRUST_PATH . '/admin/class/installer/Sd2ndUninstaller.class.php' + ), + 'updater' => array( + 'class' => 'Updater', + 'namespace' => 'Sd2nd', + 'filepath' => SD2ND_TRUST_PATH . '/admin/class/installer/Sd2ndUpdater.class.php' + ) +); +$modversion['disable_legacy_2nd_installer'] = false; + +$modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; +$modversion['tables'] = array( +// '{prefix}_{dirname}_xxxx', + '{prefix}_{dirname}_ability', + '{prefix}_{dirname}_active_ability', + '{prefix}_{dirname}_char', + '{prefix}_{dirname}_costume', + '{prefix}_{dirname}_eno_pno_link', + '{prefix}_{dirname}_icon', + '{prefix}_{dirname}_image', + '{prefix}_{dirname}_kind', + '{prefix}_{dirname}_learned_ability', + '{prefix}_{dirname}_learned_costume', + '{prefix}_{dirname}_learned_skill', + '{prefix}_{dirname}_map', + '{prefix}_{dirname}_map_cache', + '{prefix}_{dirname}_map_name', + '{prefix}_{dirname}_map_spot', + '{prefix}_{dirname}_race', + '{prefix}_{dirname}_skill', + '{prefix}_{dirname}_skill_element_link', + '{prefix}_{dirname}_status', + '{prefix}_{dirname}_target', + '{prefix}_{dirname}_update', +##[cubson:tables] +##[/cubson:tables] +); + +// +// Templates. You must never change [cubson] chunk to get the help of cubson. +// +$modversion['templates'] = array( +/* + array( + 'file' => '{dirname}_xxx.html', + 'description' => _MI_SD2ND_TPL_XXX + ), +*/ +##[cubson:templates] + array('file' => '{dirname}_index.html','description' => _MI_SD2ND_TPL_INDEX), + array('file' => '{dirname}_map_view.html','description' => _MI_SD2ND_TPL_MAP_VIEW), + array('file' => '{dirname}_active_ability_list.html','description' => _MI_SD2ND_TPL_ACTIVE_ABILITY_LIST), + array('file' => '{dirname}_learned_ability_list.html','description' => _MI_SD2ND_TPL_LEARNED_ABILITY_LIST), + array('file' => '{dirname}_learned_skill_list.html','description' => _MI_SD2ND_TPL_LEARNED_SKILL_LIST), + array('file' => '{dirname}_learned_costume_list.html','description' => _MI_SD2ND_TPL_LEARNED_COSTUME_LIST), + array('file' => '{dirname}_ability_list.html','description' => _MI_SD2ND_TPL_ABILITY_LIST), + array('file' => '{dirname}_costume_list.html','description' => _MI_SD2ND_TPL_COSTUME_LIST), + array('file' => '{dirname}_skill_list.html','description' => _MI_SD2ND_TPL_SKILL_LIST), +##[/cubson:templates] +); + +// +// Admin panel setting +// +$modversion['hasAdmin'] = 1; +$modversion['adminindex'] = 'admin/index.php'; +$modversion['adminmenu'] = array( +/* + array( + 'title' => _MI_SD2ND_LANG_XXXX, + 'link' => 'admin/index.php?action=xxx', + 'keywords' => _MI_SD2ND_KEYWORD_XXX, + 'show' => true, + 'absolute' => false + ), +*/ +##[cubson:adminmenu] +##[/cubson:adminmenu] +); + +// +// Public side control setting +// +$modversion['hasMain'] = 1; +$modversion['hasSearch'] = 0; +$modversion['sub'] = array( +/* + array( + 'name' => _MI_SD2ND_LANG_SUB_XXX, + 'url' => 'index.php?action=XXX' + ), +*/ +##[cubson:submenu] +##[/cubson:submenu] +); + +// +// Config setting +// +$modversion['config'] = array( +/* + array( + 'name' => 'xxxx', + 'title' => '_MI_SD2ND_TITLE_XXXX', + 'description' => '_MI_SD2ND_DESC_XXXX', + 'formtype' => 'xxxx', + 'valuetype' => 'xxx', + 'options' => array(xxx => xxx,xxx => xxx), + 'default' => 0 + ), +*/ +##[cubson:config] +##[/cubson:config] +); + +// +// Block setting +// +$modversion['blocks'] = array( +/* + x => array( + 'func_num' => x, + 'file' => 'xxxBlock.class.php', + 'class' => 'xxx', + 'name' => _MI_SD2ND_BLOCK_NAME_xxx, + 'description' => _MI_SD2ND_BLOCK_DESC_xxx, + 'options' => '', + 'template' => '{dirname}_block_xxx.html', + 'show_all_module' => true, + 'visible_any' => true + ), +*/ +##[cubson:block] +##[/cubson:block] +); + +?> -- 2.11.0