Compare commits
855 Commits
Shadowsock
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
6d09b40b89 | 8 years ago |
|
|
6ceb361392 | 8 years ago |
|
|
4de3d4291b | 8 years ago |
|
|
4aa5858a1a | 8 years ago |
|
|
9a86487e06 | 8 years ago |
|
|
57f3b86d4a | 8 years ago |
|
|
02f8909a3a | 8 years ago |
|
|
54c229ca6a | 8 years ago |
|
|
043a59a087 | 8 years ago |
|
|
3a9505c5c8 | 8 years ago |
|
|
2334084b51 | 8 years ago |
|
|
d8ae669ebc | 8 years ago |
|
|
46c36d761a | 8 years ago |
|
|
09623f7400 | 8 years ago |
|
|
20f57761b0 | 8 years ago |
|
|
c7799dbd66 | 8 years ago |
|
|
f89f91933e | 8 years ago |
|
|
96746dadd0 | 8 years ago |
|
|
6a0f3c375c | 8 years ago |
|
|
c763bad81c | 8 years ago |
|
|
74e51b185d | 8 years ago |
|
|
5e87e988fb | 8 years ago |
|
|
679631f2e1 | 8 years ago |
|
|
0426014191 | 8 years ago |
|
|
23b816a8b2 | 8 years ago |
|
|
37c5c43ab7 | 8 years ago |
|
|
d14fb442d0 | 8 years ago |
|
|
64b623529e | 8 years ago |
|
|
1c0856842d | 8 years ago |
|
|
d742ca3e5c | 8 years ago |
|
|
aaea680e9f | 8 years ago |
|
|
15d1f27cc0 | 8 years ago |
|
|
301c97fb91 | 8 years ago |
|
|
da4ca9cbe6 | 8 years ago |
|
|
0ea1acab4c | 8 years ago |
|
|
072cd970d4 | 8 years ago |
|
|
083a1184ea | 8 years ago |
|
|
7f02e01240 | 8 years ago |
|
|
f5a8b0274f | 8 years ago |
|
|
c255f10b4a | 8 years ago |
|
|
fd76762476 | 8 years ago |
|
|
b36c9d41e9 | 8 years ago |
|
|
d88aefe832 | 8 years ago |
|
|
915b8949d8 | 8 years ago |
|
|
6defaac7bd | 8 years ago |
|
|
de112cd7fc | 8 years ago |
|
|
afa0c6dbef | 8 years ago |
|
|
e545fe9059 | 8 years ago |
|
|
ffec5ab937 | 8 years ago |
|
|
52491ed9dd | 8 years ago |
|
|
278968c882 | 8 years ago |
|
|
fc010bd0e5 | 8 years ago |
|
|
3b548381cb | 8 years ago |
|
|
354f3f6cac | 8 years ago |
|
|
c2cdfac504 | 8 years ago |
|
|
93cf4383d4 | 8 years ago |
|
|
f2a6f2dd93 | 8 years ago |
|
|
653acc1e02 | 8 years ago |
|
|
049e09ab3e | 8 years ago |
|
|
f98684da07 | 8 years ago |
|
|
15a9480b29 | 8 years ago |
|
|
e600f8f7d4 | 8 years ago |
|
|
c70732d20b | 8 years ago |
|
|
045385ecb3 | 8 years ago |
|
|
ca43eec889 | 8 years ago |
|
|
59b5ab067d | 8 years ago |
|
|
3f74488005 | 8 years ago |
|
|
01bf48644d | 8 years ago |
|
|
420142fbb9 | 8 years ago |
|
|
5c2fc9c4b9 | 8 years ago |
|
|
6a6e0b4c11 | 8 years ago |
|
|
4800cd97ac | 8 years ago |
|
|
51808e536d | 8 years ago |
|
|
d7e0edb9e4 | 8 years ago |
|
|
c8c75c2592 | 8 years ago |
|
|
bd854217ed | 8 years ago |
|
|
4e56ad78fd | 8 years ago |
|
|
748c2e0b7d | 8 years ago |
|
|
6048aff273 | 8 years ago |
|
|
39946a0742 | 8 years ago |
|
|
fabb9dfdb7 | 8 years ago |
|
|
52f0ddc20c | 8 years ago |
|
|
666b57e22a | 8 years ago |
|
|
ed1aefbba4 | 8 years ago |
|
|
4533f6d9fc | 8 years ago |
|
|
5805ed4664 | 8 years ago |
|
|
1c02297a65 | 8 years ago |
|
|
0f7e3f46c0 | 8 years ago |
|
|
c1aafe105c | 8 years ago |
|
|
1bae13eeed | 8 years ago |
|
|
55931e6765 | 8 years ago |
|
|
9c11058b3c | 8 years ago |
|
|
e9c27b1c7b | 8 years ago |
|
|
634ccc4e81 | 8 years ago |
|
|
dae3492f76 | 8 years ago |
|
|
54f446d1b6 | 8 years ago |
|
|
a7bcf07846 | 8 years ago |
|
|
7a30ce0fb1 | 8 years ago |
|
|
5cc5eb1bd8 | 8 years ago |
|
|
0bc420efed | 8 years ago |
|
|
c236c1f6eb | 8 years ago |
|
|
81ca09dffb | 8 years ago |
|
|
510bde703b | 8 years ago |
|
|
9d487a7e7b | 8 years ago |
|
|
431bbc03fc | 8 years ago |
|
|
038e120513 | 8 years ago |
|
|
d89f8edd33 | 8 years ago |
|
|
d617adf747 | 8 years ago |
|
|
ccbdf5ba05 | 8 years ago |
|
|
ecfddf3660 | 8 years ago |
|
|
329312487b | 8 years ago |
|
|
d861af1576 | 8 years ago |
|
|
b7abc67985 | 8 years ago |
|
|
4571f8e514 | 8 years ago |
|
|
e5d7133641 | 8 years ago |
|
|
8ae9135cca | 8 years ago |
|
|
afeef49467 | 8 years ago |
|
|
62e36e4a63 | 8 years ago |
|
|
188778d1c5 | 8 years ago |
|
|
c86e3e9102 | 8 years ago |
|
|
e0579807ee | 8 years ago |
|
|
dff6f9064e | 8 years ago |
|
|
e6f3907be1 | 8 years ago |
|
|
4667b0db6b | 8 years ago |
|
|
efa41abfa4 | 8 years ago |
|
|
66d3250d58 | 8 years ago |
|
|
0a3769204a | 8 years ago |
|
|
278f1d9869 | 8 years ago |
|
|
cadcd553f6 | 8 years ago |
|
|
9505cd0299 | 8 years ago |
|
|
71be793f9c | 8 years ago |
|
|
a7b4713374 | 8 years ago |
|
|
529fd6ccdc | 8 years ago |
|
|
b4ce834477 | 8 years ago |
|
|
299abbbba7 | 8 years ago |
|
|
df8f8da071 | 8 years ago |
|
|
32a03e14fc | 8 years ago |
|
|
fac6f18cda | 8 years ago |
|
|
ff30ff6c2f | 8 years ago |
|
|
a864f7f402 | 8 years ago |
|
|
6e1020327d | 8 years ago |
|
|
9fc7b61af9 | 8 years ago |
|
|
524e63a22a | 8 years ago |
|
|
6475bccec2 | 8 years ago |
|
|
1f3b8e9789 | 8 years ago |
|
|
e9eb1f2a0a | 8 years ago |
|
|
72ec9b20c1 | 8 years ago |
|
|
cd0457b848 | 8 years ago |
|
|
e40a3a86ac | 8 years ago |
|
|
c7aba6949a | 8 years ago |
|
|
5ae7238f77 | 8 years ago |
|
|
17bd5111ec | 8 years ago |
|
|
199c070b7e | 8 years ago |
|
|
2961b68564 | 8 years ago |
|
|
1068694bb1 | 8 years ago |
|
|
dbe8427dab | 8 years ago |
|
|
8666e88761 | 8 years ago |
|
|
f386807bdd | 8 years ago |
|
|
d2592ed0d0 | 8 years ago |
|
|
907943cda0 | 8 years ago |
|
|
21ac464627 | 8 years ago |
|
|
e2d564b7e0 | 8 years ago |
|
|
9545d41df4 | 8 years ago |
|
|
a2b042d9fa | 8 years ago |
|
|
65fc5b6b56 | 8 years ago |
|
|
fe9cfe66cc | 8 years ago |
|
|
ceaa6c355e | 8 years ago |
|
|
cca074ea6b | 8 years ago |
|
|
c93dd89453 | 8 years ago |
|
|
3e04234f0b | 8 years ago |
|
|
2a55889199 | 8 years ago |
|
|
4953c9769e | 8 years ago |
|
|
c67668e735 | 8 years ago |
|
|
e9cdac5b64 | 8 years ago |
|
|
b568cc232b | 8 years ago |
|
|
77317d9804 | 8 years ago |
|
|
0ac899ae62 | 8 years ago |
|
|
3bdf08f0ec | 8 years ago |
|
|
cc6830ea71 | 8 years ago |
|
|
b3495125f5 | 8 years ago |
|
|
17fba1c0d3 | 8 years ago |
|
|
9c0c897b33 | 8 years ago |
|
|
9bd6a93032 | 8 years ago |
|
|
a997a3cfdc | 8 years ago |
|
|
23e202475f | 8 years ago |
|
|
ceae0f4072 | 8 years ago |
|
|
3a3da48fb0 | 8 years ago |
|
|
57e40f428d | 8 years ago |
|
|
53273b15f0 | 8 years ago |
|
|
5b8677eaf9 | 8 years ago |
|
|
fb46a625cd | 8 years ago |
|
|
10721a5d3c | 8 years ago |
|
|
01d6496020 | 8 years ago |
|
|
6a09bb043c | 8 years ago |
|
|
abd51d4b33 | 8 years ago |
|
|
526f827236 | 8 years ago |
|
|
d843a6a3e6 | 8 years ago |
|
|
948e8a03c4 | 8 years ago |
|
|
08b7b88ff7 | 8 years ago |
|
|
65825c67f4 | 8 years ago |
|
|
3812ed61da | 8 years ago |
|
|
160e0f1723 | 8 years ago |
|
|
394a3cbdac | 8 years ago |
|
|
bafe13ce7c | 8 years ago |
|
|
3e20194040 | 8 years ago |
|
|
53c890ad3f | 8 years ago |
|
|
4844d78897 | 8 years ago |
|
|
4264bcf51b | 8 years ago |
|
|
e2b673053a | 8 years ago |
|
|
a5ddf422f7 | 8 years ago |
|
|
8568a5d00c | 8 years ago |
|
|
889190c68e | 8 years ago |
|
|
236451ccb7 | 8 years ago |
|
|
b8ad00eef5 | 8 years ago |
|
|
d3a5799f74 | 8 years ago |
|
|
da7e091a57 | 8 years ago |
|
|
5f6bcbdd4d | 8 years ago |
|
|
501fe02b01 | 8 years ago |
|
|
aadc2e1374 | 8 years ago |
|
|
6f3e409a22 | 8 years ago |
|
|
7b6824c3a5 | 8 years ago |
|
|
c78c4e6628 | 8 years ago |
|
|
c3f9c1eb58 | 8 years ago |
|
|
7d8014907c | 8 years ago |
|
|
f4ae7421d9 | 8 years ago |
|
|
5c5c32f6f5 | 8 years ago |
|
|
48059bba7f | 8 years ago |
|
|
79aa4ca725 | 8 years ago |
|
|
67b1402bcf | 8 years ago |
|
|
b1765a96ac | 8 years ago |
|
|
ff33fe1c51 | 8 years ago |
|
|
57c578ae48 | 8 years ago |
|
|
1d01f73a47 | 8 years ago |
|
|
2fd86db626 | 8 years ago |
|
|
aba7ca0591 | 8 years ago |
|
|
093abbbe62 | 8 years ago |
|
|
0613b8b7db | 8 years ago |
|
|
33b68bfb02 | 8 years ago |
|
|
be98ef3614 | 8 years ago |
|
|
b70d4dd1bb | 8 years ago |
|
|
379c5a8f1e | 8 years ago |
|
|
6110624989 | 8 years ago |
|
|
9f70cf5090 | 8 years ago |
|
|
adcab73c49 | 8 years ago |
|
|
1b35cfa0bf | 8 years ago |
|
|
65cda9aad1 | 8 years ago |
|
|
10084381df | 8 years ago |
|
|
8b1abc0534 | 8 years ago |
|
|
f02aca1ee6 | 8 years ago |
|
|
0bd0df69e8 | 8 years ago |
|
|
17172e7554 | 8 years ago |
|
|
f399c539ef | 8 years ago |
|
|
1b0928e536 | 8 years ago |
|
|
4ec61be187 | 8 years ago |
|
|
5133efd13c | 8 years ago |
|
|
f68e461833 | 8 years ago |
|
|
36c67e5287 | 8 years ago |
|
|
1ca063562b | 8 years ago |
|
|
0ef9ebefee | 8 years ago |
|
|
958743938d | 8 years ago |
|
|
d37ccb8f3e | 8 years ago |
|
|
34f40615ce | 8 years ago |
|
|
f87cb7f869 | 8 years ago |
|
|
c6ae68e952 | 8 years ago |
|
|
adfaebef43 | 8 years ago |
|
|
e3d5032d35 | 8 years ago |
|
|
a0fa5aa69c | 8 years ago |
|
|
a2b80000bd | 8 years ago |
|
|
eadd34c48c | 8 years ago |
|
|
ef9d3eae68 | 8 years ago |
|
|
0f98005b41 | 8 years ago |
|
|
a78d657b25 | 8 years ago |
|
|
31b44ba057 | 8 years ago |
|
|
86ee35c93b | 8 years ago |
|
|
ef07d745a9 | 8 years ago |
|
|
0528be7848 | 8 years ago |
|
|
e28d756c11 | 8 years ago |
|
|
c16ccbd524 | 8 years ago |
|
|
45cb8ef381 | 8 years ago |
|
|
c6ff5e4377 | 8 years ago |
|
|
3af1d9e09f | 8 years ago |
|
|
3c1be0db16 | 8 years ago |
|
|
837b35bd75 | 8 years ago |
|
|
7b2493b7d5 | 8 years ago |
|
|
e44a40657b | 8 years ago |
|
|
889db9fbd4 | 8 years ago |
|
|
740d400aa2 | 8 years ago |
|
|
4792b4d2e9 | 8 years ago |
|
|
ffa59fa7e3 | 8 years ago |
|
|
52694ad595 | 8 years ago |
|
|
5ed82d37ed | 8 years ago |
|
|
a73065cb5e | 8 years ago |
|
|
ba1f195710 | 8 years ago |
|
|
2e877c4a9e | 8 years ago |
|
|
9b928fd665 | 8 years ago |
|
|
56958616f3 | 8 years ago |
|
|
8c804c9603 | 8 years ago |
|
|
4454695743 | 8 years ago |
|
|
c41b0ce3e8 | 8 years ago |
|
|
2e53edcc36 | 8 years ago |
|
|
e3393f0a1d | 8 years ago |
|
|
7744f7a148 | 8 years ago |
|
|
a8627a7a5b | 8 years ago |
|
|
5e8bc3391c | 8 years ago |
|
|
8a1706f5ec | 8 years ago |
|
|
341b7f1468 | 8 years ago |
|
|
3895e7b0fc | 8 years ago |
|
|
7a251327c9 | 8 years ago |
|
|
e51c8778ce | 8 years ago |
|
|
59bceb4fe6 | 8 years ago |
|
|
60a7bdfa1a | 8 years ago |
|
|
f827bcb6e5 | 8 years ago |
|
|
b16282c579 | 8 years ago |
|
|
310014a3ed | 8 years ago |
|
|
594d6e65ed | 8 years ago |
|
|
e28aeec3a2 | 8 years ago |
|
|
5fe24d4672 | 8 years ago |
|
|
286c18f462 | 8 years ago |
|
|
8b3846124f | 8 years ago |
|
|
28267d6899 | 8 years ago |
|
|
3511611fca | 8 years ago |
|
|
c74448bb35 | 8 years ago |
|
|
f892362188 | 8 years ago |
|
|
a39e160633 | 8 years ago |
|
|
b7ba46c39e | 8 years ago |
|
|
10d816853b | 8 years ago |
|
|
caf4a0e47b | 8 years ago |
|
|
bef77b495f | 8 years ago |
|
|
c0396f1c0f | 8 years ago |
|
|
f74144b409 | 8 years ago |
|
|
eef6374f24 | 8 years ago |
|
|
ac3f8e33ed | 8 years ago |
|
|
1b4a1e3c76 | 8 years ago |
|
|
f6fd74e136 | 8 years ago |
|
|
670fda163b | 8 years ago |
|
|
dc8364825d | 8 years ago |
|
|
42f74c5e32 | 8 years ago |
|
|
dd4c3497ec | 8 years ago |
|
|
7c82a16d59 | 8 years ago |
|
|
cd21fb91f8 | 8 years ago |
|
|
643ccab5a6 | 8 years ago |
|
|
845eea7c88 | 8 years ago |
|
|
a107377b17 | 8 years ago |
|
|
acab5bdb77 | 8 years ago |
|
|
fc31826bee | 8 years ago |
|
|
2739fe63ea | 8 years ago |
|
|
b565275386 | 8 years ago |
|
|
b830ab2082 | 8 years ago |
|
|
57ee00c4eb | 8 years ago |
|
|
9a6c432032 | 8 years ago |
|
|
99cfb7c936 | 8 years ago |
|
|
1b4a1a8387 | 8 years ago |
|
|
2579f2a63d | 8 years ago |
|
|
7be8cfda27 | 8 years ago |
|
|
e7cd0b4352 | 8 years ago |
|
|
02acc8902a | 8 years ago |
|
|
537c2e5280 | 8 years ago |
|
|
acfd524f02 | 8 years ago |
|
|
9482af743c | 8 years ago |
|
|
887b780279 | 8 years ago |
|
|
a357ccb313 | 8 years ago |
|
|
1908524f49 | 8 years ago |
|
|
da310859be | 8 years ago |
|
|
1bfcbbce04 | 8 years ago |
|
|
a7574adf4a | 8 years ago |
|
|
7c49f66217 | 8 years ago |
|
|
a4879a39b7 | 8 years ago |
|
|
b410768536 | 8 years ago |
|
|
9403d1fdce | 8 years ago |
|
|
a3df21909d | 8 years ago |
|
|
9947a93d5a | 8 years ago |
|
|
ac1282e9b1 | 8 years ago |
|
|
25aac78bfd | 8 years ago |
|
|
e29f13eddc | 8 years ago |
|
|
ab53cd15bb | 8 years ago |
|
|
12cfc06ca0 | 8 years ago |
|
|
9d80f64911 | 8 years ago |
|
|
859c5b5ef0 | 8 years ago |
|
|
6f9234d103 | 8 years ago |
|
|
5d3610cb0c | 8 years ago |
|
|
04761668e7 | 8 years ago |
|
|
20a1d863c9 | 8 years ago |
|
|
49a734780d | 8 years ago |
|
|
427708e466 | 8 years ago |
|
|
e385265281 | 8 years ago |
|
|
c3137325dc | 8 years ago |
|
|
6fa50ed3b2 | 8 years ago |
|
|
8c712ed0ae | 8 years ago |
|
|
d3144e29f1 | 8 years ago |
|
|
a20b3e8ef4 | 8 years ago |
|
|
c982daee87 | 8 years ago |
|
|
10c76aedc8 | 8 years ago |
|
|
9109a90f79 | 8 years ago |
|
|
ac3ac996da | 8 years ago |
|
|
4bb326bcc3 | 8 years ago |
|
|
ba4c1acdb5 | 8 years ago |
|
|
b14fe05fee | 8 years ago |
|
|
fd73eda5b8 | 8 years ago |
|
|
97b5797881 | 8 years ago |
|
|
a1543457ea | 8 years ago |
|
|
93c7f0beaa | 8 years ago |
|
|
4a231d05d0 | 8 years ago |
|
|
2cb43abeeb | 8 years ago |
|
|
4032f74012 | 8 years ago |
|
|
4ce69ae74b | 8 years ago |
|
|
b4c318be09 | 8 years ago |
|
|
9baa0de055 | 8 years ago |
|
|
8156b5be94 | 8 years ago |
|
|
791b5a59a4 | 8 years ago |
|
|
fad57cbe95 | 8 years ago |
|
|
79585e0b3b | 8 years ago |
|
|
c368d4e44c | 8 years ago |
|
|
d8a6ff6fd2 | 8 years ago |
|
|
b1312c5a84 | 8 years ago |
|
|
61bdad040a | 8 years ago |
|
|
185310642a | 8 years ago |
|
|
d33960859e | 8 years ago |
|
|
68e5552ccd | 8 years ago |
|
|
97e86d96a0 | 8 years ago |
|
|
8e5669986b | 8 years ago |
|
|
20422bf3d3 | 8 years ago |
|
|
8122117979 | 8 years ago |
|
|
13d6132d9e | 8 years ago |
|
|
a55dc42bcd | 8 years ago |
|
|
4e84af8505 | 8 years ago |
|
|
d337ab0d0f | 8 years ago |
|
|
709fc1093b | 8 years ago |
|
|
22027a151d | 8 years ago |
|
|
59fd73cd23 | 8 years ago |
|
|
db4adf11be | 8 years ago |
|
|
2143a1da4c | 8 years ago |
|
|
86050a031e | 8 years ago |
|
|
3165707175 | 8 years ago |
|
|
1baab50fb9 | 8 years ago |
|
|
43ef3c88c1 | 8 years ago |
|
|
d200ec664d | 8 years ago |
|
|
bbe9741cab | 8 years ago |
|
|
a832cffb2e | 8 years ago |
|
|
a1521085a9 | 8 years ago |
|
|
17d295e063 | 8 years ago |
|
|
511e6c266e | 8 years ago |
|
|
ae6bb0a5fd | 8 years ago |
|
|
84a9f92022 | 8 years ago |
|
|
bd3cf637c3 | 8 years ago |
|
|
91b9ac4a3a | 8 years ago |
|
|
3f2bc28b88 | 8 years ago |
|
|
0b81706fda | 8 years ago |
|
|
d78d066f37 | 8 years ago |
|
|
04fa1cd725 | 8 years ago |
|
|
7c10f2564c | 8 years ago |
|
|
6e447a6f1e | 8 years ago |
|
|
2d0fec5910 | 8 years ago |
|
|
23476f090c | 8 years ago |
|
|
f7aa824d8c | 8 years ago |
|
|
f7d49c80fc | 8 years ago |
|
|
5bedc82384 | 8 years ago |
|
|
9bc93031d1 | 8 years ago |
|
|
ac381ec657 | 8 years ago |
|
|
d694ef61e6 | 8 years ago |
|
|
46cc4f6407 | 8 years ago |
|
|
eebf98cb25 | 8 years ago |
|
|
fe3c5df2b2 | 8 years ago |
|
|
10e0f717e1 | 8 years ago |
|
|
4a5940ebbe | 8 years ago |
|
|
9dfeb73304 | 8 years ago |
|
|
f565bad364 | 8 years ago |
|
|
455d27f58b | 8 years ago |
|
|
afbb00d080 | 8 years ago |
|
|
622d7a8b8e | 8 years ago |
|
|
24c92cad8a | 8 years ago |
|
|
b2f39d9217 | 8 years ago |
|
|
1b441ed450 | 8 years ago |
|
|
a9f19bc0df | 8 years ago |
|
|
ac8d676f1f | 8 years ago |
|
|
91147c3df1 | 8 years ago |
|
|
c7030d723d | 8 years ago |
|
|
77619e410c | 8 years ago |
|
|
da697aa981 | 8 years ago |
|
|
2a43c2b258 | 8 years ago |
|
|
afbb714c63 | 8 years ago |
|
|
779d48027e | 8 years ago |
|
|
c1f108fca8 | 8 years ago |
|
|
717850b968 | 8 years ago |
|
|
2d75b793dc | 8 years ago |
|
|
5b6b7d4905 | 8 years ago |
|
|
9dd25235a6 | 8 years ago |
|
|
5ab635abef | 8 years ago |
|
|
4d4d3fa673 | 8 years ago |
|
|
e64b16805f | 8 years ago |
|
|
fb6cf1573d | 8 years ago |
|
|
1ba343eb2a | 8 years ago |
|
|
91c95fb05e | 8 years ago |
|
|
ce214a2f33 | 8 years ago |
|
|
187ac7b81f | 8 years ago |
|
|
9df7ebd23e | 8 years ago |
|
|
8cace47ba0 | 8 years ago |
|
|
4d0b3a9461 | 8 years ago |
|
|
e3af9fa7a7 | 8 years ago |
|
|
99aedf0a69 | 8 years ago |
|
|
59e9787d79 | 8 years ago |
|
|
8fa4caad35 | 8 years ago |
|
|
28601a13fe | 8 years ago |
|
|
98d2e20a37 | 8 years ago |
|
|
9bd97c1c4e | 8 years ago |
|
|
b3f8512cd9 | 8 years ago |
|
|
2763fb32f1 | 8 years ago |
|
|
30f6204f1b | 8 years ago |
|
|
2e94b4713d | 8 years ago |
|
|
baf1b498aa | 8 years ago |
|
|
483da09343 | 8 years ago |
|
|
1ad28d06cc | 8 years ago |
|
|
68c0351ad9 | 8 years ago |
|
|
5317ba6a90 | 8 years ago |
|
|
672850617c | 8 years ago |
|
|
5ba2577eda | 8 years ago |
|
|
ec40a253ce | 8 years ago |
|
|
c16ec17ed5 | 8 years ago |
|
|
ceb4e08a59 | 8 years ago |
|
|
3f552e3627 | 8 years ago |
|
|
c1363f1eac | 8 years ago |
|
|
c24c1c7f86 | 8 years ago |
|
|
1e22eedcf0 | 8 years ago |
|
|
397f71b7a8 | 8 years ago |
|
|
fa5203ffca | 8 years ago |
|
|
3d00db045b | 8 years ago |
|
|
0582d79891 | 8 years ago |
|
|
f23dc2968e | 8 years ago |
|
|
ba2a25629d | 8 years ago |
|
|
492226f6f2 | 8 years ago |
|
|
f7bb67a10e | 8 years ago |
|
|
53bf4553ed | 8 years ago |
|
|
12c5817b35 | 8 years ago |
|
|
fd875d007e | 8 years ago |
|
|
98715ac796 | 8 years ago |
|
|
98906feb35 | 8 years ago |
|
|
fde0cb81eb | 8 years ago |
|
|
cfa9d8c075 | 8 years ago |
|
|
bf811d5861 | 8 years ago |
|
|
ec54f2b7e6 | 8 years ago |
|
|
78eda400df | 8 years ago |
|
|
ecfcf07598 | 8 years ago |
|
|
34b135aca8 | 8 years ago |
|
|
e2a9d615ad | 8 years ago |
|
|
788bad0251 | 8 years ago |
|
|
7d6873c33a | 8 years ago |
|
|
aba5eda22f | 8 years ago |
|
|
8692b8389d | 8 years ago |
|
|
4df9f98b10 | 8 years ago |
|
|
549da97968 | 8 years ago |
|
|
5d54b47467 | 8 years ago |
|
|
f7912cc65a | 8 years ago |
|
|
4467c1dc3d | 8 years ago |
|
|
968c975fba | 8 years ago |
|
|
9ddfa02f1d | 8 years ago |
|
|
b76851c5ec | 8 years ago |
|
|
25f30bb27b | 8 years ago |
|
|
347df01125 | 8 years ago |
|
|
61a4cc293e | 8 years ago |
|
|
0df2cc9212 | 8 years ago |
|
|
62dc4853fb | 8 years ago |
|
|
8f06e7b532 | 8 years ago |
|
|
b0cbb4ef09 | 8 years ago |
|
|
9d98848584 | 8 years ago |
|
|
f8803ed15d | 8 years ago |
|
|
8a2755e785 | 8 years ago |
|
|
373d645a59 | 8 years ago |
|
|
cf2be49a92 | 8 years ago |
|
|
d47b3213cb | 8 years ago |
|
|
a52e11068f | 8 years ago |
|
|
71fdb9a479 | 8 years ago |
|
|
17fb3a9db6 | 8 years ago |
|
|
4ccf47d450 | 8 years ago |
|
|
c06ef56e4a | 8 years ago |
|
|
3c4a4dc664 | 8 years ago |
|
|
b86ef10a67 | 8 years ago |
|
|
ac80a4d24b | 8 years ago |
|
|
879b127a02 | 8 years ago |
|
|
6b37fd6515 | 8 years ago |
|
|
f86ed79392 | 8 years ago |
|
|
544f6c3a51 | 8 years ago |
|
|
9e4af63c9d | 8 years ago |
|
|
f5b44b5ad6 | 8 years ago |
|
|
8b1f1cae7c | 8 years ago |
|
|
8c7cd6afea | 8 years ago |
|
|
2c97344dcc | 8 years ago |
|
|
228b7a8cb1 | 8 years ago |
|
|
948a633a7c | 8 years ago |
|
|
3316130a7c | 8 years ago |
|
|
e06e04987d | 8 years ago |
|
|
cc90683cce | 8 years ago |
|
|
a4d9e88981 | 8 years ago |
|
|
ece48618f8 | 8 years ago |
|
|
9039870bad | 8 years ago |
|
|
beac750c8e | 8 years ago |
|
|
41206baea6 | 8 years ago |
|
|
530e687e34 | 8 years ago |
|
|
ac0d27be2e | 8 years ago |
|
|
8855c3561f | 8 years ago |
|
|
bf332be818 | 8 years ago |
|
|
3eec7faf6b | 8 years ago |
|
|
8819a6e75c | 8 years ago |
|
|
8a8b7243d0 | 8 years ago |
|
|
6a27b55f0f | 8 years ago |
|
|
e6c1a8d52d | 8 years ago |
|
|
15b57af3fc | 8 years ago |
|
|
058ad8fe38 | 8 years ago |
|
|
6484671eeb | 8 years ago |
|
|
f314649f10 | 8 years ago |
|
|
1f371ad7d0 | 8 years ago |
|
|
90711ae9e0 | 8 years ago |
|
|
1c068848bf | 8 years ago |
|
|
9b787804b8 | 8 years ago |
|
|
72ff2a9f8e | 8 years ago |
|
|
1403f71ed9 | 8 years ago |
|
|
37e17f25cb | 8 years ago |
|
|
892bf6e31a | 8 years ago |
|
|
05c7c40bec | 8 years ago |
|
|
28ba2b4d14 | 8 years ago |
|
|
440b5c2179 | 8 years ago |
|
|
9f7b54af3a | 8 years ago |
|
|
ba4621a5ab | 8 years ago |
|
|
62fecf3ec0 | 8 years ago |
|
|
feaaae0e6e | 8 years ago |
|
|
da7d8dd99b | 8 years ago |
|
|
e23791ad7e | 8 years ago |
|
|
55ddf4df5c | 8 years ago |
|
|
b7213c6c42 | 8 years ago |
|
|
4fc7ced98a | 8 years ago |
|
|
c52963d821 | 8 years ago |
|
|
73a7571e1c | 8 years ago |
|
|
a207fad6a0 | 8 years ago |
|
|
8d4b6ba725 | 8 years ago |
|
|
eb966d259d | 8 years ago |
|
|
4243480f26 | 8 years ago |
|
|
2c531e947f | 8 years ago |
|
|
9a3e12121c | 8 years ago |
|
|
2f1b05f79c | 8 years ago |
|
|
60835f4b22 | 8 years ago |
|
|
bc76386c9d | 8 years ago |
|
|
950d034222 | 8 years ago |
|
|
5a11d679c9 | 8 years ago |
|
|
1543163b03 | 8 years ago |
|
|
27c8f9bb72 | 8 years ago |
|
|
5af7a448a5 | 8 years ago |
|
|
714432dc13 | 8 years ago |
|
|
14114eda56 | 8 years ago |
|
|
ca3c5ff5e8 | 8 years ago |
|
|
503e9ea620 | 8 years ago |
|
|
0830c5fcd3 | 8 years ago |
|
|
85f3500293 | 8 years ago |
|
|
85a4ccdeb8 | 8 years ago |
|
|
5e0af2d25b | 8 years ago |
|
|
b3fb917bcd | 8 years ago |
|
|
74f8abce16 | 8 years ago |
|
|
7058a352aa | 8 years ago |
|
|
c17e10dc87 | 8 years ago |
|
|
741ac2d974 | 8 years ago |
|
|
28f8dfcb0c | 8 years ago |
|
|
bb9a8b02e4 | 8 years ago |
|
|
465979bbb8 | 8 years ago |
|
|
4a09aec09f | 8 years ago |
|
|
4542879955 | 8 years ago |
|
|
1ff86b06ac | 8 years ago |
|
|
49ce931c00 | 8 years ago |
|
|
0c5ef2fc38 | 8 years ago |
|
|
c307d1a7a3 | 8 years ago |
|
|
0a75786944 | 8 years ago |
|
|
226250e39f | 8 years ago |
|
|
910c547b66 | 8 years ago |
|
|
a313656e8c | 8 years ago |
|
|
3719a70900 | 8 years ago |
|
|
f9a0463ca9 | 8 years ago |
|
|
57865e2ab2 | 8 years ago |
|
|
86e1afdd9d | 8 years ago |
|
|
39a2ab694b | 8 years ago |
|
|
b3faa927a9 | 8 years ago |
|
|
6fb79ef139 | 8 years ago |
|
|
2d9f93ec3f | 8 years ago |
|
|
bf62df1846 | 8 years ago |
|
|
098dba0eb8 | 8 years ago |
|
|
325a6d1c6c | 8 years ago |
|
|
c79049e32d | 8 years ago |
|
|
95fe598198 | 8 years ago |
|
|
1cf78995d2 | 8 years ago |
|
|
6eb16ffc96 | 8 years ago |
|
|
b6567adf08 | 8 years ago |
|
|
3bf5a3a227 | 8 years ago |
|
|
dbdd42a547 | 8 years ago |
|
|
7d09f402a0 | 8 years ago |
|
|
818efcfa65 | 8 years ago |
|
|
c219d0fcaf | 8 years ago |
|
|
4fd3f40f0f | 8 years ago |
|
|
743156e3c8 | 8 years ago |
|
|
0506265ac9 | 8 years ago |
|
|
29ae4e17b0 | 8 years ago |
|
|
cff6f0f0de | 8 years ago |
|
|
79b9b2a7c1 | 8 years ago |
|
|
fbed66c9eb | 8 years ago |
|
|
1cf01477b9 | 8 years ago |
|
|
c7529da4c1 | 8 years ago |
|
|
d7d6fab869 | 8 years ago |
|
|
f9a15e061d | 8 years ago |
|
|
60b2186265 | 8 years ago |
|
|
1e908a9b33 | 8 years ago |
|
|
1cdf9f3c62 | 8 years ago |
|
|
8f436d4a9b | 8 years ago |
|
|
3cf390b6cc | 8 years ago |
|
|
7fb93b2eb0 | 8 years ago |
|
|
40bcae03a6 | 8 years ago |
|
|
95fe0f1d06 | 8 years ago |
|
|
089545c37a | 8 years ago |
|
|
f6aab4a560 | 8 years ago |
|
|
7450f6ac70 | 8 years ago |
|
|
1ac3c20b6b | 8 years ago |
|
|
d9601f27a0 | 8 years ago |
|
|
e44ef7ddce | 8 years ago |
|
|
f4f4a84af4 | 8 years ago |
|
|
b30e5fd131 | 8 years ago |
|
|
c68b5fd6c9 | 8 years ago |
|
|
a83f9e1d43 | 8 years ago |
|
|
3359b9f8af | 8 years ago |
|
|
ee3177e994 | 8 years ago |
|
|
13a877f566 | 8 years ago |
|
|
3bf9912b8c | 8 years ago |
|
|
24873185e9 | 8 years ago |
|
|
a44f3c42f0 | 8 years ago |
|
|
fd4f27b591 | 8 years ago |
|
|
648550166f | 8 years ago |
|
|
256c0d728c | 8 years ago |
|
|
9726e211e5 | 8 years ago |
|
|
76a3d14024 | 8 years ago |
|
|
131e1589e5 | 8 years ago |
|
|
9cb42efdbc | 8 years ago |
|
|
e483f4844a | 8 years ago |
|
|
79a7c08641 | 8 years ago |
|
|
37689b6ccb | 8 years ago |
|
|
321854e921 | 8 years ago |
|
|
a2ad1b9807 | 8 years ago |
|
|
7b7957abd9 | 8 years ago |
|
|
3969a770d9 | 8 years ago |
|
|
b3697d0818 | 8 years ago |
|
|
d54b08f50a | 8 years ago |
|
|
a0b4949188 | 8 years ago |
|
|
0af1d28444 | 8 years ago |
|
|
a64249c045 | 8 years ago |
|
|
3995ab006e | 8 years ago |
|
|
d483f27e3f | 8 years ago |
|
|
41ecf2936d | 8 years ago |
|
|
df258a89eb | 8 years ago |
|
|
cedef4d8de | 8 years ago |
|
|
c370484d35 | 8 years ago |
|
|
50ef089cd7 | 8 years ago |
|
|
6d5bd5182e | 8 years ago |
|
|
2a7fb87311 | 8 years ago |
|
|
7e6aae28a3 | 8 years ago |
|
|
42f2338ef6 | 8 years ago |
|
|
f11db5f813 | 8 years ago |
|
|
9f29bcac34 | 8 years ago |
|
|
676c971528 | 8 years ago |
|
|
4d364b4d98 | 8 years ago |
|
|
0b4b6ccf18 | 8 years ago |
|
|
473762c911 | 8 years ago |
|
|
475fe4dbc4 | 8 years ago |
|
|
3387376cc4 | 8 years ago |
|
|
cb56b21e32 | 8 years ago |
|
|
e8ae4eb2e5 | 8 years ago |
|
|
b91282d355 | 8 years ago |
|
|
be7b30de72 | 8 years ago |
|
|
031aba0d29 | 9 years ago |
|
|
182a81e822 | 9 years ago |
|
|
10b7a79b70 | 9 years ago |
|
|
e0d1cc87a4 | 9 years ago |
|
|
a21af53acf | 9 years ago |
|
|
1369a7b2f4 | 9 years ago |
|
|
e19721aaf0 | 9 years ago |
|
|
5dd188e597 | 9 years ago |
|
|
80faf8ab59 | 9 years ago |
|
|
92f1f60c15 | 9 years ago |
|
|
95e195b9a0 | 9 years ago |
|
|
757078386a | 9 years ago |
|
|
958c5f5665 | 9 years ago |
|
|
48fad23e41 | 9 years ago |
|
|
5119bd2bb0 | 9 years ago |
|
|
8de497fbac | 9 years ago |
|
|
ed2bfcdb0f | 9 years ago |
|
|
36ebef5135 | 9 years ago |
|
|
6140571f5a | 9 years ago |
|
|
a1995b258f | 9 years ago |
|
|
8f79877e6d | 9 years ago |
|
|
2174b3fe2b | 9 years ago |
|
|
4a09c49886 | 9 years ago |
|
|
ea36dbe4c0 | 9 years ago |
|
|
2d9bfe33d2 | 9 years ago |
|
|
a3f2b8e60e | 9 years ago |
|
|
3a8b11b6b4 | 9 years ago |
|
|
3bd8a7cdf0 | 9 years ago |
|
|
6ee1fdf969 | 9 years ago |
|
|
e993a58713 | 9 years ago |
|
|
bf58464094 | 9 years ago |
|
|
14afad7ab0 | 9 years ago |
|
|
d983df012d | 9 years ago |
|
|
740a637195 | 9 years ago |
|
|
83f0be4e08 | 9 years ago |
|
|
972aa7b135 | 9 years ago |
|
|
ba82a12196 | 9 years ago |
|
|
4764fd1ada | 9 years ago |
|
|
ae598a0949 | 9 years ago |
|
|
197ed10fff | 9 years ago |
|
|
9091421c0b | 9 years ago |
|
|
d1f6e1a6d0 | 9 years ago |
|
|
b8c3248cd9 | 9 years ago |
|
|
312372202c | 9 years ago |
|
|
8fa51af149 | 9 years ago |
|
|
d2db7150b9 | 9 years ago |
|
|
950b47a064 | 9 years ago |
|
|
a13413c12e | 9 years ago |
|
|
1aa282fe19 | 9 years ago |
|
|
1a71dede1f | 9 years ago |
|
|
1d5e29ca7b | 9 years ago |
|
|
f767d81840 | 9 years ago |
|
|
8ac21af6aa | 9 years ago |
|
|
866afa84b7 | 9 years ago |
|
|
1b52a1c27c | 9 years ago |
|
|
33118a4f67 | 9 years ago |
|
|
89bd3797f3 | 9 years ago |
|
|
45930c5dca | 9 years ago |
|
|
2739e82299 | 9 years ago |
|
|
4d4f647e6a | 9 years ago |
|
|
31ec224992 | 9 years ago |
|
|
22a7a0752f | 9 years ago |
|
|
67467e9c46 | 9 years ago |
|
|
a9555dc90d | 9 years ago |
|
|
4b6d8bb8b2 | 9 years ago |
|
|
926064e027 | 9 years ago |
|
|
0864a145b6 | 9 years ago |
|
|
49f112233b | 9 years ago |
|
|
2e8514098e | 9 years ago |
|
|
ca0fbd6425 | 9 years ago |
|
|
951ae5c13d | 9 years ago |
|
|
80f8bd4cd0 | 9 years ago |
|
|
eb21c5cf4e | 9 years ago |
|
|
af4ebd87e6 | 9 years ago |
|
|
ae51d16dae | 9 years ago |
|
|
d683b32afa | 9 years ago |
|
|
ebaf72ad3c | 9 years ago |
|
|
d04b3235e1 | 9 years ago |
|
|
4b41369ae7 | 9 years ago |
|
|
18254ab51c | 9 years ago |
|
|
a063f7894c | 9 years ago |
|
|
9441c7c582 | 9 years ago |
|
|
7e3f0f2ff6 | 9 years ago |
|
|
363b290ae0 | 9 years ago |
|
|
e871c7dd92 | 9 years ago |
|
|
bb7280640c | 9 years ago |
|
|
75ac224da9 | 9 years ago |
@ -1,6 +1,17 @@
|
||||
*/.DS_Store
|
||||
.DS_Store
|
||||
/vendor
|
||||
/config/.config.php
|
||||
/.idea
|
||||
storage/qqwry.md5
|
||||
vendor
|
||||
config/.config.php
|
||||
config/.config.php.bak
|
||||
404.html
|
||||
index.html
|
||||
public/ssr-download/
|
||||
public/images/*.*
|
||||
public/theme/material/css/images/bg
|
||||
storage/trimepay_notify.log
|
||||
storage/traffic_notified/
|
||||
.idea
|
||||
storage/qqwry.*
|
||||
.vs/
|
||||
.htaccess
|
||||
php_errors.log
|
||||
@ -0,0 +1,33 @@
|
||||
language: php
|
||||
php:
|
||||
# - '5.4'
|
||||
# - '5.6'
|
||||
- '7.1'
|
||||
sudo: enabled
|
||||
dist: xenial
|
||||
before_install:
|
||||
- echo "==========================================================="
|
||||
- echo "Upgrade linux packages"
|
||||
- echo "==========================================================="
|
||||
- sudo sed -i 's|http://us-east-1.ec2.archive.ubuntu.com|https://ubuntu.mirror.noc.one|g' /etc/apt/sources.list
|
||||
- sudo sed -i 's|http://security.ubuntu.com|https://ubuntu.mirror.noc.one|g' /etc/apt/sources.list
|
||||
- sudo sed -i 's|http://us-central1.gce.archive.ubuntu.com|https://ubuntu.mirror.noc.one|g' /etc/apt/sources.list
|
||||
- sudo sed -i 's|http://ppa.launchpad.net|https://launchpad.proxy.noc.one|g' /etc/apt/sources.list.d/*.list
|
||||
- curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
|
||||
- sudo apt upgrade
|
||||
- sudo apt install -y nodejs
|
||||
- composer config -g repos.packagist composer https://packagist.noc.one
|
||||
install:
|
||||
- sudo chmod -R 755 *
|
||||
- echo "==========================================================="
|
||||
- echo "Comoposer install"
|
||||
- echo "==========================================================="
|
||||
- php composer.phar install
|
||||
before_script:
|
||||
- npm i -g phplint
|
||||
script:
|
||||
- cp config/.config.php.example config/.config.php
|
||||
- phplint '**/*.php' '!vendor/**'
|
||||
- php xcat initdownload
|
||||
- php xcat initQQWry
|
||||
- php xcat update
|
||||
@ -0,0 +1,223 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Ann;
|
||||
use App\Models\Code;
|
||||
use App\Services\Config;
|
||||
use App\Services\Mail;
|
||||
use App\Services\Analytics;
|
||||
use App\Utils\Telegram;
|
||||
use App\Utils\Tools;
|
||||
|
||||
use Ozdemir\Datatables\Datatables;
|
||||
use App\Utils\DatatablesHelper;
|
||||
|
||||
class FinanceMail
|
||||
{
|
||||
public static function sendFinanceMail_day()
|
||||
{
|
||||
$datatables = new Datatables(new DatatablesHelper());
|
||||
$datatables->query(
|
||||
'select code.number, code.userid, code.usedatetime from code
|
||||
where TO_DAYS(NOW()) - TO_DAYS(code.usedatetime) = 1 and code.type = -1 and code.isused= 1');
|
||||
$text_json=$datatables->generate();
|
||||
$text_array=json_decode($text_json,true);
|
||||
$codes=$text_array['data'];
|
||||
$text_html='<table border=1><tr><td>金额</td><td>用户ID</td><td>用户名</td><td>充值时间</td>';
|
||||
$income_count=0;
|
||||
$income_total=0.00;
|
||||
foreach($codes as $code){
|
||||
$text_html.='<tr>';
|
||||
$text_html.='<td>'.$code['number'].'</td>';
|
||||
$text_html.='<td>'.$code['userid'].'</td>';
|
||||
$user=User::find($code['userid']);
|
||||
$text_html.='<td>'.$user->user_name.'</td>';
|
||||
$text_html.='<td>'.$code['usedatetime'].'</td>';
|
||||
$text_html.='</tr>';
|
||||
$income_count+=1;
|
||||
$income_total+=$code['number'];
|
||||
}
|
||||
//易付通的单独表
|
||||
$datatables2 = new Datatables(new DatatablesHelper());
|
||||
$datatables2->query('select COUNT(*) as "count_yft" from INFORMATION_SCHEMA.TABLES where TABLE_NAME = "yft_order_info"');
|
||||
$count_yft=$datatables2->generate();
|
||||
if(strpos($count_yft,'"count_yft":1')){
|
||||
$datatables2->query(
|
||||
'select yft_order_info.price, yft_order_info.user_id, yft_order_info.create_time from yft_order_info
|
||||
where TO_DAYS(NOW()) - TO_DAYS(yft_order_info.create_time) = 1 and yft_order_info.state= 1');
|
||||
$text_json2=$datatables2->generate();
|
||||
$text_array2=json_decode($text_json2,true);
|
||||
$codes2=$text_array2['data'];
|
||||
foreach($codes2 as $code2){
|
||||
$text_html.='<tr>';
|
||||
$text_html.='<td>'.$code2['price'].'</td>';
|
||||
$text_html.='<td>'.$code2['user_id'].'</td>';
|
||||
$user=User::find($code2['user_id']);
|
||||
$text_html.='<td>'.$user->user_name.'</td>';
|
||||
$text_html.='<td>'.$code2['create_time'].'</td>';
|
||||
$text_html.='</tr>';
|
||||
$income_count+=1;
|
||||
$income_total+=$code['price'];
|
||||
}
|
||||
}
|
||||
$text_html.='</table>';
|
||||
$text_html.='<br>昨日总收入笔数:'.$income_count.'<br>昨日总收入金额:'.$income_total;
|
||||
|
||||
$adminUser = User::where("is_admin", "=", "1")->get();
|
||||
foreach ($adminUser as $user) {
|
||||
echo "Send offline mail to user: ".$user->id;
|
||||
$subject = Config::get('appName')."-财务日报";
|
||||
$to = $user->email;
|
||||
$title='财务日报';
|
||||
$text = $text_html;
|
||||
try {
|
||||
Mail::send($to, $subject, 'news/finance.tpl', [
|
||||
"user" => $user,"title"=>$title,"text" => $text
|
||||
], [
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
if (Config::get("finance_public")=="true") {
|
||||
$sts = new Analytics();
|
||||
Telegram::Send(
|
||||
"新鲜出炉的财务日报~".PHP_EOL.
|
||||
"昨日总收入笔数:".$income_count.PHP_EOL.
|
||||
"昨日总收入金额:".$income_total.PHP_EOL.
|
||||
"凌晨也在努力工作~"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static function sendFinanceMail_week()
|
||||
{
|
||||
$datatables = new Datatables(new DatatablesHelper());
|
||||
$datatables->query(
|
||||
'select code.number from code
|
||||
where yearweek(date_format(code.usedatetime,\'%Y-%m-%d\')) = yearweek(now())-1 and code.isused= 1');
|
||||
//每周的第一天是周日,因此统计周日~周六的七天
|
||||
$text_json=$datatables->generate();
|
||||
$text_array=json_decode($text_json,true);
|
||||
$codes=$text_array['data'];
|
||||
$text_html='';
|
||||
$income_count=0;
|
||||
$income_total=0.00;
|
||||
foreach($codes as $code){
|
||||
$income_count+=1;
|
||||
$income_total+=$code['number'];
|
||||
}
|
||||
//易付通的单独表
|
||||
$datatables2 = new Datatables(new DatatablesHelper());
|
||||
$datatables2->query('select COUNT(*) as "count_yft" from INFORMATION_SCHEMA.TABLES where TABLE_NAME = "yft_order_info"');
|
||||
$count_yft=$datatables2->generate();
|
||||
if(strpos($count_yft,'"count_yft":1')){
|
||||
$datatables2->query(
|
||||
'select yft_order_info.price from yft_order_info
|
||||
where yearweek(date_format(yft_order_info.create_time,\'%Y-%m-%d\')) = yearweek(now())-1 and yft_order_info.state= 1');
|
||||
//每周的第一天是周日,因此统计周日~周六的七天
|
||||
$text_json2=$datatables2->generate();
|
||||
$text_array2=json_decode($text_json2,true);
|
||||
$codes2=$text_array2['data'];
|
||||
foreach($codes2 as $code2){
|
||||
$income_count+=1;
|
||||
$income_total+=$code2['price'];
|
||||
}
|
||||
}
|
||||
|
||||
$text_html.='<br>上周总收入笔数:'.$income_count.'<br>上周总收入金额:'.$income_total;
|
||||
|
||||
$adminUser = User::where("is_admin", "=", "1")->get();
|
||||
foreach ($adminUser as $user) {
|
||||
echo "Send offline mail to user: ".$user->id;
|
||||
$subject = Config::get('appName').'-财务周报';
|
||||
$to = $user->email;
|
||||
$title='财务周报';
|
||||
$text = $text_html;
|
||||
try {
|
||||
Mail::send($to, $subject, 'news/finance.tpl', [
|
||||
"user" => $user,"title"=>$title,"text" => $text
|
||||
], [
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
if (Config::get("finance_public")=="true") {
|
||||
$sts = new Analytics();
|
||||
Telegram::Send(
|
||||
"新鲜出炉的财务周报~".PHP_EOL.
|
||||
"上周总收入笔数:".$income_count.PHP_EOL.
|
||||
"上周总收入金额:".$income_total.PHP_EOL.
|
||||
"周末也在努力工作~"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static function sendFinanceMail_month()
|
||||
{
|
||||
$datatables = new Datatables(new DatatablesHelper());
|
||||
$datatables->query(
|
||||
'select code.number from code
|
||||
where date_format(code.usedatetime,\'%Y-%m\')=date_format(date_sub(curdate(), interval 1 month),\'%Y-%m\') and code.type = -1 and code.isused= 1');
|
||||
$text_json=$datatables->generate();
|
||||
$text_array=json_decode($text_json,true);
|
||||
$codes=$text_array['data'];
|
||||
$text_html='';
|
||||
$income_count=0;
|
||||
$income_total=0.00;
|
||||
foreach($codes as $code){
|
||||
$income_count+=1;
|
||||
$income_total+=$code['number'];
|
||||
}
|
||||
$datatables2 = new Datatables(new DatatablesHelper());
|
||||
$datatables2->query('select COUNT(*) as "count_yft" from INFORMATION_SCHEMA.TABLES where TABLE_NAME = "yft_order_info"');
|
||||
$count_yft=$datatables2->generate();
|
||||
if(strpos($count_yft,'"count_yft":1')){
|
||||
$datatables2->query(
|
||||
'select yft_order_info.price from yft_order_info
|
||||
where date_format(yft_order_info.create_time,\'%Y-%m\') =date_format(date_sub(curdate(), interval 1 month),\'%Y-%m\') and yft_order_info.state= 1');
|
||||
//每周的第一天是周日,因此统计周日~周六的七天
|
||||
$text_json2=$datatables2->generate();
|
||||
$text_array2=json_decode($text_json2,true);
|
||||
$codes2=$text_array2['data'];
|
||||
foreach($codes2 as $code2){
|
||||
$income_count+=1;
|
||||
$income_total+=$code2['price'];
|
||||
}
|
||||
}
|
||||
$text_html.='<br>上月总收入笔数:'.$income_count.'<br>上月总收入金额:'.$income_total;
|
||||
|
||||
$adminUser = User::where("is_admin", "=", "1")->get();
|
||||
foreach ($adminUser as $user) {
|
||||
echo "Send offline mail to user: ".$user->id;
|
||||
$subject = Config::get('appName').'-财务月报';
|
||||
$to = $user->email;
|
||||
$title='财务月报';
|
||||
$text = $text_html;
|
||||
try {
|
||||
Mail::send($to, $subject, 'news/finance.tpl', [
|
||||
"user" => $user,"title"=>$title,"text" => $text
|
||||
], [
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
if (Config::get("finance_public")=="true") {
|
||||
$sts = new Analytics();
|
||||
Telegram::Send(
|
||||
"新鲜出炉的财务月报~".PHP_EOL.
|
||||
"上月总收入笔数:".$income_count.PHP_EOL.
|
||||
"上月总收入金额:".$income_total.PHP_EOL.
|
||||
"月初也在努力工作~"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: kaguya
|
||||
* Date: 2018/06/30
|
||||
* Time: 21:40
|
||||
*/
|
||||
|
||||
namespace App\Controllers\Client;
|
||||
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Controllers\LinkController;
|
||||
use App\Models\Ann;
|
||||
use App\Models\User;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Services\Factory;
|
||||
use App\Utils\Helper;
|
||||
|
||||
class ClientApiController extends BaseController
|
||||
{
|
||||
public function GetAnnouncement($request, $response, $args)
|
||||
{
|
||||
$accessToken = Helper::getTokenFromReq($request);
|
||||
$storage = Factory::createTokenStorage();
|
||||
$token = $storage->get($accessToken);
|
||||
$user = User::find($token->userId);
|
||||
$Anns = Ann::orderBy('date', 'desc')->first();
|
||||
$res['ret'] = 1;
|
||||
$res['msg'] = "ok";
|
||||
$res['data'] = $Anns;
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
|
||||
public function Redirect($request, $response, $args){
|
||||
$user = Auth::getUser();
|
||||
$url = $request->getQueryParams()["target"];
|
||||
if(!$user->isLogin){
|
||||
$accessToken = Helper::getTokenFromReq($request);
|
||||
$storage = Factory::createTokenStorage();
|
||||
$token = $storage->get($accessToken);
|
||||
if ($token==null) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = "token is null";
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
$user = User::find($token->userId);
|
||||
$time = 3600*24;
|
||||
Auth::login($user->id, $time);
|
||||
}
|
||||
return $response->withRedirect($url);
|
||||
}
|
||||
|
||||
public function GetSubLink($request, $response, $args)
|
||||
{
|
||||
$accessToken = Helper::getTokenFromReq($request);
|
||||
$storage = Factory::createTokenStorage();
|
||||
$token = $storage->get($accessToken);
|
||||
$user = User::find($token->userId);
|
||||
$ssr_sub_token = LinkController::GenerateSSRSubCode($user->id, 0);
|
||||
$mu = 0;
|
||||
if($request->getQueryParams()["mu"]!=""){
|
||||
$mu = $request->getQueryParams()["mu"];
|
||||
}
|
||||
$res['ret'] = 1;
|
||||
$res['msg'] = "ok";
|
||||
$res['data'] = Config::get('baseUrl').'/link/'.$ssr_sub_token.'?mu='.$mu;
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class Config extends Model
|
||||
{
|
||||
protected $connection = "default";
|
||||
protected $table = 'config';
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class WecenterUser extends Model
|
||||
{
|
||||
protected $connection = "wecenter";
|
||||
protected $table = "aws_users";
|
||||
protected $primaryKey = 'uid';
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tonyzou
|
||||
* Date: 2018/9/24
|
||||
* Time: 下午4:23
|
||||
*/
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
use App\Models\Paylist;
|
||||
use App\Models\Payback;
|
||||
use App\Models\User;
|
||||
use App\Models\Code;
|
||||
use App\Services\Config;
|
||||
use App\Utils\Telegram;
|
||||
|
||||
abstract class AbstractPayment
|
||||
{
|
||||
abstract public function purchase($request, $response, $args);
|
||||
abstract public function notify($request, $response, $args);
|
||||
abstract public function getPurchaseHTML();
|
||||
abstract public function getReturnHTML($request, $response, $args);
|
||||
abstract public function getStatus($request, $response, $args);
|
||||
|
||||
public function postPayment($pid, $method){
|
||||
$p = Paylist::where("tradeno", $pid)->first();
|
||||
|
||||
if($p->status==1){
|
||||
return json_encode(['errcode'=>0]);
|
||||
}
|
||||
|
||||
$p->status=1;
|
||||
$p->save();
|
||||
$user = User::find($p->userid);
|
||||
$user->money += $p->total;
|
||||
$user->save();
|
||||
$codeq=new Code();
|
||||
$codeq->code=$method;
|
||||
$codeq->isused=1;
|
||||
$codeq->type=-1;
|
||||
$codeq->number=$p->total;
|
||||
$codeq->usedatetime=date("Y-m-d H:i:s");
|
||||
$codeq->userid=$user->id;
|
||||
$codeq->save();
|
||||
|
||||
if ($user->ref_by >= 1) {
|
||||
$gift_user=User::where("id", "=", $user->ref_by)->first();
|
||||
$gift_user->money=($gift_user->money+($codeq->number*(Config::get('code_payback')/100)));
|
||||
$gift_user->save();
|
||||
$Payback=new Payback();
|
||||
$Payback->total=$codeq->number;
|
||||
$Payback->userid=$user->id;
|
||||
$Payback->ref_by=$user->ref_by;
|
||||
$Payback->ref_get=$codeq->number*(Config::get('code_payback')/100);
|
||||
$Payback->datetime=time();
|
||||
$Payback->save();
|
||||
}
|
||||
|
||||
if (Config::get('enable_donate') == 'true') {
|
||||
if ($user->is_hide == 1) {
|
||||
Telegram::Send("一位不愿透露姓名的大老爷给我们捐了 ".$codeq->number." 元!");
|
||||
} else {
|
||||
Telegram::Send($user->user_name." 大老爷给我们捐了 ".$codeq->number." 元!");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
public static function generateGuid() {
|
||||
mt_srand((double)microtime()*10000);
|
||||
$charid = strtoupper(md5(uniqid(rand() + time(), true)));
|
||||
$hyphen = chr(45);
|
||||
$uuid = chr(123)
|
||||
.substr($charid, 0, 8).$hyphen
|
||||
.substr($charid, 8, 4).$hyphen
|
||||
.substr($charid,12, 4).$hyphen
|
||||
.substr($charid,16, 4).$hyphen
|
||||
.substr($charid,20,12)
|
||||
.chr(125);
|
||||
$uuid = str_replace(['}', '{', '-'],'',$uuid);
|
||||
$uuid = substr($uuid, 0, 8);
|
||||
return $uuid;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tonyzou
|
||||
* Date: 2018/9/24
|
||||
* Time: 下午9:24
|
||||
*/
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\Code;
|
||||
use App\Models\Paylist;
|
||||
use App\Services\View;
|
||||
use Omnipay\Omnipay;
|
||||
|
||||
class AopF2F extends AbstractPayment
|
||||
{
|
||||
private function createGateway(){
|
||||
$gateway = Omnipay::create('Alipay_AopF2F');
|
||||
$gateway->setSignType('RSA2'); //RSA/RSA2
|
||||
$gateway->setAppId(Config::get("f2fpay_app_id"));
|
||||
$gateway->setPrivateKey(Config::get("merchant_private_key")); // 可以是路径,也可以是密钥内容
|
||||
$gateway->setAlipayPublicKey(Config::get("alipay_public_key")); // 可以是路径,也可以是密钥内容
|
||||
$gateway->setNotifyUrl(Config::get("baseUrl")."/payment/notify");
|
||||
|
||||
return $gateway;
|
||||
}
|
||||
|
||||
|
||||
function purchase($request, $response, $args)
|
||||
{
|
||||
$amount = $request->getParam('amount');
|
||||
$user = Auth::getUser();
|
||||
if ($amount == "") {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = "订单金额错误:" . $amount;
|
||||
return $response->getBody()->write(json_encode($res));
|
||||
}
|
||||
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->total = $amount;
|
||||
$pl->save();
|
||||
|
||||
$gateway = self::createGateway();
|
||||
|
||||
$request = $gateway->purchase();
|
||||
$request->setBizContent([
|
||||
'subject' => "¥".$pl->total." - ".Config::get("appName")." - {$user->user_name}({$user->email})",
|
||||
'out_trade_no' => $pl->tradeno,
|
||||
'total_amount' => $pl->total
|
||||
]);
|
||||
|
||||
/** @var \Omnipay\Alipay\Responses\AopTradePreCreateResponse $response */
|
||||
$aliResponse = $request->send();
|
||||
|
||||
// 获取收款二维码内容
|
||||
$qrCodeContent = $aliResponse->getQrCode();
|
||||
|
||||
$return['ret'] = 1;
|
||||
$return['qrcode'] = $qrCodeContent;
|
||||
$return['amount'] = $pl->total;
|
||||
$return['pid'] = $pl->tradeno;
|
||||
|
||||
return json_encode($return);
|
||||
}
|
||||
|
||||
function notify($request, $response, $args)
|
||||
{
|
||||
$gateway = self::createGateway();
|
||||
$aliRequest = $gateway->completePurchase();
|
||||
$aliRequest->setParams($_POST);
|
||||
|
||||
try {
|
||||
/** @var \Omnipay\Alipay\Responses\AopCompletePurchaseResponse $response */
|
||||
$aliResponse = $aliRequest->send();
|
||||
$pid = $aliResponse->data('out_trade_no');
|
||||
if($aliResponse->isPaid()){
|
||||
self::postPayment($pid, "支付宝当面付");
|
||||
die('success'); //The response should be 'success' only
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
die('fail');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getPurchaseHTML()
|
||||
{
|
||||
return View::getSmarty()->fetch("user/aopf2f.tpl");
|
||||
}
|
||||
|
||||
function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
function getStatus($request, $response, $args)
|
||||
{
|
||||
$p = Paylist::where("tradeno", $_POST['pid'])->first();
|
||||
$return['ret'] = 1;
|
||||
$return['result'] = $p->status;
|
||||
return json_encode($return);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,141 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tonyzou
|
||||
* Date: 2018/9/27
|
||||
* Time: 8:16 AM
|
||||
*/
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\User;
|
||||
use App\Models\Code;
|
||||
use App\Models\Paylist;
|
||||
|
||||
|
||||
class Codepay extends AbstractPayment
|
||||
{
|
||||
|
||||
function isHTTPS()
|
||||
{
|
||||
define('HTTPS', false);
|
||||
if (defined('HTTPS') && HTTPS) return true;
|
||||
if (!isset($_SERVER)) return FALSE;
|
||||
if (!isset($_SERVER['HTTPS'])) return FALSE;
|
||||
if ($_SERVER['HTTPS'] === 1) { //Apache
|
||||
return TRUE;
|
||||
} elseif ($_SERVER['HTTPS'] === 'on') { //IIS
|
||||
return TRUE;
|
||||
} elseif ($_SERVER['SERVER_PORT'] == 443) { //其他
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$codepay_id = Config::get('codepay_id');//这里改成码支付ID
|
||||
$codepay_key = Config::get('codepay_key'); //这是您的通讯密钥
|
||||
$user = Auth::getUser();
|
||||
$price = $request->getParam('price');
|
||||
$type = $request->getParam('type');
|
||||
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = (string)time()."UID".(string)$user->id;
|
||||
$pl->save();
|
||||
|
||||
|
||||
$url = (self::isHTTPS() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
|
||||
$data = array(
|
||||
"id" => $codepay_id,//你的码支付ID
|
||||
"pay_id" => $pl->tradeno, //唯一标识 可以是用户ID,用户名,session_id(),订单ID,ip 付款后返回
|
||||
"type" => $type,//1支付宝支付 2QQ钱包 3微信支付
|
||||
"price" => $price,//金额100元
|
||||
"param" => "",//自定义参数
|
||||
"notify_url" => $url . '/payment/notify',//通知地址
|
||||
"return_url" => $url . '/user/code',//跳转地址
|
||||
); //构造需要传递的参数
|
||||
|
||||
ksort($data); //重新排序$data数组
|
||||
reset($data); //内部指针指向数组中的第一个元素
|
||||
|
||||
$sign = ''; //初始化需要签名的字符为空
|
||||
$urls = ''; //初始化URL参数为空
|
||||
|
||||
foreach ($data AS $key => $val) { //遍历需要传递的参数
|
||||
if ($val == '' || $key == 'sign') continue; //跳过这些不参数签名
|
||||
if ($sign != '') { //后面追加&拼接URL
|
||||
$sign .= "&";
|
||||
$urls .= "&";
|
||||
}
|
||||
$sign .= "$key=$val"; //拼接为url参数形式
|
||||
$urls .= "$key=" . urlencode($val); //拼接为url参数形式并URL编码参数值
|
||||
|
||||
}
|
||||
$query = $urls . '&sign=' . md5($sign . $codepay_key); //创建订单所需的参数
|
||||
$url = "https://codepay.fateqq.com:51888/creat_order/?" . $query; //支付页面
|
||||
|
||||
|
||||
header("Location:" . $url);
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
//以下五行无需更改
|
||||
ksort($_POST); //排序post参数
|
||||
reset($_POST); //内部指针指向数组中的第一个元素
|
||||
$codepay_key=Config::get('codepay_key'); //这是您的密钥
|
||||
$sign = '';//初始化
|
||||
foreach ($_POST AS $key => $val) { //遍历POST参数
|
||||
if ($val == '' || $key == 'sign') continue; //跳过这些不签名
|
||||
if ($sign) $sign .= '&'; //第一个字符串签名不加& 其他加&连接起来参数
|
||||
$sign .= "$key=$val"; //拼接为url参数形式
|
||||
}
|
||||
if (!$_POST['pay_no'] || md5($sign . $codepay_key) != $_POST['sign']) { //不合法的数据
|
||||
exit('fail'); //返回失败,等待下次回调
|
||||
} else { //合法的数据
|
||||
//业务处理
|
||||
$pay_id = $_POST['pay_id']; //需要充值的ID 或订单号 或用户名
|
||||
$money = (float)$_POST['money']; //实际付款金额
|
||||
$price = (float)$_POST['price']; //订单的原价
|
||||
//$param = $_POST['param']; //自定义参数
|
||||
$pay_no = $_POST['pay_no']; //流水号
|
||||
self::postPayment($pay_id, "码支付");
|
||||
}
|
||||
|
||||
exit('success'); //返回成功 不要删除哦
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return '
|
||||
<div class="card-inner">
|
||||
<p class="card-heading">请输入充值金额</p>
|
||||
<form class="codepay" name="codepay" action="/user/code/codepay" method="get">
|
||||
<input class="form-control maxwidth-edit" id="price" name="price" placeholder="输入充值金额后,点击你要付款的应用图标即可" autofocus="autofocus" type="number" min="0.01" max="1000" step="0.01" required="required">
|
||||
<br>
|
||||
<button class="btn btn-flat waves-attach" id="btnSubmit" type="submit" name="type" value="1" ><img src="/images/alipay.jpg" width="50px" height="50px" /></button>
|
||||
<button class="btn btn-flat waves-attach" id="btnSubmit" type="submit" name="type" value="2" ><img src="/images/qqpay.jpg" width="50px" height="50px" /></button>
|
||||
<button class="btn btn-flat waves-attach" id="btnSubmit" type="submit" name="type" value="3" ><img src="/images/weixin.jpg" width="50px" height="50px" /></button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
// TODO: Implement getReturnHTML() method.
|
||||
}
|
||||
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
// TODO: Implement getStatus() method.
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,155 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tonyzou
|
||||
* Author:
|
||||
* Date: 2018/9/24
|
||||
* Time: 下午4:01
|
||||
*/
|
||||
/**
|
||||
* Made By Leo
|
||||
* 黛米付接口
|
||||
* 2.1.4版本
|
||||
* 适用于 V1 API 黛米付面板V1
|
||||
* copyright all rights reserved
|
||||
*/
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
use App\Services\View;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
|
||||
use App\Models\Paylist;
|
||||
|
||||
|
||||
|
||||
|
||||
class DoiAMPay extends AbstractPayment
|
||||
{
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return View::getSmarty()->assign("enabled",Config::get("doiampay")['enabled'])->fetch("user/doiam.tpl");
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
$order_data = $_POST;
|
||||
$status = $order_data['status']; //获取传递过来的交易状态
|
||||
$invoiceid = $order_data['out_trade_no']; //订单号
|
||||
$transid = $order_data['trade_no']; //转账交易号
|
||||
$amount = $order_data['money']; //获取递过来的总价格
|
||||
if(!DoiAM::checksign($_POST,Config::get("doiampay")['mchdata'][$args['type']]['token'])){
|
||||
return (json_encode(array('errcode'=>2333)));
|
||||
}
|
||||
if ($status == 'success') {
|
||||
self::postPayment($invoiceid, "黛米付".['wepay' => "(微信)" , 'qqpay' => '(QQ支付)','alipay' => "(支付宝)"][$args['type']]);
|
||||
return json_encode(['errcode'=>0]);
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$type = $request->getParam('type');
|
||||
$price = $request->getParam('price');
|
||||
if(Config::get("doiampay")['enabled'][$type]==0){
|
||||
return json_encode(['errcode'=>-1,'errmsg'=>"非法的支付方式."]);
|
||||
}
|
||||
if($price <= 0){
|
||||
return json_encode(['errcode'=>-1,'errmsg'=>"非法的金额."]);
|
||||
}
|
||||
$user = Auth::getUser();
|
||||
$settings = Config::get("doiampay")['mchdata'][$type];
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->save();
|
||||
$data = [
|
||||
'trade' => $pl->tradeno,
|
||||
'price' => $price,
|
||||
'phone' => $settings['phone'],
|
||||
'mchid' => $settings['mchid'],
|
||||
'subject' => Config::get("appName")."充值".$price."元",
|
||||
'body' => Config::get("appName")."充值".$price."元",
|
||||
'type' => 'Mod',
|
||||
];
|
||||
$data = DoiAM::sign($data,$settings['token']);
|
||||
$ret = DoiAM::post("https://api.daimiyun.cn/v2/".$type."/create",$data);
|
||||
$result = json_decode($ret,true);
|
||||
if($result and $result['errcode']==0){
|
||||
$result['pid']=$pl->tradeno;
|
||||
return json_encode($result);
|
||||
} else {
|
||||
return json_encode([
|
||||
'errcode' => -1,
|
||||
'errmsg' => "接口调用失败!".$ret,
|
||||
]);
|
||||
}
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
$money = $_GET['money'];
|
||||
echo "您已经成功支付 $money 元,正在跳转..";
|
||||
echo <<<HTML
|
||||
<script>
|
||||
location.href="/user/code";
|
||||
</script>
|
||||
HTML;
|
||||
return;
|
||||
}
|
||||
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
$p = Paylist::where("tradeno", $_POST['pid'])->first();
|
||||
$return['ret'] = 1;
|
||||
$return['result'] = $p->status;
|
||||
return json_encode($return);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class DoiAM{
|
||||
public static function sort(&$array){
|
||||
ksort($array);
|
||||
}
|
||||
public static function getsign($array,$key){
|
||||
unset($array['sign']);
|
||||
self::sort($array);
|
||||
$sss=http_build_query($array);
|
||||
$sign=hash("sha256",$sss.$key);
|
||||
$sign=sha1($sign.hash("sha256",$key));
|
||||
return $sign;
|
||||
}
|
||||
public static function sign($array,$key){
|
||||
$array['sign']=self::getSign($array,$key);
|
||||
return $array;
|
||||
}
|
||||
public static function checksign($array,$key){
|
||||
$new = $array;
|
||||
$new=self::sign($new,$key);
|
||||
if(!isset($array['sign'])){
|
||||
return false;
|
||||
}
|
||||
return $array['sign']==$new['sign'];
|
||||
}
|
||||
public static function post($url, $data = null){
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
if (!empty($data)){
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
}
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
$output = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tonyzou
|
||||
* Date: 2018/9/27
|
||||
* Time: 7:20 PM
|
||||
*/
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
use App\Models\User;
|
||||
use App\Models\Code;
|
||||
use App\Services\Auth;
|
||||
use App\Models\Paylist;
|
||||
use App\Models\Payback;
|
||||
use App\Services\Config;
|
||||
use App\Services\Payment;
|
||||
|
||||
class PaymentWall extends AbstractPayment
|
||||
{
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
// TODO: Implement purchase() method.
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
if (Config::get('pmw_publickey')!="") {
|
||||
\Paymentwall_Config::getInstance()->set(array(
|
||||
'api_type' => \Paymentwall_Config::API_VC,
|
||||
'public_key' => Config::get('pmw_publickey'),
|
||||
'private_key' => Config::get('pmw_privatekey')
|
||||
));
|
||||
$pingback = new \Paymentwall_Pingback($_GET, $_SERVER['REMOTE_ADDR']);
|
||||
if ($pingback->validate()) {
|
||||
$virtualCurrency = $pingback->getVirtualCurrencyAmount();
|
||||
if ($pingback->isDeliverable()) {
|
||||
// deliver the virtual currency
|
||||
} elseif ($pingback->isCancelable()) {
|
||||
// withdraw the virual currency
|
||||
}
|
||||
$user=User::find($pingback->getUserId());
|
||||
$user->money=$user->money+$pingback->getVirtualCurrencyAmount();
|
||||
$user->save();
|
||||
$codeq=new Code();
|
||||
$codeq->code="Payment Wall 充值";
|
||||
$codeq->isused=1;
|
||||
$codeq->type=-1;
|
||||
$codeq->number=$pingback->getVirtualCurrencyAmount();
|
||||
$codeq->usedatetime=date("Y-m-d H:i:s");
|
||||
$codeq->userid=$user->id;
|
||||
$codeq->save();
|
||||
if ($user->ref_by!=""&&$user->ref_by!=0&&$user->ref_by!=null) {
|
||||
$gift_user=User::where("id", "=", $user->ref_by)->first();
|
||||
$gift_user->money=($gift_user->money+($codeq->number*(Config::get('code_payback')/100)));
|
||||
$gift_user->save();
|
||||
$Payback=new Payback();
|
||||
$Payback->total=$pingback->getVirtualCurrencyAmount();
|
||||
$Payback->userid=$user->id;
|
||||
$Payback->ref_by=$user->ref_by;
|
||||
$Payback->ref_get=$codeq->number*(Config::get('code_payback')/100);
|
||||
$Payback->datetime=time();
|
||||
$Payback->save();
|
||||
}
|
||||
echo 'OK'; // Paymentwall expects response to be OK, otherwise the pingback will be resent
|
||||
if (Config::get('enable_donate') == 'true') {
|
||||
if ($user->is_hide == 1) {
|
||||
Telegram::Send("姐姐姐姐,一位不愿透露姓名的大老爷给我们捐了 ".$codeq->number." 元呢~");
|
||||
} else {
|
||||
Telegram::Send("姐姐姐姐,".$user->user_name." 大老爷给我们捐了 ".$codeq->number." 元呢~");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo $pingback->getErrorSummary();
|
||||
}
|
||||
} else {
|
||||
echo 'error';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
\Paymentwall_Config::getInstance()->set(array(
|
||||
'api_type' => \Paymentwall_Config::API_VC,
|
||||
'public_key' => Config::get('pmw_publickey'),
|
||||
'private_key' => Config::get('pmw_privatekey')
|
||||
));
|
||||
$user = Auth::getUser();
|
||||
$widget = new \Paymentwall_Widget(
|
||||
$user->id, // id of the end-user who's making the payment
|
||||
Config::get('pmw_widget'), // widget code, e.g. p1; can be picked inside of your merchant account
|
||||
array(), // array of products - leave blank for Virtual Currency API
|
||||
array(
|
||||
'email' => $user->email,
|
||||
'history'=>
|
||||
array(
|
||||
'registration_date'=>strtotime($user->reg_date),
|
||||
'registration_ip'=>$user->reg_ip,
|
||||
'payments_number'=>Code::where('userid', '=', $user->id)->where('type', '=', -1)->count(),
|
||||
'membership'=>$user->class),
|
||||
'customer'=>array(
|
||||
'username'=>$user->user_name
|
||||
)
|
||||
) // additional parameters
|
||||
);
|
||||
return $widget->getHtmlCode(array("height"=>Config::get('pmw_height'),"width"=>"100%"));
|
||||
}
|
||||
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
// TODO: Implement getReturnHTML() method.
|
||||
}
|
||||
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
// TODO: Implement getStatus() method.
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,183 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tonyzou
|
||||
* Date: 2018/9/28
|
||||
* Time: 9:08 PM
|
||||
*/
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
use App\Services\View;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\Paylist;
|
||||
|
||||
class TrimePay extends AbstractPayment
|
||||
{
|
||||
|
||||
private $appSecret;
|
||||
private $gatewayUri;
|
||||
/**
|
||||
* 签名初始化
|
||||
* @param merKey 签名密钥
|
||||
*/
|
||||
|
||||
public function __construct($appSecret) {
|
||||
$this->appSecret = $appSecret;
|
||||
$this->gatewayUri = 'https://api.Trimepay.com/gateway/';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @name 准备签名/验签字符串
|
||||
*/
|
||||
public function prepareSign($data) {
|
||||
ksort($data);
|
||||
return http_build_query($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name 生成签名
|
||||
* @param sourceData
|
||||
* @return 签名数据
|
||||
*/
|
||||
public function sign($data) {
|
||||
$signature = strtolower(md5(md5($data).$this->appSecret));
|
||||
return $signature;
|
||||
}
|
||||
|
||||
/*
|
||||
* @name 验证签名
|
||||
* @param signData 签名数据
|
||||
* @param sourceData 原数据
|
||||
* @return
|
||||
*/
|
||||
public function verify($data, $signature) {
|
||||
$mySign = $this->sign($data);
|
||||
if ($mySign === $signature) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function post($data, $type = "pay"){
|
||||
if ($type == "pay"){
|
||||
$this->gatewayUri .= "pay/go";
|
||||
} else {
|
||||
$this->gatewayUri .= "refund/go";
|
||||
}
|
||||
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, $this->gatewayUri);
|
||||
curl_setopt($curl, CURLOPT_HEADER, 0);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
$data = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$price = $request->getParam('price');
|
||||
$type = $request->getParam('type');
|
||||
|
||||
|
||||
if($price <= 0){
|
||||
return json_encode(['code'=>-1,'errmsg'=>"非法的金额."]);
|
||||
}
|
||||
$user = Auth::getUser();
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->save();
|
||||
|
||||
|
||||
$data['appId'] = Config::get('trimepay_appid');
|
||||
$data['payType'] = $type;
|
||||
$data['merchantTradeNo'] = $pl->tradeno;
|
||||
$data['totalFee'] = (float)$price * 100;
|
||||
$data['notifyUrl'] = Config::get("baseUrl")."/payment/notify";
|
||||
$data['returnUrl'] = Config::get("baseUrl")."/user/payment/return";
|
||||
$params = self::prepareSign($data);
|
||||
$data['sign'] = self::sign($params);
|
||||
switch ($type) {
|
||||
case('WEPAY_JSAPI'):
|
||||
$result['code'] = 0;
|
||||
$result['data'] = "http://cashier.hlxpay.com/#/wepay/jsapi?payData=".base64_encode(json_encode($data));
|
||||
$result['pid'] = $pl->tradeno;
|
||||
return json_encode($result);
|
||||
default:
|
||||
$result = json_decode(self::post($data), TRUE);
|
||||
$result['pid'] = $pl->tradeno;
|
||||
return json_encode($result);
|
||||
}
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
$data = array();
|
||||
$data['payStatus']=$request->getParam('payStatus');
|
||||
$data['payFee']=$request->getParam('payFee');
|
||||
$data['callbackTradeNo']=$request->getParam('callbackTradeNo');
|
||||
$data['payType']=$request->getParam('payType');
|
||||
$data['merchantTradeNo']=$request->getParam('merchantTradeNo');
|
||||
|
||||
//file_put_contents(BASE_PATH.'/storage/trimepay_notify.log', json_encode($data)."\r\n", FILE_APPEND);
|
||||
// 准备待签名数据
|
||||
$str_to_sign = self::prepareSign($data);
|
||||
// 验证签名
|
||||
$resultVerify = self::verify($str_to_sign, $request->getParam('sign'));
|
||||
if ($resultVerify) {
|
||||
//file_put_contents('./trimepay_notify_success.log', json_encode($data)."\r\n", FILE_APPEND);
|
||||
self::postPayment($data['merchantTradeNo'], "TrimePay");
|
||||
echo 'SUCCESS';
|
||||
}else{
|
||||
echo 'FAIL';
|
||||
}
|
||||
}
|
||||
|
||||
public function refund($merchantTradeNo){
|
||||
$data['appId'] = Config::get('trimepay_appid');
|
||||
$data['merchantTradeNo'] = $merchantTradeNo;
|
||||
$params = self::prepareSign($data);
|
||||
$data['sign'] = self::sign($params);
|
||||
|
||||
return self::post($data, "refund");
|
||||
}
|
||||
|
||||
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return View::getSmarty()->fetch("user/trimepay.tpl");
|
||||
}
|
||||
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
$pid = $_GET['merchantTradeNo'];
|
||||
$p = Paylist::where('tradeno','=',$pid)->first();
|
||||
$money = $p->total;
|
||||
if ($p->status == 1){
|
||||
$success = 1;
|
||||
} else {
|
||||
$success = 0;
|
||||
}
|
||||
return View::getSmarty()->assign('money', $money)->assign('success', $success)->fetch('user/pay_success.tpl');
|
||||
}
|
||||
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
$p = Paylist::where("tradeno", $_POST['pid'])->first();
|
||||
$return['ret'] = 1;
|
||||
$return['result'] = $p->status;
|
||||
return json_encode($return);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
class PayConfig{
|
||||
class YftPayConfig{
|
||||
|
||||
public $pay_config;
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tonyzou
|
||||
* Date: 2018/9/24
|
||||
* Time: 下午7:07
|
||||
*/
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Services\Config;
|
||||
use App\Services\Gateway\{
|
||||
AopF2F, Codepay, DoiAMPay, PaymentWall, ChenPay, SPay, TrimePay, YftPay
|
||||
};
|
||||
|
||||
class Payment
|
||||
{
|
||||
public static function getClient(){
|
||||
$method = Config::get("payment_system");
|
||||
switch($method){
|
||||
case("codepay"):
|
||||
return new Codepay();
|
||||
case("doiampay"):
|
||||
return new DoiAMPay();
|
||||
case("paymentwall"):
|
||||
return new PaymentWall();
|
||||
case("spay"):
|
||||
return new SPay();
|
||||
case("f2fpay"):
|
||||
return new AopF2F();
|
||||
case("yftpay"):
|
||||
return new YftPay();
|
||||
case("chenAlipay"):
|
||||
return new ChenPay();
|
||||
case("trimepay"):
|
||||
return new TrimePay(Config::get('trimepay_secret'));
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
public static function notify($request, $response, $args){
|
||||
return self::getClient()->notify($request, $response, $args);
|
||||
}
|
||||
|
||||
public static function returnHTML($request, $response, $args){
|
||||
return self::getClient()->getReturnHTML($request, $response, $args);
|
||||
}
|
||||
|
||||
public static function purchaseHTML(){
|
||||
if (self::getClient() != NULL) {
|
||||
return self::getClient()->getPurchaseHTML();
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
public static function getStatus($request, $response, $args){
|
||||
return self::getClient()->getStatus($request, $response, $args);
|
||||
}
|
||||
|
||||
public static function purchase($request, $response, $args){
|
||||
return self::getClient()->purchase($request, $response, $args);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tonyzou
|
||||
* Date: 2018/9/10
|
||||
* Time: 上午9:54
|
||||
*/
|
||||
|
||||
namespace App\Utils;
|
||||
use App\Services\Config;
|
||||
|
||||
class CloudflareDriver
|
||||
{
|
||||
|
||||
// @todo: parameters
|
||||
public static function modifyRecord(\Cloudflare\API\Endpoints\DNS $dns, $zoneID, $recordID, $name, $content, $proxied = false)
|
||||
{
|
||||
$details = ['type' => 'A', 'name' => $name, 'content' => $content, 'proxied' => $proxied];
|
||||
if ($dns->updateRecordDetails($zoneID, $recordID, $details)->success == true) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static function addRecord(\Cloudflare\API\Endpoints\DNS $dns, $zoneID, $type, $name, $content, $ttl = 120, $proxied = false)
|
||||
{
|
||||
if ($dns->addRecord($zoneID, $type, $name, $content, $ttl, $proxied) == true) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static function updateRecord($name, $content, $proxied = false)
|
||||
{
|
||||
$key = new \Cloudflare\API\Auth\APIKey(Config::get('cloudflare_email'), Config::get('cloudflare_key'));
|
||||
$adapter = new \Cloudflare\API\Adapter\Guzzle($key);
|
||||
$zones = new \Cloudflare\API\Endpoints\Zones($adapter);
|
||||
|
||||
$zoneID = $zones->getZoneID(Config::get('cloudflare_name'));
|
||||
|
||||
$dns = new \Cloudflare\API\Endpoints\DNS($adapter);
|
||||
|
||||
$r = $dns->listRecords($zoneID, '', $name);
|
||||
$recordCount = $r->result_info->count;
|
||||
$records = $r->result;
|
||||
|
||||
if ($recordCount == 0){
|
||||
self::addRecord($dns, $zoneID, 'A', $name, $content);
|
||||
} elseif ($recordCount >= 1){
|
||||
foreach ($records as $record){
|
||||
$recordID = $record->id;
|
||||
self::modifyRecord($dns, $zoneID, $recordID, $name, $content, $proxied);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Indexyz
|
||||
* Date: 11/9/2018
|
||||
* Time: 9:15 PM
|
||||
*/
|
||||
|
||||
namespace App\Utils;
|
||||
|
||||
use Smarty;
|
||||
|
||||
|
||||
class ConfRender {
|
||||
public static function getTemplateRender() {
|
||||
$smarty = new smarty();
|
||||
|
||||
$smarty->settemplatedir(BASE_PATH . '/resources/conf/');
|
||||
$smarty->setcompiledir(BASE_PATH . '/storage/framework/smarty/compile/');
|
||||
$smarty->setcachedir(BASE_PATH . '/storage/framework/smarty/cache/');
|
||||
$smarty->registerClass("config", "App\Services\Config");
|
||||
return $smarty;
|
||||
}
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Utils;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\Config;
|
||||
|
||||
class Duoshuo
|
||||
{
|
||||
public static function Add($user)
|
||||
{
|
||||
if (Config::get('duoshuo_shortname')!='') {
|
||||
if ($user->is_admin==1) {
|
||||
$role="administrator";
|
||||
} else {
|
||||
$role="user";
|
||||
}
|
||||
$data = array();
|
||||
$data['short_name'] = Config::get('duoshuo_shortname');
|
||||
$data['secret'] = Config::get('duoshuo_apptoken');
|
||||
$data['users'] = array();
|
||||
$data['users'][] = array(
|
||||
'user_key' => $user->id,
|
||||
'name' => $user->user_name,
|
||||
'avatar_url' => "https://secure.gravatar.com/avatar/".md5($user->email)."&r=X&s=80",
|
||||
'email' => $user->email,
|
||||
'role' => $role
|
||||
);
|
||||
|
||||
|
||||
|
||||
$param = http_build_query($data, '', '&');
|
||||
|
||||
|
||||
|
||||
$sock = new HTTPSocket;
|
||||
$sock->connect("api.duoshuo.com", 80);
|
||||
$sock->set_method('POST');
|
||||
$sock->query('/users/import.json', $param);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,157 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Utils;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\WecenterUser;
|
||||
use App\Services\Config;
|
||||
use App\Utils;
|
||||
|
||||
class Wecenter
|
||||
{
|
||||
|
||||
/**
|
||||
* 添加或者更新密码信息
|
||||
*/
|
||||
public static function Add($user, $pwd)
|
||||
{
|
||||
if (Config::get('enable_wecenter')=='true') {
|
||||
$email=$user->email;
|
||||
$exists=WecenterUser::where("email", $email)->first();
|
||||
|
||||
if ($exists==null) {
|
||||
$exists=new WecenterUser();
|
||||
$exists->password=md5(md5($pwd).Config::get('salt'));
|
||||
$exists->user_name=$user->user_name;
|
||||
$exists->email=$email;
|
||||
$exists->salt=Config::get('salt');
|
||||
$exists->group_id=5;
|
||||
$exists->save();
|
||||
} else {
|
||||
$exists->password=md5(md5($pwd).Config::get('salt'));
|
||||
$exists->salt=Config::get('salt');
|
||||
$exists->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static function Delete($email)
|
||||
{
|
||||
if (Config::get('enable_wecenter')=='true') {
|
||||
WecenterUser::where("email", $email)->delete();
|
||||
}
|
||||
}
|
||||
|
||||
public static function ChangeUserName($email1, $email2, $pwd, $username)
|
||||
{
|
||||
if (Config::get('enable_wecenter')=='true') {
|
||||
$exists=WecenterUser::where("email", $email1)->first();
|
||||
|
||||
if ($exists!=null) {
|
||||
$exists->password=md5(md5($pwd).Config::get('salt'));
|
||||
$exists->user_name=$username;
|
||||
$exists->email=$email2;
|
||||
$exists->salt=Config::get('salt');
|
||||
$exists->save();
|
||||
} else {
|
||||
$exists=new WecenterUser();
|
||||
$exists->password=md5(md5($pwd).Config::get('salt'));
|
||||
$exists->user_name=$username;
|
||||
$exists->email=$email2;
|
||||
$exists->salt=Config::get('salt');
|
||||
$exists->group_id=5;
|
||||
$exists->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function Login($user, $pwd, $time)
|
||||
{
|
||||
if (Config::get('enable_wecenter')=='true') {
|
||||
$email=$user->email;
|
||||
$exists=WecenterUser::where("email", $email)->first();
|
||||
|
||||
$expire_in = $time+time();
|
||||
|
||||
Utils\Cookie::setwithdomain([Config::get('wecenter_cookie_prefix')."_user_login"=>Wecenter::encode_hash(json_encode(array(
|
||||
'uid' => $exists->uid,
|
||||
'user_name' => $user->email,
|
||||
'password' => md5(md5($pwd).Config::get('salt'))
|
||||
)), md5(Config::get('wecenter_cookie_key') . $_SERVER['HTTP_USER_AGENT']))], $expire_in, Config::get('wecenter_system_main_domain'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static function Loginout()
|
||||
{
|
||||
if (Config::get('enable_wecenter')=='true') {
|
||||
Utils\Cookie::setwithdomain([Config::get('wecenter_cookie_prefix')."_user_login"=>"loginout"], time()-86400, Config::get('wecenter_system_main_domain'));
|
||||
}
|
||||
}
|
||||
|
||||
public static function encode_hash($hash_data, $hash_key = null)
|
||||
{
|
||||
$mcrypt = mcrypt_module_open(Wecenter::get_algorithms(), '', MCRYPT_MODE_ECB, '');
|
||||
|
||||
mcrypt_generic_init($mcrypt, Wecenter::get_key($mcrypt, $hash_key), mcrypt_create_iv(mcrypt_enc_get_iv_size($mcrypt), MCRYPT_RAND));
|
||||
|
||||
$result = mcrypt_generic($mcrypt, gzcompress($hash_data));
|
||||
|
||||
mcrypt_generic_deinit($mcrypt);
|
||||
mcrypt_module_close($mcrypt);
|
||||
|
||||
return Wecenter::get_algorithms() . '|' . Wecenter::str_to_hex($result);
|
||||
}
|
||||
|
||||
|
||||
private static function get_key($mcrypt, $key = null)
|
||||
{
|
||||
if (!$key) {
|
||||
$key = Config::get('wecenter_cookie_key');
|
||||
}
|
||||
|
||||
return substr($key, 0, mcrypt_enc_get_key_size($mcrypt));
|
||||
}
|
||||
|
||||
private static function get_algorithms()
|
||||
{
|
||||
$algorithms = mcrypt_list_algorithms();
|
||||
|
||||
foreach ($algorithms as $algorithm) {
|
||||
if (strstr($algorithm, '-256')) {
|
||||
return $algorithm;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($algorithms as $algorithm) {
|
||||
if (strstr($algorithm, '-128')) {
|
||||
return $algorithm;
|
||||
}
|
||||
}
|
||||
|
||||
return end($algorithms);
|
||||
}
|
||||
|
||||
private static function str_to_hex($string)
|
||||
{
|
||||
$hex = null;
|
||||
for ($i = 0; $i < strlen($string); $i++) {
|
||||
$ord = ord($string[$i]);
|
||||
$hexCode = dechex($ord);
|
||||
$hex .= substr('0' . $hexCode, -2);
|
||||
}
|
||||
|
||||
return strtoupper($hex);
|
||||
}
|
||||
|
||||
private static function hex_to_str($hex)
|
||||
{
|
||||
$string = null;
|
||||
for ($i = 0; $i < strlen($hex)-1; $i += 2) {
|
||||
$string .= chr(hexdec($hex[$i] . $hex[$i + 1]));
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 36 KiB |