Files
resatennis_tyroltenn/www/site_inscription/script_cotis.php

31 lines
960 B
PHP
Executable File

<?php
header('Content-Type: text/html; charset=ISO-8859-1');
script_cotis();
function script_cotis() {
$res=false;
include("conf.php");
include("mysql_compat.php");
include ("conf.php");
$db_connection=mysql_connect($db_host,$db_user,$password);
mysql_select_db($db_name,$db_connection);
/* calcul des dates pour rendre actif le compte */
$debut_tab=getdate();
$fin_tab=getdate();
$['']=$['']+1;
$debut="$[''].$[''].$[''].$[''].$[''].$['']";
$fin="$[''].$[''].$[''].$[''].$[''].$['']";
$temp=utf8_decode("Invité");
$temp2=utf8_decode("MembreLicencié");
$temp3=utf8_decode("MembreNonLicencié");
$requete="UPDATE compte SET statut='$temp', actif_debut='$debut', actif_fin='$fin', solde='10', actif_debut=NOW(), actif_fin='$fin' WHERE statut='$temp2' OR statut='$temp3'";
$reponse=mysql_query($requete,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."<br />");
if($reponse!= FALSE) {
$res=true;
}
return $res;
}
?>