/** * Store a newly created resource in storage. * * @return Response */ public function store() { $account = new Account(); $account->setDomain(Input::get('domain')); $account->setNit(Input::get('nit')); $account->setName(Input::get('name')); $account->setEmail(Input::get('email')); // return $account->getErrorMessage(); if ($account->Guardar()) { //redireccionar con el mensaje a la siguiente vista Session::flash('mensaje', $account->getErrorMessage()); $direccion = "http://" . $account->domain . ".emizor.com"; //enviando correo de bienvenida global $correo; $correo = $account->getEmail(); // return Response::json($correo); Mail::send('emails.bienvenida', array('direccion' => $direccion, 'name' => $account->getName(), 'nit' => $account->getNit()), function ($message) { global $correo; $message->to($correo, '')->subject('Emizor'); }); // // $direccion = "/crear/sucursal"; return Redirect::to($direccion); } Session::flash('error', $account->getErrorMessage()); return Redirect::to('crear'); }
protected function login(array $params) { $this->__default($params); $smarty = SmailSmarty::getInstance(); if (!(isset($params['name']) && isset($params['password']))) { $smarty->assign('LOGIN_ERRORS', 1); } else { $account = new Account($params['name'], $params['password']); if ($account->exists()) { $_SESSION['account'] = $account->getName(); header('Location: ' . WEBDIR . 'Profil'); } else { $smarty->assign('LOGIN_ERRORS', 1); } } }
echo $msg->inbox_id; ?> " <?php echo $cssclass; ?> > <td class="small-col"><?php echo $isDelivered; ?> </td> <td class="small-col"><?php echo $isCB; ?> </td> <td class="name"><?php echo $acc->getName(); ?> </td> <td class="subject"> <p><?php echo stripslashes($msg->inbox_judul); ?> </p> </td> <td class="subject"> <?php echo substr(stripslashes(strip_tags($msg->inbox_msg)), 0, 30); ?> .. </td> <td class="time"><?php
<?php include_once '../../php/config.php'; include_once '../../php/ajax.php'; include_once '../../php/class-account.php'; sec_session_start(); if (isset($_SESSION['xcp_id'], $_SESSION['cipher']) && $_SESSION['xcp_id'] == hash('sha512', $_SESSION['cipher'], $_SERVER['HTTP_USER_AGENT'])) { $account = new Account($_SESSION['account_id']); $title = $account->getName() . ' Amoritzation Schedule'; include_once '../../php/xcp-head.php'; ?> <body> <h2><?php echo ucwords($account->getName() . ' ' . getAccountType($account->getType())); ?> </h2> <table id="amort" width="100%"> <thead> <th>Payment</th> <th>Payment Date</th> <th>Payment Amount</th> <th>Interest Portion</th> <th>Other Charges</th> <th>Prinicpal Portion</th> <th>Prinicpal Balance</th> </thead> <tbody> <?php foreach ($data as $key => $payment) { ?>
/** * Sets an order-address by data provided by contact-address. * If order-address does not exist a new one is created. * * @param Address $address * @param null|ContactInterface $contact * @param null|Account $account * @param null|OrderAddressInterface $orderAddress * * @return OrderAddressInterface */ public function getAndSetOrderAddressByContactAddress(Address $address, $contact = null, $account = null, $orderAddress = null) { if (!$orderAddress) { $orderAddress = new static::$orderAddressEntity(); } $orderAddress->setStreet($address->getStreet()); $orderAddress->setNumber($address->getNumber()); $orderAddress->setAddition($address->getAddition()); $orderAddress->setCity($address->getCity()); $orderAddress->setZip($address->getZip()); $orderAddress->setState($address->getState()); $orderAddress->setCountry($address->getCountry()->getName()); $orderAddress->setPostboxCity($address->getPostboxCity()); $orderAddress->setPostboxPostcode($address->getPostboxPostcode()); $orderAddress->setPostboxNumber($address->getPostboxNumber()); $orderAddress->setContactAddress($address); $orderAddress->setNote($address->getNote()); // add account data if ($account) { $orderAddress->setAccountName($account->getName()); $orderAddress->setUid($account->getUid()); } if ($contact) { if ($contact->getTitle()) { $orderAddress->setTitle($contact->getTitle()->getTitle()); } $orderAddress->setSalutation($contact->getSalutation()); $orderAddress->setFormOfAddress($contact->getFormOfAddress()); $orderAddress->setFirstName($contact->getFirstName()); $orderAddress->setLastName($contact->getLastName()); $orderAddress->setEmail($contact->getMainEmail()); $orderAddress->setPhone($contact->getMainPhone()); } return $orderAddress; }
/** * Invite user * Based on simple form. * * @param User $user * @param Account $account * @param string $invitation_token */ public static function invite($user, $account, $invitation_token) { $data = ['url' => Config::get('oastack::invite_url') . '/' . $invitation_token, 'account' => $account->getName()]; Mail::send('oastack::emails.invitation', $data, function ($message) use($user) { $message->to($user->getEmail(), $user->getFullName())->subject(trans('oastack::emails.invite.subject')); }); }
public function __construct($group, Account $account) { $this->name = $group; $this->account = $account->getName(); $this->checkForExist(); }
public function sendGallery() { $acc_id = isset($_GET['acc_id']) ? addslashes($_GET['acc_id']) : die('ACC id empty'); $acc = new Account(); $acc->getByID($acc_id); //pr($acc_id); ?> <h1><?php echo $acc->getName(); ?> 's <?php echo Lang::t('Gallery'); ?> </h1> <?php //global $c__Fotoajax; $c__Fotoajax->attachment($id,"sendGallery"); $targetClass = "Account"; $fotoweb = new Fotoweb(); $fotoweb->attachment($acc_id, $targetClass); }