Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
Weltolk authored Oct 22, 2022
1 parent 1f4c88f commit 806cac5
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions weltolk_sign_qq_callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
function callback_init()
{
global $m;
//admin setting
option::add('weltolk_sign_qq_default_open', 1);
option::add('weltolk_sign_qq_zone', '+0800');
option::add('weltolk_sign_qq_title', '【[date]】[name] 的签到报告');
option::add('weltolk_sign_qq_content', '<html><head><title>贴吧云签到报告</title><style type="text/css">div.wrapper * { font: 12px "Microsoft YaHei", arial, helvetica, sans-serif; word-break: break-all; }div.wrapper a { color: #15c; text-decoration: none; }div.wrapper a:active { color: #d14836; }div.wrapper a:hover { text-decoration: underline; }div.wrapper p { line-height: 20px; margin: 0 0 .5em; text-align: center; }div.wrapper .sign_title { font-size: 20px; line-height: 24px; }div.wrapper .result_table { width: 85%; margin: 0 auto; border-spacing: 0; border-collapse: collapse; }div.wrapper .result_table td { padding: 10px 5px; text-align: center; border: 1px solid #dedede; }div.wrapper .result_table tr { background: #d5d5d5; }div.wrapper .result_table tbody tr { background: #efefef; }div.wrapper .result_table tbody tr:nth-child(odd) { background: #fafafa; }</style></head><body><h4 style="text-align:center;">贴吧云签到报告</h4><div class="wrapper"><table class="result_table"><thead><tr><td style="width: 60px">项目</td><td style="width: 150px">内容</td><td style="width: 75px">备注</td></tr></thead><tbody><tr><td>签到日期</td><td>[date]</td><td>当日报告已生成</td></tr><tr><td>用户名称</td><td><a href="http://tieba.baidu.com" target="_blank">[name]</a></td><td>您是该站云签用户</td></tr><tr><td>报告地址</td><td><a href="[link]" target="_blank">[link]</a></td><td>点击链接直达,次日失效</td></tr><tr><td>云签站点</td><td><a href="[SYSTEM_URL]" target="_blank">[SYSTEM_NAME]</a></td><td>如有疑问,进站反馈</td></tr></tbody></table><br><p style="font-size: 12px; color: #9f9f9f; text-align: right; border-top: 1px solid #dedede; padding: 20px 10px 0; margin-top: 25px;">发自[SYSTEM_NAME]<br>百度贴吧云签到作者:<a href="http://kenvix.com/"> Kenvix</a>&<a href="http://www.longtings.com/">mokeyjay</a>&<a href="http://fyy.l19l.com/">FYY</a><br>邮件扩展作者:<a href="https://github.com/Weltolk">Weltolk</a></p>
</div></body></html>');
//create connect tab
$m->query("CREATE TABLE IF NOT EXISTS `" . DB_PREFIX . "weltolk_sign_qq_connect` (
`id` int(255) NOT NULL AUTO_INCREMENT ,
Expand Down Expand Up @@ -62,17 +56,13 @@ function callback_inactive()

function callback_remove()
{
//admin setting
option::del('weltolk_sign_qq_default_open');
option::del('weltolk_sign_qq_zone');
option::del('weltolk_sign_qq_title');
option::del('weltolk_sign_qq_content');
// plugin_option
option::del('plugin_weltolk_sign_qq');
//user setting
global $m;
$m->query("DELETE FROM `" . DB_PREFIX . "users_options` WHERE `name` = 'weltolk_sign_qq_enable'");
$m->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "weltolk_sign_qq_connect`");
$m->query("DROP TABLE IF EXISTS `" . DB_PREFIX . "weltolk_sign_qq_target`");
}

?>
?>

0 comments on commit 806cac5

Please sign in to comment.