<?php
include ('logue.php');
include ('entete2.php');
include ('ressource.php');
include ('calcullabo.php');

include ('entete.php');
echo"<STYLE TYPE=text/css>
.Style1 {color: #00CC00}
.Style2 {color: #FF0000}
.Style3 {color: #0000FF}
input {
border:1px solid #7E7E7E;
background-color:#000000;
font-family:'trebuchet ms',sans-serif;
color:white;
}
textarea {
border:1px solid #7E7E7E;
background-color:#000000;
font-family:'trebuchet ms',sans-serif;
color:white;
}
select, option {
background-color:#000000;
color:white;
}
</STYLE>";
echo"<div align=\"center\"><form name=\"colo\" method=\"post\" action=\"colonie.php\" target=\"_parent\">
<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td width=\"100\" rowspan=\"2\" valign=\"middle\">
       <div align=\"center\">
         <input name=\"page\" value=\"" . $PHP_SELF . "\" type=\"hidden\" id=\"page\">
         <select name=\"idcolo\" onchange=submit()>";
include ('colo2.php');
echo"<b>Vous avez besoin de ressources ?</b>

<br><br>StarGate Univers vous propose 100.000 de la ressource de votre choix un code allopass, 5 eppz ou une iris vous protegeant de 5 attaques par la porte !! Sur la planète selectionnée.
<br>(Attention, vous ne pouvez pas dépasser de 100 000 vos limites de stockage.)
<br>           le Staff. ";

$date = strftime("%Y-%m-%d %H:%M:%S", time() - (120));

$sql = "SELECT date FROM matgraph_codes2 WHERE login='$login' AND date > '$date' limit 1";
$res = db_mysql_Query($sql)or die('erreur sql<br>'.$sql.'<br>'.mysql_error());
$num = mysql_num_rows($res);
if ( $num > 0 ) {
	echo" <br><br> Par raison de sécurité vous ne pouvez pas utilisé ce service plus d'une fois toute les deux minutes. <br>";
}


// On genere les numeros
include( 'config.php' );
// initialisation avec des microsecondes
function make_seed()
{
   list($usec, $sec) = explode(' ', microtime());
   return (float) $sec + ((float) $usec * 100000);
}
mt_srand(make_seed());

$existe = true;
while( $existe == true ) {
	$randval = mt_rand();

	$req = "SELECT * FROM matgraph_codes2 WHERE id = ".$randval;
	$res = db_mysql_Query($req);
	$num = mysql_num_rows($res);

	if( $num > 0 ) {
		$existe = true;
	} else {

		$randval2 = mt_rand();

		$req = "INSERT INTO matgraph_codes2 VALUES ($randval, $randval2, now(), '$_SESSION[login]' )";
		$res = db_mysql_Query($req);

		if( $res == false ) {
			// Insertion échoué
			$existe = true;
		} else {
			$existe = false;
		}
	}
}

// On enregistre l'id
unset($_SESSION[allopass]);
$_SESSION[allopass] = $randval;

echo"                 <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"300\" bordercolor=\"#000000\">
 <tr>
  <td width=\"300\" height=\"25\" colspan=\"2\" bgcolor=\"#FFFFFF\" align=\"center\" valign=\"top\">
   <img src=\"http://www.allopass.com/imgweb/script/fr_uk/acces_title.jpg\" width=\"300\" height=\"25\" align=\"center\" alt=\"Logo\">
  </td>
 </tr>
 <tr>
  <td colspan=\"2\" width=\"300\" height=\"137\" align=\"left\">
   <img name=\"acces_top\" src=\"http://www.allopass.com/show_top2.php4?SITE_ID=82840&DOC_ID=266235&LG=fr_uk\" width=\"300\" height=\"137\" align=\"center\">
  </td>
 </tr>
 <tr>
  <td width=79 height=29 bgcolor=\"#FFFFFF\" align=\"center\" valign=\"top\">
   <img src=\"http://www.allopass.com/imgweb/script/fr_uk/acces_left.jpg\" width=\"79\" height=\"29\" align=\"center\">
  </td>
  <td width=\"254\" height=\"29\" bgcolor=\"#FFFFFF\" align=\"right\"><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=9070970929156&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_fr.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=8192&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_it.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=549789368320&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_es.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=8589934624&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_uk.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=274945048576&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_be.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=274886361088&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_ch.gif\" width=\"35\" height=\"29\" alt=\"\" /></a>
  </td>
 </tr>
 <tr>
  <td colspan=\"2\" align='right' bgcolor='white'><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=4096&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_lu.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=134217728&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_ca.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=34359738368&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_ie.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=4398046511120&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_de.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=2048&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_at.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=17179869696&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_nl.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=16777216&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_se.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=68719476736&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_no.gif\" width=\"35\" height=\"29\" alt=\"\" /></a>
  </td>
 </tr>
 <tr>
  <td colspan=\"2\" align='right' bgcolor='white'><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=524288&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_hk.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=1048576&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_au.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=2097152&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_nz.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onClick=\"javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=562949953421312&SITE_ID=82840&DOC_ID=266235&LG=fr','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=320');\"><img border=\"0\" src=\"http://www.allopass.com/imgweb/common/flag_pl.gif\" width=\"35\" height=\"29\" alt=\"\" /></a><a href=\"javascript:;\" onclick=\"javascript:window.open('https://secure.allopass.com/show_ccard.php4?LG=UK&SITE_ID=82840&DOC_ID=266235','ccard','toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width=550,height=575');\"><img border=\"0\" src=\"http://www.allopass.com/img/flag_us.png\" width=\"35\" height=\"29\" alt=\"United States\"></a></td>
 </tr>
 <tr>
  <td bgcolor=\"#FFFFFF\" colspan=\"2\" width=\"300\" valign=\"top\" align=\"center\">
   <font face=\"Arial,Helvetica\" size=\"1\" color=\"#000000\">
    <B>Entrer votre code d'accès - Enter your access code</B>
    <form name=\"APform\" action=\"http://www.allopass.com/check/index.php4\" method=\"post\">
     <input type=\"hidden\" name=\"SITE_ID\" value=\"82840\">
     <input type=\"hidden\" name=\"DOC_ID\" value=\"266235\">
     <input type=\"hidden\" name=\"LG_SCRIPT\" value=\"fr_uk\">
     <input type=\"hidden\" name=\"DATAS\" value=\"$randval2\">
     <input type=\"text\" size=\"8\" maxlength=\"10\" value=\"\" name=\"CODE0\"  style=\"BACKGROUND-COLOR: #E7E7E7; BORDER-BOTTOM: #000080 1px solid; BORDER-LEFT: #000080 1px solid; BORDER-RIGHT: #000080 1px solid; BORDER-TOP: #000080 1px solid; COLOR: #000080; CURSOR: text; FONT-FAMILY: Arial; FONT-SIZE: 10pt; FONT-WEIGHT:bold; LETTER-SPACING: normal; WIDTH:70; TEXT-ALIGN=center;\"> <br />
     <input type=\"button\" name=\"APsub\" value=\"\" onclick=\" this.form.submit(); this.form.APsub.disabled=true;\" style=\"border:0px;margin:0px;padding:0px;width:48px; height:18px; background:url('http://www.allopass.com/imgweb/common/bt_ok.gif');\"><br />
     
     <table border=\"0\" width=\"300\" cellpadding=\"0\" cellspacing=\"0\">
      <tr>
       <td align=\"center\" bgcolor=\"#FFFFFF\">
        <a href=\"#null\" onclick=\"window.open('https://secure.allopass.com/show_ccard.php4?LG=UK&SITE_ID=82840&DOC_ID=266235','ccard','toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width=550,height=575');\">
         <img src=\"http://www.allopass.com/imgweb/script/fr_uk/achat_cc.jpg\" border=\"0\" alt=\"If your country is not listed, click here\">
        </a>
       </td>
      </tr>
     </table>
     <font face=\"Arial,Helvetica\" size=1 color=\"#000000\">
             Pour connaître notre solution de micro paiement : <a href=\"http://www.allopass.com\" target=\"_blank\">Allopass</a>
             
     </font>
    </form>
   </font>
  </td>
 </tr>
</table>";



?>