Notice: Undefined variable: pre in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 15

Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 16

Notice: Use of undefined constant CLIENTGCM - assumed 'CLIENTGCM' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 17

Notice: Use of undefined constant BASICGCM - assumed 'BASICGCM' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 18

Notice: Use of undefined constant VERSIONGCM - assumed 'VERSIONGCM' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 19

Notice: Use of undefined constant URL_REWRITE - assumed 'URL_REWRITE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 20

Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 25
"; //_____________________________________________PROFILE CSS $CSS_browser='IE'; $CSS_standard="standard_".$CSS_browser.".css";//nom du fichier css du site $CSS_second="main_SSmenus_".$CSS_browser.".css";//nom du 2 fichier css du site $CSS_adminname="ceiadmin_".$CSS_browser.".css";//nom du fichier css du module admin //_____________________________________________URL DU DOMAINE $DomaineName="www.rbsps.org"; $dir['URL_SITE']='http://www.rbsps.org'; //_____________________________________________info connection MYSQL $mysql_host="10.64.196.213";//serveur mysql $mysql_user="VSTrbsps";//login $mysql_passw="B4pR3ch7";//mot de passe $mysql_member="MBRrbsps";//login membre $mysql_memberpassw="B4pR3cv6";//mot de passe membre $mysql_ADM="rbsps";//login administrateur $db="rbsps";//nom de la DB $bounce_mail = 'rbsps@globalcube.net'; $bounce_pwd =''; //_____________________________________________info langues $BasicLanguage='fr';//langue de base du site $LG_list[0]='fr';//liste des langues du site $LG_list[1]='nl';//liste des langues du site $LG_list[2]='uk';//liste des langues du site //_____________________________________________info S3CURE PHP $BAD_LOG_HREF="https://www.globalcube.net/membergcm.php"; $URL_LOG_HREF="https://www.globalcube.net/memberszone/rbspsv2"; //_____________________________________________info ADMINZONE $ADMIN_Version='2.6.3'; //version du module administratif $ADMIN_emailfor='technical@glucone.com'; //email de gestion des erreur majeurs du module admin $ADMIN_emailfrom='info@rbsps.org'; //email du site proprietaire $ADMIN_emailfrom2='info@rbsps.org'; //email du site proprietaire $ADMIN_emailinfo[0]='logs1@glucone.com'; //email pour etre informe des activites de la mailing list $ADMIN_emailinfo[1]='logs2@glucone.com'; //email pour etre informe des activites de la mailing list $ADMIN_emailinfo[2]='info@rbsps.org'; //email pour etre informe des activites de la mailing list //$ADMIN_emailinfo[2]=''; //______________________________________________MAILING LIST $Type_Check_Mailing='0'; // 1=Version Snowcheck 0=Simple Check $MAIL_CONFIRMATION_TYPE="1"; // txt mail envoyé 1/html 2/txt $MAIL_CONFIRMATION_URL="mailing/mail/confirmation_"; // lien vers le mail de confirmation $MAIL_PASSWORD_URL="mailing/mail/validate_"; // lien vers le mail qui donne le password $MAIL_ACTIVATION_URL="mailing/mail/activation"; // lien vers le mail qui donne confirme l'activation du membre $filters = array("Barnypok","blackjack","cash","advance","casino","gaming","roulette","poker","url=","ringtones","spiele","kasino","gewinn","kostenloses","viagra","sex","sexe","fuck","penis","breitling","<"); ?>
Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 32
'langue'){echo $key.'='.$val.'&';} } echo "langue=".$NewLangue; } function ReturnChangeUrlLangue($link,$_GET,$_POST,$NewLangue) { $Url=$link."?"; while (list ($key, $val) = each ($_GET)) { if($key<>'langue'){$Url .=$key.'='.$val.'&';} } while (list ($key, $val) = each ($_POST)) { if($key<>'langue'){$Url .=$key.'='.$val.'&';} } $Url .= "langue=".$NewLangue; Return $Url; } if(!empty($_GET['langue'])) { $langue = $_GET['langue']; if($langue=='en')$langue='uk'; } if ($AdminInfo[adm_langue]==""){$AdminInfo[adm_langue]=$BasicLanguage;} if ($MemberInfo[adm_langue]=="" and $langue<>''){$MemberInfo[adm_langue]=$langue;} elseif ($MemberInfo[adm_langue]=="" and $langue==''){$MemberInfo[adm_langue]=$BasicLanguage;} if ($admin_language=='true') {//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Page ADMIN include("{$dir[VERSIONGCM]}includes/language/GCM{$AdminInfo[adm_langue]}.php"); include("{$dir[VERSIONGCM]}includes/language/COMMON{$AdminInfo[adm_langue]}.php"); include("{$dir[CLIENTGCM]}includes/language/{$AdminInfo[adm_langue]}.php"); $langue=$AdminInfo[adm_langue]; }//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Page ADMIN elseif ($member_language=='true') {//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Page ADMIN include("{$dir[VERSIONGCM]}includes/language/GCM{$MemberInfo[adm_langue]}.php"); include("{$dir[VERSIONGCM]}includes/language/COMMON{$MemberInfo[adm_langue]}.php"); include("{$dir[CLIENTGCM]}includes/language/{$MemberInfo[adm_langue]}.php"); $langue=$MemberInfo[adm_langue]; }//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Page ADMIN else {//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Page WEb if ($langue<>''){setcookie("cook_language",$langue,time()+86400000, "/","",0);} if ($_COOKIE['cook_language']<>''& $langue==''){$langue=$_COOKIE['cook_language'];} elseif ($langue=='') {$langue=$BasicLanguage;} include("{$dir[RACINE]}includes/language/COMMON{$langue}.php"); include("{$dir[RACINE]}includes/language/{$langue}.php"); }//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Page WEb ?>
Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 36
'; if($firstrollvalue==''){ echo'';} else{ $requestfirst="select "; $requestfirst .=$value; $requestfirst .=","; $requestfirst .=$roll; $requestfirst .=" from "; $requestfirst .=$table; $requestfirst .=" where "; $requestfirst .=$value; $requestfirst .=" ='"; $requestfirst .=$firstrollvalue; $requestfirst .="'"; $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("$requestfirst"); if ($result) {//_________________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0){echo'error - no result MYSQL -
';} else{}//_____________________________________________________________MYSQL RESULT }else{echo'error MYSQL';} $array = mysql_fetch_array($result); while ($array) { echo''; $array = mysql_fetch_array($result); } if($tout==''){}else{echo'';} } $request="select "; $request .=$value; $request .=","; $request .=$roll; $request .=" from "; $request .=$table; $request .=" order by "; $request .=$roll; $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("$request"); if ($result) {//_________________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0){echo'error - no result MYSQL -
';} else{}//_____________________________________________________________MYSQL RESULT }else{echo'error MYSQL';} $array = mysql_fetch_array($result); while ($array) { if($array[0]<>$firstrollvalue){echo'';} $array = mysql_fetch_array($result); } echo''; }//_____________________________________________________________fin de la fonction rollfromsql /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction checkfromsql(V1.6) */ /* ==================================================================== */ function checkfromsql( $name, $class, $firstrollvalue, $value, $roll, $mysql_host, $mysql_user, $mysql_passw, $db, $table) {//___________________________________________________________début de la fonction rollfromsql $request="select "; $request .=$value; $request .=","; $request .=$roll; $request .=" from "; $request .=$table; $request .=" order by "; $request .=$roll; $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("$request"); if ($result) {//_________________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0){echo'error - no result MYSQL -
';} else{}//_____________________________________________________________MYSQL RESULT }else{echo'error MYSQL';} $array = mysql_fetch_array($result); while ($array) { if(eregi($array[0],$firstrollvalue)) { echo''.$array[1].'
'; } else { echo''.$array[1].'
'; } $array = mysql_fetch_array($result); } }//_____________________________________________________________fin de la fonction rollfromsql /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction selectcheckfromsql(V1.0) */ /* ==================================================================== */ function selectcheckfromsql( $name, $class, $firstrollvalue,$initvalue, $value, $roll,$check, $mysql_host, $mysql_user, $mysql_passw, $db, $table) {//___________________________________________________________début de la fonction rollfromsql $request="select ".$value.",".$roll." from ".$table." where ".$check."='y' order by ".$roll; $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("$request"); if ($result) {//_________________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0 & $initvalue==''){echo'error - no result MYSQL -
';} else{}//_____________________________________________________________MYSQL RESULT }else{echo'error MYSQL';} echo''; }//_____________________________________________________________fin de la fonction rollfromsql /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction listmultiselectfromsql(V1.0) */ /* ==================================================================== */ function listmultiselectfromsql( $name, $class, $selectedvalue, $value, $list, $mysql_host, $mysql_user, $mysql_passw, $db, $table,$size) {//___________________________________________________________début de la fonction rollfromsql $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("select $value,$list from $table"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){echo'ERROR CONNECTION MYSQL';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){echo'MYSQL RESULT O';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 echo''; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 }//_____________________________________________________________fin de la fonction rollfromsql /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction rollfromsql2(V1.0) */ /* ==================================================================== */ function rollfromsql2($Bdd, $table, $name, $class, $selectedvalue, $value, $list) {//___________________________________________________________début de la fonction rollfromsql $Query = "SELECT $value,$list FROM $table"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){echo'ERROR CONNECTION MYSQL';echo"
select $value,$list from $table";}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){echo'MYSQL RESULT O';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if ($MYSQLRESULT=='1') { echo''; } }//_____________________________________________________________fin de la fonction rollfromsql /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction rollfromsql2clean(V2.0) */ /* ==================================================================== */ function rollfromsql2clean( $name, $class, $selectedvalue, $value, $list,$cleanvalue, $mysql_host, $mysql_user, $mysql_passw, $db, $table) {//___________________________________________________________début de la fonction rollfromsql $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); if(is_array($cleanvalue)) { $MYSQLQUERY="select $value,$list from $table where "; $i=0; foreach ($cleanvalue as $elem) { if($i>0){$MYSQLQUERY .=" and ";} $MYSQLQUERY .=$value."<>'".$elem."'"; $i++; } } else { $MYSQLQUERY="select $value,$list from $table where $value<>'$cleanvalue'"; } $result = mysql_query("$MYSQLQUERY"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){echo'ERROR CONNECTION MYSQL';echo"
select $value,$list from $table";}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 echo' '; } if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 echo''; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 }//_____________________________________________________________fin de la fonction rollfromsql /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction rollfromsql2cleanActived(V1.0) */ /* ==================================================================== */ function rollfromsql2cleanActived( $name, $class, $selectedvalue, $value, $list,$cleanvalue,$activedvalue, $mysql_host, $mysql_user, $mysql_passw, $db, $table) {//___________________________________________________________début de la fonction rollfromsql2cleanActived $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); if(is_array($cleanvalue)) { $MYSQLQUERY="select $value,$list from $table where $activedvalue='y' "; $i=0; foreach ($cleanvalue as $elem) { if($i>0){$MYSQLQUERY .=" and ";} $MYSQLQUERY .=$value."<>'".$elem."'"; $i++; } } else { $MYSQLQUERY="select $value,$list from $table where $value<>'$cleanvalue' and $activedvalue='y'"; } $result = mysql_query("$MYSQLQUERY"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){echo'ERROR CONNECTION MYSQL';echo"
select $value,$list from $table";}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 echo' '; } if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 echo''; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 }//_____________________________________________________________fin de la fonction rollfromsql2cleanActived /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction rollfromsql2cleanArray(V1.0) */ /* ==================================================================== */ function rollfromsql2cleanArray( $name, $class, $selectedvalue, $value, $list,$cleanvalueArray, $mysql_host, $mysql_user, $mysql_passw, $db, $table) {//___________________________________________________________début de la fonction rollfromsql $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $MYSQLQUERY="select $value,$list from $table where"; $i=0; foreach($cleanvalueArray as $cleanvalue) { if($i>0){$MYSQLQUERY .=" and";} $MYSQLQUERY .=" $value<>'$cleanvalue'"; $i++; } $result = mysql_query("$MYSQLQUERY"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){echo'ERROR CONNECTION MYSQL';echo"
$MYSQLQUERY";}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){echo'MYSQL RESULT O';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 echo''; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 }//_____________________________________________________________fin de la fonction rollfromsql /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* listmultiselectfromsql2(V1.3) */ /* ==================================================================== */ function listmultiselectfromsql2( $Bdd, $table,$size,$nameavailable,$namechoiceBox,$f,$name,$moveOverName, $class, $selectedvalue, $value, $list,$TR) {//___________________________________________________________début de la fonction rollfromsql $Query = "SELECT $value,$list FROM $table ORDER BY $list"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){echo'ERROR CONNECTION MYSQL';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT=='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //***********************************listmultiselectfromsql2 echo'
'.$TR[AvailableList].':
'.$TR[YourChoices].':
'; //***********************************LIST SELECT }//_____________________________________________________________fin de la fonction listmultiselectfromsql2 /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* listmultiselectfromsql2(V1.2) */ /* ==================================================================== */ function listmultiselectAvtivedfromsql2($nameavailable,$namechoiceBox,$name,$moveOverName, $class, $selectedvalue, $value, $selectedactived, $list,$TR, $mysql_host, $mysql_user, $mysql_passw, $db, $table,$size) {//___________________________________________________________début de la fonction rollfromsql $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("select $value,$list from $table where $selectedactived='y'"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){echo'ERROR CONNECTION MYSQL';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT=='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) //***********************************listmultiselectfromsql2 echo'
'.$TR[AvailableList].':
'.$TR[YourChoices].':
'; //***********************************LIST SELECT }//_____________________________________________________________fin de la fonction listmultiselectfromsql2 /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction LookMysqlUnicValue(V1.0) */ /* ==================================================================== */ function LookMysqlUnicValue($mysql_host,$mysql_user,$mysql_passw,$db,$table,$champresult,$champquery,$value,$empty,$DBNoConnect) {//_____________________________________________________________fin de la fonction LookMysqlUnicValue $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("select $champresult from $table where $champquery='$value'"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='-1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT -1 echo $DBNoConnect; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT -1 if ($MYSQLRESULT=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 0 echo $empty; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 0 if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 $array = mysql_fetch_array($result); while ($array) { echo $array[$champresult]; $array = mysql_fetch_array($result); } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 }//_____________________________________________________________fin de la fonction LookMysqlUnicValue /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction LookMysqlMultiValue(V1.0) */ /* ==================================================================== */ function LookMysqlMultiValue($mysql_host,$mysql_user,$mysql_passw,$db,$table,$champresult,$separator,$champquery,$value,$empty,$DBNoConnect) {//_____________________________________________________________fin de la fonction LookMysqlMultiValue $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $MysqlQuery="select ".$champresult." from ".$table." where "; $i=0; foreach ($value as $elm) {//________________________FOREACH if($i>0){$MysqlQuery .=" or ";} $MysqlQuery .=$champquery."='".$elm."'"; $i++; }//________________________FOREACH $MysqlQuery .=" order by ".$champquery." ASC"; $result = mysql_query($MysqlQuery); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='-1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT -1 echo $DBNoConnect; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT -1 if ($MYSQLRESULT=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 0 echo $empty; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 0 if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 $array = mysql_fetch_array($result); $i=1; while ($array) { if($i>1){echo $separator;} echo $array[$champresult]; $i++; $array = mysql_fetch_array($result); } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 }//_____________________________________________________________fin de la fonction LookMysqlMultiValue /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction TakeMysqlUnicValue(V1.0) */ /* ==================================================================== */ function TakeMysqlUnicValue($mysql_host,$mysql_user,$mysql_passw,$db,$table,$champresult,$champquery,$value,$empty,$DBNoConnect) {//_____________________________________________________________fin de la fonction LookMysqlUnicValue $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("select $champresult from $table where $champquery='$value'"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='-1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT -1 $return=$DBNoConnect; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT -1 if ($MYSQLRESULT=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 0 $return=$empty; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 0 if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 $array = mysql_fetch_array($result); while ($array) { $return=$array[$champresult]; $array = mysql_fetch_array($result); } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 return $return; }//_____________________________________________________________fin de la fonction LookMysqlUnicValue /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction TakeMysqlMultiValue(V1.0) */ /* ==================================================================== */ function TakeMysqlMultiValue($mysql_host,$mysql_user,$mysql_passw,$db,$table,$champresult,$separator,$champquery,$value,$empty,$DBNoConnect) {//_____________________________________________________________fin de la fonction LookMysqlMultiValue $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $MysqlQuery="select ".$champresult." from ".$table." where "; $i=0; foreach ($value as $elm) {//________________________FOREACH if($i>0){$MysqlQuery .=" or ";} $MysqlQuery .=$champquery."='".$elm."'"; $i++; }//________________________FOREACH $MysqlQuery .=" order by ".$champquery." ASC"; $result = mysql_query($MysqlQuery); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='-1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT -1 $return=$DBNoConnect; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT -1 if ($MYSQLRESULT=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 0 $return=$empty; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 0 if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 $return=''; $array = mysql_fetch_array($result); $i=1; while ($array) { if($i>1){$return .=$separator;} $return .=$array[$champresult]; $i++; $array = mysql_fetch_array($result); } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 return $return; }//_____________________________________________________________fin de la fonction LookMysqlMultiValue /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction rollfromsql3(V1.0) */ /* ==================================================================== */ function rollfromsql3( $name, $class,$emptyname,$selectedvalue, $value, $list,$jsOption, $mysql_host, $mysql_user, $mysql_passw, $db, $table) {//___________________________________________________________début de la fonction rollfromsql $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("select $value,$list from $table"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){echo'ERROR CONNECTION MYSQL';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){echo'MYSQL RESULT O';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 echo''; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 }//_____________________________________________________________fin de la fonction rollfromsql /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction ControlQuery(V1.0) */ /* ==================================================================== */ function ControlQuery($MAXROWSQUERY,$NBPAGEQUERY,$MAXQUERY,$INITQUERY,$CONTROLQUERY) {//_____________________________________________________________debut de la fonction ControlQuery $MAXPAGEQUERY=ceil($MAXROWSQUERY/$MAXQUERY); $IDPAGEQUERY=ceil($INITQUERY/$MAXQUERY)+1; $IDZONEQUERY=ceil($IDPAGEQUERY/$NBPAGEQUERY)-1; echo ''; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INIT if($INITQUERY>0) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INIT //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++AVANT if($INITQUERY>0) { $NEW_INITQUERY=$INITQUERY-$MAXQUERY; echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++AVANT //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DIRECTPAGE $j=($IDZONEQUERY*$NBPAGEQUERY)+1; for ($i = 1; $i <= $NBPAGEQUERY; $i++) { $NEW_INITQUERY=($j-1)*$MAXQUERY; if($j<=$MAXPAGEQUERY) { if($i>1){echo '-';} if($IDPAGEQUERY<>$j) {echo ''.$j.'';} else{echo $j;} $j++; } } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DIRECTPAGE //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES $NEW_INITQUERY=$INITQUERY+$MAXQUERY; if($NEW_INITQUERY<$MAXROWSQUERY) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES $NEW_INITQUERY=((ceil($MAXROWSQUERY/$MAXQUERY))-1)*$MAXQUERY; if($INITQUERY<$NEW_INITQUERY and $NEW_INITQUERY>0) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES echo''; }//_____________________________________________________________fin de la fonction ControlQuery /* fonction LookMysqlUnicValue2(V1.0) */ /* ==================================================================== */ function LookMysqlUnicValue2($Bdd,$table,$champresult,$champquery,$value,$empty,$DBNoConnect) {//_____________________________________________________________fin de la fonction LookMysqlUnicValue2 $Query = "SELECT $champresult FROM $table WHERE $champquery='$value'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){ return '-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){return '0';}//_______MYSQL NO RESULT else { $array = $Bdd->get_array($Result, 'BOTH'); return $array[$champresult]; }//_______MYSQL RESULT OK }//_____________________________________________________________fin de la fonction LookMysqlUnicValue2 /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction LookMysqlMultiValue2(V1.0) */ /* ==================================================================== */ function LookMysqlMultiValue2($Bdd,$table,$champresult,$separator,$champquery,$value,$empty,$DBNoConnect) {//_____________________________________________________________fin de la fonction LookMysqlMultiValue2 $MysqlQuery="SELECT ".$champresult." FROM ".$table." WHERE "; $i=0; foreach ($value as $elm) { if($i>0){$MysqlQuery .=" OR ";} $MysqlQuery .=$champquery."='".$elm."'"; $i++; } $MysqlQuery .=" ORDER BY ".$champquery." ASC"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($MysqlQuery,$link) ) die( $Bdd->return_error()); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if ($MYSQLRESULT=='-1')return $MYSQLRESULT; else if ($MYSQLRESULT=='0') return $MYSQLRESULT; else if ($MYSQLRESULT=='1') { $i=1; $RESULT=''; while ($array = $Bdd->get_array($Result, 'BOTH')) { if($i>1){$RESULT .=$separator;} $RESULT .=$array[$champresult]; $i++; } return $RESULT; } }//_____________________________________________________________fin de la fonction LookMysqlMultiValue2 /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction ControlQuery2(V1.0) */ /* ==================================================================== */ function ControlQuery2($MAXROWSQUERY,$NBPAGEQUERY,$MAXQUERY,$INITQUERY,$CONTROLQUERY,$_POST,$_GET) {//_____________________________________________________________debut de la fonction ControlQuery $MAXPAGEQUERY=ceil($MAXROWSQUERY/$MAXQUERY); $IDPAGEQUERY=ceil($INITQUERY/$MAXQUERY)+1; $IDZONEQUERY=ceil($IDPAGEQUERY/$NBPAGEQUERY)-1; $CONTROLQUERY[URL] .="?"; while (list ($key, $val) = each ($_GET)) { if(is_array($_GET[$key])) {//********************************ARRAY while (list ($keyArray, $valArray) = each ($key)) { if($i>0){echo'&';} $CONTROLQUERY[URL] .= $key.'['.$keyArray.']='.$valArray.'&'; } }//********************************ARRAY else {//********************************NOT ARRAY if($i>0){echo'&';} $CONTROLQUERY[URL] .= $key.'='.$val.'&'; }//********************************NOT ARRAY } while (list ($key, $val) = each ($_POST)) { if(is_array($_POST[$key])) {//********************************ARRAY while (list ($keyArray, $valArray) = each ($_POST[$key])) { if($i>0){echo'&';} $CONTROLQUERY[URL] .= $key.'['.$keyArray.']='.$valArray.'&'; } }//********************************ARRAY else {//********************************NOT ARRAY if($i>0){echo'&';} $CONTROLQUERY[URL] .= $key.'='.$val.'&'; }//********************************NOT ARRAY } echo ''; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INIT if($INITQUERY>0) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INIT //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++AVANT if($INITQUERY>0) { $NEW_INITQUERY=$INITQUERY-$MAXQUERY; echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++AVANT //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DIRECTPAGE $j=($IDZONEQUERY*$NBPAGEQUERY)+1; for ($i = 1; $i <= $NBPAGEQUERY; $i++) { $NEW_INITQUERY=($j-1)*$MAXQUERY; if($j<=$MAXPAGEQUERY) { if($i>1){echo '-';} if($IDPAGEQUERY<>$j) {echo ''.$j.'';} else{echo $j;} $j++; } } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DIRECTPAGE //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES $NEW_INITQUERY=$INITQUERY+$MAXQUERY; if($NEW_INITQUERY<$MAXROWSQUERY) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES $NEW_INITQUERY=((ceil($MAXROWSQUERY/$MAXQUERY))-1)*$MAXQUERY; if($INITQUERY<$NEW_INITQUERY and $NEW_INITQUERY>0) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES echo''; }//_____________________________________________________________fin de la fonction ControlQuery /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction AddVarUrl(V1.1) */ /* ==================================================================== */ function AddVarUrl($_POST,$_GET) {//_____________________________________________________________debut de la fonction ControlQuery echo "?"; $i=0; while (list ($key, $val) = each ($_GET)) { if(is_array($_GET[$key])) {//********************************ARRAY while (list ($keyArray, $valArray) = each ($key)) { if($i>0){echo'&';} echo $key.'['.$keyArray.']='.$valArray; $i++; } }//********************************ARRAY else {//********************************NOT ARRAY if($i>0){echo'&';} echo $key.'='.$val; $i++; }//********************************NOT ARRAY } while (list ($key, $val) = each ($_POST)) { if(is_array($_POST[$key])) {//********************************ARRAY while (list ($keyArray, $valArray) = each ($_POST[$key])) { if($i>0){echo'&';} echo $key.'['.$keyArray.']='.$valArray; $i++; } }//********************************ARRAY else {//********************************NOT ARRAY if($i>0){echo'&';} echo $key.'='.$val; $i++; }//********************************NOT ARRAY } }//_____________________________________________________________fin de la fonction ControlQuery /* fonction ControlQuery3(V1.1) */ /* ==================================================================== */ function ControlQuery3($MAXROWSQUERY,$NBPAGEQUERY,$MAXQUERY,$INITQUERY,$CONTROLQUERY,$_POST,$_GET) {//_____________________________________________________________debut de la fonction ControlQuery $MAXPAGEQUERY=ceil($MAXROWSQUERY/$MAXQUERY); $IDPAGEQUERY=ceil($INITQUERY/$MAXQUERY)+1; $IDZONEQUERY=ceil($IDPAGEQUERY/$NBPAGEQUERY)-1; $CONTROLQUERY[URL1] .="?"; $CONTROLQUERY[URL2] .="?"; while (list ($key, $val) = each ($_GET)) { if(is_array($_GET[$key])) {//********************************ARRAY while (list ($keyArray, $valArray) = each ($key)) { if($i>0){echo'&';} $CONTROLQUERY[URL1] .= $key.'['.$keyArray.']='.$valArray.'&'; $CONTROLQUERY[URL2] .= $key.'['.$keyArray.']='.$valArray.'&'; } }//********************************ARRAY else {//********************************NOT ARRAY if($i>0){echo'&';} $CONTROLQUERY[URL1] .= $key.'='.$val.'&'; $CONTROLQUERY[URL2] .= $key.'='.$val.'&'; }//********************************NOT ARRAY } while (list ($key, $val) = each ($_POST)) { if(is_array($_POST[$key])) {//********************************ARRAY while (list ($keyArray, $valArray) = each ($_POST[$key])) { if($i>0){echo'&';} $CONTROLQUERY[URL1] .= $key.'['.$keyArray.']='.$valArray.'&'; $CONTROLQUERY[URL2] .= $key.'['.$keyArray.']='.$valArray.'&'; } }//********************************ARRAY else {//********************************NOT ARRAY if($i>0){echo'&';} $CONTROLQUERY[URL1] .= $key.'='.$val.'&'; $CONTROLQUERY[URL2] .= $key.'='.$val.'&'; }//********************************NOT ARRAY } $On_CLICK='onClick="top.'.$CONTROLQUERY[target2].'.location=';$On_CLICK .="'".$CONTROLQUERY[URL2]; echo ''; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INIT if($INITQUERY>0) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INIT //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++AVANT if($INITQUERY>0) { $NEW_INITQUERY=$INITQUERY-$MAXQUERY; echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++AVANT //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DIRECTPAGE $j=($IDZONEQUERY*$NBPAGEQUERY)+1; for ($i = 1; $i <= $NBPAGEQUERY; $i++) { $NEW_INITQUERY=($j-1)*$MAXQUERY; if($j<=$MAXPAGEQUERY) { if($i>1){echo '-';} if($IDPAGEQUERY<>$j) {echo ''.$j.'';} else{echo $j;} $j++; } } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DIRECTPAGE //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES $NEW_INITQUERY=$INITQUERY+$MAXQUERY; if($NEW_INITQUERY<$MAXROWSQUERY) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES $NEW_INITQUERY=((ceil($MAXROWSQUERY/$MAXQUERY))-1)*$MAXQUERY; if($INITQUERY<$NEW_INITQUERY and $NEW_INITQUERY>0) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES echo''; }//_____________________________________________________________fin de la fonction ControlQuery /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction ControlQuery4(V1.1) */ /* ==================================================================== */ function ControlQuery4($MAXROWSQUERY,$NBPAGEQUERY,$MAXQUERY,$INITQUERY,$CONTROLQUERY,$ListVarUrl) {//_____________________________________________________________debut de la fonction ControlQuery $MAXPAGEQUERY=ceil($MAXROWSQUERY/$MAXQUERY); $IDPAGEQUERY=ceil($INITQUERY/$MAXQUERY)+1; $IDZONEQUERY=ceil($IDPAGEQUERY/$NBPAGEQUERY)-1; $CONTROLQUERY[URL1] .="?"; $CONTROLQUERY[URL2] .="?"; while (list ($key, $val) = each ($ListVarUrl)) { if(is_array($ListVarUrl[$key])) {//********************************ARRAY while (list ($keyArray, $valArray) = each ($ListVarUrl[$key])) { if($i>0 and $key<>'INITQUERY' and $valArray<>''){echo'&';} if($key<>'INITQUERY' and $valArray<>''){$CONTROLQUERY[URL1] .= $key.'['.$keyArray.']='.$valArray.'&';} if($key<>'INITQUERY' and $valArray<>''){$CONTROLQUERY[URL2] .= $key.'['.$keyArray.']='.$valArray.'&';} } }//********************************ARRAY else {//********************************NOT ARRAY if($i>0 and $key<>'INITQUERY' and $val<>''){echo'&';} if($key<>'INITQUERY' and $val<>''){$CONTROLQUERY[URL1] .= $key.'='.$val.'&';} if($key<>'INITQUERY' and $val<>''){$CONTROLQUERY[URL2] .= $key.'='.$val.'&';} }//********************************NOT ARRAY } $On_CLICK='onClick="top.'.$CONTROLQUERY[target2].'.location=';$On_CLICK .="'".$CONTROLQUERY[URL2]; echo ''; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INIT if($INITQUERY>0) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INIT //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++AVANT if($INITQUERY>0) { $NEW_INITQUERY=$INITQUERY-$MAXQUERY; echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++AVANT //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DIRECTPAGE $j=($IDZONEQUERY*$NBPAGEQUERY)+1; for ($i = 1; $i <= $NBPAGEQUERY; $i++) { $NEW_INITQUERY=($j-1)*$MAXQUERY; if($j<=$MAXPAGEQUERY) { if($i>1){echo '-';} if($IDPAGEQUERY<>$j) {echo ''.$j.'';} else{echo $j;} $j++; } } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DIRECTPAGE //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES $NEW_INITQUERY=$INITQUERY+$MAXQUERY; if($NEW_INITQUERY<$MAXROWSQUERY) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES $NEW_INITQUERY=((ceil($MAXROWSQUERY/$MAXQUERY))-1)*$MAXQUERY; if($INITQUERY<$NEW_INITQUERY and $NEW_INITQUERY>0) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES echo''; }//_____________________________________________________________fin de la fonction ControlQuery /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction ControlQuery5(V1.0) */ /* ==================================================================== */ function ControlQuery5($MAXROWSQUERY,$NBPAGEQUERY,$MAXQUERY,$INITQUERY,$CONTROLQUERY,$_POST,$_GET) {//_____________________________________________________________debut de la fonction ControlQuery $MAXPAGEQUERY=ceil($MAXROWSQUERY/$MAXQUERY); $IDPAGEQUERY=ceil($INITQUERY/$MAXQUERY)+1; $IDZONEQUERY=ceil($IDPAGEQUERY/$NBPAGEQUERY)-1; $CONTROLQUERY[URL] .="?"; while (list ($key, $val) = each ($_GET)) { if(is_array($_GET[$key])) {//********************************ARRAY while (list ($keyArray, $valArray) = each ($key)) { if($i>0){echo'&';} $CONTROLQUERY[URL] .= $key.'['.$keyArray.']='.$valArray.'&'; } }//********************************ARRAY else {//********************************NOT ARRAY if($i>0){echo'&';} $CONTROLQUERY[URL] .= $key.'='.$val.'&'; }//********************************NOT ARRAY } while (list ($key, $val) = each ($_POST)) { if(is_array($_POST[$key])) {//********************************ARRAY while (list ($keyArray, $valArray) = each ($_POST[$key])) { if($i>0){echo'&';} $CONTROLQUERY[URL] .= $key.'['.$keyArray.']='.$valArray.'&'; } }//********************************ARRAY else {//********************************NOT ARRAY if($i>0){echo'&';} $CONTROLQUERY[URL] .= $key.'='.$val.'&'; }//********************************NOT ARRAY } echo ''; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DIRECTPAGE $j=($IDZONEQUERY*$NBPAGEQUERY)+1; for ($i = 1; $i <= $NBPAGEQUERY; $i++) { $NEW_INITQUERY=($j-1)*$MAXQUERY; if($j<=$MAXPAGEQUERY) { echo ''; } } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++DIRECTPAGE echo'
'; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INIT if($INITQUERY>0) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INIT echo' '; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++AVANT if($INITQUERY>0) { $NEW_INITQUERY=$INITQUERY-$MAXQUERY; echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++AVANT echo''; if($i>1){echo $CONTROLQUERY[SymboleSeparation];} if($IDPAGEQUERY<>$j) { echo ''.$j.'';} else{echo $j;} $j++; echo ''; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES $NEW_INITQUERY=$INITQUERY+$MAXQUERY; if($NEW_INITQUERY<$MAXROWSQUERY) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++APRES echo' '; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END $NEW_INITQUERY=((ceil($MAXROWSQUERY/$MAXQUERY))-1)*$MAXQUERY; if($INITQUERY<$NEW_INITQUERY and $NEW_INITQUERY>0) { echo'';} else { echo''; } //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++END echo'
'; }//_____________________________________________________________fin de la fonction ControlQuery ?>
Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 42
Send_Query("SELECT $champ FROM $table WHERE $champ=PASSWORD('$pwd')",$link) ) die( $Bdd->return_error()); if ($Bdd->num_rows()>0) { $pwd = getPwd(); while(checkPassword($pwd)===false) $pwd = getPwd(); } else return $pwd; } }//_______________________________________________________début function Create_PassMember /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction getPwd(V1.0) */ /* ==================================================================== */ function getPwd() { $r = array(0,8,16,24); $pwd=substr(md5(uniqid(rand())),$r[mt_rand(0,3)],8); $nb = 0; while($i<8 && $nb<1) { if(!is_numeric($pwd[$i])) { $pwd[$i] = strtoupper($pwd[$i]); $nb++; } $i++; } return $pwd; } /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction checkPassword(V1.0) */ /* ==================================================================== */ function checkPassword($sPassword) {//____________________________________________________________________________________________DEBUT DE LA FONCTION checkPassword $sPassword=trim($sPassword); if(! ereg("^[[:alnum:]]{6,20}\$", $sPassword)) return false; // uniquement de 6 à 20 caractères alphanumériques elseif(! ereg("[a-z]", $sPassword)) return false; // au moins une minuscule elseif(! ereg("[A-Z]", $sPassword)) return false; // au moins une majuscule elseif(! ereg("[0-9]", $sPassword)) return false; // au moins un chiffre for($i=1; $iSend_Query("SELECT $champ FROM $table WHERE $champ='$login'",$link) ) die( $Bdd->return_error()); if ($Bdd->num_rows() == 0){return $login;} else { $i++; if($i<3){$login=$Listlogin[$i];} else{$login=$initialprenom.$nom.rand(1,100);} } } }//_______________________________________________________début function Create_login /* function Create_login($Bdd,$table,$champ,$nom,$prenom) {//_______________________________________________________début function Create_login // Nettoyage du prenom et nom $prenom = strtolower($prenom); $prenom = strtr($prenom, "àáâãäåçèéêëìíîïòóôõöùúûüÿ","aaaaaaceeeeiiiioooooouuuuyy"); $prenom = str_replace(array(" ", "-", "'", '"') , "", $prenom); $nom = strtolower($nom); $nom = strtr($nom, "àáâãäåçèéêëìíîïòóôõöùúûüÿ","aaaaaaceeeeiiiioooooouuuuyy"); $nom = str_replace(array(" ", "-", "'", '"') , "", $nom); // Nettoyage du prenom et nom $initialnom=$nom{0}; $doubleinitialnom=$nom{0}.$nom{1}; $initialprenom=$prenom{0}; $doubleinitialprenom=$prenom{0}.$prenom{1}; $Listlogin[0]=$initialprenom.$nom; $Listlogin[1]=$doubleinitialprenom.$nom; $Listlogin[2]=$initialnom.$prenom; $Listlogin[3]=$doubleinitialnom.$prenom; $login=$Listlogin[0]; $i=0; while(1) { $Query = "SELECT $champ FROM $table WHERE $champ='$login'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Bdd->num_rows() == 0){return $login;} else { $i++; if($i<3){$login=$Listlogin[$i];} else{$login=$initialprenom.$nom.rand(1,100);} } } }//_______________________________________________________début function Create_login */ /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_Check_Passwrd(V1.0) */ /* ==================================================================== */ function log_Check_PasswrdMember($Bdd) {//_______________________________________________________début function log_Check_Passwrd //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) $Query = "SELECT mbr_ID FROM MBRmember WHERE mbr_login='$_POST[login]' AND mbr_passwd=PASSWORD('$_POST[passwd]') AND mbr_login<>'' AND mbr_passwd<>'' AND mbr_check='y' LIMIT 0,1"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if ($MYSQLRESULT=='1') { $array = $Bdd->get_array($Result, 'BOTH'); $MYSQLRESULT=$array[mbr_ID]; } return $MYSQLRESULT; }//_______________________________________________________fin function log_Check_Passwrd /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ function log_Check_ValiditySession($Bdd,$cook_Member_Ses) {//_______________________________________________________début function log_Check_ValiditySession $Query = "SELECT ses_ID FROM MBRmember_sessions WHERE ses_ref='$cook_Member_Ses'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if($MYSQLRESULT=='0') setcookie("cook_Member_Ses","",0, "/","",0); return $MYSQLRESULT; }//_______________________________________________________fin function log_Check_ValiditySession /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_Check_TimeValidity(V1.0) */ /* ==================================================================== */ function log_Check_TimeValidity($Bdd,$cook_Member_Ses) {//_______________________________________________________début function TimeValidity //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) $ses_date = date("Y-m-d H:i:00",strtotime("-1 day")); $Query = "SELECT ses_ID FROM MBRmember_sessions WHERE ses_ref='$cook_Member_Ses' AND ses_date<'$ses_date'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); $MYSQLRESULT=$Bdd->num_rows(); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $MYSQLRESULT == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if($MYSQLRESULT=='1') { setcookie("cook_Member_Ses","",0, "/","",0); // Envoi de la requete : if( !$Result = $Bdd->Send_Query("DELETE FROM MBRmember_sessions WHERE ses_ref='$cook_Member_Ses' AND ses_date<'$ses_date'",$link) ) die( $Bdd->return_error()); } return $MYSQLRESULT; }//_______________________________________________________fin function TimeValidity /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ function ISM_Check_ValiditySession($Bdd,$ISM) { $Query = "SELECT ses_ID FROM MBRmember_sessions WHERE ses_ref='$ISM'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if($MYSQLRESULT=='0') setcookie("cook_Member_Ses","",0, "/","",0); return $MYSQLRESULT; }//_______________________________________________________fin function log_Check_ValiditySession /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_Check_TimeValidity(V1.0) */ /* ==================================================================== */ function ISM_Check_TimeValidity($Bdd,$ISM) {//_______________________________________________________début function TimeValidity /* $ses_date=date("Y-"); $ses_date .=date("m-"); $ses_date .=date("d")-1; $ses_date .=date(" H:i:00"); */ $ses_date = date("Y-m-d H:i:00",strtotime("-1 day")); $Query = "SELECT ses_ID FROM MBRmember_sessions WHERE ses_ref='$ISM' AND ses_date<'$ses_date'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if($MYSQLRESULT=='1') { setcookie("cook_Member_Ses","",0, "/","",0); // Envoi de la requete : if( !$Result = $Bdd->Send_Query("DELETE FROM MBRmember_sessions WHERE ses_ref='$cook_Member_Ses' AND ses_date<'$ses_date'",$link) ) die( $Bdd->return_error()); } return $MYSQLRESULT; }//_______________________________________________________fin function TimeValidity /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_UnlockSession(V1.0) */ /* ==================================================================== */ function log_UnlockSession($Bdd,$cook_Member_Ses,$pathlog,$URL_LOG_HREF,$USC) {//_______________________________________________________début function log_UnlockSession $ip_user= (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']; $Query = "DELETE FROM MBRmember_sessions WHERE ses_ref='$cook_Member_Ses' AND ses_addressIP='$ip_user'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); $MYSQLRESULT=$Bdd->num_rows(); if($MYSQLRESULT>0) { setcookie("cook_Member_Ses","",0, "/","",0); writelog($pathlog,'UNLOCK cook_Member_Ses='.$cook_Member_Ses.' ADDRESS IP='.$ip_user); header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=UNLOCKOK&USC='.$USC); } else { writelog($pathlog,'ERROR on UNLOCK cook_Member_Ses='.$cook_Member_Ses.' ADDRESS IP='.$ip_user); header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=INVALIDUNLOCKORDER&USC='.$USC); } exit(); }//_______________________________________________________fin function log_UnlockSession /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_Check_OldMemberSession(V1.0) */ /* ==================================================================== */ function log_Check_OldMemberSession($Bdd,$member_ID) {//_______________________________________________________début function log_Check_OldMemberSession //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) //$ses_date=date("Y-m-"); //$ses_date .=date("d")-1; //$ses_date .=date(" H:i:00"); $ses_date = date("Y-m-d H:i:00",strtotime("-1 day")); $Query = "DELETE FROM MBRmember_sessions WHERE ses_ref_member=$member_ID AND ses_date<'$ses_date'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); $MYSQLRESULT=$Bdd->num_rows(); if($MYSQLRESULT>0){$Bdd->Send_Query("OPTIMIZE TABLE MBRmember_sessions",$link);} return $MYSQLRESULT; }//_______________________________________________________fin function log_Check_OldMemberSession /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction Create_sessionID(V1.0) */ /* ==================================================================== */ function Create_sessionID($Bdd,$table,$champ) {//_______________________________________________________début function Create_sessionID $sessionID=md5(uniqid(rand())); while(1) { $Query = "SELECT $champ FROM $table WHERE $champ='$sessionID'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if (!$Result || ($Bdd->num_rows() == 0)){return $sessionID;} else{$sessionID=md5(uniqid(rand()));} } }//_______________________________________________________fin function Create_sessionID /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_Create_MemberCookie(V1.0) */ /* ==================================================================== */ function log_Create_MemberCookie($Bdd,$member_ID,$db,$ip_user) {//_______________________________________________________début function log_Create_MemberCookie $sessionID=Create_sessionID($Bdd,'MBRmember_sessions','ses_ref'); $date_session=date("Y-m-d H:i:00"); $Query = "INSERT MBRmember_sessions SET ses_ref='$sessionID',ses_ref_member='$member_ID',ses_ref_client='$db',ses_addressIP='$ip_user',ses_date='$date_session'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); $MYSQLRESULT=$Bdd->num_rows(); if ($MYSQLRESULT=='1') setcookie("cook_Member_Ses",$sessionID,0, "/","",0); return $MYSQLRESULT; }//_______________________________________________________fin function log_Create_MemberCookie /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_Create_MemberCookie2_6(V1.0) */ /* ==================================================================== */ function log_Create_MemberCookie2_6($Bdd,$db,$member_ID,$ip_user) {//_______________________________________________________début function log_Create_MemberCookie $sessionID=Create_sessionID($Bdd,'MBRmember_sessions','ses_ref'); $date_session=date("Y-m-d H:i:00"); $Query = "INSERT MBRmember_sessions set ses_ref='$sessionID',ses_ref_member='$member_ID',ses_ref_client='$db',ses_addressIP='$ip_user',ses_date='$date_session'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); $MYSQLRESULT=$Bdd->num_rows(); if ($MYSQLRESULT=='1') { setcookie("cook_Member_Ses",$sessionID,0, "/","",0); return $sessionID; } else return $MYSQLRESULT; }//_______________________________________________________fin function log_Create_MemberCookie /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction writelog(V1.0) */ /* ==================================================================== */ function writelog($dir,$message) {//_______________________________________________________début function writelog $date=date("F j, Y, g:i a"); if (file_exists("$dir")) { $myfile = fopen("$dir","a[b]"); if (!($myfile)){echo'ALERT! RIGHT ERROR FOR '.$dir.'PLEASE CHECK IT!';} fputs($myfile, "$date--$message\n"); fclose($myfile); } else{ $myfile = fopen("$dir","a+[b]"); fputs($myfile, "$date--CREATE FILE:$dir\n"); fputs($myfile, "$date--$message\n"); fclose($myfile); } }//_______________________________________________________fin function writelog /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_Member_session(V1.0) */ /* ==================================================================== */ function log_Member_session($Bdd,$dir,$cook_Member_Ses, $pathlog,$redirect,$UrlSiteClient,$key='',$mail='',$internal=false) {//_______________________________________________________début function log_Member_session require("{$dir[CLIENTGCM]}includes/MY_DATA.PHP");//____________________________MY_DATA $ip_user = (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']; if($cook_Member_Ses=='') {//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+PAS DE COOKIE if($redirect<>'') {header('Location:'.$redirect);exit();} $check_sessionmail = log_Check_SessionMail($Bdd,$key,$mail); if($check_sessionmail=='-1') {if($internal) return 'DBNoConnect'; else {header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=DBNoConnect&USC='.$UrlSiteClient);exit();}} else if($check_sessionmail=='0') { $check_passwd=log_Check_PasswrdMember($Bdd); $checkfct .= "cookVIDE+".$check_passwd; if($check_passwd=='-1') {if($internal) return 'DBNoConnect'; else {header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=DBNoConnect&USC='.$UrlSiteClient);exit();}} elseif($check_passwd=='0') { writelog($pathlog,'ALERT: BAD LOGIN & PASSWORD ADDRESS IP='.$ip_user); if($internal) return 'BADLOGIN'; else { header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=BADLOGIN&USC='.$UrlSiteClient); exit(); } } } else if($check_sessionmail>'0') $check_passwd=$check_sessionmail; $check_oldsession=log_Check_OldMemberSession($Bdd,$check_passwd); $checkfct .= "+".$check_oldsession; if($check_oldsession=='-1') {if($internal) return 'DBNoConnect'; else {header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=DBNoConnect&USC='.$UrlSiteClient);exit();}} $check_cookiesession=log_Create_MemberCookie2_6($Bdd,$db,$check_passwd,$ip_user); $checkfct .= "+".$check_cookiesession; if($check_cookiesession=='-1') {if($internal) return 'DBNoConnect'; else {header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=DBNoConnect&USC='.$UrlSiteClient);exit();}} else if($check_cookiesession=='0') {if($internal) return 'NOINSERTCOOKIEDB'; else {header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=NOINSERTCOOKIEDB&USC='.$UrlSiteClient);exit();}} else if($check_cookiesession<>'-1' and $check_cookiesession<>'0' and $check_oldsession=='0') { if ($UrlSiteClient=='') { writelog($pathlog,'ADD cook_Member_Ses mbr_ID='.$check_passwd.' ADDRESS IP='.$ip_user); if($internal) return array('result'=>'home','ISM'=>$check_cookiesession); else { header('Location:'.$URL_LOG_HREF.'/index.php?mode=home'); exit(); } } else { writelog($pathlog,'ADD cook_Member_Ses mbr_ID='.$check_passwd.' ADDRESS IP='.$ip_user); $UrlSiteClient=str_replace("|", "&", $UrlSiteClient); if($internal) return array('result'=>'site','ISM'=>$check_cookiesession); else { header('Location:'.$UrlSiteClient.'?ISM='.$check_cookiesession); exit(); } } } elseif($check_cookiesession<>'-1' and $check_cookiesession<>'0' and $check_oldsession>0) { writelog($pathlog,'OLD cook_Member_Ses deleted for mbr_ID='.$check_passwd.' ADDRESS IP='.$ip_user); writelog($pathlog,'ADD cook_Member_Ses mbr_ID='.$check_passwd.' ADDRESS IP='.$ip_user); if($internal) return 'DELETEDOLDSESSION'; else { header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=DELETEDOLDSESSION&USC='.$UrlSiteClient); exit(); } } }//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+PAS DE COOKIE else {//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+CHECK COOKIE $checkfct .= "cook!VIDE"; $check_validity=log_Check_ValiditySession($Bdd,$cook_Member_Ses); if($check_validity=='-1') {header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=DBNoConnect&USC='.$UrlSiteClient);exit();} elseif($check_validity=='0') { writelog($pathlog,'ALERT: ILLEGAL SESSION ADDRESS IP='.$ip_user); if($internal) return 'ILLEGALSESSION'; else { header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=ILLEGALSESSION&USC='.$UrlSiteClient); exit(); } } $check_timevalidity=log_Check_TimeValidity($Bdd,$cook_Member_Ses); if($check_timevalidity=='-1') {header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=DBNoConnect&USC='.$UrlSiteClient);exit();} elseif($check_timevalidity=='1') { writelog($pathlog,'BAD TIME SESSION ADDRESS IP='.$ip_user); if($internal) return 'BADTIMESESSION'; else { header('Location:'.$URL_LOG_HREF.'/index.php?BadReport=BADTIMESESSION&USC='.$UrlSiteClient); exit(); } } }//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+CHECK COOKIE }//_______________________________________________________fin function log_Member_session /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_LoadMemberInfo(V1.0) */ /* ==================================================================== */ function log_LoadMemberInfo($Bdd,$cook_Member_Ses) {//_______________________________________________________début function log_LoadMemberInfo $Query = "SELECT * FROM MBRmember_sessions,MBRmember WHERE ses_ref='$cook_Member_Ses' AND ses_ref_member=mbr_ID"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if ($MYSQLRESULT=='1') return $Bdd->get_array($Result, 'BOTH'); }//_______________________________________________________fin function log_LoadMemberInfo function log_CreateFtpMemberSession($Bdd,$sessionID) {//_______________________________________________________debut function log_CreateFtpMemberSession $ip_user = (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']; $Query = "select * from MBRmember_sessions where ses_ref='$sessionID' and ses_addressIP='$ip_user'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if ($MYSQLRESULT=='1') { setcookie("cook_Member_Ses",$sessionID,0, "/","",0); return $MYSQLRESULT; } else return $MYSQLRESULT; }//_______________________________________________________fin function log_CreateFtpMemberSession /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction functionforgetpassmember(V1.1) */ /* ==================================================================== */ function forgetpassmember($dir,$Bdd,$nbLETTRE,$_POST,$TR,$pathlog) {//_______________________________________________________début function forgetpassmember require("{$dir[CLIENTGCM]}includes/MY_DATA.PHP");//____________________________MY_DATA if(!class_exists('PHPMailer')) require("{$dir[VERSIONGCM]}classes/mailer.php");//____________________________Classe Mailer $ip_user = (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']; $Query = "select mbr_ID,mbr_login from MBRmember where mbr_nom='$_POST[mbr_nom]' and mbr_prenom='$_POST[mbr_prenom]' and mbr_email='$_POST[mbr_email]' and mbr_check='y'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if ($MYSQLRESULT=='-1'){ header("Location:".$URL_LOG_HREF."/index.php?BadReport=DBNoConnect");exit(); } if ($MYSQLRESULT=='0'){ header("Location:".$URL_LOG_HREF."/index.php?BadReport=BADFORGETPASS");exit(); } if ($MYSQLRESULT=='1') { while($array = $Bdd->get_array($Result, 'BOTH')) { $mbr_ID=$array[mbr_ID]; $mbr_login=$array[mbr_login]; } $newpass=Create_PassMember($Bdd,'MBRmember','mbr_passwd',$nbLETTRE); // Envoi de la requete : if( !$Result = $Bdd->Send_Query("UPDATE MBRmember SET mbr_passwd=PASSWORD('$newpass') WHERE mbr_ID='$mbr_ID' AND mbr_check='y'",$link) ) die( $Bdd->return_error()); if ($Bdd->num_rows()=='1') {//++++++++++++++++++++++++++++++++++++++++++++++++++++++PASS MODIFIED $subject=$TR[TitleForgetPass]; $message=$TR[MessageForgetPass].'

