Example #1
0
<?php

include_once $IDDir . "account.php";
$limit = 10;
$sql = " ORDER BY recordtime DESC LIMIT " . $limit;
$acctDB = new accountData();
$acct = new account();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $acct->set_account($id = ' ', $_POST['account_name'], $_POST['account_email']);
    $acctDB->add_accounts($acct);
}
?>
<html>
<head>
 <!-- <script src="https://code.jquery.com/jquery-1.10.2.js"></script>  -->
  <script language="JavaScript">
function ValidateEmail(mail)   
{  
 if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail))  
  {  
    return (true)  
  }  
    alert("You have entered an invalid email address!")  
    return (false)  
}

function ValidateName(name)  {
	
 if (/^\S+(.)*$/.test(name))  
  {  
    return (true)  
Example #2
0
 public function action_activateAccount()
 {
     $this->STOP_PROPAGATION = true;
     header('Content-Type: text/html; charset=utf-8');
     if (!empty($this->get['id']) && !empty($this->get['activationCode'])) {
         if (accountData::activeAccountData($this->get['id'], $this->get['activationCode'])) {
             echo "<h2>Aktivace účtu proběhla v pořádku.</h2>";
             echo "<small>Tým Půdní služba, VUMOP v.v.i.</small><br><br>";
             echo "<a href='" . \GLOBALVAR\ROOT . "'>do aplikace</a>";
             exit;
         }
     }
     echo "<h2>Litujeme, aktivace účtu se nezdařila.</h2>";
     echo "<p>Kontaktujte správce aplikace.</p>";
     exit;
 }