Compare commits
558 Commits
Author | SHA1 | Date |
---|---|---|
tix | 96cf0ccbe3 | |
cuixin | 1edcad768a | |
cuixin | 79afbe5284 | |
cuixin | 200826c2f4 | |
wlx | a1bd57d1ae | |
wlx | 36d97225c0 | |
wlx | 4d46ed2b6c | |
wlx | fe43e2fddd | |
wlx | 947342139c | |
wlx | 6625591866 | |
wlx | e8b8e1fdb4 | |
wlx | 836caaf556 | |
wlx | 7a262c4972 | |
wlx | fdec34d71c | |
Li Heng | f5f610e649 | |
Li Heng | 2fd408d420 | |
wlx | 0723520d72 | |
wlx | b355511a2e | |
wlx | e809f9e27f | |
wlx | 8342437350 | |
Li Jianxuan | bcc7146f81 | |
Li Heng | 04064a2030 | |
wlx | 576b389bfa | |
wlx | 2d46a2be15 | |
wlx | fc16907197 | |
wlx | 61c4ead29c | |
Li Jianxuan | 0526231290 | |
Li Heng | e8df736d40 | |
wlx | 23dcdc035b | |
wlx | b23ed6614d | |
wlx | 53c01a9568 | |
wlx | 02e25a420b | |
wlx | 2e4cb25293 | |
wlx | e8bdd36d0c | |
wlx | fc2cb61d8e | |
Li Heng | c49cc92175 | |
wlx | 838c4c295d | |
wlx | 64257824fa | |
wlx | 12cfacdb9f | |
wlx | 482f3896df | |
wlx | 8facb0cc68 | |
wlx | 4e389f5c77 | |
wlx | 471066a15a | |
wlx | cea0a78962 | |
wlx | 433c44e40d | |
wlx | 91e1c0e007 | |
wlx | 471e0627f0 | |
wlx | c9fac5f258 | |
wlx | f231426111 | |
wlx | 5421a8ff06 | |
wlx | 0823cf40ed | |
wlx | 3b2258357f | |
wlx | 6e9b2c81cc | |
wlx | efc508c58c | |
wlx | 295728d7ff | |
wlx | 265f09bb4d | |
wlx | facbc0d5c4 | |
wlx | 9d5c2d0c07 | |
wlx | 8271f7c4cb | |
wlx | 3e9b768363 | |
Li Heng | 4e59336d25 | |
Li Heng | 29e28b0be7 | |
wlx | 94b5d380c1 | |
wlx | b99163381f | |
wlx | 42a580e0c3 | |
wlx | 288e64e0fc | |
wlx | e85fd5bf7d | |
wlx | 83c650c537 | |
wlx | 60688ab09b | |
wlx | 62a1eba0e6 | |
wlx | 0bbdb6aa52 | |
wlx | 7f413f89eb | |
wlx | a43b45863d | |
wlx | 83a42c50b8 | |
wlx | 707f2a85e3 | |
Li Heng | 5fa96f8825 | |
Li Heng | 0d945c622a | |
Li Heng | 1f3ae1b0c9 | |
wlx | b7b93a5781 | |
wlx | 95f552bd3b | |
wlx | 901aeb4b5b | |
Li Heng | 4f0e4d3bdd | |
Li Heng | ac8d372f4d | |
Li Heng | 28832cdf99 | |
Li Heng | a2673e8c03 | |
wlx | c3130aa71d | |
wlx | 1a1e4bbfaf | |
Li Jianxuan | 70778573d2 | |
Li Jianxuan | 13e5e6be9b | |
Li Heng | 47f3b3d828 | |
wlx | bfe1464b19 | |
wlx | abbb3aa75a | |
wlx | 4e0b1e7286 | |
wlx | c76f5eb05e | |
Li Heng | 1d054a4f1f | |
wlx | 9dbdafb208 | |
wlx | 8ec8044501 | |
Li Jianxuan | 775b0ee360 | |
wlx | 29604ab761 | |
wlx | 557e119806 | |
wlx | aea1b81207 | |
wlx | ad966c6851 | |
wlx | 5259a56a9f | |
Li Jianxuan | 40f2fc8d04 | |
Li Heng | d928c3f573 | |
Li Heng | 51cbbdd51b | |
wlx | e0fbdda367 | |
wlx | 12d40fc049 | |
Li Jianxuan | 5e61c301b7 | |
Li Heng | 044acaf849 | |
wlx | a3d2103fdc | |
wlx | 0fe53a674b | |
wlx | 47f6483e69 | |
wlx | fb0bfea245 | |
wlx | 75ae4ff252 | |
wlx | 66032ef2f5 | |
wlx | 8cd438a3f2 | |
wlx | 50d118b386 | |
wlx | f3bee97f82 | |
wlx | 9bb1bc9ad8 | |
wlx | 0dee17f92b | |
wlx | b6d34f1b43 | |
wlx | 4bf466aa58 | |
Li Jianxuan | f86001f75d | |
wlx | 5791184f19 | |
wlx | 417e587dbc | |
wlx | 153a43956e | |
wlx | a6035e7f60 | |
wlx | b7f440a98f | |
Li Jianxuan | dac5f6c791 | |
wlx | 7c9568a01c | |
Li Jianxuan | 85fd4c182c | |
Li Jianxuan | 3af42da773 | |
wlx | dd8e2cf9f3 | |
wlx | 239554b3ac | |
Li Heng | 4a492a9589 | |
wlx | 4d3bfa4444 | |
wlx | 6b4682325f | |
wlx | 76c6725159 | |
Li Jianxuan | 97402e262d | |
wlx | 0eeba0747c | |
wlx | c06a5d8508 | |
wlx | 5474d5e018 | |
Li Jianxuan | 4b7e774867 | |
wlx | 47880eab18 | |
Li Jianxuan | f0f0e639b5 | |
wlx | a7b9e63e70 | |
Li Heng | 3231524aa1 | |
wlx | 04ebe29d8d | |
wlx | 90b75f1495 | |
wlx | 6665c20700 | |
wlx | 0b9de786bb | |
wlx | e24d2472b6 | |
Li Heng | bb5a48cd6d | |
Li Heng | f634a217a5 | |
wlx | 18e4f5ab5a | |
wlx | 9a2b70f1a9 | |
wlx | f7d88d414b | |
wlx | f8105975b1 | |
wlx | 1a23c89ec2 | |
wlx | 69e31efafc | |
wlx | ec3c7068c8 | |
wlx | 610ebbe454 | |
wlx | e5a58d91bb | |
wlx | 929ea3b114 | |
wlx | 6571f575c4 | |
wlx | a254e495ca | |
wlx | 44119d6412 | |
wlx | a119f356b9 | |
wlx | ab25f11718 | |
wlx | fc2a1ac56e | |
wlx | 0848fcb69b | |
wlx | d75be5b0c8 | |
wlx | 2a73b322c6 | |
wlx | 24cddfc4e8 | |
wlx | bab967037d | |
wlx | b438c42213 | |
wlx | 84e4ba6bb4 | |
Li Jianxuan | 1a6b0375a9 | |
wlx | f7fbbf4e64 | |
wlx | dd95c140b1 | |
Li Jianxuan | f82733a57b | |
wlx | 133566d9c2 | |
Li Jianxuan | 71fac4e412 | |
wlx | 4d8c3abbce | |
Li Heng | 5c945ea49d | |
Li Jianxuan | 308c247d0f | |
wlx | 660c208abc | |
wlx | af7cf44634 | |
wlx | 52983d4d4b | |
Li Heng | 0576ec8b2a | |
Li Heng | cdde57dfb5 | |
Li Heng | b5e8cf471c | |
Li Heng | 4e9dd4355e | |
Li Heng | e90c3d77ed | |
Li Heng | 85f9f5e45a | |
Li Heng | 44879890c8 | |
wlx | 00ba57a340 | |
Li Heng | 59a257112d | |
Li Heng | 61e5fa558c | |
Li Heng | ef5828b6d0 | |
Li Heng | 82f111497c | |
wlx | 62e03d6044 | |
wlx | ef303cd08a | |
wlx | 736cc6e3b7 | |
wlx | b55e23cf2e | |
wlx | b953c286fe | |
wlx | 1d71ee178c | |
Li Jianxuan | be99136c68 | |
Li Jianxuan | 4120cda7aa | |
Li Jianxuan | b9a9e44746 | |
Li Jianxuan | 12b8b26338 | |
Li Jianxuan | a8df49bff7 | |
Li Jianxuan | c986d6c535 | |
Li Jianxuan | 483da847cd | |
Li Jianxuan | c0703ccfa3 | |
Li Jianxuan | ae7ef85ae7 | |
Li Jianxuan | 8eda0c4498 | |
wlx | ef9948332e | |
wlx | f74c9bde98 | |
Li Jianxuan | 4381b008ae | |
wlx | 72c353f435 | |
wlx | 609e5713c4 | |
Li Jianxuan | 4678531450 | |
Li Heng | fa9e604755 | |
wlx | a14d2319d9 | |
Li Heng | 2b01533e75 | |
wlx | 45ed720fe3 | |
wlx | 54d6aa8f28 | |
wlx | 68e445d4ff | |
Li Jianxuan | 8d23d7c0c0 | |
wlx | d35547febf | |
wlx | 6618361e63 | |
wlx | 3f2aa11842 | |
wlx | 3ca3469e40 | |
wlx | 4a0307c1dd | |
wlx | 2225a3e7f6 | |
wlx | 4d99a64adf | |
wlx | c917703669 | |
wlx | 16a9e8aecd | |
wlx | ef5cab577b | |
Li Heng | aac03e6ea4 | |
Li Heng | 46e82a7b2d | |
wlx | d4a54cf5bb | |
wlx | 9a67a94fe1 | |
wlx | 3d12553c6d | |
wlx | fbcdd9b9cb | |
wlx | 325fa858e5 | |
wlx | 4100514816 | |
wlx | 06439a4300 | |
wlx | 7a44e38903 | |
wlx | 3db63caac9 | |
wlx | 6ffe628c27 | |
wlx | 7a9d11a977 | |
wlx | 8a4a5c4386 | |
wlx | a8f0424aa6 | |
wlx | 70eb46f541 | |
wlx | f99e98f2c7 | |
wlx | 334403081a | |
wlx | d57090d5bc | |
wlx | 6c3f3bf0c3 | |
wlx | 5f2f07207a | |
wlx | fbd1876e15 | |
Li Jianxuan | 622a0331a5 | |
wlx | 9818347102 | |
wlx | 8f8ffeee43 | |
Li Heng | b3b09c1839 | |
wlx | 9954be07f9 | |
wlx | 4f7a2765b3 | |
wlx | ed6d450d4a | |
Li Jianxuan | 3967c23ecb | |
Li Jianxuan | 7ccd999fd5 | |
Li Jianxuan | fd1a7260af | |
wlx | 8f8631ee2f | |
wlx | 2425f6304c | |
wlx | c9cead9996 | |
wlx | fffe4448c9 | |
wlx | 7871ebfb6a | |
wlx | 51f3adfa79 | |
wlx | 2c9632d841 | |
wlx | a4530e6e02 | |
wlx | fc2ffc188b | |
wlx | dd9a48ddd3 | |
wlx | 55df6a1352 | |
wlx | e553375dce | |
wlx | 4408b36c34 | |
Li Jianxuan | 124ad5263a | |
Li Jianxuan | 024cfaef59 | |
Li Jianxuan | 329a25b59e | |
Li Jianxuan | a6efab68c9 | |
Li Jianxuan | e2f2b2ae71 | |
Li Jianxuan | f6b1acc273 | |
Li Jianxuan | dd22a0fe70 | |
Li Jianxuan | 1822a361cf | |
Li Jianxuan | 0288b30ab6 | |
Li Jianxuan | a1f43ad574 | |
Li Heng | c6c7585269 | |
Li Heng | 985272db6a | |
Li Heng | ba94ea7b7f | |
Li Heng | 5529995c9c | |
Li Jianxuan | 1c6a36d638 | |
Li Jianxuan | 9a78f04113 | |
Li Jianxuan | b54c72b565 | |
Li Jianxuan | e8aba81d7d | |
Li Jianxuan | 9779a0bebe | |
Li Jianxuan | 920b71add7 | |
Li Jianxuan | c2225d4e21 | |
Li Jianxuan | 5483690395 | |
Li Heng | 543c8fcd2f | |
Li Jianxuan | 88e29d711e | |
Li Jianxuan | c0020d2aa1 | |
Li Jianxuan | d8b42ac090 | |
wlx | ac7245e603 | |
Li Jianxuan | 8d01826db3 | |
wlx | 72f4a0e09f | |
wlx | 7a6f34efcf | |
wlx | 02ae9b9d85 | |
Li Jianxuan | 7e6ad54e7f | |
Li Heng | 65fc779e54 | |
Li Heng | 1563870c5e | |
Li Heng | 2c50c49baf | |
Li Heng | 48d2740a4b | |
Li Jianxuan | 311d67e493 | |
Li Jianxuan | 8f208ef7c5 | |
wlx | 5ae05fb85d | |
Li Jianxuan | e6ed812e8d | |
Li Jianxuan | 2a37cec905 | |
Li Jianxuan | 35c0883355 | |
Li Jianxuan | eb98d79dfc | |
Li Jianxuan | 603dfd8781 | |
Li Jianxuan | 74a5e3f5fc | |
wlx | 580e97cc9d | |
Li Jianxuan | c0642c240a | |
Li Jianxuan | 6ab8c24f94 | |
Li Jianxuan | 0e11fd37d7 | |
Li Jianxuan | 580cc39411 | |
Li Jianxuan | dbe4d9d728 | |
Li Jianxuan | 608b8f29f4 | |
wlx | 1c3075584e | |
wlx | 6d5397273e | |
wlx | 1edecd120a | |
Li Jianxuan | 69d3a94ef8 | |
wlx | afd7f13418 | |
wlx | ff2c52cfeb | |
wlx | 5de71572bb | |
wlx | cd8fe1ca87 | |
wlx | 9512051737 | |
wlx | 2bc695660b | |
wlx | 1ccb1300b0 | |
Li Jianxuan | beb002b648 | |
wlx | 2ca99a2de3 | |
wlx | 1c147a88c2 | |
Li Jianxuan | 2eda702362 | |
wlx | 24f253c027 | |
wlx | 7a36469b62 | |
wlx | 7acc24754d | |
wlx | 98985efc84 | |
wlx | d7eec24005 | |
wlx | 9260c03a60 | |
wlx | 747b356901 | |
Li Jianxuan | 6cd975a861 | |
Li Jianxuan | 3ef2748dd1 | |
Li Jianxuan | 5d80b35553 | |
wlx | ed711d9a3b | |
Li Jianxuan | d007786fb1 | |
Li Jianxuan | cd2be09bf7 | |
Li Jianxuan | ff2f657cb6 | |
Li Jianxuan | 8c3d9cf760 | |
wlx | 3cd2e16766 | |
wlx | 3325569970 | |
wlx | 838afc1d5d | |
Li Jianxuan | 8d89e9f435 | |
Li Jianxuan | 6ae3223a84 | |
wlx | 075ff2b2c0 | |
wlx | fff01b40ce | |
wlx | e3a6acc635 | |
Li Jianxuan | 8e1db6cd3d | |
Li Jianxuan | c1f5c7de56 | |
wlx | 475f67534a | |
Li Jianxuan | 0e87bf7d35 | |
Li Jianxuan | 40547de3c7 | |
Li Jianxuan | 36a363c354 | |
Li Jianxuan | 2239dfc991 | |
wlx | f2836ea683 | |
wlx | 9a1a5d8f82 | |
wlx | 0a412c9aa4 | |
wlx | fcf96d5973 | |
Li Jianxuan | f31402c7be | |
Li Jianxuan | a83c3ee18f | |
Li Jianxuan | dacbff71c5 | |
Li Jianxuan | dc8074c1ac | |
wlx | a4f5c42739 | |
wlx | 3628ece4c1 | |
wlx | 4c95532808 | |
Li Jianxuan | 768eb4d5fc | |
Li Jianxuan | 9dbf7c54a2 | |
Li Jianxuan | 9f749c11f9 | |
Li Jianxuan | a3551b20e8 | |
wlx | 6330596132 | |
wlx | 31b5d91a3c | |
wlx | b3cb533382 | |
Li Jianxuan | dda5be5a23 | |
Li Jianxuan | 1f5cf9aca8 | |
wlx | 7be9301869 | |
wlx | b85c97ae82 | |
Li Jianxuan | 3acef46848 | |
Li Jianxuan | 4f6750c7d2 | |
wlx | 29557c14c1 | |
Li Jianxuan | f615c51fd0 | |
wlx | c30f1c6826 | |
Li Jianxuan | cacf667bb5 | |
Li Jianxuan | 4d259cd05b | |
Li Jianxuan | db7faba594 | |
Li Jianxuan | 3269c2fd8c | |
wlx | d5034346f3 | |
Li Jianxuan | f06a9ef590 | |
Li Jianxuan | c0a3ee9e35 | |
wlx | 3d90704b51 | |
Li Jianxuan | 4b98d2787f | |
wlx | 88c058854c | |
Li Jianxuan | e5172936f0 | |
Li Jianxuan | d978e0e8c7 | |
Li Jianxuan | e1f1a30f98 | |
wlx | e322e0cbe2 | |
Li Jianxuan | 8caeae6913 | |
Li Jianxuan | 7760e3fea6 | |
wlx | ef18c978fe | |
Li Jianxuan | 99088092ac | |
Li Jianxuan | 5d2010ba1d | |
wlx | 01f2117dbd | |
wlx | 2b8c958bfa | |
Li Jianxuan | b6bf8b1d40 | |
wlx | d5e1dbcbee | |
Li Jianxuan | 6a9bdd0109 | |
Li Jianxuan | 3f216e98bc | |
Li Jianxuan | 2c5a014a47 | |
Li Jianxuan | 60da9b5ea6 | |
Li Jianxuan | 737a967a51 | |
Li Jianxuan | 8ab7186eab | |
Li Jianxuan | 579a204c0f | |
wlx | 3f303c9b10 | |
wlx | 7aafcc16d1 | |
wlx | b918763486 | |
wlx | 9a72b44369 | |
wlx | 10937d4d0d | |
wlx | 512ec4b98c | |
wlx | 0fc75d13f5 | |
Li Jianxuan | 3edc580c14 | |
wlx | f78bc77e7f | |
Li Jianxuan | 1118dca7ce | |
Li Jianxuan | 31cd51a825 | |
Li Jianxuan | d7d7037a24 | |
Li Jianxuan | cd2c1c831e | |
wlx | 7010683a9d | |
wlx | 39720be5ad | |
wlx | 74ed000c6c | |
wlx | 7a3dcab48c | |
wlx | f89fd45706 | |
wlx | d5312fe506 | |
wlx | 19ac21f7c2 | |
wlx | 77efed4024 | |
wlx | 32b2d59015 | |
wlx | c653459536 | |
Li Jianxuan | 013b2cdb32 | |
Li Jianxuan | 68004bd83e | |
Li Jianxuan | 1cbbb12f8f | |
wlx | 1fbbafd719 | |
Li Jianxuan | a47bdff70b | |
Li Jianxuan | ac3a194a34 | |
wlx | 35ede84804 | |
Li Jianxuan | 9ed360237c | |
Li Jianxuan | 256c4a3bc9 | |
Li Jianxuan | 03ca27e589 | |
wlx | b63ab17ab3 | |
wlx | a1d032b371 | |
Li Jianxuan | e5cde968b7 | |
Li Jianxuan | 0e4e1111f5 | |
Li Jianxuan | 3ae66dd5fb | |
wlx | 9f7b4ff0f9 | |
Li Jianxuan | 232a08eeb2 | |
Li Jianxuan | b2b627c8db | |
Li Jianxuan | e93fe95ed6 | |
Li Jianxuan | b0cb441d47 | |
wlx | e73480fb38 | |
Li Jianxuan | b2a756cd87 | |
Li Jianxuan | c5503be20a | |
Li Jianxuan | 3e881ec267 | |
Li Jianxuan | 7b150ee8ac | |
Li Jianxuan | 14c012c78f | |
Li Jianxuan | 04dbd9eeb9 | |
Li Jianxuan | 3f4c945dbf | |
Li Jianxuan | b062e86e04 | |
Li Jianxuan | 48ea533412 | |
Li Jianxuan | dc7be636fa | |
Li Jianxuan | 7c131daf89 | |
Li Jianxuan | 6152c36246 | |
Li Jianxuan | f66616d0dc | |
Li Jianxuan | 643ccaad7a | |
Li Jianxuan | 849918408b | |
wlx | 8329e665a8 | |
Li Jianxuan | 9552d51276 | |
Li Jianxuan | 7c6f3e3f0c | |
Li Jianxuan | a9a92ffacb | |
Li Jianxuan | c4effc6c45 | |
Li Jianxuan | 644baf0a20 | |
Li Jianxuan | 87f2aaa67d | |
Li Jianxuan | e4ef7119fb | |
Li Jianxuan | 5848e2206d | |
Li Jianxuan | 6c21107cc7 | |
Li Jianxuan | f217f41059 | |
Li Jianxuan | 1353d1753c | |
Li Jianxuan | 3f896af13f | |
Li Jianxuan | b1abdbf7e9 | |
Li Jianxuan | 53c820faa0 | |
Li Jianxuan | eac0d60036 | |
Li Jianxuan | 7fe66c8b4b | |
Li Jianxuan | d33d9934be | |
wlx | 5bf297cb14 | |
wlx | 7df336092d | |
Li Jianxuan | 77c95fde76 | |
Li Jianxuan | a0c8be3a73 | |
wlx | 57990bcd4a | |
Li Jianxuan | a7462e4921 | |
wlx | 8eee6b352a | |
wlx | 985120fe69 | |
wlx | 0cfab6f6aa | |
Li Jianxuan | 4d78dbd2ff | |
Li Jianxuan | 0a2f5cc4d1 | |
wlx | b7b62a9960 | |
wlx | b71f0c79e9 | |
wlx | 7f529491da | |
Li Jianxuan | 27082e4a26 | |
Li Jianxuan | 3f3198b355 | |
Li Jianxuan | e393f8085a | |
Li Jianxuan | c94f452eb6 | |
Li Jianxuan | 68d6f6a0bd | |
wlx | ff27b69a51 | |
wlx | 92971d651f | |
wlx | 36ab07c9ea | |
wlx | d9d6177a91 | |
wlx | 734327fa82 | |
wlx | d8d1eb9135 | |
Li Jianxuan | 790922246b | |
wlx | bf2e91f2c7 | |
wlx | 196db663b2 | |
wlx | 56fc5d0b13 | |
wlx | 2d4c668c88 | |
Li Jianxuan | 4e1b6e8241 | |
wlx | 065d5988cf | |
wlx | 2c474145f5 | |
wlx | 2b369ef8c2 | |
wlx | 2034f79a65 | |
wlx | 0281f7f1b1 | |
Li Jianxuan | 97b8d9292f | |
wlx | 7ec4679db8 | |
wlx | 7e77feb16d | |
wlx | bec46a5b16 | |
wlx | bbbe84061c |
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
use Helpers\View as view;
|
||||||
|
use Files\Files;
|
||||||
|
use Files\Output;
|
||||||
|
use Files\Listener\FileListener;
|
||||||
|
use Order\Manager\Offlineapp;
|
||||||
|
use Order\Manager\Application;
|
||||||
|
use data\DataService;
|
||||||
|
use Mail\Mail;
|
||||||
|
|
||||||
class Admin_DownController extends Zend_Controller_Action
|
class Admin_DownController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
function preDispatch()
|
function preDispatch()
|
||||||
|
@ -8,6 +17,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||||
$this->view->messages = $this->messenger->getMessages();
|
$this->view->messages = $this->messenger->getMessages();
|
||||||
$this->_helper->layout->setLayout('administry');
|
$this->_helper->layout->setLayout('administry');
|
||||||
|
$this->view->Theme = new Theme();
|
||||||
}
|
}
|
||||||
function postDispatch()
|
function postDispatch()
|
||||||
{
|
{
|
||||||
|
@ -21,6 +31,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
//离线数据申请管理
|
//离线数据申请管理
|
||||||
function offlineappAction()
|
function offlineappAction()
|
||||||
{
|
{
|
||||||
|
set_time_limit(0);
|
||||||
include_once("Dataorder.php");
|
include_once("Dataorder.php");
|
||||||
$DO = new Dataorder($this->db);
|
$DO = new Dataorder($this->db);
|
||||||
|
|
||||||
|
@ -32,7 +43,23 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$page =(int)$this->_getParam('page');
|
$page =(int)$this->_getParam('page');
|
||||||
$reset =(int)$this->_getParam('reset');
|
$reset =(int)$this->_getParam('reset');
|
||||||
$status =(int)$this->_getParam('status');
|
$status =(int)$this->_getParam('status');
|
||||||
|
$ac = $this->_getParam('ac');
|
||||||
$q = $this->_getParam('q');
|
$q = $this->_getParam('q');
|
||||||
|
$submd=$this->view->config->sub->metadata;
|
||||||
|
|
||||||
|
if($ac == "pending")
|
||||||
|
{
|
||||||
|
$keyword = "";
|
||||||
|
if(!empty($q))
|
||||||
|
{
|
||||||
|
$keyword = $q;
|
||||||
|
}
|
||||||
|
|
||||||
|
$rows = $DO->fetchAllOfflineApp(3,$keyword);
|
||||||
|
|
||||||
|
view::addPaginator($rows,$this,10);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!$page) $page=1;
|
if (!$page) $page=1;
|
||||||
if ($view) {
|
if ($view) {
|
||||||
|
@ -61,12 +88,20 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($row['email']);
|
$mail->addTo($row['email']);
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
|
|
||||||
$sql="select pdflink from offlineapp where id=?";
|
//如果是wsn数据则生成数据
|
||||||
|
$dataservice = new DataService();
|
||||||
|
$offlineapp = new Offlineapp();
|
||||||
|
if ($offlineapp->hasWsnData($start))
|
||||||
|
{
|
||||||
|
@$dataservice->makeWsnData(array('uid'=>$row['userid'],'action'=>'prepare'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql="select applicationform as pdflink from offlineapp where id=?";
|
||||||
$row=$this->db->fetchRow($sql,array($start));
|
$row=$this->db->fetchRow($sql,array($start));
|
||||||
$filecontent=file_get_contents($this->view->config->offline->savepath."/".$row['pdflink']);
|
$filecontent=file_get_contents($row['pdflink']);
|
||||||
|
|
||||||
//对每条数据的管理员用户发送相应的邮件通知,同一用户的邮件需要合并
|
//对每条数据的管理员用户发送相应的邮件通知,同一用户的邮件需要合并
|
||||||
//需要取出对应数据的标题、uuid,以及对应的作者的email(一条数据可能有多个作者,一次申请可能有多条数据对应同一个作者)
|
//需要取出对应数据的标题、uuid,以及对应的作者的email(一条数据可能有多个作者,一次申请可能有多条数据对应同一个作者)
|
||||||
|
@ -91,12 +126,12 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-subject',array('user'=>$username,'datalist'=>$data,'source'=>$source));
|
$mailtp=new EmailText($this->db,'offline-start-subject',array('user'=>$username,'datalist'=>$data,'source'=>$source));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail_addrs=explode(",",substr($tmp_email,1,-1));
|
$mail_addrs=explode(",",substr($tmp_email,1,-1));
|
||||||
$mail->addTo($mail_addrs);
|
$mail->addTo($mail_addrs);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
$data="";
|
$data="";
|
||||||
|
@ -115,12 +150,12 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data,'source'=>$source));
|
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data,'source'=>$source));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail_addrs=explode(",",substr($tmp_email,1,-1));
|
$mail_addrs=explode(",",substr($tmp_email,1,-1));
|
||||||
$mail->addTo($mail_addrs);
|
$mail->addTo($mail_addrs);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
}
|
}
|
||||||
|
@ -144,11 +179,11 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
|
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($tmp_email);
|
$mail->addTo($tmp_email);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
$data="";
|
$data="";
|
||||||
|
@ -168,11 +203,11 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
|
$mailtp=new EmailText($this->db,'offline-start-author',array('user'=>$username,'datalist'=>$data));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($tmp_email);
|
$mail->addTo($tmp_email);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
}
|
}
|
||||||
|
@ -196,15 +231,15 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-dcadmin',array('user'=>$username,'datalist'=>$data));
|
$mailtp=new EmailText($this->db,'offline-start-dcadmin',array('user'=>$username,'datalist'=>$data));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$addrs=array();
|
$addrs=array();
|
||||||
$addrs[] = 'nztong@lzb.ac.cn';
|
$addrs[] = 'nztong@lzb.ac.cn';
|
||||||
$addrs[] = 'wjian@lzb.ac.cn';
|
$addrs[] = 'wangliangxu@lzb.ac.cn';
|
||||||
$addrs[] = 'lixin@lzb.ac.cn';
|
$addrs[] = 'wulizong@lzb.ac.cn';
|
||||||
$mail->addTo($addrs);
|
$mail->addTo($addrs);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
}
|
}
|
||||||
|
@ -230,11 +265,13 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$role['publisher']=array();
|
$role['publisher']=array();
|
||||||
$role['author']=array();
|
$role['author']=array();
|
||||||
$single=array();
|
$single=array();
|
||||||
|
if ($rows)
|
||||||
|
{
|
||||||
foreach($rows as $row)
|
foreach($rows as $row)
|
||||||
{
|
{
|
||||||
if ($tmp_title!=$row['title'])
|
if ($tmp_title!=$row['title'])
|
||||||
{
|
{
|
||||||
if (count($role))
|
if (count($role) && !empty($tmp_title))
|
||||||
{
|
{
|
||||||
$single['role']=$role;
|
$single['role']=$role;
|
||||||
$md[]=$single;
|
$md[]=$single;
|
||||||
|
@ -324,11 +361,11 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-mdadmin',array('user'=>$username,'datalist'=>$data));
|
$mailtp=new EmailText($this->db,'offline-start-mdadmin',array('user'=>$username,'datalist'=>$data));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($tmp_email);
|
$mail->addTo($tmp_email);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
$data='';
|
$data='';
|
||||||
|
@ -345,15 +382,15 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
unset($mail);
|
unset($mail);
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
$mailtp=new EmailText($this->db,'offline-start-mdadmin',array('user'=>$username,'datalist'=>$data));
|
$mailtp=new EmailText($this->db,'offline-start-mdadmin',array('user'=>$username,'datalist'=>$data));
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->addTo($tmp_email);
|
$mail->addTo($tmp_email);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, 'offlineapp.pdf');
|
||||||
$mail->send();
|
$mail->send();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//提示信息
|
//提示信息
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
|
@ -388,9 +425,14 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
//$this->_redirect('/admin/down/offlineapp/'.$page);
|
//$this->_redirect('/admin/down/offlineapp/'.$page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//如果是wsn数据则生成数据
|
||||||
|
//wsn数据在ftp服务器端进行处理
|
||||||
|
/*$dataservice = new DataService();
|
||||||
|
@$dataservice->makeWsnData();*/
|
||||||
|
|
||||||
$sql="update dataorder set status=5,ts_approved=now() where offlineappid=?";
|
$sql="update dataorder set status=5,ts_approved=now() where offlineappid=?";
|
||||||
$this->db->query($sql,array($finish));
|
$this->db->query($sql,array($finish));
|
||||||
$sql="update offlineapp set ts_approved=now() where id=? and ts_approved is null";
|
$sql="update offlineapp set ts_approved=now(),status=5 where id=? and ts_approved is null";
|
||||||
$this->db->query($sql,array($finish));
|
$this->db->query($sql,array($finish));
|
||||||
$sql="select * from offlineapp where id=?";
|
$sql="select * from offlineapp where id=?";
|
||||||
$row=$this->db->fetchRow($sql,array($finish));
|
$row=$this->db->fetchRow($sql,array($finish));
|
||||||
|
@ -401,19 +443,20 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
foreach($rs as $data) {
|
foreach($rs as $data) {
|
||||||
if ($data['host']=='ftp1.westgis.ac.cn')
|
if ($data['host']=='ftp1.westgis.ac.cn')
|
||||||
$has_ftp1=true;
|
$has_ftp1=true;
|
||||||
if ($data['host']=='ftp2.westgis.ac.cn')
|
if ($data['host']=='ftp.sanjiangyuan.org.cn')
|
||||||
$has_ftp2=true;
|
$has_ftp2=true;
|
||||||
|
|
||||||
// deal with ftp.westgis.ac.cn, use g6 to add path
|
// deal with ftp.westgis.ac.cn, use g6 to add path
|
||||||
// todo ...
|
// todo ...
|
||||||
}
|
}
|
||||||
|
|
||||||
//deal with ftp1&ftp2 account, for offline data
|
//deal with ftp1&ftp2 account, for offline data
|
||||||
if ($has_ftp1 || $has_ftp2) {
|
if ($has_ftp1 || $has_ftp2) {
|
||||||
$password=md5('westdc'.$row['userid'].rand(1000,9999));
|
$password=md5('westdc'.$row['userid'].rand(1000,9999));
|
||||||
if ($has_ftp1)
|
if ($has_ftp1)
|
||||||
{
|
{
|
||||||
$user=(object)array("id"=>$row['userid'],
|
$user=(object)array("id"=>$row['userid'],
|
||||||
"username"=>"westdc_".$row['userid'],
|
"username"=>"sjy_".$row['userid'],
|
||||||
"password"=>$password,
|
"password"=>$password,
|
||||||
"time"=>date('Y-m-d H:i:s', strtotime('+2 week')),
|
"time"=>date('Y-m-d H:i:s', strtotime('+2 week')),
|
||||||
//"path"=>$path,
|
//"path"=>$path,
|
||||||
|
@ -440,12 +483,12 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
if ($has_ftp2)
|
if ($has_ftp2)
|
||||||
{
|
{
|
||||||
$user=(object)array("id"=>$row['userid'],
|
$user=(object)array("id"=>$row['userid'],
|
||||||
"username"=>"westdc_".$row['userid'],
|
"username"=>"sjy_".$row['userid'],
|
||||||
"password"=>$password,
|
"password"=>$password,
|
||||||
"time"=>date('Y-m-d H:i:s', strtotime('+2 week')),
|
"time"=>date('Y-m-d H:i:s', strtotime('+2 week')),
|
||||||
//"path"=>$path,
|
//"path"=>$path,
|
||||||
"param"=>"offlineappid=".$finish,
|
"param"=>"offlineappid=".$finish,
|
||||||
"host"=>'ftp2.westgis.ac.cn',
|
"host"=>'ftp.sanjiangyuan.org.cn',
|
||||||
"maxdata"=>$this->view->config->download->max,
|
"maxdata"=>$this->view->config->download->max,
|
||||||
"datacount"=>1 //represent one offline application
|
"datacount"=>1 //represent one offline application
|
||||||
);
|
);
|
||||||
|
@ -468,10 +511,10 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$ftphost='ftp://ftp1.westgis.ac.cn';
|
$ftphost='ftp://ftp1.westgis.ac.cn';
|
||||||
} else if (!$has_ftp1 && $has_ftp2)
|
} else if (!$has_ftp1 && $has_ftp2)
|
||||||
{
|
{
|
||||||
$ftphost='ftp://ftp2.westgis.ac.cn';
|
$ftphost='ftp://ftp.sanjiangyuan.org.cn';
|
||||||
} else if ($has_ftp1 && $has_ftp2)
|
} else if ($has_ftp1 && $has_ftp2)
|
||||||
{
|
{
|
||||||
$ftphost='ftp://ftp1.westgis.ac.cn 以及 ftp://ftp2.westgis.ac.cn';
|
$ftphost='ftp://ftp1.westgis.ac.cn 以及 ftp://ftp.sanjiangyuan.org.cn';
|
||||||
}
|
}
|
||||||
//发送用户邮件进行信息提示和说明
|
//发送用户邮件进行信息提示和说明
|
||||||
$mail = new WestdcMailer($this->view->config->smtp);
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
|
@ -480,9 +523,9 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
array('user'=>$row['username'],'datalist'=>str_replace(";","\n",$row['datalist']),
|
array('user'=>$row['username'],'datalist'=>str_replace(";","\n",$row['datalist']),
|
||||||
'ftpuser'=>$user->username,'ftppwd'=>$proftp->pwd,'ftptime'=>$proftp->time,'ftphost'=>$ftphost));
|
'ftpuser'=>$user->username,'ftppwd'=>$proftp->pwd,'ftptime'=>$proftp->time,'ftphost'=>$ftphost));
|
||||||
$mail->setBodyText($mailtp->getBody());
|
$mail->setBodyText($mailtp->getBody());
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->addTo($row['email']);
|
$mail->addTo($row['email']);
|
||||||
$mail->addCc($this->view->config->service->email,'西部数据中心服务组');
|
$mail->addCc($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setSubject($mailtp->getSubject());
|
$mail->setSubject($mailtp->getSubject());
|
||||||
$mail->send();
|
$mail->send();
|
||||||
} //offline deal
|
} //offline deal
|
||||||
|
@ -610,6 +653,68 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$this->view->paginator=$paginator;
|
$this->view->paginator=$paginator;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//上传申请表
|
||||||
|
function uploadapplicationformAction()
|
||||||
|
{
|
||||||
|
$this->_helper->layout->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
|
$id = $this->_getParam('orderid');
|
||||||
|
|
||||||
|
if(empty($id))
|
||||||
|
{
|
||||||
|
$this->jsonexit(array('error'=>"参数错误"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$files = new Files();
|
||||||
|
$FileListener = new FileListener();
|
||||||
|
@$files->events()->attachAggregate($FileListener);
|
||||||
|
|
||||||
|
$statu = $files->uploadApplicationForm($_FILES['Filedata'],$id);
|
||||||
|
|
||||||
|
if(isset($statu['error']))
|
||||||
|
{
|
||||||
|
$this->jsonexit($statu);
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
$sql = "UPDATE offlineapp SET applicationform='{$statu['file']}' WHERE id=$id";
|
||||||
|
if($this->db->exec($sql))
|
||||||
|
{
|
||||||
|
$this->jsonexit(array("success"=>1));
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
$this->jsonexit(array('error'=>"数据库记录更新失败".$sql));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function applicationformAction()
|
||||||
|
{
|
||||||
|
$ac = $this->_getParam('ac');
|
||||||
|
if($ac == "view")
|
||||||
|
{
|
||||||
|
$link = $this->_getParam('link');
|
||||||
|
$content=file_get_contents($link);
|
||||||
|
header("Content-Disposition: inline; filename=applicationform.pdf");
|
||||||
|
header("Content-Type:application/pdf");
|
||||||
|
echo $content;
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($ac == "download")
|
||||||
|
{
|
||||||
|
$link = $this->_getParam('link');
|
||||||
|
$content=file_get_contents($link);
|
||||||
|
|
||||||
|
$output = new Output();
|
||||||
|
$output->pushDownload($content,"申请表.pdf",'pdf');
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//离线数据服务记录
|
//离线数据服务记录
|
||||||
function offlineAction()
|
function offlineAction()
|
||||||
{
|
{
|
||||||
|
@ -622,6 +727,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$undelete=$this->_getParam('undelete');
|
$undelete=$this->_getParam('undelete');
|
||||||
$emaillist=$this->_getParam('emaillist');
|
$emaillist=$this->_getParam('emaillist');
|
||||||
$monthreport=$this->_getParam('monthreport');
|
$monthreport=$this->_getParam('monthreport');
|
||||||
|
$submd=$this->view->config->sub->metadata;
|
||||||
|
|
||||||
if ($add) {
|
if ($add) {
|
||||||
$form=new OfflinelogForm();
|
$form=new OfflinelogForm();
|
||||||
|
@ -631,8 +737,10 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
if ($form->isValid($formdata)) {
|
if ($form->isValid($formdata)) {
|
||||||
$uploadedData = $form->getValues();
|
$uploadedData = $form->getValues();
|
||||||
$pdf = basename($form->pdf->getFileName());
|
$pdf = basename($form->pdf->getFileName());
|
||||||
$sql="insert into offlineapp (username,email,unit,phone,address,postcode,project,pdflink,datalist,ts_created,ts_approved) values(?,?,?,?,?,?,?,?,?,?,now())";
|
$sql="insert into offlineapp (username,email,unit,phone,address,postcode,project,pdflink,datalist,ts_created,ts_approved,project_id,project_title,project_type) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||||
$this->db->query($sql,array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],$formdata['project'],$pdf,$formdata['datalist'],$formdata['ts_approved']));
|
$this->db->query($sql,array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],
|
||||||
|
$formdata['project'],$pdf,$formdata['datalist'],$formdata['ts_approved']),$formdata['ts_approved'],
|
||||||
|
$formdata['project_id'],$formdata['project_title'],$formdata['project_type']);
|
||||||
$this->messenger->addMessage('提示信息:您已经成功添加该离线服务记录。');
|
$this->messenger->addMessage('提示信息:您已经成功添加该离线服务记录。');
|
||||||
$this->_redirect('/admin/down/offline');
|
$this->_redirect('/admin/down/offline');
|
||||||
} else {
|
} else {
|
||||||
|
@ -653,11 +761,14 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$pdf = basename($form->pdf->getFileName());
|
$pdf = basename($form->pdf->getFileName());
|
||||||
$sql="update offlineapp set username=?,email=?,unit=?,phone=?,address=?,postcode=?,project=?,";
|
$sql="update offlineapp set username=?,email=?,unit=?,phone=?,address=?,postcode=?,project=?,";
|
||||||
if ($form->pdf->isUploaded()) $sql.="pdflink=?,";
|
if ($form->pdf->isUploaded()) $sql.="pdflink=?,";
|
||||||
$sql.="datalist=?,ts_approved=? where id=?";
|
$sql.="datalist=?,ts_approved=?,project_id=?,project_title=?,project_type=? where id=?";
|
||||||
$param=array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],$formdata['project']);
|
$param=array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],$formdata['project']);
|
||||||
if ($form->pdf->isUploaded()) $param[]=$pdf;
|
if ($form->pdf->isUploaded()) $param[]=$pdf;
|
||||||
$param[]=$formdata['datalist'];
|
$param[]=$formdata['datalist'];
|
||||||
$param[]=$formdata['ts_approved'];
|
$param[]=$formdata['ts_approved'];
|
||||||
|
$param[]=$formdata['project_id'];
|
||||||
|
$param[]=$formdata['project_title'];
|
||||||
|
$param[]=$formdata['project_type'];
|
||||||
$param[]=$edit;
|
$param[]=$edit;
|
||||||
$this->db->query($sql,$param);
|
$this->db->query($sql,$param);
|
||||||
$this->messenger->addMessage('提示信息:您已经编辑添加该记录。');
|
$this->messenger->addMessage('提示信息:您已经编辑添加该记录。');
|
||||||
|
@ -708,21 +819,13 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
$sql="select * from offlineapp where ts_approved is not null and pdflink is not null order by ts_created desc";
|
$sql="select * from offlineapp where ts_approved is not null and pdflink is not null order by ts_created desc";
|
||||||
$rows=$this->db->fetchAll($sql);
|
$rows=$this->db->fetchAll($sql);
|
||||||
foreach($rows as $row){
|
|
||||||
$content.='"'.$row['username'].'","'.$row['unit'].'","'.$row['phone'].'","'.$row['address'].'","'.$row['postcoe'].'","'.str_replace("\"","'",$row['project']).'","'.str_replace("\"","'",$row['datalist']).'","'.$row['email'].'",'.$row['ts_created']."\n";
|
|
||||||
}
|
|
||||||
$this->getResponse()->setHeader('Content-Type', 'application/octet-stream')
|
|
||||||
->setHeader('Content-Disposition','attachment; filename="offlineapp.csv"')
|
|
||||||
->setHeader('Content-Length', strlen($content))
|
|
||||||
->setHeader('Content-Type','application/force-download')
|
|
||||||
->setHeader('Content-Type','application/download')
|
|
||||||
->setHeader('Content-Description','File Transfer')
|
|
||||||
->setHeader('Content-Transfer-Encoding','binary')
|
|
||||||
->setHeader('Expires',0)
|
|
||||||
->setHeader('Cache-Control','must-revalidate, post-check=0, pre-check=0')
|
|
||||||
->setHeader('Pragma','public')
|
|
||||||
->setBody($content);
|
|
||||||
|
|
||||||
|
foreach($rows as $row){
|
||||||
|
$content.='"'.$row['username'].'","'.$row['unit'].'","'.$row['phone'].'","'.$row['address'].'","'.$row['postcode'].'","'.str_replace("\"","'",$row['project']).'","'.str_replace("\"","'",$row['datalist']).'","'.$row['email'].'",'.$row['ts_created']."\r\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = new Output($this->db);
|
||||||
|
$output->Download("offlineapp.csv",$content,"string");
|
||||||
} //下载离线服务记录
|
} //下载离线服务记录
|
||||||
|
|
||||||
else if ($update) {
|
else if ($update) {
|
||||||
|
@ -765,9 +868,9 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$sql = "select distinct(t.*) from
|
$sql = "select distinct(t.*) from
|
||||||
(
|
(
|
||||||
select u.email from dataorder d left join users u on d.userid=u.id where (d.status=0 or d.status=5)
|
select u.email from dataorder d left join users u on d.userid=u.id where (d.status=0 or d.status=5) and d.uuid in (select uuid from $submd)
|
||||||
union
|
union
|
||||||
select o.email from offlineapp o where o.userid is null and o.email is not null
|
select o.email from offlineapp o where o.userid is null and o.email is not null and o.id in (select offlineappid from dataorder where uuid in (select uuid from $submd))
|
||||||
) as t";
|
) as t";
|
||||||
$re = $this->db->query($sql);
|
$re = $this->db->query($sql);
|
||||||
$rows = $re->fetchAll();
|
$rows = $re->fetchAll();
|
||||||
|
@ -814,9 +917,15 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
|
|
||||||
//设置当前活动sheet的名称
|
//设置当前活动sheet的名称
|
||||||
$objActSheet->setTitle('离线服务记录');
|
$objActSheet->setTitle('离线服务记录');
|
||||||
|
if (date('m')==1)
|
||||||
|
{
|
||||||
|
$ym=(date('Y')-1).'-12-1';
|
||||||
|
} else {
|
||||||
|
$ym=date('Y-').(date('m')-1).'-1';
|
||||||
|
}
|
||||||
$sql="select o.username,o.unit,o.phone,o.address,o.postcode,o.project,regexp_replace(o.datalist,'\(.+?MB\)','','g') as datalist,date(o.ts_approved) as date,o.email,o.project_id,o.project_type,o.project_title,sum(m.filesize) as filesize
|
$sql="select o.username,o.unit,o.phone,o.address,o.postcode,o.project,regexp_replace(o.datalist,'\(.+?MB\)','','g') as datalist,date(o.ts_approved) as date,o.email,o.project_id,o.project_type,o.project_title,sum(m.filesize) as filesize
|
||||||
from offlineapp o left join dataorder d on o.id=d.offlineappid left join metadata m on d.uuid=m.uuid
|
from offlineapp o left join dataorder d on o.id=d.offlineappid left join metadata m on d.uuid=m.uuid
|
||||||
where o.ts_approved>='".date('Y-').(date('m')-1)."-1' and o.ts_approved<'".date('Y-m')."-1' and o.pdflink is not null and o.ts_approved is not null and d.status=5 group by o.id order by o. ts_approved
|
where o.ts_approved>='".$ym."' and o.ts_approved<'".date('Y-m')."-1' and o.pdflink is not null and o.ts_approved is not null and d.status=5 group by o.id order by o. ts_approved
|
||||||
";
|
";
|
||||||
$re = $this->db->query($sql);
|
$re = $this->db->query($sql);
|
||||||
$rows = $re->fetchAll();
|
$rows = $re->fetchAll();
|
||||||
|
@ -845,7 +954,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$objActSheet->setTitle('在线服务记录');
|
$objActSheet->setTitle('在线服务记录');
|
||||||
$sql="select o.username,o.unit,o.phone,o.address,o.postcode,o.project,date(o.ts_created) as date,o.email,o.project_id,o.project_type,o.project_title,m.filesize,m.title
|
$sql="select o.username,o.unit,o.phone,o.address,o.postcode,o.project,date(o.ts_created) as date,o.email,o.project_id,o.project_type,o.project_title,m.filesize,m.title
|
||||||
from onlineapp o left join dataorder d on o.id=d.onlineappid left join metadata m on d.uuid=m.uuid
|
from onlineapp o left join dataorder d on o.id=d.onlineappid left join metadata m on d.uuid=m.uuid
|
||||||
where o.ts_created>='".date('Y-').(date('m')-1)."-1' and o.ts_created<'".date('Y-m')."-1' and d.status=0 order by o. ts_created
|
where o.ts_created>='".$ym."' and o.ts_created<'".date('Y-m')."-1' and d.status=0 order by o. ts_created
|
||||||
";
|
";
|
||||||
$re = $this->db->query($sql);
|
$re = $this->db->query($sql);
|
||||||
$rows = $re->fetchAll();
|
$rows = $re->fetchAll();
|
||||||
|
@ -902,28 +1011,28 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
->setBody($objWriter->save('php://output'));*/
|
->setBody($objWriter->save('php://output'));*/
|
||||||
}
|
}
|
||||||
|
|
||||||
$select=$this->db->select();
|
|
||||||
$select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->where('status=0')->order('ts_created desc');
|
|
||||||
$paginator = Zend_Paginator::factory($select);
|
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
|
||||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
|
||||||
$this->view->paginator=$paginator;
|
|
||||||
|
|
||||||
$this->view->page = $this->_getParam('page');
|
$this->view->page = $this->_getParam('page');
|
||||||
|
|
||||||
|
$application = new Application();
|
||||||
|
|
||||||
|
$this->view->q = $application->keyword = $this->_getParam('q');
|
||||||
|
$application->filter = $this->_getParam('filter');
|
||||||
|
view::addPaginator($application->passed(),$this,20);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
//在线数据下载情况,仅针对onlineapp表,自2011-9-8开始记录。
|
//在线数据下载情况,仅针对onlineapp表,自2011-9-8开始记录。
|
||||||
function onlineAction()
|
function onlineAction()
|
||||||
{
|
{
|
||||||
$show=(int)$this->_getParam('show');
|
$show=(int)$this->_getParam('show');
|
||||||
$delete=(int)$this->_getParam('delete');
|
$delete=(int)$this->_getParam('delete');
|
||||||
|
$submd=$this->view->config->sub->metadata;
|
||||||
|
|
||||||
if(empty($show) && empty($delete))
|
if(empty($show) && empty($delete))
|
||||||
{
|
{
|
||||||
$select=$this->db->select();
|
$select=$this->db->select();
|
||||||
$select->from('onlineapp as o',array('id','userid','unit','username','ts_created','project','project_id','project_type','project_title'))
|
$select->from('onlineapp as o',array('id','userid','unit','username','ts_created','project','project_id','project_type','project_title'))
|
||||||
->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
->join($submd.' as m', 'o.uuid = m.uuid', array('title','uuid'))
|
||||||
->where('o.id in (select distinct(onlineappid) from dataorder)')
|
->where('o.id in (select distinct(onlineappid) from dataorder)')
|
||||||
->order('o.id desc');
|
->order('o.id desc');
|
||||||
$paginator = Zend_Paginator::factory($select);
|
$paginator = Zend_Paginator::factory($select);
|
||||||
|
@ -956,7 +1065,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$sql ="select o.*,u.username as uname,u.id as uid,m.title,m.uuid
|
$sql ="select o.*,u.username as uname,u.id as uid,m.title,m.uuid
|
||||||
from onlineapp as o
|
from onlineapp as o
|
||||||
left join users as u on u.id = o.userid
|
left join users as u on u.id = o.userid
|
||||||
left join metadata as m on o.uuid = m.uuid
|
left join $submd as m on o.uuid = m.uuid
|
||||||
where o.id=?";
|
where o.id=?";
|
||||||
$result =$this->db->query($sql,$show);
|
$result =$this->db->query($sql,$show);
|
||||||
$rows = $result->fetch();
|
$rows = $result->fetch();
|
||||||
|
@ -971,6 +1080,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$show =(int)$this->_getParam('show');
|
$show =(int)$this->_getParam('show');
|
||||||
$search = $this->_getParam('search');
|
$search = $this->_getParam('search');
|
||||||
$keyword = $this->view->keyword = $this->_getParam('keyword');
|
$keyword = $this->view->keyword = $this->_getParam('keyword');
|
||||||
|
$submd=$this->view->config->sub->metadata;
|
||||||
|
|
||||||
if(empty($show))
|
if(empty($show))
|
||||||
{
|
{
|
||||||
|
@ -978,6 +1088,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$select->from('dataorder as o','count(o.id) as num')
|
$select->from('dataorder as o','count(o.id) as num')
|
||||||
->join('users as u', 'u.id = o.userid', array('realname','id as uid','unit'))
|
->join('users as u', 'u.id = o.userid', array('realname','id as uid','unit'))
|
||||||
->where('o.status=0 or o.status=5')
|
->where('o.status=0 or o.status=5')
|
||||||
|
->where("o.uuid in (select uuid from $submd)")
|
||||||
->where('o.userid = u.id');
|
->where('o.userid = u.id');
|
||||||
if(!empty($search) && !empty($keyword))
|
if(!empty($search) && !empty($keyword))
|
||||||
{
|
{
|
||||||
|
@ -1003,7 +1114,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$select=$this->db->select();
|
$select=$this->db->select();
|
||||||
$select->from('dataorder as o',array('id','ts_created','userid','offlineappid','onlineappid'))
|
$select->from('dataorder as o',array('id','ts_created','userid','offlineappid','onlineappid'))
|
||||||
->joinLeft('metadata as m', 'o.uuid = m.uuid', array('title','uuid','filesize'))
|
->joinLeft($submd.' as m', 'o.uuid = m.uuid', array('title','uuid','filesize'))
|
||||||
->joinLeft('users as u','u.id=o.userid',array('realname as username'))
|
->joinLeft('users as u','u.id=o.userid',array('realname as username'))
|
||||||
->where('o.userid = ?', $show)
|
->where('o.userid = ?', $show)
|
||||||
->where('o.status=0 or o.status=5')
|
->where('o.status=0 or o.status=5')
|
||||||
|
@ -1030,12 +1141,13 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$show = $this->_getParam('show');
|
$show = $this->_getParam('show');
|
||||||
$search = $this->_getParam('search');
|
$search = $this->_getParam('search');
|
||||||
$keyword = $this->view->keyword = $this->_getParam('keyword');
|
$keyword = $this->view->keyword = $this->_getParam('keyword');
|
||||||
|
$submd=$this->view->config->sub->metadata;
|
||||||
|
|
||||||
if(empty($show))
|
if(empty($show))
|
||||||
{
|
{
|
||||||
$select=$this->db->select();
|
$select=$this->db->select();
|
||||||
$select->from('dataorder as o','count(o.id) as num')
|
$select->from('dataorder as o','count(o.id) as num')
|
||||||
->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
->join($submd.' as m', 'o.uuid = m.uuid', array('title','uuid'))
|
||||||
->where('o.uuid = m.uuid and (o.status=0 or o.status=5)');
|
->where('o.uuid = m.uuid and (o.status=0 or o.status=5)');
|
||||||
if(!empty($search) && !empty($keyword))
|
if(!empty($search) && !empty($keyword))
|
||||||
{
|
{
|
||||||
|
@ -1061,7 +1173,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$select=$this->db->select();
|
$select=$this->db->select();
|
||||||
$select->from('dataorder as o',array('ts_created','ts_created','offlineappid','onlineappid'))
|
$select->from('dataorder as o',array('ts_created','ts_created','offlineappid','onlineappid'))
|
||||||
->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
->join($submd.' as m', 'o.uuid = m.uuid', array('title','uuid'))
|
||||||
->join('users as u', 'o.userid=u.id',array('id as userid','username','realname'))
|
->join('users as u', 'o.userid=u.id',array('id as userid','username','realname'))
|
||||||
->where('m.uuid = ? and (o.status=0 or o.status=5)', $show)
|
->where('m.uuid = ? and (o.status=0 or o.status=5)', $show)
|
||||||
->order('o.id desc');
|
->order('o.id desc');
|
||||||
|
@ -1072,7 +1184,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
$this->view->paginator=$paginator;
|
$this->view->paginator=$paginator;
|
||||||
|
|
||||||
$sql="select title,uuid from metadata where uuid='$show'";
|
$sql="select title,uuid from $submd where uuid='$show'";
|
||||||
$re=$this->db->query($sql);
|
$re=$this->db->query($sql);
|
||||||
$t=$re->fetch();
|
$t=$re->fetch();
|
||||||
$this->view->infos=$t;
|
$this->view->infos=$t;
|
||||||
|
@ -1129,7 +1241,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$sql = "select distinct u.email
|
$sql = "select distinct u.email
|
||||||
from dataorder d
|
from dataorder d
|
||||||
LEFT JOIN users u on d.userid = u.id
|
LEFT JOIN users u on d.userid = u.id
|
||||||
WHERE u.email IS NOT NULL
|
WHERE u.email IS NOT NULL and d.status in (0,5) and d.ts_approved is not null
|
||||||
AND d.uuid=?
|
AND d.uuid=?
|
||||||
GROUP BY u.email";
|
GROUP BY u.email";
|
||||||
|
|
||||||
|
@ -1150,7 +1262,7 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
foreach($mails as $k=>$v)
|
foreach($mails as $k=>$v)
|
||||||
{
|
{
|
||||||
$mail=new WestdcMailer($this->view->config->smtp);
|
$mail=new WestdcMailer($this->view->config->smtp);
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'数据服务组');
|
||||||
$mail->setBodyText($body);
|
$mail->setBodyText($body);
|
||||||
$mail->setSubject($title);
|
$mail->setSubject($title);
|
||||||
$mail->addTo($v['email']);
|
$mail->addTo($v['email']);
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Admin_NewsController extends Zend_Controller_Action
|
||||||
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
||||||
left join ".$News->tbl_categorys." c on c.id = ct.cid
|
left join ".$News->tbl_categorys." c on c.id = ct.cid
|
||||||
LEFT JOIN users u ON n.userid=u.id
|
LEFT JOIN users u ON n.userid=u.id
|
||||||
WHERE c.id='$type' AND n.title IS NOT NULL order by n.ts_created desc";
|
WHERE c.id='$type' AND n.title IS NOT NULL and n.sub='".$this->view->config->sub->news."' order by n.ts_created desc";
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
$sql = "select
|
$sql = "select
|
||||||
|
@ -51,7 +51,7 @@ class Admin_NewsController extends Zend_Controller_Action
|
||||||
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
||||||
left join ".$News->tbl_categorys." c on c.id = ct.cid
|
left join ".$News->tbl_categorys." c on c.id = ct.cid
|
||||||
LEFT JOIN users u ON n.userid=u.id
|
LEFT JOIN users u ON n.userid=u.id
|
||||||
WHERE n.title IS NOT NULL
|
WHERE n.title IS NOT NULL and n.sub='".$this->view->config->sub->news."'
|
||||||
GROUP BY n.id
|
GROUP BY n.id
|
||||||
ORDER BY n.ts_created desc
|
ORDER BY n.ts_created desc
|
||||||
";
|
";
|
||||||
|
@ -85,186 +85,6 @@ class Admin_NewsController extends Zend_Controller_Action
|
||||||
$this->view->deepField = $category->DeepTitle;
|
$this->view->deepField = $category->DeepTitle;
|
||||||
}//newslistAction 新闻列表
|
}//newslistAction 新闻列表
|
||||||
|
|
||||||
function catlogAction()
|
|
||||||
{
|
|
||||||
$add = $this->_request->getParam('add');
|
|
||||||
$submit = $this->_request->getParam('submit');
|
|
||||||
|
|
||||||
$delete = $this->_request->getParam('delete');
|
|
||||||
|
|
||||||
$edit = $this->_request->getParam('edit');
|
|
||||||
|
|
||||||
$News = new Archive($this->db);
|
|
||||||
|
|
||||||
if($add)
|
|
||||||
{
|
|
||||||
$this->view->ptype = $News->ptype;
|
|
||||||
|
|
||||||
$this->_helper->viewRenderer('category-add');
|
|
||||||
|
|
||||||
$category = new ArchiveCategory($this->db);
|
|
||||||
$catlogs = $category->GetFullCategory();
|
|
||||||
$this->view->categories=$catlogs;
|
|
||||||
$this->view->deepField = $category->DeepTitle;
|
|
||||||
|
|
||||||
if(empty($submit)){
|
|
||||||
|
|
||||||
//$this->_helper->viewRenderer('category-add');
|
|
||||||
|
|
||||||
}else{
|
|
||||||
|
|
||||||
$data = array();
|
|
||||||
|
|
||||||
$data['title'] = $this->_request->getParam('ctitle');
|
|
||||||
$data['code'] = $this->_request->getParam('code');
|
|
||||||
$data['fid'] = $this->_request->getParam('fid');
|
|
||||||
$data['ptype'] = $this->_request->getParam('ptype');
|
|
||||||
|
|
||||||
$data['is_pub'] = 1;
|
|
||||||
|
|
||||||
$this->view->info = $data;
|
|
||||||
|
|
||||||
if(empty($data['title']))
|
|
||||||
{
|
|
||||||
$this->view->error = "请输入标题";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(empty($data['code']))
|
|
||||||
{
|
|
||||||
$this->view->error = "请输入栏目连接,如http://westdc.westgis.ac.cn/news/notice,则只需要输入notice";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!preg_match("/^[a-z]+$/",$data['code']))
|
|
||||||
{
|
|
||||||
$this->view->error = "url格式不正确,仅允许26个小写字母";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$LftRgt = $category->Insert($data['fid']);
|
|
||||||
$data['tid'] = $data['fid'];
|
|
||||||
$data['lft'] = $LftRgt['left'];
|
|
||||||
$data['rgt'] = $LftRgt['right'];
|
|
||||||
unset($data['fid']);
|
|
||||||
|
|
||||||
if($this->db->insert($category->CategoryTable,$data))
|
|
||||||
{
|
|
||||||
$this->view->msg = '提示信息:栏目添加成功!';
|
|
||||||
$this->view->jump_url = '/admin/news/catlog';
|
|
||||||
return true;
|
|
||||||
}else{
|
|
||||||
$this->view->error = "添加失败,请重试";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}//栏目添加
|
|
||||||
if($delete>0)
|
|
||||||
{
|
|
||||||
$sql = "delete from ".$News->tbl_categorys." where id='$delete'";
|
|
||||||
if($this->db->exec($sql)>0)
|
|
||||||
{
|
|
||||||
$this->messenger->addMessage('提示信息:栏目删除成功!');
|
|
||||||
$this->_redirect('/admin/news/catlog');
|
|
||||||
}
|
|
||||||
|
|
||||||
}//栏目删除
|
|
||||||
|
|
||||||
if($edit>0)
|
|
||||||
{
|
|
||||||
$submit = $this->_getParam('submit');
|
|
||||||
$this->_helper->viewRenderer('category-edit');
|
|
||||||
|
|
||||||
$this->view->ptype = $News->ptype;
|
|
||||||
$category = new ArchiveCategory($this->db);
|
|
||||||
$this->view->info = $category->GetOne($edit);
|
|
||||||
$this->view->categories = $category->GetFullCategory();
|
|
||||||
$this->view->deepField = $category->DeepTitle;
|
|
||||||
|
|
||||||
if(!empty($submit))
|
|
||||||
{
|
|
||||||
|
|
||||||
$data = array();
|
|
||||||
|
|
||||||
$data['title'] = $this->_request->getParam('ctitle');
|
|
||||||
$data['code'] = $this->_request->getParam('code');
|
|
||||||
$data['fid'] = $this->_request->getParam('fid');
|
|
||||||
$data['ptype'] = $this->_request->getParam('ptype');
|
|
||||||
$data['is_pub'] = $this->_request->getParam('is_pub');
|
|
||||||
|
|
||||||
$this->view->info = $data;
|
|
||||||
|
|
||||||
if(empty($data['title']))
|
|
||||||
{
|
|
||||||
$this->view->error = "请输入标题";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(empty($data['code']))
|
|
||||||
{
|
|
||||||
$this->view->error = "请输入栏目连接,如http://westdc.westgis.ac.cn/news/notice,则只需要输入notice";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!preg_match("/^[a-z]+$/",$data['code']))
|
|
||||||
{
|
|
||||||
$this->view->error = "url格式不正确,仅允许26个小写字母";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$LftRgt = $category->Insert($data['fid']);
|
|
||||||
$data['tid'] = $data['fid'];
|
|
||||||
$data['lft'] = $LftRgt['left'];
|
|
||||||
$data['rgt'] = $LftRgt['right'];
|
|
||||||
unset($data['fid']);
|
|
||||||
|
|
||||||
if($this->db->update($News->tbl_categorys,$data,"id=$edit"))
|
|
||||||
{
|
|
||||||
$this->view->msg = '提示信息:栏目添加成功!';
|
|
||||||
$this->view->jump_url = '/admin/news/catlog';
|
|
||||||
return true;
|
|
||||||
}else{
|
|
||||||
$this->view->error = "添加失败,请重试";
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}//栏目编辑
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
$category = new ArchiveCategory($this->db);
|
|
||||||
$News = new Archive($this->db);
|
|
||||||
|
|
||||||
$catlogs = $category->GetFullCategory();
|
|
||||||
$ptype = $News->ptype;
|
|
||||||
|
|
||||||
foreach($catlogs as $k=>$v)
|
|
||||||
{
|
|
||||||
$url_parts = array(
|
|
||||||
"ptype"=>$v['ptype'],
|
|
||||||
"type_code"=>$v['code']
|
|
||||||
);
|
|
||||||
$catlogs[$k]['url'] = $News->makeCategoryUrl($url_parts);
|
|
||||||
|
|
||||||
foreach($ptype as $kk=>$vv)
|
|
||||||
{
|
|
||||||
if($catlogs[$k]['ptype'] == $vv)
|
|
||||||
{
|
|
||||||
$catlogs[$k]['ptype'] = $kk;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$this->view->catlogs=$catlogs;
|
|
||||||
$this->view->deepField = $category->DeepTitle;
|
|
||||||
}//栏目列表
|
|
||||||
|
|
||||||
|
|
||||||
}//栏目管理
|
|
||||||
|
|
||||||
function getSubCategory($fid)
|
function getSubCategory($fid)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,6 +8,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
$this->view->theme = new Theme();
|
$this->view->theme = new Theme();
|
||||||
$this->_helper->layout->setLayout('administry');
|
$this->_helper->layout->setLayout('administry');
|
||||||
$this->view->pageID = "review-".$this->_request->getActionName();
|
$this->view->pageID = "review-".$this->_request->getActionName();
|
||||||
|
$this->submd=$this->view->config->sub->metadata;
|
||||||
|
$this->subsearch=$this->view->config->sub->search;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -17,7 +19,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
function indexAction()
|
function indexAction()
|
||||||
{
|
{
|
||||||
$sql = "select m.id,md.title,u.username,u.realname,m.status from mdstatus m
|
$sql = "select m.id,md.title,u.username,u.realname,m.status from mdstatus m
|
||||||
right join metadata md on md.uuid=m.uuid
|
right join $this->submd md on md.uuid=m.uuid
|
||||||
left join users u on u.id=m.userid
|
left join users u on u.id=m.userid
|
||||||
order by m.id desc limit 10 ";
|
order by m.id desc limit 10 ";
|
||||||
$re = $this->db->query($sql);
|
$re = $this->db->query($sql);
|
||||||
|
@ -39,7 +41,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select m.id,md.title,u.username,u.realname,m.status from mdstatus m
|
$sql = "select m.id,md.title,u.username,u.realname,m.status from mdstatus m
|
||||||
right join metadata md on md.uuid=m.uuid
|
right join $this->submd md on md.uuid=m.uuid
|
||||||
left join users u on u.id=m.userid
|
left join users u on u.id=m.userid
|
||||||
where u.id='$userid'";
|
where u.id='$userid'";
|
||||||
|
|
||||||
|
@ -123,6 +125,24 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}//changestatus 更改状态
|
}//changestatus 更改状态
|
||||||
|
|
||||||
|
function editorAction()
|
||||||
|
{
|
||||||
|
include_once("helper/view.php");
|
||||||
|
include_once("data/Review.php");
|
||||||
|
|
||||||
|
$this->view->keyword = $keyword = $this->_request->getParam('keyword');
|
||||||
|
|
||||||
|
$review = new Review();
|
||||||
|
if(!empty($keyword))
|
||||||
|
{
|
||||||
|
$filter['keyword'] = $keyword;
|
||||||
|
$data = $review->needEditor($filter);
|
||||||
|
}else{
|
||||||
|
$data = $review->needEditor();
|
||||||
|
}
|
||||||
|
|
||||||
|
\view::addPaginator($data,$this,NULL,20);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* acceptAction()待审元数据
|
* acceptAction()待审元数据
|
||||||
|
@ -170,9 +190,9 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
if(!empty($keyword))
|
if(!empty($keyword))
|
||||||
{
|
{
|
||||||
$sql = "select m.*,md.title,u.username,u.realname from mdstatus m
|
$sql = "select m.*,md.title,u.username,u.realname from mdstatus m
|
||||||
right join metadata md on md.uuid=m.uuid
|
right join $this->submd md on md.uuid=m.uuid
|
||||||
left join users u on u.id=m.userid
|
left join users u on u.id=m.userid
|
||||||
where m.status=1
|
where m.status in (1,2,3,4)
|
||||||
and md.title like '%$keyword%'
|
and md.title like '%$keyword%'
|
||||||
";
|
";
|
||||||
$re = $this->db->query($sql);
|
$re = $this->db->query($sql);
|
||||||
|
@ -189,18 +209,14 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "select m.*,md.title,u.username,u.realname from mdstatus m
|
$sql = "select m.*,md.title,u.username,u.realname from mdstatus m
|
||||||
right join metadata md on md.uuid=m.uuid
|
right join $this->submd md on md.uuid=m.uuid
|
||||||
left join users u on u.id=m.userid
|
left join users u on u.id=m.userid
|
||||||
where m.status=1 order by m.ts_created desc";
|
where m.status in (1,2,3,4)
|
||||||
|
order by m.ts_created desc";
|
||||||
$re = $this->db->query($sql);
|
$re = $this->db->query($sql);
|
||||||
$rows = $re->fetchAll();
|
$rows = $re->fetchAll();
|
||||||
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
\view::addPaginator($rows,$this,NULL,20);
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
|
||||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
|
||||||
$this->view->paginator=$paginator;
|
|
||||||
}//列表
|
}//列表
|
||||||
|
|
||||||
}//acceptAction
|
}//acceptAction
|
||||||
|
@ -226,7 +242,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
|
|
||||||
$sql = "select m.*,md.*,u.realname from mdstatus m
|
$sql = "select m.*,md.*,u.realname from mdstatus m
|
||||||
right join metadata md on md.uuid=m.uuid
|
right join $this->submd md on md.uuid=m.uuid
|
||||||
left join users u on u.id=m.userid
|
left join users u on u.id=m.userid
|
||||||
where m.id=$show
|
where m.id=$show
|
||||||
";
|
";
|
||||||
|
@ -282,7 +298,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select m.id,md.title,m.status,m.uuid,u.username,u.realname from mdstatus m
|
$sql = "select m.id,md.title,m.status,m.uuid,u.username,u.realname from mdstatus m
|
||||||
right join metadata md on md.uuid=m.uuid
|
right join $this->submd md on md.uuid=m.uuid
|
||||||
left join users u on u.id=m.userid
|
left join users u on u.id=m.userid
|
||||||
where m.status in (2,3,4) $searchjoin order by m.ts_accepted desc";
|
where m.status in (2,3,4) $searchjoin order by m.ts_accepted desc";
|
||||||
$rs = $this->db->query($sql);
|
$rs = $this->db->query($sql);
|
||||||
|
@ -586,6 +602,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
$search=$this->_request->getParam('search');
|
$search=$this->_request->getParam('search');
|
||||||
$filter['keyword'] = $this->_request->getParam('keyword');
|
$filter['keyword'] = $this->_request->getParam('keyword');
|
||||||
$filter['code'] = $this->_request->getParam('code');
|
$filter['code'] = $this->_request->getParam('code');
|
||||||
|
$filter['order'] = $this->_request->getParam('order');
|
||||||
|
$filter['sort'] = $this->_request->getParam('sort');
|
||||||
|
|
||||||
$review = new Review($this->db);
|
$review = new Review($this->db);
|
||||||
if(!empty($search) && !empty($filter))
|
if(!empty($search) && !empty($filter))
|
||||||
|
@ -593,6 +611,9 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
$rows = $review->adminReviews($filter);
|
$rows = $review->adminReviews($filter);
|
||||||
$this->view->keyword = $filter['keyword'];
|
$this->view->keyword = $filter['keyword'];
|
||||||
$this->view->code = $filter['code'];
|
$this->view->code = $filter['code'];
|
||||||
|
}if(!empty($filter))
|
||||||
|
{
|
||||||
|
$rows = $review->adminReviews($filter);
|
||||||
}else{
|
}else{
|
||||||
$rows = $review->adminReviews();
|
$rows = $review->adminReviews();
|
||||||
}
|
}
|
||||||
|
@ -730,7 +751,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
//update search document
|
//update search document
|
||||||
$search=new Search();
|
$search=new Search();
|
||||||
//create search view in xunsearch
|
//create search view in xunsearch
|
||||||
$sql="select * from xunsearch where uuid in (select uuid from mdstatus where id in (".$ids."))";
|
$sql="select * from $this->subsearch where uuid in (select uuid from mdstatus where id in (".$ids."))";
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
while ($data = $sth->fetch())
|
while ($data = $sth->fetch())
|
||||||
|
@ -741,8 +762,8 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
//仅对单条数据发送email信息
|
//仅对单条数据发送email信息
|
||||||
if (is_numeric($ids))
|
if (is_numeric($ids))
|
||||||
{
|
{
|
||||||
$sql="select distinct u.email,m.title,m.uuid from mdstatus s left join metadata m on s.uuid=m.uuid
|
$sql="select distinct u.email,m.title,m.uuid from mdstatus s left join $this->submd m on s.uuid=m.uuid
|
||||||
left join mdauthor a on s.uuid=a.uuid left join users u on a.userid=u.id where s.id=? order by u.email";
|
right join mdauthor a on s.uuid=a.uuid left join users u on a.userid=u.id where s.id=? order by u.email";
|
||||||
$rs=$this->db->query($sql,array($ids));
|
$rs=$this->db->query($sql,array($ids));
|
||||||
$rows=$rs->fetchAll();
|
$rows=$rs->fetchAll();
|
||||||
if ($rows)
|
if ($rows)
|
||||||
|
@ -786,9 +807,10 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
$this->view->keyword = $keyword;
|
$this->view->keyword = $keyword;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status,m.ts_created from mdstatus m
|
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status,m.ts_created,gn.id as gnid from mdstatus m
|
||||||
right join metadata md on md.uuid=m.uuid
|
right join $this->submd md on md.uuid=m.uuid
|
||||||
left join users u on u.id=m.userid
|
left join users u on u.id=m.userid
|
||||||
|
left join geonetworkmetadata gn on m.uuid=gn.uuid
|
||||||
where status=0 $searchjoin order by m.ts_created desc";
|
where status=0 $searchjoin order by m.ts_created desc";
|
||||||
|
|
||||||
$re = $this->db->query($sql);
|
$re = $this->db->query($sql);
|
||||||
|
@ -848,7 +870,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status from mdstatus m
|
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status from mdstatus m
|
||||||
right join metadata md on md.uuid=m.uuid
|
right join $this->submd md on md.uuid=m.uuid
|
||||||
left join users u on u.id=m.userid
|
left join users u on u.id=m.userid
|
||||||
where status=-1 $searchjoin";
|
where status=-1 $searchjoin";
|
||||||
|
|
||||||
|
@ -888,9 +910,9 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status,m.ts_finished from mdstatus m
|
$sql = "select m.id,md.title,md.uuid,u.username,u.realname,m.status,m.ts_finished from mdstatus m
|
||||||
right join metadata md on md.uuid=m.uuid
|
right join $this->submd md on md.uuid=m.uuid
|
||||||
left join users u on u.id=m.userid
|
left join users u on u.id=m.userid
|
||||||
where status=5 $searchjoin";
|
where status=5 $searchjoin order by m.ts_finished desc";
|
||||||
|
|
||||||
$re = $this->db->query($sql);
|
$re = $this->db->query($sql);
|
||||||
$rows = $re->fetchAll();
|
$rows = $re->fetchAll();
|
||||||
|
@ -1177,7 +1199,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select r.*,md.title,u.realname,u.id as uid from mdreview r
|
$sql = "select r.*,md.title,u.realname,u.id as uid from mdreview r
|
||||||
left join metadata md on md.uuid=r.uuid
|
left join $this->submd md on md.uuid=r.uuid
|
||||||
left join users u on u.id=r.userid
|
left join users u on u.id=r.userid
|
||||||
where r.id='$id'
|
where r.id='$id'
|
||||||
";
|
";
|
||||||
|
@ -1262,7 +1284,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select md.title,md.uuid,u.realname,r.id,r.ts_created,r.is_expert from mdreview r
|
$sql = "select md.title,md.uuid,u.realname,r.id,r.ts_created,r.is_expert from mdreview r
|
||||||
left join metadata md on md.uuid=r.uuid
|
left join $this->submd md on md.uuid=r.uuid
|
||||||
left join users u on u.id=r.userid
|
left join users u on u.id=r.userid
|
||||||
$wheresql
|
$wheresql
|
||||||
order by r.ts_created desc
|
order by r.ts_created desc
|
||||||
|
@ -1313,7 +1335,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select u.id,u.realname as title,count(r.id) as c from mdreview r
|
$sql = "select u.id,u.realname as title,count(r.id) as c from mdreview r
|
||||||
left join metadata md on md.uuid=r.uuid
|
left join $this->submd md on md.uuid=r.uuid
|
||||||
left join users u on u.id=r.userid
|
left join users u on u.id=r.userid
|
||||||
$wheresql
|
$wheresql
|
||||||
GROUP BY u.id,u.realname
|
GROUP BY u.id,u.realname
|
||||||
|
@ -1443,7 +1465,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "select md.title,md.uuid,count(r.id) as c from mdreview r
|
$sql = "select md.title,md.uuid,count(r.id) as c from mdreview r
|
||||||
left join metadata md on md.uuid=r.uuid
|
left join $this->submd md on md.uuid=r.uuid
|
||||||
$wheresql
|
$wheresql
|
||||||
GROUP BY md.title,md.uuid
|
GROUP BY md.title,md.uuid
|
||||||
";
|
";
|
||||||
|
|
|
@ -9,6 +9,7 @@ class Admin_StatController extends Zend_Controller_Action
|
||||||
$this->view->messages = $this->messenger->getMessages();
|
$this->view->messages = $this->messenger->getMessages();
|
||||||
$this->view->theme = new Theme();
|
$this->view->theme = new Theme();
|
||||||
$this->_helper->layout->setLayout('administry');
|
$this->_helper->layout->setLayout('administry');
|
||||||
|
$this->submd=$this->view->config->sub->metadata;
|
||||||
}
|
}
|
||||||
function postDispatch()
|
function postDispatch()
|
||||||
{
|
{
|
||||||
|
@ -17,37 +18,31 @@ class Admin_StatController extends Zend_Controller_Action
|
||||||
function indexAction()
|
function indexAction()
|
||||||
{
|
{
|
||||||
$sql="select (select count(id) from users) as alluser,
|
$sql="select (select count(id) from users) as alluser,
|
||||||
(select count(id) from normalmetadata) as alldata,
|
(select count(id) from $this->submd) as alldata,
|
||||||
(select count(id) as num from dataorder where status=0) as onlinedown,
|
(select count(id) as num from dataorder where status=0 and uuid in (select uuid from $this->submd)) as onlinedown,
|
||||||
(select count(id) as num from dataorder where status=5) as offlinedown,
|
(select count(id) as num from dataorder where status=5 and uuid in (select uuid from $this->submd)) as offlinedown,
|
||||||
(select count(id) as num from offlineapp where ts_approved is not null) as offlinepass,
|
(select count(id) as num from offlineapp where ts_approved is not null and id in (select offlineappid from dataorder where uuid in (select uuid from $this->submd))) as offlinepass,
|
||||||
(select count(id) as num from offlineapp where ts_approved is null) as offlineunfinished,
|
(select count(id) as num from offlineapp where ts_approved is null and id in (select offlineappid from dataorder where uuid in (select uuid from $this->submd))) as offlineunfinished,
|
||||||
(select count(id) as num from dataorder where offlineappid>0 and status=-1) as offlinedenied,
|
(select count(id) as num from dataorder where offlineappid>0 and status=-1 and uuid in (select uuid from $this->submd)) as offlinedenied,
|
||||||
(select count(id) as num from onlineapp) as onlineapp";
|
(select count(id) as num from onlineapp where id in (select onlineappid from dataorder where uuid in (select uuid from $this->submd))) as onlineapp";
|
||||||
$this->view->stat=$this->db->fetchRow($sql);
|
$this->view->stat=$this->db->fetchRow($sql);
|
||||||
|
|
||||||
//下载量统计
|
//下载量统计
|
||||||
$sql = "select sum(num) as num from (select m.filesize/1024 as num,m.title,d.userid from dataorder d left join metadata m on d.uuid=m.uuid where (d.status=0 or d.status=5) and m.filesize>0 group by m.title,d.userid,m.filesize) as t";
|
$sql = "select sum(num) as num from (select m.filesize/1024 as num,m.title,d.userid from dataorder d left join $this->submd m on d.uuid=m.uuid where (d.status=0 or d.status=5) and m.filesize>0 group by m.title,d.userid,m.filesize) as t";
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
$allsize = $res->fetch();
|
$allsize = $res->fetch();
|
||||||
$this->view->allsize = $allsize;
|
$this->view->allsize = $allsize;
|
||||||
|
|
||||||
$sql = "select sum(num) as num from (select m.filesize/1024 as num,m.title,d.userid from dataorder d left join metadata m on d.uuid=m.uuid where d.status=5 and m.filesize>0 group by m.title,d.userid,m.filesize) as t";
|
$sql = "select sum(num) as num from (select m.filesize/1024 as num,m.title,d.userid from dataorder d left join $this->submd m on d.uuid=m.uuid where d.status=5 and m.filesize>0 group by m.title,d.userid,m.filesize) as t";
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
$offlinesize = $res->fetch();
|
$offlinesize = $res->fetch();
|
||||||
$this->view->offlinesize = $offlinesize;
|
$this->view->offlinesize = $offlinesize;
|
||||||
|
|
||||||
$sql = "select sum(num) as num from (select m.filesize/1024 as num,m.title,d.userid from dataorder d left join metadata m on d.uuid=m.uuid where d.status=0 and m.filesize>0 group by m.title,d.userid,m.filesize) as t";
|
$sql = "select sum(num) as num from (select m.filesize/1024 as num,m.title,d.userid from dataorder d left join $this->submd m on d.uuid=m.uuid where d.status=0 and m.filesize>0 group by m.title,d.userid,m.filesize) as t";
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
$onlinesize = $res->fetch();
|
$onlinesize = $res->fetch();
|
||||||
$this->view->onlinesize = $onlinesize;
|
$this->view->onlinesize = $onlinesize;
|
||||||
|
|
||||||
$sql="select sum(configvalue::real)/1024/1024/1024 as num from g6ftpusersettings where userid in (select id from g6ftpusers where name like 'westdc%' or name='newwestdc') and configname='StatsDownloaded'";
|
|
||||||
$res = $this->db->query($sql);
|
|
||||||
$onlinesize = $res->fetch();
|
|
||||||
$this->view->onlineg6size = $onlinesize;
|
|
||||||
|
|
||||||
|
|
||||||
}//indexAction 首页
|
}//indexAction 首页
|
||||||
|
|
||||||
function unitAction()
|
function unitAction()
|
||||||
|
@ -71,7 +66,7 @@ class Admin_StatController extends Zend_Controller_Action
|
||||||
where d.offlineappid>0 and o.unit is not null and d.status>4";*/
|
where d.offlineappid>0 and o.unit is not null and d.status>4";*/
|
||||||
//各单位下载情况,统计的离线申请数据次数
|
//各单位下载情况,统计的离线申请数据次数
|
||||||
$sql = "select count(o.id) as num,o.unit from offlineapp o
|
$sql = "select count(o.id) as num,o.unit from offlineapp o
|
||||||
where o.unit is not null ";
|
where o.unit is not null and o.id in (select offlineappid from dataorder where uuid in (select uuid from $this->submd))";
|
||||||
if ($y)
|
if ($y)
|
||||||
$sql.=" and extract(year from o.ts_created)='$y'";
|
$sql.=" and extract(year from o.ts_created)='$y'";
|
||||||
$sql.=" group by o.unit";
|
$sql.=" group by o.unit";
|
||||||
|
@ -81,7 +76,8 @@ class Admin_StatController extends Zend_Controller_Action
|
||||||
//各单位在线下载情况
|
//各单位在线下载情况
|
||||||
$sql = "select count(d.id) as num,o.unit from dataorder d
|
$sql = "select count(d.id) as num,o.unit from dataorder d
|
||||||
left join onlineapp o on o.id=d.onlineappid
|
left join onlineapp o on o.id=d.onlineappid
|
||||||
where d.onlineappid>0 and o.unit is not null";
|
where d.onlineappid>0 and o.unit is not null
|
||||||
|
and d.uuid in (select uuid from $this->submd)";
|
||||||
if ($y)
|
if ($y)
|
||||||
$sql.=" and extract(year from o.ts_created)='$y'";
|
$sql.=" and extract(year from o.ts_created)='$y'";
|
||||||
$sql.=" group by o.unit";
|
$sql.=" group by o.unit";
|
||||||
|
@ -195,7 +191,32 @@ class Admin_StatController extends Zend_Controller_Action
|
||||||
//按用户统计
|
//按用户统计
|
||||||
function userAction(){
|
function userAction(){
|
||||||
|
|
||||||
$ac = $this->_getParam('ac');
|
$this->view->ac = $ac = $this->_getParam('ac');
|
||||||
|
|
||||||
|
if($ac == "new")
|
||||||
|
{
|
||||||
|
$this->_helper->viewRenderer('user-new');
|
||||||
|
$this->view->year = $year = !empty($this->_getParam('year')) ? $this->_getParam('year'):date("Y");
|
||||||
|
$this->view->by = $by = !empty($this->_getParam('by')) ? $this->_getParam('by'):"month";
|
||||||
|
$userStatistics = new \Statistics\User();
|
||||||
|
|
||||||
|
if($by == "month")
|
||||||
|
{
|
||||||
|
$this->view->data = $userStatistics->getNewUsersByMonth($year);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($by == "year")
|
||||||
|
{
|
||||||
|
$this->view->data = $userStatistics->getNewUsersByYear($year);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($by == "monthavg")
|
||||||
|
{
|
||||||
|
$this->view->data = $userStatistics->getAverageSingupByMonth($year);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if($ac == "get")
|
if($ac == "get")
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
use Helpers\View as view;
|
||||||
|
|
||||||
class Admin_SysController extends Zend_Controller_Action
|
class Admin_SysController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
function preDispatch()
|
function preDispatch()
|
||||||
|
@ -86,6 +88,15 @@ class Admin_SysController extends Zend_Controller_Action
|
||||||
|
|
||||||
}//模板编辑
|
}//模板编辑
|
||||||
|
|
||||||
|
else if($ac=='del'&& !empty($id))
|
||||||
|
{
|
||||||
|
$sql="delete from emailtext where id='$id' ";
|
||||||
|
$rs = $this->db->query($sql);
|
||||||
|
view::Post($this,'模板已删除',-1);
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
else if($ac=='test'&& !empty($id))
|
else if($ac=='test'&& !empty($id))
|
||||||
{
|
{
|
||||||
if(!empty($submit))
|
if(!empty($submit))
|
||||||
|
@ -640,6 +651,71 @@ where t.filesize<1024*5)
|
||||||
$paginator->setView($this->view);
|
$paginator->setView($this->view);
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
$this->view->paginator=$paginator;
|
$this->view->paginator=$paginator;
|
||||||
|
} else if ($ac=='heihefund')
|
||||||
|
{
|
||||||
|
$sql = "SELECT m.title,m.uuid,g.id as gid
|
||||||
|
from metadata m
|
||||||
|
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||||
|
left join datasource on datasource.uuid=m.uuid
|
||||||
|
left join source on datasource.sourceid=source.id
|
||||||
|
left join mdfund mf on mf.uuid=m.uuid
|
||||||
|
left join geonetworkmetadata g on m.uuid=g.uuid
|
||||||
|
where s.status>4 and source.code='heihe' and mf.fid is null
|
||||||
|
ORDER BY m.title DESC;";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage($pages);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
$this->_helper->viewRenderer('problem-md');
|
||||||
|
} else if ($ac=='noemail')
|
||||||
|
{
|
||||||
|
$sql = "SELECT distinct m.title,m.uuid,g.id as gid
|
||||||
|
from metadata m
|
||||||
|
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||||
|
left join role on role.uuid=m.uuid
|
||||||
|
left join geonetworkmetadata g on m.uuid=g.uuid
|
||||||
|
where m.datatype=1 and s.status>4 and m.uuid not in (
|
||||||
|
select role.uuid from role left join responsible res on role.resid=res.id
|
||||||
|
where res.email is not null and role.role in ('resourceProvider','owner','pointOfContact','custodian')
|
||||||
|
)
|
||||||
|
ORDER BY m.title DESC;";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage($pages);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
$this->_helper->viewRenderer('problem-md');
|
||||||
|
} else if ($ac=='unmoved')
|
||||||
|
{
|
||||||
|
$sql = "SELECT distinct m.title,m.uuid,g.id as gid
|
||||||
|
from metadata m
|
||||||
|
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||||
|
left join geonetworkmetadata g on m.uuid=g.uuid
|
||||||
|
left join dataset ds on ds.uuid=m.uuid
|
||||||
|
where s.status>4 and ds.path like '%upload%'
|
||||||
|
ORDER BY m.title DESC;";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage($pages);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
$this->_helper->viewRenderer('problem-md');
|
||||||
}
|
}
|
||||||
$this->view->activeID="btn-".$ac;
|
$this->view->activeID="btn-".$ac;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
use Helpers\View as view;
|
||||||
|
use Helpers\PDO;
|
||||||
|
use Users\Users;
|
||||||
|
|
||||||
class Admin_UserController extends Zend_Controller_Action
|
class Admin_UserController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
function preDispatch()
|
function preDispatch()
|
||||||
|
@ -20,7 +24,7 @@ class Admin_UserController extends Zend_Controller_Action
|
||||||
$uq=$this->db->query($sql);
|
$uq=$this->db->query($sql);
|
||||||
$row=$uq->fetch();
|
$row=$uq->fetch();
|
||||||
|
|
||||||
$sqlt="select count(id) as total from users where usertype='administrator'";
|
$sqlt="select count(id) as total from users where usertype='{$this->view->config->auth->identifier}'";
|
||||||
$uqt=$this->db->query($sqlt);
|
$uqt=$this->db->query($sqlt);
|
||||||
$adminrow=$uqt->fetch();
|
$adminrow=$uqt->fetch();
|
||||||
|
|
||||||
|
@ -44,7 +48,7 @@ class Admin_UserController extends Zend_Controller_Action
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
$paginator->setItemCountPerPage(30);
|
$paginator->setItemCountPerPage(30);
|
||||||
$paginator->setView($this->view);
|
$paginator->setView($this->view);
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||||
$this->view->paginator=$paginator;
|
$this->view->paginator=$paginator;
|
||||||
}//listAction
|
}//listAction
|
||||||
|
|
||||||
|
@ -115,14 +119,48 @@ class Admin_UserController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$select=$this->db->select();
|
$select=$this->db->select();
|
||||||
$select->from('users')
|
$select->from('users')
|
||||||
->where('usertype = ?', 'administrator')
|
->where('usertype = ?', $this->view->config->auth->identifier)
|
||||||
->order('users.id desc');
|
->order('users.id desc');
|
||||||
|
|
||||||
|
|
||||||
$paginator = Zend_Paginator::factory($select);
|
$paginator = Zend_Paginator::factory($select);
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
$paginator->setItemCountPerPage(30);
|
$paginator->setItemCountPerPage(30);
|
||||||
$paginator->setView($this->view);
|
$paginator->setView($this->view);
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||||
$this->view->paginator=$paginator;
|
$this->view->paginator=$paginator;
|
||||||
|
|
||||||
|
$ac = $this->_getParam('ac');
|
||||||
|
|
||||||
|
if($ac == 'sync')
|
||||||
|
{
|
||||||
|
$sql = "SELECT id FROM users WHERE usertype='administrator'";
|
||||||
|
$rs = $this->db->query($sql);
|
||||||
|
$ids = $rs->fetchAll();
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
foreach($ids as $v)
|
||||||
|
{
|
||||||
|
$data[] = $v['id'];
|
||||||
|
}
|
||||||
|
unset($ids);
|
||||||
|
|
||||||
|
$ids = join(",",$data);
|
||||||
|
|
||||||
|
$gn_sql = "update users set profile='Administrator' where id in ($ids)";
|
||||||
|
$gn_db = new PDO(array(
|
||||||
|
'host'=> $this->view->config->geonetwork->params->host,
|
||||||
|
'port' => 5432,
|
||||||
|
'user' => $this->view->config->geonetwork->params->username,
|
||||||
|
'pwd' => $this->view->config->geonetwork->params->password ,
|
||||||
|
'db' => $this->view->config->geonetwork->params->dbname
|
||||||
|
));
|
||||||
|
|
||||||
|
$gn_db->exec("update users set profile='Editor' where id>1 and profile='Administrator'");
|
||||||
|
$gn_db->exec($gn_sql);
|
||||||
|
|
||||||
|
view::Post($this,"同步成功!",-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showAction()
|
function showAction()
|
||||||
|
@ -131,10 +169,10 @@ class Admin_UserController extends Zend_Controller_Action
|
||||||
if (isset($id))
|
if (isset($id))
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$sql="select * from users where id=?";
|
$user = new \Users\Users;
|
||||||
$result=$this->db->query($sql,$id);
|
$this->view->infos=$user->getUser($id);
|
||||||
$rows = $result->fetch();
|
$this->view->usertypes = $user->getUserType();
|
||||||
$this->view->infos=$rows;
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->messenger->addMessage($e->getMessage());
|
$this->messenger->addMessage($e->getMessage());
|
||||||
}
|
}
|
||||||
|
@ -203,6 +241,7 @@ class Admin_UserController extends Zend_Controller_Action
|
||||||
$updates=array();
|
$updates=array();
|
||||||
if (isset($id))
|
if (isset($id))
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!empty($newpwd)&&!empty($cfnewpwd))
|
if(!empty($newpwd)&&!empty($cfnewpwd))
|
||||||
{
|
{
|
||||||
if($newpwd==$cfnewpwd)
|
if($newpwd==$cfnewpwd)
|
||||||
|
@ -230,6 +269,7 @@ class Admin_UserController extends Zend_Controller_Action
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->messenger->addMessage($e->getMessage());
|
$this->messenger->addMessage($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_redirect("/admin/user/show/id/$id");
|
$this->_redirect("/admin/user/show/id/$id");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -7,12 +7,7 @@
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('数据管理');
|
$this->breadcrumb('数据管理');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
$this->headLink()->appendStylesheet('/static/js/uploadify/uploadify.css');
|
$this->theme->AppendPlus($this,"uploadify");
|
||||||
$this->headScript()->appendFile('/static/js/jquery-1.7.2.min.js');
|
|
||||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
|
||||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
|
||||||
$this->headScript()->appendFile('/static/js/uploadify/swfobject.js');
|
|
||||||
$this->headScript()->appendFile('/static/js/uploadify/jquery.uploadify.v2.1.4.min.js');
|
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div id="leftPanel">
|
||||||
<?= $this->partial('data/left.phtml'); ?>
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
@ -30,73 +25,87 @@
|
||||||
<input type="hidden" name="submit" value="1" />
|
<input type="hidden" name="submit" value="1" />
|
||||||
|
|
||||||
<p>注:可选择多个文件<br />
|
<p>注:可选择多个文件<br />
|
||||||
<ul id="datalist"></ul>
|
<div id="datalist">
|
||||||
|
</div>
|
||||||
<input id="file_upload" name="Filedata" type="file" />
|
<input id="file_upload" name="Filedata" type="file" />
|
||||||
<input type="button" class="btn btn-small" onclick="$('#file_upload').uploadifyUpload();" value="上传" />
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
var _this = {
|
||||||
$('#file_upload').uploadify({
|
SessionID : '<?php echo session_id(); ?>'
|
||||||
'uploader' : '/static/js/uploadify/uploadify.swf',
|
};
|
||||||
'scriptData': {'PHPSESSID' : '<?php echo session_id(); ?>'},
|
var uploader;
|
||||||
'script' : '/admin/data/upload/<?php if(!empty($this->uuid)) echo "uuid/".$this->uuid; ?>',
|
var param;
|
||||||
'cancelImg' : '/static/js/uploadify/cancel.png',
|
param = {
|
||||||
'folder' : '/uploads',
|
"PHPSESSID" : _this.SessionID,
|
||||||
'multi' : true,
|
"multi" : 'yes'
|
||||||
'auto' : false,
|
};
|
||||||
'displayData' : 'speed',
|
$(function() {
|
||||||
'buttonImg' : '/static/js/uploadify/selectfile.gif',
|
$('#file_upload').uploadify({
|
||||||
'onComplete' : function(event, ID, fileObj, response, data) {
|
'swf' : '/js/lib/uploadify/uploadify.swf',
|
||||||
var obj = jQuery.parseJSON(response);
|
'uploader' : '/admin/data/upload/<?php if(!empty($this->uuid)) echo "uuid/".$this->uuid; ?>',
|
||||||
var html;
|
'multi' : true,
|
||||||
if(obj.error=='')
|
'auto' : true,
|
||||||
{html = obj.html;}else{html = obj.error;}
|
'fileTypeExts' : '*',
|
||||||
$('<li/>', {
|
'onUploadSuccess' : function(file, data, response) {
|
||||||
"id":'uploadedItem_'+obj.attid,
|
upload.onsuccess(file, data, response);
|
||||||
"class":'uploadifyQueueItem',
|
},
|
||||||
"html": html
|
'onUploadStart' : function(file) {
|
||||||
}).appendTo('#datalist');
|
$('#file_upload').uploadify('settings','formData',param);
|
||||||
$('#deletebtn_'+obj.attid).bind('click', function() {
|
}
|
||||||
deleteatt(obj.attid);
|
});
|
||||||
});
|
});
|
||||||
},
|
var upload = {
|
||||||
'onError' : function (event,ID,fileObj,errorObj) {
|
onsuccess : function(file, data, response){
|
||||||
alert(errorObj.type + ' Error: ' + errorObj.info);
|
_data = $.parseJSON(data);
|
||||||
}
|
if(!$.isEmptyObject(_data.error))
|
||||||
});
|
{
|
||||||
function deleteatt(id){
|
alert(_data.error);
|
||||||
$.ajax({
|
}else{
|
||||||
'type': "POST",
|
$('#datalist').append(upload.makeFileHtml(_data));
|
||||||
'url': "/admin/data/attachments/",
|
|
||||||
'data': 'uuid=<?php echo $this->uuid?>&mdattdel='+id,
|
|
||||||
'success': function(data){
|
|
||||||
if(data==null){Alert('遇到错误,请重试');return false;}
|
|
||||||
if(data.error!=null){Alert(data.error);return false;}
|
|
||||||
if(data.status==1){$('#uploadedItem_'+id).fadeOut("slow");}
|
|
||||||
},
|
|
||||||
'beforeSend':function(){},
|
|
||||||
'complete':function(){},
|
|
||||||
'timeout': 20000,
|
|
||||||
'dataType': 'json',
|
|
||||||
'error': function(){Alert('处理中出现问题,请重试');}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
makeFileHtml : function(data){
|
||||||
|
return '<div class="alert alert-success">'
|
||||||
|
+ '<button type="button" class="close" data-dismiss="alert" onclick="upload.deleteFile('+data.id+')"><i class="icon-trash icon-white"></i></button>'
|
||||||
|
+ '<a href="/service/attach/id/' + data.id + '">' +data.realname + '</a>'
|
||||||
|
+'<input type="hidden" name="attid" value="'+data.id+'"></input>'
|
||||||
|
+'</div>';
|
||||||
|
},
|
||||||
|
deleteFile : function(id){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/attachments/',
|
||||||
|
'data':'uuid=<?php echo $this->uuid?>&mdattdel='+id,
|
||||||
|
'success':function(data){
|
||||||
|
if(typeof(data) == 'undefined')
|
||||||
|
{
|
||||||
|
alert("数据源错误,请联系管理员");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$.isEmptyObject(data.error))
|
||||||
|
{
|
||||||
|
alert(data.error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'error': function(){
|
||||||
|
alert('附件删除出错');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
$.getJSON("/admin/data/getatts/uuid/<?php echo $this->uuid;?>", function(data) {
|
$.getJSON("/admin/data/getatts/uuid/<?php echo $this->uuid;?>", function(data) {
|
||||||
if(data)
|
if(data)
|
||||||
{
|
{
|
||||||
$.each(data, function(key, val) {
|
$.each(data, function(key, val) {
|
||||||
$('<li/>', {
|
$('#datalist').append(upload.makeFileHtml(val));
|
||||||
"id":'uploadedItem_'+val['id'],
|
|
||||||
"class":'uploadifyQueueItem',
|
|
||||||
"html": val['html']
|
|
||||||
}).appendTo('#datalist');
|
|
||||||
$('#deletebtn_'+val['id']).bind('click', function() {
|
|
||||||
deleteatt(val['id']);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
?>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span10">
|
||||||
|
<h3>数据导入<small>文件预处理</small></h3>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
处理文件:<?= $this->file ?>...
|
||||||
|
|
||||||
|
<h5>文件信息</h5>
|
||||||
|
<ul>
|
||||||
|
<li>文件行數:<?= $this->Count ?></li>
|
||||||
|
<li>文件大小:<?= $this->Size ?></li>
|
||||||
|
<li>文件类型:<?= $this->Type ?></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<h5 class="error-alerts" style="display: none;">错误消息</h5>
|
||||||
|
<ul id="errors" class="error-alerts" style="display: none;">
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h6 id="error-loading"></h6>
|
||||||
|
|
||||||
|
<a href="javascript:void(0);" id="clt-next" class="btn btn-success disabled">下一步</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/dataimport/ac/check',
|
||||||
|
'data':'file=<?= $this->file ?>',
|
||||||
|
'success':function(data){
|
||||||
|
if (data!=null)
|
||||||
|
{
|
||||||
|
if(data.status == true)
|
||||||
|
{
|
||||||
|
$('#clt-next').removeClass('disabled');
|
||||||
|
$('#clt-next').attr('href','/admin/data/dataimport/ac/target?file=<?= $this->file ?>');
|
||||||
|
alert("數據完整性檢查成功,可以進行下一步");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$('.error-alerts').show();
|
||||||
|
$.each(data.status,function(index,value){
|
||||||
|
$('#errors').append("<li>"+value+"</li>");
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
alert('处理中出现错误');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'beforeSend' : function(){
|
||||||
|
$('#error-loading').html("正在對文件進行初始化檢查......");
|
||||||
|
$('#error-loading').show();
|
||||||
|
},
|
||||||
|
'complete' : function(){
|
||||||
|
$('#error-loading').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -0,0 +1,238 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
?>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span10">
|
||||||
|
<h3>数据导入<small>选择导入目标</small></h3>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
导入文件:<?= $this->file ?>
|
||||||
|
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<h5>数据库:</h5>
|
||||||
|
<label class="radio">
|
||||||
|
<input type="radio" class="ctl-schema-btn" value="<?= $this->schema ?>" name="schema" selected readonly> <?= $this->schema ?>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="span3" id="table-list">
|
||||||
|
</div>
|
||||||
|
<div class="span4" id="field-list">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr class="clear" />
|
||||||
|
|
||||||
|
<h5 class="error-alerts" style="display: none;">消息</h5>
|
||||||
|
<ul id="errors" class="error-alerts" style="display: none;">
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h6 id="error-loading"></h6>
|
||||||
|
|
||||||
|
<form action="/admin/data/dataimport/ac/checktables" id="schema-form">
|
||||||
|
<input type="hidden" name="file" value="<?= $this->file ?>">
|
||||||
|
<input type="hidden" name="schema" value="">
|
||||||
|
<input type="hidden" name="table" value="" id="input-table">
|
||||||
|
<button type="button" id="ctl-next" class="btn btn-success disabled" disabled>下一步</button>
|
||||||
|
<button type="button" id="ctl-import" class="btn btn-info" disabled="disabled" style="display: none;">导入数据表</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
$('#ctl-next').click(function(){
|
||||||
|
ctl.checkTable();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#ctl-import").click(function(){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/dataimport/ac/import',
|
||||||
|
'data':$('#schema-form').serialize(),
|
||||||
|
'success':function(data){
|
||||||
|
|
||||||
|
if (data!=true)
|
||||||
|
{
|
||||||
|
if(!$.isEmptyObject(data))
|
||||||
|
$(".error-alerts").show();
|
||||||
|
$("#errors").html(data.join("<br />"));
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
$('#ctl-import').remove();
|
||||||
|
$("#errors").html("数据导入成功!页面将自动跳转到数据可视化管理页面");
|
||||||
|
setTimeout("top.location = '/admin/data/visual';",3000);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'beforeSend' : function(){
|
||||||
|
$('#error-loading').html("正在进行数据导入......");
|
||||||
|
$('#error-loading').show();
|
||||||
|
$('#ctl-import').attr('disabled','disabled');
|
||||||
|
},
|
||||||
|
'complete' : function(){
|
||||||
|
$('#error-loading').hide();
|
||||||
|
},
|
||||||
|
'error' : function(){
|
||||||
|
$('#ctl-import').removeAttr('disabled');
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.ctl-schema-btn').click(function(){
|
||||||
|
$('#schema-form input[name=schema]').val($(this).val());
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/dataimport/ac/gettables',
|
||||||
|
'data':'schema=' + $(this).val(),
|
||||||
|
'success':function(data){
|
||||||
|
if (data!=null)
|
||||||
|
{
|
||||||
|
if($.isEmptyObject(data))
|
||||||
|
{
|
||||||
|
ctl.disableNext();
|
||||||
|
alert("此数据库中尚无数据表");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$('#table-list').html('<h5>选择数据表</h5>');
|
||||||
|
|
||||||
|
$.each(data,function(index,value){
|
||||||
|
$('#table-list').append('<label class="radio">'
|
||||||
|
+ '<input type="radio" value="'+value.tablename+'" name="table" class="ctl-table-name">'
|
||||||
|
+ value.tablename
|
||||||
|
+"</label>"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.ctl-table-name').click(function(){
|
||||||
|
$('#schema-form input[name=table]').val($(this).val());
|
||||||
|
if($('#schema-form input[name=schema]').val() != '' && $('#schema-form input[name=table]').val() != '')
|
||||||
|
{
|
||||||
|
ctl.enableNext();
|
||||||
|
}
|
||||||
|
ctl.getFields();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#clt-next').removeClass('disabled');
|
||||||
|
$('#clt-next').attr('href','/admin/data/dataimport/ac/target?file=<?= $this->file ?>');
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}else{
|
||||||
|
alert('处理中出现错误');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'beforeSend' : function(){
|
||||||
|
$('#error-loading').html("正在加载数据表......");
|
||||||
|
$('#error-loading').show();
|
||||||
|
$('#table-list').html('');
|
||||||
|
$('.ctl-table-name').unbind();
|
||||||
|
},
|
||||||
|
'complete' : function(){
|
||||||
|
$('#error-loading').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var ctl = {
|
||||||
|
enableNext : function(){
|
||||||
|
$('#ctl-next').removeClass("disabled");
|
||||||
|
$('#ctl-next').removeAttr("disabled");
|
||||||
|
},
|
||||||
|
disableNext : function(){
|
||||||
|
$('#ctl-next').addClass("disabled");
|
||||||
|
$('#ctl-next').attr("disabled","disabled");
|
||||||
|
},
|
||||||
|
checkTable : function(){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/dataimport/ac/checktables',
|
||||||
|
'data':$('#schema-form').serialize(),
|
||||||
|
'success':function(data){
|
||||||
|
|
||||||
|
if (data!=true)
|
||||||
|
{
|
||||||
|
if(!$.isEmptyObject(data))
|
||||||
|
$(".error-alerts").show();
|
||||||
|
$("#errors").html(data.join("<br />"));
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
$(".error-alerts").show();
|
||||||
|
$('#errors').html('数据准备完成,可以进行导入操作');
|
||||||
|
|
||||||
|
$('.ctl-schema-btn').attr("disabled","disabled");
|
||||||
|
$('.ctl-table-name').attr("disabled","disabled");
|
||||||
|
|
||||||
|
$('#ctl-next').hide();
|
||||||
|
$('#ctl-show-table').hide();
|
||||||
|
$('#ctl-import').show();
|
||||||
|
$('#ctl-import').removeAttr("disabled");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'beforeSend' : function(){
|
||||||
|
$('#error-loading').html("正在校验数据是否可以导入......");
|
||||||
|
$('#error-loading').show();
|
||||||
|
},
|
||||||
|
'complete' : function(){
|
||||||
|
$('#error-loading').hide();
|
||||||
|
},
|
||||||
|
'error' : function(){
|
||||||
|
$(".error-alerts").show();
|
||||||
|
$("#errors").html("数据表字段检测失败,请检查导入得文件是否于数据表中得字段对应");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getFields : function (){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/dataimport/ac/getfields',
|
||||||
|
'data':$('#schema-form').serialize(),
|
||||||
|
'success':function(data){
|
||||||
|
|
||||||
|
if($.isEmptyObject(data))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(".error-alerts").show();
|
||||||
|
|
||||||
|
var html = new Array();
|
||||||
|
|
||||||
|
html.push('<span>数据表字段信息</span>');
|
||||||
|
html.push('<table class="table table-striped table-bordered" style="width:300px;">');
|
||||||
|
html.push('<thead><th>排序</th><th>列名</th><th>数据类型</th></thead>');
|
||||||
|
|
||||||
|
$.each(data,function(index,value){
|
||||||
|
html.push("<tr><td>"+value.dtd_identifier+"</td><td>" + value.column_name + "</td><td>" + value.data_type + "</td></tr>");
|
||||||
|
});
|
||||||
|
|
||||||
|
html.push('</table>');
|
||||||
|
|
||||||
|
$('#errors').html(html.join(""));
|
||||||
|
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'beforeSend' : function(){
|
||||||
|
$('#error-loading').html("正在获取数据表信息......");
|
||||||
|
$('#error-loading').show();
|
||||||
|
},
|
||||||
|
'complete' : function(){
|
||||||
|
$('#error-loading').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,151 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->theme->AppendPlus($this,"jquery-fileupload");
|
||||||
|
?>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span10">
|
||||||
|
<h3>数据导入</h3>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<label>上传文件,请选择CSV文件进行上传</label>
|
||||||
|
|
||||||
|
<span class="btn btn-success fileinput-button file-upload-ctls">上传文件<input id="fileupload" type="file" name="FileData"></span>
|
||||||
|
<a href="javascript:void(0);" class="btn btn-info" id="ctl-show-files">查看已上传的文件</a>
|
||||||
|
<div class="progress" id="pdf-upload-progress" style="display: none;">
|
||||||
|
<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="uploadedFile"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var jqXHR = $('#fileupload').fileupload({
|
||||||
|
url: '/admin/data/dataimport/ac/upload',
|
||||||
|
dataType: 'json',
|
||||||
|
done: function (e, data) {
|
||||||
|
|
||||||
|
if(typeof(data.result.error) != 'undefined' && data.result.error != 0)
|
||||||
|
{
|
||||||
|
alert(data.result.error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($('#uploadedFile').html() == "")
|
||||||
|
$('#uploadedFile').html(upload.makeFileHtml(data.result));
|
||||||
|
else
|
||||||
|
$('#uploadedFile').append(upload.makeFileHtml(data.result));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
},
|
||||||
|
stop : function (e) {
|
||||||
|
$('#pdf-upload-progress').hide();
|
||||||
|
$('.file-upload-ctls').show();
|
||||||
|
},//stop
|
||||||
|
start : function (e) {
|
||||||
|
$('.file-upload-ctls').hide();
|
||||||
|
$('#pdf-upload-progress .progress-bar').css('width', 0 + '%');
|
||||||
|
$('#pdf-upload-progress').show();
|
||||||
|
},//start
|
||||||
|
progressall: function (e, data) {
|
||||||
|
var progress = parseInt(data.loaded / data.total * 100, 10);
|
||||||
|
$('#pdf-upload-progress .progress-bar').css(
|
||||||
|
'width',
|
||||||
|
progress + '%'
|
||||||
|
);
|
||||||
|
},//progressall
|
||||||
|
add: function (e, data) {
|
||||||
|
if($('input[name=attid]').length >= 1)
|
||||||
|
{
|
||||||
|
upload.deleteFile($('input[name=attid]').val());
|
||||||
|
$('file-alert').alert('close')
|
||||||
|
}
|
||||||
|
|
||||||
|
data.process().done(function () {
|
||||||
|
data.submit();
|
||||||
|
});
|
||||||
|
}//add
|
||||||
|
}).prop('disabled', !$.support.fileInput)
|
||||||
|
.parent().addClass($.support.fileInput ? undefined : 'disabled');
|
||||||
|
//file upload end
|
||||||
|
|
||||||
|
$('#ctl-show-files').click(function(){
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/dataimport/ac/files',
|
||||||
|
'data':'',
|
||||||
|
'success':function(data){
|
||||||
|
if (data!=null)
|
||||||
|
{
|
||||||
|
if($.isEmptyObject(data))
|
||||||
|
{
|
||||||
|
alert("目前沒有文件");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($('#uploadedFile').html() == "")
|
||||||
|
$('#uploadedFile').html(upload.makeFileList(data));
|
||||||
|
else
|
||||||
|
$('#uploadedFile').append(upload.makeFileList(data));
|
||||||
|
|
||||||
|
$('#ctl-show-files').attr('disabled','disabled');
|
||||||
|
$("#ctl-show-files").unbind( "click" );
|
||||||
|
}else{
|
||||||
|
alert('处理中出现错误');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000
|
||||||
|
});
|
||||||
|
|
||||||
|
});//show files
|
||||||
|
});
|
||||||
|
|
||||||
|
var upload = {
|
||||||
|
makeFileHtml : function(data){
|
||||||
|
return '<div class="alert alert-success">'
|
||||||
|
+ '<span class="ctl-files">'+data.file+'</span>'
|
||||||
|
+ ' <a href="/admin/data/dataimport/ac/prepare/?file='+ encodeURI(data.file) +'">导入数据</a>'
|
||||||
|
+ '<a href="javascript:void(0)" onclick="upload.delete(this,\''+data.file+'\')" class="pull-right">删除</a>'
|
||||||
|
+ "</div>";
|
||||||
|
},
|
||||||
|
makeFileList : function(data){
|
||||||
|
|
||||||
|
var li = [];
|
||||||
|
|
||||||
|
$.each(data,function(k,v){
|
||||||
|
li.push('<div class="alert alert-success ctl-files">'
|
||||||
|
+ '<span class="ctl-files">'+v+'</span>'
|
||||||
|
+ ' <a href="/admin/data/dataimport/ac/prepare/?file='+ encodeURI(v) +'">导入数据</a>'
|
||||||
|
+ '<a href="javascript:void(0);" onclick="upload.delete(this,\''+v+'\')" class="pull-right">删除</a>'
|
||||||
|
+ "</div>");
|
||||||
|
});
|
||||||
|
|
||||||
|
return li.join("");
|
||||||
|
},
|
||||||
|
delete : function(dom,file){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/dataimport/ac/delete',
|
||||||
|
'data':'file='+file,
|
||||||
|
'success':function(data){
|
||||||
|
if(data.success == true)
|
||||||
|
$(dom).parent('div').remove();
|
||||||
|
else
|
||||||
|
alert("failed");
|
||||||
|
},
|
||||||
|
'timeout': 30000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -29,41 +29,47 @@ $this->theme->AppendPlus($this,'colorbox');
|
||||||
<?php if(!empty($this->msg)) { ?>
|
<?php if(!empty($this->msg)) { ?>
|
||||||
<?= $this->msg ?>
|
<?= $this->msg ?>
|
||||||
<?php } else{ ?>
|
<?php } else{ ?>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||||
|
<h4>提示</h4>
|
||||||
|
如果元数据中标题发生了变更,在DOI中也需要变更时需要在这里点击“提交”按钮才能生效
|
||||||
|
</div>
|
||||||
<form class="form-horizontal" method="post">
|
<form class="form-horizontal" method="post">
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="doi">doi</label>
|
<label class="control-label" for="doi">doi</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="doi" name="doi" readonly="readonly" value="<?= (isset($this->data['doi'])&&!empty($this->data['doi'])) ? $this->data['doi']:"doi:10.3972/westdc.x.2013.db" ?>" />
|
<input type="text" id="doi" name="doi" readonly="readonly" class="input-block-level"
|
||||||
|
value="<?= (isset($this->data['doi'])&&!empty($this->data['doi'])) ? $this->data['doi']:"doi:10.3972/westdc.x.2013.db" ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="uuid">uuid</label>
|
<label class="control-label" for="uuid">uuid</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="uuid" name="uuid" readonly="readonly" value="<?= isset($this->data['uuid']) ? $this->data['uuid']:"" ?>" />
|
<input type="text" id="uuid" name="uuid" readonly="readonly" value="<?= isset($this->data['uuid']) ? $this->data['uuid']:"" ?>" class="input-block-level" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="publisher">发布者</label>
|
<label class="control-label" for="publisher">发布者</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="publisher" name="publisher" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>" />
|
<input type="text" id="publisher" name="publisher" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>" class="input-block-level" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="url">url</label>
|
<label class="control-label" for="url">url</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="url" name="url" value="<?= isset($this->data['url']) ? $this->data['url']:"" ?>" />
|
<input type="text" id="url" name="url" value="<?= isset($this->data['url']) ? $this->data['url']:"" ?>" class="input-block-level"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="title">标题</label>
|
<label class="control-label" for="title">标题</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="title" name="title" readonly="readonly" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" />
|
<input type="text" id="title" name="title" readonly="readonly" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>" class="input-block-level"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="title_en">英文标题</label>
|
<label class="control-label" for="title_en">英文标题</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="title_en" name="title_en" readonly="readonly" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:"" ?>" />
|
<input type="text" id="title_en" name="title_en" readonly="readonly" value="<?= isset($this->data['title_en']) ? $this->data['title_en']:"" ?>" class="input-block-level" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
|
@ -59,7 +59,9 @@ table thead tr th {background:#EBF2F6;}
|
||||||
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
|
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
|
||||||
<a href="/admin/data/doi/ac/convert/uuid/<?= $item['uuid']?>">导出</a>
|
<a href="/admin/data/doi/ac/convert/uuid/<?= $item['uuid']?>">导出</a>
|
||||||
<a href="javascript:void(0);" rel="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>" class="verified_btn">验证</a>
|
<a href="javascript:void(0);" rel="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>" class="verified_btn">验证</a>
|
||||||
|
<?php if(empty($item['ts_published'])) {?>
|
||||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
||||||
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
@ -91,7 +91,7 @@ table thead tr th {background:#EBF2F6;}
|
||||||
<td><?= $item['fund_type'] ?></td>
|
<td><?= $item['fund_type'] ?></td>
|
||||||
<th><?= $item['mds'] ?></th>
|
<th><?= $item['mds'] ?></th>
|
||||||
<td>
|
<td>
|
||||||
<a href="/author/fund/ac/dataview/id/<?= $item['id'] ?>">查看数据</a>
|
<a href="/data/fund/ac/dataview/id/<?= $item['id'] ?>">查看数据</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
@ -2,17 +2,87 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('数据管理');
|
$this->breadcrumb('数据管理');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$Theme = new Theme;
|
||||||
|
$Theme->AppendPlus($this,'highstock');
|
||||||
?>
|
?>
|
||||||
<div id="divContent">
|
<div class="row-fluid">
|
||||||
<div id="leftPanel">
|
<div class="span2">
|
||||||
<?= $this->partial('data/left.phtml'); ?>
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="rightPanel">
|
<div class="span10">
|
||||||
|
<h2>元数据管理 <small>概况</small></h2>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<ul class="unstyled">
|
||||||
|
<li>元数据总条数:<?= $this->total ?></li>
|
||||||
|
<li>待评审的元数据:<a href="/admin/review/accept"><?= $this->review_accept ?></a></li>
|
||||||
|
<li>已评审的元数据:<a href="/admin/review/reviewed"><?= $this->review_finish ?></a></li>
|
||||||
|
<li>可视化数据:<a href="/admin/data/visual"><?= $this->visual ?></a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div id="container">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<script>
|
||||||
|
$(function () {
|
||||||
|
Highcharts.setOptions({
|
||||||
|
lang: {
|
||||||
|
months : [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
||||||
|
//months : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||||
|
weekdays: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日']
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$('#container').highcharts('StockChart', {
|
||||||
|
|
||||||
|
title : {
|
||||||
|
text : '元数据数量增加情况'
|
||||||
|
},
|
||||||
|
|
||||||
|
rangeSelector : {
|
||||||
|
selected : 1,
|
||||||
|
inputEnabled: $('#container').width() > 480
|
||||||
|
},
|
||||||
|
|
||||||
|
credits : {
|
||||||
|
enabled : false
|
||||||
|
},
|
||||||
|
|
||||||
|
tooltip : {
|
||||||
|
dateTimeLabelFormats :{
|
||||||
|
day:"%A, %b %e, %Y-%m-%d",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
xAxis : {
|
||||||
|
dateTimeLabelFormats : {
|
||||||
|
day:"%Y/%m/%d",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
var chart = $('#container').highcharts();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
'url': '?time=<?= time() ?>',
|
||||||
|
'data': '',
|
||||||
|
'method': 'GET',
|
||||||
|
'dataType': 'json',
|
||||||
|
'success': function(data){
|
||||||
|
chart.addSeries({
|
||||||
|
name: "元数据个数",
|
||||||
|
data: data,
|
||||||
|
type : 'line'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'global' : true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -1,22 +1,13 @@
|
||||||
<ul>
|
<div class="well" style="padding:8px 0">
|
||||||
<li class="title">数据管理</li>
|
<ul class="nav nav-list">
|
||||||
<li><a href="/admin/data/md">元数据管理</a></li>
|
<li class="nav-header"><h4>数据管理</h4></li>
|
||||||
<li><a href="/admin/data/newdata">新建元数据</a></li>
|
<li class="divider"></li>
|
||||||
<li><a href="/admin/data/author">数据作者管理</a></li>
|
<li><a href="/admin/data/md">元数据管理</a></li>
|
||||||
<li><a href="/admin/data/version">数据版本管理</a></li>
|
<li><a href="/admin/data/author">数据作者管理</a></li>
|
||||||
<li><a href="/admin/data/comment">数据反馈管理</a></li>
|
<li><a href="/admin/data/version">数据版本管理</a></li>
|
||||||
<li><a href="/admin/data/reference">数据文献管理</a></li>
|
<li><a href="/admin/data/comment">数据反馈管理</a></li>
|
||||||
<li><a href="/admin/data/attachments">数据附件管理</a></li>
|
<li><a href="/admin/data/attachments">数据附件管理</a></li>
|
||||||
<!--
|
<li><a href="/admin/data/visual">数据可视化管理</a></li>
|
||||||
<li><a href="/admin/data/import">上传元数据文件</a></li>
|
<li><a href="/admin/data/dataimport">数据入库处理</a></li>
|
||||||
<li><a href="/admin/data/batchimport">导入服务器元数据目录</a></li>
|
</ul>
|
||||||
<li><a href="/admin/data/datafileimport">导入数据目录</a></li>
|
</div>
|
||||||
<li><a href="/admin/data/sync">同步GeoNetwork元数据</a></li>
|
|
||||||
<li><a href="/admin/data/datasetcd">特色数据集管理</a></li>
|
|
||||||
<li><a href="/admin/data/newsletter">数据中心通讯管理</a></li>
|
|
||||||
<li><a href="/admin/data/feature">特色推荐</a></li> -->
|
|
||||||
<li><a href="/admin/data/source">专题管理</a></li>
|
|
||||||
<li><a href="/admin/data/project">汇交计划</a></li>
|
|
||||||
<li><a href="/admin/data/fund">支持项目</a></li>
|
|
||||||
<li><a href="/admin/data/doi">DOI</a></li>
|
|
||||||
</ul>
|
|
|
@ -2,7 +2,6 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
@ -10,74 +9,80 @@
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
$this->theme->AppendPlus($this,'colorbox');
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('data/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
<div id="rightPanel">
|
</div>
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<div class="span10">
|
||||||
<div id="message">
|
|
||||||
<?php if ($this->msg) : ?>
|
|
||||||
<p><?php echo $this->msg; ?></p>
|
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
|
||||||
<p><?php echo $msg; ?></p>
|
|
||||||
<?php endforeach;endif; ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<div class="right_title">元数据管理</div>
|
<h3>元数据管理</h3>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<div class="search">
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<form action="" method="get">
|
<div id="message">
|
||||||
<div class="input-prepend">
|
<?php if ($this->msg) : ?>
|
||||||
<input type="hidden" name="search" value='1' />
|
<p><?php echo $this->msg; ?></p>
|
||||||
<input class="span2 search-query" type="text" name="keyword" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字"/>
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
<input type="submit" class="btn" value="搜索" />
|
<p><?php echo $msg; ?></p>
|
||||||
</div>
|
<?php endforeach;endif; ?>
|
||||||
</form>
|
</div>
|
||||||
</div><!-- search DIV -->
|
<?php endif; ?>
|
||||||
|
|
||||||
<a href="/admin/data/md/down/1">下载全部xml元数据</a>
|
<div class="search" style="overflow:hidden;">
|
||||||
<?php if (count($this->paginator)): ?>
|
<div class="span6">
|
||||||
<div class="datalist">
|
<form action="" method="get" class="form-search">
|
||||||
<ul>
|
<div class="input-append">
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
<input type="hidden" name="search" value='1' />
|
||||||
<li class="well well-small">
|
<input class="span12" type="text" name="keyword" value="<?php echo $this->keyword; ?>" placeholder="搜索关键字"/>
|
||||||
<h4><a href="/data/<?= $item['uuid']; ?>" class="title"><?= $item['title']; ?></a></h4>
|
<button type="submit" class="btn">搜索</button>
|
||||||
<p>大小:<?= $item['filesize']; ?>M,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>,查看:<?= $item['viewed']; ?>次。</p>
|
</div>
|
||||||
<p>
|
</form>
|
||||||
操作:
|
</div>
|
||||||
<a href="/service/geonetwork?url=metadata.edit?id=<?= $item['gid']; ?>" target="_blank">编辑</a> |
|
<div class="span6 text-right">
|
||||||
<a href="/admin/data/md/delete/<?= $item['uuid']; ?>">删除</a> |
|
<a href="/admin/data/md/down/1">下载全部xml元数据</a>
|
||||||
<a href="/admin/data/sync/uuid/<?= $item['uuid']; ?>">同步</a> |
|
</div>
|
||||||
<a href="/admin/data/reference/show/<?php echo $item['uuid'];?>">文献管理</a> |
|
</div><!-- search DIV -->
|
||||||
<a href="/admin/data/md/att/1/uuid/<?php echo $item['uuid'];?>">附件管理</a> |
|
|
||||||
<a href="/admin/data/comment/uuid/<?php echo $item['uuid'];?>">反馈管理</a> |
|
<?php if (count($this->paginator)): ?>
|
||||||
<a href="/admin/data/author/uuid/<?php echo $item['uuid'];?>">作者管理</a> |
|
<div class="datalist">
|
||||||
<a href="/admin/data/version/uuid/<?php echo $item['uuid'];?>">版本管理</a> |
|
<ul class="unstyled">
|
||||||
<?php if (@!is_numeric($item['mdstatus'])) : ?>
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
<a href="/admin/review/addon/uuid/<?php echo $item['uuid'];?>">放入元数据评审</a> |
|
<li class="well well-small">
|
||||||
<?php endif; ?>
|
<h4><a href="/data/<?= $item['uuid']; ?>" class="title"><?= $item['title']; ?></a></h4>
|
||||||
<a href="/admin/data/source/do/datasource/uuid/<?php echo $item['uuid'];?>">编辑数据来源</a> |
|
<p>大小:<?= $item['filesize']; ?>M,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>,查看:<?= $item['viewed']; ?>次。</p>
|
||||||
<?php if(!empty($item['datasetid'])):?>
|
<?php if($item['author']) :?>
|
||||||
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">数据路径</a> |
|
<p>数据贡献者:<?= $item['author']; ?></p>
|
||||||
<a href="/admin/data/dataset/ac/import/uuid/<?php echo $item['uuid'];?>" class="iframe">重新导入数据目录</a> |
|
<?php endif;?>
|
||||||
<?php else: ?>
|
<p class="content"><?= $item['description']; ?></p>
|
||||||
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">设置数据路径</a> |
|
<p>
|
||||||
<?php endif;?>
|
操作:
|
||||||
<a href="/admin/down/sendmail/uuid/<?php echo $item['uuid'];?>" title="向数据下载者发送通知邮件">邮件通知</a> |
|
<a href="/service/geonetwork?url=metadata.edit?id=<?= $item['gid']; ?>" target="_blank">编辑</a> |
|
||||||
<a href="/admin/data/fund/uuid/<?php echo $item['uuid'];?>">支持项目</a> |
|
<a href="/admin/data/md/delete/<?= $item['uuid']; ?>">删除</a> |
|
||||||
<a href="/admin/data/doi/uuid/<?php echo $item['uuid'];?>">DOI</a>
|
<a href="/admin/data/md/att/1/uuid/<?php echo $item['uuid'];?>">附件管理</a> |
|
||||||
</p>
|
<a href="/admin/data/comment/uuid/<?php echo $item['uuid'];?>">反馈管理</a> |
|
||||||
<?php if($item['author']) :?>
|
<a href="/admin/data/author/uuid/<?php echo $item['uuid'];?>">作者管理</a> |
|
||||||
<p>数据贡献者:<?= $item['author']; ?></p>
|
<a href="/admin/data/version/uuid/<?php echo $item['uuid'];?>">版本管理</a> |
|
||||||
<?php endif;?>
|
<?php if (@!is_numeric($item['mdstatus'])) : ?>
|
||||||
<p class="content"><?= $item['description']; ?></p>
|
<a href="/admin/review/addon/uuid/<?php echo $item['uuid'];?>">放入元数据评审</a> |
|
||||||
</li>
|
<?php endif; ?>
|
||||||
<?php endforeach; ?>
|
<?php if(!empty($item['datasetid'])):?>
|
||||||
</ul>
|
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">数据路径</a> |
|
||||||
</div>
|
<a href="/admin/data/dataset/ac/import/uuid/<?php echo $item['uuid'];?>" class="iframe">重新导入数据目录</a> |
|
||||||
<?php endif; ?>
|
<?php else: ?>
|
||||||
<?php echo $this->paginator; ?>
|
<a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">设置数据路径</a> |
|
||||||
|
<?php endif;?>
|
||||||
|
<a href="/admin/down/sendmail/uuid/<?php echo $item['uuid'];?>" title="向数据下载者发送通知邮件">邮件通知</a> |
|
||||||
|
<a href="/admin/data/fund/uuid/<?php echo $item['uuid'];?>">支持项目</a> |
|
||||||
|
<a href="/admin/data/visual/uuid/<?php echo $item['uuid'];?>">数据可视化</a> |
|
||||||
|
<a href="javascript:void(0);" onclick="getFtp('<?= $item['uuid'] ?>')">FTP数据管理</a>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo $this->paginator; ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(".iframe").colorbox({iframe:true, width:"50%", height:"50%"});
|
$(".iframe").colorbox({iframe:true, width:"50%", height:"50%"});
|
||||||
|
@ -85,4 +90,36 @@ $(".inline").colorbox({inline:true, width:"50%"});
|
||||||
function Alert(html){
|
function Alert(html){
|
||||||
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||||
}
|
}
|
||||||
|
function getFtp(uuid){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/ftp/uuid/'+uuid,
|
||||||
|
'data':'',
|
||||||
|
'success':function(data){
|
||||||
|
if (typeof(data)=='object')
|
||||||
|
{
|
||||||
|
if(typeof(data.error)!='undefined')
|
||||||
|
{Alert(data.error);return false;}
|
||||||
|
if(typeof(data.statu)!='undefined')
|
||||||
|
{
|
||||||
|
if(data.statu > 0)
|
||||||
|
{
|
||||||
|
var html = '<p>临时FTP帐号信息<b>(此帐号仅对应当前数据集!)</b></p><p>ftp://ftp.sanjiangyuan.org.cn/</p>'+
|
||||||
|
'<p>用户名:'+data.user+
|
||||||
|
'</p><p>密码:'+data.passwd+'</p>'
|
||||||
|
+'<p><a href="ftp://'+data.user+':'+data.passwd+'@ftp.sanjiangyuan.org.cn/">或直接点击此链接</a></p>';
|
||||||
|
Alert(html);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Alert('出现错误,请稍候再试</h4>');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'error': function(){
|
||||||
|
Alert('处理中出现错误,请刷新页面后重试</h4>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
|
@ -0,0 +1,198 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
$this->breadcrumb('文献管理');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->theme->AppendPlus($this,"uploadify");
|
||||||
|
$this->theme->AppendPlus($this,'admin_plugin');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
<div>
|
||||||
|
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||||
|
</div>
|
||||||
|
<?php if(!empty($this->error)) { ?>
|
||||||
|
<?= $this->error ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(!empty($this->msg)) { ?>
|
||||||
|
<?= $this->msg ?>
|
||||||
|
<?php } else{ ?>
|
||||||
|
<form class="form-horizontal" method="post">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputTitle">文章标题</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="title" id="inputTitle" class="input-block-level" value="<?= isset($this->data['title']) ? $this->data['title']:"" ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputYear">出版年份</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="year" id="inputYear" value="<?= isset($this->data['year']) ? $this->data['year']:"" ?>">
|
||||||
|
<select class="span2">
|
||||||
|
<?php for($i=2000;$i<=(int)date("Y");$i++) {?>
|
||||||
|
<option value="<?= $i ?>" onclick="$('#inputYear').val(this.value)"><?= $i ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputYear">出版社/期刊</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="publisher" id="inputYear" class="input-block-level" value="<?= isset($this->data['publisher']) ? $this->data['publisher']:"" ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputReference">引用方式(前台显示)</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea name="reference" id="inputReference" class="input-block-level"><?= isset($this->data['reference']) ? $this->data['reference']:"" ?></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputLink">链接(自动填写请留空)</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="link" id="inputLink" class="input-block-level" value="<?= isset($this->data['link']) ? $this->data['link']:"" ?>"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputType">类型</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="type" id="inputType" class="input-block-level" value="<?= isset($this->data['type']) ? $this->data['type']:"" ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputLanguage">语言</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="language" id="inputLanguage" class="input-block-level" value="<?= isset($this->data['language']) ? $this->data['language']:"" ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputDoi">DOI</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="doi" id="inputDoi" class="input-block-level" value="<?= isset($this->data['doi']) ? $this->data['doi']:"" ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputBibtex">ris</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea name="ris" id="inputBibtex" class="input-block-level"><?= isset($this->data['ris']) ? $this->data['ris']:"" ?></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputAbstract">摘要</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea name="abstract" id="inputAbstract" class="input-block-level"><?= isset($this->data['abstract']) ? $this->data['abstract']:"" ?></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputNote">备注</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea name="note" id="inputNote" class="input-block-level"><?= isset($this->data['note']) ? $this->data['note']:"" ?></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputPDF">PDF</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="file" name="Filedata" id="file_upload" />
|
||||||
|
<div id="uploadedFile"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<input type="hidden" name="submit" value="1" />
|
||||||
|
<button type="submit" class="btn btn-primary">Save changes</button>
|
||||||
|
<button type="reset" class="btn">Cancel</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- //页面内容 -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(e) {
|
||||||
|
$('#btn-add-author').click(function(e) {
|
||||||
|
html = '';
|
||||||
|
$('#author_inputs').append('');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
var _this = {
|
||||||
|
SessionID : '<?php echo session_id(); ?>'
|
||||||
|
};
|
||||||
|
var uploader;
|
||||||
|
var param;
|
||||||
|
param = {
|
||||||
|
"PHPSESSID" : _this.SessionID,
|
||||||
|
};
|
||||||
|
$(function() {
|
||||||
|
$('#file_upload').uploadify({
|
||||||
|
'swf' : '/js/lib/uploadify/uploadify.swf',
|
||||||
|
'uploader' : '/admin/data/ref/ac/pdfupload',
|
||||||
|
'multi' : false,
|
||||||
|
'auto' : true,
|
||||||
|
'fileTypeExts' : '*.pdf',
|
||||||
|
'onUploadSuccess' : function(file, data, response) {
|
||||||
|
upload.onsuccess(file, data, response);
|
||||||
|
},
|
||||||
|
'onUploadStart' : function(file) {
|
||||||
|
$('#file_upload').uploadify('settings','formData',param);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var upload = {
|
||||||
|
onsuccess : function(file, data, response){
|
||||||
|
_data = $.parseJSON(data);
|
||||||
|
if(!$.isEmptyObject(_data.error))
|
||||||
|
{
|
||||||
|
alert(_data.error);
|
||||||
|
}else{
|
||||||
|
$('#uploadedFile').html(upload.makeFileHtml(_data));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
makeFileHtml : function(data){
|
||||||
|
return '<div class="alert alert-success">'
|
||||||
|
+'<button type="button" class="close" data-dismiss="alert" onclick="upload.deleteFile('+data.id+')"><i class="icon-trash icon-white"></i></button>'
|
||||||
|
+ data.realname
|
||||||
|
+'<input type="hidden" name="attid" value="'+data.id+'"></input>'
|
||||||
|
+'</div>';
|
||||||
|
},
|
||||||
|
deleteFile : function(id){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/ref/ac/delete',
|
||||||
|
'data':'attid=' + id,
|
||||||
|
'success':function(data){
|
||||||
|
if(typeof(data) == 'undefined')
|
||||||
|
{
|
||||||
|
alert("数据源错误,请联系管理员");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$.isEmptyObject(data.error))
|
||||||
|
{
|
||||||
|
alert(data.error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'error': function(){
|
||||||
|
alert('附件删除出错');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<?php if(isset($this->data['attid']) && !empty($this->data['attid'])){ ?>
|
||||||
|
<input type="hidden" id="reference_file_content" value='<?= json_encode($this->data['file']) ?>' />
|
||||||
|
<script>
|
||||||
|
upload.onsuccess('',$('#reference_file_content').val(),"");
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
|
@ -0,0 +1,105 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
$this->breadcrumb('文献管理');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->theme->AppendPlus($this,'admin_plugin');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
<div>
|
||||||
|
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="input-append">
|
||||||
|
<form id="datasearch" class="search_form" action="">
|
||||||
|
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||||
|
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php if(!empty($this->error)) { ?>
|
||||||
|
<?= $this->error ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(!empty($this->msg)) { ?>
|
||||||
|
<?= $this->msg ?>
|
||||||
|
<?php } else{ ?>
|
||||||
|
<div id="datalist">
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>文件名</th>
|
||||||
|
<th>状态</th>
|
||||||
|
<th width="140">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $autoindex=0;
|
||||||
|
foreach ($this->paginator as $item):
|
||||||
|
$autoindex++;?>
|
||||||
|
<tr id="DataLine_<?= $item['id']?>">
|
||||||
|
<td><?= $item['realname'] ?></td>
|
||||||
|
<td><?= empty($item['attid']) ? '<font color="#CC0000">未编辑</font>':"已编辑" ?></td>
|
||||||
|
<td>
|
||||||
|
<a class="file-editor" href="/admin/data/ref/ac/add/<?= empty($item['attid']) ? 'attid/'.$item['id'] : 'id/'.$item['refid']?>">编辑</a>
|
||||||
|
<a href="javascript:void(0);" onclick="file.delete(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- //页面内容 -->
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(e) {
|
||||||
|
|
||||||
|
});
|
||||||
|
var file = {
|
||||||
|
delete : function(id){
|
||||||
|
if(confirm("是否确定删除?") == false)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/ref/ac/delete',
|
||||||
|
'data':'attid=' + id,
|
||||||
|
'success':function(data){
|
||||||
|
if(typeof(data) == 'undefined')
|
||||||
|
{
|
||||||
|
alert("数据源错误,请联系管理员");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$.isEmptyObject(data.error))
|
||||||
|
{
|
||||||
|
alert(data.error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#DataLine_'+id).fadeOut();
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'error': function(){
|
||||||
|
alert('附件删除出错');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,49 @@
|
||||||
|
<div class="modal hide fade" id="mdref-form">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h3>添加数据文献</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form id="mdref" method="post" class="form-horizontal">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputRefid">文献ID</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="refid" id="inputRefid" placeholder="文献ID" value="<?= empty($this->refid) ? "":$this->refid ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputUuid">元数据UUID</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="uuid" id="inputUuid" placeholder="UUID">
|
||||||
|
<span class="help-block"><a href="javascript:void(0);" onclick="$(this).parent('span').prev('input').val('e31f5ea7-a4af-4ae3-9ac1-1a84132c4338')">设为数据中心文献</a></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputPlace">排序数值(数字)</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="place" id="inputPlace" placeholder="排序">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">文献类型</label>
|
||||||
|
<div class="controls">
|
||||||
|
<?php foreach($this->referenceType as $k=>$v) { ?>
|
||||||
|
<label class="radio">
|
||||||
|
<input type="radio" name="reftype" value="<?= $k ?>" /> <?= $v ?>
|
||||||
|
</label>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="id" value="" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="alert-info"></div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="progress progress-striped active" id="submit-loading" style="display:none;">
|
||||||
|
<div class="bar" style="width:100%;"></div>
|
||||||
|
</div>
|
||||||
|
<button onclick="$('#mdref')[0].reset();" class="btn">Reset</button>
|
||||||
|
<button onclick="$('#mdref-form').modal('hide');" class="btn">Close</button>
|
||||||
|
<button onclick="mdref.create()" class="btn btn-primary" id="submit_btn">Save changes</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,69 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
$this->breadcrumb('文献管理');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->theme->AppendPlus($this,'admin_plugin');
|
||||||
|
$this->theme->AppendModel($this,'admin-data-ref');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
<div>
|
||||||
|
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||||
|
</div>
|
||||||
|
<?php if(!empty($this->error)) { ?>
|
||||||
|
<?= $this->error ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(!empty($this->msg)) { ?>
|
||||||
|
<?= $this->msg ?>
|
||||||
|
<?php } else{ ?>
|
||||||
|
<button type="button" class="btn btn-primary" onclick="$('#mdref')[0].reset();$('#mdref-form').modal('show');">添加一条</button>
|
||||||
|
<div id="datalist">
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>元数据</th>
|
||||||
|
<th>类型</th>
|
||||||
|
<th>排序</th>
|
||||||
|
<th width="140">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $autoindex=0;
|
||||||
|
foreach ($this->paginator as $item):
|
||||||
|
$autoindex++;?>
|
||||||
|
<tr id="DataLine_<?= $item['id']?>">
|
||||||
|
<td><?= $item['title'] ?></td>
|
||||||
|
<td><?= isset($this->referenceType[$item['reftype']]) ? $this->referenceType[$item['reftype']]:"" ?></td>
|
||||||
|
<td><?= $item['place'] ?></td>
|
||||||
|
<td>
|
||||||
|
<a href="javascript:void(0);" onclick="mdref.edit(<?= $item['id'] ?>,<?= $item['refid']?>,'<?= $item['uuid'] ?>',<?= $item['reftype'] ?>,<?= $item['place'] ?>)">编辑</a>
|
||||||
|
<a href="/admin/data/ref/ac/delmdref/id/<?= $item['id']?>">移除</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- //页面内容 -->
|
||||||
|
<?= $this->partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType,'refid'=>$this->refid)); ?>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(e) {
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -0,0 +1,120 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
$this->breadcrumb('文献管理');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->theme->AppendPlus($this,"uploadify");
|
||||||
|
$this->theme->AppendPlus($this,'admin_plugin');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
<div>
|
||||||
|
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||||
|
</div>
|
||||||
|
<?php if(!empty($this->error)) { ?>
|
||||||
|
<?= $this->error ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(!empty($this->msg)) { ?>
|
||||||
|
<?= $this->msg ?>
|
||||||
|
<?php } else{ ?>
|
||||||
|
<form class="form-horizontal" method="post">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputPassword">PDF</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="file" name="Filedata" id="file_upload" />
|
||||||
|
<div id="uploadedFile"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<a class="btn btn-primary" href="/admin/data/ref/ac/files">文件管理</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- //页面内容 -->
|
||||||
|
<script>
|
||||||
|
var _this = {
|
||||||
|
SessionID : '<?php echo session_id(); ?>'
|
||||||
|
};
|
||||||
|
var uploader;
|
||||||
|
var param;
|
||||||
|
param = {
|
||||||
|
"PHPSESSID" : _this.SessionID,
|
||||||
|
"multi" : 'yes'
|
||||||
|
};
|
||||||
|
$(function() {
|
||||||
|
$('#file_upload').uploadify({
|
||||||
|
'swf' : '/js/lib/uploadify/uploadify.swf',
|
||||||
|
'uploader' : '/admin/data/ref/ac/pdfupload',
|
||||||
|
'multi' : true,
|
||||||
|
'auto' : true,
|
||||||
|
'fileTypeExts' : '*.pdf',
|
||||||
|
'onUploadSuccess' : function(file, data, response) {
|
||||||
|
upload.onsuccess(file, data, response);
|
||||||
|
},
|
||||||
|
'onUploadStart' : function(file) {
|
||||||
|
$('#file_upload').uploadify('settings','formData',param);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var upload = {
|
||||||
|
onsuccess : function(file, data, response){
|
||||||
|
_data = $.parseJSON(data);
|
||||||
|
if(!$.isEmptyObject(_data.error))
|
||||||
|
{
|
||||||
|
alert(_data.error);
|
||||||
|
}else{
|
||||||
|
$('#uploadedFile').append(upload.makeFileHtml(_data));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
makeFileHtml : function(data){
|
||||||
|
return '<div class="alert alert-success">'
|
||||||
|
//+'<button type="button" class="close" data-dismiss="alert" onclick="upload.deleteFile('+data.id+')"><i class="icon-trash icon-white"></i></button>'
|
||||||
|
+ data.realname
|
||||||
|
+'<input type="hidden" name="attid" value="'+data.id+'"></input>'
|
||||||
|
+'</div>';
|
||||||
|
},
|
||||||
|
deleteFile : function(id){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/admin/data/ref/ac/delete',
|
||||||
|
'data':'attid=' + id,
|
||||||
|
'success':function(data){
|
||||||
|
if(typeof(data) == 'undefined')
|
||||||
|
{
|
||||||
|
alert("数据源错误,请联系管理员");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$.isEmptyObject(data.error))
|
||||||
|
{
|
||||||
|
alert(data.error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 30000,
|
||||||
|
'error': function(){
|
||||||
|
alert('附件删除出错');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<?php if(isset($this->data['attid']) && !empty($this->data['attid'])){ ?>
|
||||||
|
<input type="hidden" id="reference_file_content" value='<?= json_encode($this->data['file']) ?>' />
|
||||||
|
<script>
|
||||||
|
upload.onsuccess('',$('#reference_file_content').val(),"");
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<ul class="nav nav-tabs">
|
||||||
|
<li <?= empty($this->ac) ? 'class="active"':"" ?>><a href="/admin/data/ref">浏览所有</a></li>
|
||||||
|
<li <?= $this->ac=="water" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/water">WATER文献</a></li>
|
||||||
|
<li <?= $this->ac=="westdc" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/westdc">数据中心文献</a></li>
|
||||||
|
<li <?= $this->ac=="todo" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/todo">待处理文献</a></li>
|
||||||
|
<li <?= $this->ac=="add" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/add">单篇添加</a></li>
|
||||||
|
<li <?= $this->ac=="multiupload" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/multiupload">批量上传</a></li>
|
||||||
|
<li <?= $this->ac=="files" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/files">文件管理</a></li>
|
||||||
|
<li <?= $this->ac=="ris" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/ris">RIS导入</a></li>
|
||||||
|
<li <?= $this->ac=="risoutput" ? 'class="active"':"" ?>><a href="/admin/data/ref/ac/risoutput">RIS导出</a></li>
|
||||||
|
</ul>
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
$this->breadcrumb('文献管理');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->theme->AppendPlus($this,"uploadify");
|
||||||
|
$this->theme->AppendPlus($this,'admin_plugin');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
<div>
|
||||||
|
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||||
|
</div>
|
||||||
|
<?php if(!empty($this->error)) { ?>
|
||||||
|
<?= $this->error ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(!empty($this->msg)) { ?>
|
||||||
|
<?= $this->msg ?>
|
||||||
|
<?php } else{ ?>
|
||||||
|
<?php if(empty($this->data)) { ?>
|
||||||
|
<form class="form-horizontal" method="post" enctype="multipart/form-data">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputPassword">RIS文件</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="file" name="Filedata" id="file_upload" />
|
||||||
|
<div id="uploadedFile"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputPassword">RIS文本</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea class="input-block-level" name="ristext" rows="5"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<input type="hidden" name="submit" value="1" />
|
||||||
|
<button type="submit" class="btn btn-primary">导入</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php }else{ ?>
|
||||||
|
<?php
|
||||||
|
foreach($this->data as $k=>$ref)
|
||||||
|
{
|
||||||
|
echo '<ul>';
|
||||||
|
foreach($ref as $index=>$value)
|
||||||
|
{
|
||||||
|
$v = is_array($value) ? join("|",$value) : $value;
|
||||||
|
echo '<li>'.$index .":". $v .'</li>';
|
||||||
|
}
|
||||||
|
echo "</ul>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- //页面内容 -->
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
$this->breadcrumb('文献管理');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->theme->AppendPlus($this,"uploadify");
|
||||||
|
$this->theme->AppendPlus($this,'admin_plugin');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
<div>
|
||||||
|
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||||
|
</div>
|
||||||
|
<?php if(!empty($this->error)) { ?>
|
||||||
|
<?= $this->error ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(!empty($this->msg)) { ?>
|
||||||
|
<?= $this->msg ?>
|
||||||
|
<?php } else{ ?>
|
||||||
|
<h3>RIS导出</h3>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<?php if(!empty($this->years)) { ?>
|
||||||
|
按年份 :
|
||||||
|
<?php foreach($this->years as $k=>$v){ ?>
|
||||||
|
<a class="btn btn-info" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a>
|
||||||
|
<?php } ?>
|
||||||
|
<hr />
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
其它方式:<a class="btn btn-info" href="?submit=1&mode=all">全部</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- //页面内容 -->
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
$this->breadcrumb('文献管理');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->theme->AppendPlus($this,"uploadify");
|
||||||
|
$this->theme->AppendPlus($this,'admin_plugin');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
<div>
|
||||||
|
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||||
|
</div>
|
||||||
|
<?php if(!empty($this->error)) { ?>
|
||||||
|
<?= $this->error ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(!empty($this->msg)) { ?>
|
||||||
|
<?= $this->msg ?>
|
||||||
|
<?php } else{ ?>
|
||||||
|
<h3><?= empty($this->referenceData['title']) ? $this->referenceData['reference'] : $this->referenceData['title'] ?></h3>
|
||||||
|
<hr />
|
||||||
|
<?php if(empty($this->data)) { ?>
|
||||||
|
<form class="form-horizontal" method="post" enctype="multipart/form-data">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputPassword">RIS文本</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea class="input-block-level" name="ristext" rows="5"><?= $this->ristext ?></textarea>
|
||||||
|
<span class="help-block">* 此功能是使用单个文献的 RIS 文本导入并覆盖以前填写过的信息</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions">
|
||||||
|
<input type="hidden" name="submit" value="1" />
|
||||||
|
<button type="submit" class="btn btn-primary">导入</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<?php }else{ ?>
|
||||||
|
<?php
|
||||||
|
foreach($this->data as $k=>$ref)
|
||||||
|
{
|
||||||
|
echo '<ul>';
|
||||||
|
foreach($ref as $index=>$value)
|
||||||
|
{
|
||||||
|
$v = is_array($value) ? join("|",$value) : $value;
|
||||||
|
echo '<li>'.$index .":". $v .'</li>';
|
||||||
|
}
|
||||||
|
echo "</ul>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- //页面内容 -->
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
$this->breadcrumb('文献管理');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->theme->AppendPlus($this,'admin_plugin');
|
||||||
|
$this->theme->AppendModel($this,'admin-data-ref');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
<div>
|
||||||
|
<?= $this->partial('data/ref-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="input-append">
|
||||||
|
<form id="datasearch" class="search_form" action="">
|
||||||
|
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||||
|
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
|
||||||
|
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
|
||||||
|
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php if(!empty($this->error)) { ?>
|
||||||
|
<?= $this->error ?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(!empty($this->msg)) { ?>
|
||||||
|
<?= $this->msg ?>
|
||||||
|
<?php } else{ ?>
|
||||||
|
|
||||||
|
<?php if($this->ac == 'westdc'){ ?>
|
||||||
|
<button type="button" class="btn btn-success" onclick="$('#mdref')[0].reset();mdref.edit('','','e31f5ea7-a4af-4ae3-9ac1-1a84132c4338',0,0)">添加数据中心文献</button>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if(!empty($this->years)) { ?>
|
||||||
|
<?php foreach($this->years as $k=>$v){ ?>
|
||||||
|
<a class="btn btn-info" href="?field[year]=<?= $v['year'] ?>"><?= empty($v['year']) ? "未知":$v['year'] ?>(<?= $v['num'] ?>)</a>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<div id="datalist">
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>标题
|
||||||
|
<a href="?order=title&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
|
||||||
|
<a href="?order=title&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
|
||||||
|
年份
|
||||||
|
<a href="?order=year&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
|
||||||
|
<a href="?order=year&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
|
||||||
|
</th>
|
||||||
|
<th>记录创建
|
||||||
|
<a href="?order=ts_created&sort=ASC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-up"></i></a>
|
||||||
|
<a href="?order=ts_created&sort=DESC&q=<?php if(!empty($this->q)) echo $this->q; ?>"><i class="icon-arrow-down"></i></a>
|
||||||
|
</th>
|
||||||
|
<th width="140">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
if($this->page > 1)
|
||||||
|
{
|
||||||
|
$autoindex = ($this->page - 1) * $this->pagelimit;
|
||||||
|
}else{
|
||||||
|
$autoindex=0;
|
||||||
|
}
|
||||||
|
foreach ($this->paginator as $item):
|
||||||
|
$autoindex++;?>
|
||||||
|
<tr id="DataLine_<?= $item['id']?>">
|
||||||
|
<td>
|
||||||
|
[<?= $autoindex ?>]
|
||||||
|
<?php if ($item['ris']) :
|
||||||
|
echo $item['reference'];
|
||||||
|
else :
|
||||||
|
?>
|
||||||
|
{<?php $authors = $this->reference->getAuthorByReference($item['id'],true); echo count($authors) ? join(",",$authors):'<font color="#CC0000">未知作者</font>'; ?>}
|
||||||
|
{<?= empty($item['title']) ? '<font color="#CC0000">未知标题</font>':$item['title'] ?>}
|
||||||
|
{<?= empty($item['publisher']) ? '<font color="#CC0000">未知期刊</font>':$item['publisher'] ?>}
|
||||||
|
{<?= empty($item['year']) ? '<font color="#CC0000">未知年份</font>':$item['year'] ?>}
|
||||||
|
<?php endif; ?>
|
||||||
|
</td>
|
||||||
|
<td><?= date("Y-m-d H:i",strtotime($item['ts_created'])) ?></td>
|
||||||
|
<td>
|
||||||
|
<a href="/admin/data/ref/ac/add/id/<?= $item['id']?>">编辑</a>
|
||||||
|
<a href="/admin/data/ref/ac/singleris/id/<?= $item['id'] ?>">RIS编辑</a>
|
||||||
|
<a href="/admin/data/ref/ac/data/id/<?= $item['id'] ?>">数据</a>(<a href="javascript:void(0);" onclick="$('#mdref')[0].reset();mdref.edit('',<?= $item['id']?>,'',0,0)">+</a>)
|
||||||
|
<a href="/admin/data/ref/ac/deleteref/id/<?= $item['id']?>">删除</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- //页面内容 -->
|
||||||
|
<?= $this->partial('data/ref-mdref-form.phtml',array('referenceType'=>$this->referenceType)); ?>
|
|
@ -56,7 +56,7 @@ foreach ($this->paginator as $item):
|
||||||
$i=0;
|
$i=0;
|
||||||
$u=$item['uuid'];
|
$u=$item['uuid'];
|
||||||
endif;
|
endif;
|
||||||
if ($i==0) echo '<div class="well"><h4>元数据:<a href="/data/'.$item['uuid'].'">'.$item['title'].'</a>(<a href="/admin/data/reference/add/1/uuid/'.$item['uuid'].'">添加</a>)</h4><ol>';
|
if ($i==0) echo '<div class="well"><h4>元数据:<a href="/data/'.$item['uuid'].'">'.$item['mdtitle'].'</a>(<a href="/admin/data/reference/add/1/uuid/'.$item['uuid'].'">添加</a>)</h4><ol>';
|
||||||
echo '<li>文献(<a href="/admin/data/reference/edit/'.$item['mdid'].'">编辑</a> <a href="/admin/data/reference/delete/'.$item['mdid'].'">删除</a> <a href="javascript:void(0);" class="order" rel="'.$item['mdid'].'" rev="'.$item['place'].'">排序</a>):'.$item['place'].'. '.$item['reference'].'</li>';
|
echo '<li>文献(<a href="/admin/data/reference/edit/'.$item['mdid'].'">编辑</a> <a href="/admin/data/reference/delete/'.$item['mdid'].'">删除</a> <a href="javascript:void(0);" class="order" rel="'.$item['mdid'].'" rev="'.$item['place'].'">排序</a>):'.$item['place'].'. '.$item['reference'].'</li>';
|
||||||
endforeach;
|
endforeach;
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
<div class="ctrlplan">
|
<div class="ctrlplan">
|
||||||
<a href="/admin/data/source">项目来源管理</a>
|
<a href="/admin/data/source">项目来源管理</a>
|
||||||
<a href="/admin/data/source/do/add">添加项目来源</a>
|
<a href="/admin/data/source/do/add">添加项目来源</a>
|
||||||
<a href="/admin/data/source/do/sync">同步项目来源(以此处为准)</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="search">
|
<div class="search">
|
||||||
|
|
|
@ -0,0 +1,275 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
?>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span10">
|
||||||
|
<h3>添加可视化要素</h3>
|
||||||
|
<hr />
|
||||||
|
<?php if(!empty($this->error)) {?>
|
||||||
|
<div class="alert alert-error">
|
||||||
|
<?= $this->error ?>
|
||||||
|
</div>
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
|
<form class="form-horizontal" method="post" action="">
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputUUID">UUID</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" id="inputUUID" placeholder="UUID" value="<?= $this->data['uuid'] ?>" class="input-block-level" name="uuid">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">状态</label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline">
|
||||||
|
<?php $checked = function(){
|
||||||
|
if(isset($this->info['status']))
|
||||||
|
{
|
||||||
|
if($this->info['status'] == 1)
|
||||||
|
{
|
||||||
|
return 'checked="checked"';
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return 'checked="checked"';
|
||||||
|
}
|
||||||
|
}; ?>
|
||||||
|
<input type="radio" name="status" id="optionsRadios1" value="1" <?= $checked() ?>>
|
||||||
|
启用
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="status" id="optionsRadios2" value="0"
|
||||||
|
<?= isset($this->info['status']) && $this->info['status'] == 0 ? 'checked="checked"':"" ?>>
|
||||||
|
禁用
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">绘图插件</label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="chartjs" id="optionsRadios1" value="highcharts" <?= (isset($this->info['chartjs']) && $this->info['chartjs']=='highcharts') ? "checked":"" ?>>
|
||||||
|
Highcharts(适合分类数据展示和三维展示)
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="chartjs" id="optionsRadios2" value="highstock"
|
||||||
|
<?= (isset($this->info['chartjs']) && $this->info['chartjs'] == 'highstock') || empty($this->info['chartjs']) ? 'checked="checked"':"" ?>>
|
||||||
|
Highstock(适合时间序列数据可视化)
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">默认绘制类型</label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="charttype" id="optionsRadios1" value="line" <?= (isset($this->info['charttype']) && $this->info['charttype']=='line') || empty($this->info['charttype']) ? "checked":"" ?>>
|
||||||
|
折线图
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="charttype" id="optionsRadios2" value="column"
|
||||||
|
<?= isset($this->info['charttype']) && $this->info['charttype'] == 'column' ? 'checked="checked"':"" ?>>
|
||||||
|
柱状图
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="charttype" id="optionsRadios3" value="spline"
|
||||||
|
<?= isset($this->info['charttype']) && $this->info['charttype'] == 'spline' ? 'checked="checked"':"" ?>>
|
||||||
|
样条线图
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<input type="radio" name="charttype" id="optionsRadios4" value="area"
|
||||||
|
<?= isset($this->info['charttype']) && $this->info['charttype'] == 'area' ? 'checked="checked"':"" ?>>
|
||||||
|
面积图
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group" style="display: none;">
|
||||||
|
<label class="control-label">数据表</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select name="visual_datatable" id="data-table">
|
||||||
|
<option value="0">请选择</option>
|
||||||
|
<?php foreach($this->visualTable as $k=>$v){ ?>
|
||||||
|
<?php if(isset($this->info['visual_datatable']) && $this->info['visual_datatable']==$v){ ?>
|
||||||
|
<option value="<?= $v ?>" selected="selected"><?= $v ?></option>
|
||||||
|
<?php }else{ ?>
|
||||||
|
<option value="<?= $v ?>"><?= $v ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputData">数据读取SQL或表名</label>
|
||||||
|
<div class="controls">
|
||||||
|
<textarea name="data" rows="4" class="input-block-level" id="inputData"><?= !isset($this->info['data']) ? "":$this->info['data']?></textarea>
|
||||||
|
<p class="help-block">如果设置了某个字段的读取sql会自动忽略此项设置</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group time-field-select">
|
||||||
|
<label class="control-label">X轴取值</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="xaxis" placeholder="时间字段读取SQL" class="input-block-level" value="<?= isset($this->info['xaxis']) ? $this->info['xaxis']:'' ?>" />
|
||||||
|
<p class="help-block">例如: utctime, times , (year||'-'||month||'-1')::timestamp without time zone ,不需要在最外层加括号或者双引号。如果是制作分类图,则X轴必须是category,请在数据读取SQL中用将所需字段命名为category。</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php if(!empty($this->info['variable'])) { ?>
|
||||||
|
<?php $vars = array() ?>
|
||||||
|
<?php $encoder = new \Westdc\Visual\VariableEncoder; ?>
|
||||||
|
<?php $vars = $encoder->decode($this->info['variable']);?>
|
||||||
|
<?php foreach($vars as $index=>$value) { ?>
|
||||||
|
<div class="control-group var-group">
|
||||||
|
<label class="control-label" for="inputVariable">可视化要素 <small><a href="javascript:void(0);" onclick="delVar(this)">删除</a></small></label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" placeholder="字段名" class="" name="var[<?= $index ?>][name]" value="<?= $value['name'] ?>">
|
||||||
|
<input type="text" placeholder="显示名" class="" name="var[<?= $index ?>][title]" value="<?= $value['title'] ?>">
|
||||||
|
<input type="text" placeholder="字段sql" class="" name="var[<?= $index ?>][sql]" value="<?= (isset($value['sql']))?$value['sql']:'' ?>">
|
||||||
|
<input type="text" placeholder="查询条件" name="var[<?= $index ?>][condition]" value="<?= isset($value['condition']) && is_string($value['condition']) ? $value['condition']:"" ?><?= isset($value['condition']) && is_array($value['condition']) ? join(";",$value['condition']):"" ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="control-group" id="last-control-group">
|
||||||
|
<div class="controls">
|
||||||
|
<button type="button" class="btn btn-defualt" id="addVariable">添加要素</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="control-group" id="last-control-group">
|
||||||
|
<div class="controls">
|
||||||
|
<input type="hidden" name="submit" value="1" />
|
||||||
|
<button type="submit" class="btn btn-primary">提交</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var fieldData,fieldHtml,varHtml,current_count;
|
||||||
|
|
||||||
|
function makeVarSelectHtml(field_data){
|
||||||
|
|
||||||
|
current_count = $('.var-group').length;
|
||||||
|
|
||||||
|
fieldHtml = []
|
||||||
|
|
||||||
|
varHtml = '<input type="text" placeholder="字段名" class="" name="var['+current_count+'][name]">'
|
||||||
|
+ '<input type="text" placeholder="显示名" class="" name="var['+current_count+'][title]">'
|
||||||
|
+ '<input type="text" placeholder="字段sql" class="" name="var['+current_count+'][sql]">'
|
||||||
|
+ '<input type="text" placeholder="查询条件" class="" name="var['+current_count+'][condition]">';
|
||||||
|
|
||||||
|
html = '<div class="control-group var-group">'
|
||||||
|
+ '<label class="control-label" for="inputVariable">可视化要素 <small><a href="javascript:void(0);" onclick="delVar(this)">删除</a></small></label>'
|
||||||
|
+ '<div class="controls">'
|
||||||
|
+ varHtml
|
||||||
|
+ '</div>'
|
||||||
|
+'</div>';
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
|
||||||
|
function delVar(dom){
|
||||||
|
$(dom).parent().parent().parent('.control-group').remove();
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('#data-table').change(function(){
|
||||||
|
$('.var-group').remove();
|
||||||
|
$.ajax({
|
||||||
|
type:"POST",
|
||||||
|
url:'',
|
||||||
|
data:'tablename='+ $(this).val(),
|
||||||
|
success:function(data){
|
||||||
|
fieldData = data;
|
||||||
|
html = [];
|
||||||
|
for(i in data)
|
||||||
|
{
|
||||||
|
html.push('<option value="' + data[i] + '">' + data[i] + '</option>');
|
||||||
|
}
|
||||||
|
html = '<select name="visual_timefield">' + html.join('')+'</select>';
|
||||||
|
$('#field-time').html(html);
|
||||||
|
},
|
||||||
|
beforeSend:function(){
|
||||||
|
$('#field-time').html('加载中');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
<?php if(!empty($this->info['ts_created']) && !empty($this->info['visual_datatable'])) { ?>
|
||||||
|
$.ajax({
|
||||||
|
type:"POST",
|
||||||
|
url:'',
|
||||||
|
data:'tablename=<?= $this->info['visual_datatable'] ?>',
|
||||||
|
success:function(data){
|
||||||
|
fieldData = data;
|
||||||
|
html = [];
|
||||||
|
for(i in data)
|
||||||
|
{
|
||||||
|
if('<?= $this->info['visual_timefield'] ?>' == data[i])
|
||||||
|
html.push('<option value="' + data[i] + '" selected="selected">' + data[i] + '</option>');
|
||||||
|
else
|
||||||
|
html.push('<option value="' + data[i] + '">' + data[i] + '</option>');
|
||||||
|
}
|
||||||
|
html = '<select name="visual_timefield">' + html.join('')+'</select>';
|
||||||
|
$('#field-time').html(html);
|
||||||
|
},
|
||||||
|
beforeSend:function(){
|
||||||
|
$('#field-time').html('加载中');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
$('#addVariable').click(function(e) {
|
||||||
|
if($('#var-group').length > 0)
|
||||||
|
$('#var-group').append(makeVarSelectHtml(fieldData));
|
||||||
|
else
|
||||||
|
$('#last-control-group').prepend(makeVarSelectHtml(fieldData));
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#open-field-helper').click(function(){
|
||||||
|
if(null == fieldData || $('#data-table').val() == '0')
|
||||||
|
{
|
||||||
|
alert('请先选择数据表和时间字段');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.modal-body p').html(fieldData.join(','));
|
||||||
|
|
||||||
|
$('#modal-show-field').modal('show');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div id="modal-show-field" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h3 id="myModalLabel">字段列表</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
|
$this->breadcrumb('同步GEONETWORK元数据</a>');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
?>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span10">
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<div class="datalist">
|
||||||
|
<ul class="unstyled">
|
||||||
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
|
<li class="well well-small">
|
||||||
|
<h4><a href="/data/<?= $item['uuid']; ?>" class="title"><?= $item['title']; ?></a></h4>
|
||||||
|
<p>大小:<?= $item['filesize']; ?>M,创建时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>。</p>
|
||||||
|
<?php if($item['author']) :?>
|
||||||
|
<p>数据贡献者:<?= $item['author']; ?></p>
|
||||||
|
<?php endif;?>
|
||||||
|
<p class="content"><?= $item['description']; ?></p>
|
||||||
|
<p>
|
||||||
|
操作:
|
||||||
|
<a href="/admin/data/visual/uuid/<?php echo $item['uuid'];?>">编辑可视化要素</a> |
|
||||||
|
<a href="/visual/view/uuid/<?= $item['uuid'] ?>">前台预览</a>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php echo $this->paginator; ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -2,7 +2,6 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
|
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||||
|
@ -10,53 +9,60 @@
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
$this->headScript()->appendFile('/js/prototype.js');
|
$this->headScript()->appendFile('/js/prototype.js');
|
||||||
?>
|
?>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
|
||||||
<div id="leftPanel">
|
<h3><?php if(!empty($this->title)) echo $this->title;?>共 <?php echo $this->count;?> 数据下载记录</h3>
|
||||||
<?= $this->partial('down/left.phtml'); ?>
|
<hr />
|
||||||
</div>
|
|
||||||
<div id="rightPanel">
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<div class="alert">
|
||||||
<div id="message">
|
<?php if ($this->msg) : ?>
|
||||||
<?php if ($this->msg) : ?>
|
<p><?php echo $this->msg; ?></p>
|
||||||
<p><?php echo $this->msg; ?></p>
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<p><?php echo $msg; ?></p>
|
||||||
<p><?php echo $msg; ?></p>
|
<?php endforeach;endif; ?>
|
||||||
<?php endforeach;endif; ?>
|
</div>
|
||||||
</div>
|
<?php endif; ?>
|
||||||
<?php endif; ?>
|
|
||||||
|
<div class="row-fluid">
|
||||||
<div class="right_title"><?php if(!empty($this->title)) echo $this->title;?>共 <?php echo $this->count;?> 数据下载记录</div>
|
<div class="span12">
|
||||||
|
<form action="/admin/down/data/" method="get" class="form-search">
|
||||||
<div class="search">
|
<div class="input-append">
|
||||||
<form action="/admin/down/data/" method="get">
|
<input type="hidden" name="search" value='1' />
|
||||||
<input type="hidden" name="search" value='1' />
|
<input type="text" name="keyword" value="<?php echo $this->keyword; ?>" class="span8 search-query"/>
|
||||||
<ul>
|
<button type="submit" class="btn">搜索</button>
|
||||||
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
|
</div>
|
||||||
<li><input type="submit" class="searchbtn" value="搜索" /></li>
|
</form>
|
||||||
</ul>
|
</div>
|
||||||
</form>
|
</div><!-- search DIV -->
|
||||||
</div><!-- search DIV -->
|
|
||||||
|
<table class="table table-hover">
|
||||||
<table><thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='350'>数据</td>
|
<td width='350'>数据</td>
|
||||||
<td width='150'>下载次数</td>
|
<td width='150'>下载次数</td>
|
||||||
<td width='150'>操作</td>
|
<td width='150'>操作</td>
|
||||||
</tr></thead>
|
</tr>
|
||||||
<?php if (count($this->paginator)): ?>
|
</thead>
|
||||||
<?php $autoindex=0;?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
<?php $autoindex=0;?>
|
||||||
<?php $autoindex++;?>
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
<?php $autoindex++;?>
|
||||||
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||||
<td><?php echo $item['num']; ?></td>
|
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
|
||||||
<td>
|
<td><?php echo $item['num']; ?></td>
|
||||||
<a href='/admin/down/data/show/<?php echo $item['uuid'];?>'>详细</a>
|
<td>
|
||||||
<a href="/admin/down/sendmail/uuid/<?php echo $item['uuid'];?>" title="向数据下载者发送通知邮件">邮件通知</a>
|
<a href='/admin/down/data/show/<?php echo $item['uuid'];?>'>详细</a>
|
||||||
</td>
|
<a href="/admin/down/sendmail/uuid/<?php echo $item['uuid'];?>" title="向数据下载者发送通知邮件">邮件通知</a>
|
||||||
</tr>
|
</td>
|
||||||
<?php endforeach; ?>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
<?php endif; ?>
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -2,15 +2,16 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('申请管理');
|
$this->breadcrumb('申请管理');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('down/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
<div id="rightPanel">
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,9 +1,11 @@
|
||||||
<ul>
|
<div class="well" style="padding:8px 0">
|
||||||
<li class="title">申请管理与在线下载记录</li>
|
<ul class="nav nav-list">
|
||||||
<li><a href="/admin/down/offlineapp">离线数据申请管理</a></li>
|
<li class="nav-header"><h4>申请管理与记录</h4></li>
|
||||||
<li><a href="/admin/down/offline">离线数据服务记录</a></li>
|
<li class="divider"></li>
|
||||||
<li><a href="/admin/down/fixoffline">手动同步离线申请用户与网站帐号</a></li>
|
<li><a href="/admin/down/offlineapp">离线数据申请管理</a></li>
|
||||||
<li><a href="/admin/down/online">在线数据下载记录(从20110908开始)</a></li>
|
<li><a href="/admin/down/offline">离线数据服务记录</a></li>
|
||||||
<li><a href="/admin/down/user">用户下载记录</a></li>
|
<li><a href="/admin/down/online">在线数据下载记录</a></li>
|
||||||
<li><a href="/admin/down/data">数据下载记录</a></li>
|
<li><a href="/admin/down/user">用户下载记录</a></li>
|
||||||
</ul>
|
<li><a href="/admin/down/data">数据下载记录</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -2,63 +2,84 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
$this->Theme->AppendPlus($this,'colorbox');
|
||||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
$this->Theme->AppendPlus($this,'uploadify');
|
||||||
$this->headLink()->appendStylesheet('/css/author.css');
|
|
||||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
|
||||||
$this->breadcrumb('离线数据申请管理</a>');
|
$this->breadcrumb('离线数据申请管理</a>');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<style>
|
||||||
<?= $this->partial('down/left.phtml'); ?>
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
</div>
|
.high{background:#444;color:#FFF;}
|
||||||
<div id="rightPanel">
|
</style>
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<div class="row-fluid">
|
||||||
<div id="message">
|
<div class="span2">
|
||||||
<?php if ($this->msg) : ?>
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
<p><?php echo $this->msg; ?></p>
|
</div>
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<div class="span10">
|
||||||
<p><?php echo $msg; ?></p>
|
|
||||||
<?php endforeach;endif; ?>
|
<h3>离线数据服务记录</h3>
|
||||||
</div>
|
<hr />
|
||||||
<?php endif; ?>
|
|
||||||
<div class="right_title">离线数据服务记录</div>
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<a href="/admin/down/offline/add/1">添加新的离线服务记录</a> | <a href="/admin/down/offline/down/1">下载所有离线服务记录</a> | <a href="/admin/down/offline/update/1" onclick="return confirm('该操作需要较长时间,请不要中途刷新页面,是否确定继续?')">自动匹配离线下载用户与网站用户</a> | <a href="/admin/down/offline/emaillist/1">下载服务用户邮箱列表</a>
|
<div id="message">
|
||||||
| <a href="/admin/down/offline/monthreport/1">下载上月服务记录(科技部上报)</a>
|
<?php if ($this->msg) : ?>
|
||||||
|
<p><?php echo $this->msg; ?></p>
|
||||||
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
|
<p><?php echo $msg; ?></p>
|
||||||
|
<?php endforeach;endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="pull-left">
|
||||||
|
<a href="/admin/down/offline/add/1" class="btn btn-info">添加新的离线服务记录</a>
|
||||||
|
<a href="/admin/down/offline/down/1" class="btn btn-info">下载所有离线服务记录</a>
|
||||||
|
<a href="/admin/down/offline/emaillist/1" class="btn btn-info">下载服务用户邮箱列表</a>
|
||||||
|
</div>
|
||||||
|
<div class="input-append pull-right">
|
||||||
|
<form id="datasearch" class="search_form" action="">
|
||||||
|
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||||
|
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
|
||||||
|
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
|
||||||
|
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
<?php if (count($this->paginator)): ?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<table>
|
<table class="table table-bordered table-hover">
|
||||||
<thead><tr>
|
<thead>
|
||||||
<th width='70'>姓名</th>
|
<tr>
|
||||||
<th width='150'>单位</th>
|
<th width="52">姓名</th>
|
||||||
<th width='150'>地址</th>
|
<th>单位</th>
|
||||||
<th width='50'>邮编</th>
|
<th>地址</th>
|
||||||
<th width='300'>用途</th>
|
<th>邮编</th>
|
||||||
<th width='300'>数据清单</th>
|
<th>用途</th>
|
||||||
<th width='120'>申请时间</th>
|
<th>数据清单</th>
|
||||||
<th width='100'>操作</th>
|
<th>申请时间</th>
|
||||||
|
<th>操作</th>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php $autoindex=0;?>
|
<?php $autoindex=0;?>
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
<?php $autoindex++;?>
|
<?php $autoindex++;?>
|
||||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||||
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
|
<td><a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a></td>
|
||||||
<td><?= $item['unit']; ?></td>
|
<td><?= $item['unit']; ?></td>
|
||||||
<td><?= $item['address']; ?></td>
|
<td><?= $item['address']; ?></td>
|
||||||
<td><?= $item['postcode']; ?></td>
|
<td><?= $item['postcode']; ?></td>
|
||||||
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['project'].'['.$item['project_title'].' | '.$item['project_type'].' | '.$item['project_id'].']'; ?></textarea></td>
|
<td><textarea readonly="readonly" style="width:280px;height:100px;border:none;font-size:12px;"><?= $item['project'].'['.$item['project_title'].' | '.$item['project_type'].' | '.$item['project_id'].']'; ?></textarea></td>
|
||||||
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['datalist']; ?></textarea></td>
|
<td><textarea readonly="readonly" style="width:280px;height:100px;border:none;font-size:12px;"><?= $item['datalist']; ?></textarea></td>
|
||||||
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
|
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="/admin/down/offline/edit/<?= $item['id']; ?><?php if(empty($this->page)) "" ; else echo "/page/".$this->page; ?>">编辑</a> |
|
<a href="/admin/down/offline/edit/<?= $item['id']; ?><?php if(empty($this->page)) "" ; else echo "/page/".$this->page; ?>">编辑</a> |
|
||||||
<a href="/admin/down/offline/delete/<?= $item['id']; ?>" title="该操作将删除此记录并且删除与此记录有关的申请记录!请谨慎操作" onclick="return confirm('请仅删除测试用途的离线服务记录!')">删除</a> |
|
<a href="/admin/down/offline/delete/<?= $item['id']; ?>" title="该操作将删除此记录并且删除与此记录有关的申请记录!请谨慎操作" onclick="return confirm('请仅删除测试用途的离线服务记录!')">删除</a> |
|
||||||
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> |
|
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> |
|
||||||
<a href="/admin/down/offline/show/<?= $item['id']; ?>">详细</a> |
|
<a href="/admin/down/offline/show/<?= $item['id']; ?>">详细</a> |
|
||||||
<a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定重新通过该申请?')">重新通过</a>
|
<a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定重新通过该申请?')">重新通过</a> |
|
||||||
|
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传签字申请表</a>
|
||||||
|
<?php if(!empty($item['applicationform'])) { ?>
|
||||||
|
| <a href="/admin/down/applicationform/ac/view/?link=<?= urlencode($item['applicationform'])?>">查看签字申请表</a>
|
||||||
|
<?php }?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
@ -66,6 +87,64 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div><!-- row -->
|
||||||
|
<div id="upload-form" class="modal hide fade" tabindex="-1" aria-hidden="true">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h3 id="myModalLabel">申请表上传</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form id="application-form">
|
||||||
|
<div id="fsUploadProgress">允许上传30M以内的 PDF 文件</div>
|
||||||
|
<input type="file" name="Filedata" id="file_upload" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn" data-dismiss="modal" aria-hidden="true">取消上传</button>
|
||||||
|
<button class="btn btn-primary">上传完成</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
//var param = {};
|
||||||
|
//var upload_count = 0;
|
||||||
|
var uploader;
|
||||||
|
var param;
|
||||||
|
$(function() {
|
||||||
|
$('#file_upload').uploadify({
|
||||||
|
'swf' : '/js/lib/uploadify/uploadify.swf',
|
||||||
|
'uploader' : '/admin/down/uploadapplicationform',
|
||||||
|
'multi' : false,
|
||||||
|
'auto' : true,
|
||||||
|
'fileTypeExts' : '*.pdf; *.jpg',
|
||||||
|
'onUploadSuccess' : function(file, data, response) {
|
||||||
|
upload.onsuccess(file, data, response);
|
||||||
|
},
|
||||||
|
'onUploadStart' : function(file) {
|
||||||
|
$('#file_upload').uploadify('settings','formData',param);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var upload = {
|
||||||
|
onsuccess : function(file, data, response){
|
||||||
|
_data = $.parseJSON(data);
|
||||||
|
if(!$.isEmptyObject(_data.error))
|
||||||
|
{
|
||||||
|
alert(_data.error);
|
||||||
|
}else{
|
||||||
|
$('#upload-form').modal('hide');
|
||||||
|
window.location = window.location;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showUploadForm : function(id){
|
||||||
|
$('#upload-form').modal('show');
|
||||||
|
param = {
|
||||||
|
"PHPSESSID" : "<?php echo session_id(); ?>",
|
||||||
|
'orderid' : id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
<script>
|
<script>
|
||||||
function action(name,id){
|
function action(name,id){
|
||||||
var url;
|
var url;
|
||||||
|
|
|
@ -2,57 +2,60 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
$this->Theme->AppendPlus($this,'colorbox');
|
||||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
$this->Theme->AppendPlus($this,'uploadify');
|
||||||
$this->headLink()->appendStylesheet('/css/author.css');
|
|
||||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
|
||||||
$this->breadcrumb('离线数据申请管理</a>');
|
$this->breadcrumb('离线数据申请管理</a>');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('down/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
<div id="rightPanel">
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
<h3>离线数据申请管理</h3>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<div id="message">
|
<div id="message">
|
||||||
<?php if ($this->msg) : ?>
|
<?php if ($this->msg) : ?>
|
||||||
<p><?php echo $this->msg; ?></p>
|
<p><?php echo $this->msg; ?></p>
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
<p><?php echo $msg; ?></p>
|
<p><?php echo $msg; ?></p>
|
||||||
<?php endforeach;endif; ?>
|
<?php endforeach;endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="right_title">离线数据申请管理</div>
|
<div style="overflow:hidden">
|
||||||
|
<div class="pull-left">
|
||||||
|
<a href="/admin/down/offlineapp/status/4" class="btn btn-info">已收到的申请</a>
|
||||||
|
<a href="/admin/down/offlineapp/status/-1" class="btn btn-info">已拒绝的申请</a>
|
||||||
|
<a href="/admin/down/offlineapp/ac/pending" class="btn btn-info">待处理的申请</a>
|
||||||
|
<a href="/admin/down/offline" class="btn btn-info">已通过的申请(离线服务记录)</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<a href="/admin/down/offlineapp/reset/-1" onclick="return confirm('是否重置该申请?')">重置1年前的所有未收到申请表的记录</a>
|
<div class="input-append pull-right">
|
||||||
| <a href="/admin/down/offlineapp/status/4">已收到的申请</a>
|
<form id="datasearch" class="search_form" action="">
|
||||||
| <a href="/admin/down/offlineapp/status/-1">已拒绝的申请</a>
|
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
|
||||||
| <a href="/admin/down/offlineapp">待处理的申请</a>
|
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
|
||||||
| <a href="/admin/down/offline">已通过的申请(离线服务记录)</a>
|
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
|
||||||
<div class="search">
|
<button type="submit" class="btn" id="search_btn">搜索</button>
|
||||||
<form action="/admin/down/offlineapp" method="get">
|
</form>
|
||||||
<input name="search" value="1" type="hidden">
|
</div>
|
||||||
<ul>
|
</div>
|
||||||
<li><input name="q" value="" type="text" placeholder="搜索关键字"></li>
|
|
||||||
<li><input class="searchbtn" value="搜索" type="submit"></li>
|
<div id="datalist" style="overflow:hidden">
|
||||||
</ul>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<div id="datalist">
|
|
||||||
<?php
|
<?php
|
||||||
if (count($this->paginator)):
|
if (count($this->paginator)):
|
||||||
echo "<ul>";
|
echo '<ul class="unstyled">';
|
||||||
$autoindex=0;
|
$autoindex=0;
|
||||||
foreach ($this->paginator as $item):
|
foreach ($this->paginator as $item):
|
||||||
$autoindex++;?>
|
$autoindex++;?>
|
||||||
<li id="list_<?php echo $item['id'];?>">
|
<li id="list_<?php echo $item['id'];?>" class="well well-small">
|
||||||
<p>
|
<p>
|
||||||
|
<?= $autoindex ?>.
|
||||||
<a href="mailto:<?= $item['email']; ?>?subject=答复数据申请问题"><?= $item['username']; ?></a> |
|
<a href="mailto:<?= $item['email']; ?>?subject=答复数据申请问题"><?= $item['username']; ?></a> |
|
||||||
申请时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>
|
申请时间:<?= date('Y-m-d',strtotime($item['ts_created'])); ?>
|
||||||
<?php if(!empty($item['ts_received'])) echo " | 收到时间:".date('Y-m-d',strtotime($item['ts_received']));?>
|
<?php if(!empty($item['ts_received'])) echo " | 收到时间:".date('Y-m-d',strtotime($item['ts_received']));?>
|
||||||
|
@ -70,14 +73,19 @@
|
||||||
数据清单:<?= $item['datalist']; ?>
|
数据清单:<?= $item['datalist']; ?>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">申请表</a> |
|
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">原始申请表</a> |
|
||||||
<?php if ($item['datastatus']==3) : ?>
|
<?php if ($item['datastatus']==3) : ?>
|
||||||
<span id="start_<?= $item['id']; ?>"><a href="javascript:action('start',<?= $item['id']; ?>);" onclick="return confirm('确定收到该申请?')">收到</a></span> |
|
<span id="start_<?= $item['id']; ?>"><a href="javascript:action('start',<?= $item['id']; ?>);" onclick="return confirm('确定收到该申请?')">收到</a></span> |
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定通过该申请?')">通过</a> |
|
<a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定通过该申请?')">通过</a> |
|
||||||
<a href="javascript:action('deleted',<?= $item['id']; ?>);" onclick="return confirm('确定将此记录删除?')">删除</a> |
|
<a href="javascript:action('deleted',<?= $item['id']; ?>);" onclick="return confirm('确定将此记录删除?')">删除</a> |
|
||||||
<a href="javascript:action('deny',<?= $item['id']; ?>);" onclick="return confirm('确定拒绝该申请?')">拒绝</a> |
|
<a href="javascript:action('deny',<?= $item['id']; ?>);" onclick="return confirm('确定拒绝该申请?')">拒绝</a> |
|
||||||
<a href="javascript:action('reset',<?= $item['id']; ?>);" onclick="return confirm('是否重置该申请?')">重置</a>
|
<a href="javascript:action('reset',<?= $item['id']; ?>);" onclick="return confirm('是否重置该申请?')">重置</a> |
|
||||||
|
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传签字申请表</a>
|
||||||
|
<?php if(!empty($item['applicationform'])) { ?>
|
||||||
|
| <a href="/admin/down/applicationform/ac/view/?link=<?= urlencode($item['applicationform'])?>">查看签字申请表</a>
|
||||||
|
| <a href="/admin/down/offlineapps/ac/resetappform/?offlineappid=<?= $item['id'] ?>" onclick="return confirm('是否重置该申请表?')">重置申请表</a>
|
||||||
|
<?php }?>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach;
|
<?php endforeach;
|
||||||
|
@ -85,9 +93,65 @@
|
||||||
endif; ?>
|
endif; ?>
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="upload-form" class="modal hide fade" tabindex="-1" aria-hidden="true">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h3 id="myModalLabel">申请表上传</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form id="application-form">
|
||||||
|
<div id="fsUploadProgress">允许上传30M以内的 PDF 文件</div>
|
||||||
|
<input type="file" name="Filedata" id="file_upload" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn" data-dismiss="modal" aria-hidden="true">取消上传</button>
|
||||||
|
<button class="btn btn-primary">上传完成</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
//var param = {};
|
||||||
|
//var upload_count = 0;
|
||||||
|
var uploader;
|
||||||
|
var param;
|
||||||
|
$(function() {
|
||||||
|
$('#file_upload').uploadify({
|
||||||
|
'swf' : '/js/lib/uploadify/uploadify.swf',
|
||||||
|
'uploader' : '/admin/down/uploadapplicationform',
|
||||||
|
'multi' : false,
|
||||||
|
'auto' : true,
|
||||||
|
'fileTypeExts' : '*.pdf; *.jpg',
|
||||||
|
'onUploadSuccess' : function(file, data, response) {
|
||||||
|
upload.onsuccess(file, data, response);
|
||||||
|
},
|
||||||
|
'onUploadStart' : function(file) {
|
||||||
|
$('#file_upload').uploadify('settings','formData',param);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var upload = {
|
||||||
|
onsuccess : function(file, data, response){
|
||||||
|
_data = $.parseJSON(data);
|
||||||
|
if(!$.isEmptyObject(_data.error))
|
||||||
|
{
|
||||||
|
alert(_data.error);
|
||||||
|
}else{
|
||||||
|
$('#upload-form').modal('hide');
|
||||||
|
window.location = window.location;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
showUploadForm : function(id){
|
||||||
|
$('#upload-form').modal('show');
|
||||||
|
param = {
|
||||||
|
"PHPSESSID" : "<?php echo session_id(); ?>",
|
||||||
|
'orderid' : id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
<script>
|
|
||||||
function action(name,id){
|
function action(name,id){
|
||||||
var url;
|
var url;
|
||||||
if(name == "start")
|
if(name == "start")
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<ul class="nav nav-pills">
|
||||||
|
<li class="<?= $this->navIn == "notreceived" ? "active":"" ?>">
|
||||||
|
<a href="/admin/down/offlineapps/ac/notreceived">未接收</a>
|
||||||
|
</li>
|
||||||
|
<li class="<?= $this->navIn == "nopdf" ? "active":"" ?>">
|
||||||
|
<a href="/admin/down/offlineapps/ac/nopdf">已接收未上传申请表</a>
|
||||||
|
</li>
|
||||||
|
<li class="<?= $this->navIn == "notpassed" ? "active":"" ?>">
|
||||||
|
<a href="/admin/down/offlineapps/ac/notpassed">待审批</a>
|
||||||
|
</li>
|
||||||
|
<li class="<?= $this->navIn == "passed" ? "active":"" ?>">
|
||||||
|
<a href="/admin/down/offlineapps/ac/passed">已上传申请表已通过</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->Theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->Theme->AppendPlus($this,'uploadify');
|
||||||
|
$this->Theme->AppendModel($this,'admin-down-offlineapps');
|
||||||
|
$this->Theme->AppendModel($this,'sfadmin');
|
||||||
|
function applicationform($form)
|
||||||
|
{
|
||||||
|
if(empty($form))
|
||||||
|
{
|
||||||
|
return "未提交";
|
||||||
|
}else{
|
||||||
|
return '<a href="/admin/down/applicationform/ac/download">点击下载</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
|
.high{background:#444;color:#FFF;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
|
||||||
|
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||||
|
|
||||||
|
<form action="" method="get" class="search input-append">
|
||||||
|
<input type="hidden" name="search" value='1' />
|
||||||
|
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||||
|
<button type="submit" class="btn">搜索</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<table class="table table-bordered table-hover"><thead>
|
||||||
|
<tr>
|
||||||
|
<th><input type="checkbox" class="select_rows" data-tbody="list" /></th>
|
||||||
|
<th>申请者</th>
|
||||||
|
<th>提交时间</th>
|
||||||
|
<th>申请表</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr></thead>
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<tbody id="list">
|
||||||
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" class="select_item" value="<?= $item['orderid']?>" /></td>
|
||||||
|
<td><?php echo $item['realname'].'['.$item['username'].'] <span title="'.$item['title'].'">'.mb_substr($item['title'],0,15,"UTF-8")."</span>";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?></td>
|
||||||
|
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
|
||||||
|
<td><?= applicationform($item['applicationform']) ?></td>
|
||||||
|
<td>
|
||||||
|
<a href="/admin/down/offlineapps/ac/view/?offlineappid=<?= $item['id'] ?>">查看详细</a>
|
||||||
|
<a href="/admin/down/offlineapps/ac/receive/?offlineappid=<?= $item['id'] ?>">接收</a>
|
||||||
|
<a href="/admin/down/offlineapps/ac/return/?offlineappid=<?= $item['id'] ?>">退回</a>
|
||||||
|
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传申请表</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
|
||||||
|
</div><!-- span9 -->
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var _this = {};
|
||||||
|
sfadmin.init();
|
||||||
|
</script>
|
||||||
|
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->Theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->Theme->AppendPlus($this,'uploadify');
|
||||||
|
$this->Theme->AppendModel($this,'admin-down-offlineapps');
|
||||||
|
$this->Theme->AppendModel($this,'sfadmin');
|
||||||
|
function applicationform($form)
|
||||||
|
{
|
||||||
|
if(empty($form))
|
||||||
|
{
|
||||||
|
return "未提交";
|
||||||
|
}else{
|
||||||
|
return '<a href="/admin/down/applicationform/ac/view?link='.$form.'">查看</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
|
.high{background:#444;color:#FFF;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
|
||||||
|
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||||
|
|
||||||
|
<form action="" method="get" class="search input-append">
|
||||||
|
<input type="hidden" name="search" value='1' />
|
||||||
|
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||||
|
<button type="submit" class="btn">搜索</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<table class="table table-bordered table-hover"><thead>
|
||||||
|
<tr>
|
||||||
|
<th><input type="checkbox" class="select_rows" data-tbody="list" /></th>
|
||||||
|
<th>申请者</th>
|
||||||
|
<th>提交时间</th>
|
||||||
|
<th>申请表</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr></thead>
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<tbody id="list">
|
||||||
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" class="select_item" value="<?= $item['orderid']?>" /></td>
|
||||||
|
<td><?php echo $item['realname'].'['.$item['username'].'] <span title="'.$item['title'].'">'.mb_substr($item['title'],0,15,"UTF-8")."</span>";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?></td>
|
||||||
|
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
|
||||||
|
<td><?= applicationform($item['applicationform']) ?></td>
|
||||||
|
<td>
|
||||||
|
<a href="/admin/down/offlineapps/ac/view/?offlineappid=<?= $item['id'] ?>">查看详细</a>
|
||||||
|
<a href="/admin/down/offlineapps/ac/toauthor/?offlineappid=<?= $item['id'] ?>">发给作者</a>
|
||||||
|
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传申请表</a>
|
||||||
|
<a href="/admin/down/offlineapps/ac/resetappform/?offlineappid=<?= $item['id'] ?>" onclick="return confirm('是否确认重置该用户的申请表?')">重置申请表</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
|
||||||
|
</div><!-- span9 -->
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var _this = {};
|
||||||
|
sfadmin.init();
|
||||||
|
</script>
|
||||||
|
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>
|
|
@ -0,0 +1,74 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->Theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->Theme->AppendPlus($this,'uploadify');
|
||||||
|
$this->Theme->AppendModel($this,'admin-down-offlineapps');
|
||||||
|
$this->Theme->AppendModel($this,'sfadmin');
|
||||||
|
function applicationform($form)
|
||||||
|
{
|
||||||
|
if(empty($form))
|
||||||
|
{
|
||||||
|
return "未提交";
|
||||||
|
}else{
|
||||||
|
return '<a href="/admin/down/applicationform/ac/view?link='.$form.'">查看</a> <a href="/admin/down/applicationform/ac/download?link='.$form.'">下载</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
|
.high{background:#444;color:#FFF;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
|
||||||
|
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||||
|
|
||||||
|
<form action="" method="get" class="search input-append">
|
||||||
|
<input type="hidden" name="search" value='1' />
|
||||||
|
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||||
|
<button type="submit" class="btn">搜索</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<table class="table table-bordered table-hover"><thead>
|
||||||
|
<tr>
|
||||||
|
<th><input type="checkbox" class="select_rows" data-tbody="list" /></th>
|
||||||
|
<th>申请者</th>
|
||||||
|
<th>提交时间</th>
|
||||||
|
<th>申请表</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr></thead>
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<tbody id="list">
|
||||||
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
|
<tr>
|
||||||
|
<td><input type="checkbox" class="select_item" value="<?= $item['orderid']?>" /></td>
|
||||||
|
<td><?php echo $item['realname'].'['.$item['username'].'] <span title="'.$item['title'].'">'.mb_substr($item['title'],0,15,"UTF-8")."</span>";echo mb_strlen($item['title'],"UTF-8") > 15 ? "...":"";?></td>
|
||||||
|
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
|
||||||
|
<td><?= applicationform($item['applicationform']) ?></td>
|
||||||
|
<td>
|
||||||
|
<a href="/admin/down/offlineapps/ac/view/?offlineappid=<?= $item['id'] ?>">查看详细</a>
|
||||||
|
<a href="/admin/down/offlineapps/ac/receive/?offlineappid=<?= $item['id'] ?>">接收</a>
|
||||||
|
<a href="/admin/down/offlineapps/ac/deny/offlineappid/<?= $item['id'] ?>">退回</a>
|
||||||
|
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传申请表</a>
|
||||||
|
<a href="/admin/down/offlineapps/ac/resetappform/?offlineappid=<?= $item['id'] ?>" onclick="return confirm('是否确认重置该用户的申请表?')">重置申请表</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
|
||||||
|
</div><!-- span9 -->
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var _this = {};
|
||||||
|
sfadmin.init();
|
||||||
|
</script>
|
||||||
|
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->Theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->Theme->AppendPlus($this,'uploadify');
|
||||||
|
$this->Theme->AppendModel($this,'admin-down-offlineapps');
|
||||||
|
$this->Theme->AppendModel($this,'sfadmin');
|
||||||
|
function applicationform($form)
|
||||||
|
{
|
||||||
|
if(empty($form))
|
||||||
|
{
|
||||||
|
return "未提交";
|
||||||
|
}else{
|
||||||
|
return '<a href="/admin/down/applicationform/ac/download">点击下载</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
|
.high{background:#444;color:#FFF;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
|
||||||
|
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||||
|
|
||||||
|
<h2>发给作者</h2>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div><!-- span9 -->
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var _this = {};
|
||||||
|
sfadmin.init();
|
||||||
|
</script>
|
||||||
|
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<div id="upload-form" class="modal hide fade" tabindex="-1" aria-hidden="true">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h3 id="myModalLabel">申请表上传</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form id="application-form">
|
||||||
|
<div id="fsUploadProgress">允许上传20M以内的 PDF 文件</div>
|
||||||
|
<input type="file" name="Filedata" id="file_upload" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn" data-dismiss="modal" aria-hidden="true">取消上传</button>
|
||||||
|
<button class="btn btn-primary">上传完成</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
_this.SessionID = '<?php echo session_id(); ?>';
|
||||||
|
</script>
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->Theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->Theme->AppendPlus($this,'uploadify');
|
||||||
|
$this->Theme->AppendModel($this,'admin-down-offlineapps');
|
||||||
|
$this->Theme->AppendModel($this,'sfadmin');
|
||||||
|
function applicationform($form)
|
||||||
|
{
|
||||||
|
if(empty($form))
|
||||||
|
{
|
||||||
|
return "未提交";
|
||||||
|
}else{
|
||||||
|
return '<a href="/admin/down/applicationform/ac/download">点击下载</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
|
.high{background:#444;color:#FFF;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
|
||||||
|
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||||
|
|
||||||
|
<h2>查看详细</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>申请者:<?= $this->data[0]['username'] ?></li>
|
||||||
|
<li>单位:<?= $this->data[0]['unit'] ?></li>
|
||||||
|
<li>电话:<?= $this->data[0]['phone'] ?></li>
|
||||||
|
<li>地址:<?= $this->data[0]['address'] ?></li>
|
||||||
|
<li>邮编:<?= $this->data[0]['postcode'] ?></li>
|
||||||
|
<li>未签字pdf:<?= $this->data[0]['pdflink'] ?></li>
|
||||||
|
<li>签字pdf:<?= ( isset($this->data[0]['applicationform']) && !empty($this->data[0]['applicationform'])) ? '<a href="">查看</a> <a href="">下载</a>':"未提交"?></li>
|
||||||
|
<li>数据列表:<?= $this->data[0]['datalist'] ?></li>
|
||||||
|
<li>邮箱:<?= $this->data[0]['email'] ?></li>
|
||||||
|
|
||||||
|
<li>项目编号:<?= $this->data[0]['project_id'] ?></li>
|
||||||
|
<li>项目类型:<?= $this->data[0]['project_type'] ?></li>
|
||||||
|
<li>项目名称:<?= $this->data[0]['project_title'] ?></li>
|
||||||
|
<li>项目负责人:<?= $this->data[0]['leader'] ?></li>
|
||||||
|
<li>项目负责人职称:<?= $this->data[0]['leadertitle'] ?></li>
|
||||||
|
<li>项目介绍:<?= $this->data[0]['project'] ?></li>
|
||||||
|
|
||||||
|
<li>申请时间:<?= $this->data[0]['ts_created'] ?></li>
|
||||||
|
<li>接收时间:<?= $this->data[0]['ts_received'] ?></li>
|
||||||
|
<li>通过时间:<?= $this->data[0]['ts_approved'] ?></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div><!-- span9 -->
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var _this = {};
|
||||||
|
sfadmin.init();
|
||||||
|
</script>
|
||||||
|
<?= $this->partial('down/offlineapps-uploaderform.phtml'); ?>
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
|
.high{background:#444;color:#FFF;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
|
||||||
|
<?= $this->partial('down/offlineapps-navpills.phtml',array('navIn'=>$this->navIn)); ?>
|
||||||
|
|
||||||
|
<form action="" method="get" class="search input-append">
|
||||||
|
<input type="hidden" name="search" value='1' />
|
||||||
|
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||||
|
<button type="submit" class="btn">搜索</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<table class="table table-bordered table-hover"><thead>
|
||||||
|
<tr>
|
||||||
|
<th width='600'>元数据标题</th>
|
||||||
|
<th width='120'>责任编辑</th>
|
||||||
|
<th width='120'>接收时间</th>
|
||||||
|
<th width='180'>操作</th>
|
||||||
|
</tr></thead>
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<tbody id="list">
|
||||||
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/data/<?php echo $item['uuid'];?>"><?= $item['title']?></a></td>
|
||||||
|
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
|
||||||
|
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
||||||
|
<td>
|
||||||
|
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">分配编辑</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
|
||||||
|
</div><!-- span9 -->
|
||||||
|
</div>
|
|
@ -2,69 +2,71 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||||
$this->breadcrumb('在线数据下载记录</a>');
|
$this->breadcrumb('在线数据下载记录</a>');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('down/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
</div>
|
||||||
<div id="message">
|
|
||||||
<?php if ($this->msg) : ?>
|
<div class="span10">
|
||||||
<p><?php echo $this->msg; ?></p>
|
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<h3><?php if(!empty($this->title)) echo $this->title;?>共有 <?php echo $this->count;?> 条在线下载记录</h3>
|
||||||
<p><?php echo $msg; ?></p>
|
<hr />
|
||||||
<?php endforeach;endif; ?>
|
|
||||||
</div>
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<?php endif; ?>
|
<div id="message">
|
||||||
|
<?php if ($this->msg) : ?>
|
||||||
|
<p><?php echo $this->msg; ?></p>
|
||||||
<div id="rightPanel">
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
|
<p><?php echo $msg; ?></p>
|
||||||
<div class="right_title"><?php if(!empty($this->title)) echo $this->title;?>共有 <?php echo $this->count;?> 条在线下载记录</div>
|
<?php endforeach;endif; ?>
|
||||||
|
</div>
|
||||||
<div class="search">
|
<?php endif; ?>
|
||||||
<form action="/admin/down/search/" method="get">
|
|
||||||
<input type="hidden" name="search" value='1' />
|
<div class="search">
|
||||||
<ul>
|
<form action="/admin/down/search/" method="get">
|
||||||
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
|
<div class="input-append">
|
||||||
<li><input type="submit" class="searchbtn" value="搜索" /></li>
|
<input type="hidden" name="search" value='1' />
|
||||||
</ul>
|
<input type="text" name="keyword" value="<?php echo $this->keyword; ?>" />
|
||||||
</form>
|
<button class="btn" type="submit">搜索</button>
|
||||||
</div><!-- search DIV -->
|
</div>
|
||||||
|
</form>
|
||||||
<table>
|
</div><!-- search DIV -->
|
||||||
<thead>
|
|
||||||
<tr>
|
<table class="table table-hover">
|
||||||
<td width='100'>姓名</td>
|
<thead>
|
||||||
<td width='150'>单位</td>
|
<tr>
|
||||||
<td width='350'>数据</td>
|
<td width='100'>姓名</td>
|
||||||
<td width='300'>用途</td>
|
<td width='150'>单位</td>
|
||||||
<td width='120'>下载时间</td>
|
<td width='350'>数据</td>
|
||||||
<td width='100'>操作</td>
|
<td width='300'>用途</td>
|
||||||
</tr>
|
<td width='120'>下载时间</td>
|
||||||
</thead>
|
<td width='100'>操作</td>
|
||||||
<?php if (count($this->paginator)): ?>
|
</tr>
|
||||||
<?php $autoindex=0;?>
|
</thead>
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<?php $autoindex++;?>
|
<?php $autoindex=0;?>
|
||||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a><a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
|
<?php $autoindex++;?>
|
||||||
<td><?= $item['unit']?></td>
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||||
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
|
<td><a href="/admin/user/show/id/<?php echo $item['userid'];?>"><img src="/images/user.gif" /></a><a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a> </td>
|
||||||
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?php echo $item['project']; ?></textarea></td>
|
<td><?= $item['unit']?></td>
|
||||||
<td><?php echo date('Y-m-d H:i:s', strtotime($item['ts_created'])); ?></td>
|
<td><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><img src="/images/data.gif" /></a><a href="/admin/down/data/show/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
|
||||||
<td>
|
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?php echo $item['project']; ?></textarea></td>
|
||||||
<a href='/admin/down/online/show/<?php echo $item['id'];?>'>详细</a>
|
<td><?php echo date('Y-m-d H:i:s', strtotime($item['ts_created'])); ?></td>
|
||||||
<a href='/admin/down/online/delete/<?= $item['id'];?>/' onclick="return confirm('确定将此记录删除?')">删除</a>
|
<td>
|
||||||
</td>
|
<a href='/admin/down/online/show/<?php echo $item['id'];?>'>详细</a>
|
||||||
</tr>
|
<a href='/admin/down/online/delete/<?= $item['id'];?>/' onclick="return confirm('确定将此记录删除?')">删除</a>
|
||||||
<?php endforeach; ?>
|
</td>
|
||||||
<?php endif; ?>
|
</tr>
|
||||||
</table>
|
<?php endforeach; ?>
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -2,7 +2,6 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
|
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
||||||
|
@ -10,53 +9,59 @@
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
$this->headScript()->appendFile('/js/prototype.js');
|
$this->headScript()->appendFile('/js/prototype.js');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('down/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
<div id="rightPanel">
|
</div>
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<div class="span10">
|
||||||
<div id="message">
|
|
||||||
<?php if ($this->msg) : ?>
|
|
||||||
<p><?php echo $this->msg; ?></p>
|
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
|
||||||
<p><?php echo $msg; ?></p>
|
|
||||||
<?php endforeach;endif; ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<div class="right_title"><?php if(!empty($this->title)) echo $this->title;?>共 <?php echo $this->count;?> 数据下载记录</div>
|
<h3><?php if(!empty($this->title)) echo $this->title;?>共 <?php echo $this->count;?> 数据下载记录</h3>
|
||||||
|
<hr />
|
||||||
|
|
||||||
<div class="search">
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<form action="/admin/down/user/" method="get">
|
<div class="alert">
|
||||||
<input type="hidden" name="search" value='1' />
|
<?php if ($this->msg) : ?>
|
||||||
<ul>
|
<p><?php echo $this->msg; ?></p>
|
||||||
<li><label>搜索关键字</label><input type="text" name="keyword" value="<?php echo $this->keyword; ?>" /></li>
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
<li><input type="submit" class="searchbtn" value="搜索" /></li>
|
<p><?php echo $msg; ?></p>
|
||||||
</ul>
|
<?php endforeach;endif; ?>
|
||||||
</form>
|
</div>
|
||||||
</div><!-- search DIV -->
|
<?php endif; ?>
|
||||||
|
|
||||||
<table><thead>
|
<div class="row-fluid">
|
||||||
<tr>
|
<div class="span12">
|
||||||
<td width='150'>姓名</td>
|
<form action="/admin/down/user/" method="get" class="form-search">
|
||||||
<td width='350'>单位</td>
|
<div class="input-append">
|
||||||
<td width='150'>下载次数</td>
|
<input type="hidden" name="search" value='1' />
|
||||||
<td width='150'>操作</td>
|
<input type="text" name="keyword" value="<?php echo $this->keyword; ?>" class="span8 search-query"/>
|
||||||
</tr></thead>
|
<button type="submit" class="btn">搜索</button>
|
||||||
<?php if (count($this->paginator)): ?>
|
</div>
|
||||||
<?php $autoindex=0;?>
|
</form>
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
</div>
|
||||||
<?php $autoindex++;?>
|
</div><!-- search DIV -->
|
||||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
|
||||||
<td><a href="/admin/user/show/id/<?php echo $item['uid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['uid'];?>"><?= $item['realname']?></a> </td>
|
<table class="table table-hover"><thead>
|
||||||
<td><?php echo $item['unit']; ?></td>
|
<tr>
|
||||||
<td><?php echo $item['num']; ?></td>
|
<td width='150'>姓名</td>
|
||||||
<td>
|
<td width='350'>单位</td>
|
||||||
<a href='/admin/down/user/show/<?php echo $item['uid'];?>'>详细</a>
|
<td width='150'>下载次数</td>
|
||||||
</td>
|
<td width='150'>操作</td>
|
||||||
</tr>
|
</tr></thead>
|
||||||
<?php endforeach; ?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<?php endif; ?>
|
<?php $autoindex=0;?>
|
||||||
</table>
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
<?php $autoindex++;?>
|
||||||
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||||
|
<td><a href="/admin/user/show/id/<?php echo $item['uid'];?>"><img src="/images/user.gif" /></a> <a href="/admin/down/user/show/<?php echo $item['uid'];?>"><?= $item['realname']?></a> </td>
|
||||||
|
<td><?php echo $item['unit']; ?></td>
|
||||||
|
<td><?php echo $item['num']; ?></td>
|
||||||
|
<td>
|
||||||
|
<a href='/admin/down/user/show/<?php echo $item['uid'];?>'>详细</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -12,7 +12,6 @@
|
||||||
<li><a href="/admin/review"><span>元数据评审</span></a></li>
|
<li><a href="/admin/review"><span>元数据评审</span></a></li>
|
||||||
<li><a href="/admin/news"><span>新闻中心</span></a></li>
|
<li><a href="/admin/news"><span>新闻中心</span></a></li>
|
||||||
<li><a href="/admin/stat"><span>统计数据</span></a></li>
|
<li><a href="/admin/stat"><span>统计数据</span></a></li>
|
||||||
<li><a href="/admin/sys"><span>系统管理</span></a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<p class="navbar-text pull-right">
|
<p class="navbar-text pull-right">
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->headLink()->appendStylesheet('/static/css/jquery.jgrowl.css');
|
$this->headLink()->appendStylesheet('/static/css/jquery.jgrowl.css');
|
||||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||||
$this->headScript()->appendFile('/static/js/jquery.jgrowl_minimized.js');
|
$this->headScript()->appendFile('/static/js/jquery.jgrowl_minimized.js');
|
||||||
|
@ -10,19 +9,25 @@
|
||||||
$this->breadcrumb('后台管理首页');
|
$this->breadcrumb('后台管理首页');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="OneColumn">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('data/left.phtml'); ?>
|
<div class="span2">
|
||||||
<?= $this->partial('down/left.phtml'); ?>
|
<?= $this->partial('data/left.phtml'); ?>
|
||||||
<?= $this->partial('user/left.phtml'); ?>
|
</div>
|
||||||
<?= $this->partial('review/left.phtml'); ?>
|
<div class="span2">
|
||||||
<?= $this->partial('news/left.phtml'); ?>
|
<?= $this->partial('down/left.phtml'); ?>
|
||||||
<?= $this->partial('stat/left.phtml'); ?>
|
</div>
|
||||||
<?= $this->partial('sys/left.phtml'); ?>
|
<div class="span2">
|
||||||
<ul>
|
<?= $this->partial('user/left.phtml'); ?>
|
||||||
<li class="title">其他工具</a></li>
|
</div>
|
||||||
<li><a href="/admin/watermd">WATER元数据处理工具</a></li>
|
<div class="span2">
|
||||||
<li><a href="/admin/test">数据测试管理</a></li>
|
<?= $this->partial('review/left.phtml'); ?>
|
||||||
</ul>
|
</div>
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('news/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('stat/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--
|
<!--
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
|
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
|
||||||
|
@ -12,27 +11,20 @@
|
||||||
.listingDetails{position:absolute;width:650px; z-index:999;}
|
.listingDetails{position:absolute;width:650px; z-index:999;}
|
||||||
.pad{position:absolute;background:#FFF;border:2px solid #444;border-radius:5px;padding:5px;display:none;}
|
.pad{position:absolute;background:#FFF;border:2px solid #444;border-radius:5px;padding:5px;display:none;}
|
||||||
</style>
|
</style>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('news/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('news/left.phtml'); ?>
|
||||||
<div id="rightPanel">
|
</div>
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<div class="span10">
|
||||||
<div id="message">
|
|
||||||
<?php if ($this->msg) : ?>
|
|
||||||
<p><?php echo $this->msg; ?></p>
|
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
|
||||||
<p><?php echo $msg; ?></p>
|
|
||||||
<?php endforeach;endif; ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<h3>统计</h3>
|
<h3>统计</h3>
|
||||||
<hr/>
|
<hr/>
|
||||||
<ul>
|
<ul class="unstyled">
|
||||||
<li>共 <?php echo $this->totle['c'];?> 条档案</li>
|
<li>共 <?php echo $this->totle['c'];?> 条档案</li>
|
||||||
<li>栏目 <?php echo $this->typec['c'];?> 个</li>
|
<li>栏目 <?php echo $this->typec['c'];?> 个</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('.title').bind('click', function() {
|
$('.title').bind('click', function() {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<ul class="nav nav-list">
|
<div class="well" style="padding:8px 0">
|
||||||
<li class="title">新闻中心</li>
|
<ul class="nav nav-list">
|
||||||
<li><a href="/admin/news">新闻中心首页</a></li>
|
<li class="nav-header"><h4>新闻中心</h4></li>
|
||||||
<li><a href="/admin/news/catlog">栏目管理</a></li>
|
<li class="divider"></li>
|
||||||
<li><a href="/admin/news/catlog/add/1">栏目添加</a></li>
|
<li><a href="/admin/news">新闻中心首页</a></li>
|
||||||
<li><a href="/admin/news/newslist">新闻管理</a></li>
|
<li><a href="/admin/news/newslist">新闻管理</a></li>
|
||||||
<li><a href="/admin/news/newsadd">新闻发布</a></li>
|
<li><a href="/admin/news/newsadd">新闻发布</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
|
@ -79,7 +79,7 @@ $(document).ready(function(){
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="source">来源</label>
|
<label class="control-label" for="source">来源</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<input type="text" id="source" class="span12" name="source" value="寒区旱区科学数据中心" />
|
<input type="text" id="source" class="span12" name="source" value="<?= $this->config->title->site ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
@ -123,7 +123,7 @@ $(document).ready(function(){
|
||||||
<option value="true">立即发布</option>
|
<option value="true">立即发布</option>
|
||||||
<option value="false">存草稿</option>
|
<option value="false">存草稿</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="checkbox" id="pubtimeturn" name="pubtimer" value="1" />定时发布?
|
<input type="checkbox" id="pubtimeturn" name="pubtimer" value="1" <?php if($this->ev['is_pub']==true && !empty($this->ev['ts_published'])) echo 'checked="checked"'; ?>/>定时发布?
|
||||||
<input type="text" name="pubtime" id="pubtime" value="<?php echo date("Y-m-d H:i",time()+3600*24);?>" readonly="readonly" />
|
<input type="text" name="pubtime" id="pubtime" value="<?php echo date("Y-m-d H:i",time()+3600*24);?>" readonly="readonly" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||||
$this->headLink()->appendStylesheet('/css/author.css');
|
$this->headLink()->appendStylesheet('/css/author.css');
|
||||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||||
|
@ -18,42 +17,50 @@
|
||||||
<script>
|
<script>
|
||||||
$('#divFooter').css('position','absolute');
|
$('#divFooter').css('position','absolute');
|
||||||
</script>
|
</script>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('news/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('news/left.phtml'); ?>
|
||||||
<div id="rightPanel">
|
</div>
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
|
||||||
<div id="message">
|
<div class="span10">
|
||||||
<?php if ($this->msg) : ?>
|
|
||||||
<p><?php echo $this->msg; ?></p>
|
<h3>新闻管理</h3>
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<hr />
|
||||||
<p><?php echo $msg; ?></p>
|
|
||||||
<?php endforeach;endif; ?>
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
</div>
|
<div id="message">
|
||||||
<?php endif; ?>
|
<?php if ($this->msg) : ?>
|
||||||
<div>
|
<p><?php echo $this->msg; ?></p>
|
||||||
<select id="navigation">
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
<option>按栏目查看</option>
|
<p><?php echo $msg; ?></p>
|
||||||
<?php
|
<?php endforeach;endif; ?>
|
||||||
if(count($this->types))
|
</div>
|
||||||
{
|
<?php endif; ?>
|
||||||
foreach($this->types as $v)
|
|
||||||
{
|
<div>
|
||||||
if(!empty($v[$this->deepField])) {$haed = str_repeat('-',$v[$this->deepField]);}
|
|
||||||
if($this->type == $v['id'])
|
<select id="navigation">
|
||||||
echo '<option value="/admin/news/newslist/type/'.$v['id'].'" selected="selected">'
|
<option>按栏目查看</option>
|
||||||
.$haed
|
<?php
|
||||||
.$v['title'].'</option>';
|
if(count($this->types))
|
||||||
else
|
{
|
||||||
echo '<option value="/admin/news/newslist/type/'.$v['id'].'">'.$haed.$v['title'].'</option>';
|
foreach($this->types as $v)
|
||||||
}
|
{
|
||||||
}
|
if(!empty($v[$this->deepField])) {$haed = str_repeat('-',$v[$this->deepField]);}
|
||||||
?>
|
if($this->type == $v['id'])
|
||||||
</select>
|
echo '<option value="/admin/news/newslist/type/'.$v['id'].'" selected="selected">'
|
||||||
|
.$haed
|
||||||
<a href="/admin/news/newslist">所有新闻列表</a>
|
.$v['title'].'</option>';
|
||||||
</div>
|
else
|
||||||
<table id="report" class="stylized full">
|
echo '<option value="/admin/news/newslist/type/'.$v['id'].'">'.$haed.$v['title'].'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<a href="/admin/news/newslist">所有新闻列表</a>
|
||||||
|
</div>
|
||||||
|
<table id="report" class="table table-bordered table-striped table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="50%">新闻标题</th>
|
<th width="50%">新闻标题</th>
|
||||||
|
@ -72,7 +79,7 @@ $('#divFooter').css('position','absolute');
|
||||||
$list .= '
|
$list .= '
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a id="titlebtn'.$v['id'].'" class="title"><b>'.$v['title'].'</b></a>
|
'.$v['title'].'
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="'.$v['type_url'].'"><b>'.$v['type_title'].'</b></a>
|
<a href="'.$v['type_url'].'"><b>'.$v['type_title'].'</b></a>
|
||||||
|
@ -116,6 +123,7 @@ $('#divFooter').css('position','absolute');
|
||||||
</table>
|
</table>
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('.title').bind('click', function() {
|
$('.title').bind('click', function() {
|
||||||
|
|
|
@ -10,9 +10,9 @@ if(!empty($this->pageTitle))
|
||||||
<div class="hero-unit">
|
<div class="hero-unit">
|
||||||
<h2><?= $this->content ?><?php if(!empty($this->url)) echo ",系统正在为您跳转..."?></h2>
|
<h2><?= $this->content ?><?php if(!empty($this->url)) echo ",系统正在为您跳转..."?></h2>
|
||||||
<?php if(!empty($this->url)) {?>
|
<?php if(!empty($this->url)) {?>
|
||||||
<?php if($this->url == -1) { ?>
|
<?php if(is_numeric($this->url)) { ?>
|
||||||
<a href="javascript:history.go(-1);">如果没有跳转请点击这样</a>
|
<a href="javascript:history.go(-1);">如果没有跳转请点击这样</a>
|
||||||
<script language="javascript">setTimeout("history.go(-1)",3000);</script>
|
<script language="javascript">setTimeout("history.go(<?= $this->url ?>)",3000);</script>
|
||||||
<?php }else {?>
|
<?php }else {?>
|
||||||
<a href="<?= $this->url ?>">如果没有跳转请点击这样</a>
|
<a href="<?= $this->url ?>">如果没有跳转请点击这样</a>
|
||||||
<script language="javascript">setTimeout("self.location='<?= $this->url?>'",3000);</script>
|
<script language="javascript">setTimeout("self.location='<?= $this->url?>'",3000);</script>
|
||||||
|
|
|
@ -36,7 +36,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
<table class="table table-bordered table-hover"><thead>
|
<table class="table table-bordered table-hover"><thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width='600'>元数据标题</th>
|
<th width='600'>元数据标题</th>
|
||||||
<th width='120'>负责编辑</th>
|
<th width='120'>责任编辑</th>
|
||||||
<th width='120'>接收时间</th>
|
<th width='120'>接收时间</th>
|
||||||
<th width='180'>操作</th>
|
<th width='180'>操作</th>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
|
@ -48,7 +48,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
|
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
|
||||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">分配编辑</a>
|
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改责任编辑</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
@ -12,19 +12,17 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
.high{background:#444;color:#FFF;}
|
.high{background:#444;color:#FFF;}
|
||||||
</style>
|
</style>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3"><?= $this->partial('review/left.phtml'); ?></div>
|
||||||
<?= $this->partial('review/left.phtml'); ?>
|
|
||||||
</div>
|
|
||||||
<div class="span9">
|
<div class="span9">
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<div id="message">
|
<div id="message">
|
||||||
<?php if ($this->msg) : ?>
|
<?php if ($this->msg) : ?>
|
||||||
<p><?php echo $this->msg; ?></p>
|
<p><?php echo $this->msg; ?></p>
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
<p><?php echo $msg; ?></p>
|
<p><?php echo $msg; ?></p>
|
||||||
<?php endforeach;endif; ?>
|
<?php endforeach;endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<form action="" method="get" class="search input-append">
|
<form action="" method="get" class="search input-append">
|
||||||
<input type="hidden" name="search" value='1' />
|
<input type="hidden" name="search" value='1' />
|
||||||
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
<input type="hidden" name="id" value='<?php echo $this->id;?>' />
|
||||||
|
@ -44,9 +42,10 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" name="update[]" value="<?php echo $item['id']; ?>"/></td>
|
<td><input type="checkbox" name="update[]" value="<?php echo $item['id']; ?>"/></td>
|
||||||
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title']; ?></a></td>
|
<td><?php echo $item['title']; ?>【<a href="/service/geonetwork?url=metadata.show?id=<?php echo $item['gnid'];?>">GeoNetwork查看</a>】</td>
|
||||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
|
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></td>
|
||||||
<td><a href="/admin/review/draft/update/<?php echo $item['id']; ?>">接收</a>
|
<td><a href="/admin/review/draft/update/<?php echo $item['id']; ?>">接收</a> |
|
||||||
|
<a href="/admin/review/accept/cancel/<?php echo $item['id']; ?>">取消评审</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
|
$this->breadcrumb('元数据评审');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
|
.high{background:#444;color:#FFF;}
|
||||||
|
</style>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<?= $this->partial('review/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
|
<div id="message">
|
||||||
|
<?php if ($this->msg) : ?>
|
||||||
|
<p><?php echo $this->msg; ?></p>
|
||||||
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
|
<p><?php echo $msg; ?></p>
|
||||||
|
<?php endforeach;endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<form action="" method="get" class="search input-append">
|
||||||
|
<input type="hidden" name="search" value='1' />
|
||||||
|
<input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||||
|
<button type="submit" class="btn">搜索</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
<table class="table table-bordered table-hover"><thead>
|
||||||
|
<tr>
|
||||||
|
<th width='600'>元数据标题</th>
|
||||||
|
<th width='120'>责任编辑</th>
|
||||||
|
<th width='120'>接收时间</th>
|
||||||
|
<th width='180'>操作</th>
|
||||||
|
</tr></thead>
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<tbody id="list">
|
||||||
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/data/<?php echo $item['uuid'];?>"><?= $item['title']?></a></td>
|
||||||
|
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
|
||||||
|
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
||||||
|
<td>
|
||||||
|
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">分配编辑</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div><!-- span9 -->
|
||||||
|
</div>
|
|
@ -2,61 +2,64 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('元数据评审');
|
$this->breadcrumb('元数据评审');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('review/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('review/left.phtml'); ?>
|
||||||
<div id="rightPanel">
|
</div>
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<div class="span10">
|
||||||
<div id="message">
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<?php if ($this->msg) : ?>
|
<div id="message">
|
||||||
<p><?php echo $this->msg; ?></p>
|
<?php if ($this->msg) : ?>
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<p><?php echo $this->msg; ?></p>
|
||||||
<p><?php echo $msg; ?></p>
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
<?php endforeach;endif; ?>
|
<p><?php echo $msg; ?></p>
|
||||||
</div>
|
<?php endforeach;endif; ?>
|
||||||
<?php endif; ?>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
最近十条元数据
|
<h3>最近十条元数据</h3>
|
||||||
<table><thead>
|
<hr />
|
||||||
<tr>
|
<table class="table table-bordered"><thead>
|
||||||
<td width='500'>元数据标题</td>
|
<tr>
|
||||||
<td width='150'>管理员</td>
|
<td width='500'>元数据标题</td>
|
||||||
<td width='150'>状态</td>
|
<td width='150'>管理员</td>
|
||||||
</tr></thead>
|
<td width='150'>状态</td>
|
||||||
<?php if (count($this->queue)): ?>
|
</tr></thead>
|
||||||
<?php $autoindex=0;?>
|
<?php if (count($this->queue)): ?>
|
||||||
<?php foreach ($this->queue as $item): ?>
|
<?php $autoindex=0;?>
|
||||||
<?php $autoindex++;?>
|
<?php foreach ($this->queue as $item): ?>
|
||||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
<?php $autoindex++;?>
|
||||||
<td><?= $item['title']?></td>
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||||
<td><?php echo $item['realname'].'['.$item['username'].']';?></td>
|
<td><?= $item['title']?></td>
|
||||||
<td><?php echo $item['status'];?></td>
|
<td><?php echo $item['realname'].'['.$item['username'].']';?></td>
|
||||||
</tr>
|
<td><?php echo $item['status'];?></td>
|
||||||
<?php endforeach; ?>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
<?php endif; ?>
|
||||||
<br />
|
</table>
|
||||||
我管理的最近十条元数据
|
<br />
|
||||||
<table><thead>
|
<h3>我管理的最近十条元数据</h3>
|
||||||
<tr>
|
<hr />
|
||||||
<td width='500'>元数据标题</td>
|
<table class="table table-bordered"><thead>
|
||||||
<td width='150'>状态</td>
|
<tr>
|
||||||
</tr></thead>
|
<td width='500'>元数据标题</td>
|
||||||
<?php if (count($this->queue)): ?>
|
<td width='150'>状态</td>
|
||||||
<?php $autoindex=0;?>
|
</tr></thead>
|
||||||
<?php foreach ($this->queue as $item): ?>
|
<?php if (count($this->queue)): ?>
|
||||||
<?php $autoindex++;?>
|
<?php $autoindex=0;?>
|
||||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
<?php foreach ($this->queue as $item): ?>
|
||||||
<td><?= $item['title']?></td>
|
<?php $autoindex++;?>
|
||||||
<td><?php echo $item['status'];?></td>
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||||
</tr>
|
<td><?= $item['title']?></td>
|
||||||
<?php endforeach; ?>
|
<td><?php echo $item['status'];?></td>
|
||||||
<?php endif; ?>
|
</tr>
|
||||||
</table>
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,11 +1,15 @@
|
||||||
<ul class="nav nav-pills nav-stacked well">
|
<div class="well" style="padding:8px 0">
|
||||||
<span class="label"><h4>元数据评审</h4></span>
|
<ul class="nav nav-list">
|
||||||
<li id="Nav-review-draft"><a href="/admin/review/draft">投稿元数据</a></li>
|
<li class="nav-header"><h4>元数据评审</h4></li>
|
||||||
<li id="Nav-review-accept"><a href="/admin/review/accept">待审元数据</a></li>
|
<li class="divider"></li>
|
||||||
<!-- <li id="Nav-review-inreview"><a href="/admin/review/inreview">在审元数据</a></li> -->
|
<li id="Nav-review-draft"><a href="/admin/review/draft">投稿元数据</a></li>
|
||||||
<li id="Nav-review-myreview"><a href="/admin/review/myreview">我负责的元数据</a></li>
|
<li id="Nav-review-editor"><a href="/admin/review/editor">分配责任编辑</a></li>
|
||||||
<li id="Nav-review-reviewed"><a href="/admin/review/reviewed">通过评审的元数据</a></li>
|
<li id="Nav-review-accept"><a href="/admin/review/accept">待审元数据</a></li>
|
||||||
<li id="Nav-review-experts"><a href="/admin/review/experts">专家库</a></li>
|
<!-- <li id="Nav-review-inreview"><a href="/admin/review/inreview">在审元数据</a></li> -->
|
||||||
<li id="Nav-review-canceled"><a href="/admin/review/canceled">已取消评审的元数据</a></li>
|
<li id="Nav-review-myreview"><a href="/admin/review/myreview">我负责的元数据</a></li>
|
||||||
<li id="Nav-review-comments"><a href="/admin/review/comments">元数据评审管理</a></li>
|
<li id="Nav-review-reviewed"><a href="/admin/review/reviewed">通过评审的元数据</a></li>
|
||||||
</ul>
|
<li id="Nav-review-experts"><a href="/admin/review/experts">专家库</a></li>
|
||||||
|
<li id="Nav-review-canceled"><a href="/admin/review/canceled">已取消评审的元数据</a></li>
|
||||||
|
<li id="Nav-review-comments"><a href="/admin/review/comments">元数据评审管理</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -7,6 +7,7 @@
|
||||||
$this->breadcrumb('元数据评审');
|
$this->breadcrumb('元数据评审');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
$this->theme->AppendPlus($this,'colorbox');
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->theme->AppendModel($this,'sfadmin');
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
table thead tr th {background:#EBF2F6;color:#444;}
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
|
@ -50,10 +51,27 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width:13px;"><input type="checkbox" class="select_rows" data-tbody="list" /></th>
|
<th style="width:13px;"><input type="checkbox" class="select_rows" data-tbody="list" /></th>
|
||||||
<th width='500'>元数据标题</th>
|
<th width='500'>元数据标题<br />
|
||||||
<th width='80'>状态</th>
|
<a href="?order=title&sort=desc" data-order="title" data-sort="desc">↑</a>
|
||||||
<th>接收时间</th>
|
<a href="?order=title&sort=asc" data-order="title" data-sort="asc">↓</a>
|
||||||
<th>作者</th>
|
</th>
|
||||||
|
<th width='80'>
|
||||||
|
状态<br />
|
||||||
|
<a href="?order=status&sort=desc" data-order="status" data-sort="desc">↑</a>
|
||||||
|
<a href="?order=status&sort=asc" data-order="status" data-sort="asc">↓</a>
|
||||||
|
</th>
|
||||||
|
<th>意见<br />
|
||||||
|
<a href="?order=reviews&sort=desc" data-order="reviews" data-sort="desc">↑</a>
|
||||||
|
<a href="?order=reviews&sort=asc" data-order="reviews" data-sort="asc">↓</a>
|
||||||
|
</th>
|
||||||
|
<th>接收时间<br />
|
||||||
|
<a href="?order=ts_accepted&sort=desc" data-order="ts_accepted" data-sort="desc">↑</a>
|
||||||
|
<a href="?order=ts_accepted&sort=asc" data-order="ts_accepted" data-sort="asc">↓</a>
|
||||||
|
</th>
|
||||||
|
<th>投稿人<br />
|
||||||
|
<a href="?order=author&sort=desc" data-order="author" data-sort="desc">↑</a>
|
||||||
|
<a href="?order=author&sort=asc" data-order="author" data-sort="asc">↓</a>
|
||||||
|
</th>
|
||||||
<th width="300">操作</th>
|
<th width="300">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -75,6 +93,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
if($item['status'] == 4) echo "专家反馈";
|
if($item['status'] == 4) echo "专家反馈";
|
||||||
if($item['status'] == 5) echo "已发布";
|
if($item['status'] == 5) echo "已发布";
|
||||||
?></td>
|
?></td>
|
||||||
|
<td style="text-align:center"><a href="/admin/review/comments/ac/list/uuid/<?php echo $item['uuid'];?>"><?= $item['reviews'] ?></a></td>
|
||||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
||||||
<td><?= $item['author']?></td>
|
<td><?= $item['author']?></td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -97,41 +116,6 @@ table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var sfadmin = {
|
|
||||||
def_data_tag : 'tbody',
|
|
||||||
def_select_input : '.select_item',
|
|
||||||
init: function() {
|
|
||||||
$('.select_rows').click(function () {
|
|
||||||
var tableid = $(this).data(sfadmin.def_data_tag);
|
|
||||||
$('#'+tableid).find(sfadmin.def_select_input).attr('checked', this.checked);
|
|
||||||
});
|
|
||||||
sfadmin.ajax.error();
|
|
||||||
},
|
|
||||||
getSelected : function(tableid){
|
|
||||||
if(tableid == "")
|
|
||||||
{
|
|
||||||
dom = $(sfadmin.def_select_input + ':checked');
|
|
||||||
}else{
|
|
||||||
dom = $(sfadmin.def_select_input + ':checked', '#'+tableid);
|
|
||||||
}
|
|
||||||
datas = new Array();
|
|
||||||
dom.each(function(index, element) {
|
|
||||||
datas.push($(this).val());
|
|
||||||
});
|
|
||||||
return datas;
|
|
||||||
},
|
|
||||||
ajax : {
|
|
||||||
error : function(){
|
|
||||||
$(document).ajaxError(function(event, request, settings) {
|
|
||||||
sfadmin.Alert("请求中发生错误");
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Alert : function(content){
|
|
||||||
$.colorbox({width:'50%',html:'<div class="ajax_error"><div class="text"><h2>'+content+'</h2></div></div>'});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function(e) {
|
$(document).ready(function(e) {
|
||||||
$('.version').click(function(){
|
$('.version').click(function(){
|
||||||
$(this).getversion({'id':$(this).attr('rel')});
|
$(this).getversion({'id':$(this).attr('rel')});
|
||||||
|
@ -167,6 +151,37 @@ function getids(){
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(function( $ ){
|
||||||
|
|
||||||
|
$.fn.changeorder = function( options ) {
|
||||||
|
|
||||||
|
var settings = $.extend( {
|
||||||
|
order:'',
|
||||||
|
srt: '',
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
var methods = {
|
||||||
|
change : function(dom)
|
||||||
|
{
|
||||||
|
href = window.location.href + "?order="+settings.order+'&sort';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.each(function() {
|
||||||
|
|
||||||
|
settings.order = $(this).data('order');
|
||||||
|
settings.srt = $(this).data('sort');
|
||||||
|
|
||||||
|
if( settings.order == '' || settings.srt == "")
|
||||||
|
{
|
||||||
|
alert('参数错误');
|
||||||
|
}
|
||||||
|
|
||||||
|
methods.change(this);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
})( jQuery );
|
||||||
|
|
||||||
(function( $ ){
|
(function( $ ){
|
||||||
|
|
||||||
$.fn.getversion = function( options ) {
|
$.fn.getversion = function( options ) {
|
||||||
|
|
|
@ -2,52 +2,80 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
|
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
|
||||||
$this->headScript()->appendFile('/js/jquery.masonry.min.js');
|
$this->headScript()->appendFile('/js/jquery.masonry.min.js');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('stat/left.phtml'); ?>
|
<div class="span2">
|
||||||
<ul>
|
<?= $this->partial('stat/left.phtml'); ?>
|
||||||
<li class="title">概况</li>
|
|
||||||
<li>用户总数:<?php echo $this->stat['alluser']; ?>人</li>
|
|
||||||
<li>元数据条数:<?php echo $this->stat['alldata']; ?>条</li>
|
|
||||||
<li>在线数据下载数:<?php echo $this->stat['onlinedown']; ?>条</li>
|
|
||||||
<li>离线数据下载数:<?php echo $this->stat['offlinedown']; ?>条</li>
|
|
||||||
<li>已通过的离线申请:<?php echo $this->stat['offlinepass']; ?>次</li>
|
|
||||||
<li>未完成的离线申请:<?php echo $this->stat['offlineunfinished']; ?>次</li>
|
|
||||||
<li>被拒绝的离线数据:<?php echo $this->stat['offlinedenied']; ?>条</li>
|
|
||||||
<li>有记录的在线下载数:<?php echo $this->stat['onlineapp']; ?>次</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="rightPanel">
|
|
||||||
<div class="tables">
|
|
||||||
<div class="stitle">数据下载量概况</div>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr><td width="200"></td><td width="100">单位:GB</td></tr>
|
|
||||||
</thead>
|
|
||||||
<tr>
|
|
||||||
<td>总下载数据量(估计量,偏大)</td>
|
|
||||||
<td><?php echo round($this->allsize['num'],2);?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>离线下载数据量(从09年4月)</td>
|
|
||||||
<td><?php echo round($this->offlinesize['num'],2);?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>在线下载数据量(估计量,偏大)</td>
|
|
||||||
<td><?php echo round($this->onlinesize['num'],2);?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>G6在线下载数据量(精确量)</td>
|
|
||||||
<td><?php echo round($this->onlineg6size['num'],2);?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span6">
|
||||||
|
<h3>概况</h3>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr>
|
||||||
|
<td>用户总数:</td>
|
||||||
|
<td><?php echo $this->stat['alluser']; ?>人</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>元数据条数:</td>
|
||||||
|
<td><?php echo $this->stat['alldata']; ?>条</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>在线数据下载数:</td>
|
||||||
|
<td><?php echo $this->stat['onlinedown']; ?>条</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>离线数据下载数:</td>
|
||||||
|
<td><?php echo $this->stat['offlinedown']; ?>条</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>已通过的离线申请:</td>
|
||||||
|
<td><?php echo $this->stat['offlinepass']; ?>次</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>未完成的离线申请:</td>
|
||||||
|
<td><?php echo $this->stat['offlineunfinished']; ?>次</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>被拒绝的离线数据:</td>
|
||||||
|
<td><?php echo $this->stat['offlinedenied']; ?>条</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>有记录的在线下载数:</td>
|
||||||
|
<td><?php echo $this->stat['onlineapp']; ?>次</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span6">
|
||||||
|
<h3>数据下载量概况</h3>
|
||||||
|
<hr />
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr><td width="200"></td><td width="100">单位:GB</td></tr>
|
||||||
|
</thead>
|
||||||
|
<tr>
|
||||||
|
<td>总下载数据量</td>
|
||||||
|
<td><?php echo round($this->allsize['num'],2);?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>离线下载数据量</td>
|
||||||
|
<td><?php echo round($this->offlinesize['num'],2);?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>在线下载数据量</td>
|
||||||
|
<td><?php echo round($this->onlinesize['num'],2);?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
<ul>
|
<div class="well" style="padding:8px 0">
|
||||||
<li class="title">信息统计</li>
|
<ul class="nav nav-list">
|
||||||
<li><a href="/admin/stat/">统计概况</a></li>
|
<li class="nav-header"><h4>信息统计</h4></li>
|
||||||
<li><a href="/admin/stat/unit">分单位统计</a></li>
|
<li class="divider"></li>
|
||||||
<li><a href="/admin/stat/month">分月统计</a></li>
|
<li><a href="/admin/stat/">统计概况</a></li>
|
||||||
<li><a href="/admin/stat/user">按用户统计</a></li>
|
<li><a href="/admin/stat/unit">分单位统计</a></li>
|
||||||
<li><a href="/admin/stat/awstatsweb">awstats westdc统计</a></li>
|
<li><a href="/admin/stat/month">分月统计</a></li>
|
||||||
<li><a href="/admin/stat/awstatsweb2">awstats geodata统计</a></li>
|
<li><a href="/admin/stat/user">按用户统计</a></li>
|
||||||
<li><a href="/admin/stat/awstatsftp">awstats ftp1统计</a></li>
|
</ul>
|
||||||
<li><a href="/admin/stat/awstatsftp2">awstats ftp2统计</a></li>
|
</div>
|
||||||
<li><a href="/admin/stat/webalizer">webalizer统计</a></li>
|
|
||||||
<li><a href="/admin/stat/water">WATER项目</a></li>
|
|
||||||
</ul>
|
|
|
@ -31,15 +31,8 @@
|
||||||
<div class="cp">
|
<div class="cp">
|
||||||
<span>选择年份:</span>
|
<span>选择年份:</span>
|
||||||
<a href="/admin/stat/month/">所有年份</a>
|
<a href="/admin/stat/month/">所有年份</a>
|
||||||
<a href="/admin/stat/month/y/2004">2004</a>
|
<a href="/admin/stat/month/y/2014">2014</a>
|
||||||
<a href="/admin/stat/month/y/2005">2005</a>
|
<a href="/admin/stat/month/y/2015">2015</a>
|
||||||
<a href="/admin/stat/month/y/2006">2006</a>
|
|
||||||
<a href="/admin/stat/month/y/2007">2007</a>
|
|
||||||
<a href="/admin/stat/month/y/2008">2008</a>
|
|
||||||
<a href="/admin/stat/month/y/2009">2009</a>
|
|
||||||
<a href="/admin/stat/month/y/2010">2010</a>
|
|
||||||
<a href="/admin/stat/month/y/2011">2011</a>
|
|
||||||
<a href="/admin/stat/month/y/2012">2012</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="charts">
|
<div class="charts">
|
||||||
<div class="title" id="title_online"><?php echo $this->y.'年按月在线下载条数(有用途记录,且无数据重复)统计';?></div>
|
<div class="title" id="title_online"><?php echo $this->y.'年按月在线下载条数(有用途记录,且无数据重复)统计';?></div>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<li><a href="/admin/stat/unit/" class="<?= $active?>">总体查看(默认)</a></li>
|
<li><a href="/admin/stat/unit/" class="<?= $active?>">总体查看(默认)</a></li>
|
||||||
<?php
|
<?php
|
||||||
$active="";
|
$active="";
|
||||||
for($i=2004; $i<=date("Y",time()); $i++)
|
for($i=2014; $i<=date("Y",time()); $i++)
|
||||||
{
|
{
|
||||||
if(!empty($this->y))
|
if(!empty($this->y))
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
<ul class="nav nav-tabs">
|
||||||
|
<li <?= empty($this->ac) ? 'class="active"':"" ?>><a href="/admin/stat/user">概况</a></li>
|
||||||
|
<li <?= $this->ac == "new" ? 'class="active"':"" ?>><a href="/admin/stat/user/ac/new">新用户</a></li>
|
||||||
|
</ul>
|
|
@ -0,0 +1,190 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->theme->AppendPlus($this,'jquery');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
$this->headLink()->appendStylesheet('/css/jquery.jqplot.css');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
?>
|
||||||
|
<script language="javascript" type="text/javascript" src="/static/js/plot/jquery.jqplot.js"></script>
|
||||||
|
<script language="javascript" type="text/javascript" src="/static/js/plot/plugins/jqplot.barRenderer.js"></script>
|
||||||
|
<script language="javascript" type="text/javascript" src="/static/js/plot/plugins/jqplot.pieRenderer.js"></script>
|
||||||
|
<script language="javascript" type="text/javascript" src="/static/js/plot/plugins/jqplot.categoryAxisRenderer.js"></script>
|
||||||
|
<script language="javascript" type="text/javascript" src="/static/js/plot/plugins/jqplot.highlighter.js"></script>
|
||||||
|
<script language="javascript" type="text/javascript" src="/static/js/plot/plugins/jqplot.pointLabels.js"></script>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span2">
|
||||||
|
<?= $this->partial('stat/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<div class="span10">
|
||||||
|
|
||||||
|
<?= $this->partial('stat/user-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||||
|
|
||||||
|
<div class="cp">
|
||||||
|
方式:
|
||||||
|
<a href="/admin/stat/user/ac/new/by/month<?= $this->year ? "/year/".$this->year:"" ?>" class="btn btn-info <?= $this->by == "month" ? "disabled":"" ?>">按月</a>
|
||||||
|
<a href="/admin/stat/user/ac/new/by/year<?= $this->year ? "/year/".$this->year:"" ?>" class="btn btn-info <?= $this->by == "year" ? "disabled":"" ?>">按年</a>
|
||||||
|
<a href="/admin/stat/user/ac/new/by/monthavg<?= $this->year ? "/year/".$this->year:"" ?>" class="btn btn-info <?= $this->by == "monthavg" ? "disabled":"" ?>">月均值</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
年份:
|
||||||
|
<?php if(in_array($this->by,array("year","monthavg") )) {?><a href="/admin/stat/user/ac/new/by/<?= $this->by ?>/year/-1" class="btn btn-info">所有</a><?php } ?>
|
||||||
|
<?php for($i = (int)date("Y");$i>=2004 ;$i--)
|
||||||
|
{
|
||||||
|
$active = $this->year == $i ? "disabled":"";
|
||||||
|
echo '<a href="/admin/stat/user/ac/new/by/'.$this->by.'/year/'.$i.'" class="btn btn-info '.$active.'">'.$i.'</a>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if($this->by == 'month' && !empty($this->data)){ ?>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<h4><?= $this->year ?>的按月新用户注册量统计</h4>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>月份</th>
|
||||||
|
<th>增量</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach($this->data as $k=>$v) {?>
|
||||||
|
<tr><td><?= $v['date_part'] ?></td><td><?= $v['count'] ?></td></tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
<!-- 统计图表 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
<?php
|
||||||
|
$vars = array();
|
||||||
|
$month = array();
|
||||||
|
foreach ($this->data as $v)
|
||||||
|
{
|
||||||
|
$vars[] = $v['count'];
|
||||||
|
$month[]= "'".$v['date_part']."'";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
var s1 = [<?php echo join(',',$vars); ?>];
|
||||||
|
var ticks = [<?php echo join(',',$month); ?>];
|
||||||
|
|
||||||
|
plot1 = $.jqplot('chart_div_year_seq', [s1], {
|
||||||
|
seriesDefaults:{
|
||||||
|
renderer:$.jqplot.BarRenderer,
|
||||||
|
pointLabels: { show: true }
|
||||||
|
},
|
||||||
|
axes: {
|
||||||
|
xaxis: {
|
||||||
|
renderer: $.jqplot.CategoryAxisRenderer,
|
||||||
|
ticks: ticks
|
||||||
|
}
|
||||||
|
},
|
||||||
|
highlighter: { show: false }
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="content" id="chart_div_year_seq"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if($this->by == 'year' && !empty($this->data)){ ?>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<h4><?= $this->year == -1 ? "所有":$this->year ?>的新用户注册量统计</h4>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>年份</th>
|
||||||
|
<th>增量</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach($this->data as $k=>$v) {?>
|
||||||
|
<tr><td><?= $v['date_part'] ?></td><td><?= $v['count'] ?></td></tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
<!-- 统计图表 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function () {
|
||||||
|
<?php
|
||||||
|
$vars = array();
|
||||||
|
$month = array();
|
||||||
|
foreach ($this->data as $v)
|
||||||
|
{
|
||||||
|
$vars[] = $v['count'];
|
||||||
|
$month[]= "'".$v['date_part']."'";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
var s1 = [<?php echo join(',',$vars); ?>];
|
||||||
|
var ticks = [<?php echo join(',',$month); ?>];
|
||||||
|
|
||||||
|
plot1 = $.jqplot('chart_div_year_seq', [s1], {
|
||||||
|
seriesDefaults:{
|
||||||
|
renderer:$.jqplot.BarRenderer,
|
||||||
|
pointLabels: { show: true }
|
||||||
|
},
|
||||||
|
axes: {
|
||||||
|
xaxis: {
|
||||||
|
renderer: $.jqplot.CategoryAxisRenderer,
|
||||||
|
ticks: ticks
|
||||||
|
}
|
||||||
|
},
|
||||||
|
highlighter: { show: false }
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="content" id="chart_div_year_seq"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if($this->by == 'monthavg' && !empty($this->data)){ ?>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<h4><?= $this->year ?>的月均用户注册量</h4>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<table class="table table-bordered table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>年份</th>
|
||||||
|
<th>月均</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach($this->data as $k=>$v) {?>
|
||||||
|
<tr><td><?= $v['date_part'] ?></td><td><?= $v['count'] ?></td></tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="span9">
|
||||||
|
<!-- 统计图表 -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -10,49 +10,39 @@
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<style>
|
<div class="row-fluid">
|
||||||
.charts{margin:30px 0px;}
|
<div class="span2">
|
||||||
.charts .title{color:#003366;}
|
<?= $this->partial('stat/left.phtml'); ?>
|
||||||
.cp {line-height:24px;}
|
</div>
|
||||||
.cp ul li{float:left;margin:0px 0px;}
|
<div class="span10">
|
||||||
.cp a{color:#4bb2c5;line-height:24px;padding:5px;}
|
|
||||||
.cp a.active,.cp a:hover{color:#FFF;background:#4bb2c5;}
|
|
||||||
</style>
|
|
||||||
<div id="leftPanel">
|
|
||||||
<?= $this->partial('stat/left.phtml'); ?>
|
|
||||||
</div>
|
|
||||||
<div id="rightPanel">
|
|
||||||
|
|
||||||
<div class="cp">
|
<?= $this->partial('stat/user-nav.phtml',array('ac'=>$this->ac)); ?>
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="/admin/stat/user/ac/get/down/csv">导出csv格式</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="/admin/stat/user/ac/get/down/json">导出JSON格式</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="unitdata">
|
|
||||||
<b>点击列名进行排序</b>
|
|
||||||
</div>
|
|
||||||
<div class="dataTables_wrapper">
|
|
||||||
<table id="datatable" class="table table-bordered table-striped table_vam dataTable">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>ID</th>
|
|
||||||
<th>用户</th>
|
|
||||||
<th>离线申请次数</th>
|
|
||||||
<th>在线申请次数</th>
|
|
||||||
<th>总申请次数</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
</tbody>
|
<div class="cp">
|
||||||
</table>
|
<a href="/admin/stat/user/ac/get/down/csv" class="btn btn-info">导出csv格式</a>
|
||||||
</div>
|
<a href="/admin/stat/user/ac/get/down/json" class="btn btn-info">导出JSON格式</a>
|
||||||
|
</div>
|
||||||
|
<div id="unitdata">
|
||||||
|
<b>点击列名进行排序</b>
|
||||||
|
</div>
|
||||||
|
<div class="dataTables_wrapper">
|
||||||
|
<table id="datatable" class="table table-bordered table-striped table_vam dataTable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>用户</th>
|
||||||
|
<th>离线申请次数</th>
|
||||||
|
<th>在线申请次数</th>
|
||||||
|
<th>总申请次数</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
<ul>
|
<ul class="nav nav-pills nav-stacked well">
|
||||||
<li class="title">系统管理</li>
|
<span class="label"><h4>系统管理</h4></span>
|
||||||
<li><a href="/admin/sys/emailtext">邮件模板管理</a></li>
|
<li><a href="/admin/sys/emailtext">邮件模板管理</a></li>
|
||||||
<!--<li><a href="/admin/sys/seekspace">文献平台同步</a></li>-->
|
|
||||||
<li><a href="/admin/sys/message">管理消息</a></li>
|
<li><a href="/admin/sys/message">管理消息</a></li>
|
||||||
<li><a href="/admin/sys/ftptest">数据FTP测试</a></li>
|
|
||||||
<li><a href="/admin/sys/recovery">数据恢复进展</a></li>
|
|
||||||
<li><a href="/admin/sys/problem">问题数据检查</a></li>
|
|
||||||
<li><a href="/admin/sys/regions">GN地点管理</a></li>
|
<li><a href="/admin/sys/regions">GN地点管理</a></li>
|
||||||
</ul>
|
</ul>
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
?>
|
||||||
|
<div id="leftPanel">
|
||||||
|
<?= $this->partial('sys/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="rightPanel">
|
||||||
|
<a id="btn-ref" class="btn" href="/admin/sys/problem/ac/ref">数据引用方式错误</a>
|
||||||
|
<a id="btn-file" class="btn" href="/admin/sys/problem/ac/file">缺少文件列表</a>
|
||||||
|
<a id="btn-tiny" class="btn" href="/admin/sys/problem/ac/tiny">数据实体大小不匹配</a>
|
||||||
|
<a id="btn-heihefund" class="btn" href="/admin/sys/problem/ac/heihefund">黑河计划数据的项目信息缺失</a>
|
||||||
|
<a id="btn-unmoved" class="btn" href="/admin/sys/problem/ac/unmoved">数据目录未从upload中转移</a>
|
||||||
|
<a id="btn-noemail" class="btn" href="/admin/sys/problem/ac/noemail">缺少审核人email</a>
|
||||||
|
<table><thead><tr>
|
||||||
|
<th>数据标题</th>
|
||||||
|
<th>uuid</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr></thead><tbody>
|
||||||
|
<?php
|
||||||
|
if (count($this->paginator)):
|
||||||
|
$autoindex=0;
|
||||||
|
foreach ($this->paginator as $item):
|
||||||
|
$autoindex++;?>
|
||||||
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||||
|
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
|
||||||
|
<td><?php echo $item['uuid'];?></td>
|
||||||
|
<td><a href="/service/geonetwork?url=metadata.edit?id=<?= $item['gid']; ?>" target="_blank">编辑</a></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; endif; ?>
|
||||||
|
</tbody></table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
|
<?php if(!empty($this->activeID)) : ?>
|
||||||
|
<script>$('#<?= $this->activeID?>').addClass("btn-primary");</script>
|
||||||
|
<?php endif; ?>
|
||||||
|
<script>
|
||||||
|
$(".iframe").colorbox({iframe:true, width:"50%", height:"50%"});
|
||||||
|
$(".inline").colorbox({inline:true, width:"50%"});
|
||||||
|
function Alert(html){
|
||||||
|
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -13,7 +13,9 @@
|
||||||
<a id="btn-ref" class="btn" href="/admin/sys/problem/ac/ref">数据引用方式错误</a>
|
<a id="btn-ref" class="btn" href="/admin/sys/problem/ac/ref">数据引用方式错误</a>
|
||||||
<a id="btn-file" class="btn" href="/admin/sys/problem/ac/file">缺少文件列表</a>
|
<a id="btn-file" class="btn" href="/admin/sys/problem/ac/file">缺少文件列表</a>
|
||||||
<a id="btn-tiny" class="btn" href="/admin/sys/problem/ac/tiny">数据实体大小不匹配</a>
|
<a id="btn-tiny" class="btn" href="/admin/sys/problem/ac/tiny">数据实体大小不匹配</a>
|
||||||
|
<a id="btn-heihefund" class="btn" href="/admin/sys/problem/ac/heihefund">黑河计划数据的项目信息缺失</a>
|
||||||
|
<a id="btn-unmoved" class="btn" href="/admin/sys/problem/ac/unmoved">数据目录未从upload中转移</a>
|
||||||
|
<a id="btn-noemail" class="btn" href="/admin/sys/problem/ac/noemail">缺少审核人email</a>
|
||||||
<table><thead><tr>
|
<table><thead><tr>
|
||||||
<th>数据标题</th>
|
<th>数据标题</th>
|
||||||
<th>引用</th>
|
<th>引用</th>
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
<a id="btn-ref" class="btn" href="/admin/sys/problem/ac/ref">数据引用方式错误</a>
|
<a id="btn-ref" class="btn" href="/admin/sys/problem/ac/ref">数据引用方式错误</a>
|
||||||
<a id="btn-file" class="btn" href="/admin/sys/problem/ac/file">缺少文件列表</a>
|
<a id="btn-file" class="btn" href="/admin/sys/problem/ac/file">缺少文件列表</a>
|
||||||
<a id="btn-tiny" class="btn" href="/admin/sys/problem/ac/tiny">数据实体过小</a>
|
<a id="btn-tiny" class="btn" href="/admin/sys/problem/ac/tiny">数据实体过小</a>
|
||||||
|
<a id="btn-heihefund" class="btn" href="/admin/sys/problem/ac/heihefund">黑河计划数据的项目信息缺失</a>
|
||||||
|
<a id="btn-unmoved" class="btn" href="/admin/sys/problem/ac/unmoved">数据目录未从upload中转移</a>
|
||||||
|
<a id="btn-noemail" class="btn" href="/admin/sys/problem/ac/noemail">缺少审核人email</a>
|
||||||
<table><thead><tr>
|
<table><thead><tr>
|
||||||
<th>数据标题</th>
|
<th>数据标题</th>
|
||||||
<th>UUID</th>
|
<th>UUID</th>
|
||||||
|
|
|
@ -2,45 +2,47 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/">后台首页</a>');
|
$this->breadcrumb('<a href="/admin/">后台首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
|
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('user/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('user/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="rightPanel">
|
<div class="span10">
|
||||||
<div class="title">管理员列表</div>
|
<h3>管理员列表</h3>
|
||||||
<table>
|
<hr />
|
||||||
<thead>
|
<table class="table table-bordered table-hover">
|
||||||
<tr>
|
<thead>
|
||||||
<td width='150'>用户名</td>
|
<tr>
|
||||||
<td width='250'>电子邮箱</td>
|
<td width='150'>用户名</td>
|
||||||
<td width='100'>用户类型</td>
|
<td width='250'>电子邮箱</td>
|
||||||
<td width='150'>真实姓名</td>
|
<td width='100'>用户类型</td>
|
||||||
<td width='150'>电话</td>
|
<td width='150'>真实姓名</td>
|
||||||
<td width='150'>操作</td>
|
<td width='150'>电话</td>
|
||||||
</tr>
|
<td width='150'>操作</td>
|
||||||
</thead>
|
</tr>
|
||||||
<?php if (count($this->paginator)): ?>
|
</thead>
|
||||||
<?php $autoindex=0;?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
<?php $autoindex=0;?>
|
||||||
<?php $autoindex++;?>
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
<?php $autoindex++;?>
|
||||||
<td><?= $item['username']?></td>
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||||
<td><?= $item['email']; ?></td>
|
<td><?= $item['username']?></td>
|
||||||
<td><?= $item['usertype']; ?></td>
|
<td><?= $item['email']; ?></td>
|
||||||
<td><?= $item['realname']; ?></td>
|
<td><?= $item['usertype']; ?></td>
|
||||||
<td><?= $item['phone']; ?></td>
|
<td><?= $item['realname']; ?></td>
|
||||||
<td>
|
<td><?= $item['phone']; ?></td>
|
||||||
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a>
|
<td>
|
||||||
</td>
|
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a>
|
||||||
</tr>
|
</td>
|
||||||
<?php endforeach; ?>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
<?php endif; ?>
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -2,24 +2,42 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('后台管理首页');
|
$this->breadcrumb('后台管理首页');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('user/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('user/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="rightPanel">
|
<div class="span10">
|
||||||
<div>用户总数: <?php echo $this->su['total'];?>,其中管理员: <?php echo $this->suadmin['total'];?></div>
|
<h3>用户总数: <?php echo $this->su['total'];?>,其中管理员: <?php echo $this->suadmin['total'];?></h3>
|
||||||
<div>搜索用户
|
<hr />
|
||||||
<form action="/admin/user/search/" method="get">
|
|
||||||
<input type="hidden" name="search" value='1' />
|
<form action="/admin/user/search/" method="get">
|
||||||
<div>姓名 <input type="text" name="realname" /></div>
|
<div class="control-group">
|
||||||
<div>单位 <input type="text" name="unit" /></div>
|
<label class="control-label" for="inputName">姓名/用户名</label>
|
||||||
<div>项目 <input type="text" name="project" /></div>
|
<div class="controls">
|
||||||
<div><input type="submit" value="搜索" /></div>
|
<input type="text" id="inputName" placeholder="Name or Username" name="realname" class="input-xxlarge">
|
||||||
</form>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputUnit">单位</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" id="inputUnit" placeholder="Unit" name="unit" class="input-xxlarge">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="inputProject">项目</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" id="inputProject" placeholder="Project" name="project" class="input-xxlarge">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<input type="hidden" name="search" value="1" />
|
||||||
|
<button type="submit" class="btn">搜索</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,11 +1,9 @@
|
||||||
<ul>
|
<div class="well" style="padding:8px 0">
|
||||||
<li class="title">用户管理</li>
|
<ul class="nav nav-list">
|
||||||
|
<li class="nav-header"><h4>用户管理</h4></li>
|
||||||
|
<li class="divider"></li>
|
||||||
<li><a href="/admin/user/">用户管理首页</a></li>
|
<li><a href="/admin/user/">用户管理首页</a></li>
|
||||||
<li><a href="/admin/user/list">普通用户列表</a></li>
|
|
||||||
<li><a href="/admin/user/adminlist">管理员列表</a></li>
|
<li><a href="/admin/user/adminlist">管理员列表</a></li>
|
||||||
<li><a href="/admin/user/group">用户组管理</a></li>
|
<li><a href="/admin/user/list">查看所有账户</a></li>
|
||||||
<li><a href="/admin/review/experts">元数据评审专家库</a></li>
|
</ul>
|
||||||
<li><a href="/admin/user/sendmail/">长时间未登录用户</a></li>
|
</div>
|
||||||
<li><a href="/admin/user/sendmail/ac/heihe">数字黑河用户</a></li>
|
|
||||||
<li><a href="/admin/user/sendmail/ac/holiday">节日祝贺邮件</a></li>
|
|
||||||
</ul>
|
|
|
@ -2,71 +2,71 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/">后台首页</a>');
|
$this->breadcrumb('<a href="/admin/">后台首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
|
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('user/left.phtml'); ?>
|
<div class="span2">
|
||||||
</div>
|
<?= $this->partial('user/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<div class="span10">
|
||||||
<div id="message">
|
<h3>用户列表</h3>
|
||||||
<?php if ($this->msg) : ?>
|
<hr />
|
||||||
<p><?php echo $this->msg; ?></p>
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<div class="alert alert-success">
|
||||||
<p><?php echo $msg; ?></p>
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||||
<?php endforeach;endif; ?>
|
<?php if ($this->msg) : ?>
|
||||||
</div>
|
<?php echo $this->msg; ?>
|
||||||
<?php endif; ?>
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
|
<?php echo $msg; ?>
|
||||||
|
<?php endforeach;endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="search form-inline">
|
||||||
|
<form action="/admin/user/search/" method="get">
|
||||||
|
<input type="hidden" name="search" value='1' />
|
||||||
|
|
||||||
<div id="rightPanel">
|
<label>姓名</label><input type="text" name="realname" value="<?php echo $this->realname; ?>" />
|
||||||
<div style="font-size:16px;line-height:30px;">用户列表</div>
|
<label>单位</label><input type="text" name="unit" value="<?php echo $this->unit; ?>" />
|
||||||
<div class="search">
|
<label>项目</label><input type="text" name="project" value="<?php echo $this->project; ?>" />
|
||||||
<form action="/admin/user/search/" method="get">
|
<button type="submit" value="搜索" class="btn btn-success">搜索</button>
|
||||||
<input type="hidden" name="search" value='1' />
|
|
||||||
<ul>
|
</form>
|
||||||
<li><label>姓名</label><input type="text" name="realname" value="<?php echo $this->realname; ?>" /></li>
|
</div><!-- search DIV -->
|
||||||
<li><label>单位</label><input type="text" name="unit" value="<?php echo $this->unit; ?>" /></li>
|
|
||||||
<li><label>项目</label><input type="text" name="project" value="<?php echo $this->project; ?>" /></li>
|
<hr />
|
||||||
<li><input type="submit" class="searchbtn" value="搜索" /></li>
|
<table class="table table-hover">
|
||||||
</ul>
|
<thead>
|
||||||
</form>
|
<tr>
|
||||||
</div><!-- search DIV -->
|
<td width='150'>用户名</td>
|
||||||
<table>
|
<td width='250'>电子邮箱</td>
|
||||||
<thead>
|
<td width='100'>用户组</td>
|
||||||
<tr>
|
<td width='200'>单位</td>
|
||||||
<td width='150'>用户名</td>
|
<td width='100'>真实姓名</td>
|
||||||
<td width='250'>电子邮箱</td>
|
<td width='150'>操作</td>
|
||||||
<td width='100'>用户类型</td>
|
</tr>
|
||||||
<td width='200'>单位</td>
|
</thead><!-- table's head -->
|
||||||
<td width='100'>真实姓名</td>
|
<?php if (count($this->paginator)): ?>
|
||||||
<td width='150'>操作</td>
|
<?php $autoindex=0;?>
|
||||||
</tr>
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
</thead><!-- table's head -->
|
<?php $autoindex++;?>
|
||||||
<?php if (count($this->paginator)): ?>
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||||
<?php $autoindex=0;?>
|
<td><?= $item['username']?></td>
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
<td><?= $item['email']; ?></td>
|
||||||
<?php $autoindex++;?>
|
<td><?= $item['usertype']; ?></td>
|
||||||
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
<td><?= $item['unit']; ?></td>
|
||||||
<td><?= $item['username']?></td>
|
<td><?= $item['realname']; ?></td>
|
||||||
<td><?= $item['email']; ?></td>
|
<td>
|
||||||
<td><?= $item['usertype']; ?></td>
|
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a>
|
||||||
<td><?= $item['unit']; ?></td>
|
</td>
|
||||||
<td><?= $item['realname']; ?></td>
|
</tr>
|
||||||
<td>
|
<?php endforeach; ?>
|
||||||
<a href='/admin/user/delete/id/<?= $item['id'];?>/uname/<?= $item['username'];?>' onclick="return confirm('确定将此记录删除?')">删除</a>
|
<?php endif; ?>
|
||||||
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a>
|
</table>
|
||||||
<a href='/admin/user/fetchpwd/email/<?= $item['email'];?>/id/<?= $item['id'];?>' onclick="return confirm('是否确定为他重置密码?')">重置密码</a>
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
<a href='/admin/user/up/id/<?= $item['id'];?>' onclick="return confirm('确定将该用户提升为评审专家?')">提升为评审专家</a>
|
</div><!-- span9 -->
|
||||||
<a href="/admin/user/userauth/uid/<?= $item['id'];?>">编辑权限</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</table>
|
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
||||||
</div>
|
</div>
|
|
@ -0,0 +1,147 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/">后台首页</a>');
|
||||||
|
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
|
||||||
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
?>
|
||||||
|
<style>
|
||||||
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
|
.high{background:#444;color:#FFF;}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
var configure = {
|
||||||
|
modalid : 'xform-Modal',
|
||||||
|
formid : 'user_local_add',
|
||||||
|
requesturl : '/admin/user/local/ac/addLocal'
|
||||||
|
}
|
||||||
|
$(document).ready(function(e) {
|
||||||
|
$('#xform-submit').click(function(e) {
|
||||||
|
xform.submit();
|
||||||
|
});
|
||||||
|
$('#xform-reset').click(function(e) {
|
||||||
|
$('#'+configure.formid)[0].reset();
|
||||||
|
});
|
||||||
|
$('#xform-close').click(function(e) {
|
||||||
|
$('#'+configure.modalid).modal('hide');
|
||||||
|
});
|
||||||
|
$('.xform-edit').click(function(e) {
|
||||||
|
xform.edit($(this).data('field'));
|
||||||
|
$('#'+configure.modalid).modal('show');
|
||||||
|
});
|
||||||
|
$('#'+configure.modalid).on('hide', function () {
|
||||||
|
$('#'+configure.formid)[0].reset();
|
||||||
|
})
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="/js/lib/custom/models/admin-xform.js"></script>
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span3">
|
||||||
|
<div id="leftPanel"><?= $this->partial('user/left.phtml'); ?></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="span9">
|
||||||
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
|
<div id="message">
|
||||||
|
<?php if ($this->msg) : ?>
|
||||||
|
<p><?php echo $this->msg; ?></p>
|
||||||
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
|
<p><?php echo $msg; ?></p>
|
||||||
|
<?php endforeach;endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="rightPanel">
|
||||||
|
<h3>用户列表</h3>
|
||||||
|
<hr />
|
||||||
|
<div class="search">
|
||||||
|
<form action="/admin/user/search/" method="get" class="search input-append">
|
||||||
|
<input type="hidden" name="search" value='1' />
|
||||||
|
<ul class="inline">
|
||||||
|
<li><label>姓名</label><input type="text" name="realname" value="<?php echo $this->realname; ?>" class="search-query"/></li>
|
||||||
|
<li><label>单位</label><input type="text" name="unit" value="<?php echo $this->unit; ?>" class="search-query"/></li>
|
||||||
|
<li><label>项目</label><input type="text" name="project" value="<?php echo $this->project; ?>" class="search-query"/></li>
|
||||||
|
<li><input type="submit" class="btn" value="搜索" /></li>
|
||||||
|
</ul>
|
||||||
|
</form>
|
||||||
|
<!-- Button to trigger modal -->
|
||||||
|
<a href="#xform-Modal" role="button" class="btn btn-primary pull-right xform-show" data-toggle="modal">添加本地用户</a>
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div id="xform-Modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h3 id="myModalLabel">添加本地用户</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form class="form-horizontal" method="post" id="user_local_add">
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="inputRefid" class="control-label">用户ID</label>
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" value="" placeholder="用户ID" id="inputUserid" name="userid" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">用户类型</label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio"><input type="radio" value="member" name="usertype" checked="checked" /> 普通用户</label>
|
||||||
|
<label class="radio"><input type="radio" value="administrator" name="usertype" /> 管理员</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" value="addLocal" name="ac" />
|
||||||
|
<input type="hidden" value="submit" name="submit" />
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="alert-info"></div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="progress progress-striped active" id="submit-loading" style="display:none;">
|
||||||
|
<div class="bar" style="width:100%;"></div>
|
||||||
|
</div>
|
||||||
|
<button class="btn" id="xform-reset">Reset</button>
|
||||||
|
<button class="btn" id="xform-close">Close</button>
|
||||||
|
<button class="btn btn-primary" id="xform-submit">Save changes</button>
|
||||||
|
</div>
|
||||||
|
</div><!-- xformpartinal -->
|
||||||
|
</div><!-- search DIV -->
|
||||||
|
<table class="table table-bordered table-hover table-condensed"><thead>
|
||||||
|
<tr>
|
||||||
|
<th>用户名</th>
|
||||||
|
<th>电子邮箱</th>
|
||||||
|
<th>用户类型</th>
|
||||||
|
<th>单位</th>
|
||||||
|
<th>真实姓名</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead><!-- table's head -->
|
||||||
|
<?php if (count($this->paginator)): ?>
|
||||||
|
<?php $autoindex=0;?>
|
||||||
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
|
<?php $autoindex++;?>
|
||||||
|
<tr>
|
||||||
|
<td><?= $item['username']?></td>
|
||||||
|
<td><?= $item['email']; ?></td>
|
||||||
|
<td><?= $item['usertype']; ?></td>
|
||||||
|
<td><?= $item['unit']; ?></td>
|
||||||
|
<td><?= $item['realname']; ?></td>
|
||||||
|
<td>
|
||||||
|
<a href='/admin/user/local/ac/delete/id/<?= $item['id'];?>' onclick="return confirm('确定将此记录删除?')">删除</a>
|
||||||
|
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a>
|
||||||
|
<a href='/admin/user/fetchpwd/email/<?= $item['email'];?>/id/<?= $item['id'];?>' onclick="return confirm('是否确定为他重置密码?')">重置密码</a>
|
||||||
|
<a href='/admin/user/up/id/<?= $item['id'];?>' onclick="return confirm('确定将该用户提升为评审专家?')">提升为评审专家</a>
|
||||||
|
<a href="javascript:void(0);" class="xform-edit" data-field='<?= json_encode(array('userid'=>$item['id'],'usertype'=>$item['usertype']),JSON_NUMERIC_CHECK) ?>'>编辑权限</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -2,72 +2,41 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/">后台首页</a>');
|
$this->breadcrumb('<a href="/admin/">后台首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
|
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('user/left.phtml'); ?>
|
<div class="span3">
|
||||||
|
<?= $this->partial('user/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="span9">
|
||||||
|
<form name="form1" method="post" action="/admin/user/edit">
|
||||||
|
<table class="table">
|
||||||
|
<tr><td width="100">ID</td><td width="600"><?= $this->infos['id'];?></td></tr>
|
||||||
|
<tr><td>用户名</td><td><?= $this->infos['username'];?></td></tr>
|
||||||
|
<tr><td>真实姓名</td><td><?= $this->infos['realname'];?></td></tr>
|
||||||
|
<tr><td>电子邮箱</td><td><?= $this->infos['email'];?></td></tr>
|
||||||
|
<tr><td>注册时间</td><td><?=$this->infos['ts_created'];?></td></tr>
|
||||||
|
<tr><td>最后登陆时间</td><td><?= $this->infos['ts_last_login'];?></td></tr>
|
||||||
|
<tr><td>单位</td><td><?= $this->infos['unit'];?></td></tr>
|
||||||
|
<tr><td>地址</td><td><?= $this->infos['address'];?></td></tr>
|
||||||
|
<tr><td>电话</td><td><?= $this->infos['phone'];?></td></tr>
|
||||||
|
<tr><td>项目</td><td><?= $this->infos['project'];?></td></tr>
|
||||||
|
<tr><td>用户组</td><td>
|
||||||
|
<select name="usertype">
|
||||||
|
<?php foreach($this->usertypes as $k=>$v){ ?>
|
||||||
|
<option value="<?= $v ?>" <?= $this->infos['usertype'] == $v ? 'selected="selected"':"" ?>><?= $k ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
</td></tr>
|
||||||
|
<tr><td>用户密码</td><td><input type='password' name="newpwd" /></td></tr>
|
||||||
|
<tr><td>确认用户密码</td><td><input type='password' name="cfnewpwd" /></td></tr>
|
||||||
|
</table>
|
||||||
|
<input type='hidden' value="<?php echo $this->infos['id'];?>" name='id' />
|
||||||
|
<input type="submit" value="提交" class="btn btn-primary" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
|
||||||
<div id="message">
|
|
||||||
<?php if ($this->msg) : ?>
|
|
||||||
<p><?php echo $this->msg; ?></p>
|
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
|
||||||
<p><?php echo $msg; ?></p>
|
|
||||||
<?php endforeach;endif; ?>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<div id="rightPanel">
|
|
||||||
<form name="form1" method="post" action="/admin/user/edit">
|
|
||||||
<table>
|
|
||||||
<tr><td width="100">ID</td><td width="600"><?= $this->infos['id'];?></td></tr>
|
|
||||||
<tr><td>用户名</td><td><?= $this->infos['username'];?></td></tr>
|
|
||||||
<tr><td>真实姓名</td><td><?= $this->infos['realname'];?></td></tr>
|
|
||||||
<tr><td>电子邮箱</td><td><?= $this->infos['email'];?></td></tr>
|
|
||||||
<tr><td>注册时间</td><td><?=$this->infos['ts_created'];?></td></tr>
|
|
||||||
<tr><td>最后登陆时间</td><td><?= $this->infos['ts_last_login'];?></td></tr>
|
|
||||||
<tr><td>单位</td><td><?= $this->infos['unit'];?></td></tr>
|
|
||||||
<tr><td>地址</td><td><?= $this->infos['address'];?></td></tr>
|
|
||||||
<tr><td>电话</td><td><?= $this->infos['phone'];?></td></tr>
|
|
||||||
<tr><td>项目</td><td><?= $this->infos['project'];?></td></tr>
|
|
||||||
<tr><td>用户权限</td><td>
|
|
||||||
<select name="usertype">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
if ($this->infos['usertype']=='member')
|
|
||||||
|
|
||||||
{ echo "
|
|
||||||
<option value='member' selected='selected'>普通会员</option>
|
|
||||||
<option value='administrator'>系统管理员</option>
|
|
||||||
";}
|
|
||||||
|
|
||||||
else if($this->infos['usertype']=='administrator')
|
|
||||||
|
|
||||||
{ echo "<option value='administrator' selected='selected'>系统管理员</option>
|
|
||||||
<option value='member'>普通会员</option>
|
|
||||||
";}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td></tr>
|
|
||||||
<tr><td>用户密码</td><td><input type='password' name="newpwd" /></td></tr>
|
|
||||||
<tr><td>确认用户密码</td><td><input type='password' name="cfnewpwd" /></td></tr>
|
|
||||||
</table>
|
|
||||||
<input type='hidden' value="<?php echo $this->infos['id'];?>" name='id' />
|
|
||||||
<input type="submit" value="提交" />
|
|
||||||
</form>
|
|
||||||
<form name="lostpwd" action="/admin/user/fetchpwd">
|
|
||||||
<input type="hidden" name="id" value="<?= $this->infos['id'];?>" />
|
|
||||||
<input type="hidden" name="email" value="<?= $this->infos['email'];?>" />
|
|
||||||
<input type="submit" value="为他执行Eamil重置密码"/>
|
|
||||||
</form>
|
|
||||||
<form name="lostpwd" action="/admin/user/delete">
|
|
||||||
<input type="hidden" name="id" value="<?= $this->infos['id'];?>" />
|
|
||||||
<input type="hidden" name="uname" value="<?= $this->infos['username'];?>" />
|
|
||||||
<input type="submit" value="删除该用户"/>
|
|
||||||
</form>
|
|
||||||
<a href="/admin/user/userauth/uid/<?= $this->infos['id'];?>">编辑权限</a>
|
|
|
@ -1,4 +1,4 @@
|
||||||
<ul>
|
<ul class="nav nav-pills nav-stacked well">
|
||||||
<li><a href="/admin/watermd/replace">正则替换工具</a></li>
|
<li><a href="/admin/watermd/replace">正则替换工具</a></li>
|
||||||
<li><a href="/admin/watermd/citetitle">引用的标题替换</a></li>
|
<li><a href="/admin/watermd/citetitle">引用的标题替换</a></li>
|
||||||
<li><a href="/admin/watermd/filesize">文件大小处理</a></li>
|
<li><a href="/admin/watermd/filesize">文件大小处理</a></li>
|
||||||
|
|
|
@ -5,22 +5,31 @@ db.params.username = gis
|
||||||
db.params.password = gispassword
|
db.params.password = gispassword
|
||||||
db.params.dbname = metadata
|
db.params.dbname = metadata
|
||||||
|
|
||||||
geonetwork.url=http://www.heihedata.org/geonetwork/
|
geonetwork.url=http://www.sanjiangyuan.org.cn/geonetwork/
|
||||||
geonetwork.adapter = PDO_PGSQL
|
geonetwork.adapter = PDO_PGSQL
|
||||||
geonetwork.params.host = localhost
|
geonetwork.params.host = localhost
|
||||||
geonetwork.params.username = gis
|
geonetwork.params.username = gis
|
||||||
geonetwork.params.password = gispassword
|
geonetwork.params.password = gispassword
|
||||||
geonetwork.params.dbname = geonetwork
|
geonetwork.params.dbname = geonetwork
|
||||||
|
|
||||||
watergeonetwork.url=http://210.77.68.237:8080/geonetwork/
|
visual_db.adapter = PDO_PGSQL
|
||||||
waterdb.adapter = PDO_PGSQL
|
visual_db.hostname = localhost
|
||||||
waterdb.params.host = 210.77.68.237
|
visual_db.username = gis
|
||||||
waterdb.params.username = postgres
|
visual_db.password = gispassword
|
||||||
waterdb.params.password = "test@))("
|
visual_db.database = sanjiangyuan
|
||||||
waterdb.params.dbname = geonetwork252
|
visual_db.port = 5432
|
||||||
|
|
||||||
|
auth.identifier = qhemc
|
||||||
|
auth.groupname = 青海省环境监测中心站
|
||||||
|
auth.mcryptcode = C21x9#1bi1ev5
|
||||||
|
auth.certmix = $JkXDF354Lf
|
||||||
|
auth.domain = .sanjiangyuan.org.cn
|
||||||
|
sub.metadata = emcmd
|
||||||
|
sub.news = qhemc
|
||||||
|
sub.search = emcmd
|
||||||
|
sub.schema = emc
|
||||||
|
dataimport.path = ../data/dbupload/
|
||||||
|
|
||||||
seekspace.url=http://seekspace.resip.ac.cn/
|
|
||||||
seekspace.handleurl=http://seekspace.resip.ac.cn/handle
|
|
||||||
google.maps.api=ABQIAAAACD-MqkkoOm60o_dvwdcKVhRBSKpgcP88GYi6r2Of16IkMX_4YhSBQsywCi4J2_fh4nBuWmK7gyRjLg
|
google.maps.api=ABQIAAAACD-MqkkoOm60o_dvwdcKVhRBSKpgcP88GYi6r2Of16IkMX_4YhSBQsywCi4J2_fh4nBuWmK7gyRjLg
|
||||||
bing.api=4BC90E1E9ED351ECE0D9FB71509BC3CC1264340C
|
bing.api=4BC90E1E9ED351ECE0D9FB71509BC3CC1264340C
|
||||||
bigthumb.path=../geonetwork/data/
|
bigthumb.path=../geonetwork/data/
|
||||||
|
@ -31,34 +40,32 @@ paths.newsletter=images/newsletter/
|
||||||
logging.file = /var/www/test.westgis.ac.cn/data/logs/debug.log
|
logging.file = /var/www/test.westgis.ac.cn/data/logs/debug.log
|
||||||
page.limit=10
|
page.limit=10
|
||||||
import.dir=../data/import
|
import.dir=../data/import
|
||||||
title.site=西部数据中心
|
title.site=青海省环境监测中心站
|
||||||
title.data=数据产品与服务
|
title.data=数据产品与服务
|
||||||
title.heihe=黑河计划数据管理中心
|
|
||||||
title.yrnmr=黄河上游宁蒙河段综合数据平台
|
|
||||||
title.glacier=中国冰川资源及其变化调查
|
|
||||||
title.review=数据评审
|
title.review=数据评审
|
||||||
title.author=数据作者
|
title.author=数据作者
|
||||||
title.knowledge=知识积累
|
title.knowledge=知识积累
|
||||||
title.netkites=移动文献查询服务
|
supportemail=support@sanjiangyuan.org.cn
|
||||||
supportemail=westdc@lzb.ac.cn
|
|
||||||
reportemail=westdc-report-subscribe@lists.westgis.ac.cn
|
reportemail=westdc-report-subscribe@lists.westgis.ac.cn
|
||||||
|
|
||||||
smtp.username=westdc@lzb.ac.cn
|
smtp.username=support@sanjiangyuan.org.cn
|
||||||
smtp.password=ilovewestdc
|
smtp.password=qherc@123
|
||||||
smtp.host=smtp.cstnet.cn
|
smtp.host=smtp.sanjiangyuan.org.cn
|
||||||
smtp.ssl=TLS
|
smtp.ssl=SSL
|
||||||
smtp.auth=login
|
smtp.auth=login
|
||||||
|
smtp.name=三江源生态监测综合数据服务平台
|
||||||
|
|
||||||
ftp.user=newwestdc
|
ftp.user=newwestdc
|
||||||
ftp.password=westdcforsmall
|
ftp.password=westdcforsmall
|
||||||
download.max=5 //最多同时申请下载个数
|
download.max=5 //最多同时申请下载个数
|
||||||
page.max=10 //每页显示条目数
|
page.max=10 //每页显示条目数
|
||||||
offline.template=../data/offline.pdf
|
offline.template=../data/offline.pdf
|
||||||
|
offline.heihetemplate=../data/heihe.pdf
|
||||||
offline.security=../data/security.pdf
|
offline.security=../data/security.pdf
|
||||||
offline.water_template=../data/water_offline.pdf
|
offline.water_template=../data/water_offline.pdf
|
||||||
offline.font=../data/simhei.ttf
|
offline.font=../data/simhei.ttf
|
||||||
offline.savepath=../data/offlineapp
|
offline.savepath=../data/offlineapp
|
||||||
service.email=westdc@lzb.ac.cn
|
service.email=support@sanjiangyuan.org.cn
|
||||||
offline.email.template=../data/offline-email.txt
|
offline.email.template=../data/offline-email.txt
|
||||||
offline.email.start_template=../data/offline-start-email.txt
|
offline.email.start_template=../data/offline-start-email.txt
|
||||||
offline.email.finish_template=../data/offline-finish-email.txt
|
offline.email.finish_template=../data/offline-finish-email.txt
|
||||||
|
|
|
@ -12,6 +12,10 @@ class AboutController extends Zend_Controller_Action
|
||||||
$this->view->messages = $this->messenger->getMessages();
|
$this->view->messages = $this->messenger->getMessages();
|
||||||
$this->db=Zend_Registry::get('db');
|
$this->db=Zend_Registry::get('db');
|
||||||
$this->view->pageID = "about-".$this->_request->getActionName();
|
$this->view->pageID = "about-".$this->_request->getActionName();
|
||||||
|
$this->view->nav = array(
|
||||||
|
array('link'=>'/','title'=>'<i class="icon-home"></i>'),
|
||||||
|
array('link'=>'/about','title'=>'关于'),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
function contactAction()
|
function contactAction()
|
||||||
{
|
{
|
||||||
|
@ -80,13 +84,18 @@ class AboutController extends Zend_Controller_Action
|
||||||
$archives=new Archive($this->db);
|
$archives=new Archive($this->db);
|
||||||
$this->view->item=$archives->getOneArchive('支持项目','about');
|
$this->view->item=$archives->getOneArchive('支持项目','about');
|
||||||
}
|
}
|
||||||
|
function subAction()
|
||||||
|
{
|
||||||
|
$archives=new Archive($this->db);
|
||||||
|
$this->view->item=$archives->getOneArchive('本站介绍','about');
|
||||||
|
}
|
||||||
function publicationAction()
|
function publicationAction()
|
||||||
{
|
{
|
||||||
$ac = $this->_request->getParam("ac");
|
$ac = $this->_request->getParam("ac");
|
||||||
$siteid="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338";//site uuid from geonetowrk
|
$siteid="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338";//site uuid from geonetowrk
|
||||||
if(empty($ac))
|
if(empty($ac))
|
||||||
{
|
{
|
||||||
$sql="select * from mdref mr left join reference r on mr.refid=r.id where mr.uuid=? order by r.id desc";
|
$sql="select * from mdref mr left join reference r on mr.refid=r.id where mr.uuid=? and mr.reftype=0 order by r.year desc,r.title asc";
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$sth->execute(array($siteid));
|
$sth->execute(array($siteid));
|
||||||
$rows = $sth->fetchAll();
|
$rows = $sth->fetchAll();
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
use Helpers\View;
|
||||||
|
use Helpers\Curl;
|
||||||
|
use Helpers\Captcha;
|
||||||
|
use Users\Member;
|
||||||
|
use Users\Account;
|
||||||
|
use Users\Users;
|
||||||
|
|
||||||
class AccountController extends Zend_Controller_Action
|
class AccountController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
function preDispatch()
|
function preDispatch()
|
||||||
|
@ -242,90 +249,164 @@ class AccountController extends Zend_Controller_Action
|
||||||
//$this->view->messages = $this->messenger->getMessages();
|
//$this->view->messages = $this->messenger->getMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
function registerAction()
|
function registerAction()
|
||||||
{
|
{
|
||||||
$form = new RegisterForm();
|
$request = new \Zend_Controller_Request_Http();
|
||||||
$this->view->form = $form;
|
if($request->isXmlHttpRequest())
|
||||||
|
{
|
||||||
|
$this->_helper->layout->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
if ($this->_request->isPost()) {
|
$account = new Account();
|
||||||
$formData = $this->_request->getPost();
|
$data = $account->getParam($this->_request);
|
||||||
if ($form->isValid($formData)) {
|
|
||||||
$ut = new UsersTable();
|
|
||||||
$u = $ut->createRow();
|
|
||||||
$u->username = $form->getValue('username');
|
|
||||||
$u->password = $form->getValue('password');
|
|
||||||
$u->email=$form->getValue('email');
|
|
||||||
if ($form->getValue('realname')) $u->realname=$form->getValue('realname');
|
|
||||||
if ($form->getValue('phone')) $u->phone=$form->getValue('phone');
|
|
||||||
if ($form->getValue('address')) $u->address=$form->getValue('address');
|
|
||||||
if ($form->getValue('unit')) $u->unit=$form->getValue('unit');
|
|
||||||
if ($form->getValue('project')) $u->project=$form->getValue('project');
|
|
||||||
if ($u->save()) {
|
|
||||||
//发送欢迎邮件
|
|
||||||
$mail=new WestdcMailer($this->view->config->smtp);
|
|
||||||
$body=file_get_contents($this->view->config->register->email->template);
|
|
||||||
$body=str_replace("[username]",$formData['username'],$body);
|
|
||||||
$mail->setBodyText($body);
|
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
|
||||||
$mail->addTo($formData['email']);
|
|
||||||
//中文标题有乱码,在1.5版本中尚未解决
|
|
||||||
//ref: http://framework.zend.com/issues/browse/ZF-2532
|
|
||||||
$mail->setSubject('欢迎使用中国西部环境与生态数据中心');
|
|
||||||
$mail->send();
|
|
||||||
|
|
||||||
//自动登录系统
|
$result = $account->register($data);
|
||||||
$this->login($formData['username'],$formData['password']);
|
|
||||||
$this->_redirect('/');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$form->populate($formData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function loginAction()
|
if(!empty($result))
|
||||||
{
|
|
||||||
$form = new LoginForm();
|
|
||||||
$success=false;
|
|
||||||
$message='';
|
|
||||||
$this->view->form = $form;
|
|
||||||
$auth = Zend_Auth::getInstance();
|
|
||||||
if ($auth->hasIdentity()) $this->_redirect('/account');
|
|
||||||
if ($this->_request->isPost()) {
|
|
||||||
$formData = $this->_request->getPost();
|
|
||||||
if ($form->isValid($formData)) {
|
|
||||||
if (!$this->login($formData['username'],$formData['password']))
|
|
||||||
{
|
|
||||||
$this->messenger->addMessage('登录失败,请检查您的用户名和密码。');
|
|
||||||
} else $success=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$success) {
|
|
||||||
$flashMessenger = $this->_helper->getHelper('FlashMessenger');
|
|
||||||
$flashMessenger->setNamespace('actionErrors');
|
|
||||||
$flashMessenger->addMessage($message);
|
|
||||||
$this->_redirect('/account/login');
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
$tohref = $this->_request->getParam('href');
|
|
||||||
if(!empty($tohref))
|
|
||||||
{
|
|
||||||
$this->_redirect($tohref);
|
|
||||||
}else{
|
|
||||||
$this->_redirect($this->_request->getParam('return'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if($_SERVER['REQUEST_URI']!='/account/login')
|
|
||||||
{
|
{
|
||||||
$this->_redirect($_SERVER['REQUEST_URI']);
|
$this->jsonexit($result);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
$this->jsonexit(array('error'=>'|o| 服务器掉链子了,请重试'));
|
||||||
} else {
|
|
||||||
//$formData['redirect'] = $redirect;
|
return true;
|
||||||
//$form->populate($formData);
|
}else{
|
||||||
|
//$this->_helper->layout->disableLayout();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
$success=false;
|
||||||
|
|
||||||
|
$auth = Zend_Auth::getInstance();
|
||||||
|
if ($auth->hasIdentity())
|
||||||
|
$this->_redirect('/');
|
||||||
|
|
||||||
|
$submit = $this->_getParam('submit');
|
||||||
|
if(!empty($submit))
|
||||||
|
{
|
||||||
|
$account = new Account();
|
||||||
|
$this->view->data = $data = $account->getParam($this->_request);
|
||||||
|
$result = $account->register($data);
|
||||||
|
|
||||||
|
if(!empty($result))
|
||||||
|
{
|
||||||
|
if(isset($result['error']))
|
||||||
|
{
|
||||||
|
$this->view->place = $result['place'];
|
||||||
|
$this->view->error = $result['error'];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(isset($result['success']))
|
||||||
|
{
|
||||||
|
$this->_redirect('/');
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$this->view->error = "处理中出现问题";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}//用户注册
|
||||||
|
|
||||||
|
function loginAction()
|
||||||
|
{
|
||||||
|
$request = new \Zend_Controller_Request_Http();
|
||||||
|
if($request->isXmlHttpRequest())
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$captcha = new Captcha();
|
||||||
|
|
||||||
|
$success=false;
|
||||||
|
|
||||||
|
$options = array(
|
||||||
|
'module' => $this->_request->getModuleName(),
|
||||||
|
'controller' => $this->_request->getControllerName(),
|
||||||
|
'action' => $this->_request->getActionName(),
|
||||||
|
);
|
||||||
|
|
||||||
|
$auth = Zend_Auth::getInstance();
|
||||||
|
if ($auth->hasIdentity())
|
||||||
|
{
|
||||||
|
if($options['module']=="default" && $options['controller'] == "account" && $options['action'] == "login")
|
||||||
|
{
|
||||||
|
$this->_redirect("/");
|
||||||
|
}else{
|
||||||
|
$this->_redirect($_SERVER['REQUEST_URI']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$tohref = $this->_request->getParam('href');
|
||||||
|
|
||||||
|
if($_SERVER['REQUEST_URI'] !== "/account/login")
|
||||||
|
{
|
||||||
|
$this->view->href = $_SERVER['REQUEST_URI'];
|
||||||
|
}else{
|
||||||
|
$this->view->href = "/";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($tohref))
|
||||||
|
{
|
||||||
|
$this->view->href = $tohref;
|
||||||
|
}
|
||||||
|
|
||||||
|
$submit = $this->_getParam("submit");
|
||||||
|
|
||||||
|
if(!empty($submit))
|
||||||
|
{
|
||||||
|
$captchaword = trim($this->_request->getParam('captcha'));
|
||||||
|
if($captcha->isValid($captchaword) !== true)
|
||||||
|
{
|
||||||
|
$this->view->error = view::Error("验证码错误");
|
||||||
|
$this->view->captcha = $captcha->setCaptcha();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'username' => $this->_getParam('username'),
|
||||||
|
'password' => $this->_getParam('password')
|
||||||
|
);
|
||||||
|
|
||||||
|
$account = new Account();
|
||||||
|
$result = $account->login($data);
|
||||||
|
|
||||||
|
if(!empty($result))
|
||||||
|
{
|
||||||
|
if(isset($result['error']))
|
||||||
|
{
|
||||||
|
$this->view->error = $result['error'];
|
||||||
|
$this->view->captcha = $captcha->setCaptcha();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(isset($result['success']))
|
||||||
|
{
|
||||||
|
$this->_redirect($this->view->href);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$this->view->captcha = $captcha->setCaptcha();
|
||||||
|
$this->view->error = "处理中出现问题";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->view->captcha = $captcha->setCaptcha();
|
||||||
|
}//登陆
|
||||||
|
|
||||||
|
|
||||||
|
function captchaAction()
|
||||||
|
{
|
||||||
|
$this->_helper->layout->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
|
$captcha = $this->loadCaptcha();
|
||||||
|
$url = $this->setCaptcha($captcha,true);
|
||||||
|
|
||||||
|
echo $url;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function logoutAction()
|
function logoutAction()
|
||||||
{
|
{
|
||||||
|
@ -489,6 +570,31 @@ class AccountController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} //找回密码
|
||||||
|
|
||||||
|
/*
|
||||||
|
//westdc cross doamin login
|
||||||
|
public function wcdloginAction()
|
||||||
|
{
|
||||||
|
$this->_helper->layout()->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender(true);
|
||||||
|
|
||||||
|
$id = $this->_getParam('id');
|
||||||
|
$cert = $this->_getParam('cert');
|
||||||
|
|
||||||
|
$account = new Account;
|
||||||
|
|
||||||
|
$status = $account->wcdLogin($id,$cert);
|
||||||
|
|
||||||
|
if($status == true)
|
||||||
|
{
|
||||||
|
echo "login success!";
|
||||||
|
}else{
|
||||||
|
echo "error";
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,11 @@ class ArchivesController extends Zend_Controller_Action
|
||||||
$this->view->config = Zend_Registry::get('config');
|
$this->view->config = Zend_Registry::get('config');
|
||||||
$this->db=Zend_Registry::get('db');
|
$this->db=Zend_Registry::get('db');
|
||||||
$this->view->theme = new Theme();
|
$this->view->theme = new Theme();
|
||||||
}
|
$this->view->nav = array(
|
||||||
|
array('link'=>'/','title'=>'<i class="icon-home"></i>'),
|
||||||
function testAction()
|
array('link'=>'/archives','title'=>'新闻'),
|
||||||
{
|
);
|
||||||
$this->_helper->viewRenderer('archive-view-player');
|
$this->subnews=$this->view->config->sub->news;
|
||||||
}
|
}
|
||||||
|
|
||||||
function indexAction()
|
function indexAction()
|
||||||
|
@ -49,6 +49,7 @@ class ArchivesController extends Zend_Controller_Action
|
||||||
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
||||||
left join ".$News->tbl_categorys." c on c.id = ct.cid
|
left join ".$News->tbl_categorys." c on c.id = ct.cid
|
||||||
WHERE n.ts_published<'$time' AND ct.cid={$v['id']} AND n.is_pub=true
|
WHERE n.ts_published<'$time' AND ct.cid={$v['id']} AND n.is_pub=true
|
||||||
|
and n.sub='$this->subnews'
|
||||||
ORDER BY ts_published DESC
|
ORDER BY ts_published DESC
|
||||||
LIMIT 10";
|
LIMIT 10";
|
||||||
|
|
||||||
|
@ -131,6 +132,7 @@ class ArchivesController extends Zend_Controller_Action
|
||||||
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
||||||
left join ".$News->tbl_categorys." c ON ct.cid=c.id
|
left join ".$News->tbl_categorys." c ON ct.cid=c.id
|
||||||
WHERE c.id='{$row['id']}' AND n.ts_published<'".$time."' AND n.is_pub=true
|
WHERE c.id='{$row['id']}' AND n.ts_published<'".$time."' AND n.is_pub=true
|
||||||
|
and n.sub='$this->subnews'
|
||||||
ORDER BY n.ts_published DESC";
|
ORDER BY n.ts_published DESC";
|
||||||
|
|
||||||
$rs = $this->db->query($sql);
|
$rs = $this->db->query($sql);
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
@license http://
|
@license http://
|
||||||
@link http://
|
@link http://
|
||||||
*/
|
*/
|
||||||
|
use data\DataService;
|
||||||
|
|
||||||
|
include_once("data/Author.php");
|
||||||
class AuthorController extends Zend_Controller_Action
|
class AuthorController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
private $limit=10;
|
private $limit=10;
|
||||||
|
@ -2373,7 +2376,7 @@ class AuthorController extends Zend_Controller_Action
|
||||||
// 2. 保存变化记录 save changelog & userid for the latest version
|
// 2. 保存变化记录 save changelog & userid for the latest version
|
||||||
$sql = "UPDATE mdversion SET changelog=?,userid=? WHERE id in (select id from mdversion where uuid=? order by ts_created desc limit 1)";
|
$sql = "UPDATE mdversion SET changelog=?,userid=? WHERE id in (select id from mdversion where uuid=? order by ts_created desc limit 1)";
|
||||||
$this->db->query($sql,array($changelog,$u_id,$row['uuid']));
|
$this->db->query($sql,array($changelog,$u_id,$row['uuid']));
|
||||||
file_get_contents("http://ftp2.westgis.ac.cn/proftp_upload.php?uuid=".$row['uuid']."&filelist=1");
|
file_get_contents("http://ftp.sanjiangyuan.org.cn/proftp_upload.php?uuid=".$row['uuid']."&filelist=1");
|
||||||
// 3. 保存数据评审状态
|
// 3. 保存数据评审状态
|
||||||
//导入元数据
|
//导入元数据
|
||||||
@$iso->saveDB($this->db);
|
@$iso->saveDB($this->db);
|
||||||
|
@ -2469,10 +2472,10 @@ class AuthorController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
//ftp 用户名
|
//ftp 用户名
|
||||||
$uname = 'westdc'.$u_id.'upload';
|
$uname = 'sjy'.$u_id.'upload';
|
||||||
|
|
||||||
//ftp路径
|
//ftp路径
|
||||||
$homedir = "/disk1/WestDC/upload/".$uuid."/";
|
$homedir = "/data/upload/".$uuid."/";
|
||||||
//ftp用户表
|
//ftp用户表
|
||||||
$ftptable=' pureftp ';//ftp2.westgis.ac.cn
|
$ftptable=' pureftp ';//ftp2.westgis.ac.cn
|
||||||
$uid = 1002;
|
$uid = 1002;
|
||||||
|
@ -2488,7 +2491,7 @@ class AuthorController extends Zend_Controller_Action
|
||||||
//$old=umask(0);
|
//$old=umask(0);
|
||||||
//@mkdir($homedir,0777);
|
//@mkdir($homedir,0777);
|
||||||
//umask($old);
|
//umask($old);
|
||||||
$page=file_get_contents('http://ftp2.westgis.ac.cn/proftp_upload.php?uuid='.$uuid);
|
$page=file_get_contents('http://ftp.sanjiangyuan.org.cn/proftp_upload.php?uuid='.$uuid);
|
||||||
if (!empty($page)) die($page);//there are errors in visit ftp page
|
if (!empty($page)) die($page);//there are errors in visit ftp page
|
||||||
|
|
||||||
|
|
||||||
|
@ -2565,7 +2568,7 @@ class AuthorController extends Zend_Controller_Action
|
||||||
function literatureAction()
|
function literatureAction()
|
||||||
{
|
{
|
||||||
$ac = $this->_request->getParam('ac');
|
$ac = $this->_request->getParam('ac');
|
||||||
$uuid = $this->_request->getParam('uuid');
|
$this->view->uuid = $uuid = $this->_request->getParam('uuid');
|
||||||
$id = $this->_request->getParam('id');
|
$id = $this->_request->getParam('id');
|
||||||
|
|
||||||
$auth = Zend_Auth::getInstance();
|
$auth = Zend_Auth::getInstance();
|
||||||
|
@ -2596,9 +2599,14 @@ class AuthorController extends Zend_Controller_Action
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
$id = $this->_getParam('id');
|
$id = $this->_getParam('id');
|
||||||
|
$refid = $this->_getParam('refid');
|
||||||
$content = $this->_getParam('content');
|
$content = $this->_getParam('content');
|
||||||
|
$link = $this->_getParam('link');
|
||||||
|
$reftype = $this->_getParam('reftype');
|
||||||
|
$uuid = $this->_getParam('uuid');
|
||||||
|
|
||||||
if(empty($id))
|
|
||||||
|
if(empty($id) || empty($uuid))
|
||||||
{
|
{
|
||||||
$this->jsonexit(array('error'=>'参数错误'));
|
$this->jsonexit(array('error'=>'参数错误'));
|
||||||
return true;
|
return true;
|
||||||
|
@ -2610,7 +2618,13 @@ class AuthorController extends Zend_Controller_Action
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$s = $author->Literature->edit($id,$content);
|
if(empty($reftype))
|
||||||
|
{
|
||||||
|
$this->jsonexit(array('error'=>'请选择文献类型'));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$s = $author->Literature->edit($id,$refid,$uuid,$content,$link,$reftype);
|
||||||
if($s !== true)
|
if($s !== true)
|
||||||
{
|
{
|
||||||
$this->jsonexit(array('error'=>'出现错误'));
|
$this->jsonexit(array('error'=>'出现错误'));
|
||||||
|
@ -2713,7 +2727,7 @@ class AuthorController extends Zend_Controller_Action
|
||||||
//按文献浏览
|
//按文献浏览
|
||||||
else if($ac=="byliter")
|
else if($ac=="byliter")
|
||||||
{
|
{
|
||||||
$keywords = $this->_request->getParam('q');
|
$keywords = $this->_request->getParam('q');
|
||||||
if(!empty($keywords))
|
if(!empty($keywords))
|
||||||
$this->view->q = $keywords;
|
$this->view->q = $keywords;
|
||||||
$sql = "SELECT count(md.uuid) as c,r.reference,r.id FROM reference r
|
$sql = "SELECT count(md.uuid) as c,r.reference,r.id FROM reference r
|
||||||
|
@ -2744,6 +2758,17 @@ class AuthorController extends Zend_Controller_Action
|
||||||
$this->_helper->viewRenderer('literature-byliter');
|
$this->_helper->viewRenderer('literature-byliter');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//单条文献的信息
|
||||||
|
else if ($ac == "get")
|
||||||
|
{
|
||||||
|
$this->_helper->layout->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
$id = $this->_getParam('id');
|
||||||
|
$data = $author->Literature->getOne($id);
|
||||||
|
$this->jsonexit($data);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//按数据浏览
|
//按数据浏览
|
||||||
else if($ac=="bydata")
|
else if($ac=="bydata")
|
||||||
{
|
{
|
||||||
|
@ -2763,41 +2788,40 @@ class AuthorController extends Zend_Controller_Action
|
||||||
//添加文献信息
|
//添加文献信息
|
||||||
else if($ac == "add")
|
else if($ac == "add")
|
||||||
{
|
{
|
||||||
$submit = $this->_request->getParam('submit');
|
$submit = $this->_request->getParam('submit');
|
||||||
if(!empty($submit))
|
if(!empty($submit))
|
||||||
{
|
{
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
$data = "";
|
$data = "";
|
||||||
try{
|
try{
|
||||||
$uuid = $this->_request->getParam('uuid');
|
$uuid = $this->_request->getParam('uuid');
|
||||||
$ref=$this->_request->getParam('ref');
|
$ref=$this->_request->getParam('ref');
|
||||||
$reftype=$this->_request->getParam('reftype');
|
$reftype=$this->_request->getParam('reftype');
|
||||||
$url = $this->_request->getParam('url');
|
$url = $this->_request->getParam('url');
|
||||||
if(empty($uuid) || empty($ref) || !is_numeric($reftype))
|
|
||||||
{
|
if(empty($uuid) || empty($ref) || !is_numeric($reftype))
|
||||||
|
{
|
||||||
$data = array("error"=>"参数错误");
|
$data = array("error"=>"参数错误");
|
||||||
$this->jsonexit($data);
|
$this->jsonexit($data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql="select * from mdauthor where userid=? and uuid=? and status=1";
|
$author = new Author($this->db);
|
||||||
$sth = $this->db->prepare($sql);
|
if(!$author->checkAuthor($uuid))
|
||||||
$sth->execute(array($u_id,$uuid));
|
{
|
||||||
$row = $sth->fetch();
|
|
||||||
if (empty($row))
|
|
||||||
{
|
|
||||||
$data = array("error"=>$this->alertbox('warning','您不是该数据作者,无法添加对应文献信息。'));
|
$data = array("error"=>$this->alertbox('warning','您不是该数据作者,无法添加对应文献信息。'));
|
||||||
$this->jsonexit($data);
|
$this->jsonexit($data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql="select id from reference where reference=?";
|
$sql="select id from reference where reference=?";
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$sth->execute(array($ref));
|
$sth->execute(array($ref));
|
||||||
$row = $sth->fetch();
|
$row = $sth->fetch();
|
||||||
if (!$row)
|
|
||||||
|
if(empty($row['id']))
|
||||||
{
|
{
|
||||||
$sql="insert into reference (reference,link) values(?,?)";
|
$sql="insert into reference (reference,link) values(?,?)";
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
|
@ -2811,7 +2835,7 @@ class AuthorController extends Zend_Controller_Action
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$ex=$sth->execute(array($uuid,$row['id'],$reftype));
|
$ex=$sth->execute(array($uuid,$row['id'],$reftype));
|
||||||
|
|
||||||
if($ex)
|
if($ex)
|
||||||
{
|
{
|
||||||
$data = array("commited"=>1,"error"=>$this->alertbox('ok','成功添加文献!'));
|
$data = array("commited"=>1,"error"=>$this->alertbox('ok','成功添加文献!'));
|
||||||
$this->jsonexit($data);
|
$this->jsonexit($data);
|
||||||
|
@ -2821,8 +2845,9 @@ class AuthorController extends Zend_Controller_Action
|
||||||
$this->jsonexit($data);
|
$this->jsonexit($data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}catch(Exception $e) {
|
|
||||||
$msg = "提交失败,请确认权限后重试";
|
}catch(Exception $e) {
|
||||||
|
$msg = "提交失败,您提交的数据可能已经存在";
|
||||||
if($this->debug>0)
|
if($this->debug>0)
|
||||||
{$msg .= $e->getMessage();}
|
{$msg .= $e->getMessage();}
|
||||||
$data = array("error"=>$this->alertbox('error',$msg));
|
$data = array("error"=>$this->alertbox('error',$msg));
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
class CommunityController extends Zend_Controller_Action
|
|
||||||
{
|
|
||||||
function indexAction()
|
|
||||||
{
|
|
||||||
//$this->_redirect('/metadata');
|
|
||||||
}
|
|
||||||
function preDispatch()
|
|
||||||
{
|
|
||||||
$this->view->config = Zend_Registry::get('config');
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,391 +0,0 @@
|
||||||
<?php
|
|
||||||
class GlacierController extends DataController
|
|
||||||
{
|
|
||||||
private $limit=20;
|
|
||||||
|
|
||||||
function preDispatch()
|
|
||||||
{
|
|
||||||
parent::preDispatch();
|
|
||||||
//$this->_helper->layout->setLayout('glacier');
|
|
||||||
$acName = $this->_request->getActionName();
|
|
||||||
if(in_array($acName,array("rs","dem")))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse1";
|
|
||||||
}
|
|
||||||
if(in_array($acName,array("glacier","lake")))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse2";
|
|
||||||
}
|
|
||||||
if(in_array($acName,array("meteo","hydro","gps",'lidar','material','movement','physical','photogrammetry','frozensoil','vegetation','quatemary')))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse3";
|
|
||||||
}
|
|
||||||
$this->view->pageID = "glacier-".$acName;
|
|
||||||
}
|
|
||||||
|
|
||||||
function indexAction()
|
|
||||||
{
|
|
||||||
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and length(t.data)>2 order by random() limit 3";
|
|
||||||
$this->view->meatdata=$this->db->fetchAll($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 数据浏览
|
|
||||||
*/
|
|
||||||
function browseAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') ");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$select=$this->db->select();
|
|
||||||
$select->from('normalmetadata','*')->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') ")->order('title desc')->limitPage($page,$this->limit);
|
|
||||||
$this->view->metadata = $this->db->fetchAll($select);
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function thumbAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') ");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$select=$this->db->select();
|
|
||||||
$select->from('normalmetadata as m','m.*')
|
|
||||||
->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') ")
|
|
||||||
->order('m.title desc')->limitPage($page,$this->limit);
|
|
||||||
$this->view->metadata = $this->db->fetchAll($select);
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
}
|
|
||||||
|
|
||||||
function documentAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$row=$this->db->fetchAll("select count(*) from reference where id in (select refid from mdref where uuid in (select uuid from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') ))");
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select * from reference where id in (select refid from mdref where uuid in (select uuid from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') )) order by reference limit ? offset ?";
|
|
||||||
$this->view->refs=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit,"文献");
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function geobaseAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='遥感影像' or keyword='DEM'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='遥感影像' or keyword='DEM')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function demAction()
|
|
||||||
{
|
|
||||||
$this->getmd('DEM');
|
|
||||||
}
|
|
||||||
|
|
||||||
function rsAction()
|
|
||||||
{
|
|
||||||
$this->getmd('遥感影像');
|
|
||||||
}
|
|
||||||
|
|
||||||
function inventoryAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='冰川编目' or keyword='冰湖编目'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='冰川编目' or keyword='冰湖编目')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function glacierAction()
|
|
||||||
{
|
|
||||||
$this->getmd('冰川编目');
|
|
||||||
}
|
|
||||||
|
|
||||||
function lakeAction()
|
|
||||||
{
|
|
||||||
$this->getmd('冰湖编目');
|
|
||||||
}
|
|
||||||
|
|
||||||
function fieldAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme'
|
|
||||||
and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位' or keyword='气象' or keyword='雨量' or keyword='GPS'
|
|
||||||
or keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度' or keyword='物质平衡' or keyword='花杆' or keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌'
|
|
||||||
or keyword='冰雪物理过程' or keyword='冰温' or keyword='摄影测量' or keyword='照片' or keyword='第四纪' or keyword='冻土' or keyword='植被' ))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位' or keyword='气象' or keyword='雨量' or keyword='GPS'
|
|
||||||
or keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度' or keyword='物质平衡' or keyword='花杆' or keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌'
|
|
||||||
or keyword='冰雪物理过程' or keyword='冰温' or keyword='摄影测量' or keyword='照片' or keyword='第四纪' or keyword='冻土' or keyword='植被' )) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function meteoAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='气象' or keyword='雨量'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='气象' or keyword='雨量')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function hydroAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function gpsAction()
|
|
||||||
{
|
|
||||||
$this->getmd('GPS','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function lidarAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function materialAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='物质平衡' or keyword='花杆'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='物质平衡' or keyword='花杆')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function movementAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function physicalAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='冰雪物理过程' or keyword='冰温'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='冰雪物理过程' or keyword='冰温')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function photogrammetryAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='摄影测量' or keyword='照片'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='摄影测量' or keyword='照片')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function vegetationAction()
|
|
||||||
{
|
|
||||||
$this->getmd('植被');
|
|
||||||
}
|
|
||||||
|
|
||||||
function frozensoilAction()
|
|
||||||
{
|
|
||||||
$this->getmd('冻土');
|
|
||||||
}
|
|
||||||
|
|
||||||
function quatemaryAction()
|
|
||||||
{
|
|
||||||
$this->getmd('第四纪');
|
|
||||||
}
|
|
||||||
|
|
||||||
function listAction()
|
|
||||||
{
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') order by timebegin,title";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
function tagAction()
|
|
||||||
{
|
|
||||||
$key = $this->_request->getParam('key');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
if (!empty($key)) {
|
|
||||||
$this->view->codename=$key;
|
|
||||||
$sql=$this->db->quoteInto('select count(id) from keyword where keyword=?',$key);
|
|
||||||
$state=$this->db->query($sql);
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keyword='".$key."') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
} else {
|
|
||||||
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='place' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') group by keyword.keyword order by count desc");
|
|
||||||
$k1=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') group by k.keyword order by k.keyword");
|
|
||||||
$k2=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='discipline' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') group by k.keyword order by k.keyword");
|
|
||||||
$k3=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='stratum' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') group by k.keyword order by k.keyword");
|
|
||||||
$k4=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='temporal' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') group by keyword.keyword order by keyword.keyword");
|
|
||||||
$k5=$state->fetchAll();
|
|
||||||
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function searchAction()
|
|
||||||
{
|
|
||||||
$this->view->addHelperPath('helper','Zend_View_Helper_');
|
|
||||||
$form=new SearchForm();
|
|
||||||
$this->view->form=$form;
|
|
||||||
//$form->submit->setLabel('快速搜索');
|
|
||||||
$key=$this->_request->getParam('q');
|
|
||||||
if (!empty($key)) {
|
|
||||||
$search=new Search($key);
|
|
||||||
$where=$search->sql_expr(array("title","description"));
|
|
||||||
$page=@(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and ".$where);
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and ".$where." order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->key=$key;
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function timemapAction()
|
|
||||||
{
|
|
||||||
$sql="select id,uuid,west,south,north,east,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and timebegin is not null";
|
|
||||||
$this->view->rows=$this->db->fetchAll($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
function timelineAction()
|
|
||||||
{
|
|
||||||
$fn="glaciertime.xml";
|
|
||||||
$rows=$this->db->fetchAll("select ts_created from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') order by ts_created desc limit 1");
|
|
||||||
$last_update=strtotime($rows[0]['ts_created']);
|
|
||||||
if (!file_exists($fn) || (filemtime($fn)<$last_update))
|
|
||||||
{
|
|
||||||
$dateformat="M j Y";
|
|
||||||
$rows=$this->db->fetchAll("select id,uuid,description,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and timebegin is not null order by timebegin,title");
|
|
||||||
$timexml='<data>';
|
|
||||||
foreach($rows as $row) {
|
|
||||||
$timexml.='<event start="'.date($dateformat,strtotime($row['timebegin'])).' GMT+0800" ';
|
|
||||||
if ($row['timeend']!='' && $row['timeend']!=$row['timebegin']) $timexml.=' end="'.date($dateformat,strtotime($row['timeend'])).'" isDuration="true"';
|
|
||||||
$timexml.= ' title="'.htmlspecialchars($row['title']).'" image="/images/westdc_40w.gif" link="/glacier/view/uuid/'.$row['uuid'].'">';
|
|
||||||
$desc_length=mb_strlen($row['description'],"UTF-8");
|
|
||||||
$desc=mb_substr($row['description'],0,($desc_length>300)?300:$desc_length,"UTF-8");
|
|
||||||
if ($desc_length>300) $desc.=" ...";
|
|
||||||
$timexml.=htmlspecialchars($desc);
|
|
||||||
$timexml.="</event>\n";
|
|
||||||
}
|
|
||||||
$timexml.='</data>';
|
|
||||||
$fp=fopen($fn,'w');
|
|
||||||
fwrite($fp,$timexml);
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function categoryAction()
|
|
||||||
{
|
|
||||||
$code = (int)$this->_request->getParam('code');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$this->view->category=$this->db->fetchAll("select c.code,name,name_zh,count(*) from category c left join normalmetadata m on c.id=m.id,categorycode cc where c.code=cc.code and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') group by c.code,cc.name,cc.name_zh");
|
|
||||||
if ($code>0 && $code<20) {
|
|
||||||
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from category where code=".$code.")");
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,description,id from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select distinct id from category where code=".$code.") order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
$row=$this->db->fetchRow("select name,name_zh from categorycode where code=?",$code);
|
|
||||||
$this->view->codename=(empty($row['name_zh'])?$row['name']:$row['name_zh']);
|
|
||||||
} else {
|
|
||||||
//提供全部分类列表
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getmd($keyword,$type='theme')
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='glacier' and m.id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."')");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
//@todo: add order with title
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,660 +0,0 @@
|
||||||
<?php
|
|
||||||
class HiwaterController extends DataController
|
|
||||||
{
|
|
||||||
private $limit=20;
|
|
||||||
|
|
||||||
function preDispatch()
|
|
||||||
{
|
|
||||||
parent::preDispatch();
|
|
||||||
//$this->_helper->layout->setLayout('hiwater');
|
|
||||||
$this->debug = 1;
|
|
||||||
$acName = $this->_request->getActionName();
|
|
||||||
if(in_array($acName,array("aviation","radiometer","lidar","widas",'ccd',"nearvis","thermal")))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse1";
|
|
||||||
}
|
|
||||||
else if(in_array($acName,array("airborne","vegstructure","vegparam","temperature","soilmoisture")))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse2";
|
|
||||||
}
|
|
||||||
else if(in_array($acName,array("hmon",'super','normal','prec')))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse3";
|
|
||||||
}
|
|
||||||
else if(in_array($acName,array("cgs","calibration","ground",'sync')))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse4";
|
|
||||||
}
|
|
||||||
else if(in_array($acName,array("wsn","waternet","soilnet","bnunet",'bnulai')))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse5";
|
|
||||||
}
|
|
||||||
else if(in_array($acName,array("mso","autometeo","ec",'las',"cosmos","tdp","isotope")))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse6";
|
|
||||||
}
|
|
||||||
else if(in_array($acName,array("rsproduct","dem","precipitation",'sm',"snow","vegtype","vegcov",'phenology','npp')))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse7";
|
|
||||||
}
|
|
||||||
else if(in_array($acName,array("browse","thumb","fund","tag","timeline","timemap",'author','organization')))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse10";
|
|
||||||
}
|
|
||||||
else if(in_array($acName,array("other")))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse9";
|
|
||||||
}
|
|
||||||
$this->view->pageID = "hiwater-".$acName;
|
|
||||||
$this->_helper->layout->setLayout('heihe');
|
|
||||||
}
|
|
||||||
|
|
||||||
function indexAction()
|
|
||||||
{
|
|
||||||
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and length(t.data)>2 order by random() limit 3";
|
|
||||||
$this->view->meatdata=$this->db->fetchAll($sql);
|
|
||||||
$archive = new Archive($this->db);
|
|
||||||
$this->view->info = $archive->getOneArchive('HiWATER:黑河流域生态-水文过程综合遥感观测联合试验','about');
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 数据浏览
|
|
||||||
*/
|
|
||||||
function browseAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$select=$this->db->select();
|
|
||||||
$select->from('normalmetadata','*')->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ")->order('title desc')->limitPage($page,$this->limit);
|
|
||||||
$this->view->metadata = $this->db->fetchAll($select);
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function thumbAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$select=$this->db->select();
|
|
||||||
$select->from('normalmetadata as m','m.*')
|
|
||||||
->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ")
|
|
||||||
->order('m.title desc')->limitPage($page,$this->limit);
|
|
||||||
$this->view->metadata = $this->db->fetchAll($select);
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
}
|
|
||||||
|
|
||||||
function documentAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$row=$this->db->fetchAll("select count(*) from reference where id in (select refid from mdref where uuid in (select uuid from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ))");
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select * from reference where id in (select refid from mdref where uuid in (select uuid from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') )) order by reference limit ? offset ?";
|
|
||||||
$this->view->refs=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit,"文献");
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function aviationAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('WiDAS','PLMR','Lidar','CASI','热红外高光谱数据'),'航空遥感');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function radiometerAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited('PLMR','航空遥感');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function lidarAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited('激光雷达','航空遥感');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function widasAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited('WIDAS','航空遥感');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function ccdAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited('CCD','航空遥感');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function nearvisAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited('CASI','航空遥感');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function thermalAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited('热红外高光谱数据','航空遥感');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function airborneAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('航空遥感产品','种植结构图','植被类型图','植被结构参数','数字高程模型','数字表面模型','地表温度','地表土壤水文'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function vegstructureAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','种植结构图'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function vegparamAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','植被结构参数'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function dsmAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','数字表面模型'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function temperatureAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','地表温度'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function hmonAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('西支','黄藏寺','黄草沟','峨堡','景阳岭','阿柔阳坡','阿柔阴坡','戈壁站','神沙窝沙漠站','花寨子荒漠站','张掖湿地站','阿柔超级站','大满超级站','四道桥超级站'),'水文气象');
|
|
||||||
$md=$this->view->metadata;
|
|
||||||
$this->getmd(array('','河川径流观测'));
|
|
||||||
$this->view->metadata=array_merge($md,$this->view->metadata);
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function superAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('阿柔超级站','大满超级站','四道桥超级站'),'水文气象');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function normalAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('西支','黄藏寺','黄草沟','峨堡','景阳岭','阿柔阳坡','阿柔阴坡','戈壁站','神沙窝沙漠站','花寨子荒漠站','张掖湿地站'),'水文气象');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function autometeoAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','自动气象站'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function ecAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','涡动相关仪'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function lasAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','大孔径闪烁仪'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function precAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','河川径流观测'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function cgsAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('定标观测','地基遥感观测','地面同步观测'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function calibrationAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','定标观测'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function groundAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','地基遥感观测'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function syncAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','地面同步观测'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function wsnAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('WATERNET','SoilNET','BNUNET','BNULAI'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function waternetAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','WATERNET'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function soilnetAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','SoilNET'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function bnunetAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','BNUNET'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function bnulaiAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited('LAI','生态水文无线传感器网络');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function satelliteAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','卫星遥感'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function soilAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','卫星遥感'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function meteoAction()
|
|
||||||
{
|
|
||||||
$this->getmd('气象','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function hydroAction()
|
|
||||||
{
|
|
||||||
$this->getmd('水文观测','theme');
|
|
||||||
}
|
|
||||||
function irragationAction()
|
|
||||||
{
|
|
||||||
$this->getmd('灌溉','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function obsAction()
|
|
||||||
{
|
|
||||||
$this->getmd('试验','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function msoAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('自动气象站','涡动相关仪','大孔径闪烁仪','稳定同位素观测系统','热扩散液流计(TDP)','宇宙射线土壤水分'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function isotopeAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','稳定同位素观测系统'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function tdpAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','热扩散液流计(TDP)'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function cosmosAction()
|
|
||||||
{
|
|
||||||
$this->getmd(array('','宇宙射线土壤水分'));
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function rsproductAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('DEM','DOM','降水','土壤水分','积雪','植被类型','植被覆盖度','物候期','NPP'),'数据产品');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function demAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('DEM','DOM'),'数据产品');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function precipitationAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('降水',''),'数据产品');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function smAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('土壤水分'),'数据产品');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function snowAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('积雪'),'数据产品');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function vegtypeAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('植被类型','种植结构'),'数据产品');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function vegcovAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('植被覆盖度',''),'数据产品');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function phenologyAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('物候期',''),'数据产品');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
function nppAction()
|
|
||||||
{
|
|
||||||
$this->getmdlimited(array('NPP',''),'数据产品');
|
|
||||||
$this->_helper->viewRenderer('base');
|
|
||||||
}
|
|
||||||
|
|
||||||
function listAction()
|
|
||||||
{
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') order by timebegin,title";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
function tagAction()
|
|
||||||
{
|
|
||||||
$key = $this->_request->getParam('key');
|
|
||||||
$keytype = $this->_request->getParam('keytype');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
if (!empty($key)) {
|
|
||||||
$this->view->codename=$key;
|
|
||||||
$sql=$this->db->quoteInto("select count(k.id) from keyword k left join normalmetadata m on k.id=m.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and k.keyword=?",$key);
|
|
||||||
$state=$this->db->query($sql);
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keyword='".$key."') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
} else {
|
|
||||||
$sql="select k.keyword,count(*),k.keytype from keyword k left join normalmetadata m on k.id=m.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') ";
|
|
||||||
if (!empty($keytype) && ($keytype=='place' || $keytype=='theme' || $keytype=='discipline'||$keytype=='temporal')) $sql.=" and k.keytype='".$keytype."'";
|
|
||||||
$sql.=' group by k.keyword,k.keytype order by k.keytype,k.keyword,count desc';
|
|
||||||
$state=$this->db->query($sql);
|
|
||||||
$this->view->keytype=$keytype;
|
|
||||||
$this->view->keywords=$state->fetchAll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function searchAction()
|
|
||||||
{
|
|
||||||
$this->view->addHelperPath('helper','Zend_View_Helper_');
|
|
||||||
$form=new SearchForm();
|
|
||||||
$this->view->form=$form;
|
|
||||||
//$form->submit->setLabel('快速搜索');
|
|
||||||
$key=$this->_request->getParam('q');
|
|
||||||
if (!empty($key)) {
|
|
||||||
$search=new SimpleSearch($key);
|
|
||||||
$where=$search->sql_expr(array("title","description"));
|
|
||||||
$page=@(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and ".$where);
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and ".$where." order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->key=$key;
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function timemapAction()
|
|
||||||
{
|
|
||||||
$sql="select id,uuid,west,south,north,east,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and timebegin is not null";
|
|
||||||
$this->view->rows=$this->db->fetchAll($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
function timelineAction()
|
|
||||||
{
|
|
||||||
$fn="hiwatertime.xml";
|
|
||||||
$rows=$this->db->fetchAll("select ts_created from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') order by ts_created desc limit 1");
|
|
||||||
$last_update=strtotime($rows[0]['ts_created']);
|
|
||||||
if (!file_exists($fn) || (filemtime($fn)<$last_update))
|
|
||||||
{
|
|
||||||
$dateformat="M j Y";
|
|
||||||
$rows=$this->db->fetchAll("select id,uuid,description,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and timebegin is not null order by timebegin,title");
|
|
||||||
$timexml='<data>';
|
|
||||||
foreach($rows as $row) {
|
|
||||||
$timexml.='<event start="'.date($dateformat,strtotime($row['timebegin'])).' GMT+0800" ';
|
|
||||||
if ($row['timeend']!='' && $row['timeend']!=$row['timebegin']) $timexml.=' end="'.date($dateformat,strtotime($row['timeend'])).'" isDuration="true"';
|
|
||||||
$timexml.= ' title="'.htmlspecialchars($row['title']).'" image="/images/westdc_40w.gif" link="/hiwater/view/uuid/'.$row['uuid'].'">';
|
|
||||||
$desc_length=mb_strlen($row['description'],"UTF-8");
|
|
||||||
$desc=mb_substr($row['description'],0,($desc_length>300)?300:$desc_length,"UTF-8");
|
|
||||||
if ($desc_length>300) $desc.=" ...";
|
|
||||||
$timexml.=htmlspecialchars($desc);
|
|
||||||
$timexml.="</event>\n";
|
|
||||||
}
|
|
||||||
$timexml.='</data>';
|
|
||||||
$fp=fopen($fn,'w');
|
|
||||||
fwrite($fp,$timexml);
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function categoryAction()
|
|
||||||
{
|
|
||||||
$code = (int)$this->_request->getParam('code');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$this->view->category=$this->db->fetchAll("select c.code,name,name_zh,count(*) from category c left join normalmetadata m on c.id=m.id,categorycode cc where c.code=cc.code and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by c.code,cc.name,cc.name_zh");
|
|
||||||
if ($code>0 && $code<20) {
|
|
||||||
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from category where code=".$code.")");
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,description,id from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select distinct id from category where code=".$code.") order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
$row=$this->db->fetchRow("select name,name_zh from categorycode where code=?",$code);
|
|
||||||
$this->view->codename=(empty($row['name_zh'])?$row['name']:$row['name_zh']);
|
|
||||||
} else {
|
|
||||||
//提供全部分类列表
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function viewAction()
|
|
||||||
{
|
|
||||||
parent::viewAction();
|
|
||||||
$this->_helper->viewRenderer('hiwater/view');
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getmd($keyword,$type='theme')
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
if (!is_array($keyword))
|
|
||||||
{
|
|
||||||
$keyword=array($keyword);
|
|
||||||
}
|
|
||||||
$key="(";
|
|
||||||
foreach($keyword as $k)
|
|
||||||
{
|
|
||||||
$key.="'".$k."',";
|
|
||||||
}
|
|
||||||
$key=substr($key,0,-1);
|
|
||||||
$key.=")";
|
|
||||||
$keyword=$key;
|
|
||||||
|
|
||||||
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='hiwater' and m.id in (select id from keyword where keytype='".$type."' and keyword in ".$keyword.")");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
//@todo: add order with title
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keytype='".$type."' and keyword in ".$keyword.") order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
//获取多项条件并列关系的数据并必须满足limited条件
|
|
||||||
//$keyword:字符串或字符串数组
|
|
||||||
//$limited:限制字符串
|
|
||||||
private function getmdlimited($keyword,$limited)
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
if (!is_array($keyword))
|
|
||||||
{
|
|
||||||
$keyword=array($keyword);
|
|
||||||
}
|
|
||||||
$key="(";
|
|
||||||
foreach($keyword as $k)
|
|
||||||
{
|
|
||||||
$key.="'".$k."',";
|
|
||||||
}
|
|
||||||
$key=substr($key,0,-1);
|
|
||||||
$key.=")";
|
|
||||||
$keyword=$key;
|
|
||||||
|
|
||||||
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='hiwater' and m.id in (select id from keyword where keyword='".$limited."') and m.id in (select id from keyword where keyword in ".$keyword.")");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
//@todo: add order with title
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keyword='".$limited."') and id in (select id from keyword where keyword in ".$keyword.") order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
//基于数据作者的浏览(包括认证后的数据作者以及未认证的数据作者)
|
|
||||||
function authorAction()
|
|
||||||
{
|
|
||||||
$ac = $this->_request->getParam('ac');
|
|
||||||
$id = (int)$this->_request->getParam('id');
|
|
||||||
if ($ac=='verified') {
|
|
||||||
//已经认证过的数据作者
|
|
||||||
$this->view->tabID='author-verified';
|
|
||||||
$this->view->ac='verified';
|
|
||||||
if ($id) {
|
|
||||||
//列出作者的数据
|
|
||||||
$sql="select username,realname from users where id=?";
|
|
||||||
$this->view->author=$this->db->fetchRow($sql,array($id));
|
|
||||||
$sql="select m.* from normalmetadata m left join mdauthor a on a.uuid=m.uuid where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and a.userid=?";
|
|
||||||
$sth = $this->db->prepare($sql);
|
|
||||||
$sth->execute(array($id));
|
|
||||||
$rows = $sth->fetchAll();
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
|
||||||
$paginator->setItemCountPerPage(10);
|
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
|
||||||
$this->view->paginator=$paginator;
|
|
||||||
} else {
|
|
||||||
//已经认证过的数据作者
|
|
||||||
$sql="select u.username,u.realname,u.id,count(u.id) as count from mdauthor a left join users u on a.userid=u.id where a.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and a.status=1 and a.uuid in (select uuid from normalmetadata) group by u.id,u.username,u.realname";
|
|
||||||
$sth = $this->db->prepare($sql);
|
|
||||||
$sth->execute();
|
|
||||||
$rows = $sth->fetchAll();
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
|
||||||
$paginator->setItemCountPerPage(50);
|
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
|
||||||
$this->view->paginator=$paginator;
|
|
||||||
}
|
|
||||||
} else if ($ac=='unverified' || empty($ac)) {
|
|
||||||
//未认证的数据作者
|
|
||||||
$this->view->tabID='author-unverified';
|
|
||||||
$this->view->ac='unverified';
|
|
||||||
if ($id) {
|
|
||||||
//列出数据
|
|
||||||
$sql="select individual as username from responsible where id=?";
|
|
||||||
$this->view->author=$this->db->fetchRow($sql,array($id));
|
|
||||||
$sql="select distinct m.* from normalmetadata m left join role r on m.uuid=r.uuid left join responsible s on r.resid=s.id where r.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and r.role in ('pointOfContact','resourceProvider','owner') and s.id=?";
|
|
||||||
$sth = $this->db->prepare($sql);
|
|
||||||
$sth->execute(array($id));
|
|
||||||
$rows = $sth->fetchAll();
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
|
||||||
$paginator->setItemCountPerPage(10);
|
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
|
||||||
$this->view->paginator=$paginator;
|
|
||||||
} else {
|
|
||||||
//列出所有作者
|
|
||||||
$sql="select distinct responsible.individual as username,responsible.id from responsible left join role on role.resid=responsible.id where role.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and role.role in ('pointOfContact','resourceProvider','owner')";
|
|
||||||
$sth = $this->db->prepare($sql);
|
|
||||||
$sth->execute();
|
|
||||||
$rows = $sth->fetchAll();
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
|
||||||
$paginator->setItemCountPerPage(50);
|
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
|
||||||
$this->view->paginator=$paginator;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function fundAction()
|
|
||||||
{
|
|
||||||
$id = (int)$this->_request->getParam('id');
|
|
||||||
if (!empty($id)) {
|
|
||||||
$sql="select * from fund where id=?";
|
|
||||||
$this->view->fund=$this->db->fetchRow($sql,array($id));
|
|
||||||
if ($this->view->fund) {
|
|
||||||
$sql="select distinct m.* from normalmetadata m left join mdfund mf on m.uuid=mf.uuid where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and mf.fid=?";
|
|
||||||
$sth = $this->db->prepare($sql);
|
|
||||||
$sth->execute(array($id));
|
|
||||||
$rows = $sth->fetchAll();
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
|
||||||
$paginator->setItemCountPerPage(10);
|
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
|
||||||
$this->view->paginator=$paginator;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//提供全部分类列表
|
|
||||||
$sql="select f.id,f.title,f.fund_id,f.fund_type,f.ts_created,count(m.id) as datacount,sum(md.filesize) as filesize from fund f left join mdfund m on f.id=m.fid left join metadata md on m.uuid=md.uuid where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by f.id,f.title,f.fund_id,f.fund_type,f.ts_created order by f.ts_created desc";
|
|
||||||
$sth = $this->db->prepare($sql);
|
|
||||||
$sth->execute();
|
|
||||||
$rows = $sth->fetchAll();
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
|
||||||
$paginator->setItemCountPerPage(10);
|
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
|
||||||
$this->view->paginator=$paginator;
|
|
||||||
$this->_helper->viewRenderer('fund-list');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function organizationAction()
|
|
||||||
{
|
|
||||||
$page = $this->_request->getParam('page');
|
|
||||||
$name = $this->_request->getParam('name');
|
|
||||||
$state=$this->db->query("select distinct responsible.organisation from responsible left join role on role.resid=responsible.id where role.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and role.role in ('pointOfContact','resourceProvider','owner')");
|
|
||||||
$this->view->organisation=$state->fetchAll();
|
|
||||||
if (!empty($name)) {
|
|
||||||
$this->view->codename=$name;
|
|
||||||
$sql="select distinct m.* from normalmetadata m left join role r on m.uuid=r.uuid left join responsible s on r.resid=s.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and r.role in ('pointOfContact','resourceProvider','owner') and s.organisation=?";
|
|
||||||
$sth = $this->db->prepare($sql);
|
|
||||||
$sth->execute(array($name));
|
|
||||||
$rows = $sth->fetchAll();
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
|
||||||
$paginator->setItemCountPerPage(10);
|
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
|
||||||
$this->view->paginator=$paginator;
|
|
||||||
} else {
|
|
||||||
//提供全部分类列表
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -7,26 +7,27 @@ class IndexController extends Zend_Controller_Action
|
||||||
$this->view->config = Zend_Registry::get('config');
|
$this->view->config = Zend_Registry::get('config');
|
||||||
$this->db=Zend_Registry::get('db');
|
$this->db=Zend_Registry::get('db');
|
||||||
$this->view->theme = new Theme();
|
$this->view->theme = new Theme();
|
||||||
$this->view->main_nav_pageID = "index";
|
$this->submd = $this->view->config->sub->metadata;
|
||||||
|
$this->subnews = $this->view->config->sub->news;
|
||||||
|
# $this->_helper->layout->setLayout('index');
|
||||||
|
//$this->view->main_nav_pageID = "index";
|
||||||
}
|
}
|
||||||
|
|
||||||
function indexAction()
|
function indexAction()
|
||||||
{
|
{
|
||||||
//数据通讯
|
|
||||||
$l=new mydir($this->view->config->paths->newsletter,"newsletter_*.pdf");
|
|
||||||
$this->view->newsletter=$l->getLast();
|
|
||||||
$name=basename($this->view->newsletter,'.pdf');
|
|
||||||
list(,$this->view->newsletterno)=explode("_",$name);
|
|
||||||
//统计数据
|
//统计数据
|
||||||
$sql='select (select count(*) from users) as usernum,(select count(*) from metadata) as metanum,(select count(*) from offlineapp where ts_approved is not null ) as offlinenum';
|
$sql="select (select count(*) from users) as usernum,(select count(*) from {$this->submd}) as metanum,
|
||||||
|
(select count(distinct d.uuid) from dataorder d left join offlineapp f on d.offlineappid=f.id where d.uuid in (select uuid from meteorologymd) and d.ts_approved is not null and d.status in (0,5) ) as offlinenum,
|
||||||
|
(select count(*) from datavisual where uuid in (select uuid from {$this->submd}) and status=1) as visualnum";
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
$this->view->usernum=$row['usernum'];
|
$this->view->usernum=$row['usernum'];
|
||||||
$this->view->metanum=$row['metanum'];
|
$this->view->metanum=$row['metanum'];
|
||||||
$this->view->offlinenum=$row['offlinenum'];
|
$this->view->offlinenum=$row['offlinenum'];
|
||||||
|
$this->view->visualnum=$row['visualnum'];
|
||||||
/*$sql='select count(*) from metadata';
|
/*$sql='select count(*) from metadata';
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
$this->view->metanum=$row['count'];*/
|
$this->view->metanum=$row['count'];*/
|
||||||
$sql="select sum(filesize) as sum,datatype from metadata group by datatype";
|
$sql="select sum(filesize) as sum,datatype from {$this->submd} group by datatype";
|
||||||
$rows=$this->db->fetchAll($sql);
|
$rows=$this->db->fetchAll($sql);
|
||||||
foreach($rows as $row)
|
foreach($rows as $row)
|
||||||
{
|
{
|
||||||
|
@ -35,19 +36,15 @@ class IndexController extends Zend_Controller_Action
|
||||||
else
|
else
|
||||||
$this->view->onlinesize=$row['sum'];
|
$this->view->onlinesize=$row['sum'];
|
||||||
}
|
}
|
||||||
//特色推荐
|
|
||||||
$sql="select * from datafeature order by id desc";
|
|
||||||
$this->view->feature=$this->db->fetchRow($sql);
|
|
||||||
//特色数据集
|
|
||||||
$sql="select * from datasetcd order by random()";
|
|
||||||
$this->view->datasetcd=$this->db->fetchRow($sql);
|
|
||||||
//下载最多数据(top 5)
|
//下载最多数据(top 5)
|
||||||
$sql="select uuid,title,id from normalmetadata where id in (select m.id from normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)";
|
$sql="select uuid,title,id from {$this->submd} where id in (select m.id from {$this->submd} m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)";
|
||||||
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
|
//最新数据
|
||||||
|
$sql = "select id,uuid,title,ts_created from {$this->submd} order by ts_created desc limit 5";
|
||||||
|
$this->db->setFetchMode(Zend_Db::FETCH_BOTH);
|
||||||
$this->view->mdtop=$this->db->fetchAll($sql);
|
$this->view->mdtop=$this->db->fetchAll($sql);
|
||||||
$sql="select uuid,title,id from normalmetadata where id in (select m.id from normalmetadata m left join dataorder d on m.uuid=d.uuid where m.datatype=1 group by m.id order by count(d.uuid) desc limit 5)";
|
$sql="select uuid,title,id from {$this->submd} where id in (select m.id from {$this->submd} m left join dataorder d on m.uuid=d.uuid where m.datatype=1 group by m.id order by count(d.uuid) desc limit 5)";
|
||||||
$this->view->offlinemdtop=$this->db->fetchAll($sql);
|
$this->view->offlinemdtop=$this->db->fetchAll($sql);
|
||||||
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where length(t.data)>2 order by random()";
|
$sql="select m.uuid,m.title,m.id,m.description from {$this->submd} m left join thumbnail t on m.id=t.id where length(t.data)>2 order by random()";
|
||||||
$this->view->mdrandom=$this->db->fetchRow($sql);
|
$this->view->mdrandom=$this->db->fetchRow($sql);
|
||||||
//搜索
|
//搜索
|
||||||
$this->view->addHelperPath('helper','Zend_View_Helper_');
|
$this->view->addHelperPath('helper','Zend_View_Helper_');
|
||||||
|
@ -58,7 +55,8 @@ class IndexController extends Zend_Controller_Action
|
||||||
$News = new Archive($this->db);
|
$News = new Archive($this->db);
|
||||||
|
|
||||||
$time = date("Y-m-d H:i:s",time());
|
$time = date("Y-m-d H:i:s",time());
|
||||||
$sql = "SELECT * FROM archive WHERE is_pub=true AND ts_published<'$time' AND image!='' and id in (select ar_catalog.aid from ar_category left join ar_catalog on ar_category.id=ar_catalog.cid where ar_category.code='featured') order by ts_published desc LIMIT 5";
|
$sql = "SELECT * FROM archive WHERE is_pub=true and sub='$this->subnews' AND ts_published<'$time' AND image!=''
|
||||||
|
and id in (select ar_catalog.aid from ar_category left join ar_catalog on ar_category.id=ar_catalog.cid where ar_category.code='featured') order by ts_published desc LIMIT 5";
|
||||||
$sth = $this->db->query($sql);
|
$sth = $this->db->query($sql);
|
||||||
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
|
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
|
||||||
|
|
||||||
|
@ -71,7 +69,9 @@ class IndexController extends Zend_Controller_Action
|
||||||
$this->view->news = $rows;
|
$this->view->news = $rows;
|
||||||
|
|
||||||
//$time = date("Y-m-d H:i:s",time());
|
//$time = date("Y-m-d H:i:s",time());
|
||||||
$sql = "SELECT * FROM archive WHERE is_pub=true AND ts_published<now() and id in (select ar_catalog.aid from ar_catalog left join ar_category on ar_catalog.cid=ar_category.id where ar_category.ptype='news') order by ts_published desc LIMIT 12 ";
|
$sql = "SELECT * FROM archive WHERE is_pub=true and sub='$this->subnews' AND ts_published<now()
|
||||||
|
and id in (select ar_catalog.aid from ar_catalog left join ar_category on ar_catalog.cid=ar_category.id where ar_category.ptype='news')
|
||||||
|
order by ts_published desc LIMIT 5 ";
|
||||||
$sth = $this->db->query($sql);
|
$sth = $this->db->query($sql);
|
||||||
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
|
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
|
||||||
|
|
||||||
|
@ -85,10 +85,9 @@ class IndexController extends Zend_Controller_Action
|
||||||
|
|
||||||
$this->view->list_news = $rows;
|
$this->view->list_news = $rows;
|
||||||
|
|
||||||
$sql="select d.*,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.ts_published is not null order by ts_published desc limit 4";
|
$sql="select * from $this->submd where uuid in (select uuid from datavisual) order by ts_created desc limit 5";
|
||||||
$sth = $this->db->query($sql);
|
$sth=$this->db->query($sql);
|
||||||
$this->view->dois = $sth->fetchAll();
|
$this->view->visualdata = $sth->fetchAll(PDO::FETCH_BOTH);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,70 +12,96 @@ class KnowledgeController extends Zend_Controller_Action
|
||||||
$this->view->messages = $this->messenger->getMessages();
|
$this->view->messages = $this->messenger->getMessages();
|
||||||
$this->view->theme=new Theme();
|
$this->view->theme=new Theme();
|
||||||
}
|
}
|
||||||
function datacenterAction()
|
function datacenterAction()
|
||||||
{
|
{
|
||||||
$siteid="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338";//site uuid from geonetowrk
|
$siteid="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338";//site uuid from geonetowrk
|
||||||
$sql="select * from mdref mr left join reference r on mr.refid=r.id where mr.uuid=? order by r.id desc";
|
$sql="select * from mdref mr left join reference r on mr.refid=r.id where mr.uuid=? order by r.year desc, reference desc";
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$sth->execute(array($siteid));
|
$sth->execute(array($siteid));
|
||||||
$rows = $sth->fetchAll();
|
$rows = $sth->fetchAll();
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
$paginator->setItemCountPerPage(10);
|
$paginator->setItemCountPerPage(10);
|
||||||
$paginator->setView($this->view);
|
$paginator->setView($this->view);
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||||
$this->view->paginator=$paginator;
|
$this->view->paginator=$paginator;
|
||||||
}
|
}
|
||||||
function userAction()
|
function waterAction()
|
||||||
{
|
{
|
||||||
$sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid in (select uuid from normalmetadata)) order by id desc";
|
$sql="select * from reference where id in (select refid from mdref where uuid in (select uuid from en.normalmetadata)) order by year desc, reference desc";
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
$rows = $sth->fetchAll();
|
$rows = $sth->fetchAll();
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
$paginator->setItemCountPerPage(10);
|
$paginator->setItemCountPerPage(10);
|
||||||
$paginator->setView($this->view);
|
$paginator->setView($this->view);
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||||
$this->view->paginator=$paginator;
|
$this->view->paginator=$paginator;
|
||||||
}
|
}
|
||||||
function authorAction()
|
|
||||||
{
|
|
||||||
$sql="select * from reference where id in (select refid from mdref where reftype=0 and uuid in (select uuid from normalmetadata)) order by id desc";
|
|
||||||
$sth = $this->db->prepare($sql);
|
|
||||||
$sth->execute();
|
|
||||||
$rows = $sth->fetchAll();
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
|
||||||
$paginator->setItemCountPerPage(10);
|
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
|
||||||
$this->view->paginator=$paginator;
|
|
||||||
}
|
|
||||||
|
|
||||||
function westplanAction()
|
function userAction()
|
||||||
{
|
{
|
||||||
$sql="select distinct array_to_string(array(select author from knl_author t where t.item_id=c.item_id order by place asc),'; ') as author,c.title,c.publisher,c.ts_created,c.ts_issued,c.item_id,c.url from knl_article c where c.url <>'' order by ts_created desc";
|
$uuid=$this->_request->getParam('uuid');
|
||||||
$sth = $this->db->prepare($sql);
|
if (preg_match('/([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})/',$uuid))
|
||||||
$sth->execute();
|
{
|
||||||
$rows = $sth->fetchAll();
|
$sql="select uuid,title from metadata where uuid='$uuid'";
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
$sth = $this->db->prepare($sql);
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
$sth->execute();
|
||||||
$paginator->setItemCountPerPage(10);
|
$this->view->md = $sth->fetch();
|
||||||
$paginator->setView($this->view);
|
$sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid='$uuid') order by year desc, reference desc";
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
} else
|
||||||
$this->view->paginator=$paginator;
|
$sql="select * from reference where id in (select refid from mdref where reftype=1 and uuid in (select uuid from normalmetadata)) order by year desc, reference desc";
|
||||||
}
|
$sth = $this->db->prepare($sql);
|
||||||
function searchAction()
|
$sth->execute();
|
||||||
{
|
$rows = $sth->fetchAll();
|
||||||
$key=$this->_request->getParam('q');
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
$source=$this->_request->getParam('searchsource');
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
if(preg_match("/\"|'|<|>/",$key))
|
$paginator->setItemCountPerPage(10);
|
||||||
{
|
$paginator->setView($this->view);
|
||||||
$data=array('<'=>'<','>'=>'>', "\'"=>'’', "\""=>'”');
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
}
|
||||||
|
|
||||||
$patterns = array();
|
function authorAction()
|
||||||
$replacements = array();
|
{
|
||||||
|
$sql="select * from reference where id in (select refid from mdref where reftype=0 and uuid in (select uuid from normalmetadata)) order by year desc, reference desc";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage(10);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
}
|
||||||
|
|
||||||
|
function westplanAction()
|
||||||
|
{
|
||||||
|
$sql="select distinct array_to_string(array(select author from knl_author t where t.item_id=c.item_id order by place asc),'; ') as author,c.title,c.publisher,c.ts_created,c.ts_issued,c.item_id,c.url from knl_article c where c.url <>'' order by ts_created desc";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage(10);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchAction()
|
||||||
|
{
|
||||||
|
$key=$this->_request->getParam('q');
|
||||||
|
$author = (int)$this->_request->getParam('author');
|
||||||
|
$place = (int)$this->_request->getParam('place');
|
||||||
|
$source=$this->_request->getParam('searchsource');
|
||||||
|
if(preg_match("/\"|'|<|>/",$key))
|
||||||
|
{
|
||||||
|
$data=array('<'=>'<','>'=>'>', "\'"=>'’', "\""=>'”');
|
||||||
|
$patterns = array();
|
||||||
|
$replacements = array();
|
||||||
foreach($data as $k=>$v)
|
foreach($data as $k=>$v)
|
||||||
{
|
{
|
||||||
$patterns[]='/'.$k.'/i';
|
$patterns[]='/'.$k.'/i';
|
||||||
|
@ -86,12 +112,15 @@ class KnowledgeController extends Zend_Controller_Action
|
||||||
$key=preg_replace($patterns, $replacements, $key);
|
$key=preg_replace($patterns, $replacements, $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($key) && $source=='datasource') {
|
if (!empty($key)) {
|
||||||
$search=new SimpleSearch($key);
|
$search=new SimpleSearch($key);
|
||||||
$where=$search->sql_expr(array("reference"));
|
$where=$search->sql_expr(array("reference"));
|
||||||
$sql="select * from reference where ".$where." order by id desc";
|
$sql="select * from reference where ".$where." order by year desc, reference desc";
|
||||||
|
} else if ($author && $place) {
|
||||||
|
$sql="select * from reference where id in (select a1.id from ref_author a1,ref_author a2 where a1.firstname=a2.firstname and a1.lastname=a2.lastname and a2.id=$author and a2.place=$place)";
|
||||||
|
}
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
$rows = $sth->fetchAll();
|
$rows = $sth->fetchAll();
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
@ -102,23 +131,25 @@ class KnowledgeController extends Zend_Controller_Action
|
||||||
$this->view->key=$key;
|
$this->view->key=$key;
|
||||||
$this->view->source=$source;
|
$this->view->source=$source;
|
||||||
$this->_helper->viewRenderer('search-data');
|
$this->_helper->viewRenderer('search-data');
|
||||||
}
|
|
||||||
else if (!empty($key) && $source=='westsource') {
|
}
|
||||||
$search=new SimpleSearch($key);
|
|
||||||
$where=$search->sql_expr(array("c.title","a.author"));
|
function paperAction()
|
||||||
$sql="select distinct a.author,c.title,c.publisher,c.ts_created,c.ts_issued,c.item_id,c.url from knl_article c left join knl_author a on c.item_id=a.item_id where c.url <>'' and a.place=1 and $where order by ts_created desc";
|
{
|
||||||
$sth = $this->db->prepare($sql);
|
$id = (int)$this->_request->getParam('id');
|
||||||
$sth->execute();
|
$sql="select * from reference where id=$id";
|
||||||
$rows = $sth->fetchAll();
|
$sth = $this->db->prepare($sql);
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
$sth->execute();
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
$this->view->paper = $sth->fetch();
|
||||||
$paginator->setItemCountPerPage(10);
|
|
||||||
$paginator->setView($this->view);
|
$sql="select * from ref_author where id=$id order by place";
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
$sth = $this->db->prepare($sql);
|
||||||
$this->view->paginator=$paginator;
|
$sth->execute();
|
||||||
$this->view->key=$key;
|
$this->view->author = $sth->fetchAll();
|
||||||
$this->view->source=$source;
|
|
||||||
//$this->_helper->viewRenderer('search-data');
|
$sql="select * from ref_tag where id=$id";
|
||||||
}
|
$sth = $this->db->prepare($sql);
|
||||||
}
|
$sth->execute();
|
||||||
|
$this->view->tag = $sth->fetchAll();
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,118 +0,0 @@
|
||||||
<?php
|
|
||||||
class MetainfoController extends Zend_Controller_Action {
|
|
||||||
function indexAction() {
|
|
||||||
$title=$this->_request->getParam('title');
|
|
||||||
$filePath="http://wiki.westgis.ac.cn/api.php?format=php&action=query&prop=revisions&titles=$title&rvprop=content&redirects";
|
|
||||||
$wikifp=fopen($filePath,'r');
|
|
||||||
while (!feof($wikifp)) {
|
|
||||||
$wikiLines=fgets($wikifp);
|
|
||||||
$yuchuli=array('";}}}}}}','**','*');
|
|
||||||
$chulihou=array('',' ·','·');
|
|
||||||
$wikiLine=str_replace($yuchuli,$chulihou,$wikiLines);
|
|
||||||
if(substr($wikiLine,0,2)=='a:') {
|
|
||||||
if(strpos($wikiLine,'==')!== false){
|
|
||||||
$wikititle=mb_strstr($wikiLine,'==',false);
|
|
||||||
$this->wikitransform($wikititle,$content);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
$this->wikitransform($wikiLine,$content);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*$wikicontent=unserialize(file_get_contents($filePath));
|
|
||||||
$wiki_keys=array_keys($wikicontent['query']['pages']);
|
|
||||||
$content= $wikicontent['query']['pages'][$wiki_keys[0]];
|
|
||||||
$this->view->title=$content['title'];
|
|
||||||
$c1=explode('\n',$content['revisions'][0]['*']);
|
|
||||||
foreach ($c1 as $c2) $this->wikitransform($c2,$tcontent);*/
|
|
||||||
$this->view->content=$content;
|
|
||||||
$this->view->config = Zend_Registry::get('config');
|
|
||||||
}
|
|
||||||
|
|
||||||
//transform mediawiki text to local text
|
|
||||||
function wikitransform($text,&$result) {
|
|
||||||
if(strpos($text,'=====')!== false&&substr($text,0,1)=='=') {
|
|
||||||
$wikiFont=str_replace('=====','',$text);
|
|
||||||
$result.="<h5>$wikiFont</h5>";
|
|
||||||
}elseif(strpos($text,'====')!== false&&substr($text,0,1)=='=') {
|
|
||||||
$wikiFont=str_replace('====','',$text);
|
|
||||||
$result.="<h4>$wikiFont</h4>";
|
|
||||||
}elseif(strpos($text,'===')!== false&&substr($text,0,1)=='=') {
|
|
||||||
$wikiFont=str_replace('===','',$text);
|
|
||||||
$result.="<h3>$wikiFont</h3>";
|
|
||||||
}elseif(strpos($text,'==')!== false&&substr($text,0,1)=='=') {
|
|
||||||
$wikiFont=str_replace('==','',$text);
|
|
||||||
$result.="<h2>$wikiFont</h2>";
|
|
||||||
}elseif(strpos($text,'[[image:')!== false||strpos($text,'[[Image:')!== false) {
|
|
||||||
$wimag=array('[[image:',']]','[[Image:','<center>','</center>');
|
|
||||||
$imag=str_replace($wimag,'',$text);
|
|
||||||
$imag=str_replace(' ','_',$imag);
|
|
||||||
$fname="http://wiki.westgis.ac.cn/api.php?format=php&action=query&prop=imageinfo&titles=image:".$imag."&iiprop=url";
|
|
||||||
$image1=unserialize(file_get_contents($fname));
|
|
||||||
$image1_keys=array_keys($image1['query']['pages']);
|
|
||||||
$image2=$image1['query']['pages'][$image1_keys[count($image1_keys)-1]];
|
|
||||||
$imagurl=@$image2['imageinfo'][0]['url'];
|
|
||||||
$result.="<img src=$imagurl>";
|
|
||||||
//$result.=print_r($image1);
|
|
||||||
}elseif(substr($text,0,3)=='·[['||substr($text,0,4)=='· [['||substr($text,0,2)=='[[') {
|
|
||||||
$wikia=array('·[[','· [[','[[',']]');
|
|
||||||
$wikiname=str_replace($wikia,'',$text);
|
|
||||||
$result.='<p><a href="/data/wiki/'.urlencode($wikiname).'">'.$wikiname.'</a></p>';
|
|
||||||
}elseif(strpos($text,'[[')!== false) {
|
|
||||||
$a=array('[[',']]');
|
|
||||||
$b=array('<b>','</b>');
|
|
||||||
$test=str_replace($a,$b,$text);
|
|
||||||
preg_match_all("|<[^>]+>(.*)</[^>]+>|U",$test,$out,PREG_PATTERN_ORDER);
|
|
||||||
$name=$out[1][0];//还有问题,测试遇到再解决!
|
|
||||||
$alink='<a href="/data/wiki/'.urlencode($name).'">';
|
|
||||||
$c=array($alink,'</a>');
|
|
||||||
$result.='<p>'.str_replace($a,$c,$text).'</p>';
|
|
||||||
}elseif(strpos($text,'[http://')!== false||strpos($text,'[ http://')!== false){
|
|
||||||
$a=array('[',']');
|
|
||||||
$b=array('<b>','</b>');
|
|
||||||
$test=str_replace($a,$b,$text);
|
|
||||||
preg_match_all("|<[^>]+>(.*)</[^>]+>|U",$test,$out,PREG_PATTERN_ORDER);
|
|
||||||
$name=$out[1][0];//还有问题,测试遇到再解决!
|
|
||||||
$href='<a href="'.mb_strstr($name,' ',true).'">';
|
|
||||||
$value=mb_strstr($name,' ',false).'</a>';
|
|
||||||
$result.=str_replace($name,$href.$value,$test);
|
|
||||||
}elseif(strpos($text,'{|')!== false) {
|
|
||||||
$wikitable=str_replace("{|",'<table ',$text);
|
|
||||||
$result.=$wikitable.'>';
|
|
||||||
}elseif(strpos($text,'colspan')) {
|
|
||||||
if(substr($text,-2)=='| '||substr($text,-2)==' |') {
|
|
||||||
$wikicolspan=array(' |','| ');
|
|
||||||
$colspan=array('></td>','<td ');
|
|
||||||
$result.= str_replace($wikicolspan,$colspan,$text);
|
|
||||||
}else {
|
|
||||||
$wikicolspan=array(' | ','| ');
|
|
||||||
$colspan=array('>','<td ');
|
|
||||||
$result.= str_replace($wikicolspan,$colspan,$text).'</td>';
|
|
||||||
}
|
|
||||||
}elseif(strpos($text,'|+ ')!== false) {
|
|
||||||
$wikitr=str_replace('|+ ','<caption>',$text);
|
|
||||||
$result.= $wikitr.'</caption><tbody>';
|
|
||||||
}elseif(strpos($text,'!!')!== false||substr($text,0,1)=='!') {
|
|
||||||
$thh=str_replace("!!",'</th><th>',$text);
|
|
||||||
$wikith=str_replace('!','<th>',$thh);
|
|
||||||
$result.= $wikith.'</th>';
|
|
||||||
}elseif(strpos($text,'||')!== false||substr($text,0,1)=='|'&&substr($text,0,2)!=='||'&&substr($text,0,2)!=='|+'&&substr($text,0,2)!=='|-'&&substr($text,0,2)!=='|}') {
|
|
||||||
$tdd=str_replace('||','</td><td>',$text);
|
|
||||||
$wikitd=str_replace('|','<td>',$tdd);
|
|
||||||
$result.= $wikitd.'</td>';
|
|
||||||
}elseif(substr($text,0,2)=='|-') {
|
|
||||||
$wikitrr=str_replace('|-','</tr><tr>',$text);
|
|
||||||
$result.=$wikitrr;
|
|
||||||
}elseif(substr($text,0,2)=='|}') {
|
|
||||||
$wikitables=str_replace("|}",'</tr></tbody></table>',$text);
|
|
||||||
$result.= $wikitables;
|
|
||||||
}elseif(substr($text,0,1)=='#') {
|
|
||||||
$result.= str_replace('#',' ',$text);
|
|
||||||
}elseif(strpos($text,"'''")!==false) {
|
|
||||||
$result.= str_replace("'''",'',$text);
|
|
||||||
}elseif(substr($text,0,1)=="*") {
|
|
||||||
$result.= str_replace('*','',$text);
|
|
||||||
}else {
|
|
||||||
$result.= "<p>$text</p>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
class NetkitesController extends Zend_Controller_Action
|
|
||||||
{
|
|
||||||
function indexAction()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
function postDispatch()
|
|
||||||
{
|
|
||||||
$this->view->config = Zend_Registry::get('config');
|
|
||||||
}
|
|
||||||
function faqAction()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
function useAction()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
function resourceAction()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
function applyAction()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
function driverAction()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,165 @@
|
||||||
|
<?php
|
||||||
|
use \Helpers\View as view;
|
||||||
|
use \Open\App;
|
||||||
|
use \Open\Open;
|
||||||
|
use \Open\OAuth2\Server;
|
||||||
|
|
||||||
|
class OpenController extends \Zend_Controller_Action
|
||||||
|
{
|
||||||
|
private $config = NULL;
|
||||||
|
private $db = NULL;
|
||||||
|
private $open = NULL;
|
||||||
|
|
||||||
|
function preDispatch()
|
||||||
|
{
|
||||||
|
$this->view->config = $this->config = \Zend_Registry::get('config');
|
||||||
|
$this->db = \Zend_Registry::get('db');
|
||||||
|
$this->view->theme = new Theme();
|
||||||
|
$this->_helper->layout->setLayout('layout-open');
|
||||||
|
}
|
||||||
|
|
||||||
|
function indexAction()
|
||||||
|
{
|
||||||
|
$this->view->pageID = "open-index";
|
||||||
|
}
|
||||||
|
|
||||||
|
//我的应用
|
||||||
|
function myappAction()
|
||||||
|
{
|
||||||
|
$this->view->pageID = "open-myapp";
|
||||||
|
|
||||||
|
$app = new App();
|
||||||
|
|
||||||
|
$user_state = $app->checkinfo();
|
||||||
|
if( $user_state !== true)
|
||||||
|
{
|
||||||
|
view::post($this,$user_state,"/account/edit");
|
||||||
|
}
|
||||||
|
|
||||||
|
$ac = $this->_getParam('ac');
|
||||||
|
$id = $this->_getParam('id');
|
||||||
|
$submit = $this->_getParam('submit');
|
||||||
|
|
||||||
|
if(empty($ac))
|
||||||
|
{
|
||||||
|
$this->view->myapp = $app->getUserApp();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($ac == "create")
|
||||||
|
{
|
||||||
|
$this->_helper->viewRenderer('myapp-create');
|
||||||
|
|
||||||
|
$this->view->appStatus = $app->appStatus();
|
||||||
|
|
||||||
|
if(!empty($id))
|
||||||
|
{
|
||||||
|
$this->view->info = $app->getAppInfo($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($submit))
|
||||||
|
{
|
||||||
|
if(empty($id))
|
||||||
|
{
|
||||||
|
$status = $app->appCreate();
|
||||||
|
}else{
|
||||||
|
$this->view->info = $app->getAppCreateParam();
|
||||||
|
$status = $app->appCreate($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($status !== true && !is_numeric($status))
|
||||||
|
{
|
||||||
|
$this->view->error = view::Error($status);
|
||||||
|
}else{
|
||||||
|
if(!empty($id))
|
||||||
|
view::Post($this,"修改成功!",'/open/myapp/ac/view/id/'.$id);
|
||||||
|
else
|
||||||
|
view::Post($this,"添加成功!","/open/myapp/ac/view/id/".$status);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($ac == "delete")
|
||||||
|
{
|
||||||
|
$status = $app->delete($id);
|
||||||
|
if($status !== true)
|
||||||
|
{
|
||||||
|
view::Post($this,$status,"/open/myapp");
|
||||||
|
}else{
|
||||||
|
view::Post($this,'删除成功',"/open/myapp");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($ac == "view")
|
||||||
|
{
|
||||||
|
$this->_helper->viewRenderer('myapp-view');
|
||||||
|
$this->view->data = $app->getAppInfo($id);
|
||||||
|
$this->view->appStatus = $app->appStatus();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function authenticateAction()
|
||||||
|
{
|
||||||
|
$this->_helper->layout->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'client_id' => $this->_getParam('client_id'),
|
||||||
|
'redirect_uri' => $this->_getParam('redirect_uri'),
|
||||||
|
'client_secret' => $this->_getParam('client_secret'),
|
||||||
|
'host' => $_SERVER['HTTP_HOST'],
|
||||||
|
'ip' => $_SERVER['REMOTE_ADDR']
|
||||||
|
);
|
||||||
|
|
||||||
|
$server = new Server();
|
||||||
|
|
||||||
|
$status = $server->clientCredentials($data['client_id'],$data['client_secret']);
|
||||||
|
|
||||||
|
if($status !== true)
|
||||||
|
{
|
||||||
|
echo $status;
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function authorizeAction()
|
||||||
|
{
|
||||||
|
$submit = $this->_getParam('submit');
|
||||||
|
|
||||||
|
if(empty($submit))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sv = new open\server();
|
||||||
|
$server = $sv->bootstrap();
|
||||||
|
|
||||||
|
$request = OAuth2\Request::createFromGlobals();
|
||||||
|
$response = new OAuth2\Response();
|
||||||
|
|
||||||
|
// validate the authorize request
|
||||||
|
if (!$server->validateAuthorizeRequest($request, $response)) {
|
||||||
|
$response->send();
|
||||||
|
die;
|
||||||
|
}
|
||||||
|
|
||||||
|
// print the authorization code if the user has authorized your client
|
||||||
|
$is_authorized = ($_POST['authorized'] === 'yes');
|
||||||
|
$server->handleAuthorizeRequest($request, $response, $is_authorized);
|
||||||
|
if ($is_authorized) {
|
||||||
|
// this is only here so that you get to see your code in the cURL request. Otherwise, we'd redirect back to the client
|
||||||
|
$code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=')+5, 40);
|
||||||
|
exit("SUCCESS! Authorization Code: $code");
|
||||||
|
}
|
||||||
|
$response->send();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -123,15 +123,72 @@ class ReviewController extends Zend_Controller_Action
|
||||||
* mdstatus 中 status 字段值为 2,3,4 的元数据为正在进行评审的元数据
|
* mdstatus 中 status 字段值为 2,3,4 的元数据为正在进行评审的元数据
|
||||||
*/
|
*/
|
||||||
function inreviewAction(){
|
function inreviewAction(){
|
||||||
$this->view->pageID = "review-inreview";
|
|
||||||
$page=@(int)$this->_request->getParam('page');
|
include_once("helper/view.php");
|
||||||
if (empty($page)) $page=1;
|
$ac = $this->_getParam('ac');
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$row=$this->db->fetchAll("select count(s.*) from mdstatus s right join normalmetadata m on s.uuid=m.uuid where s.status in (2,3,4)");
|
if(empty($ac))
|
||||||
$sum=$row[0]['count'];
|
{
|
||||||
$sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename from mdstatus s right join normalmetadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (2,3,4) order by s.ts_created desc,m.title limit ? offset ?";
|
$this->view->pageID = "review-inreview";
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
$page=@(int)$this->_request->getParam('page');
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
if (empty($page)) $page=1;
|
||||||
|
$offset=$this->limit*($page-1);
|
||||||
|
$row=$this->db->fetchAll("select count(s.*) from mdstatus s right join normalmetadata m on s.uuid=m.uuid where s.status in (2,3,4)");
|
||||||
|
$sum=$row[0]['count'];
|
||||||
|
$sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename from mdstatus s right join normalmetadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (2,3,4) order by s.ts_created desc,m.title limit ? offset ?";
|
||||||
|
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
||||||
|
$this->view->page = new Pagination($sum,$page,$this->limit);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($ac == "require")
|
||||||
|
{
|
||||||
|
$this->_helper->viewRenderer('inreview-require');
|
||||||
|
$this->view->pageID = "review-inreview-require";
|
||||||
|
$uid = view::User('id');
|
||||||
|
|
||||||
|
if(empty($uid))
|
||||||
|
{
|
||||||
|
view::Post($this,"请先登录","/account/login/?href=".urlencode("/review/inreview/ac/require"));
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created,r.id as rid,e.id as eid
|
||||||
|
from mdstatus s
|
||||||
|
right join normalmetadata m on s.uuid=m.uuid
|
||||||
|
left join geonetworkmetadata g on g.uuid=m.uuid
|
||||||
|
left join thumbnail t on t.id=m.id
|
||||||
|
left join mdreview r ON m.uuid=r.uuid
|
||||||
|
left join mdexpertreview e ON e.uuid=m.uuid
|
||||||
|
WHERE s.status in (2,3,4) AND r.id IS NULL
|
||||||
|
GROUP BY m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id,t.filename,s.ts_created,r.ts_created,r.id,e.id
|
||||||
|
order by e.id DESC,s.ts_created desc,m.title";
|
||||||
|
$rs = $this->db->query($sql);
|
||||||
|
view::addPaginator($rs->fetchAll(),$this,NULL,$this->limit);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($ac == "reviewed")
|
||||||
|
{
|
||||||
|
$this->_helper->viewRenderer('inreview-reviewed');
|
||||||
|
$this->view->pageID = "review-inreview-reviewed";
|
||||||
|
$uid = view::User('id');
|
||||||
|
|
||||||
|
if(empty($uid))
|
||||||
|
{
|
||||||
|
view::Post($this,"请先登录","/account/login/?href=".urlencode("/review/inreview/ac/reviewed"));
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created
|
||||||
|
from mdstatus s
|
||||||
|
right join normalmetadata m on s.uuid=m.uuid
|
||||||
|
left join geonetworkmetadata g on g.uuid=m.uuid
|
||||||
|
left join thumbnail t on t.id=m.id
|
||||||
|
left join mdreview r ON m.uuid=r.uuid
|
||||||
|
WHERE s.status in (2,3,4) AND r.userid=$uid
|
||||||
|
GROUP BY m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id,t.filename,s.ts_created,r.ts_created
|
||||||
|
order by s.ts_created desc,m.title";
|
||||||
|
$rs = $this->db->query($sql);
|
||||||
|
view::addPaginator($rs->fetchAll(),$this,NULL,$this->limit);
|
||||||
|
}
|
||||||
|
|
||||||
}//在审阶段的元数据
|
}//在审阶段的元数据
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
use Helpers\View;
|
||||||
|
use Helpers\dbh;
|
||||||
|
use Files\Files;
|
||||||
|
use Files\Output;
|
||||||
|
use Files\Listener\FileListener;
|
||||||
|
|
||||||
class ServiceController extends Zend_Controller_Action
|
class ServiceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
private $limit=10;
|
private $limit=10;
|
||||||
|
@ -12,6 +18,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$this->db=Zend_Registry::get('db');
|
$this->db=Zend_Registry::get('db');
|
||||||
$this->view->config = $this->config = Zend_Registry::get('config');
|
$this->view->config = $this->config = Zend_Registry::get('config');
|
||||||
|
$this->submd = $this->view->config->sub->metadata;
|
||||||
//$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
//$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||||
//$this->view->messages = $this->messenger->getMessages();
|
//$this->view->messages = $this->messenger->getMessages();
|
||||||
}
|
}
|
||||||
|
@ -183,16 +190,16 @@ class ServiceController extends Zend_Controller_Action
|
||||||
function feedAction()
|
function feedAction()
|
||||||
{
|
{
|
||||||
$feedArray = array(
|
$feedArray = array(
|
||||||
'title' => '中国西部环境与生态科学数据中心',
|
'title' => '三江源生态监测综合服务平台',
|
||||||
'link' => 'http://'.$_SERVER['SERVER_NAME'].'/data/feed',
|
'link' => 'http://'.$_SERVER['SERVER_NAME'].'/service/feed',
|
||||||
'description' => '共享西部计划产生的数据',
|
'description' => '管理、共享三江源生态监测数据',
|
||||||
'language' => 'zh-CN',
|
'language' => 'zh-CN',
|
||||||
'charset' => 'utf-8',
|
'charset' => 'utf-8',
|
||||||
'published' => time(),
|
'published' => time(),
|
||||||
//'generator' => 'Zend Framework Zend_Feed',
|
//'generator' => 'Zend Framework Zend_Feed',
|
||||||
'entries' => array()
|
'entries' => array()
|
||||||
);
|
);
|
||||||
$sql="select * from normalmetadata order by ts_created desc";
|
$sql="select * from $this->submd order by ts_created desc";
|
||||||
$rs=$this->db->fetchAll($sql);
|
$rs=$this->db->fetchAll($sql);
|
||||||
$feedArray['published']=strtotime($rs[0]['ts_created']);
|
$feedArray['published']=strtotime($rs[0]['ts_created']);
|
||||||
foreach($rs as $r)
|
foreach($rs as $r)
|
||||||
|
@ -308,11 +315,8 @@ class ServiceController extends Zend_Controller_Action
|
||||||
$citation=$row['mcitation'];
|
$citation=$row['mcitation'];
|
||||||
} else if ($row['citation'])
|
} else if ($row['citation'])
|
||||||
{
|
{
|
||||||
if (empty($row['datadoi']))
|
$citation=$row['citation'];
|
||||||
{
|
if (!empty($row['datadoi']) && !strpos($row['citation'],$row['datadoi']))
|
||||||
$citation=$row['citation'];
|
|
||||||
}
|
|
||||||
elseif (!strpos($row['citation'],$row['datadoi']))
|
|
||||||
{
|
{
|
||||||
$citation='<li>文章引用:'.$row['citation'].'</li>';
|
$citation='<li>文章引用:'.$row['citation'].'</li>';
|
||||||
$citation.="<li>数据的引用:";
|
$citation.="<li>数据的引用:";
|
||||||
|
@ -331,7 +335,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$fund.='<li>'.$refer['fund_type'].':'.str_replace(array("\r\n", "\n", "\r"),'',$refer['title']).'(编号:'.$refer['fund_id'].")</li>";
|
$fund.='<li>'.$refer['fund_type'].':'.str_replace(array("\r\n", "\n", "\r"),'',$refer['title']).'(编号:'.$refer['fund_id'].")</li>";
|
||||||
}
|
}
|
||||||
if (empty($fund)) $fund=$row['suppinfo'];
|
if (empty($fund) && !empty($row['suppinfo'])) $fund=$row['suppinfo'];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,7 +357,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
$xslt->setParameter('','projection',$projection);
|
$xslt->setParameter('','projection',$projection);
|
||||||
$xslt->setParameter('','reference',$reference);
|
$xslt->setParameter('','reference',$reference);
|
||||||
$xslt->setParameter('','citation',$citation);
|
$xslt->setParameter('','citation',$citation);
|
||||||
$xslt->setParameter('','fund',$fund);
|
if ($fund) $xslt->setParameter('','fund',$fund);
|
||||||
$XSL = new DOMDocument();
|
$XSL = new DOMDocument();
|
||||||
$XSL->load( '../data/doc.xsl', LIBXML_NOCDATA);
|
$XSL->load( '../data/doc.xsl', LIBXML_NOCDATA);
|
||||||
$xslt->importStylesheet($XSL);
|
$xslt->importStylesheet($XSL);
|
||||||
|
@ -537,7 +541,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
$pdf->metadata=$row;
|
$pdf->metadata=$row;
|
||||||
$pdf->Draw();
|
$pdf->Draw();
|
||||||
$pdf->setTitle($row['title'],true);
|
$pdf->setTitle($row['title'],true);
|
||||||
$pdf->setAuthor('寒区旱区科学数据中心',true);
|
$pdf->setAuthor('三江源生态监测综合服务平台',true);
|
||||||
$this->getResponse()->setHeader('Content-Type', 'application/pdf');
|
$this->getResponse()->setHeader('Content-Type', 'application/pdf');
|
||||||
//->setHeader('Content-Disposition','inline; filename="'.$row['title'].'.pdf"');
|
//->setHeader('Content-Disposition','inline; filename="'.$row['title'].'.pdf"');
|
||||||
$pdf->Output($row['title'].'.pdf','I');
|
$pdf->Output($row['title'].'.pdf','I');
|
||||||
|
@ -716,11 +720,8 @@ class ServiceController extends Zend_Controller_Action
|
||||||
$cit=$row['mcitation'];
|
$cit=$row['mcitation'];
|
||||||
} else if ($row['citation'])
|
} else if ($row['citation'])
|
||||||
{
|
{
|
||||||
if (empty($row['datadoi']))
|
$cit=$row['citation'];
|
||||||
{
|
if (!empty($row['datadoi']) && !strpos($row['citation'],$row['datadoi']))
|
||||||
$cit=$row['citation'];
|
|
||||||
}
|
|
||||||
elseif (!strpos($row['citation'],$row['datadoi']))
|
|
||||||
{
|
{
|
||||||
$cit='文章引用:'.$row['citation'];
|
$cit='文章引用:'.$row['citation'];
|
||||||
$cit.="\r\n数据的引用:";
|
$cit.="\r\n数据的引用:";
|
||||||
|
@ -729,8 +730,8 @@ class ServiceController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@$odf->setVars('citation',$cit,true,'utf-8');
|
@$odf->setVars('citation',$cit,true,'utf-8');
|
||||||
@$odf->setVars('reference',$row['reference'],true,'utf-8');
|
//@$odf->setVars('reference',$row['reference'],true,'utf-8');
|
||||||
@$odf->setVars('doi',$row['doi'],true,'utf-8');
|
//@$odf->setVars('doi',$row['doi'],true,'utf-8');
|
||||||
|
|
||||||
@$odf->setVars('north',$row['north'],true,'utf-8');
|
@$odf->setVars('north',$row['north'],true,'utf-8');
|
||||||
@$odf->setVars('south',$row['south'],true,'utf-8');
|
@$odf->setVars('south',$row['south'],true,'utf-8');
|
||||||
|
@ -738,18 +739,18 @@ class ServiceController extends Zend_Controller_Action
|
||||||
@$odf->setVars('east',$row['east'],true,'utf-8');
|
@$odf->setVars('east',$row['east'],true,'utf-8');
|
||||||
if (!$ac=='simple')
|
if (!$ac=='simple')
|
||||||
{
|
{
|
||||||
@$odf->setImage('bigthumb', 'http://westdc.westgis.ac.cn/service/bigthumb/uuid/'.$row['uuid']);
|
@$odf->setImage('bigthumb', 'http://'.$_SERVER['SERVER_NAME'].'/service/bigthumb/uuid/'.$row['uuid']);
|
||||||
@$odf->setImage('thumb', 'http://westdc.westgis.ac.cn/service/thumb/uuid/'.$row['uuid']);
|
@$odf->setImage('thumb', 'http://'.$_SERVER['SERVER_NAME'].'/service/thumb/uuid/'.$row['uuid']);
|
||||||
@$odf->setVars('projection',$row['projection'],true,'utf-8');
|
@$odf->setVars('projection',$row['projection'],true,'utf-8');
|
||||||
@$odf->setVars('resolution',$row['resolution'],true,'utf-8');
|
@$odf->setVars('resolution',$row['resolution'],true,'utf-8');
|
||||||
@$odf->setVars('rfdenom',$row['rfdenom'],true,'utf-8');
|
@$odf->setVars('rfdenom',$row['rfdenom'],true,'utf-8');
|
||||||
@$odf->setVars('stratum_keyword',$row['keyword']['stratum'],true,'utf-8');
|
@$odf->setVars('stratum_keyword',$row['keyword']['stratum'],true,'utf-8');
|
||||||
@$odf->setVars('uselimits',$row['uselimits'],true,'utf-8');
|
@$odf->setVars('uselimits',$row['uselimits'],true,'utf-8');
|
||||||
@$odf->setVars('resources',$row['resources'],true,'utf-8');
|
@$odf->setVars('resources',$row['resources'],true,'utf-8');
|
||||||
@$odf->setVars('suppinfo',$row['suppinfo'],true,'utf-8');
|
//@$odf->setVars('suppinfo',$row['suppinfo'],true,'utf-8');
|
||||||
@$odf->setVars('contacts',$row['contacts'],true,'utf-8');
|
@$odf->setVars('contacts',$row['contacts'],true,'utf-8');
|
||||||
} else {
|
} else {
|
||||||
@$odf->setImage('qrcode', 'http://westdc.westgis.ac.cn/service/qrcode/uuid/'.$row['uuid']);
|
@$odf->setImage('qrcode', 'http://'.$_SERVER['SERVER_NAME'].'/service/qrcode/uuid/'.$row['uuid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$odf->exportAsAttachedFile($row['title'].'.odt');
|
$odf->exportAsAttachedFile($row['title'].'.odt');
|
||||||
|
@ -1399,7 +1400,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
|
|
||||||
$pageSize = 10;//每页容量
|
$pageSize = 10;//每页容量
|
||||||
|
|
||||||
$sql = "select md.title,md.uuid from mdref mr
|
$sql = "select distinct md.title,md.uuid from mdref mr
|
||||||
right join normalmetadata md on md.uuid=mr.uuid
|
right join normalmetadata md on md.uuid=mr.uuid
|
||||||
where mr.refid=$id";
|
where mr.refid=$id";
|
||||||
$pagnation="";
|
$pagnation="";
|
||||||
|
@ -1448,6 +1449,24 @@ class ServiceController extends Zend_Controller_Action
|
||||||
echo $pagnation;
|
echo $pagnation;
|
||||||
}//文档页面相关数据
|
}//文档页面相关数据
|
||||||
|
|
||||||
|
function refdatacountAction()
|
||||||
|
{
|
||||||
|
if(view::isXmlHttpRequest($this))
|
||||||
|
{
|
||||||
|
$id = (int)$this->_getParam('id');
|
||||||
|
if($id < 1){
|
||||||
|
echo 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$sql = "select count(distinct md.id) as total from mdref mr
|
||||||
|
right join normalmetadata md on md.uuid=mr.uuid
|
||||||
|
where mr.refid=$id";
|
||||||
|
$rs = $this->db->query($sql);
|
||||||
|
$row = $rs->fetch();
|
||||||
|
echo $row['total'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function tagdatalistAction(){
|
function tagdatalistAction(){
|
||||||
|
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
|
@ -1550,6 +1569,56 @@ class ServiceController extends Zend_Controller_Action
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//上传申请表
|
||||||
|
function uploadapplicationformAction()
|
||||||
|
{
|
||||||
|
$this->_helper->layout->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
|
$id = $this->_getParam('offlineappid');
|
||||||
|
|
||||||
|
if(empty($id))
|
||||||
|
{
|
||||||
|
$this->jsonexit(array('error'=>"参数错误"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$uid = view::User('id');
|
||||||
|
if(!is_numeric($uid))
|
||||||
|
{
|
||||||
|
$this->jsonexit(array('error'=>"用户信息读取失败,请重试"));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$files = new Files();
|
||||||
|
$FileListener = new FileListener();
|
||||||
|
@$files->events()->attachAggregate($FileListener);
|
||||||
|
|
||||||
|
$statu = $files->uploadApplicationForm($_FILES['Filedata'],$id);
|
||||||
|
|
||||||
|
if(isset($statu['error']))
|
||||||
|
{
|
||||||
|
$this->jsonexit($statu);
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
$sql = "UPDATE offlineapp SET applicationform='{$statu['file']}' WHERE id=$id AND userid=$uid";
|
||||||
|
if($this->db->exec($sql))
|
||||||
|
{
|
||||||
|
$this->jsonexit(array("success"=>1));
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
$this->jsonexit(array('error'=>"申请表上传失败".$sql));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//下载申请表
|
||||||
|
public function downloadapplicationformAction()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
输出验证码
|
输出验证码
|
||||||
*/
|
*/
|
||||||
|
@ -1593,6 +1662,8 @@ class ServiceController extends Zend_Controller_Action
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
$uuid=$this->_request->getParam('uuid');
|
$uuid=$this->_request->getParam('uuid');
|
||||||
|
//文献id
|
||||||
|
$id=(int)$this->_request->getParam('id');
|
||||||
$lang=$this->_request->getParam('lang');
|
$lang=$this->_request->getParam('lang');
|
||||||
$ris='';
|
$ris='';
|
||||||
if ($lang=='cn' && !empty($uuid))
|
if ($lang=='cn' && !empty($uuid))
|
||||||
|
@ -1634,6 +1705,10 @@ class ServiceController extends Zend_Controller_Action
|
||||||
$ris.='M3 - doi:'.$row['doi']."\r\n";
|
$ris.='M3 - doi:'.$row['doi']."\r\n";
|
||||||
$ris.='DO - doi:'.$row['doi']."\r\n";
|
$ris.='DO - doi:'.$row['doi']."\r\n";
|
||||||
$ris.='ER -'."\r\n";
|
$ris.='ER -'."\r\n";
|
||||||
|
} else if ($id) {
|
||||||
|
$sql="select ris from reference where id=$id";
|
||||||
|
$row=$this->db->fetchRow($sql);
|
||||||
|
$ris=$row['ris'];
|
||||||
}
|
}
|
||||||
if (!empty($ris))
|
if (!empty($ris))
|
||||||
{
|
{
|
||||||
|
@ -1719,7 +1794,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
$uuid = $this->getRequest()->getParam('uuid');
|
$uuid = $this->getRequest()->getParam('uuid');
|
||||||
$code_params = array('text' => 'http://westdc.westgis.ac.cn/data/'.$uuid,
|
$code_params = array('text' => 'http://'.$_SERVER['SERVER_NAME'].'/data/'.$uuid,
|
||||||
'backgroundColor' => '#FFFFFF',
|
'backgroundColor' => '#FFFFFF',
|
||||||
'foreColor' => '#000000',
|
'foreColor' => '#000000',
|
||||||
'padding' => 4, //array(10,5,10,5),
|
'padding' => 4, //array(10,5,10,5),
|
||||||
|
@ -1728,4 +1803,101 @@ class ServiceController extends Zend_Controller_Action
|
||||||
Zend_Matrixcode::render('qrcode', $code_params, 'image', $renderer_params);
|
Zend_Matrixcode::render('qrcode', $code_params, 'image', $renderer_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function jsonexit($data){
|
||||||
|
$this->getResponse()->setHeader('Content-Type', 'application/json')->appendBody(json_encode($data,JSON_NUMERIC_CHECK));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function dciAction()
|
||||||
|
{
|
||||||
|
$this->_helper->layout->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
//must have doi to output dci
|
||||||
|
$uuid=$this->_request->getParam('uuid');
|
||||||
|
|
||||||
|
$xml='<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<DigitalContentData>
|
||||||
|
<DataRecord>
|
||||||
|
<Header>
|
||||||
|
<DateProvided>'.date("Y-m-d").'</DateProvided>
|
||||||
|
<RepositoryName>Cold and Arid Regions Science Data Center at Lanzhou</RepositoryName>
|
||||||
|
<Owner>CARD-WDS</Owner>
|
||||||
|
<RecordIdentifier>'.$uuid.'</RecordIdentifier>
|
||||||
|
</Header>
|
||||||
|
<BibliographicData>
|
||||||
|
<AuthorList>';
|
||||||
|
|
||||||
|
$sql="select d.title_en,d.doi,author_en,d.ts_published,m.description,m.timebegin,m.timeend
|
||||||
|
from datadoi d left join en.normalmetadata m on d.uuid=m.uuid where d.uuid=".$this->db->quote($uuid);
|
||||||
|
$row=$this->db->fetchRow($sql);
|
||||||
|
$authors=explode(',',str_replace('"','',substr($row['author_en'],1,-1)));
|
||||||
|
$i=0;
|
||||||
|
foreach($authors as $a)
|
||||||
|
{
|
||||||
|
$i=$i+1;
|
||||||
|
$xml.='<Author seq="'.$i.'" AuthorRole="Author">';
|
||||||
|
$xml.='<AuthorName>'.$a.'</AuthorName></Author>';
|
||||||
|
}
|
||||||
|
$xml.='
|
||||||
|
</AuthorList>
|
||||||
|
<TitleList>
|
||||||
|
<ItemTitle TitleType="English title"><![CDATA['.$row['title_en'].']]></ItemTitle>
|
||||||
|
</TitleList>
|
||||||
|
<Source>
|
||||||
|
<SourceURL>http://card.westgis.ac.cn/data/'.$uuid.'</SourceURL>
|
||||||
|
<SourceRepository AbbreviatedRepository="CARD">CARD</SourceRepository>
|
||||||
|
<PublicationYear>'.date('Y',strtotime($row['ts_published'])).'</PublicationYear>
|
||||||
|
</Source>
|
||||||
|
<LanguageList>
|
||||||
|
<Language>English</Language>
|
||||||
|
</LanguageList>
|
||||||
|
</BibliographicData>';
|
||||||
|
$xml.='<Abstract><![CDATA['.$row['description'].']]></Abstract>';
|
||||||
|
$xml.='<DescriptorsData>';
|
||||||
|
$sql="select k.keyword from en.keyword k left join en.normalmetadata m on k.id=m.id where k.keytype='theme' and m.uuid=".$this->db->quote($uuid);
|
||||||
|
$rowk=$this->db->fetchAll($sql);
|
||||||
|
$xml.='<KeywordsList>';
|
||||||
|
foreach ($rowk as $k)
|
||||||
|
{
|
||||||
|
$xml.='<Keyword><![CDATA['.$k['keyword'].']]></Keyword>';
|
||||||
|
}
|
||||||
|
$xml.='
|
||||||
|
</KeywordsList>';
|
||||||
|
if ($row['timebegin'])
|
||||||
|
{
|
||||||
|
$xml.='<TimeperiodList>
|
||||||
|
<TimePeriod TimeSpan="Start">'.date('Y-m-d',strtotime($row['timebegin'])).'</TimePeriod>';
|
||||||
|
if ($row['timeend'] && (date('Y-m-d',strtotime($row['timebegin']))!=date('Y-m-d',strtotime($row['timeend'])))) $xml.='
|
||||||
|
<TimePeriod TimeSpan="End">'.$row['timeend'].'</TimePeriod>';
|
||||||
|
$xml.='</TimeperiodList>';
|
||||||
|
}
|
||||||
|
$xml.='</DescriptorsData>';
|
||||||
|
$sql="select f.* from fund f left join mdfund mf on f.id=mf.fid where mf.uuid=".$this->db->quote($uuid).' order by mf.place asc';
|
||||||
|
$rowf=$this->db->fetchAll($sql);
|
||||||
|
$xml.='<FundingInfo>';
|
||||||
|
foreach ($rowf as $f)
|
||||||
|
{
|
||||||
|
$xml.='
|
||||||
|
<FundingInfoList>
|
||||||
|
<FundingStatement><GrantNumber>'.$f['fund_id'].'</GrantNumber><FundingOrganization>'.$f['fund_type_en'].'</FundingOrganization></FundingStatement>
|
||||||
|
</FundingInfoList>';
|
||||||
|
}
|
||||||
|
$xml.='</FundingInfo>';
|
||||||
|
$sql="select r.* from reference r left join mdref mr on r.id=mr.refid where mr.reftype=1 and r.language<>'zh' and mr.uuid=".$this->db->quote($uuid).' order by mr.place asc';
|
||||||
|
$rowc=$this->db->fetchAll($sql);
|
||||||
|
$xml.='<CitationList>';
|
||||||
|
foreach ($rowc as $c)
|
||||||
|
{
|
||||||
|
$xml.='<Citation CitationType="Citing" CitationSeq="1">
|
||||||
|
<CitationString>'.$c['reference'].'</CitationString>';
|
||||||
|
if ($c['doi'])
|
||||||
|
$xml.='<CitationDOI>'.$c['doi'].'</CitationDOI>';
|
||||||
|
$xml.='</Citation>';
|
||||||
|
}
|
||||||
|
$xml.='</CitationList>
|
||||||
|
</DataRecord>
|
||||||
|
</DigitalContentData>';
|
||||||
|
$this->getResponse()->setHeader('Content-Type', 'text/xml')
|
||||||
|
->setBody($xml);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
<?php
|
||||||
|
use Westdc\Visual;
|
||||||
|
use Westdc\Metadata;
|
||||||
|
use Helpers\View as view;
|
||||||
|
|
||||||
|
class VisualController extends Zend_Controller_Action
|
||||||
|
{
|
||||||
|
|
||||||
|
function preDispatch()
|
||||||
|
{
|
||||||
|
$this->view->config = Zend_Registry::get('config');
|
||||||
|
$this->db=Zend_Registry::get('db');
|
||||||
|
$this->view->nav = array(
|
||||||
|
array('link'=>'/','title'=>'<i class="icon-home"></i>'),
|
||||||
|
array('link'=>'/data','title'=>$this->view->config->title->data),
|
||||||
|
);
|
||||||
|
|
||||||
|
if(view::User() === false)
|
||||||
|
{
|
||||||
|
view::Post($this,"请先登陆",'/account/login?href='.urlencode($_SERVER['REQUEST_URI']));
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->uid = view::User('id');
|
||||||
|
}
|
||||||
|
|
||||||
|
function indexAction()
|
||||||
|
{
|
||||||
|
$record_type = $this->_getParam("dataset");
|
||||||
|
|
||||||
|
if(empty($record_type))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
$sc = Factory::Bootstrap($record_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//********************************************************
|
||||||
|
|
||||||
|
/*
|
||||||
|
* dataAction() ajax获取数据
|
||||||
|
*
|
||||||
|
* param string $ac //请求的数据类型
|
||||||
|
* param string $dt //请求的数据来源(气象,水文)
|
||||||
|
*
|
||||||
|
* return view
|
||||||
|
*/
|
||||||
|
function dataAction()
|
||||||
|
{
|
||||||
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
$this->_helper->layout->disableLayout();
|
||||||
|
|
||||||
|
$uuid = $this->_getParam("uuid");
|
||||||
|
//$record_type = $this->_getParam("dataset");
|
||||||
|
$record_subset = $this->_getParam("subdataset");
|
||||||
|
|
||||||
|
$record = new Visual\Record($uuid,$record_subset);
|
||||||
|
//$record = Visual\Factory::Bootstrap($record_type);
|
||||||
|
|
||||||
|
if(!empty($record_subset))
|
||||||
|
{
|
||||||
|
$record->subset = $record_subset;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $record();
|
||||||
|
|
||||||
|
$this->jsonexit($data);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}//dataAction() Ajax获取数据
|
||||||
|
|
||||||
|
//viewAction
|
||||||
|
public function viewAction()
|
||||||
|
{
|
||||||
|
$uuid = $this->_getParam('uuid');
|
||||||
|
|
||||||
|
if(empty($uuid) || \Helpers\Uuid::test($uuid) == false)
|
||||||
|
{
|
||||||
|
view::Post($this,"参数错误",-1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$visual = new Visual\Visual;
|
||||||
|
|
||||||
|
$this->view->data = $visual->getVisualVars($uuid);
|
||||||
|
if ($this->view->data['chartjs']=='highcharts') $this->_helper->viewRenderer('view-highcharts');
|
||||||
|
if(empty($this->view->data))
|
||||||
|
{
|
||||||
|
view::Post($this,"此数据不支持可视化",-1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$metadata = new Metadata\Metadata;
|
||||||
|
|
||||||
|
$this->view->info = $metadata->view($uuid);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* jsonexit() 退出并返回json数据
|
||||||
|
*
|
||||||
|
* param array $data 要返回的JSON数据,可以是任意数组
|
||||||
|
*
|
||||||
|
* return application/JSON
|
||||||
|
*/
|
||||||
|
public function jsonexit($data){
|
||||||
|
$this->getResponse()->setHeader('Content-Type', 'application/json')->appendBody(json_encode($data,JSON_NUMERIC_CHECK));
|
||||||
|
return true;
|
||||||
|
}//jsonexit() 退出并返回json数据
|
||||||
|
|
||||||
|
}
|
|
@ -1,346 +0,0 @@
|
||||||
<?php
|
|
||||||
class WaterController extends DataController
|
|
||||||
{
|
|
||||||
private $limit=20;
|
|
||||||
function preDispatch()
|
|
||||||
{
|
|
||||||
parent::preDispatch();
|
|
||||||
$this->debug = 0;
|
|
||||||
$acName = $this->_request->getActionName();
|
|
||||||
if(in_array($acName,array("cold","bg","ar","bdk","eb")))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse1";
|
|
||||||
}
|
|
||||||
if(in_array($acName,array("forest","dyk","plg")))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse2";
|
|
||||||
}
|
|
||||||
if(in_array($acName,array("arid","hzz","yk",'zy','zynoc','lzg','lzs')))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse3";
|
|
||||||
}
|
|
||||||
if(in_array($acName,array("meteo","autometeo","mobilemeteo","ec",'las','normalmeteo','regionalmeteo','doppler','hydro','airsounding')))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse4";
|
|
||||||
}
|
|
||||||
if(in_array($acName,array("radiometer","airebone","lidar","widas",'asd')))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse5";
|
|
||||||
}
|
|
||||||
if(in_array($acName,array("satellite")))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse6";
|
|
||||||
}
|
|
||||||
if(in_array($acName,array("surveystd","document")))
|
|
||||||
{
|
|
||||||
$this->view->pageIn = "collapse7";
|
|
||||||
}
|
|
||||||
$this->view->pageID = "water-".$acName;
|
|
||||||
}
|
|
||||||
|
|
||||||
function indexAction()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
function documentAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$row=$this->db->fetchAll("select count(*) from reference where id in (select refid from mdref where uuid in (select m.uuid from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on s.id=d.sourceid where s.code='water'))");
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select * from reference where id in (select refid from mdref where uuid in (select m.uuid from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on s.id=d.sourceid where s.code='water')) order by reference limit ? offset ?";
|
|
||||||
$this->view->refs=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit,"文献");
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
function surveystdAction()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
function coldAction()
|
|
||||||
{
|
|
||||||
$this->getmd('上游寒区水文试验区');
|
|
||||||
}
|
|
||||||
function bgAction()
|
|
||||||
{
|
|
||||||
$this->getmd('冰沟流域加密观测区');
|
|
||||||
}
|
|
||||||
function arAction()
|
|
||||||
{
|
|
||||||
$this->getmd('阿柔加密观测区');
|
|
||||||
}
|
|
||||||
function bdkAction()
|
|
||||||
{
|
|
||||||
$this->getmd('扁都口加密观测区');
|
|
||||||
}
|
|
||||||
function ebAction()
|
|
||||||
{
|
|
||||||
$this->getmd('峨堡加密观测区');
|
|
||||||
}
|
|
||||||
function forestAction()
|
|
||||||
{
|
|
||||||
$this->getmd('森林水文试验区');
|
|
||||||
}
|
|
||||||
function dykAction()
|
|
||||||
{
|
|
||||||
$this->getmd('大野口流域加密观测区');
|
|
||||||
}
|
|
||||||
function plgAction()
|
|
||||||
{
|
|
||||||
$this->getmd('排露沟流域加密观测区');
|
|
||||||
}
|
|
||||||
function aridAction()
|
|
||||||
{
|
|
||||||
$this->getmd('中游干旱区水文试验区');
|
|
||||||
}
|
|
||||||
function hzzAction()
|
|
||||||
{
|
|
||||||
$this->getmd('花寨子荒漠加密观测区');
|
|
||||||
}
|
|
||||||
function ykAction()
|
|
||||||
{
|
|
||||||
$this->getmd('盈科绿洲加密观测区');
|
|
||||||
}
|
|
||||||
function zyAction()
|
|
||||||
{
|
|
||||||
$this->getmd('张掖市加密观测区');
|
|
||||||
}
|
|
||||||
function zynocAction()
|
|
||||||
{
|
|
||||||
$this->getmd('观象台加密观测区');
|
|
||||||
}
|
|
||||||
function lzgAction()
|
|
||||||
{
|
|
||||||
$this->getmd('临泽草地加密观测区');
|
|
||||||
}
|
|
||||||
function lzsAction()
|
|
||||||
{
|
|
||||||
$this->getmd('临泽站加密观测区');
|
|
||||||
}
|
|
||||||
function meteoAction()
|
|
||||||
{
|
|
||||||
$this->getmd('气象水文','theme');
|
|
||||||
}
|
|
||||||
function autometeoAction()
|
|
||||||
{
|
|
||||||
$this->getmd('气象观测','theme');
|
|
||||||
}
|
|
||||||
function mobilemeteoAction()
|
|
||||||
{
|
|
||||||
$this->getmd('移动气象观测','theme');
|
|
||||||
}
|
|
||||||
function ecAction()
|
|
||||||
{
|
|
||||||
$this->getmd('涡动相关','theme');
|
|
||||||
}
|
|
||||||
function lasAction()
|
|
||||||
{
|
|
||||||
$this->getmd('大孔径闪烁仪','theme');
|
|
||||||
}
|
|
||||||
function normalmeteoAction()
|
|
||||||
{
|
|
||||||
$this->getmd('常规气象观测','theme');
|
|
||||||
}
|
|
||||||
function regionalmeteoAction()
|
|
||||||
{
|
|
||||||
$this->getmd('区域气象观测','theme');
|
|
||||||
}
|
|
||||||
function dopplerAction()
|
|
||||||
{
|
|
||||||
$this->getmd('降雨','theme');
|
|
||||||
}
|
|
||||||
function hydroAction()
|
|
||||||
{
|
|
||||||
$this->getmd('水文','theme');
|
|
||||||
}
|
|
||||||
function airsoundingAction()
|
|
||||||
{
|
|
||||||
$this->getmd('大气廓线','theme');
|
|
||||||
}
|
|
||||||
function aireboneAction()
|
|
||||||
{
|
|
||||||
$this->getmd('航空遥感','theme');
|
|
||||||
}
|
|
||||||
function radiometerAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword ilike '%波段机载微波辐射计') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword ilike '%波段机载微波辐射计') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
function lidarAction()
|
|
||||||
{
|
|
||||||
//$this->getmd('激光雷达','theme');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='激光雷达') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='激光雷达') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
function widasAction()
|
|
||||||
{
|
|
||||||
//$this->getmd('WiDAS','theme');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='红外广角双模式成像仪WiDAS') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='红外广角双模式成像仪WiDAS') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
function asdAction()
|
|
||||||
{
|
|
||||||
//$this->getmd('成像光谱仪OMIS-II','theme');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='成像光谱仪OMIS-II') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='theme' and keyword='成像光谱仪OMIS-II') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
function satelliteAction()
|
|
||||||
{
|
|
||||||
$this->getmd('卫星遥感','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function tagAction()
|
|
||||||
{
|
|
||||||
$key = $this->_request->getParam('key');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
if (!empty($key)) {
|
|
||||||
$this->view->codename=$key;
|
|
||||||
$sql=$this->db->quoteInto('select count(id) from keyword where keyword=?',$key);
|
|
||||||
$state=$this->db->query($sql);
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keyword='".$key."') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
} else {
|
|
||||||
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='place' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by keyword.keyword order by count desc");
|
|
||||||
$k1=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by k.keyword order by k.keyword");
|
|
||||||
$k2=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='discipline' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by k.keyword order by k.keyword");
|
|
||||||
$k3=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='stratum' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by k.keyword order by k.keyword");
|
|
||||||
$k4=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='temporal' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by keyword.keyword order by keyword.keyword");
|
|
||||||
$k5=$state->fetchAll();
|
|
||||||
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function searchAction()
|
|
||||||
{
|
|
||||||
$this->view->addHelperPath('helper','Zend_View_Helper_');
|
|
||||||
$form=new SearchForm();
|
|
||||||
$this->view->form=$form;
|
|
||||||
//$form->submit->setLabel('快速搜索');
|
|
||||||
$key=$this->_request->getParam('q');
|
|
||||||
if (!empty($key)) {
|
|
||||||
$search=new Search($key);
|
|
||||||
$where=$search->sql_expr(array("title","description"));
|
|
||||||
$page=@(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and ".$where);
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and ".$where." order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->key=$key;
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function timemapAction()
|
|
||||||
{
|
|
||||||
$sql="select id,uuid,west,south,north,east,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and timebegin is not null and timebegin::date>date('2007-01-01')";
|
|
||||||
$this->view->rows=$this->db->fetchAll($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
function timelineAction()
|
|
||||||
{
|
|
||||||
$fn="watertime.xml";
|
|
||||||
$rows=$this->db->fetchAll("select ts_created from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') order by ts_created desc limit 1");
|
|
||||||
$last_update=strtotime($rows[0]['ts_created']);
|
|
||||||
if (!file_exists($fn) || (filemtime($fn)<$last_update))
|
|
||||||
{
|
|
||||||
$dateformat="M j Y";
|
|
||||||
$rows=$this->db->fetchAll("select id,uuid,description,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and timebegin is not null order by timebegin,title");
|
|
||||||
$timexml='<data>';
|
|
||||||
foreach($rows as $row) {
|
|
||||||
$timexml.='<event start="'.date($dateformat,strtotime($row['timebegin'])).' GMT+0800" ';
|
|
||||||
if ($row['timeend']!='' && $row['timeend']!=$row['timebegin']) $timexml.=' end="'.date($dateformat,strtotime($row['timeend'])).'" isDuration="true"';
|
|
||||||
$timexml.= ' title="'.htmlspecialchars(mb_substr($row['title'],11,mb_strlen($row['title'],'UTF-8')-10,'UTF-8')).'" image="/images/westdc_40w.gif" link="/water/'.$row['uuid'].'">';
|
|
||||||
$desc_length=mb_strlen($row['description'],"UTF-8");
|
|
||||||
$desc=mb_substr($row['description'],0,($desc_length>300)?300:$desc_length,"UTF-8");
|
|
||||||
if ($desc_length>300) $desc.=" ...";
|
|
||||||
$timexml.=htmlspecialchars($desc);
|
|
||||||
$timexml.="</event>\n";
|
|
||||||
}
|
|
||||||
$timexml.='</data>';
|
|
||||||
$fp=fopen($fn,'w');
|
|
||||||
fwrite($fp,$timexml);
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function categoryAction()
|
|
||||||
{
|
|
||||||
$code = (int)$this->_request->getParam('code');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from category where code=".$code.")");
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
|
|
||||||
$this->view->category=$this->db->fetchAll('select c.code,name,name_zh,count(*) from category c,categorycode cc where c.code=cc.code group by c.code,cc.name,cc.name_zh');
|
|
||||||
if ($code>0 && $code<20) {
|
|
||||||
$sql="select uuid,title,description,id from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select distinct id from category where code=".$code.") order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
$row=$this->db->fetchRow("select name,name_zh from categorycode where code=?",$code);
|
|
||||||
$this->view->codename=(empty($row['name_zh'])?$row['name']:$row['name_zh']);
|
|
||||||
} else {
|
|
||||||
//提供全部分类列表
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private function getmd($keyword,$type='place')
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."')");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
//@todo: add order with title
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') and id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,318 +0,0 @@
|
||||||
<?php
|
|
||||||
class YrnmrController extends DataController
|
|
||||||
{
|
|
||||||
private $limit=20;
|
|
||||||
|
|
||||||
function preDispatch()
|
|
||||||
{
|
|
||||||
parent::preDispatch();
|
|
||||||
//$this->_helper->layout->setLayout('yrnmr');
|
|
||||||
$acName = $this->_request->getActionName();
|
|
||||||
$this->view->pageID = "yrnmr-".$acName;
|
|
||||||
}
|
|
||||||
|
|
||||||
function indexAction()
|
|
||||||
{
|
|
||||||
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and length(t.data)>2 order by random() limit 3";
|
|
||||||
$this->view->meatdata=$this->db->fetchAll($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 数据浏览
|
|
||||||
*/
|
|
||||||
function browseAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') ");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$select=$this->db->select();
|
|
||||||
$select->from('normalmetadata','*')->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') ")->order('title desc')->limitPage($page,$this->limit);
|
|
||||||
$this->view->metadata = $this->db->fetchAll($select);
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function thumbAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') ");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$select=$this->db->select();
|
|
||||||
$select->from('normalmetadata as m','m.*')
|
|
||||||
->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') ")
|
|
||||||
->order('m.title desc')->limitPage($page,$this->limit);
|
|
||||||
$this->view->metadata = $this->db->fetchAll($select);
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
}
|
|
||||||
|
|
||||||
function documentAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$row=$this->db->fetchAll("select count(*) from reference where id in (select refid from mdref where uuid in (select uuid from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') ))");
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select * from reference where id in (select refid from mdref where uuid in (select uuid from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') )) order by reference limit ? offset ?";
|
|
||||||
$this->view->refs=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit,"文献");
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function baseAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='冰川' or keyword='沙漠' or keyword='地貌' or keyword='植被' or keyword='草场' or keyword='沙漠化' or keyword='基础地理' or keyword='遥感影像' or keyword='水文地质' or keyword='社会经济' or keyword='人口' or keyword='SWAT' or keyword='NPP' or keyword='WRF' or keyword='辐射' or keyword='NEP'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='冰川' or keyword='沙漠' or keyword='地貌' or keyword='植被' or keyword='草场' or keyword='沙漠化' or keyword='基础地理' or keyword='遥感影像' or keyword='水文地质' or keyword='社会经济' or keyword='人口' or keyword='SWAT' or keyword='NPP' or keyword='WRF' or keyword='辐射' or keyword='NEP')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function geobaseAction()
|
|
||||||
{
|
|
||||||
$this->getmd('基础地理');
|
|
||||||
}
|
|
||||||
|
|
||||||
function coreAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='DEM' or keyword='土地利用' or keyword='土壤' or keyword='气象' or keyword='水文观测' or keyword='灌溉' or keyword='试验'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='DEM' or keyword='土地利用' or keyword='土壤' or keyword='气象' or keyword='水文观测' or keyword='灌溉' or keyword='试验')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function demAction()
|
|
||||||
{
|
|
||||||
$this->getmd('DEM');
|
|
||||||
}
|
|
||||||
|
|
||||||
function rsAction()
|
|
||||||
{
|
|
||||||
$this->getmd('遥感影像');
|
|
||||||
}
|
|
||||||
|
|
||||||
function waterAction()
|
|
||||||
{
|
|
||||||
$this->getmd('水文地质');
|
|
||||||
}
|
|
||||||
|
|
||||||
function modelAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='WRF' or keyword='NPP' or keyword='SWAT' or keyword='NEP' or keyword='辐射'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='WRF' or keyword='NPP' or keyword='SWAT' or keyword='NEP' or keyword='辐射')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function economicAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='人口' or keyword='社会经济'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='人口' or keyword='社会经济')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function landsurfaceAction()
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='冰川' or keyword='沙漠' or keyword='地貌' or keyword='植被' or keyword='草场' or keyword='沙漠化'))");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='theme' and (keyword='冰川' or keyword='沙漠' or keyword='地貌' or keyword='植被' or keyword='草场' or keyword='沙漠化')) order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
|
|
||||||
function landuseAction()
|
|
||||||
{
|
|
||||||
$this->getmd('土地利用','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function soilAction()
|
|
||||||
{
|
|
||||||
$this->getmd('土壤','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function meteoAction()
|
|
||||||
{
|
|
||||||
$this->getmd('气象','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function hydroAction()
|
|
||||||
{
|
|
||||||
$this->getmd('水文观测','theme');
|
|
||||||
}
|
|
||||||
function irragationAction()
|
|
||||||
{
|
|
||||||
$this->getmd('灌溉','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function expAction()
|
|
||||||
{
|
|
||||||
$this->getmd('实验','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function obsAction()
|
|
||||||
{
|
|
||||||
$this->getmd('观测','theme');
|
|
||||||
}
|
|
||||||
|
|
||||||
function listAction()
|
|
||||||
{
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') order by timebegin,title";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
function tagAction()
|
|
||||||
{
|
|
||||||
$key = $this->_request->getParam('key');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
if (!empty($key)) {
|
|
||||||
$this->view->codename=$key;
|
|
||||||
$sql=$this->db->quoteInto('select count(id) from keyword where keyword=?',$key);
|
|
||||||
$state=$this->db->query($sql);
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keyword='".$key."') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
} else {
|
|
||||||
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='place' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by keyword.keyword order by count desc");
|
|
||||||
$k1=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by k.keyword order by k.keyword");
|
|
||||||
$k2=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='discipline' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by k.keyword order by k.keyword");
|
|
||||||
$k3=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='stratum' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by k.keyword order by k.keyword");
|
|
||||||
$k4=$state->fetchAll();
|
|
||||||
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='temporal' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by keyword.keyword order by keyword.keyword");
|
|
||||||
$k5=$state->fetchAll();
|
|
||||||
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function searchAction()
|
|
||||||
{
|
|
||||||
$this->view->addHelperPath('helper','Zend_View_Helper_');
|
|
||||||
$form=new SearchForm();
|
|
||||||
$this->view->form=$form;
|
|
||||||
//$form->submit->setLabel('快速搜索');
|
|
||||||
$key=$this->_request->getParam('q');
|
|
||||||
if (!empty($key)) {
|
|
||||||
$search=new Search($key);
|
|
||||||
$where=$search->sql_expr(array("title","description"));
|
|
||||||
$page=@(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and ".$where);
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and ".$where." order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->key=$key;
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function timemapAction()
|
|
||||||
{
|
|
||||||
$sql="select id,uuid,west,south,north,east,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and timebegin is not null";
|
|
||||||
$this->view->rows=$this->db->fetchAll($sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
function timelineAction()
|
|
||||||
{
|
|
||||||
$fn="yrnmrtime.xml";
|
|
||||||
$rows=$this->db->fetchAll("select ts_created from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') order by ts_created desc limit 1");
|
|
||||||
$last_update=strtotime($rows[0]['ts_created']);
|
|
||||||
if (!file_exists($fn) || (filemtime($fn)<$last_update))
|
|
||||||
{
|
|
||||||
$dateformat="M j Y";
|
|
||||||
$rows=$this->db->fetchAll("select id,uuid,description,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and timebegin is not null order by timebegin,title");
|
|
||||||
$timexml='<data>';
|
|
||||||
foreach($rows as $row) {
|
|
||||||
$timexml.='<event start="'.date($dateformat,strtotime($row['timebegin'])).' GMT+0800" ';
|
|
||||||
if ($row['timeend']!='' && $row['timeend']!=$row['timebegin']) $timexml.=' end="'.date($dateformat,strtotime($row['timeend'])).'" isDuration="true"';
|
|
||||||
$timexml.= ' title="'.htmlspecialchars($row['title']).'" image="/images/westdc_40w.gif" link="/yrnmr/view/uuid/'.$row['uuid'].'">';
|
|
||||||
$desc_length=mb_strlen($row['description'],"UTF-8");
|
|
||||||
$desc=mb_substr($row['description'],0,($desc_length>300)?300:$desc_length,"UTF-8");
|
|
||||||
if ($desc_length>300) $desc.=" ...";
|
|
||||||
$timexml.=htmlspecialchars($desc);
|
|
||||||
$timexml.="</event>\n";
|
|
||||||
}
|
|
||||||
$timexml.='</data>';
|
|
||||||
$fp=fopen($fn,'w');
|
|
||||||
fwrite($fp,$timexml);
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function categoryAction()
|
|
||||||
{
|
|
||||||
$code = (int)$this->_request->getParam('code');
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$this->view->category=$this->db->fetchAll("select c.code,name,name_zh,count(*) from category c left join normalmetadata m on c.id=m.id,categorycode cc where c.code=cc.code and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') group by c.code,cc.name,cc.name_zh");
|
|
||||||
if ($code>0 && $code<20) {
|
|
||||||
$row=$this->db->fetchAll("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from category where code=".$code.")");
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
$sql="select uuid,title,description,id from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select distinct id from category where code=".$code.") order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
$row=$this->db->fetchRow("select name,name_zh from categorycode where code=?",$code);
|
|
||||||
$this->view->codename=(empty($row['name_zh'])?$row['name']:$row['name_zh']);
|
|
||||||
} else {
|
|
||||||
//提供全部分类列表
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getmd($keyword,$type='theme')
|
|
||||||
{
|
|
||||||
$page=(int)$this->_request->getParam('page');
|
|
||||||
if (empty($page)) $page=1;
|
|
||||||
$offset=$this->limit*($page-1);
|
|
||||||
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='yrnmr' and m.id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."')");
|
|
||||||
$row=$state->fetchAll();
|
|
||||||
$sum=$row[0]['count'];
|
|
||||||
//@todo: add order with title
|
|
||||||
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='yrnmr') and id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."') order by timebegin,title limit ? offset ?";
|
|
||||||
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
|
|
||||||
$this->view->page=new Pagination($sum,$page,$this->limit);
|
|
||||||
$this->view->offset=$offset+1;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -10,36 +10,36 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<?= $this->partial('about/navi.phtml'); ?>
|
<?= $this->partial('about/navi.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="span9">
|
<div class="span9">
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<h2>联系我们</h2>
|
<h2>联系我们</h2>
|
||||||
<div id="offline">
|
<div id="offline" class="span4" style="padding:0 0 0 33px;">
|
||||||
<p class="title">离线方式</p>
|
<p>
|
||||||
<p>
|
<br/>
|
||||||
中国西部环境与生态科学数据中心<br />
|
青海省环境监测中心站<br/>
|
||||||
中国科学院寒区旱区环境与工程研究所 6#1102<br />
|
青海省西宁市城东区南山东路116号 <br/>
|
||||||
甘肃省兰州市东岗西路320号<br />
|
邮编:810099<br/>
|
||||||
邮编:730000<br />
|
电话: +86-0971-8141830<br/>
|
||||||
E-mail: westdc@lzb.ac.cn<br />
|
<br/>
|
||||||
电话: +86-931-4967287<br />
|
</div>
|
||||||
<br />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="online">
|
<div id="online" class="span5">
|
||||||
<p class="title">在线联系</p>
|
<p class="title">在线联系</p>
|
||||||
<p class="note">请填写以下表单,系统会自动发送到westdc邮箱里</p>
|
<p class="note">请填写以下表单,系统会自动发送到我们的邮箱</p>
|
||||||
<?php echo $this->form; ?>
|
<?php echo $this->form; ?>
|
||||||
|
|
||||||
<?php if (!empty($this->messages)) : ?>
|
<?php if (!empty($this->messages)) : ?>
|
||||||
<div id="message">
|
<div id="message">
|
||||||
<?php
|
<?php
|
||||||
foreach ($this->messages as $info)echo $info;
|
foreach ($this->messages as $info) {
|
||||||
?>
|
echo $info;
|
||||||
</div>
|
}
|
||||||
<?php endif; ?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -7,33 +7,39 @@ $this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('关于我们');
|
$this->breadcrumb('关于我们');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div class="row">
|
<div class="row-fluid">
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<?= $this->partial('about/navi.phtml'); ?>
|
<?= $this->partial('about/navi.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="span9">
|
<div class="span9">
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
||||||
<div class="hero-unit">
|
<div class="hero-unit">
|
||||||
<div class="pull-right" style="margin-left:5px;">
|
<p>“青海三江源自然保护区生态保护和建设工程”的实施将对保护三江源自然保护区的生态环境产生重大影响;“三江源生态监测综合数据平台”是青海三江源自然保护区生态保护和建设工程2012年度生态监测项目下设置的课题,目的是依托数据库、互联网和地理信息系统技术,组建基于互联网的、分布式的生态监测数据平台,充分保护“青海三江源自然保护区生态保护和建设工程”的各种数据投资,发掘数据的科学价值,辅助研究生态环境变化过程中的科学问题。</p>
|
||||||
<img src="/images/westdc_logo_white.gif" /><br />
|
</div>
|
||||||
<a href="/images/westdc_logo_white.gif">下载LOGO</a>
|
|
||||||
</div>
|
|
||||||
<p>中国西部环境与生态科学数据中心(“西部数据中心”)受<a href="http://www.nsfc.gov.cn" target="_blank">中国自然科学基金委</a>资助,以中国西部环境与生态科学研究计划(“西部计划”)重点项目的形式立项(编号:90502010),旨在收集和整理“西部计划”各项目执行期间产出数据集,为中国西部环境与生态科学研究,乃至更广泛意义上的地表表层科学研究服务。</p>
|
|
||||||
</div>
|
|
||||||
<h2>
|
|
||||||
<a href="/about/background">项目背景</a></h2>
|
|
||||||
<p>
|
|
||||||
介绍“西部数据中心”项目立项的一些背景,可以理解西部数据中心要做些什么内容,以及采用什么样的实现手段。</p>
|
|
||||||
<h2>
|
|
||||||
项目参与单位</h2>
|
|
||||||
<p>
|
|
||||||
“西部数据中心”以<a href="http://www.casnw.net" target="_blank">中国科学院寒区旱区环境与工程研究所</a>为承担单位,由<a
|
|
||||||
href="http://www.westgis.ac.cn" target="_blank">遥感与地理信息科学研究室</a>组织实施。参与单位包括<a href="http://www.igsnrr.ac.cn"
|
|
||||||
target="_blank">中国科学院地理科学与资源研究所</a>。其中“知识积累平台”依托<a href="http://www.llas.ac.cn" target="_blank">中国科学院资源环境科学信息中心</a>实现项目中的文献收集和管理。</p>
|
|
||||||
<h2>
|
|
||||||
<a href="/about/contact">联系我们</a></h2>
|
|
||||||
|
|
||||||
</div>
|
<h2>项目背景</h2>
|
||||||
</div>
|
<p>
|
||||||
|
《青海三江源自然保护区生态保护和建设总体规划》(以下简称《总体规划》)于2005年1月26日经国务院常务会议批准实施,青海三江源自然保护区生态保护和建设工程生态监测项目列在《总体规划》的支撑项目中,实施期限为2005年至2012年,项目总投资5500万元。生态监测项目由省环保厅,会同省水利厅、青海省农牧厅、省林业局、省气象局共同实施。
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>项目参与单位</h2>
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>青海省生态环境遥感监测中心</li>
|
||||||
|
<li>中国科学院寒区旱区环境与工程研究所</li>
|
||||||
|
<li>青海省环境监测中心站</li>
|
||||||
|
<li>青海省草原总站</li>
|
||||||
|
<li>青海省气象科学研究所</li>
|
||||||
|
<li>青海省林业调查规划院</li>
|
||||||
|
<li>青海省水文水资源局</li>
|
||||||
|
<li>青海省水土保持局</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a href="/about/contact">联系我们</a></h2>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue