weather.php

来自「F2blog v1.1 beta 12.27更新说明 1、后台编辑器增加了文本」· PHP 代码 · 共 56 行

PHP
56
字号
<?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 + =
减小字号Ctrl + -
显示快捷键?