,
</p>
<p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;margin-bottom:10px;font-weight:normal;font-size:14px;line-height:1.6;" >
    This is to confirm that you have removed your Member access to <?php 
echo $propertyName;
?>
 from your account on <a href="<?php 
echo basePathByHost('/');
?>
">SharedKey.com</a>.
</p>
<p style="margin-top:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;margin-bottom:10px;font-weight:normal;font-size:14px;line-height:1.6;" >
    Since you are the last Member of this account, <?php 
echo $propertyName;
?>
 access will be suspended for all guests and previous members.
    If in future you would like to reactivate your property you can do so by clicking the button below.
</p>
<p class="callout" style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;font-weight:normal;font-size:14px;line-height:1.6;padding-right:30px;padding-left:30px;background-color:#F0F9EC;margin-bottom:50px;text-align:center;padding-top:15px;padding-bottom:15px;margin-right:30px;margin-left:30px;margin-top:50px;" >
    <a href="<?php 
echo $url;
?>
">
        <img src="<?php 
echo basePathByHost('/images/email/btn-reactivate.png');
?>
" width="136" height="41" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;max-width:100%;" />
    </a>
</p>

          <tr>
            <td bgcolor="#695546" style="background-image:url(<?php 
echo basePathByHost("images/email/footer.png");
?>
); background-repeat:repeat-x" height="34" valign="middle"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="narrowtable">
                <tr>
                  <td width="29" align="right" class="social" ><img src="<?php 
echo basePathByHost("images/email/icon-fb.png");
?>
" width="24" height="24"></td>
                  <!--<td width="10" class="slim"></td> -->
                  <td width="61" class="social"><img src="<?php 
echo basePathByHost("images/email/icon-twitter.png");
?>
" width="24" height="24"></td>
                  <td width="527" class="tagline" style="font-size:12px; color:#FFF; line-height:18px; font-family:Arial, Helvetica, sans-serif; font-weight: normal;text-align: right;padding-right:10px;"><img src="<?php 
echo basePathByHost("images/email/tagline.png");
?>
"></td>
                </tr>
              </table></td>
          </tr>
        </table>
        
        <!-- END NEWSLETTER --></td>
    </tr>
  </table>
