From d3add663a7b79a6abc6d472a01d238499d6fd8a3 Mon Sep 17 00:00:00 2001
From: Last <32554200+InvisibleFuture@users.noreply.github.com>
Date: Thu, 15 Nov 2018 17:35:36 +0800
Subject: [PATCH] Add files via upload
---
z_ayou/conf.json | 10 +
z_ayou/hook/post_start_init.htm | 35 ++++
z_ayou/hook/post_subject_after.htm | 23 +++
z_ayou/hook/post_update_post_start.php | 11 ++
z_ayou/hook/thread_create_thread_end.php | 12 ++
z_ayou/icon.png | Bin 0 -> 6931 bytes
z_ayou/install.php | 5 +
z_ayou/overwrite/route/post.php | 223 +++++++++++++++++++++++
z_ayou/unstall.php | 5 +
9 files changed, 324 insertions(+)
create mode 100644 z_ayou/conf.json
create mode 100644 z_ayou/hook/post_start_init.htm
create mode 100644 z_ayou/hook/post_subject_after.htm
create mode 100644 z_ayou/hook/post_update_post_start.php
create mode 100644 z_ayou/hook/thread_create_thread_end.php
create mode 100644 z_ayou/icon.png
create mode 100644 z_ayou/install.php
create mode 100644 z_ayou/overwrite/route/post.php
create mode 100644 z_ayou/unstall.php
diff --git a/z_ayou/conf.json b/z_ayou/conf.json
new file mode 100644
index 0000000..874ed00
--- /dev/null
+++ b/z_ayou/conf.json
@@ -0,0 +1,10 @@
+{
+ "name": "单据打印",
+ "brief": "单据打印插件",
+ "version": "1.0",
+ "bbs_version": "4.0",
+ "installed": 1,
+ "enable": 0,
+ "hooks_rank": [],
+ "dependencies": []
+}
\ No newline at end of file
diff --git a/z_ayou/hook/post_start_init.htm b/z_ayou/hook/post_start_init.htm
new file mode 100644
index 0000000..0634a34
--- /dev/null
+++ b/z_ayou/hook/post_start_init.htm
@@ -0,0 +1,35 @@
+ // 这里是为 更新数据时 提供数组,发表时由于没有数据所以必须为空
+ if($route == 'thread' && $action == 'create') {
+ $pa = '';
+ $pb = '';
+ $pc = '';
+ $pd = '';
+ $pe = '';
+ $pf = '';
+ $pg = '';
+ $ph = '';
+ $pi = '';
+ $pj = '';
+ } elseif($route == 'post' && $action == 'update') {
+ $pa = $post['pa'];
+ $pb = $post['pb'];
+ $pc = $post['pc'];
+ $pd = $post['pd'];
+ $pe = $post['pe'];
+ $pf = $post['pf'];
+ $pg = $post['pg'];
+ $ph = $post['ph'];
+ $pi = $post['pi'];
+ $pj = $post['pj'];
+ } elseif($route == 'post' && $action == 'create') {
+ $pa = '';
+ $pb = '';
+ $pc = '';
+ $pd = '';
+ $pe = '';
+ $pf = '';
+ $pg = '';
+ $ph = '';
+ $pi = '';
+ $pj = '';
+ }
\ No newline at end of file
diff --git a/z_ayou/hook/post_subject_after.htm b/z_ayou/hook/post_subject_after.htm
new file mode 100644
index 0000000..2700c67
--- /dev/null
+++ b/z_ayou/hook/post_subject_after.htm
@@ -0,0 +1,23 @@
+
diff --git a/z_ayou/hook/post_update_post_start.php b/z_ayou/hook/post_update_post_start.php
new file mode 100644
index 0000000..0e21de2
--- /dev/null
+++ b/z_ayou/hook/post_update_post_start.php
@@ -0,0 +1,11 @@
+ //更新主题时验证数据
+ $pa = param('pa', '', FALSE);
+ $pb = param('pb', '', FALSE);
+ $pc = param('pc', '', FALSE);
+ $pd = param('pd', '', FALSE);
+ $pe = param('pe', '', FALSE);
+ $pf = param('pf', '', FALSE);
+ $pg = param('pg', '', FALSE);
+ $ph = param('ph', '', FALSE);
+ $pi = param('pi', '', FALSE);
+ $pj = param('pj', '', FALSE);
\ No newline at end of file
diff --git a/z_ayou/hook/thread_create_thread_end.php b/z_ayou/hook/thread_create_thread_end.php
new file mode 100644
index 0000000..6ca9fc0
--- /dev/null
+++ b/z_ayou/hook/thread_create_thread_end.php
@@ -0,0 +1,12 @@
+ $pa = param('pa', '', FALSE);
+ $pb = param('pb', '', FALSE);
+ $pc = param('pc', '', FALSE);
+ $pd = param('pd', '', FALSE);
+ $pe = param('pe', '', FALSE);
+ $pf = param('pf', '', FALSE);
+ $pg = param('pg', '', FALSE);
+ $ph = param('ph', '', FALSE);
+ $pi = param('pi', '', FALSE);
+ $pj = param('pj', '', FALSE);
+ db_update('post', array('pid'=>$pid), array('pa'=>$pa,'pb'=>$pb,'pc'=>$pc,'pd'=>$pd,'pe'=>$pe,'pf'=>$pf,'pg'=>$pg,'ph'=>$ph,'pi'=>$pi,'pj'=>$pj));
+
\ No newline at end of file
diff --git a/z_ayou/icon.png b/z_ayou/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..0543b8f7c8adb37291cc04a57875719dbfaf5a70
GIT binary patch
literal 6931
zcmaKRXE%(M69IQ4>*vh!RANP7pOZL$rwK
zqel;dBm3R|{hkkJpLMOZo^svy{j1NHwPN&i)Tqc=$no&-s5I1-4Q@v9zYiI~&6|+-
zGWKR*#;BNL3{mzNAA|=I4`zq5L4q_~5e`TLB*M-Q{S_&51LbrwGR2s}wWV!Qu7Zfa
z7(riG_Zv1Io{YS&JHplli2>Ol9h}@`Iro~|I6+Q!vYaMja3Q$664KF0-QNRg=&xgB
z>+fPKWydKm2a@rXz7cRmVh|u-*Qait(!R2s|I(Gdng88}aDx5?!MMnB{*P0pa6OO`
z$^!`!6BH4!6@o%R;^Kl(Q896GC_hM82r3K_y1BprX=Z;?lwrpnqSSH`YAt?4=Eq
zRsU`4W+lt%h{3o^Lm)mrK7u|Xf+!CM2vkZ+>aT{du)qyMz|+qSgYXq_^W^$RK^f_3
z>*3^%aYDI){wgADP+k~W&KpnvCj?jb|H!&|{yR-K34{0|+#ygwp}!&h1BAo>|4>)g
z|DZiF2FU;Q_x~yEY2@dQgcu+_QC=RlH-)q3`fJKvTFC>6z@R*gP^hQ>WKqu%g+X~b
zqTE4BhT%Tc=Gy&tU&Q|_7joka3pNVIkLAP4$nwe?s4c!Zn%u>m(;vPtRN+x7?0sqB*
z-XZ_sv`FgAE&s<4bHvih&
zX4m;lB{mbUyq8DcB|91cnzNGIw`)B+y;&Lk_74ZJQl73;(coF?^W%B@OQX6=$$@ve
z@7IPVM>BXAWItlCl@QST<&Oz?bHb41Lg`
zrTA7^IQfZ3Z;SmfbZv64?N62nD!sJ#32&%&LMmi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zd^lnQ1Y2Bl}?DstAu^15`!f
z-OM#6Q9YN`{p0i4crKnVx3EtQ*xkkn>4oWU&-kgb#M6eels)6jr}0luJX;J3Vp%W>
z-|*)732&rR{u3X;NdJhn`@T|oY2sSY@D%*g_j>e;Wm*!|n(r_}jUqe)87t@Un}c$A
z8oxW9E}ZS96G+$V5dZm=l6uigV!NMbLLamRyL2hCh}g4>bryZP9=Ky(1wV)xS~==5
zdfL^qtG62zn4bdnCW#T+qGdQHU6ClQw^Lu*sEd`QD_MKPHDq_R%kKrqsM{Pk%MWsM(%dV
zDJKWxqKcu9r(-ADR$
literal 0
HcmV?d00001
diff --git a/z_ayou/install.php b/z_ayou/install.php
new file mode 100644
index 0000000..866341e
--- /dev/null
+++ b/z_ayou/install.php
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/z_ayou/overwrite/route/post.php b/z_ayou/overwrite/route/post.php
new file mode 100644
index 0000000..86745c9
--- /dev/null
+++ b/z_ayou/overwrite/route/post.php
@@ -0,0 +1,223 @@
+ 5)) AND message(-1, lang('thread_has_already_closed'));
+
+ // hook post_get_post.php
+
+ if($method == 'GET') {
+
+ // hook post_get_start.php
+
+ $header['title'] = lang('post_create');
+ $header['mobile_title'] = lang('post_create');
+ $header['mobile_link'] = url("thread-$tid");
+
+ include _include(APP_PATH.'view/htm/post.htm');
+
+ } else {
+ // hook post_post_start.php
+ $message = param('message', '', FALSE);
+ empty($message) AND message('message', lang('please_input_message'));
+
+ $doctype = param('doctype', 0);
+ xn_strlen($message) > 2028000 AND message('message', lang('message_too_long'));
+
+ $thread['top'] > 0 AND thread_top_cache_delete();
+
+ $quotepid = param('quotepid', 0);
+ $quotepost = post__read($quotepid);
+ (!$quotepost || $quotepost['tid'] != $tid) AND $quotepid = 0;
+
+ $post = array(
+ 'tid'=>$tid,
+ 'uid'=>$uid,
+ 'create_date'=>$time,
+ 'userip'=>$longip,
+ 'isfirst'=>0,
+ 'doctype'=>$doctype,
+ 'quotepid'=>$quotepid,
+ 'message'=>$message,
+ );
+ $pid = post_create($post, $fid, $gid);
+ empty($pid) AND message(-1, lang('create_post_failed'));
+
+ // thread_top_create($fid, $tid);
+
+ $post = post_read($pid);
+ $post['floor'] = $thread['posts'] + 1;
+ $postlist = array($post);
+
+ $allowpost = forum_access_user($fid, $gid, 'allowpost');
+ $allowupdate = forum_access_mod($fid, $gid, 'allowupdate');
+ $allowdelete = forum_access_mod($fid, $gid, 'allowdelete');
+
+ // hook post_post_end.php
+
+ // 直接返回帖子的 html
+ // return the html string to browser.
+ $return_html = param('return_html', 0);
+ if($return_html) {
+ $filelist = array();
+ ob_start();
+ include _include(APP_PATH.'view/htm/post_list.inc.htm');
+ $s = ob_get_clean();
+
+ message(0, $s);
+ } else {
+ message(0, lang('create_post_sucessfully'));
+ }
+
+ }
+
+} elseif($action == 'update') {
+
+ $pid = param(2);
+ $post = post_read($pid);
+ empty($post) AND message(-1, lang('post_not_exists:'));
+
+ $tid = $post['tid'];
+ $thread = thread_read($tid);
+ empty($thread) AND message(-1, lang('thread_not_exists:'));
+
+ $fid = $thread['fid'];
+ $forum = forum_read($fid);
+ empty($forum) AND message(-1, lang('forum_not_exists:'));
+
+ $isfirst = $post['isfirst'];
+
+ !forum_access_user($fid, $gid, 'allowpost') AND message(-1, lang('user_group_insufficient_privilege'));
+ $allowupdate = forum_access_mod($fid, $gid, 'allowupdate');
+ !$allowupdate AND !$post['allowupdate'] AND message(-1, lang('have_no_privilege_to_update'));
+ !$allowupdate AND $thread['closed'] AND message(-1, lang('thread_has_already_closed'));
+
+ // hook post_update_get_post.php
+
+ if($method == 'GET') {
+
+ // hook post_update_get_start.php
+
+ $forumlist_allowthread = forum_list_access_filter($forumlist, $gid, 'allowthread');
+ $forumarr = xn_json_encode(arrlist_key_values($forumlist_allowthread, 'fid', 'name'));
+
+ // 如果为数据库减肥,则 message 可能会被设置为空。
+ // if lost weight for the database, set the message field empty.
+ $post['message'] = htmlspecialchars($post['message'] ? $post['message'] : $post['message_fmt']);
+
+ $attachlist = $imagelist = $filelist = array();
+ if($post['files']) {
+ list($attachlist, $imagelist, $filelist) = attach_find_by_pid($pid);
+ }
+
+ // hook post_update_get_end.php
+
+ include _include(APP_PATH.'view/htm/post.htm');
+
+ } elseif($method == 'POST') {
+
+ $subject = htmlspecialchars(param('subject', '', FALSE));
+ $message = param('message', '', FALSE);
+ $doctype = param('doctype', 0);
+ // hook post_update_post_start.php
+
+ empty($message) AND message('message', lang('please_input_message'));
+ mb_strlen($message, 'UTF-8') > 2048000 AND message('message', lang('message_too_long'));
+
+ $arr = array();
+ if($isfirst) {
+ $newfid = param('fid');
+ $forum = forum_read($newfid);
+ empty($forum) AND message('fid', lang('forum_not_exists:'));
+
+ if($fid != $newfid) {
+ !forum_access_user($fid, $gid, 'allowthread') AND message(-1, lang('user_group_insufficient_privilege'));
+ $post['uid'] != $uid AND !forum_access_mod($fid, $gid, 'allowupdate') AND message(-1, lang('user_group_insufficient_privilege'));
+ $arr['fid'] = $newfid;
+ }
+ if($subject != $thread['subject']) {
+ mb_strlen($subject, 'UTF-8') > 80 AND message('subject', lang('subject_max_length', array('max'=>80)));
+ $arr['subject'] = $subject;
+ }
+ $arr AND thread_update($tid, $arr) === FALSE AND message(-1, lang('update_thread_failed'));
+ }
+ //幻: 追加属性数组,似乎需要Re本页
+ $r = post_update($pid, array('doctype'=>$doctype, 'message'=>$message, 'pa'=>$pa, 'pb'=>$pb, 'pc'=>$pc, 'pd'=>$pd, 'pe'=>$pe, 'pf'=>$pf, 'pg'=>$pg, 'ph'=>$ph, 'pi'=>$pi, 'pj'=>$pj));
+ $r === FALSE AND message(-1, lang('update_post_failed'));
+ // hook post_update_post_end.php
+
+ message(0, lang('update_successfully'));
+ //message(0, array('pid'=>$pid, 'subject'=>$subject, 'message'=>$message));
+ }
+
+} elseif($action == 'delete') {
+
+ $pid = param(2, 0);
+
+ // hook post_delete_start.php
+
+ if($method != 'POST') message(-1, lang('method_error'));
+
+ $post = post_read($pid);
+ empty($post) AND message(-1, lang('post_not_exists'));
+
+ $tid = $post['tid'];
+ $thread = thread_read($tid);
+ empty($thread) AND message(-1, lang('thread_not_exists'));
+
+ $fid = $thread['fid'];
+ $forum = forum_read($fid);
+ empty($forum) AND message(-1, lang('forum_not_exists'));
+
+ $isfirst = $post['isfirst'];
+
+ !forum_access_user($fid, $gid, 'allowpost') AND message(-1, lang('user_group_insufficient_privilege'));
+ $allowdelete = forum_access_mod($fid, $gid, 'allowdelete');
+ !$allowdelete AND !$post['allowdelete'] AND message(-1, lang('insufficient_delete_privilege'));
+ !$allowdelete AND $thread['closed'] AND message(-1, lang('thread_has_already_closed'));
+
+ // hook post_delete_middle.php
+
+ if($isfirst) {
+ thread_delete($tid);
+ } else {
+ post_delete($pid);
+ //post_list_cache_delete($tid);
+ }
+
+ // hook post_delete_end.php
+
+ message(0, lang('delete_successfully'));
+
+}
+
+// hook post_end.php
+
+?>
\ No newline at end of file
diff --git a/z_ayou/unstall.php b/z_ayou/unstall.php
new file mode 100644
index 0000000..f32938c
--- /dev/null
+++ b/z_ayou/unstall.php
@@ -0,0 +1,5 @@
+
\ No newline at end of file