@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
return array(
|
||||
'name' => '统计代码插件',
|
||||
'version' => '1.0',
|
||||
'desc' => '添加第三方统计代码,统计网站访问信息。',
|
||||
'url' => 'http://www.thinksaas.cn',
|
||||
'email' => 'thinksaas@qq.com',
|
||||
'author' => '邱君',
|
||||
'author_url' => 'http://www.thinksaas.cn',
|
||||
'isedit' => '1',
|
||||
);
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
//统计代码
|
||||
function counter_html(){
|
||||
global $tsMySqlCache;
|
||||
$code = fileRead('data/plugins_pubs_counter.php');
|
||||
|
||||
if($code==''){
|
||||
$code = $tsMySqlCache->get('plugins_pubs_counter');
|
||||
}
|
||||
|
||||
$code = stripslashes($code);
|
||||
|
||||
echo '<div style="display:none;">';
|
||||
echo $code;
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
addAction('pub_footer','counter_html');
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
defined('IN_TS') or die('Access Denied.');
|
||||
|
||||
//插件编辑
|
||||
switch($ts){
|
||||
case "set":
|
||||
|
||||
$strAbout = fileRead('plugins/pubs/counter/about.php');
|
||||
|
||||
$code = fileRead('data/plugins_pubs_counter.php');
|
||||
if($code==''){
|
||||
$code = $tsMySqlCache->get('plugins_pubs_counter');
|
||||
}
|
||||
$code = stripslashes($code);
|
||||
|
||||
include template('edit_set','counter');
|
||||
break;
|
||||
|
||||
case "do":
|
||||
$code = tsTrim($_POST['code']);
|
||||
|
||||
fileWrite('plugins_pubs_counter.php','data',$code);
|
||||
$tsMySqlCache->set('plugins_pubs_counter',$code);
|
||||
|
||||
header('Location: '.SITE_URL.'index.php?app=pubs&ac=plugin&plugin=counter&in=edit&ts=set');
|
||||
break;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{php include pubTemplate("header_admin")}
|
||||
|
||||
|
||||
<div class="midder">
|
||||
|
||||
{php include pubTemplate("plugin_menu")}
|
||||
|
||||
<form method="POST" action="{SITE_URL}index.php?app=pubs&ac=plugin&plugin=counter&in=edit&ts=do">
|
||||
<table class="table table-hover">
|
||||
|
||||
<tr><td>统计代码:</td><td><textarea style="width:400px;height:200px;" name="code">{$code}</textarea></td></tr>
|
||||
|
||||
<tr><td></td><td><input type="submit" value="提交修改" /></td></tr>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{php include pubTemplate("footer_admin")}
|
||||
Reference in New Issue
Block a user