1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

插件代码上传

This commit is contained in:
2022-01-26 02:20:35 +08:00
commit 86848dbde0
58 changed files with 2231 additions and 0 deletions

73
plugin/wxreward/main.php Normal file
View File

@@ -0,0 +1,73 @@
<?php
if ($zbp->Config('zxd_ctrlcenter')->plugin_wxreward_picurl){
$picurl=$zbp->Config('zxd_ctrlcenter')->plugin_wxreward_picurl;
}else{
$picurl=$zbp->Config('zxd_ctrlcenter')->urlpath.'plugin/wxreward/src/wxpay.jpg';
}//名称
if ($zbp->Config('zxd_ctrlcenter')->plugin_wxreward_txt){
$txt=$zbp->Config('zxd_ctrlcenter')->plugin_wxreward_txt;
}else{
$txt='微信扫一扫,打赏作者吧~';
}
if(isset($_POST['submit'])){
/*SEO*/
$zbp->Config('zxd_ctrlcenter')->plugin_wxreward_picurl = $_POST['picurl'];
$zbp->Config('zxd_ctrlcenter')->plugin_wxreward_txt = $_POST['txt'];
$zbp->SaveConfig('zxd_ctrlcenter');
$zbp->ShowHint('good');
}
?>
<style type="text/css">
textarea{ margin:10px; padding:4px;}
p{ line-height:30px;}
</style>
<div style="width:100%;display: inline-block;position:relative;">
<div style="width:80%; float:left;">
<b>微信支付二维码设置:</b>
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="<?php echo $zbp->Config('zxd_ctrlcenter')->urlpath.'plugin/wxreward/'; ?>save.php?type=picurl">
<?php if (function_exists('CheckIsRefererValid')) {
echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';
}
?>
方式1.本站上传:(选择图片后,请点击上传按钮)<br />
<input name="picurl" type="file"/> <input name="submit" type="Submit" class="button" style="width:70px;" value="上传"/>
</form>
<form id="form2" name="form2" method="post">
<!-- CSRF -->
<?php if (function_exists('CheckIsRefererValid')) {echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';}?>
方式2.已知微信支付二维码URL<br />
<input type="text" name="picurl" id="vurl" style="width:68%;" value="<?php echo $picurl; ?>"/>
<br />
<b>底部文字设置:</b>
<br /><input type="text" name="txt" id="txt"style="width:30%;" value="<?php echo $txt; ?>"/>
</div>
<div style="width:20%;height:220;float:right;">
<div style="width:140px;height:165px;margin:0 auto; border:5px solid #3a6ea5;float:left; text-align:center;">
<p style="background-color: lightgray;">当前二维码</p>
<p> <img src="<?php echo $picurl; ?>" alt="微信打赏二维码" height="122" width="122"></p>
</div>
</div>
</div>
<br>
<input name="submit" type="Submit" class="button" style="width:120px;" value="保存"/>
</form>
<br><br><br>
<b>一些注意事项:</b>
<p style="color: red;">微信生成的二维码图片建议先裁剪再上传</p>
<p style="color: red;">上传的图片大小不要太大,不然上传与网页加载时间会延长,不利于网页展示。</p>
<p style="color: red;">该插件修改自“阿木林”作者的“wxreward”插件应用商店id为1264本子插件不得与“wxreward”插件同时开启</p>
<p>图片上传目录:[你的网站Z-Blog地址/zb_users/plugin/zxd_ctrlcenter/plugin/wxreward/src/]。如需删除上传图片请在登录后台ftp删除相应图片</p>
<br><br>
<b>通过手机微信获取付款二维码,操作步骤如下:</b>
<p>
1.打开微信,点击右上角“+”号,点击“收钱”,进入微信收钱页面;<br />
2.长按二维码,点击“保存图片”,保存图片到手机;<br />
3.将图片上传到电脑;<br />
4.将二维码图片传到上方或者上传到第三方图床并复制URL在上方保存。
</p>