Contact Administrator by email you got invitation from
or try enter data again
You could be already registered ?"); while($row5 = mysqli_fetch_array($result5)){ echo "" . $row5['email'] . " - hash - " . $row5['hash'] . "
"; } echo "
"; // Now real processing echo "
"; // seems this is the best as per https://stackoverflow.com/questions/2593807/md5uniqid-makes-sense-for-random-unique-tokens // $mkthash = bin2hex(openssl_random_pseudo_bytes(32)); // echo $mkthash ; // echo "
"; $fixip = $_SERVER["REMOTE_ADDR"]; // echo $fixip ; // echo "
"; // $fixip = "188.112.157.218"; $sql = "INSERT INTO mkt.000_visits_count (ip,DateVisit) VALUES ('$fixip',NOW())"; $result = mysqli_query($con1,$sql); $sql="SELECT COUNT(*) var1 FROM mkt.000_visits_count WHERE ip='$fixip'"; $result = mysqli_query($con1,$sql); $row1 = mysqli_fetch_assoc($result); if ($row1['var1'] < 50) { echo "
This page allows only 2 visits per IP a day for safety reasons. This is your " . $row1['var1'] . " visit.
"; echo "Thank you '.$ip.'Your data confirmed.
';
// echo 'Data submitted - see result below.';
}
// echo "";
?>
"; $firstname = 'FirstName'; $lastname = 'LastName'; $pass = generateRandomString(); $activ = activRandomString(); // You MUST create a temporary username and do not use EMAIL for sudden accident - the command below if set 5 - gives 10chars temp username $tuname = bin2hex(openssl_random_pseudo_bytes(5)); // $tuname = '8test8'; // echo "Pass
"; // echo $pass ; // echo "
"; // echo "Activ=Salt
"; // echo $activ ; // echo "
"; // echo "But how turn pass to long - Specific for Joomla as described
"; // https://stackoverflow.com/questions/10428126/joomla-password-encryption $crypt=md5($pass.$activ); // echo $crypt ; // echo "
"; $password = $crypt . ':' . $activ; // echo "
"; // echo $password ; // INSERT_USER $sql = "INSERT INTO apcom.apncl_users (name,username,email,password,registerDate,activation,params,requireReset,unihash,credits,regway) VALUES ('$firstname $lastname','$tuname','$email','$password',NOW(),'$activ','{}','1','$hash','5','1')"; // $result = mysqli_query($con1,$sql); // https://www.yahoobaba.net/php/php-mysqli-error-functions $result = mysqli_query($con1,$sql) or die("Query Unsuccessful : " . mysqli_error($con1) . "
Contact Administrator by email you got invitation from
or try enter data again
You could be already registered ?"); // GET USER ID $sql4="SELECT id FROM apcom.apncl_users WHERE unihash = '$hash' "; $result4 = mysqli_query($con1,$sql4); $row4 = mysqli_fetch_assoc($result4); $userid = $row4["id"]; // SET Registration Level $sql = "INSERT INTO apcom.apncl_user_usergroup_map (user_id,group_id) VALUES ('$userid','2')" ; $result = mysqli_query($con1,$sql) or die("Query Unsuccessful : " . mysqli_error($con1) . "
Contact Administrator by email you got invitation from
or try enter data again
You could be already registered ?"); // INSERT to CB Comprofiler $sql = "INSERT INTO apcom.apncl_comprofiler (id,user_id,firstname,lastname,avatarapproved,canvasapproved,canvasposition,approved,confirmed) VALUES ('$userid','$userid','$firstname','$lastname','1','1','50','1','1')"; $result = mysqli_query($con1,$sql) or die("Query Unsuccessful : " . mysqli_error($con1) . "
Contact Administrator by email you got invitation from
or try enter data again
You could be already registered ?"); // HERE IF PARTNER LEVEL - but HM...you must separate from USUAL users...but then table must have my programid // GET PARTNER LEVEL $sql2="SELECT partner FROM mkt.$tablename WHERE hash='".$hash."' "; $result2 = mysqli_query($con1,$sql2); $row14 = mysqli_fetch_assoc($result2); if ($row14['partner'] > 0) { // echo "Has Partner Level
"; // GET PROGRAMID $sql6="SELECT pid FROM mkt.$tablename WHERE hash='".$hash."' "; $result6 = mysqli_query($con1,$sql6); $row6 = mysqli_fetch_assoc($result6); $pid = $row6["pid"]; // NOW SELECT FROM Clients data for ClientsAP $sql7="SELECT status FROM altumdata.clients WHERE programid='".$pid."' "; $result7 = mysqli_query($con1,$sql7); $row7 = mysqli_fetch_assoc($result7); $clstatus = $row7["status"]; $sql8="SELECT afflink FROM altumdata.clients WHERE programid='".$pid."' "; $result8 = mysqli_query($con1,$sql8); $row8 = mysqli_fetch_assoc($result8); $afflink = $row8["afflink"]; $sql9="SELECT web FROM altumdata.clients WHERE programid='".$pid."' "; $result9 = mysqli_query($con1,$sql9); $row9 = mysqli_fetch_assoc($result9); $web = $row9["web"]; $sql10="SELECT platform FROM altumdata.clients WHERE programid='".$pid."' "; $result10 = mysqli_query($con1,$sql10); $row10 = mysqli_fetch_assoc($result10); $platform = $row10["platform"]; $sql11="SELECT pltfname FROM altumdata.clients WHERE programid='".$pid."' "; $result11 = mysqli_query($con1,$sql11); $row11 = mysqli_fetch_assoc($result11); $pltfname = $row11["pltfname"]; $sql12="SELECT rrd FROM altumdata.clients WHERE programid='".$pid."' "; $result12 = mysqli_query($con1,$sql12); $row12 = mysqli_fetch_assoc($result12); $rrd = $row12["rrd"]; $sql13="SELECT pidonly FROM altumdata.clients WHERE programid='".$pid."' "; $result13 = mysqli_query($con1,$sql13); $row13 = mysqli_fetch_assoc($result13); $pidonly = $row13["pidonly"]; // ADD Partner Level $sql = "INSERT INTO apcom.apncl_user_usergroup_map (user_id,group_id) VALUES ('$userid','11')" ; $result = mysqli_query($con1,$sql) or die("Query Unsuccessful : " . mysqli_error($con1) . "
Contact Administrator by email you got invitation from
or try enter data again
You could be already registered ?"); // ADD Partner details to ClientsAP $sql = "INSERT INTO apcom.clientsap (status,registered,afflink,email,web,platform,pltfname,rrd,programid,pidonly,confirmed,userid) VALUES ('$clstatus',NOW(),'$afflink','$email','$web','$platform','$pltfname','$rrd','$pid','$pidonly','3','$userid')" ; $result = mysqli_query($con1,$sql) or die("Query Unsuccessful : " . mysqli_error($con1) . "
Contact Administrator by email you got invitation from
or try enter data again
You could be already registered ?"); // INSERT INTO apcom.clientsap (status,registered,afflink,email,web,platform,pltfname,rrd,programid,pidonly,confirmed,userid) SELECT '$status','$registered','$afflink','$email','$web','$platform','$pltfname','$rrd','$programid','$pidonly','3','$tid'; // ADD Redirect $sql = "INSERT INTO apcom.apncl_redj_redirects (fromurl,tourl,redirect,case_sensitive,request_only,decode_url,error_only,comment,published,checked_out,pid) VALUES ('https://altumprime.com/services/$pid.html','$afflink','200','0','0','0','1','$userid','1','0','rsdpart')" ; $result = mysqli_query($con1,$sql) or die("Query Unsuccessful : " . mysqli_error($con1) . "
Contact Administrator by email you got invitation from
or try enter data again
You could be already registered ?"); // INSERT INTO apcom.apncl_redj_redirects (fromurl,tourl,redirect,case_sensitive,request_only,decode_url,error_only,comment,published,checked_out,pid) SELECT 'https://altumprime.com/services/$programid.html','$afflink','200','0','0','0','1','$tid','1','0','rsdpart' ; // echo "
"; } // Now you MUST set status = 2 to MKT table to disallow new using - but for the test purposes in the beggining you MUST recreate table like mktest02 $sql7="UPDATE mkt.19002_mytest_table SET status = '2' WHERE hash = '$hash' "; $result7 = mysqli_query($con1,$sql7); echo 'Congratulations, you are registered with the following data
' ; echo "Temporary Username - $tuname
" ; // echo "UserId - $userid
" ; // echo "Temporary Password - $pass
" ; echo "Login data pre-entered below and also sent to email $email
(make sure to check spam/junk folder)
You can enter first time right now from here.
Just copy existing temporary password
$pass
because you will need the one right after login to validate the registration.
" ; echo "{module 232}"; // not necessary it done by CB SQ: Auto Actions // $sql = "INSERT INTO apcom.apncl_rsdirectory_users (user_id,credits,unlimited_credits,enable_contact_form) VALUES ('$userid','5','0','0')"; // $result = mysqli_query($con1,$sql); // MAIL USER - 2024-06-11 22-09 now try with PHPMail use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'mktx/vendor/autoload.php'; $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = "altumprime.com"; $mail->SMTPAuth = true; $mail->Username = "team"; $mail->Password = "Teamsvet17"; $mail->SMTPAutoTLS = false; $mail->CharSet = "utf-8"; $mail->Port = 587; $mail->setFrom("Team@altumprime.com", "Service"); $mail->addAddress($email); $mail->ContentType = "text/plain"; $mail->Subject = "Registration confirmed"; $mail->Body = "Hello,\nRegistration confirmed for\nEmail: $email\nwith temporary username\n$tuname\nand temporary onetime password:\n$pass\nMessage:\nYou are registered.\nPlease sign in at https://altumprime.com to change your one-time password as soon as possible.\nYour AltumPrime" ; $mail->send(); } catch (Exception $e) { // echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo} --------------------------------------------------------------------------------------------------\r\n"; // echo "Message could not be sent. Mailer Error"; } } else { echo "
"; echo "Sorry such data does not exist in our database.
Registration is impossible."; } } else { echo "
You have reached maximum 2 visits a day.
Please come back tomorrow because next visits will cause redirect to warning.
This is your " . $row1['var1'] . " visit.
"; echo ''; } else { // enable header when production and disable relating to truncate echo "SelfTruncate visits table while testing"; $sql="TRUNCATE TABLE mkt.000_visits_count"; $result = mysqli_query($con1,$sql); echo ''; // header("location:https://altumprime.com/warning"); // redirects to warning page } echo ""; // below script to insert data into Login Form mysqli_close($con1); ?> {/source}
