<?php
// $Id: send_ping.php,v 1.3 2005/10/22 08:10:52 ohwada Exp $

// 2005-09-28 K.OHWADA
// change func.ping.php to class

//=========================================================
// What's New Module
// admin send weblog ping manually 
// 2004/08/20 K.OHWADA
//=========================================================

include_once 'admin_header.php';
include_once XOOPS_ROOT_PATH."/modules/whatsnew/api/api_ping.php";

// class
$class_ping =& Whatsnew_Ping::getInstance();

global $xoopsConfig;

xoops_cp_header();
print_header();
print_menu();
echo "<h4>"._MI_WHATSNEW_ADMENU_PING."</h4>\n";

$op = get_post('op');
$flag_print = get_post('print', 1);

if ($op == 'ping')
{
	$class_ping->set_flag_print($flag_print);
	$class_ping->send_ping_cache();

	echo "<h4>"._WHATSNEW_PING_SENDED."</h4>\n";
	echo "<a href='send_ping.php'>"._WHATSNEW_GOTO_MENU_PING."</a><br />\n";
}
else
{
	print_form();
}

xoops_cp_footer();
exit();
// --- main end ---


function print_form()
{

?>
<form action='send_ping.php' method='post'>
<input type='hidden' name='op' value='ping'>
<table class='outer' width='80%' >
<tr class='even' ><td>
<input type='checkbox' name='print' value='2'> <?php echo _WHATSNEW_PING_DETAIL; ?>
</td></tr>
<tr class='foot' ><td>
<input type='submit' value='<?php echo _WHATSNEW_PING; ?>'>
</td></tr></table>
</form>
<?php

}


?>