'.$TR[FormLogin].' : '.$mbr_login.'

'.$TR[FormPassword].' : '.$newpass.'

'; $message_alt=$TR[MessageForgetPass]; $message_alt .=" ___________________________________________________________________ ".$TR[FormLogin]." : ".$mbr_login." ".$TR[FormPassword]." : ".$newpass." ___________________________________________________________________ "; $mail = new PHPMailer(); $mail->From = $ADMIN_emailfrom; $mail->FromName = $WEBSITE; $mail->AddReplyTo($ADMIN_emailfrom); $mail->AddAddress(stripslashes($_POST[mbr_email]),stripslashes($_POST[mbr_prenom].' '.$_POST[mbr_nom])); $mail->IsHTML(true); $mail->Subject = $subject; $mail->Body = $message; $mail->AltBody = $message_alt; if(!$mail->Send()) { $MailNotSend = "Mailer Error: " . $mail->ErrorInfo."
"; exit; } writelog($pathlog,'MESSAGE: USER FORGET PASSWORD PASSWORD CHANGED IP='.$ip_user); header("Location:".$URL_LOG_HREF."/index.php?BadReport=NEWPASSCREATED"); exit(); }//++++++++++++++++++++++++++++++++++++++++++++++++++++++PASS MODIFIED else { header("Location:".$URL_LOG_HREF."/index.php?BadReport=DBNoConnect");exit(); }//++++++++++++++++++++++++++++++++++++++++++++++++++++++PASS NOT MODIFIED } }//_______________________________________________________début function forgetpassmember /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction CheckMemberSessionSite2_6(V1.0) */ /* ==================================================================== */ function CheckMemberSessionSite2_6($dir,$Bdd,$cook_Member_Ses,$ISM, $pathlog) {//_______________________________________________________début function log_Member_session require("{$dir[RACINE]}includes/MY_DATA.PHP");//____________________________MY_DATA $ip_user = (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']; $BadReturn="-1"; if($ISM<>'') {//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+PAS DE COOKIE $check_validity=ISM_Check_ValiditySession($Bdd,$ISM); if($check_validity=='-1') return $BadReturn.'v'; elseif($check_validity=='0') return $BadReturn.'v0'; $check_timevalidity=ISM_Check_TimeValidity($Bdd,$ISM); if($check_timevalidity=='-1') return $BadReturn.'t'; elseif($check_timevalidity=='1') return $BadReturn.'t0'; if($check_validity=='1' and $check_timevalidity=='0') { setcookie("cook_Member_Ses",$ISM,0, "/","",0); return $ISM; } }//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+PAS DE COOKIE elseif($cook_Member_Ses<>'') {//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+CHECK COOKIE $check_validity=log_Check_ValiditySession($Bdd,$cook_Member_Ses); if($check_validity=='-1') return $BadReturn; elseif($check_validity=='0') return $BadReturn; $check_timevalidity=log_Check_TimeValidity($Bdd,$cook_Member_Ses); if($check_timevalidity=='-1') return $BadReturn; elseif($check_timevalidity=='1') return $BadReturn; if($check_validity=='1' and $check_timevalidity=='0') return $cook_Member_Ses; }//=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+CHECK COOKIE }//_______________________________________________________fin function log_Member_session /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_UnlockSession(V1.0) */ /* ==================================================================== */ function log_UnlockMembersSessionSite($Bdd,$cook_Member_Ses) {//_______________________________________________________début function log_UnlockSession $ip_user = (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR']; $Query = "DELETE FROM MBRmember_sessions WHERE ses_ref='$cook_Member_Ses' AND ses_addressIP='$ip_user'"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); // Envoi de la requete : if( !$Result = $Bdd->Send_Query("OPTIMIZE TABLE sessions",$link) ) die( $Bdd->return_error()); $MYSQLRESULT=$Bdd->num_rows(); if($MYSQLRESULT>0) setcookie("cook_Admin_Ses","",0, "/","",0); else return $cook_Member_Ses; }//_______________________________________________________fin function log_UnlockSession /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* fonction log_Check_SessionMail(V1.1) */ /* ==================================================================== */ function log_Check_SessionMail($Bdd,$key,$mail) {//_______________________________________________________début function log_Check_Passwrd $Query = "SELECT mbr_ID FROM MBRmember WHERE mbr_sessionID LIKE '$key' AND mbr_email LIKE '$mail' AND mbr_check='y' AND mbr_email<>'' AND mbr_sessionID<>'' LIMIT 0,1"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 $array = $Bdd->get_array($Result, 'BOTH'); { $MYSQLRESULT=$array[mbr_ID]; } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) RESULT 1 return $MYSQLRESULT; }//_______________________________________________________fin function log_Check_SessionMail /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ ?>
Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 48
pas adresse email return 2 ---------> Mail OK return 3 ---------> Mauvaise adresse e-mail return 4 ---------> Adresse E-mail existe déjà return 5 ---------> Pas de connection mysql */ function mailing($mailfor,$mysql_host,$db,$mysql_member,$mysql_memberpassw,$MYSQL_Table,$unsubscribe_ID,$langue,$user) {//______________________________________________________________début de la fontion mailing global $HTTP_HOST; if ($mailfor==''){$Return=1;return $Return;} //************************************************************************* if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $mailfor)) {$Return=3;return $Return;} //************************************************************************* // E-Mail @ by 2 by standard divide. if it is $mailfor this "lsm@ebeecomm.com".. // $Username : lsm // $Domain : ebeecomm.com // list function reference : http://www.php.net/manual/en/function.list.php // split function reference : http://www.php.net/manual/en/function.split.php list ( $Username, $Domain ) = split ("@",$mailfor); // That MX(mail exchanger) record exists in domain check . // checkdnsrr function reference : http://www.php.net/manual/en/function.checkdnsrr.php if ( checkdnsrr ( $Domain, "MX" ) ) { //************************************************************************* // If MX record exists, save MX record address. // getmxrr function reference : http://www.php.net/manual/en/function.getmxrr.php if ( getmxrr ($Domain, $MXHost)) { //************************************************************************* for ( $i = 0,$j = 1; $i < count ( $MXHost ); $i++,$j++ ){}} // Getmxrr function does to store MX record address about $Domain in arrangement form to $MXHost. // $ConnectAddress socket connection address. $ConnectAddress = $MXHost[0];} else { //************************************************************************* // If there is no MX record simply @ to next time address socket connection do . $ConnectAddress = $Domain; $Return=3;return $Return; } // fsockopen function reference : http://www.php.net/manual/en/function.fsockopen.php $Connect = fsockopen ( $ConnectAddress, 25 ); // Success in socket connection if ($Connect) { // Judgment is that service is preparing though begin by 220 getting string after connection . // fgets function reference : http://www.php.net/manual/en/function.fgets.php if ( ereg ( "^220", $Out = fgets ( $Connect, 1024 ) ) ) { //************************************************************************* // Inform client's reaching to server who connect. fputs ( $Connect, "HELO $HTTP_HOST\r\n" ); //************************************************************************* $Out = fgets ( $Connect, 1024 ); // Receive server's answering cord. // Inform sender's address to server. fputs ( $Connect, "MAIL FROM: <{$mailfor}>\r\n" ); //************************************************************************* $From = fgets ( $Connect, 1024 ); // Receive server's answering cord. // Inform listener's address to server. fputs ( $Connect, "RCPT TO: <{$mailfor}>\r\n" ); //************************************************************************* $To = fgets ( $Connect, 1024 ); // Receive server's answering cord. // Finish connection. fputs ( $Connect, "QUIT\r\n"); //************************************************************************* fclose($Connect); // Server's answering cord about MAIL and TO command checks. // Server about listener's address reacts to 550 codes if there does not exist // checking that mailbox is in own E-Mail account. if ( !ereg ( "^250", $From ) || !ereg ( "^250", $To )) {$Return=3;return $Return;} } } // Failure in socket connection else { $Return=3;return $Return;} //************************************************************************* /* CONNECTION TO MYSQL (V1.0) check idactualite */ /* ==================================================================== */ //___________________________________________________________________________CONNECT TO MYSQL $conn = mysql_connect("$mysql_host","$mysql_member","$mysql_memberpassw"); mysql_select_db("$db"); $result = mysql_query("select * from $MYSQL_Table[mailing] where mai_email='$mailfor'"); if ($result) {//__________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0){} else{//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+RESULT=1 $array = mysql_fetch_array($result); while ($array) {//===============BOUCLE WHILE if($array[mai_check]=='n') {//***************************mai_check=n $date=date("Y-m-d H:i:00"); $result = mysql_query("update $MYSQL_Table[mailing] set mai_check='y',mai_unsubscribe='$unsubscribe_ID',mai_langue='$langue',mai_datemodif='$date' where mai_id='$array[mai_id]'"); $insert=mysql_affected_rows(); if ($insert=='-1'){$Return=5;return $Return;}else{$Return=2;return $Return;} }//***************************mai_check=n //***************************mai_check=y else{$Return=4;return $Return;} //***************************mai_check=y }//===============BOUCLE WHILE }//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+RESULT=1 //__________________________________________________MYSQL RESULT }else{$Return=5;return $Return;}//__________________NOT CONNECTION MYSQL //___________________________________________________________________________USE MYSQL RESULT $array = mysql_fetch_array($result); while ($array) {//===============BOUCLE WHILE if($array[mai_check]=='n') {//***************************mai_check=n $date=date("Y-m-d H:i:00"); $result = mysql_query("update $MYSQL_Table[mailing] set mai_check='y',mai_unsubscribe='$unsubscribe_ID',mai_langue='$langue',mai_datemodif='$date' where mai_id='$array[mai_id]'"); $insert=mysql_affected_rows(); if ($insert=='-1'){$Return=5;return $Return;}else{$Return=2;return $Return;} }//***************************mai_check=n //***************************mai_check=y else{$Return=4;return $Return;} //***************************mai_check=y }//===============BOUCLE WHILE $date=date("Y-m-d H:i:00"); $result =mysql_query("INSERT INTO $MYSQL_Table[mailing] VALUES ('', '$mailfor','', '', '','','','','','','','', '$langue', '1', 'a0', '', '$date','$date','$date', 'y', '$unsubscribe_ID','$user','','')"); $insert=mysql_affected_rows(); if ($insert=='-1'){$Return=5;return $Return;}else{$Return=2;return $Return;} }//______________________________________________________________fin de la fontion mailing /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* quickmailing(V2.0) */ /* =================================================================== */ function quickmailing($mailfor,$mysql_host,$db,$mysql_member,$mysql_memberpassw,$MYSQL_Table,$unsubscribe_ID,$langue,$user) {//______________________________________________________________début de la fontion quickmailing global $HTTP_HOST; if ($mailfor==''){$Return=1;return $Return;} //************************************************************************* if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $mailfor)) {$Return=3;return $Return;} //************************************************************************* /* CONNECTION TO MYSQL (V1.0) check idactualite */ /* ==================================================================== */ //___________________________________________________________________________CONNECT TO MYSQL $conn = mysql_connect("$mysql_host","$mysql_member","$mysql_memberpassw"); mysql_select_db("$db"); $result = mysql_query("select * from $MYSQL_Table[mailing] where mai_email='$mailfor'"); if ($result) {//__________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0){} else{//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+RESULT=1 $array = mysql_fetch_array($result); while ($array) {//===============BOUCLE WHILE if($array[mai_check]=='n') {//***************************mai_check=n $date=date("Y-m-d H:i:00"); $result = mysql_query("update $MYSQL_Table[mailing] set mai_check='y',mai_unsubscribe='$unsubscribe_ID',mai_datemodif='$date' where mai_id='$array[mai_id]'"); $insert=mysql_affected_rows(); if ($insert=='-1'){$Return=5;return $Return;}else{$Return=2;return $Return;} }//***************************mai_check=n //***************************mai_check=y else{$Return=4;return $Return;} //***************************mai_check=y }//===============BOUCLE WHILE }//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+RESULT=1 //__________________________________________________MYSQL RESULT }else{$Return=5;return $Return;}//__________________NOT CONNECTION MYSQL //___________________________________________________________________________USE MYSQL RESULT $array = mysql_fetch_array($result); while ($array) {//===============BOUCLE WHILE if($array[mai_check]=='n') {//***************************mai_check=n $date=date("Y-m-d H:i:00"); $result = mysql_query("update $MYSQL_Table[mailing] set mai_check='y',mai_unsubscribe='$unsubscribe_ID',mai_datemodif='$date' where mai_id='$array[mai_id]'"); $insert=mysql_affected_rows(); if ($insert=='-1'){$Return=5;return $Return;}else{$Return=2;return $Return;} }//***************************mai_check=n //***************************mai_check=y else{$Return=4;return $Return;} //***************************mai_check=y }//===============BOUCLE WHILE $date=date("Y-m-d H:i:00"); $result =mysql_query("INSERT INTO $MYSQL_Table[mailing] VALUES ('', '$mailfor', '', '','','','','','','','','', '$langue', '1', 'a0', '', '$date','$date','$date', 'y', '$unsubscribe_ID','$user','','')"); $insert=mysql_affected_rows(); if ($insert=='-1'){$Return=5;return $Return;}else{$Return=2;return $Return;} }//______________________________________________________________fin de la fontion quickmailing /* ======================================================================= ifsnow's email valid check function SnowCheckMail Ver 0.1 funtion SnowCheckMail ($Email,$Debug=false) $Email : E-Mail address to check. $Debug : Variable for debugging. * Can use everybody if use without changing the name of function. Reference : O'REILLY - Internet Email Programming HOMEPAGE : http://www.hellophp.com ifsnow is korean phper. Is sorry to be unskillful to English. *^^*;; ========================================================================= */ function SnowCheckMail($Email,$Debug=false) {//______________________________________________________________début de la fontion SnowCheckMail global $HTTP_HOST; $Return =array(); // Variable for return. // $Return[0] : [true|false] // $Return[1] : Processing result save. if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email)) { $Return[0]=false; $Return[1]="${Email} is E-Mail form that is not right."; if ($Debug) echo "Error : {$Email} is E-Mail form not correct.
"; return $Return; } else if ($Debug) echo "Confirmation : {$Email} is E-Mail form ok.
"; // E-Mail @ by 2 by standard divide. if it is $Email this "lsm@ebeecomm.com".. // $Username : lsm // $Domain : ebeecomm.com // list function reference : http://www.php.net/manual/en/function.list.php // split function reference : http://www.php.net/manual/en/function.split.php list ( $Username, $Domain ) = split ("@",$Email); // That MX(mail exchanger) record exists in domain check . // checkdnsrr function reference : http://www.php.net/manual/en/function.checkdnsrr.php if ( checkdnsrr ( $Domain, "MX" ) ) { if($Debug) echo "Confirmation : MX record about {$Domain} exists.
"; // If MX record exists, save MX record address. // getmxrr function reference : http://www.php.net/manual/en/function.getmxrr.php if ( getmxrr ($Domain, $MXHost)) { if($Debug) { echo "Confirmation : Is confirming address by MX LOOKUP.
"; for ( $i = 0,$j = 1; $i < count ( $MXHost ); $i++,$j++ ) { echo "        Result($j) - $MXHost[$i]
"; } } } // Getmxrr function does to store MX record address about $Domain in arrangement form to $MXHost. // $ConnectAddress socket connection address. $ConnectAddress = $MXHost[0]; } else { // If there is no MX record simply @ to next time address socket connection do . $ConnectAddress = $Domain; if ($Debug) echo "Error : MX record about {$Domain} does not exist.
"; } // fsockopen function reference : http://www.php.net/manual/en/function.fsockopen.php $Connect = fsockopen ( $ConnectAddress, 25 ); // Success in socket connection if ($Connect) { if ($Debug) echo "Connection succeeded to {$ConnectAddress} SMTP.
"; // Judgment is that service is preparing though begin by 220 getting string after connection . // fgets function reference : http://www.php.net/manual/en/function.fgets.php if ( ereg ( "^220", $Out = fgets ( $Connect, 1024 ) ) ) { // Inform client's reaching to server who connect. fputs ( $Connect, "HELO $HTTP_HOST\r\n" ); if ($Debug) echo "Run : HELO $HTTP_HOST
"; $Out = fgets ( $Connect, 1024 ); // Receive server's answering cord. // Inform sender's address to server. fputs ( $Connect, "MAIL FROM: <{$Email}>\r\n" ); if ($Debug) echo "Run : MAIL FROM: <{$Email}>
"; $From = fgets ( $Connect, 1024 ); // Receive server's answering cord. // Inform listener's address to server. fputs ( $Connect, "RCPT TO: <{$Email}>\r\n" ); if ($Debug) echo "Run : RCPT TO: <{$Email}>
"; $To = fgets ( $Connect, 1024 ); // Receive server's answering cord. // Finish connection. fputs ( $Connect, "QUIT\r\n"); if ($Debug) echo "Run : QUIT
"; fclose($Connect); // Server's answering cord about MAIL and TO command checks. // Server about listener's address reacts to 550 codes if there does not exist // checking that mailbox is in own E-Mail account. if ( !ereg ( "^250", $From ) || !ereg ( "^250", $To )) { $Return[0]=false; $Return[1]="${Email} is not admit by the E-Mail server."; if ($Debug) echo "Error : {$Email} is not admit by the E-Mail server.
"; return $Return; } } } // Failure in socket connection else { $Return[0]=false; $Return[1]="Can not connect E-Mail server ({$ConnectAddress})."; if ($Debug) echo "Can not connect E-Mail server ({$ConnectAddress}).
"; return $Return; } $Return[0]=true; $Return[1]="{$Email} is E-Mail address that there is no any problem."; if ($Debug) echo "Confirmation : {$Email} is admit by the E-Mail server.
"; return $Return; }//______________________________________________________________fin de la fontion SnowCheckMail /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* CheckMail(V1.7) */ /* ==================================================================== */ function CheckMail($Email) {//______________________________________________________________début de la fontion CheckMail if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email)) {$Return='-1';} else {$Return='1';} return $Return; }//______________________________________________________________fin de la fontion CheckMail /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* sendmailthanks(V1.2) */ /* ==================================================================== */ function sendmailthanks($pathlayout,$mysql_host, $mysql_user, $mysql_passw, $db, $MYSQL_Table,$unsubscribe_ID,$mailfor,$ADMIN_emailfor,$ADMIN_emailfrom,$ADMIN_emailinfo,$WEBSITE,$langue) {//______________________________________________________________début de la fontion sendmailthanks /* CONNECTION TO MYSQL (V1.0) */ /* ==================================================================== */ //___________________________________________________________________________CONNECT TO MYSQL $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("select * from $MYSQL_Table[batch],$MYSQL_Table[categorie] where bth_state='thanks' and cat_ref='a0'"); if ($result) {//__________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0) {//_______________________________________________________MYSQL NO RESULT $MYSQL_result='0';} else{ $MYSQL_result='1'; }//__________________________________________________MYSQL RESULT }else{$MYSQL_result='-1';}//__________________NOT CONNECT //___________________________________________________________________________USE MYSQL RESULT if($MYSQL_result=='1') {//+++++++++++++++++++++++++++++++++++++++++++++++++++RESULT=1 $array = mysql_fetch_array($result); while ($array) { $BTH_subject='bth_subject'.$langue; $BTH_titre='bth_titre'.$langue; $BTH_contenthtml='bth_contenthtml'.$langue; $CAT_nom='cat_nom'.$langue; $subject=$array[$BTH_subject]; $titre=$array[$BTH_titre]; $content=$array[$BTH_contenthtml]; $cat_ref=$array[bth_cat]; $categorie=$array[$CAT_nom]; $array = mysql_fetch_array($result); } include("{$pathlayout}_{$langue}.php");//___________________________LAYOUTMAIL $headers = "From: ".$WEBSITE." <".$ADMIN_emailfrom.">\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: text/html"; mail($mailfor, $subject, $message, $headers); $mailinfo=implode(",",$ADMIN_emailinfo); mail($mailinfo,'- New addict to '.$WEBSITE.'-','There is a new addict to the mailing list:'.$mailfor,'From: '.$ADMIN_emailfrom); }//+++++++++++++++++++++++++++++++++++++++++++++++++++RESULT=1 elseif($MYSQL_result=='0') {//+++++++++++++++++++++++++++++++++++++++++++++++++++RESULT=0 mail($ADMIN_emailfor,'- ERROR MAILING ON '.$WEBSITE.'-','CHECK TABLES MAILING ERROR ON SEND THANKS EMAIL FOR:'.$mailfor,'From: '.$ADMIN_emailfrom); }//+++++++++++++++++++++++++++++++++++++++++++++++++++RESULT=0 elseif($MYSQL_result=='1') {//+++++++++++++++++++++++++++++++++++++++++++++++++++RESULT=-1 mail($ADMIN_emailfor,'- ERROR MAILING ON '.$WEBSITE.'-','NO CONNECTION TO DB MYSQL ERROR ON SEND THANKS EMAIL FOR:'.$mailfor,'From: '.$ADMIN_emailfrom); }//+++++++++++++++++++++++++++++++++++++++++++++++++++RESULT=-1 }//______________________________________________________________fin de la fontion sendmailthanks /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* sendmailperso(V1.1) */ /* ==================================================================== */ // $mai_type= 1 -> html / 2 -> txt function sendmailperso($pathlayoutmail,$subject, $titre, $content,$IMGMAIL, $categorie,$mai_type,$unsubscribe_ID,$mailfor,$ADMIN_emailfor,$ADMIN_emailfrom,$ADMIN_emailinfo,$WEBSITE,$langue) {//______________________________________________________________début de la fontion sendmailperso if ($mai_type=='1'){include("{$pathlayoutmail}_html_{$langue}.php");} else {include("{$pathlayoutmail}_txt_{$langue}.php");} $headers = "From: ".$WEBSITE." <".$ADMIN_emailfrom.">\n"; $headers .= "MIME-Version: 1.0\n"; if ($mai_type=='1'){$headers .= "Content-Type: text/html";} else{$headers .= "Content-Type: text/plain";} $result=mail($mailfor, $subject, $message, $headers); return $result; }//______________________________________________________________fin de la fontion sendmailperso /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* addmailingtmp(V1.2) */ /* ==================================================================== */ function addmailingtmp($mysql_host, $mysql_user, $mysql_ADM, $mysql_passw, $db, $MYSQL_Table,$_POST,$RUNPROCESS, $menu_ID, $mode, $cook_log) {//______________________________________________________________debut de la fontion addmailingtmp //************************************************************USER $arr=explode("&",$cook_log); foreach ($arr as $k=>$el) {${"c_$k"} = $el;} //____________________________________Info cookie défragmenté $user=$c_0; //************************************************************USER $mysql_ADMpassw=ADMIN_CONNECT($mysql_host, $mysql_user, $mysql_passw, $db, $cook_log); $conn = mysql_connect("$mysql_host","$mysql_ADM","$mysql_ADMpassw"); mysql_select_db("$db"); $result = mysql_query("select * from $MYSQL_Table[mailingTMP] where mai_bth=$RUNPROCESS"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK if($MYSQLRESULT=='-1'){$return[1]='-1'; return $return;} elseif($MYSQLRESULT=='1'){$return[1]='1';$return[2]=mysql_num_rows($result); return $return;} elseif($MYSQLRESULT=='0') {//____________________ADD MAILING TMP $result = mysql_query("select * from $MYSQL_Table[batch] where bth_ID=$RUNPROCESS"); if ($result) {//__________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0) {//_______________________________________________________MYSQL NO RESULT $return[1]='0'; return $return; } else { $array = mysql_fetch_array($result); while ($array) { $array_GROUP=explode(";", $array[bth_group]); $categorie=$array[bth_cat]; $array = mysql_fetch_array($result); } $MYSQLQUERY="select * from $MYSQL_Table[mailing] where"; $k=0; foreach($array_GROUP as $group) {//************************************************************BOUCLE FOREACH if ($k<>'0'){$MYSQLQUERY .=" or ";} $MYSQLQUERY .="(mai_cat='' or mai_cat like '%".$categorie."%') and mai_group like '%".$group."%' and mai_check='y'"; $k++; }//************************************************************BOUCLE FOREACH $result = mysql_query("$MYSQLQUERY"); if ($result) {//__________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0) {//_______________________________________________________MYSQL NO RESULT $return[1]='0'; return $return;} else{}//__________________________________________________MYSQL RESULT }else{$return[1]='-1'; return $return;}//__________________NOT CONNECT //___________________________________________________________________________USE MYSQL RESULT $array = mysql_fetch_array($result); $MYSQL_result1=mysql_num_rows ($result); while ($array) { mysql_query("insert into $MYSQL_Table[mailingTMP] values ('','$RUNPROCESS', '$array[mai_email]', '$array[mai_langue]', '$array[mai_type]','$array[mai_unsubscribe]','n')"); $MYSQL_result2=$MYSQL_result2+mysql_affected_rows(); $array = mysql_fetch_array($result); } if($MYSQL_result1==$MYSQL_result2){$return[1]='1';$return[2]=$MYSQL_result2;}else{$return[1]='0';} return $return; }//__________________________________________________MYSQL RESULT }else{$return[1]='-1'; return $return;}//__________________NOT CONNECT }//____________________ADD MAILING TMP }//______________________________________________________________fin de la fontion addmailingtmp /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* sendMAILING(V1.2) */ /* ==================================================================== */ function sendMAILING($dirlog,$mysql_host, $mysql_user,$mysql_ADM, $mysql_passw, $db, $MYSQL_Table,$RUNPROCESS,$ADMIN_emailfor,$ADMIN_emailfrom,$ADMIN_emailinfo,$WEBSITE, $cook_log) {//______________________________________________________________début de la fontion sendMAILING /* CONNECTION TO MYSQL (V1.0) */ /* ==================================================================== */ //___________________________________________________________________________CONNECT TO MYSQL $mysql_ADMpassw=ADMIN_CONNECT($mysql_host, $mysql_user, $mysql_passw, $db, $cook_log); $conn = mysql_connect("$mysql_host","$mysql_ADM","$mysql_ADMpassw"); mysql_select_db("$db"); $result = mysql_query("select * from $MYSQL_Table[mailingTMP] where mai_bth=$RUNPROCESS and mai_check='n' LIMIT 0,1"); if ($result) {//__________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0) {//_______________________________________________________MYSQL NO RESULT $date=date("Y-m-d H:i:00"); $CLOSE = mysql_query("update $MYSQL_Table[batch] set bth_state='done',bth_datedone='$date' where bth_ID=$RUNPROCESS"); $return[1]='END'; return $return;} else{ $MYSQL_result='1'; }//__________________________________________________MYSQL RESULT }else{$return[1]='-1'; return $return;}//__________________NOT CONNECT $array = mysql_fetch_array($result); while ($array) { $mai_id=$array[mai_id]; $mailfor=$array[mai_email]; $langue=$array[mai_langue]; $mai_type=$array[mai_type]; $unsubscribe_ID=$array[mai_unsubscribe]; $array = mysql_fetch_array($result); } $result = mysql_query("select * from $MYSQL_Table[batch],$MYSQL_Table[categorie],$MYSQL_Table[layout] where bth_ID=$RUNPROCESS and cat_ref=bth_cat and lay_ID=bth_layout"); if ($result) {//__________________________________________________________MYSQL CONNECT if (mysql_num_rows ($result) == 0) {//_______________________________________________________MYSQL NO RESULT $return[1]='0'; return $return;} else{ $MYSQL_result='1'; }//__________________________________________________MYSQL RESULT }else{$return[1]='-1'; return $return;}//__________________NOT CONNECT //___________________________________________________________________________USE MYSQL RESULT if($MYSQL_result=='1') {//+++++++++++++++++++++++++++++++++++++++++++++++++++RESULT=1 $array = mysql_fetch_array($result); while ($array) { $BTH_subject='bth_subject'.$langue; $BTH_titre='bth_titre'.$langue; $BTH_contenthtml='bth_contenthtml'.$langue; $CAT_nom='cat_nom'.$langue; $subject=$array[$BTH_subject]; $titre=$array[$BTH_titre]; $content=$array[$BTH_contenthtml]; $cat_ref=$array[cat_ref]; $categorie=$array[$CAT_nom]; $pathlayout=$dirlog.$array[lay_href]; $IMGMAIL=$array[bth_image]; $array = mysql_fetch_array($result); } if ($mai_type=='1'){include("{$pathlayout}_html_{$langue}.php");} else {include("{$pathlayout}_txt_{$langue}.php");} $headers = "From: ".$WEBSITE." <".$ADMIN_emailfrom.">\n"; $headers .= "MIME-Version: 1.0\n"; if ($mai_type=='1'){$headers .= "Content-Type: text/html";} else{$headers .= "Content-Type: text/plain";} $result=mail($mailfor, $subject, $message, $headers); if($result<>'1'){$result='0';return $result;} $resultdelete = mysql_query("DELETE FROM $MYSQL_Table[mailingTMP] where mai_id=$mai_id"); $check=mysql_affected_rows (); if ($check=='1'){ mysql_query("OPTIMIZE TABLE $MYSQL_Table[mailingTMP]"); $return[1]='1';$return[2]=$mailfor; return $return; }else{$return[1]='0'; return $return;} }//+++++++++++++++++++++++++++++++++++++++++++++++++++RESULT=1 }//______________________________________________________________fin de la fontion sendMAILING /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* sendmailattach(V1.1) */ /* =================================================================== */ function sendmailattach($typeArr,$for,$from,$namefile,$plaintxt,$subject,$uploadfile_type,$uploadfile) {//______________________________________________________________début de la fontion sendmailattach if(in_array($uploadfile_type,$typeArr)) {//***********************************************************************GOODFILE if($uploadfile<>'') { if (file_exists($namefile)){unlink($namefile);} copy($uploadfile, "{$namefile}"); } $file_url = $namefile; $fp = fopen($file_url,"r"); $str = fread($fp, filesize($file_url)); $str = chunk_split(base64_encode($str)); $headers = "From: $from\n"; $headers .= "Reply-To: $from <$email>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/mixed; boundary=\"MIME_BOUNDRY\"\n"; $headers .= "X-Sender: $from_k <$email>\n"; $headers .= "X-Mailer: PHP4\n"; $headers .= "X-Priority: 3\n"; $headers .= "Return-Path: <$email>\n"; $headers .= "This is a multi-part message in MIME format.\n"; $message = "--MIME_BOUNDRY\n"; $message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n"; $message .= "Content-Transfer-Encoding: quoted-printable\n"; $message .= "\n"; // your text goes here $message .= $plaintxt; $message .= "\n"; $message .= "\n"; $message .= "--MIME_BOUNDRY\n"; $message .= "Content-Type: $uploadfile_type; name=\"$namefile\"\n"; $message .= "Content-disposition: attachment\n"; $message .= "Content-Transfer-Encoding: base64\n"; $message .= "\n"; $message .= "$str\n"; $message .= "\n"; //message ends $message .= "--MIME_BOUNDRY--\n"; mail($for, $subject, $message, $headers); if (file_exists($namefile)){unlink($namefile);} $result='1'; return $result; }//***********************************************************************GOODFILE elseif ($uploadfile=='') {//***********************************************************************NOFILE $headers = "From: $from\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: text/plain"; $message .= $plaintxt; mail($for, $subject, $message, $headers); $result='1'; return $result; }//***********************************************************************NOFILE else {//***********************************************************************WRONGFILE $result='-1'; return $result; }//***********************************************************************WRONGFILE }//______________________________________________________________fin de la fontion sendmailattach /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* sendmailattach2(V1.0) */ /* =================================================================== */ function sendmailattach2($for,$from,$namefile,$plaintxt,$subject,$uploadfile_type,$uploadfile) {//______________________________________________________________début de la fontion sendmailattach if($uploadfile<>'') {//*******************************************************************WITH ATTACH if (file_exists($namefile)){unlink($namefile);} copy($uploadfile, "{$namefile}"); $file_url = $namefile; $fp = fopen($file_url,"r"); $str = fread($fp, filesize($file_url)); $str = chunk_split(base64_encode($str)); $headers = "From: $from\n"; $headers .= "Reply-To: $from <$email>\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: multipart/mixed; boundary=\"MIME_BOUNDRY\"\n"; $headers .= "X-Sender: $from_k <$email>\n"; $headers .= "X-Mailer: PHP4\n"; $headers .= "X-Priority: 3\n"; $headers .= "Return-Path: <$email>\n"; $headers .= "This is a multi-part message in MIME format.\n"; $message = "--MIME_BOUNDRY\n"; $message .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n"; $message .= "Content-Transfer-Encoding: quoted-printable\n"; $message .= "\n"; // your text goes here $message .= $plaintxt; $message .= "\n"; $message .= "\n"; $message .= "--MIME_BOUNDRY\n"; $message .= "Content-Type: $uploadfile_type; name=\"$namefile\"\n"; $message .= "Content-disposition: attachment\n"; $message .= "Content-Transfer-Encoding: base64\n"; $message .= "\n"; $message .= "$str\n"; $message .= "\n"; //message ends $message .= "--MIME_BOUNDRY--\n"; mail($for, $subject, $message, $headers); if (file_exists($namefile)){unlink($namefile);} $result='1'; return $result; } else {//*******************************************************************NO ATTACH $headers = "From: $from\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: text/plain"; $message .= $plaintxt; mail($for, $subject, $message, $headers); $result='1'; return $result; }//*******************************************************************NO ATTACH }//______________________________________________________________fin de la fontion sendmailattach /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* MuliTypeCheckMail(V1.0) */ /* =================================================================== */ function MuliTypeCheckMail($Email,$Type_Check_Mailing) {//______________________________________________________________debut de la fontion MuliTypeCheckMail if($Type_Check_Mailing=='1') { $CheckMail=SnowCheckMail($Email,$Debug=false); if ($CheckMail[0]=='true'){$CheckMail='1';}else{$CheckMail='-1';} } else { $CheckMail=CheckMail($Email); } return $CheckMail; }//______________________________________________________________fin de la fontion MuliTypeCheckMail /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* SubscribeMailing2_6(V1.0) */ /* =================================================================== */ /* MAILING(V1.5) ==================================================================== return 1 ---------> pas adresse email return 2 ---------> Mail OK return 3 ---------> Mauvaise adresse e-mail return 4 ---------> Adresse E-mail existe déjà return 5 ---------> Pas de connection mysql return 6 ---------> Membre deja affilié return 7 ---------> Membre status attente de confirmation return 8 ---------> Pas de mail de confirmation */ function SubscribeMailing2_6($mbr_nom,$mbr_prenom,$mbr_email,$MYSQL_Table,$dir,$langue) {//______________________________________________________________debut de la fontion SubscribeMailing2_6 require("{$dir[RACINE]}includes/MY_DATA.PHP");//____________________________MY_DATA $CheckMail=MuliTypeCheckMail($mbr_email,$Type_Check_Mailing); if($CheckMail=='-1') { $mailing_check='3'; return $mailing_check; } $DateMysql=date("Y-m-d H:i:00"); //+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*LOAD MYSQL //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("select * from $MYSQL_Table[membre] where mbr_email='$mbr_email' LIMIT 0,1"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) //+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*LOAD MYSQL if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE $MYSQLARRAY = mysql_fetch_array($result); if ($MYSQLARRAY[mbr_nom]<>$mbr_nom or $MYSQLARRAY[mbr_prenom]<>$mbr_prenom) { $mailing_check='4'; return $mailing_check; } else { //+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*LOAD MYSQL //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result2 = mysql_query("select * from $MYSQL_Table[mailing_membre] where mbm_membre='$MYSQLARRAY[mbr_ID]' LIMIT 0,1"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result2==''){$MYSQLRESULT2='-1';}//_______MYSQL NO RESULT elseif ($result2<>'' & mysql_num_rows($result2) == 0){$MYSQLRESULT2='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT2='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) //+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*LOAD MYSQL if ($MYSQLRESULT2=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE DEJA AFFILIE $MYSQLARRAY2 = mysql_fetch_array($result2); if($MYSQLARRAY2[mbm_status]=='w') { //____________________________EMAIL CONFIRMATION $mailcheck=CreateMailConfirmation($MAIL_CONFIRMATION_TYPE,$MAIL_CONFIRMATION_URL,$dir[RACINE],$WEBSITE,$ADMIN_emailfrom,stripslashes($mbr_nom),stripslashes($mbr_prenom),$mbr_email,$MYSQLARRAY[mbr_sessionID],$langue); if($mailcheck=='1') { $mailing_check='7'; return $mailing_check; } else { $mailing_check='8'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } elseif($MYSQLARRAY2[mbm_status]=='a') { $mailing_check='6'; return $mailing_check; } elseif($MYSQLARRAY2[mbm_status]=='r') { $conn = mysql_connect("$mysql_host","$mysql_member","$mysql_memberpassw"); mysql_select_db("$db"); $result3 = mysql_query("UPDATE $MYSQL_Table[mailing_membre] set mbm_status='w', mbm_datein='$DateMysql', mbm_datemodif='$DateMysql', mbm_owner='u',mbm_modification='u' where mbm_ID='$MYSQLARRAY2[mbm_ID]'"); $MYSQLRESULT3=mysql_affected_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mailcheck=CreateMailConfirmation($MAIL_CONFIRMATION_TYPE,$MAIL_CONFIRMATION_URL,$dir[RACINE],$WEBSITE,$ADMIN_emailfrom,stripslashes($mbr_nom),stripslashes($mbr_prenom),$mbr_email,$MYSQLARRAY[mbr_sessionID],$langue); if($mailcheck=='1') { $mailing_check='2'; return $mailing_check; } else { $mailing_check='8'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } else { $mailing_check='5'; return $mailing_check; } } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE DEJA AFFILIE elseif ($MYSQLRESULT2=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE PAS AFFILIE $conn = mysql_connect("$mysql_host","$mysql_member","$mysql_memberpassw"); mysql_select_db("$db"); $result3 = mysql_query("INSERT $MYSQL_Table[mailing_membre] set mbm_membre='$MYSQLARRAY[mbr_ID]', mbm_status='w', mbm_datein='$DateMysql', mbm_datemodif='$DateMysql', mbm_owner='u',mbm_modification='u'"); $MYSQLRESULT3=mysql_affected_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mailcheck=CreateMailConfirmation($MAIL_CONFIRMATION_TYPE,$MAIL_CONFIRMATION_URL,$dir[RACINE],$WEBSITE,$ADMIN_emailfrom,stripslashes($mbr_nom),stripslashes($mbr_prenom),$mbr_email,$MYSQLARRAY[mbr_sessionID],$langue); if($mailcheck=='1') { $mailing_check='2'; return $mailing_check; } else { $mailing_check='8'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } else { $mailing_check='5'; return $mailing_check; } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE PAS AFFILIE elseif ($MYSQLRESULT2=='-1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE DEJA AFFILIE $mailing_check='5'; return $mailing_check; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE DEJA AFFILIE } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE elseif ($MYSQLRESULT=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE $mbr_sessionID=Create_sessionID($MYSQL_Table[membre],'mbr_sessionID',$mysql_host,$mysql_user,$mysql_passw,$db); if($mbr_sessionID=='') { $mailing_check='5'; return $mailing_check; } $conn = mysql_connect("$mysql_host","$mysql_member","$mysql_memberpassw"); mysql_select_db("$db"); $result3 = mysql_query("INSERT $MYSQL_Table[membre] set mbr_nom='$mbr_nom', mbr_prenom='$mbr_prenom', mbr_email='$mbr_email',mbr_sessionID='$mbr_sessionID', mbr_language='$langue', mbr_datein='$DateMysql', mbr_datemodif='$DateMysql', mbr_check='y'"); $MYSQLRESULT3=mysql_affected_rows(); if($MYSQLRESULT3<>'1') { $mailing_check='5'; return $mailing_check; } $mbr_ID=mysql_insert_id(); $result3 = mysql_query("INSERT $MYSQL_Table[mailing_membre] set mbm_membre='$mbr_ID', mbm_status='w', mbm_datein='$DateMysql', mbm_datemodif='$DateMysql', mbm_owner='u'"); $MYSQLRESULT3=mysql_affected_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mailcheck=CreateMailConfirmation($MAIL_CONFIRMATION_TYPE,$MAIL_CONFIRMATION_URL,$dir[RACINE],$WEBSITE,$ADMIN_emailfrom,stripslashes($mbr_nom),stripslashes($mbr_prenom),$mbr_email,$mbr_sessionID,$langue); if($mailcheck=='1') { $mailing_check='2'; return $mailing_check; } else { $mailing_check='8'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } else { $mailing_check='5'; return $mailing_check; } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE elseif ($MYSQLRESULT=='-1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ERREUR MYSQL $mailing_check='5'; return $mailing_check; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ERREUR MYSQL }//______________________________________________________________fin de la fontion SubscribeMailing2_6 // Utilisation de l'objet MySQL function SubscribeMailing2_6_3($Bdd,$mbr_nom,$mbr_prenom,$mbr_email,$MYSQL_Table,$dir,$langue,$options=array()) {//______________________________________________________________debut de la fontion SubscribeMailing2_6 require("{$dir[RACINE]}includes/MY_DATA.PHP");//____________________________MY_DATA $CheckMail=MuliTypeCheckMail($mbr_email,$Type_Check_Mailing); if($CheckMail=='-1') { $mailing_check='3'; return $mailing_check; } $DateMysql=date("Y-m-d H:i:00"); //+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*LOAD MYSQL $Query ="SELECT * FROM $MYSQL_Table[membre] WHERE mbr_email='$mbr_email' LIMIT 0,1"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) //+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*LOAD MYSQL if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE $MYSQLARRAY = $Bdd->get_array($Result, 'BOTH'); if ($MYSQLARRAY['mbr_nom']!=$mbr_nom || $MYSQLARRAY['mbr_prenom']!=$mbr_prenom) { $mailing_check='4'; return $mailing_check; } else { $Query2 = "SELECT * FROM $MYSQL_Table[mailing_membre] WHERE mbm_membre='$MYSQLARRAY[mbr_ID]' LIMIT 0,1"; // Envoi de la requete : if( !$Result2 = $Bdd->Send_Query($Query2,$link) ) die( $Bdd->return_error()); if ($Result2==''){$MYSQLRESULT2='-1';}//_______MYSQL NO RESULT elseif ($Result2<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT2='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT2='1';}//_______MYSQL RESULT OK if ($MYSQLRESULT2=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE DEJA AFFILIE $MYSQLARRAY2 = $Bdd->get_array($Result2, 'BOTH'); if($MYSQLARRAY2['mbm_status']=='w') { //____________________________EMAIL CONFIRMATION $mailcheck=CreateMailConfirmation($MAIL_CONFIRMATION_TYPE,$MAIL_CONFIRMATION_URL,$dir['RACINE'],$WEBSITE,$ADMIN_emailfrom,stripslashes($mbr_nom),stripslashes($mbr_prenom),$mbr_email,$MYSQLARRAY['mbr_sessionID'],$langue,$options); if($mailcheck=='1') { $mailing_check='7'; return $mailing_check; } else { $mailing_check='8'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } elseif($MYSQLARRAY2['mbm_status']=='a') { $mailing_check='6'; return $mailing_check; } elseif($MYSQLARRAY2['mbm_status']=='r') { $Query3 = "UPDATE $MYSQL_Table[mailing_membre] SET mbm_status='w', mbm_datein='$DateMysql', mbm_datemodif='$DateMysql', mbm_owner='u',mbm_modification='u' WHERE mbm_ID='$MYSQLARRAY2[mbm_ID]'"; // Envoi de la requete : if( !$Result3 = $Bdd->Send_Query($Query3,$link) ) die( $Bdd->return_error()); $MYSQLRESULT3=$Bdd->num_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mailcheck=CreateMailConfirmation($MAIL_CONFIRMATION_TYPE,$MAIL_CONFIRMATION_URL,$dir['RACINE'],$WEBSITE,$ADMIN_emailfrom,stripslashes($mbr_nom),stripslashes($mbr_prenom),$mbr_email,$MYSQLARRAY['mbr_sessionID'],$langue,$options); if($mailcheck=='1') { $mailing_check='2'; return $mailing_check; } else { $mailing_check='8'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } else { $mailing_check='5'; return $mailing_check; } } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE DEJA AFFILIE elseif ($MYSQLRESULT2=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE PAS AFFILIE $Query3 = "INSERT $MYSQL_Table[mailing_membre] SET mbm_membre='$MYSQLARRAY[mbr_ID]', mbm_status='w', mbm_datein='$DateMysql', mbm_datemodif='$DateMysql', mbm_owner='u',mbm_modification='u'"; // Envoi de la requete : if( !$Result3 = $Bdd->Send_Query($Query3,$link) ) die( $Bdd->return_error()); $MYSQLRESULT3=$Bdd->num_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mailcheck=CreateMailConfirmation($MAIL_CONFIRMATION_TYPE,$MAIL_CONFIRMATION_URL,$dir[RACINE],$WEBSITE,$ADMIN_emailfrom,stripslashes($mbr_nom),stripslashes($mbr_prenom),$mbr_email,$MYSQLARRAY[mbr_sessionID],$langue,$options); if($mailcheck=='1') { $mailing_check='2'; return $mailing_check; } else { $mailing_check='8'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } else { $mailing_check='5'; return $mailing_check; } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE PAS AFFILIE elseif ($MYSQLRESULT2=='-1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE DEJA AFFILIE $mailing_check='5'; return $mailing_check; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MEMBRE DEJA AFFILIE } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE elseif ($MYSQLRESULT=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE $mbr_sessionID=Create_sessionID($Bdd,$MYSQL_Table[membre],'mbr_sessionID'); if($mbr_sessionID=='') { $mailing_check='5'; return $mailing_check; } $Query3 = "INSERT $MYSQL_Table[membre] SET mbr_nom='$mbr_nom', mbr_prenom='$mbr_prenom', mbr_email='$mbr_email',mbr_sessionID='$mbr_sessionID', mbr_language='$langue', mbr_datein='$DateMysql', mbr_datemodif='$DateMysql', mbr_check='y'"; // Envoi de la requete : if( !$Result3 = $Bdd->Send_Query($Query3,$link) ) die( $Bdd->return_error()); $MYSQLRESULT3=$Bdd->num_rows(); if($MYSQLRESULT3<>'1') { $mailing_check='5'; return $mailing_check; } $mbr_ID=$Bdd->last_insert_id(); $Query3 = "INSERT $MYSQL_Table[mailing_membre] SET mbm_membre='$mbr_ID', mbm_status='w', mbm_datein='$DateMysql', mbm_datemodif='$DateMysql', mbm_owner='u'"; // Envoi de la requete : if( !$Result3 = $Bdd->Send_Query($Query3,$link) ) die( $Bdd->return_error()); $MYSQLRESULT3=$Bdd->num_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mailcheck=CreateMailConfirmation($MAIL_CONFIRMATION_TYPE,$MAIL_CONFIRMATION_URL,$dir['RACINE'],$WEBSITE,$ADMIN_emailfrom,stripslashes($mbr_nom),stripslashes($mbr_prenom),$mbr_email,$mbr_sessionID,$langue,$options); if($mailcheck=='1') { $mailing_check='2'; return $mailing_check; } else { $mailing_check='8'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } else { $mailing_check='5'; return $mailing_check; } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE elseif ($MYSQLRESULT=='-1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ERREUR MYSQL $mailing_check='5'; return $mailing_check; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ERREUR MYSQL }//______________________________________________________________fin de la fontion SubscribeMailing2_6 function CreateMailConfirmation($MAIL_CONFIRMATION_TYPE,$PathMail,$DirMail,$WEBSITE,$ADMIN_emailfrom,$mbr_nom,$mbr_prenom,$mbr_email,$mbr_key,$langue,$options=array()) { if(!empty($options)) foreach($options as $k=>$o) ${$k} = $o; $UrlPathMail=$DirMail.$PathMail.$langue.".php"; if(file_exists($UrlPathMail) || !($WEBSITE=='' || $ADMIN_emailfrom=='' || $mbr_nom=='' || $mbr_prenom=='' || $mbr_email=='' || $mbr_key=='' || $langue=='')) { require($UrlPathMail); $mail = new PHPMailer(); $mail->From = $ADMIN_emailfrom; $mail->FromName = $WEBSITE; $mail->AddAddress($mbr_email,stripslashes($mbr_prenom.' '.$mbr_nom)); $mail->IsHTML(true); $mail->Subject = $subject; $message = str_replace("[PUTNOM]", $mbr_nom, $message); $message = str_replace("[PUTPRENOM]", $mbr_prenom, $message); $message = str_replace("[ADDPROFILMAILING]", "?key=".$mbr_key."&email=".$mbr_email."&langue=".$langue, $message); $message = str_replace("[UNSUBSCRIBEMAILING]", "email=".$mbr_email."&key=".$mbr_key."&langue=".$langue, $message); $mail->Body = $message; $message_alt = str_replace("[PUTNOM]", $mbr_nom, $message_alt); $message_alt = str_replace("[PUTPRENOM]", $mbr_prenom, $message_alt); $message_alt = str_replace("[ADDPROFILMAILING]", "?key=".$mbr_key."&email=".$mbr_email."&langue=".$langue, $message_alt); $message_alt = str_replace("[UNSUBSCRIBEMAILING]", "email=".$mbr_email."&key=".$mbr_key."&langue=".$langue, $message_alt); $mail->AltBody = $message_alt; return ($mail->Send())?'1':'-1'; } else return '-1'; //____________________________EMAIL CONFIRMATION } /* MAILING(V1.5) ==================================================================== return 1 ---------> Compte activé mais pas besoin de mail return 2 ---------> Mail OK return 3 ---------> Pas de mail de confirmation return 4 ---------> Pas de connection mysql */ function AcceptMailing2_6($email,$key,$MYSQL_Table,$dir,$langue,$TR,$member=false) {//______________________________________________________________debut de la fontion SubscribeMailing2_6 require("{$dir[RACINE]}includes/MY_DATA.PHP");//____________________________MY_DATA $DateMysql=date("Y-m-d H:i:00"); //+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*LOAD MYSQL //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("select * from $MYSQL_Table[membre],$MYSQL_Table[mailing_membre] where mbr_email='$email' and mbr_sessionID='$key' and mbr_ID=mbm_membre LIMIT 0,1"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) //+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*LOAD MYSQL if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE $MYSQLARRAY = mysql_fetch_array($result); if ($MYSQLARRAY[mbr_passwd]=='' or $MYSQLARRAY[mbr_login]=='') { $mbr_passwd=Create_PassMember($Bdd,$MYSQL_Table[membre],'mbr_passwd',$mysql_host,$mysql_user,$mysql_passw,$db,'8'); if($mbr_passwd=='1') { $mailing_check='4'; return $mailing_check; } $mbr_login=Create_login($MYSQL_Table[membre],'mbr_login',$mysql_host,$mysql_user,$mysql_passw,$db,$MYSQLARRAY[mbr_nom],$MYSQLARRAY[mbr_prenom]); if($mbr_login=='') { $mailing_check='4'; return $mailing_check; } $conn = mysql_connect("$mysql_host","$mysql_member","$mysql_memberpassw"); mysql_select_db("$db"); $result3 = mysql_query("UPDATE $MYSQL_Table[membre] set mbr_login='$mbr_login', mbr_passwd=PASSWORD('".$mbr_passwd."'), mbr_datemodif='$DateMysql' where mbr_ID='$MYSQLARRAY[mbr_ID]'"); $MYSQLRESULT3=mysql_affected_rows(); if($MYSQLRESULT3<>'1') { $mailing_check='-1'; return $mailing_check; } if ($MYSQLARRAY[mbm_status]=='w') { $result3 = mysql_query("UPDATE $MYSQL_Table[mailing_membre] set mbm_status='a', mbm_dateaccept='$DateMysql', mbm_datemodif='$DateMysql', mbm_modification='$MYSQLARRAY[mbm_modification],u' where mbm_ID='$MYSQLARRAY[mbm_ID]'"); } if ($MYSQLARRAY[mbm_status]=='a') { $result3 = mysql_query("UPDATE $MYSQL_Table[mailing_membre] set mbm_datemodif='$DateMysql', mbm_modification='$MYSQLARRAY[mbm_modification],u' where mbm_ID='$MYSQLARRAY[mbm_ID]'"); } $MYSQLRESULT3=mysql_affected_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mailinfo=implode(",",$ADMIN_emailinfo); mail($mailinfo,'- New addict to '.$WEBSITE.'-','There is a new addict to the mailing list:'.$MYSQLARRAY[mbr_email],'From: '.$ADMIN_emailfrom); $mailcheck=CreateMailPassword($MAIL_CONFIRMATION_TYPE,$MAIL_PASSWORD_URL,$dir[RACINE],$WEBSITE,$ADMIN_emailfrom,$MYSQLARRAY[mbr_nom],$MYSQLARRAY[mbr_prenom],$MYSQLARRAY[mbr_email],$mbr_login,$mbr_passwd,$langue,$TR); if($mailcheck=='1') { return $MYSQLARRAY; } else { $mailing_check='3'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } else { $mailing_check='4'; return $mailing_check; } } else { $conn = mysql_connect("$mysql_host","$mysql_member","$mysql_memberpassw"); mysql_select_db("$db"); $result3 = mysql_query("UPDATE $MYSQL_Table[mailing_membre] set mbm_status='a', mbm_dateaccept='$DateMysql', mbm_datemodif='$DateMysql', mbm_modification='$MYSQLARRAY[mbm_modification],u' where mbm_ID='$MYSQLARRAY[mbm_ID]'"); $MYSQLRESULT3=mysql_affected_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mailinfo=implode(",",$ADMIN_emailinfo); mail($mailinfo,'- New addict to '.$WEBSITE.'-','There is a new addict to the mailing list:'.$MYSQLARRAY[mbr_email],'From: '.$ADMIN_emailfrom); if(!$member) { $mailcheck=CreateMailPassword($MAIL_CONFIRMATION_TYPE,$MAIL_ACTIVATION_URL,$dir[RACINE],$WEBSITE,$ADMIN_emailfrom,$MYSQLARRAY[mbr_nom],$MYSQLARRAY[mbr_prenom],$MYSQLARRAY[mbr_email],$mbr_login,$mbr_passwd,$langue,$TR); if($mailcheck=='1') { return $MYSQLARRAY; } else { $mailing_check='3'; return $mailing_check; } } else return $MYSQLARRAY; //____________________________EMAIL CONFIRMATION } else { $mailing_check='4'; return $mailing_check; } } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE if ($MYSQLRESULT=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE PAS $mailing_check='-1'; return $mailing_check; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE PAS if ($MYSQLRESULT=='-1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MYSQL ERREUR $mailing_check='-1'; return $mailing_check; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MYSQL ERREUR }//______________________________________________________________debut de la fontion SubscribeMailing2_6 function AcceptMailing2_6_3($Bdd,$email,$key,$MYSQL_Table,$dir,$langue,$TR,$member=false,$options=array()) {//______________________________________________________________debut de la fontion SubscribeMailing2_6 require("{$dir[RACINE]}includes/MY_DATA.PHP");//____________________________MY_DATA $DateMysql=date("Y-m-d H:i:00"); $Query = "SELECT * FROM $MYSQL_Table[membre],$MYSQL_Table[mailing_membre] WHERE mbr_email='$email' AND mbr_sessionID='$key' AND mbr_ID=mbm_membre LIMIT 0,1"; // Envoi de la requete : if( !$Result = $Bdd->Send_Query($Query,$link) ) die( $Bdd->return_error()); if ($Result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($Result<>'' && $Bdd->num_rows() == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE $MYSQLARRAY = $Bdd->get_array($Result, 'BOTH'); if ($MYSQLARRAY['mbr_passwd']=='' || $MYSQLARRAY['mbr_login']=='') { $mbr_passwd=Create_PassMember($Bdd,$MYSQL_Table['membre'],'mbr_passwd','8'); if($mbr_passwd=='1') { $mailing_check='4'; return $mailing_check; } $mbr_login=Create_login($Bdd,$MYSQL_Table['membre'],'mbr_login',$MYSQLARRAY[mbr_nom],$MYSQLARRAY[mbr_prenom]); if($mbr_login=='') { $mailing_check='4'; return $mailing_check; } $Query3 = "UPDATE $MYSQL_Table[membre] SET mbr_login='$mbr_login', mbr_passwd=PASSWORD('".$mbr_passwd."'), mbr_datemodif=NOW() WHERE mbr_ID='$MYSQLARRAY[mbr_ID]'"; // Envoi de la requete : if( !$Result3 = $Bdd->Send_Query($Query3,$link) ) die( $Bdd->return_error()); $MYSQLRESULT3 = $Bdd->num_rows(); if($MYSQLRESULT3<>'1') { $mailing_check='-1'; return $mailing_check; } if ($MYSQLARRAY['mbm_status']=='w') { $Query3 = "UPDATE $MYSQL_Table[mailing_membre] SET mbm_status='a', mbm_dateaccept=NOW(), mbm_datemodif=NOW(), mbm_modification='$MYSQLARRAY[mbm_modification],u' WHERE mbm_ID='$MYSQLARRAY[mbm_ID]'"; // Envoi de la requete : if( !$Result3 = $Bdd->Send_Query($Query3,$link) ) die( $Bdd->return_error()); } if ($MYSQLARRAY['mbm_status']=='a') { $Query3 = "UPDATE $MYSQL_Table[mailing_membre] SET mbm_datemodif=NOW(), mbm_modification='$MYSQLARRAY[mbm_modification],u' WHERE mbm_ID='$MYSQLARRAY[mbm_ID]'"; // Envoi de la requete : if( !$Result3 = $Bdd->Send_Query($Query3,$link) ) die( $Bdd->return_error()); } $MYSQLRESULT3 = $Bdd->num_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mail = new PHPMailer(); $mail->From = $ADMIN_emailfrom; $mail->FromName = $WEBSITE; foreach($ADMIN_emailinfo as $email) { $mail->AddAddress($email); } $mail->IsHTML(true); $msg = 'There is a new addict to the mailing list:'.$MYSQLARRAY['mbr_email']; $mail->Subject = '- New addict to '.$WEBSITE.'-'; $mail->Body = $msg; $mail->AltBody = $msg; $mailcheck=CreateMailPassword($MAIL_CONFIRMATION_TYPE,$MAIL_PASSWORD_URL,$dir['RACINE'],$WEBSITE,$ADMIN_emailfrom,$MYSQLARRAY['mbr_nom'],$MYSQLARRAY['mbr_prenom'],$MYSQLARRAY['mbr_email'],$mbr_login,$mbr_passwd,$MYSQLARRAY['mbr_sessionID'],$langue,$TR,$options); if($mailcheck=='1') return $MYSQLARRAY; else { $mailing_check='3'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } else { $mailing_check='4'; return $mailing_check; } } else { $Query3 = "UPDATE $MYSQL_Table[mailing_membre] SET mbm_status='a', mbm_dateaccept=NOW(), mbm_datemodif=NOW(), mbm_modification='$MYSQLARRAY[mbm_modification],u' WHERE mbm_ID='$MYSQLARRAY[mbm_ID]'"; // Envoi de la requete : if( !$Result3 = $Bdd->Send_Query($Query3,$link) ) die( $Bdd->return_error()); $MYSQLRESULT3=$Bdd->num_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mail = new PHPMailer(); $mail->From = $ADMIN_emailfrom; $mail->FromName = $WEBSITE; foreach($ADMIN_emailinfo as $email) { $mail->AddAddress($email); } $mail->IsHTML(true); $msg = 'There is a new addict to the mailing list:'.$MYSQLARRAY['mbr_email']; $mail->Subject = '- New addict to '.$WEBSITE.'-'; $mail->Body = $msg; $mail->AltBody = $msg; //$mail->Send(); if(!$member) { $mailcheck=CreateMailPassword($MAIL_CONFIRMATION_TYPE,$MAIL_PASSWORD_URL,$dir['RACINE'],$WEBSITE,$ADMIN_emailfrom,$MYSQLARRAY['mbr_nom'],$MYSQLARRAY['mbr_prenom'],$MYSQLARRAY['mbr_email'],$mbr_login,$mbr_passwd,$MYSQLARRAY['mbr_sessionID'],$langue,$TR,$options); if($mailcheck=='1') return $MYSQLARRAY; else { $mailing_check='3'; return $mailing_check; } } else return $MYSQLARRAY; //____________________________EMAIL CONFIRMATION } else { $mailing_check='4'; return $mailing_check; } } } if ($MYSQLRESULT=='0') { $mailing_check='-1'; return $mailing_check; } if ($MYSQLRESULT=='-1') { $mailing_check='-1'; return $mailing_check; } }//______________________________________________________________debut de la fontion SubscribeMailing2_6 function AcceptMailing2_6byGcm($email,$key,$MYSQL_Table,$dir,$MAIL_CONFIRMATION_TYPE,$MAIL_PASSWORD_GCM_URL,$langue,$TR) {//______________________________________________________________debut de la fontion AcceptMailing2_6byGcm require("{$dir[CLIENTGCM]}includes/MY_DATA.PHP");//____________________________MY_DATA $DateMysql=date("Y-m-d H:i:00"); //+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*LOAD MYSQL //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) $conn = mysql_connect("$mysql_host","$mysql_user","$mysql_passw"); mysql_select_db("$db"); $result = mysql_query("select * from $MYSQL_Table[membre],$MYSQL_Table[mailing_membre] where mbr_email='$email' and mbr_sessionID='$key' and mbr_ID=mbm_membre LIMIT 0,1"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) //+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*LOAD MYSQL if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE $MYSQLARRAY = mysql_fetch_array($result); if ($MYSQLARRAY[mbr_passwd]=='' or $MYSQLARRAY[mbr_login]=='') { $mbr_passwd=Create_PassMember($MYSQL_Table[membre],'mbr_passwd',$mysql_host,$mysql_user,$mysql_passw,$db,'8'); if($mbr_passwd=='1') { $mailing_check='4'; return $mailing_check; } $mbr_login=Create_login($MYSQL_Table[membre],'mbr_login',$mysql_host,$mysql_user,$mysql_passw,$db,$MYSQLARRAY[mbr_nom],$MYSQLARRAY[mbr_prenom]); if($mbr_login=='') { $mailing_check='4'; return $mailing_check; } $conn = mysql_connect("$mysql_host","$mysql_member","$mysql_memberpassw"); mysql_select_db("$db"); $result3 = mysql_query("UPDATE $MYSQL_Table[membre] set mbr_login='$mbr_login', mbr_passwd=PASSWORD('".$mbr_passwd."'), mbr_datemodif='$DateMysql' where mbr_ID='$MYSQLARRAY[mbr_ID]'"); $MYSQLRESULT3=mysql_affected_rows(); if($MYSQLRESULT3<>'1') { $mailing_check='-1'; return $mailing_check; } if ($MYSQLARRAY[mbm_status]=='w') { $result3 = mysql_query("UPDATE $MYSQL_Table[mailing_membre] set mbm_status='a', mbm_dateaccept='$DateMysql', mbm_datemodif='$DateMysql', mbm_modification='$MYSQLARRAY[mbm_modification],u' where mbm_ID='$MYSQLARRAY[mbm_ID]'"); } if ($MYSQLARRAY[mbm_status]=='a') { $result3 = mysql_query("UPDATE $MYSQL_Table[mailing_membre] set mbm_datemodif='$DateMysql', mbm_modification='$MYSQLARRAY[mbm_modification],u' where mbm_ID='$MYSQLARRAY[mbm_ID]'"); } $MYSQLRESULT3=mysql_affected_rows(); if($MYSQLRESULT3=='1') { //____________________________EMAIL CONFIRMATION $mailcheck=CreateMailPassword($MAIL_CONFIRMATION_TYPE,$MAIL_PASSWORD_GCM_URL,$dir[CLIENTGCM],$WEBSITE,$ADMIN_emailfrom,$MYSQLARRAY[mbr_nom],$MYSQLARRAY[mbr_prenom],$MYSQLARRAY[mbr_email],$mbr_login,$mbr_passwd,$langue,$TR); if($mailcheck=='1') { return $MYSQLARRAY; } else { $mailing_check='3'; return $mailing_check; } //____________________________EMAIL CONFIRMATION } else { $mailing_check='4'; return $mailing_check; } } else { $mailing_check='2'; return $mailing_check; } }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE if ($MYSQLRESULT=='0') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE PAS $mailing_check='-1'; return $mailing_check; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE PAS if ($MYSQLRESULT=='-1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MYSQL ERREUR $mailing_check='-1'; return $mailing_check; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-MYSQL ERREUR }//______________________________________________________________debut de la fontion AcceptMailing2_6byGcm function CreateMailPassword($MAIL_CONFIRMATION_TYPE,$PathMail,$DirMail,$WEBSITE,$ADMIN_emailfrom,$mbr_nom,$mbr_prenom,$mbr_email,$mbr_login,$mbr_passwd,$mbr_key,$langue,$TR,$options=array()) { if(!empty($options)) foreach($options as $k=>$o) ${$k} = $o; $UrlPathMail=$DirMail.$PathMail.$langue.".php"; if(file_exists($UrlPathMail) || !($WEBSITE=='' || $ADMIN_emailfrom=='' || $mbr_nom=='' || $mbr_prenom=='' || $mbr_email=='' || $mbr_key=='' || $langue=='')) { require($UrlPathMail); $mail = new PHPMailer(); $mail->From = $ADMIN_emailfrom; $mail->FromName = $WEBSITE; $mail->AddAddress($mbr_email,stripslashes($mbr_prenom.' '.$mbr_nom)); $mail->IsHTML(true); $mail->Subject = $subject; $message = str_replace("[PUTNOM]", $mbr_nom, $message); $message = str_replace("[PUTPRENOM]", $mbr_prenom, $message); $message = str_replace("[ADDPROFILMAILING]", "?key=".$mbr_key."&email=".$mbr_email."&langue=".$langue, $message); $message = str_replace("[ADDPASSWORD]", "".$TR[FormLogin]."= ".$mbr_login."

".$TR[FormPassword]."= ".$mbr_passwd, $message); $message = str_replace("[UNSUBSCRIBEMAILING]", "email=".$mbr_email."&key=".$mbr_key."&langue=".$langue, $message); $mail->Body = $message; $message_alt = str_replace("[PUTNOM]", $mbr_nom, $message_alt); $message_alt = str_replace("[PUTPRENOM]", $mbr_prenom, $message_alt); $message_alt = str_replace("[ADDPROFILMAILING]", "?key=".$mbr_key."&email=".$mbr_email."&langue=".$langue, $message_alt); $message_alt = str_replace("[ADDPASSWORD]", $TR[FormLogin]."= ".$mbr_login."\n\n".$TR[FormPassword]."= ".$mbr_passwd, $message_alt); $message_alt = str_replace("[UNSUBSCRIBEMAILING]", "email=".$mbr_email."&key=".$mbr_key."&langue=".$langue, $message_alt); $mail->AltBody = $message_alt; return ($mail->Send())?'1':'-1'; } else return '-1'; } /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ /* SubscribeMailing2_6(V1.0) */ /* =================================================================== */ /* MAILING(V1.5) ==================================================================== return 1 ---------> pas adresse email return 2 ---------> Mail OK return 3 ---------> Mauvaise adresse e-mail return 4 ---------> Adresse E-mail existe déjà return 5 ---------> Pas de connection mysql return 6 ---------> Membre deja affilié return 7 ---------> Membre status attente de confirmation return 8 ---------> Pas de mail de confirmation */ function UnSubscribeMailing2_6($key,$email,$MYSQL_Table,$dir) {//______________________________________________________________debut de la fontion SubscribeMailing2_6 require("{$dir[RACINE]}includes/MY_DATA.PHP");//____________________________MY_DATA $DateMysql=date("Y-m-d H:i:00"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) $conn = mysql_connect("$mysql_host","$mysql_member","$mysql_memberpassw"); mysql_select_db("$db"); $result = mysql_query("select * from $MYSQL_Table[membre],$MYSQL_Table[mailing_membre] where mbr_email='$email' and mbr_sessionID='$key' and mbr_ID=mbm_membre LIMIT 0,1"); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($result==''){$MYSQLRESULT='-1';}//_______MYSQL NO RESULT elseif ($result<>'' & mysql_num_rows($result) == 0){$MYSQLRESULT='0';}//_______MYSQL NO RESULT else {$MYSQLRESULT='1';}//_______MYSQL RESULT OK //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE $MYSQLARRAY = mysql_fetch_array($result); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-CONNECTION TO MYSQL (V1.1) $result2 = mysql_query("UPDATE $MYSQL_Table[mailing_membre] set mbm_status='r', mbm_dateresil='$DateMysql', mbm_datemodif='$DateMysql',mbm_modification='$MYSQLARRAY[mbm_modification],u', mbm_resiliation='u' where mbm_ID='$MYSQLARRAY[mbm_ID]'"); //echo"$mysql_host","$mysql_member","$mysql_memberpassw"; //echo"UPDATE $MYSQL_Table[mailing_membre] set mbm_status='r', mbm_dateresil='$DateMysql', mbm_datemodif='$DateMysql',mbm_modification='$MYSQLARRAY[mbm_modification],u', mbm_resiliation='u' where mbm_ID='$MYSQLARRAY[mbm_ID]'"; $MYSQLRESULT2=mysql_affected_rows(); //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-RESULT CONNECTION TO MYSQL (V1.1) if ($MYSQLRESULT2=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE RESILIE return '1'; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE RESILIE else {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE RESILIE //echo 'erreur sur update'; return '-1'; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE RESILIE }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE if ($MYSQLRESULT=='1') {//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE //echo 'erreur sur select'; return '-1'; }//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-ADRESSE MAIL EXISTE }//______________________________________________________________debut de la fontion SubscribeMailing2_6 function mail_attachement_2_6($to,$sujet,$message,$filename,$typemime,$nom,$reply,$from,$typemail) { //$filename et $nom sont des tableaux qui contiennent chemin + nom de X piËces jointes : $limite = "_parties_".md5 (uniqid (rand())); $mail_mime = "Date: ".date("l j F Y, G:i")."\n"; $mail_mime .= "MIME-Version: 1.0\n"; $mail_mime .= "Content-Type: multipart/alternative;\n"; $mail_mime .= " boundary=\"----=$limite\"\n\n"; //Le message en texte simple pour les navigateurs qui n'acceptent pas le HTML $texte_simple = "This is a multi-part message in MIME format.\n"; $texte_simple .= "Ceci est un message est au format MIME.\n"; $texte_simple .= "------=$limite\n"; $texte_simple .= "Content-Type: text/plain; charset=\"iso-8859-1\"\n"; $texte_simple .= "Content-Transfer-Encoding: Quoted-Printable\n\n"; $texte_simple .= "You have received an HTML-rich eMessage that cannot be displayed by your email sofware."; $texte_simple .= "\n\n"; //le message en html original $texte_html = "------=$limite\n"; $texte_html .= "Content-Type: text/html; charset=\"iso-8859-1\"\n"; $texte_html .= "Content-Transfer-Encoding: 8bit\n\n"; $texte_html .= $message; $texte_html .= "\n\n\n------=$limite\n"; for ($i=0;$i
Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 56

Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 58

Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 60

Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 62

Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 68
PRIVEES > PUBLIQUE fonction CheckBlankSetting(V1.0) fonction CheckBlankSetting2(V1.0) fonction CheckFile(V1.1) fonction CheckMail(V1.0) */ class CheckForm {//************* DEBUT DE LA CLASSE Formsfunction function CheckForm() { } /*==========================================================================================================*/ /* fonction CheckBlankSetting(V1.0) */ /*==========================================================================================================*/ /* */ /* */ /* $BlankSETTING : Nom de la liste contenant les éléments à checker (1 =no language / 2 $TR) */ /* $LG_list : Nom de la liste contenant les $TR ( EN, FR, NL...) */ /* $Methode : String contenant POST ou GET */ /* return : nom du champ si erreur, sinon rien */ /* */ /*==========================================================================================================*/ function CheckBlankSetting($BlankSETTING, $LG_list, $Methode) {//____________________________________________________________________________________________DEBUT DE LA FONCTION CheckBlankSetting if($Methode == 'POST'){ while (list ($key, $val) = each ($BlankSETTING)){ if($val=='1'){ if ($_POST[$key]==''){ return $key; } } else if($val=='2'){ foreach ($LG_list as $LG){ $key_LG=$key.$LG; if ($_POST[$key_LG]==''){ return $key; } } } } }elseif($Methode == 'GET'){ while (list ($key, $val) = each ($BlankSETTING)){ if($val=='1'){ if ($_GET[$key]==''){ return $key; } } if($val=='2'){ foreach ($LG_list as $LG){ $key_LG=$key.$LG; if ($_GET[$key_LG]==''){ return $key; } } } } } }//____________________________________________________________________________________________FIN DE LA FONCTION CheckBlankSetting /*==========================================================================================================*/ /* fonction CheckBlankSetting2(V1.0) */ /*==========================================================================================================*/ /* */ /* */ /* $BlankSETTING : Nom de la liste contenant les éléments à checker (1) : conditions eventuels */ /* $list : Nom de la liste contenant les suffixes du champ */ /* $Methode : String contenant POST ou GET */ /* return : nom du champ si erreur, sinon rien */ /* */ /*==========================================================================================================*/ function CheckBlankSetting2($BlankSETTING, $list, $Methode) {//____________________________________________________________________________________________DEBUT DE LA FONCTION CheckBlankSetting2 if($Methode == 'POST'){ while (list ($key, $val) = each ($BlankSETTING)){ if($val=='1'){ $b = false; foreach ($list as $k) { if ($_POST[$key.$k]!='') $b = true; } if(!$b) return $key; } } }elseif($Methode == 'GET'){ while (list ($key, $val) = each ($BlankSETTING)){ if($val=='1'){ $b = false; foreach ($list as $k) { if ($_GET[$key.$k]!='') $b = true; } if(!$b) return $key; } } } }//____________________________________________________________________________________________FIN DE LA FONCTION CheckBlankSetting2 /*==========================================================================================================*/ /* fonction CheckFile(V1.1) */ /*==========================================================================================================*/ /* */ /* return $ErreurList[] */ /* $ErreurList['Erreur'] = [0] = Ok / [-1] = Vide / [-2] = Taille / [-3] = Type */ /* $ErreurList['TypeFichier'] = type du fichier */ /* $ErreurList['TypeDemander'] = type Mime accepter (liste) */ /* $ErreurList['TypeDemander'] = taille Maximal */ /* $ErreurList['Taille'] = taille du fichier */ /* */ /*==========================================================================================================*/ function CheckFile($UploadedFile, $UploadedFile_type, $UploadedFile_size, $MimeArr, $Size) {//____________________________________________________________________________________________DEBUT DE LA FONCTION CheckFile $ErreurList['Erreur'] = '0'; $ErreurList['TypeFichier'] = $UploadedFile_type; $ErreurList['TypeDemander'] = $MimeArr; $ErreurList['TailleDemander'] = $Size; $ErreurList['Taille'] = $UploadedFile_size; if ($UploadedFile==''){//---- pas ok (Fichier vide) $ErreurList['Erreur'] = '-1'; } if ($UploadedFile_size > $Size){//---- pas ok (taille incorecte) $ErreurList['Erreur'] = '-2'; } // Pas dedans (type increct) if(!in_array($UploadedFile_type,$MimeArr)) $ErreurList['Erreur'] = '-3'; return $ErreurList; }//____________________________________________________________________________________________FIN DE LA FONCTION CheckFile /*==========================================================================================================*/ /* fonction CheckMail(V1.1) */ /*==========================================================================================================*/ /* */ /* */ /* */ /*==========================================================================================================*/ function CheckMail($Email) {//____________________________________________________________________________________________DEBUT DE LA FONCTION CheckMail if (!eregi("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,3})$", $Email)) { $Return='-1'; } else { $Return='1'; } return $Return; }//____________________________________________________________________________________________FIN DE LA FONCTION CheckMail /*==========================================================================================================*/ /* fonction checkLogin(V1.1) */ /*==========================================================================================================*/ /* Vérifie si l'identifiant respecte les conditions minimales. */ /* L'identifiant doit comporter mninmum 1 caractère et ne peut comporter que des lettres ou des chiffres. */ /* */ /* @param String $sLogin l'identifiant. */ /* @return Boolean renvoie true si l'identifiant respecte les critères, false sinon. */ /*==========================================================================================================*/ function checkLogin($sLogin) {//____________________________________________________________________________________________DEBUT DE LA FONCTION checkLogin $sLogin=trim($sLogin); if(! ereg("^[[:alnum:]]+\$", $sLogin)) return false; // minimum 1 caractère alphanumérique else return true; }//____________________________________________________________________________________________FIN DE LA FONCTION checkLogin /*==========================================================================================================*/ /* fonction checkPassword(V1.0) */ /*==========================================================================================================*/ /* Vérifie si le mot de passe respecte les conditions minimales. */ /* Le mot de passe doit comporter de 8 à 20 caractères, avoir au moins une minuscule, une majuscule, */ /* un chiffre et ne peut avoir deux caractères consécutifs identiques. */ /* */ /* @param String $sPassword le mot de passe. */ /* @return Boolean renvoie true si le mot de passe respecte les critères, false sinon. */ /*==========================================================================================================*/ function checkPassword($sPassword) {//____________________________________________________________________________________________DEBUT DE LA FONCTION checkPassword $sPassword=trim($sPassword); if(! ereg("^[[:alnum:]]{6,20}\$", $sPassword)) return false; // uniquement de 6 à 20 caractères alphanumériques elseif(! ereg("[a-z]", $sPassword)) return false; // au moins une minuscule elseif(! ereg("[A-Z]", $sPassword)) return false; // au moins une majuscule elseif(! ereg("[0-9]", $sPassword)) return false; // au moins un chiffre for($i=1; $i
Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 78

Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 82

Notice: Use of undefined constant RACINE - assumed 'RACINE' in /var/storage/vwww/www.rbsps.org/www/becomeMember/becomeMember.php on line 95

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/storage/vwww/www.rbsps.org/www/includes/MY_DATA.PHP:83) in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 2

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/storage/vwww/www.rbsps.org/www/includes/MY_DATA.PHP:83) in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 2

Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 3

Notice: Undefined variable: langue in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 4

Notice: Undefined variable: langue in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 4

Notice: Undefined index: in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 20

Notice: Undefined index: in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 21

Notice: Undefined index: in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 22

Notice: Undefined variable: chirurgien in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 24

Notice: Undefined variable: journalist in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 25

Notice: Undefined index: in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 26

Warning: require(ezc/Base/ezc_bootstrap.php): failed to open stream: No such file or directory in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 34

Fatal error: require(): Failed opening required 'ezc/Base/ezc_bootstrap.php' (include_path='.:/usr/share/php') in /var/storage/vwww/www.rbsps.org/www/requires/config.php on line 34