10 || strlen($Name) < 2 ) { $add_on .= report_err( _t("_NICK_LEAST2", $min_nick, $max_nick) ); $page = 1; } if ( !strcmp($Email,$Email2) && (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,4}$", $Email) || db_arr("SELECT ID FROM aff WHERE UPPER(email) = UPPER('$Email')")) ) { $add_on .= report_err( _t("_EMAIL_INVALID_AFF") ); $page = 1; } if ( !(strlen($Pwd1) >= 4 && strlen($Pwd1) <= 10 && !strcmp($Pwd1,$Pwd2)) ) { $add_on .= report_err( _t("_PWD_INVALID2", $min_passwd, $max_passwd) ); $page = 1; } break; } switch( $page ) { case 2: $page_text = _t( "_JOIN_AFF2", $site['url_aff'], $site['title'] ); break; default: $page_text = _t( "_JOIN1_AFF" ).$add_on; break; } switch ( $page ) { case 2: // new profile creation $cl_values = "INSERT INTO aff SET "; $seed = rand(); $cl_values .= " `seed` = ".$seed; $cl_values .= ", `RegDate` = NOW()"; $cl_values .= ", `Percent` = 10 "; $cl_values .= ", `Status` = 'active' "; $cl_values .= ", `Name` = '$Name' "; $cl_values .= ", `email` = '$Email' "; $cl_values .= ", `Password` = '" . md5( $Pwd1 ) . "' "; $create_result = db_res( $cl_values ); if ($create_result) { $arr = db_arr("SELECT ID FROM aff WHERE `seed` = $seed"); if ( $arr ) db_res("UPDATE aff SET `seed` = 0 WHERE ID = $arr[ID]"); $ID_New_Aff = $arr[ID]; } echo "
"; echo "
$page_text
"; echo "
"._t("_JOIN_AFF_ID",$ID_New_Aff)."
"; break; default: echo "
"; ?>





Security Image



" class="text">
"; return ob_get_clean(); } /** * Print error message */ function report_err( $str ) { return "" . _t( "_Error" ) . ": $str
"; } ?>