• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vlang函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vlang函数的典型用法代码示例。如果您正苦于以下问题:PHP vlang函数的具体用法?PHP vlang怎么用?PHP vlang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了vlang函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: index

	function index()
	{
		$data['theme'] = $this->options->get('theme');
		$data['title'] = $this->lang->line('support_title');
		$data['body'] = '';
		$data['user'] = $this->users->get_by_id($this->users->id());
		$data['user_balance'] = $data['balance'] = $this->user_funds->user_balance($this->users->id());

		//process new contact form submission
		$this->form_validation->set_rules('name', 'Name', 'required|xss_clean|max_length[128]');
		$this->form_validation->set_rules('email', 'Email', 'required|xss_clean|valid_email|max_length[256]');
		$this->form_validation->set_rules('phone', 'Phone #', 'required|xss_clean|max_length[50]');
		$this->form_validation->set_rules('subject', 'Subject','required|xss_clean|max_length[256]');
		$this->form_validation->set_rules('message', 'Message', 'required|xss_clean|max_length[2000]');
		
		if ($this->form_validation->run() == FALSE){		
		}else{
			//email message
			$email_data['name'] = $this->input->post('name');
			$email_data['email'] = $this->input->post('email');
			$email_data['phone'] = $this->input->post('phone');
			$email_data['message'] = $this->input->post('message');
			$subject = 'Support: '.$this->input->post('subject');
			$db_data=$email_data;
			$db_data['message']=htmlspecialchars($this->input->post('message'));
			$db_data['subject']=htmlspecialchars($this->input->post('subject'));
			$ticket_id=$this->support_tickets->add_new($db_data);
			$this->users->send_admin_email($email_data['email'],$subject,'support_ticket',$email_data);
			$this->session->set_flashdata('success', vlang('support_thanks'));
			redirect('support');
		}
		
		$this->load->view($data['theme'].'/support', $data);
	}
开发者ID:bmfelix,项目名称:number1draft,代码行数:34,代码来源:support.php


示例2: index

	function index()
	{
		$data['theme'] = $this->options->get('theme');
		$data['title'] = $this->lang->line('contactus_title');
		$data['body'] = '';
		$data['user'] = $this->users->get_by_id($this->users->id());
		
		//begin recaptcha
			/*	$this->load->library('recaptcha');
				$data['recaptcha']=$this->recaptcha->get_html();
				$this->form_validation->set_rules('recaptcha_response_field', 'lang:recaptcha_field_name', 'required|callback_check_captcha');*/
		//end recaptcha
		
		//process new contact form submission

		$this->form_validation->set_rules('name', 'Name', 'strip_tags|trim|required|xss_clean|max_length[128]');
		$this->form_validation->set_rules('email', 'Email', 'strip_tags|trim|required|xss_clean|valid_email|max_length[256]');
		$this->form_validation->set_rules('phone', 'Phone #', 'strip_tags|trim|required|xss_clean|max_length[50]');
		$this->form_validation->set_rules('subject', 'Subject','strip_tags|trim|required|xss_clean|max_length[256]');
		$this->form_validation->set_rules('message', 'Message', 'strip_tags|trim|required|xss_clean|max_length[2000]');
		//$this->form_validation->set_rules('recaptcha_response_field', 'Recaptcha', 'required|callback_check_captcha');
		
		if ($this->form_validation->run() == FALSE) 
		{
		
		}
		else
		{
			//email message
			$email_data['name'] = $this->input->post('name');
			$email_data['email'] = $this->input->post('email');
			$email_data['phone'] = $this->input->post('phone');
			$email_data['message'] = $this->input->post('message');
			$subject = 'Contact Form Submission: '.$this->input->post('subject');
			/*$msg = $this->load->view($this->options->get('theme').'/emails/contact_form', $email_data, true);
			$this->email->subject($subject);
			$this->email->from($email_data['email'], $email_data['name']);
			$this->email->to($this->options->get('main_email')); 
			$this->email->message($msg);
			if($this->email->send()) {
				$this->session->set_flashdata('success', vlang('contactus_thanks'));
				$this->email->clear();
				redirect('contact_us');
			}*/
			$this->users->send_admin_email($email_data['email'],$subject,'contact_form',$email_data);
			$this->session->set_flashdata('success', vlang('contactus_thanks'));
			redirect('contact_us');
		}
		
		$this->load->view($data['theme'].'/contact_us', $data);
	}
