birthday_popup.php

来自「这是php编的论坛的原代码」· PHP 代码 · 共 35 行

PHP
35
字号
<?
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$html_entities_match = array('#&#', '#<#', '#>#');
$html_entities_replace = array('&amp;', '&lt;', '&gt;');
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

$gen_simple_header = TRUE; 
$page_title = $lang['Greeting_Messaging']; 
include($phpbb_root_path . 'includes/page_header.'.$phpEx); 
$year=create_date('Y', time(), $board_config['board_timezone']);
$date_today = create_date('Ymd', time(), $board_config['board_timezone']);
$user_birthday=realdate("md",$userdata['user_birthday']); 
$user_birthday2=(($year.$user_birthday<$date_today)? $year+1:$year).$user_birthday; 
$l_greeting = ($user_birthday2==$date_today) ? 
	sprintf ( $lang['Birthday_greeting_today'], date('Y')-realdate('Y',$userdata['user_birthday']) ) :
	sprintf ( $lang['Birthday_greeting_prev'],  date('Y')-realdate('Y',$userdata['user_birthday']) , realdate(str_replace('Y','',$lang['DATE_FORMAT']),$userdata['user_birthday']) ); 
$template->set_filenames(array( 
      'body' => 'greeting_popup.tpl')); 
$template->assign_vars(array( 
      'L_CLOSE_WINDOW' => $lang['Close_window'], 
      'L_MESSAGE' => $l_greeting )); 
$template->pparse('body'); 
include($phpbb_root_path . 'includes/page_tail.'.$phpEx); 

?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?