</div>
</body>
</html>
Beispiel #3
0
 public function actionRemoveproperty($id)
 {
     $userId = Yii::app()->user->getState('id');
     //all users can remove itself from property member's list
     if (!UserAccessTable::checkUser2PropertyAccess($userId, $id, UserAccessTable::GUEST)) {
         Yii::app()->request->redirect(basePath('app/gallery'));
     }
     $user2property = User2property::model()->findByAttributes(array('userId' => $userId, 'propertyId' => $id));
     if ($user2property->getAttribute('access') != UserAccessTable::OWNER) {
         //email to member (NOT admin)
         $this->layout = "emailmaster";
         $body = $this->render("../emails/emailItselfRemove", array('name' => $user2property->user->getAttribute('firstname') . ' ' . $user2property->user->getAttribute('lastname'), 'propertyName' => $user2property->property->getAttribute('property_name')), true);
         MailHelper::send($body, "SharedKey - Removed Property", array($user2property->user->getAttribute('email')));
         //clear calendar events first
         $calendar = new Calendar();
         $calendar = $calendar->findAllByAttributes(array('linkid' => $user2property->getAttribute('id')));
         foreach ($calendar as $cal) {
             $cal->delete();
         }
         //for not property Administrator we just remove a link to property
         $user2property->delete();
         if ($this->_isAllUserPropertiesDeactivated($userId)) {
             //removed last property need remove user
             $this->removeUser($userId);
             return;
         }
         Yii::app()->request->redirect(basePath('app/properties'));
         return;
     }
     //member is administrator we need cancel RecurringPaymentsProfile and deactivate property
     //lets find last transaction
     $transaction = Transaction::model()->findByAttributes(array('userid' => $userId, 'propertyid' => $id));
     if (!$transaction) {
         //no previous transactions not need to refund
     }
     $userApi = sharedkeyApi::create('usersAPI');
     $userEmail = Yii::app()->user->getState('email');
     $userApi->addParams(array('email' => $userEmail));
     $byEmail = json_decode($userApi->byEmail('get'));
     $userData = (array) $byEmail->data;
     $userData['property_id'] = $id;
     //close RecurringPaymentsProfile
     if ($transaction) {
         YII::app()->user->setState("addPropertyEmailed", true);
         $temp = PayPalHelper::cancelRecurringPaymentsProfile($transaction->getAttribute('pp_PROFILEID'), $userData);
     }
     //do deactivated
     $property = Properties::model()->findByPk($id);
     $property->isdeactivated = 1;
     $property->edt = new CDbExpression('NOW()');
     //$property->trialPeriodStartDate = null;
     $property->save();
     $this->layout = "emailmaster";
     //mail to admin
     $token = uniqid();
     $body = $this->render("../emails/emailAdminAfterRemove", array('name' => Yii::app()->user->getState('firstname') . ' ' . Yii::app()->user->getState('lastname'), 'propertyName' => $property->getAttribute('property_name'), 'url' => basePathByHost("/app/changeactiveproperty/" . $property->getAttribute("id")) . '?token=' . $token), true);
     MailHelper::send($body, "SharedKey - Removed Property", array($userEmail));
     //informative other user about property deactivated
     $users2properties = User2property::model()->with('user')->findAll('propertyId=:propertyId', array(':propertyId' => $id));
     foreach ($users2properties as $key => $u2p) {
         if ($u2p->getAttribute('access') == UserAccessTable::OWNER) {
             continue;
         }
     }
     if ($this->_isAllUserPropertiesDeactivated($userId)) {
         $user = User::model()->find('id=:id', array(':id' => $userId));
         $user->verificationToken = $token;
         $user->save();
         $this->redirect(basePath('user/logout'));
         return;
     }
     Yii::app()->request->redirect(basePath('app/properties'));
 }
Beispiel #4
0
                    <tr>
                        <td bgcolor="#695546" style="background-image:url(<?php 
echo basePathByHost('common-email-template/new/img/footer.png');
?>
); background-repeat:repeat-x" height="34" valign="middle"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="narrowtable">
                                <tr>
                                    <td width="29" align="right" class="social" ><img src="<?php 
echo basePathByHost('common-email-template/new/img/icon-fb.png');
?>
" width="24" height="24"></td>
                                    <!--<td width="10" class="slim"></td> -->
                                    <td width="61" class="social"><img src="<?php 
echo basePathByHost('common-email-template/new/img/icon-twitter.png');
?>
" width="24" height="24"></td>
                                    <td width="527" class="tagline" style="padding-right:10px;"><img src="<?php 
echo basePathByHost('common-email-template/new/img/tagline.png');
?>
"></td>
                                </tr>
                            </table></td>
                    </tr>
                </table>

                <!-- END NEWSLETTER --></td>
        </tr>
    </table>
</div>
</body>
</html>
Beispiel #5
0
<!--            <h4 class="mb-15">30 days free. No credit card required.</h4>-->
<!--            <a href="--><?php 
//echo basePath('signup')
?>
<!--" class="button button-green button-large button-bold">Sign Up</a>-->
<!--        </div><!-- container -->
<!--    </section><!-- pre-footer-holder -->

</div><!-- content-holder -->


<script>
    $(function(){
        $('.price-box').on('click',function(){
            document.location.href = '<?php 
echo basePathByHost('signup');
?>
';
        });
    });

    //Bx slider initial
    $('.bxslider').bxSlider({
        mode: 'fade',
        pager: false,
        controls: false,
        auto: true,
        pause: 8000,
        speed: 1200
    });