开发者ID:bmfelix,项目名称:draftlounge,代码行数:51,代码来源:contact_us.php


示例3: forgot_password

 function forgot_password()
 {
     $data['theme'] = $this->options->get('theme');
     $data['title'] = vlang('forgotpw_title');
     $data['body'] = '';
     $data['user'] = $this->users->get_by_id($this->users->id());
     if ($this->form_validation->run() == FALSE) {
     } else {
         $this->users->reset_password($this->input->post('email'));
         $this->session->set_flashdata('success', 'Your new password has been sent to your email.');
         redirect('login');
     }
     $this->load->view($data['theme'] . '/users/forgot_password', $data);
 }
开发者ID:bmfelix,项目名称:godraft,代码行数:14,代码来源:login.php


示例4: time_nice

 function time_nice($time = '')
 {
     $time_now = time();
     $difference = $time_now - $time;
     if ($difference < 3600) {
         //return minutes
         return vlang('dashboard_minutes_ago', floor($difference / 60));
     } elseif ($difference < 86400) {
         //return hours
         //return floor($difference / 3600).' hours ago';
         return vlang('dashboard_hours_ago', floor($difference / 3600));
     } else {
         //return days
         //return floor($difference / 86400).' days ago';
         return vlang('dashboard_days_ago', floor($difference / 86400));
     }
 }
开发者ID:bmfelix,项目名称:godraft,代码行数:17,代码来源:misc.php


示例5: index

	function index()
	{
		//echo "<pre>".print_r($this->session->all_userdata(),true)."</pre>";exit;
		redirect('lobby');exit;
		$this->load->model('activities');
		//$data['extra_js'] = '<script type="text/javascript" src="'.site_url('js/jcrop/js/jquery.Jcrop.js').'"></script>';
		//$data['extra_js'] = '<script type="text/javascript" src="'.site_url('js/user/notifications.js').'"></script>';
		$data['theme'] = $this->options->get('theme');
		//$data['title'] = 'Hello, '.$this->session->userdata('first_name').' '.$this->session->userdata('last_name').'!';
		$data['title'] = vlang('dashboard_greeting', $this->session->userdata('first_name').' '.$this->session->userdata('last_name'));
		$data['body'] = '';
		$data['user'] = $this->users->get_by_id($this->users->id());
		$data['new_members'] = $this->users->get_new_members(5);
		$data['featured_members'] = $this->users->get_featured_members(5);
		/*echo '<pre>';
		print_r($data['new_members']);*/
		$this->load->view($data['theme'].'/users/dashboard', $data);
	}
开发者ID:bmfelix,项目名称:draftlounge,代码行数:18,代码来源:user.php


示例6: send

	function send($receivers = array(), $subject = '', $message = '', $from = '0', $redirect = TRUE)
	{
		$current_sender = $this->users->get_by_id($from);
		$this->load->model('notifications');
		foreach($receivers as $receiver)
		{
			$curr_reciever = $this->users->get_by_username(trim($receiver));
			//insert inbox message
			$insert = array(
							'from' => $from,
							'to' => $curr_reciever->cid,
							'subject' => $subject,
							'message' => $message,
							'box' => '0',
							'owner_id' => $curr_reciever->cid,
							'status' => '0',
							'timestamp' => time()
							);
			$this->db->insert('messages', $insert);
			$msg_id = $this->db->insert_id();
			$this->notifications->add($curr_reciever->cid, vlang('messages_notification',$current_sender->first_name.' '.$current_sender->last_name), 'message/read/'.$msg_id);
			
			//insert outbox message
			$insert = array(
							'from' => $from,
							'to' => $curr_reciever->cid,
							'subject' => $subject,
							'message' => $message,
							'box' => '1',
							'owner_id' => $from,
							'status' => '0',
							'timestamp' => time()
							);
			$this->db->insert('messages', $insert);
			
			if ($redirect)
			{
				$this->session->set_flashdata('success', 'Message was sent.');
				redirect('message/sent');
			}
		}
	}
