📄 weather.php
字号:
<?php
/*
Plugin Name: weather
Plugin URI: http://korsen.f2blog.com
Description: 澶╂皵棰勬姤
Author: korsen
Version: 1.0
Author URI: http://korsen.f2blog.com
*/
function weather_install() {
$arrPlugin['Name']="weather";
$arrPlugin['Desc']="澶╂皵棰勬姤";
$arrPlugin['Type']="Side";
$arrPlugin['Code']=<<<HTML
<IFRAME ID='ifm2' WIDTH='175' HEIGHT='190' ALIGN='CENTER' MARGINWIDTH='0' MARGINHEIGHT='0' HSPACE='0' VSPACE='0' FRAMEBORDER='0' SCROLLING='NO' SRC='http://weather.news.qq.com/inc/ss272.htm'></IFRAME>
HTML;
$arrPlugin['Path']="";
$ActionMessage=install_plugins($arrPlugin);
return $ActionMessage;
}
//Unstall Plugin
function weather_unstall() {
$ActionMessage=unstall_plugins("weather");
return $ActionMessage;
}
#澶╂皵棰勬姤
function weather_report($sidename,$sidetitle,$htmlcode,$isInstall){
if (isset($_COOKIE["content_$sidename"])){
$display=$_COOKIE["content_$sidename"];
}else{
$display=($isInstall>0)?"none":"";
}
?>
<!--澶╂皵棰勬姤-->
<div id="Side_WeatherReport" class="sidepanel">
<h4 class="Ptitle" style="cursor: pointer;" onclick="sidebarTools('<?="content_$sidename"?>')"><?=$sidetitle?></h4>
<div class="Pcontent" id="<?="content_$sidename"?>" style="display:<?=$display?>">
<?
if ($htmlcode!=""){
echo dencode($htmlcode);
}else{
?>
<IFRAME ID='ifm2' WIDTH='175' HEIGHT='190' ALIGN='CENTER' MARGINWIDTH='0' MARGINHEIGHT='0' HSPACE='0' VSPACE='0' FRAMEBORDER='0' SCROLLING='NO' SRC='http://weather.news.qq.com/inc/ss272.htm'></IFRAME>
<?}?>
</div>
<div class="Pfoot"></div>
</div>
<?
} #END娆㈣繋浠嬮潰
add_action("weather",'weather_report',4);
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -