<?

require "include/bittorrent.php";
dbconn ( true );
validcan ();
global $pic_base_url;
stdhead ( "Сообщить о пожертвование" );
if (isset ( $_GET ["mode"] ))
	$mode = $_GET ["mode"];
switch ($mode) {
	case "Yandex" :
		print ( "<form action=\"donated.php?mode=$mode\" mode=\"post\">" );
		print ( "</form>" );
		break;
	case "Mail" :
		print ( "<form action=\"donated.php?mode=$mode\" mode=\"post\">" );
		print ( "</form>" );
		break;
	default :
		print ( "<form action=\"donated.php?mode=$mode\" mode=\"post\">" );
		print ( "<select name=\"mode\"><option value=\"\" selected>Выберите систему</option><option value=\"Yandex\">Yandex</option><option value=\"Mail\">Mail</option></select>" );
		print ( "<input type=\"submit\" value=\"Перейти\" />" );
		print ( "</form>" );
		break;
}
if (isset ( $_GET ["mode"] )) {
	
	if ($mode == Yandex) {
		begin_frame ( "Yandex деньги", "65" );
		?>
<form method="post" action="takedonated.php">
<?
		$va = array ("Доллар(ов)" => "Доллар(ов)", "Евро" => "Евро", "Рубль(ей)" => "Рубль(ей)", "Грив(на,ны,ен)" => "Грив(на,ны,ен)" );
		$val = "<select name=\"val\"><option value=\"00\">Выберите...</option>\n";
		foreach ( $va as $val_no => $show_val ) {
			$val .= "<option value=$val_no>$show_val</option>\n";
		}
		$val .= "</select>\n";
		?>
<table cellspacing=0 cellpadding=5 align=center>
	<img src="<?=$pic_base_url?>logo_ym.gif" alt="Yandex" title="Yandex" />
	<br />
	<input type="hidden" name="mode" value="yandex" />
	Кошелёк(ваш):
	<input type="text" name="kosh" />
	<br />
	Сумма:
	<input type="text" name="sum" />
	<br />
<?
		print ( "Валюта: $val <br />" );
		?>
<input type="submit" value="Сообщить о пожертвовании" />
</table>
</form>
<?
		end_frame ();
	} elseif ($mode == Mail) {
		begin_frame ( "Mail деньги", "65" );
		?>
<form method="post" action="takedonated.php">
<?
		$va = array ("Доллар(ов)" => "Доллар(ов)", "Евро" => "Евро", "Рубль(ей)" => "Рубль(ей)", "Грив(на,ны,ен)" => "Грив(на,ны,ен)" );
		$val = "<select name=\"val\"><option value=\"00\">Выберите...</option>\n";
		foreach ( $va as $val_no => $show_val ) {
			$val .= "<option value=$val_no>$show_val</option>\n";
		}
		$val .= "</select>\n";
		?>
<table cellspacing=0 cellpadding=5 align=center>
	<img src="<?=$pic_base_url?>logo_m.gif" alt="Mail" title="Mail" />
	<br />
	<input type="hidden" name="mode" value="mail" />
	Кошелёк(ваш):
	<input type="text" name="kosh" />
	<br />
	Сумма:
	<input type="text" name="sum" />
	<br />
<?
		print ( "Валюта: $val <br />" );
		?>
<input type="submit" value="Сообщить о пожертвовании" />
</table>
</form>
<?
		end_frame ();
	}
}
stdfoot ();

?>