开发者ID:bmfelix,项目名称:draftlounge,代码行数:42,代码来源:messages.php


示例7: affiliate

	function affiliate()
	{
		$data['theme'] = $this->options->get('theme');
		$data['title'] = vlang('inviteafriend_title');
		$data['body'] = '';
		$data['user'] = $this->users->get_by_id($this->users->id());
		$use_real_name = $this->input->post('use_real_name');
		$friend_emails = $this->input->post('invite_email');
		$message = $this->input->post('invite_message');
		
		if(is_array($friend_emails)) {

			foreach($friend_emails as $friend_email)
			{
				//make sure email is good
				if(valid_email($friend_email)) {		
					//email confirmation code
					if($use_real_name == 'yes') {
					$email_data['name'] = $data['user']->first_name.' '.$data['user']->last_name;
					} else {
					$email_data['name'] = $data['user']->username;
					}
					$email_data['email'] = $data['user']->email;
					$email_data['user'] = $data['user']->username;
					if(!empty($message)) { $email_data['message'] = $message.'<hr />'; } else { $email_data['message'] = ''; }
					$subject=vlang('email_subject_invite_a_friend');
					$this->users->send_basic_email(trim($friend_email),$subject,'invite_a_friend',$email_data);
				}
			}
		
			$this->session->set_flashdata('success', vlang('inviteafriend_thanks'));
			redirect('my_account');
		}
		
		$this->load->view($data['theme'].'/invite_a_friend', $data);
	}	
开发者ID:bmfelix,项目名称:draftlounge,代码行数:36,代码来源:invite_a_friend.php


