windowsxp.php:

<?php

// check if 'p' has been set
if(isset($_GET['p']))
{
 	$p = $_GET['p'];

	// shutdown
	if($p == 'winxpshut')
	{
		$output = shell_exec('shutdown -s -t 20');
		echo "<p>" . $output . "</p>";
		
		echo "<p>Uw server wordt over 20 seconden afgesloten.</p>";
	}
	// reboot
	elseif($p == 'winxpreboot')
	{
		$output = shell_exec('shutdown -r -t 20');
		echo "<p>" . $output . "</p>";
		
		echo "<p>Uw server wordt over 20 seconden herstart.</p>";
	}
	// no valid value
	else
		echo "Geen goede waarde ingevuld.";
}
// 'p' contains no value
else
	echo "Geen waarde ingevuld.";
?>

linux.php:

<?php

// check if 'p' has been set
if(isset($_GET['p']))
{
	$p = $_GET['p'];

	// shutdown
	if($p == 'linuxshut')
	{
		$output = shell_exec('shutdown -h now');
		echo "<p>" . $output . "</p>";
		
		echo "<p>Uw server wordt afgesloten.</p>";
	}
	// reboot
	elseif($p == 'linuxreboot')
	{
		$output = shell_exec('shutdown -r now');
		echo "<p>" . $output . "</p>";
		
		echo "<p>Uw server wordt herstart.</p>";
	}
	// no valid value
	else
		echo "Geen goede waarde ingevuld.";
}
// 'p' contains no value
else
	echo "Geen waarde ingevuld.";
?>