예제 #1
0
 function _cron_birthday()
 {
     $this->load->model('user/friend_m');
     $this->load->model('user/user_m');
     $birthdayList = $this->friend_m->birthdayList();
     //print_r($birthdayList);
     $str = "";
     $slug = "JUZ_ALERT_FRIEND_BIRTHDAY";
     $template = $this->module_helper->getTemplateMail($slug);
     $array = array();
     foreach ($birthdayList as $item) {
         //$this->email_sender->juzonSendEmail_JUZ_ALERT_FRIEND_BIRTHDAY($item->id_user);
         $str .= $item->id_user . ",";
         $userdataobj = $this->user_io_m->init('id_user', $item->id_user);
         $userFriends = $this->user_m->getListUserFriendsUserId($userdataobj->id_user);
         foreach ($userFriends as $iduser) {
             $alertuserdata = $this->user_io_m->init('id_user', $iduser);
             $arrayMaker = array('$username1', '$username2', '{$username}', '{$date}', '{$link}');
             $arrayReplace = array($alertuserdata->username, $userdataobj->username, $this->user_m->buildNativeLink($userdataobj->username), birthDay($userdataobj->dob), $this->user_io_m->buildDirectAccessLink($alertuserdata->username, "user/birthdays"));
             $subject = str_replace($arrayMaker, $arrayReplace, $template['subject']);
             $body = str_replace($arrayMaker, $arrayReplace, $template['body']);
             $bodyTEMP = $this->load->view("member/email_templates/common_temp", array('username' => $alertuserdata->username), true);
             $body = str_replace('{###BODY###}', $body, $bodyTEMP);
             $useremailsetting = $this->email_setting_io_m->init($alertuserdata->id_user);
             if ($useremailsetting->bday_confirm == 1 and SENDMAIL != 0) {
                 $array[] = array('to_email' => $alertuserdata->email, 'to_subject' => $subject, 'body' => $body);
             }
         }
     }
     debug($str, "birthday_crontab_daily.txt");
     $this->email_sender->sendMultipleEmailsArray($array);
 }
예제 #2
0
    ?>
								</div>
								<div class="user-profile-location">
									<strong>Location:</strong>
									<?php 
    if ($item->state) {
        echo $item->state . ', ';
    }
    if ($item->country) {
        echo $item->country;
    }
    ?>
								</div>
								<div class="user-profile-birthday">
									<strong>Birthday:</strong> <?php 
    echo birthDay($item->dob);
    ?>
								</div>
								<div class="user-profile-cash">
									<strong>Cash:</strong> <?php 
    echo $this->user_m->getCash($item->id_user);
    ?>
								</div>
							</div>
							
							<?php 
    if ($i % 4 == 0) {
        ?>
								<div class="clear"></div>
							<?php 
    }
예제 #3
0
</label> 
	<div class="inputcls">
		<?php 
    echo form_dropdown($name = 'timezone', timezoneDataOption_ioc(), array($userdataobj->timezone), $extra = " id='timezone' class='account-profile'");
    ?>
	
	</div>
	<div class="clear"></div>
	
	<label><?php 
    echo language_translate('contact_info_label_birthday');
    ?>
</label> 
	<div class="inputcls">
		<input class="account-profile" type="text" name="birthday" id="dob" value="<?php 
    echo birthDay($userdataobj->dob);
    ?>
" />
	</div>
	 
	<div class="clear"></div>
	
	<label>&nbsp;</label> 
	<div class="inputcls">
		<input type="submit" value="<?php 
    echo language_translate('sys_button_title_save');
    ?>
" name="submit" class="share-2" />
		<input type="button" value="<?php 
    echo language_translate('sys_button_title_cancel');
    ?>
예제 #4
0
								<div class="clear"></div> <br/>
								
								<b>Location: </b> 
								<?php 
if ($this->friend_m->isMyFriend($userdataobj->id_user) and notMe($userdataobj->id_user)) {
    echo $userdataobj->city . ', ' . $userdataobj->state . ', ' . $userdataobj->country;
} else {
    echo $userdataobj->country;
}
?>
								
								<div class="clear"></div> <br/>
								
								<?php 
if ($this->friend_m->isMyFriend($userdataobj->id_user) and notMe($userdataobj->id_user)) {
    echo '<b>Birthday:</b> ' . birthDay($userdataobj->dob);
} else {
    echo '<b>Age:</b> ' . cal_age($userdataobj->dob);
}
?>
								
								<div class="clear"></div> <br/>
								
								<?php 
echo '<b>Sex:</b> ' . $userdataobj->gender;
?>
								
								<div class="clear"></div> <br/>
								
								<?php 
if ($userfavoritedata and $userfavoritedata->interested_in) {