<?php
#注册插件
RegisterPlugin("tx_Backstage","ActivePlugin_tx_Backstage");

function ActivePlugin_tx_Backstage() {
    Add_Filter_Plugin('Filter_Plugin_Admin_Header','tx_Backstage_Css');
    Add_Filter_Plugin('Filter_Plugin_Login_Header','tx_Backstage_Css');
    Add_Filter_Plugin('Filter_Plugin_Other_Header','tx_Backstage_Css');
    Add_Filter_Plugin('Filter_Plugin_Admin_Footer','tx_Backstage_sm');
}

function tx_Backstage_Css() {
    global $zbp;
    echo '<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">' . "\r\n";
    echo '<link rel="stylesheet" type="text/css" href="'. $zbp->host .'zb_users/plugin/tx_Backstage/txcstx2.css"/>' . "\r\n";
    echo '<script src="'. $zbp->host .'zb_users/plugin/tx_Backstage/txcstx.js" type="text/javascript"></script>' . "\r\n";
}

function tx_Backstage_sm() {
    global $zbp;
    echo '
    <div class="clear"></div>
    <div id="txcstxsm">
        <h2>插件说明</h2>
        <p class="mb15"><strong>插件作者</strong>：天兴工作室</p>
        <p class="mb15"><strong>作者网址</strong>：<a href="https://www.txcstx.cn">https://www.txcstx.cn</a></p>
        <p class="mb15"><b>这个插件可以用来在手机上发发文章，删删评论。</b></p>
        <p class="mb15">PS：使用此插件可以发布文章并上传图片，但是请注意<b>仅支持UE编辑器</b>，并且要<b>升级到最新版</b>。而且只能发布一张图，发的图多了大了你会发现有一种深深的无力感，不建议去尝试！</p>
        <p><a href="'. $zbp->host .'zb_system/cmd.php?act=PluginDis&amp;name=tx_Backstage&amp;token='. $zbp->GetToken() .'" title="' . $zbp->lang['msg']['disable'] . '" class="dnwu tx-btn">停用此插件</a></p>
    </div>
    <a href="javascript:;" class="nav-on on-right"><i></i><i></i><i></i></a>
    <a href="javascript:;" class="nav-on on-left"><i></i><i></i><i></i></a>
    ' . "\r\n";
}



function UninstallPlugin_tx_Backstage() {
    global $zbp;
    //	$zbp->DelConfig('tx_Backstage');
}