예제 #1
0
 function confirm()
 {
     $common = new RUCommon();
     if ($_SERVER['REQUEST_METHOD'] == 'GET') {
         // Get the confirmation ID and email address
         $rand_key_confirm = $_GET['id'];
         $email = $_GET['email'];
         if (empty($_GET['id']) || empty($_GET['email'])) {
             echo '<p>Please enter your details manually, we are experiencing a technical problem</p>';
             global $__FROG_CONN__;
             $registration_settings = "SELECT * FROM " . TABLE_PREFIX . "registered_users_settings WHERE id='1'";
             foreach ($__FROG_CONN__->query($registration_settings) as $row) {
                 $confirmation_page = $row['confirmation_page'];
                 $auth_form = $row['auth_form'];
             }
             echo '<form action="' . URL_PUBLIC . '' . $confirmation_page . '' . URL_SUFFIX . '" method="post">';
             echo $auth_form;
             echo '</form>';
         } else {
             $common->validateaccount($email, $rand_key_confirm);
         }
     } elseif ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $email = mysql_escape_string($_POST['email']);
         $rand_key_confirm = mysql_escape_string($_POST['rand_key']);
         if (empty($_POST['email'])) {
             echo '<p>Please enter your email</p>';
         }
         if (empty($_POST['rand_key'])) {
             echo '<p>Please enter your Authorisation Code</p>';
         } else {
             $common->validateaccount($email, $rand_key_confirm);
         }
     } else {
         global $__FROG_CONN__;
         $registration_settings = "SELECT * FROM " . TABLE_PREFIX . "registered_users_settings WHERE id='1'";
         foreach ($__FROG_CONN__->query($registration_settings) as $row) {
             $confirmation_page = $row['confirmation_page'];
             $auth_form = $row['auth_form'];
         }
         echo '<form action="' . URL_PUBLIC . '' . $confirmation_page . '' . URL_SUFFIX . '" method="post">';
         echo $auth_form;
         echo '</form>';
     }
 }
예제 #2
0
 function confirm()
 {
     $common = new RUCommon();
     $confirmation_page = Plugin::getSetting('confirmation_page', "registered_users");
     if ($_SERVER['REQUEST_METHOD'] == 'GET') {
         if (!isset($_GET['id']) || !isset($_GET['email']) || empty($_GET['id']) || empty($_GET['email'])) {
             echo '<p>Please enter your details manually, we are experiencing a technical problem</p>';
             //$confirmation_page = new View('../../plugins/registered_users/views/confirm');
             //$auth_form = $row['auth_form'];
             $auth_form = new View('../../plugins/registered_users/views/confirm');
             echo '<form action="' . URL_PUBLIC . '' . $confirmation_page . '' . URL_SUFFIX . '" method="post">';
             echo $auth_form;
             echo '</form>';
         } else {
             // Get the confirmation ID and email address
             $rand_key_confirm = $_GET['id'];
             $email = $_GET['email'];
             $common->validateaccount($email, $rand_key_confirm);
         }
     } elseif ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $email = trim($_POST['email']);
         $rand_key_confirm = trim($_POST['rand_key']);
         if (empty($_POST['email'])) {
             echo '<p>Please enter your email</p>';
         }
         if (empty($_POST['rand_key'])) {
             echo '<p>Please enter your Authorisation Code</p>';
         } else {
             $common->validateaccount($email, $rand_key_confirm);
         }
     } else {
         $auth_form = new View('../../plugins/registered_users/views/confirm');
         echo '<form action="' . URL_PUBLIC . '' . $confirmation_page . '' . URL_SUFFIX . '" method="post">';
         echo $auth_form;
         echo '</form>';
     }
 }