예제 #1
0
 /**
  * Private function that emails the user with their activation key
  *
  * @param String $email
  * @param String $firstName
  * @todo add language lines for emails
  */
 private function emailActivation($email, $firstName)
 {
     require_once $this->config->item('swift');
     require_once $this->config->item('swift_smtp');
     require_once $this->config->item('swift_auth');
     $this->load->model('activator');
     $this->activator->generateKey();
     $this->activator->set('email', $email);
     $this->activator->create();
     try {
         $smtp = new Swift_Connection_SMTP("smtp.gmail.com", 465, Swift_Connection_SMTP::ENC_SSL);
         $smtp->setTimeout(10);
         $smtp->setUsername("*****@*****.**");
         $smtp->setPassword("44naughty555");
         $smtp->attachAuthenticator(new Swift_Authenticator_LOGIN());
         $swift = new Swift($smtp, 'exambuff.co.uk');
     } catch (Exception $e) {
         $msg = $e->getMessage();
         log_message('error', $msg);
     }
     $message = new Swift_Message("test", "Dear {$firstName},\n Please go to " . app_base() . 'signup/activate/' . $this->activator->get('activationKey') . ' to finish your activation');
     $swift->send($message, $email, '*****@*****.**');
 }
예제 #2
0
    exit('No direct script access allowed');
}
/**
 * Takes viewData['confirmationIntro'...'confirmationTitle'...'confirmURL'...'cancelURL'...'confirmLabel'...'cancelLabel'
 * 
 * Asks question of user, and displays a confirm and cancel link
 */
?>
<h2><?php 
echo $confirmationTitle;
?>
</h2>
<p><?php 
echo $confirmationIntro;
?>
</p>
<a href="<?php 
echo app_base();
echo $confirmURL;
?>
"><?php 
echo $confirmLabel;
?>
</a><a href="<?php 
echo app_base();
echo $cancelURL;
?>
"><?php 
echo $cancelLabel;
?>
</a>
예제 #3
0
파일: card.php 프로젝트: cybercog/exambuff
echo form_fieldset('Card details');
?>
	<?php 
echo eb_input_text('name', 'Cardholder\'s name', array('value' => @$this->validation->name, 'class' => 'required', 'sublabel' => 'Enter exactly as written on card, with title if present'));
?>
	<?php 
echo eb_input_text('cardnum', 'Card number', array('id' => 'cardnum', 'value' => @$this->validation->cardnum, 'sublabel' => 'With or without spaces', 'class' => 'required'));
?>
	<?php 
echo eb_select('type', 'Card type', array('Maestro' => 'Maestro', 'MasterCard' => 'MasterCard', 'Solo' => 'Solo', 'Switch' => 'Switch', 'Visa' => 'Visa', 'VisaElectron' => 'Visa Electron'), array('id' => 'cardType', 'class' => 'required', 'value' => @$this->validation->type));
?>
	<?php 
echo eb_input_text('secCode', 'Security code', array('class' => 'required', 'value' => @$this->validation->secCode, 'sublabel' => 'Printed on the <a class="inline" href="' . app_base() . 'info/cardsecuritycode">back of your card</a>'));
?>
	<?php 
echo eb_input_text('issueStartDate', 'Issue number / Start date', array('value' => @$this->validation->issueStartDate, 'sublabel' => ' <a class="inline" href="' . app_base() . 'info/switchsolo">Switch/Solo</a> only. No issue number? Please enter start date (mm/yy)'));
?>
	<?php 
echo eb_date('expDate', 'Expiration date', array('class' => 'required', 'id' => 'test', 'MM' => @$this->validation->expDateMM, 'YYYY' => @$this->validation->expDateYYYY));
echo form_fieldset_close();
echo form_fieldset('Address');
?>
	<?php 
echo eb_input_text('address1', 'Adress line one', array('class' => 'required', 'value' => @$this->validation->address1));
?>
	<?php 
echo eb_input_text('address2', 'Adress line two', array('class' => 'required', 'value' => @$this->validation->address2));
?>
	<?php 
echo eb_input_text('town', 'Town, city, hamlet', array('class' => 'required', 'value' => @$this->validation->town));
?>