Beispiel #6
0
                    <p style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #666; line-height: 20px; font-weight: normal; margin-top: 0.8em; margin-right: 0; margin-bottom: 0.8em; margin-left: 0;">
                        This property has been automatically added to your Shared Key account so you can securely visit
                        guest information
                        of <?php 
    echo $data['propertyName'];
    ?>
 online.
                        This includes useful details such as the Map & Directions, Photos, Tourist Information and the
                        Guest Book.
                    </p>

                    <p style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #666; line-height: 20px; font-weight: normal; margin-top: 0.8em; margin-right: 0; margin-bottom: 0.8em; margin-left: 0;">
                        Please use your existing username and password details to access the property at <a
                            href='<?php 
    echo basePathByHost('/');
    ?>
'>SharedKey.com</a>.
                    </p>
                </div>

            <?php 
} else {
    ?>
<p
                    style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #666; line-height: 20px; font-weight: normal; margin-top: 0.8em; margin-right: 0; margin-bottom: 0.8em; margin-left: 0;"><?php 
    echo $data['fromName'];
    ?>
                has provided you with Guest Access to the following property: <?php 
    echo $data['propertyName'];
    ?>
Beispiel #7
0
    text-decoration: none;">
                <a href="#" style="color: #13AECA;
    font-weight: normal;
    text-decoration: underline;">Like us on Facebook</a>
            </p>
        </td>
      </tr>
      <tr>
        <td align="center" valign="top"><!-- BEGIN FOOTER // -->

          <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateFooter" style=" margin-top: 20px;border-collapse: collapse !important;">
            <tr>
              <td valign="top" class="footerContent" style="
              border-collapse: collapse !important;
                background-image: url('<?php 
echo basePathByHost('/emails/img/footer.png');
?>
');
                background-position: center center;
                background-repeat: no-repeat;
                color: #808080;
                font-family: Helvetica;
                font-size: 10px;
                height: 35px;
                line-height: 150%;
                padding: 0;
                text-align: center;
                width: 600px;">&nbsp;</td>
            </tr>
          </table>
Beispiel #8
0
 private function _sendDeactive($user, $obj)
 {
     $body = $this->commandObj->renderFile(Yii::getPathOfAlias('application.commands.trial.emails.deactive') . ".php", array('fullname' => $user->firstname . " " . $user->lastname, 'propertyName' => $obj->property_name, 'propertyUrl' => basePathByHost("property/" . $obj->id), 'propertyLoginUrl' => basePathByHost('?url=property/' . $obj->id)), true);
     $email = $user->email;
     $name = $user->firstname . " " . $user->lastname;
     $this->_mailSend($body, $email, $name, "SharedKey.com - Trial Expired");
 }
                        <td align="center" valign="top">
                            <!--------------------------------------------------------------------------- BEGIN CONTENT // ------------------------------------------------------------------------->

                            <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateBody">
                                <tr>
                                    <td valign="top" class="bodyContent" mc:edit="body_content00">
                                        <!-------------------------------------------------------------Begin Dynamic content------------------------------------------------------------------------>
                                        <?php 
echo $content;
?>
                                        <!-------------------------------------------------------------End Dynamic content-------------------------------------------------------------------------->
                                        <p>&nbsp;</p>
                                        <p>Thank you, <br />
                                            SharedKey Team</p>
                                        <p class="bodyContentSmall"><img src="<?php 
echo basePathByHost('/emails/img/icon-fb.png');
?>
" width="20" height="20" align="absmiddle" /> <a href="#">Like us on Facebook</a></p></td>
                                </tr>
                            </table>

                            <!--------------------------------------------------------------------------- // END CONTENT --------------------------------------------------------------------------->
                        </td>
                    </tr>
                    <tr>
                        <td align="center" valign="top"><!-- BEGIN FOOTER // -->

                            <table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateFooter">
                                <tr>
                                    <td valign="top" class="footerContent">&nbsp;</td>
                                </tr>
Beispiel #10
0
<p style="margin-left: 0;font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #666; line-height: 20px; font-weight: normal; margin-top: 0.8em; margin-right: 0; margin-bottom: 0.8em;">
    Hi <?php 
echo $fullname;
?>
,
</p>
<p style="margin-left: 0;font-family: Arial, Helvetica, sans-serif; font-size: 14px; color: #666; line-height: 20px; font-weight: normal; margin-top: 0.8em; margin-right: 0; margin-bottom: 0.8em;">
    We received your request to reset your password. Please click on the button below and this will
    take you to your account details where you can set your new password.
</p>

<p>&nbsp;</p>
<table border="0" align="center" cellpadding="0" cellspacing="0" class="widetable">
    <tr>
        <td bgcolor="#EFF8EB" width="570">
            <div align="center" style="padding-top:15px; padding-bottom:15px; margin-bottom:0;">
                <a href="<?php 
echo basePathByHost("?token={$token}");
?>
">
                    <img src="<?php 
echo basePathByHost('images/email/btn-changepassword.png');
?>
">
                </a>
            </div>
        </td>
    </tr>
</table>
Beispiel #11
0
 public function actionEmail($email = '*****@*****.**', $page = 0)
 {
     $name = 'Test Name';
     $name2 = 'Test2 Name2';
     $propertyName = 'Property Test Name';
     $email2 = '*****@*****.**';
     $password = '******';
     $eventName = 'Event Test Name';
     $date1 = mktime(0, 0, 0, 7, 1, 2000);
     $date2 = mktime(0, 0, 0, 7, 11, 2010);
     $testMessage = 'Test Message bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla';
     $this->layout = "emailmaster";
     if ($page == 0) {
         $emailBody = $this->render('../emails/emailContactAs', array('data' => array('email' => $email, 'name' => $name, 'message' => $testMessage)), true);
         MailHelper::send($emailBody, "Example 1. SharedKey.com - Contact Us - " . $name, array($email), "SharedKey.com", array($email));
         $body = $this->render('../emails/emailCalendar', array('fullname' => $name, 'property' => $propertyName, 'start' => date('F d, Y', $date1), 'end' => date('F d, Y', $date2), 'event' => $eventName, 'message' => $testMessage, 'action' => 'Update'), true);
         MailHelper::send($body, "Example 2. SharedKey.com - " . $this->propertyName . " - Updated  Calendar Event", array($email));
         $body = $this->render('../emails/emailCalendar', array('fullname' => $name, 'property' => $propertyName, 'start' => date('F d, Y', $date1), 'end' => date('F d, Y', $date2), 'event' => $eventName, 'message' => $testMessage, 'action' => 'New'), true);
         MailHelper::send($body, "Example 3. SharedKey - " . $this->propertyName . " - New  Calendar Event", array($email));
         $body = $this->render('../emails/emailCalendar', array('fullname' => $name, 'property' => $propertyName, 'start' => date('F d, Y', $date1), 'end' => date('F d, Y', $date2), 'event' => $eventName, 'message' => $testMessage, 'action' => 'Deleted'), true);
         MailHelper::send($body, "Example 4. SharedKey.com - " . $this->propertyName . " - Deleted  Calendar Event", array($email));
         $body = $this->render("../emails/emailAdminAfterRemove", array('name' => $name, 'propertyName' => $propertyName, 'url' => basePathByHost("/app/changeactiveproperty/99999999")), true);
         MailHelper::send($body, "Example 5. SharedKey - Removed Property", array($email));
     }
     if ($page == 1) {
         $action = "Updated";
         $emailBody = $this->render('../emails/emailHouseRule', array('data' => array('fullname' => $name, 'property' => $propertyName, 'text' => $testMessage, 'title' => 'Title Update', 'action' => $action)), true);
         MailHelper::send($emailBody, "Example 6. SharedKey.com - {$propertyName} - {$action} House Rules", array($email));
         $action = "New";
         $emailBody = $this->render('../emails/emailHouseRule', array('data' => array('fullname' => $name, 'property' => $propertyName, 'text' => $testMessage, 'title' => 'Title New', 'action' => $action)), true);
         MailHelper::send($emailBody, "Example 7. SharedKey.com - {$propertyName} - {$action} House Rules", array($email));
         //invite new member guest controller
         $newUserEmailBody = $this->renderPartial('../emails/emailInviteNewMember', array('userFullName' => $name, 'senderFullName' => $name2, 'propertyName' => $propertyName, 'email' => $email2, 'access' => UserAccessTable::accessLevelToString(UserAccessTable::GUEST), 'password' => $password, 'url' => basePathByHost('/')), true);
         $ddd = new DateTime('2000-01-01');
         $inviteEmail = $this->render('../emails/emailInvite', array('data' => array('fromName' => $name, 'propertyName' => $propertyName, 'from' => '-', 'to' => $ddd->format('F j, Y'), 'access' => UserAccessTable::accessLevelToString(UserAccessTable::GUEST), 'event' => $eventName, 'message' => $testMessage, 'toUser' => $name2, 'newUserBody' => $newUserEmailBody)), true);
         MailHelper::send($inviteEmail, "Sharedkey.com - Invitation to " . $propertyName, array($email), "SharedKey.com", array($email));
         $emailBody = $this->render('../emails/emailInviteMember', array('userFullName' => $name, 'senderFullName' => $name2, 'propertyName' => $propertyName, 'access' => UserAccessTable::accessLevelToString(UserAccessTable::BASIC_ACCESS)), true);
         MailHelper::send($emailBody, "Example 9. SharedKey.com - New Property Added to Your Account", array($email));
         $emailBody = $this->render('../emails/emailInviteNewMember', array('userFullName' => $name, 'senderFullName' => $name2, 'propertyName' => $propertyName, 'email' => $email2, 'access' => UserAccessTable::accessLevelToString(UserAccessTable::FULL_ACCESS), 'password' => $password), true);
         MailHelper::send($emailBody, "Example 10. Sharedkey.com - Invitation to " . $propertyName, array($email));
     }
     if ($page == 2) {
         $body = $this->render("../emails/emailItselfRemove", array('name' => $name, 'propertyName' => $propertyName), true);
         MailHelper::send($body, "Example 11. SharedKey - Removed Property", array($email));
         $action = "Updated";
         $emailBody = $this->render('../emails/emailNoticeboard', array('data' => array('fullname' => $name, 'property' => $propertyName, 'text' => $testMessage, 'title' => 'Title Update', 'action' => $action)), true);
         MailHelper::send($emailBody, "Example 12. SharedKey.com - {$propertyName} - {$action} Notice Board Entry", array($email));
         $action = "New";
         $emailBody = $this->render('../emails/emailNoticeboard', array('data' => array('fullname' => $name, 'property' => $propertyName, 'text' => $testMessage, 'title' => 'Title New', 'action' => $action)), true);
         MailHelper::send($emailBody, "Example 13. SharedKey.com - {$propertyName} - {$action} Notice Board Entry", array($email));
         $body = $this->render('../emails/forgotemail', array('fullname' => $name, 'token' => 'secrettokken', 'url' => Yii::app()->params['domain']), true);
         MailHelper::send($body, "Example 14. SharedKey Password Reset", array($email));
         $emailBody = $this->render("../emails/newPropertyEmail", array('fullname' => $name, 'propName' => $propertyName, 'reneweDate' => date('F m, Y', strtotime('+1 year'))), true);
         MailHelper::send($emailBody, "Example 15. SharedKey.com - New Property Added to Your Account", array($email));
     }
     if ($page == 3) {
         $message = $this->render('../emails/newuseremail', array('token' => 'sicrettoken', 'url' => Yii::app()->params['domain'] . '/activeuser', 'email' => $email2, 'password' => $password, 'fullname' => $name), true);
         MailHelper::send($message, "Example 16. Welcome to SharedKey", array($email));
         $body = Yii::app()->controller->renderFile(Yii::getPathOfAlias('application.modules.site.views.emails.renew_success') . ".php", array('fullname' => $name, 'propName' => $propertyName, 'reneweDate' => $date1), true);
         MailHelper::send($body, "Example 17. SharedKey.com - Subscription Confirmed", array($email));
     }
     echo 'All emails sent to: ' . $email . ' page is: ' . $page;
 }
Beispiel #12
0
MailTextHelper::simpleText("Password:"******"center" style="padding-top: 15px;"><a href="<?php 
echo $url;
?>
" style="background-image: url(<?php 
echo basePathByHost('/images/email/btn-view-prop.png');
?>
) ;background-repeat: no-repeat;width: 156px;height: 35px;max-width: 100%;display: inline-block;"></a></td>
            </tr>
        </table>

        <div style="margin-top: 145px;"></div>
 
        <?php 
MailTextHelper::simpleText("Thank You,<br>SharedKey Team");
?>

 
    </div>
</div>
 public function actionInvite()
 {
     $newEvents = array();
     $propertyId = Yii::app()->user->getState('propertyId');
     if (isset($_POST['propId'])) {
         if (is_numeric($_POST['propId'])) {
             $propertyId = $_POST['propId'];
         }
     }
     if (!Yii::app()->request->isPostRequest) {
         echo json_encode(array('status' => 0, 'message' => 'Only Post request are allowed.'));
         die;
     }
     if (!UserAccessTable::checkUser2PropertyAccess(Yii::app()->user->getState('id'), $propertyId, UserAccessTable::BASIC_ACCESS)) {
         echo json_encode(array('status' => 0, 'message' => 'You can not do this action.'));
         die;
     }
     //check login
     if (Yii::app()->user->isGuest) {
         echo json_encode(array('status' => 0, 'message' => 'Please login.'));
         die;
     }
     if (!UserAccessTable::checkUser2PropertyAccess(Yii::app()->user->getState('id'), $propertyId, UserAccessTable::BASIC_ACCESS)) {
         echo json_encode(array('status' => 0, 'message' => 'You can not do this action.'));
         die;
     }
     $property = Properties::model()->findByPk($propertyId);
     $model = new InviteGuest();
     $model->setAttributes($_POST);
     //create user 2 property tables
     $u2propertyes = array();
     foreach ($model->emails as $key => $value) {
         $u2p = new User2property();
         $user = User::model()->findByAttributes(array('email' => $value));
         $newUserEmailBody = "";
         if ($user == null) {
             //need create new user
             if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
                 continue;
             }
             $user = $this->createGuestUser($value, $model->names[$key], $propertyId);
             $this->layout = "emailmaster";
             $newUserEmailBody = $this->renderPartial('../emails/emailInviteNewGuest', array('userFullName' => $user->getAttribute('firstname') . ' ' . $user->getAttribute('lastname'), 'senderFullName' => Yii::app()->user->getState('firstname') . ' ' . Yii::app()->user->getState('lastname'), 'propertyName' => $property->getAttribute('property_name'), 'email' => $user->getAttribute('email'), 'access' => UserAccessTable::accessLevelToString(UserAccessTable::GUEST), 'password' => $user->getAttribute('password'), 'url' => basePathByHost('/')), true);
             // MailHelper::send($newUserEmailBody, "SharedKey.com - New Member Account", array($user->getAttribute('email')));
         } else {
             //we can use exist user
         }
         $checku2p = User2property::model()->findByAttributes(array('propertyId' => $propertyId, 'userId' => $user->getAttribute('id')));
         if ($checku2p != null) {
             echo json_encode(array('status' => 0, 'message' => 'User is already a member of this property.'));
             die;
         }
         $u2p->propertyId = $propertyId;
         $u2p->userId = $user->getAttribute('id');
         $u2p->access = UserAccessTable::GUEST;
         $u2p->status = UserAccessTable::STATUS_ACTIVE;
         $u2p->inviteDate = date('Y-m-d h:i:s');
         $fromDate = null;
         if (!empty($model->from)) {
             $fromDate = new DateTime($model->from);
             $u2p->fromDate = $fromDate->format('Y-m-d h:i:s');
         } else {
             $u2p->fromDate = null;
         }
         $toDate = null;
         if (!empty($model->to)) {
             $toDate = new DateTime($model->to);
             $u2p->toDate = $toDate->format('Y-m-d h:i:s');
         } else {
             $u2p->toDate = null;
         }
         $u2p->inviteUserId = Yii::app()->user->getState('id');
         $u2p->color = 'type13';
         $u2p->bookingName = $model->names[$key];
         $u2p->save();
         $this->layout = "emailmaster";
         $inviteEmail = $this->render('../emails/emailInvite', array('data' => array('fromName' => Yii::app()->user->getState('firstname') . ' ' . Yii::app()->user->getState('lastname'), 'propertyName' => $property->getAttribute('property_name'), 'from' => isset($fromDate) ? $fromDate->format('F j, Y') : '-', 'to' => isset($toDate) ? $toDate->format('F j, Y') : '-', 'access' => UserAccessTable::accessLevelToString(UserAccessTable::GUEST), 'event' => $model->event, 'message' => nl2br($model->message), 'toUser' => $user->getAttribute('firstname') . ' ' . $user->getAttribute('lastname'), 'newUserBody' => $newUserEmailBody)), true);
         MailHelper::send($inviteEmail, "Sharedkey.com - Invitation to " . $property->getAttribute('property_name'), array($user->getAttribute('email')), "SharedKey.com", array(Yii::app()->user->getState('email')));
         $u2propertyes[$key] = $u2p;
         $username = $model->names[$key];
         $calendarEvent = new Calendar();
         $calendarEvent->create_date = $u2p->fromDate;
         $calendarEvent->end_date = $u2p->toDate;
         $calendarEvent->event = $_POST['event'];
         $calendarEvent->propertyid = $u2p->propertyId;
         $calendarEvent->notes = $model->message;
         $calendarEvent->linkid = $this->linkWithProperty->id;
         $calendarEvent->isguest = true;
         $calendarEvent->guestid = $u2p->userId;
         $calendarEvent->guestname = $model->names[$key];
         $result = $calendarEvent->save();
         $outputEvent = array("result" => true, "data" => (array) $calendarEvent->getAttributes(), "event" => $calendarEvent->event);
         $outputEvent['data']['link'] = (array) $u2p->getAttributes();
         array_push($newEvents, $outputEvent);
     }
     $users = array();
     foreach ($u2propertyes as $key => $u2p) {
         $users[$key] = $this->createViewItem($u2p);
     }
     echo json_encode(array('status' => 1, 'users' => $users, 'events' => $newEvents));
     die;
 }
Beispiel #14
0
<div style="margin-left:20px;"> <?php 
echo $content;
?>
</div>
<table class="social"  width="100%" style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;background-image:url(<?php 
echo basePathByHost('/images/email/footer.png');
?>
);background-repeat:no-repeat;width:100%;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px;padding-top:0px;padding-bottom:0px;padding-right:0px;padding-left:0px;" >
<tr background="<?php 
echo basePathByHost('/images/email/footer.png');
?>
" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;" >
<td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;" ><table align="left" class="column2" style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px;padding-top:0px;padding-bottom:0px;padding-right:0px;padding-left:0px;width:200px;min-width:80px;float:right;" >
<tr style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;" >
<td align="right" style="font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px;padding-top:0px;padding-right:8px;padding-bottom:0px;padding-left:5px;vertical-align:middle;" ><img src="<?php 
echo basePathByHost('/images/email/tagline.png');
?>
" width="179" height="25" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;max-width:100%;" /></td>
                      </tr>
                    </table>
                    <span class="clear" style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;display:block;clear:both;" ></span></td>
                </tr>
              </table></td>
          </tr>
        </table>
      </div></td>
    <td style="margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;font-family:'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;" ></td>
  </tr>
</table>
</body>
</html>