103 lines
3.4 KiB
PHP
103 lines
3.4 KiB
PHP
<?php
|
|
// error_reporting(E_ALL &~ E_NOTICE);
|
|
/* 除了notice以外的错误 */
|
|
|
|
// ini_set('display_errors', 'Off');
|
|
/* 隐藏所有错误 */
|
|
|
|
// $file = $_GET['path'];
|
|
$file = $blogpath.$copyrightfilepath.'plugin.xml';
|
|
|
|
//将XML中的数据,读取到数组对象中
|
|
$xml_object = simplexml_load_file($file);
|
|
|
|
$xml_json = json_encode($xml_object);
|
|
//对象转成json
|
|
|
|
$xml_arr = json_decode($xml_json,true);
|
|
//json再转成数组
|
|
|
|
// 输出$xml_arr
|
|
// echo "<pre>";
|
|
// var_dump($xml_arr);
|
|
|
|
// function getattr1($attribute) {
|
|
// global $xml_arr;
|
|
// try {
|
|
// echo $xml_arr[$attribute];
|
|
// } catch(Exception $e) {
|
|
// echo "";
|
|
// }
|
|
// }
|
|
|
|
?>
|
|
<br />
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$(".btn1").click(function(){
|
|
$(".copyrightdiv").slideToggle(150);/* $(".copyrightdiv").toggle(); */
|
|
$('html,body').animate({ scrollTop: $(".copyrightdiv").offset().top - 90 }, 200)
|
|
});
|
|
});
|
|
</script>
|
|
<button class="btn1">查看/隐藏当前子插件版权信息</button>
|
|
|
|
|
|
<div class="copyrightdiv" style="display: none;">
|
|
<h1>插件版权信息如下:</h1>
|
|
<table data-sort="sortDisabled" style="width: 100%;">
|
|
<tbody>
|
|
<tr class="firstRow">
|
|
<td style="width: 100px;">插件信息</td>
|
|
<td>
|
|
<img src="<?php echo $bloghost.$copyrightfilepath; ?>/logo.png" width="64" height="64">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>插件名称</td>
|
|
<td><?php if( !is_array($xml_arr["name"]) ) {echo $xml_arr["name"];} ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>应用id</td>
|
|
<td><?php if( !is_array($xml_arr["id"]) ) {echo $xml_arr["id"];} ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>发布页面</td>
|
|
<td><?php if( !is_array($xml_arr["url"]) ) {echo $xml_arr["url"];} ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>版本号</td>
|
|
<td><?php if( !is_array($xml_arr["version"]) ) {echo $xml_arr["version"];} ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>创建日期</td>
|
|
<td><?php if( !is_array($xml_arr["pubdate"]) ) {echo $xml_arr["pubdate"];} ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>更新日期</td>
|
|
<td><?php if( !is_array($xml_arr["modified"]) ) {echo $xml_arr["modified"];} ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>插件价格</td>
|
|
<td><?php if( !is_array($xml_arr["price"]) ) {echo $xml_arr["price"];} ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>插件简介</td>
|
|
<td><?php if( !is_array($xml_arr["note"]) ) {echo $xml_arr["note"];} ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>插件介绍</td>
|
|
<td><?php if( !is_array($xml_arr["description"]) ) {echo $xml_arr["description"];} ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>插件作者</td>
|
|
<td>
|
|
作者名称:<?php if( !is_array($xml_arr["author"]["name"]) ) {echo $xml_arr["author"]["name"];} ?><br />
|
|
作者邮箱:<?php if( !is_array($xml_arr["author"]["email"]) ) {echo $xml_arr["author"]["email"];} ?><br />
|
|
作者网站:<?php if( !is_array($xml_arr["author"]["url"]) ) {echo $xml_arr["author"]["url"];} ?>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<br /><br /><br />
|