示例8: vlang

	{
		foreach($activities as $item)
		{
			$item_user = $this->users->get_by_id($item->owner_id);
			echo '<li>';
			if(!empty($item_user->avatar)){
				echo '<a href="'.$item_user->username.'" class="small_avatar_link"><img src="'.site_url('uploads/avatar_small/'.$item_user->avatar).'" class="activity_thumbnail" /></a>';
			}else{
				echo '<a href="'.$item_user->username.'" class="small_avatar_link"><img src="'.site_url('assets/'.$theme.'/images/no_picture_small.gif').'" class="activity_thumbnail" /></a>';
			}
			echo '<a href="'.$item_user->username.'">'.$item_user->first_name.' '.$item_user->last_name.'</a> ';
			echo $item->content;
			if ($item->type == '3')
			{
				//echo 'has just signed up. Say hello!';
				echo vlang('dashboard_say_hello');
			}
			echo '<br />';
			if ($item->type == '0' || $item->type == '3' || $item->type == '4')
			{
				echo '<img src="'.site_url('assets/'.$theme.'/images/ico_tiny_user.png').'" class="tiny_icon" />';
			}
			else
			{
				echo '<img src="'.site_url('assets/'.$theme.'/images/ico_tiny_comment.png').'" class="tiny_icon" />';
			}
			echo '<span class="time_nice small_avatar_time_nice">'.$this->misc->time_nice($item->timestamp).'</span>';
			if ($item->type != '3' && $item->type != '4')
			{
				if ($item->type == '0') $parent_type = '1';
				if ($item->type == '1') $parent_type = '2';		
开发者ID:bmfelix,项目名称:number1draft,代码行数:31,代码来源:activity_feed.php


示例9:

								</div>
							</div>
						</div>
						<div class="col-md-6">
			                <div class="controls">
								<div class="h2h">
									<div class="label_title"><h3>Privacy Settings</h3></div>
									<label class="checkbox"><input type="checkbox" name="private" value="1" <?=set_checkbox('private', '1', (isset($private) && $private==1));?> /> <?=vlang('accountsettings_privacy');?></label>
								</div>
							</div>
						</div>
						
						<div class="col-md-12">
							<div class="controls">
								<div class="h2h">
									<p class="h2hblock"><?=vlang('accountsettings_h2hblock_disclaimer');?></p>
								</div>
							</div>
						</div>
						
						<div class="clearfix"></div>
						<input type="hidden" name="lang" value="english" />
						
						<div class="form-actions">
							<input class="btn submit submit-btn btn-default" type="submit" value="Save" />
						</div>	
					</form>
				</div>
			</div>
		</div>
	</div>
开发者ID:bmfelix,项目名称:draftlounge,代码行数:31,代码来源:privacy_info.php


示例10:

<h2><?=$title;?></h2>

<?php
//show error/success messages
if ($this->session->flashdata('success') != '')
{
	echo '<div class="alert-message success">'.$this->session->flashdata('success').'</div>';
}
if ($this->session->flashdata('error') != '')
{
	echo '<div class="alert-message error">'.$this->session->flashdata('error').'</div>';
}
?>

<?=$body;?>

<form action="" method="post" class="form_login">
	<div class="clearfix">
		<label><?=vlang('forgotpw_email');?></label>
		<div class="input">
			<input type="text" name="email" value="<?=set_value('email');?>" />
			<?=form_error('email');?>
		</div>
	</div>
	<div class="actions">
		<input type="submit" class="btn primary" value="<?=vlang('forgotpw_submit');?>" />
	</div>
	
</form>

<?php $this->load->view($theme.'/footer'); ?>
开发者ID:bmfelix,项目名称:draftlounge,代码行数:31,代码来源:forgot_password.php


示例11: add_a_friend

	function add_a_friend()
	{
		$user_b = $this->uri->segment(3);
		$redirect = TRUE;
		if ($this->input->post('no_redirect') == 'yes')
		{
			$redirect = FALSE;
		}
		if (strlen($user_b) > 0)
		{
			$res = $this->users->add_friendship($this->session->userdata('cid'), $user_b);
			if ($res === FALSE)
			{
				$this->session->set_flashdata('error', 'Unable to create friendship.');
				if ($redirect) redirect('friends');
			}
			else
			{
				$user_b_data = $this->users->get_by_id($user_b);
				if ($res == 'requested')
				{
					$this->session->set_flashdata('success', vlang('friend_message_request_sent'));
				}
				else
				{
					$this->session->set_flashdata('success', vlang('friend_message_now_friends',$user_b_data->first_name.' '.$user_b_data->last_name));
				}
				if ($redirect) redirect($user_b_data->username);
			}
		}
		else
		{
			$this->session->set_flashdata('error', vlang('friend_message_request_fail'));
			if ($redirect) redirect('friends');
		}
	}
开发者ID:bmfelix,项目名称:draftlounge,代码行数:36,代码来源:friends.php


示例12: get_scoring_breakdown

	function get_scoring_breakdown($sport,$breakdown,$template_id = 0) {
		
		if($template_id == 0){
		    $score_keys = json_decode($this->options->get('scoring'),true);
        } else {
            $this->db->where('id', $template_id);
            $scoring = $this->db->get('scoring_templates')->row_object();
            $score_keys = json_decode($scoring->value,true);
        }
        
		$sport = strtolower($sport);
		
		$bd=json_decode($breakdown);
		$bd = (array)$bd;
		$bd = array_map('strval',$bd);
		$counts = array_count_values($bd);
		$scoring = '';
		$total = count($bd);
		
		if(isset($counts["0"])) :
			$valid = $total - $counts["0"];
		else:
			$valid = $total;
		endif;
			
		if($valid > 0):
			
			$c=1;
			foreach($bd as $k=>$v):
				if($v != "0"):
					$score_value = $this->isValid($k,(array)$score_keys[strtoupper($sport)]);				
					
					if($score_value):	
						$raw_score = ($v / (float)$score_value);
						$raw_score=round($raw_score,2);
						$scoring .= '<span class=\'bd_tip\' data-original-title=\''.vlang('league_view_score_bd_'.$k).'\'>'.$raw_score.' '.vlang('league_view_score_bd_abbr_'.$k).'</span>';
					else:
						//$scoring.=vlang('league_view_score_bd_abbr_'.$k).":".$v;
						$num = $v / $score_value;
						$scoring.='<span class=\'bd_tip\' data-original-title=\''.vlang('league_view_score_bd_'.$k).'\'>'.$num.' '.vlang('league_view_score_bd_abbr_'.$k).'</span>';
					
 					endif;
					
					if($c < $valid) :
						$scoring .= ', ';
					endif;	
					$c++;
				endif;
				
				
			endforeach;
		else:
			$scoring .= 'N/A';
		endif;
		
		return $scoring;
	
	}
开发者ID:bmfelix,项目名称:draftlounge,代码行数:58,代码来源:views.php


示例13: if

				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
	
	<? endif; ?>
	
		<div class="modal fade in" id="lfp_modal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header shield">
						<button type="button" class="close modal-close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
						<h3>Large Field of Players Breakdown</h3>
					</div>
					<div class="modal-body">
						<p><?=vlang('league_lfp_explanation_text')?></p>
						<? if(isset($lfp_modal)) { echo $lfp_modal; } ?>
					</div>
					<div class="modal-footer">
					</div>
				</div><!-- /.modal-content -->
			</div><!-- /.modal-dialog -->
		</div><!-- /.modal -->
	
</div>
<div class="well">
	<?if($league->multi_entry==1 && (isset($user_teams) && (count($user_teams) < $league->multi_entry_limit))):?>
		<a href="<?=site_url('league/player_select/'.$league->cid)?>" class="btn btn-large">Join Again</a>
	<?endif?>
	<a class="btn btn-large" href="<?=site_url('lobby')?>">Enter Other Contests</a>
	<?	if ($league->first_game_cutoff > time() && count($teams) < $league->size && (($league->visibility == 'private' && $league->commissioner_id == $this->users->id()) || $league->visibility == 'public')	//if private league then check if user is the league creator
开发者ID:bmfelix,项目名称:draftlounge,代码行数:31,代码来源:superview_bracket.php


示例14: checkreceivers

	function checkreceivers($receivers)
	{
		$success = TRUE;
		$receivers_arr = $this->messages->receivers_to_array($receivers);
				
		if (count($receivers_arr) == 0)
		{
			$success = FALSE;
			$message = vlang('messages_error_use_commas');
		}
		
		if ($success)
		{
			//check if all usernames exist
			$err_usernames = array();
			foreach($receivers_arr as $username)
			{
				$user=$this->users->get_by_username(trim($username));
				if (!$user)
				{
					$err_usernames[] = $username;
					$success = FALSE;
				}else{
					if(!$this->users->check_rules($this->users->ID(),0,'message','send', $user->cid)){
						$perm_usernames[]=$username;
						$success=FALSE;
					}
				}
			}
			if (!$success)
			{

				
				$usersnames_str = implode(', ', $err_usernames);
				if (count($err_usernames) == 1)
				{
					//$message = 'We\'re unable to send your message. We can\'t find '.$err_usernames[0].'.';
					$message = vlang('messages_error_cant_find',$err_usernames[0]);
				}
				else
				{
					//$message = 'We\'re unable to send your message. We can\'t find following users: '.implode(', ', $err_usernames).'.';
					$message = vlang('messages_error_cant_find_multi',implode(', ', $err_usernames));
				}
				
				if (count($err_usernames) == 1)
				{
					//$message = 'You don\'t have permission to send a message to '.$perm_usernames[0].'.';
					$message = vlang('messages_error_perm',$perm_usernames[0]);
				}
				else
				{
					//$message = 'You don\'t have permission to send a message to the following users: '.implode(', ', $perm_usernames).'.';
					$message = vlang('messages_error_perm_multi',implode(', ', $perm_usernames));
				}
			}						
		}
		
		if ($success)
		{
			return TRUE;
		}
		else
		{
			$this->form_validation->set_message('checkreceivers', $message);
			return FALSE;
		}
	}
开发者ID:bmfelix,项目名称:draftlounge,代码行数:68,代码来源:message.php


示例15:

				<input type="hidden" name="action" value="delete" />
				<input type="submit" class="btn btn-danger" value="<?=vlang('messages_delete');?>" />
			</form>
			<?if(isset($from->username) & $from->username != $this->session->userdata('username')):?>
			<form action="<?=site_url('message/compose/'.$from->cid);?>" method="post">
				<input type="hidden" name="subject_pass" value="RE: <?=$message->subject;?>" />
				<input type="hidden" name="message_pass" value="<?="\n";?>
				----<?="\n";?>
				<?=vlang('messages_on');?> <?=date('m/d/Y h:i a', $message->timestamp);?><?="\n";?>
				<?=vlang('messages_from');?> <?=@$from->first_name;?> <?=@$from->last_name;?><?="\n";?>
				<?=vlang('messages_to');?> <?=@$to->first_name;?> <?=@$to->last_name;?><?="\n";?>
				<?=str_replace('"', '\"', $message->message);?>" />
				<input type="submit" class="btn btn-primary" value="<?=vlang('messages_reply');?>"/>
			</form>
			<?endif;?>
			<form action="<?=site_url('message/compose/'.$from->cid);?>" method="post">
				<input type="hidden" name="subject_pass" value="FW: <?=$message->subject;?>" />
				<input type="hidden" name="message_pass" value="<?="\n";?>
				----<?="\n";?>
				<?=vlang('messages_on');?> <?=date('m/d/Y h:i a', $message->timestamp);?><?="\n";?>
				<?=vlang('messages_from');?> <?=@$from->first_name;?> <?=@$from->last_name;?><?="\n";?>
				<?=vlang('messages_to');?> <?=@$to->first_name;?> <?=@$to->last_name;?><?="\n";?>
				<?=str_replace('"', '\"', $message->message);?>" />
				<input type="submit" class="btn" value="<?=vlang('messages_forward');?>"/>
			</form>
		</div>
	</div>
</div>

<?php $this->load->view($theme.'/footer'); ?>
开发者ID:bmfelix,项目名称:number1draft,代码行数:30,代码来源:read.php


示例16: vlang

			<td><button class="btn btn-primary btn-small add_player"><?=vlang('lobby_league_join')?></button></td>
		</tr>
		<?php endfor; */
?>
					<tr>
						<td>loading...</td>
						<td>loading...</td>
						<td>..</td>
						<td>loading...</td>
						<td>..</td>						
						<td>...</td>
						<td>...</td>
						<td>loading...</td>
						<td>..</td>
						<td><button class="btn btn-primary btn-small add_player"><?php 
echo vlang('lobby_league_join');
?>
</button></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	<div class="span3">
		side bar
	</div>
</div>


<?php 
//="<pre>".print_R($avail_games,true)."</pre>"
开发者ID:bmfelix,项目名称:godraft,代码行数:31,代码来源:my_contests.php


示例17:

		//show error/success messages
		if ($this->session->flashdata('success') != '')
		{
			echo '<div class="alert-message success">'.$this->session->flashdata('success').'</div>';
		}
		if ($this->session->flashdata('error') != '')
		{
			echo '<div class="alert-message error">'.$this->session->flashdata('error').'</div>';
		}
		?>

		<div class="account_edit_menu">
			<ul class="pills">
				<li class="active"><a href="<?=site_url('registration/basic_info_edit');?>"><?=vlang('accountsettings_menu_basic_info');?></a></li>
				<li><a href="<?=site_url('registration/picture_upload_edit');?>"><?=vlang('accountsettings_menu_avatar');?></a></li>
				<li><a href="<?=site_url('registration/profile_fields_edit');?>"><?=vlang('accountsettings_menu_profile_details');?></a></li>
				<li><a href="<?=site_url('hub/settings');?>">The Hub Settings</a></li>
			</ul>
		</div>
	
		<?=form_open('hub/settings');?>
			<div type="clearflix">
				<label for="signature">Signature</label>
				<div class="input">
					<textarea name="signature" class="xlarge" rows="10"><?=set_value('signature',$userprefs->signature);?></textarea>
					<?php echo form_error('signature'); ?>
				</div>
			</div>
			<div class="actions">
				<input type="submit" class="btn primary" name="submit" value="Save Changes">
			</div>
开发者ID:bmfelix,项目名称:number1draft,代码行数:31,代码来源:settings.php


示例18: payment_details

	function payment_details(){
		//Have place to see current subscription time left
		//have place to edit billing address
		$this->load->model('payments');
		$this->load->model('packages');
		$data['theme'] = $this->options->get('theme');
		$data['title'] = vlang('settings_payment_title');
		$data['body'] = '';
		$data['user'] = $this->users->build_from_session();
		$this->db->where('cid',$this->users->id());
		$user=$this->db->get('users');
		$data['user_data']=$user=$user->row();
		$data['free_account']=$user->free_account;
		
		$this->load->helper(array('form', 'url'));
		$this->load->library('form_validation');
		
		
		if($user->pay_method!=0){
			$data['method']=$this->payments->get_method_by_id($user->pay_method);
			$data['method_extra']=json_decode($data['method']->data);
		}
		$data['methods']=$this->payments->get_all_methods();
		$data['packages']=$this->packages->get_all(true);
		
		if($this->input->post('submit')!=''){
			$method=$this->payments->get_method_by_id($this->input->post('method'));
			$gateway=$this->payments->get_gateway_by_id($method->type_id);
			//echo "<pre>FORM SUBMISSION: ".$gateway->controller."/".$gateway->renew_func."/".$this->input->post('package')."/".$this->input->post('method')."</pre>";
			redirect($gateway->controller."/".$gateway->renew_func."/".$this->input->post('method'));
		}
		if($this->input->post('unsubscribe')!=''){
			$method=$this->payments->get_method_by_id($this->input->post('method'));
			$gateway=$this->payments->get_gateway_by_id($method->type_id);
			//echo "<pre>FORM SUBMISSION: ".$gateway->controller."/".$gateway->unsubscribe_func."/".$this->input->post('method')."</pre>";
			redirect($gateway->controller."/".$gateway->unsubscribe_func."/".$this->input->post('method'));
		}
		
		$this->form_validation->set_rules('billing_first_name', 'lang:setting_payment_first_name', 'required');
		$this->form_validation->set_rules('billing_last_name', 'lang:setting_payment_last_name', 'required');
		$this->form_validation->set_rules('billing_address', 'lang:setting_payment_address', 'required');
		$this->form_validation->set_rules('billing_address2', 'lang:setting_payment_address_line_2', '');
		$this->form_validation->set_rules('billing_city', 'lang:setting_payment_city', 'required');
		$this->form_validation->set_rules('billing_state', 'lang:setting_payment_state', 'required');
		$this->form_validation->set_rules('billing_zip', 'lang:setting_payment_zip', 'required');
		$this->form_validation->set_rules('billing_phone', 'lang:setting_payment_phone', '');
		
		if ($this->form_validation->run() == FALSE){
		
		}else{
			$country_code=$this->misc->geocodeCountryCode($this->input->post('billing_zip'));
			$update_data=array(
				'billing_first_name'=>$this->input->post('billing_first_name'),
				'billing_last_name'=>$this->input->post('billing_last_name'),
				'billing_address'=>$this->input->post('billing_address'),
				'billing_address2'=>$this->input->post('billing_address2'),
				'billing_city'=>$this->input->post('billing_city'),
				'billing_state'=>$this->input->post('billing_state'),
				'billing_zip'=>$this->input->post('billing_zip'),
				'billing_phone'=>$this->input->post('billing_phone'),	
				'billing_country_code'=>$country_code
			);
			
			if($this->payments->save_payment_profile($user_id,$update_data)){
				$this->session->set_flashdata('success',vlang('setting_payment_save_success'));
				redirect('setting/payment_details');
			}else{
				$this->session->set_flashdata('error',vlang('setting_payment_save_error'));
				redirect('setting/payment_details');
			}
		}
		
		//print_r($data['user']);
		$this->db->where('cid',$this->users->id());
		$this->db->select('membership_package,expires');
		$data['subscription']=$this->db->get('users');
		$data['subscription']=$data['subscription']->row();
		
		$this->db->where('user_id',$this->users->id());
		$data['payment_profile']=$this->db->get('payment_profile');
		$data['payment_profile']=$data['payment_profile']->row();
		$this->load->view($data['theme'].'/setting/payment', $data);
	}
开发者ID:bmfelix,项目名称:number1draft,代码行数:83,代码来源:setting.php


示例19: send_email

	function send_email($user_id='',$mail_key='',$data=''){
		if(!empty($user_id) && !empty($mail_key) && !empty($data)){
			$user=$this->get_by_id($user_id);
			$main_email=$this->options->get('main_email');
			if(!empty($user->lang))$lang=$user->lang;
			else $lang=$this->config->item('default_language');
			$this->lang->load('general',$lang);		
			$theme=$this->config->item('theme');
			$email_types=$this->config->item('email_types');
			$email_settings=$this->get_email_settings($user_id);
			
			if(in_array($email_types[$mail_key],$email_settings)){
				$insert=array(
					"to"=>$user->email,
					"from"=>$main_email,
					"subject"=>vlang('email_subject_'.$mail_key),
					"body"=>$this->load->view($theme."/emails/".$mail_key,$data,true),
					"timestamp"=>time()
				);
				$this->db->insert('email_queue',$insert);
			}
		}else{
			return false;
		}
	}
开发者ID:bmfelix,项目名称:fanpicks,代码行数:25,代码来源:users.php


示例20:

	<div id="importtable" class="importexport_table_wrap" data-function="import">
		<div class="importexport_no_games alert alert-error fade in"><a class="close" data-dismiss="alert" href="#">&times;</a><?=$this->uri->segment(6)=="search"?vlang('league_import_no_games_search'):vlang('league_import_no_games')?></div>
		<div id="plist_loading"><img src="<?=site_url("assets/".$theme."/img/loading.gif")?>" alt="loading" /></div>
		<div class="lobby_table table-responsive">
			<table class="table lobby">
				<thead>
					<tr>
						<th><div class="th-inner sport">Sport</div></th>
						<th><div class="th-inner"><?=vlang('lobby_tbl_ttl_match')?></div></th>
						<th><div class="th-inner"><?=vlang('lobby_tbl_ttl_type')?></div></th>
						<th class="tbl-entries"><div class="th-inner"><?=vlang('lobby_tbl_ttl_entry')?></div></th>
						<th><div class="th-inner"><?=vlang('lobby_tbl_ttl_entries')?></div></th>
						<th><div class="th-inner"><?=vlang('lobby_tbl_ttl_size')?></div></th>						
						<th><div class="th-inner"><?=vlang('lobby_tbl_ttl_prize')?></div></th>
						<th class="tbl-starttime"><div class="th-inner"><?=vlang('lobby_tbl_ttl_start_time')?></div></th>
						<th class="tbl-beginsin"><div class="th-inner"><?=vlang('lobby_tbl_ttl_begins_in')?></div></th>	
						<th><div class="th-inner checkboxfield"><input type="checkbox" class="selectall_control" /></div></th>
					</tr>
				</thead>
				<tbody>

				</tbody>
			</table>
		</div>
	</div>
	<div class="team_actions">
		<button class="btn btn-primary" id="import_team">Update Leagues</button>
	</div>
	<div align="right">
		** Remember: You can export your teams at any time from the upcoming matches screen.<br />
		You can also update your lineup, view your opponents, and <a href="<?=site_url("league/view/".$league->cid)?>">review match information here</a>.
开发者ID:bmfelix,项目名称:fanpicks,代码行数:31,代码来源:import_min.php



注:本文中的vlang函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vmDebug函数代码示例发布时间:2022-05-23
下一篇:
PHP vita_get_url_content函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap