예제 #1
0
파일: _HUD.php 프로젝트: G-LAB/glab-cms
							</span>
							<span class="extended-address">
								<?=preg_replace('/\s/','&nbsp;',$address['addr2']); if ($address['addr2'] != null) { ?><br/><?php } ?>
							</span>
							<span class="locality"><?=$address['city'] ?></span>, <span class="region"><?=$address['state'] ?></span>
							<span class="postal-code"><?=$address['zip5']; if ($address['zip4'] != null) { ?>-<?=$address['zip4']; } ?></span>
						</address>
					</li>
					<?php endforeach ?>
				</ul>
				<?php endif ?>
			</div>
			<div id="col2">
				<div id="acctnum">
					<h3>Account Number</h3>
					<?=acctnum_format($HUD['acctnum']) ?>
				</div>
				<?php if (count($HUD['phone']) > 0) : ?>
				<h3>Phone Numbers</h3>
				<ul id="phone">
					<?php foreach ($HUD['phone'] as $phone) : ?>
					<li class="icn phone <?=$this->data->phone($phone['type'],TRUE)?>" title="<?=$this->data->phone($phone['type'])?>">
						<span class="tel">
							<span class="type hide"><?=$this->data->phone($phone['type'],TRUE)?></span>
							<span class="value"><?=tel_format($phone['num']) ?></span>
						</span>
					</li>
					<?php endforeach ?>
				</ul>
				<?php endif ?>
			</div>
예제 #2
0
<?php $this->load->helper('number'); ?>
<div id="searchResults">
	<?php if (isset($result['entities'][0])) : ?>
	<div id="entities">
		<h2>Companies & People</h2>
		<span class="recordCount"><?=count($result['entities'])?> Client Profiles Found</span>
		<ul>
		<?php foreach ($result['entities'] as $entity) : ?>
			<li>
				<span class="name">
					<a href="#" onclick="updateHUD(<?php echo $entity['eid'] ?>)"><?=$entity['name']?></a>
				</span>
				<span class="acctnum">Account No: <?php echo acctnum_format($entity['acctnum']) ?></span>
			</li>
		<?php endforeach; ?>
		</ul>
	</div>
	<?php endif; ?>
	
	<pre><?php //print_r($result) ?></pre>
</div>
예제 #3
0
	function view($profile) {
		$this->load->helper(array('number','form'));
		$this->load->library('form_validation');
		$this->form_validation->set_error_delimiters('<div class="msg error">', '</div>');
		
		$action = $this->input->post('action');
		
		$profile = $this->profile->get($profile);

		// Status OK
		$success = TRUE;
		
		if ($action) {
			$this->load->helper('glib_validation');
			
			// Validation
			if ($action == 'add_email') {
				$this->form_validation->set_rules('email', 'Email Address', 'required|is_email');
				
				// Check for errors
				$success = $this->form_validation->run();
				
				if ($success) 
				{
					$profile->email->add($this->input->post('email'));
				}
				
			} elseif ($action == 'add_phone') {
				$this->form_validation->set_rules('type', 'Phone Number Type', 'trim');
				$this->form_validation->set_rules('label', 'Label', 'trim');
				$this->form_validation->set_rules('tel', 'Phone Number', 'required|is_tel|tel_format');
				
				// Check for errors
				$success = $this->form_validation->run();
				
				if ($success) 
				{
					$tel = $profile->tel->prototype();

					$tel->type 	= $this->input->post('type');
					$tel->label = $this->input->post('label');
					$tel->tel 	= $this->input->post('tel');

					$tel->save();
				}
				
			} elseif ($action == 'add_address') {
				$this->form_validation->set_rules('type', 'Address Type', 'trim');
				$this->form_validation->set_rules('label', 'Label', 'trim');
				$this->form_validation->set_rules('street1', 'Street Address', 'required|trim');
				$this->form_validation->set_rules('street2', 'Street Address 2', 'trim');
				$this->form_validation->set_rules('city', 'City', 'required|trim');
				$this->form_validation->set_rules('state', 'State', 'required|trim');
				$this->form_validation->set_rules('zip', 'Postal Code', 'required|trim');
				$this->form_validation->set_rules('country', 'Country', 'required');
				
				// Check for errors
				$success = $this->form_validation->run();
				
				if ($success) 
				{
					$address = $profile->address->prototype();

					$address->type 		= $this->input->post('type');
					$address->label 	= $this->input->post('label');
					$address->street1 	= $this->input->post('street1');
					$address->street2 	= $this->input->post('street2');
					$address->city 		= $this->input->post('city');
					$address->state 	= $this->input->post('state');
					$address->zip 		= $this->input->post('zip');
					$address->country	= $this->input->post('country');

					$address->save();
				}
			}
		}
		
		if ($profile->exists()) {
			
			$data['pageTitle'] = $profile->name->full;
			$data['content']['nav']['title'] = $profile->name->friendly;
			
			$console['header'] = "Account No: ".acctnum_format($profile->pid);
			$console['body'] = $this->load->view('client_account/view', array('profile'=>$profile, 'action'=>$action, 'success'=>$success), TRUE);
			$console['footer_lt'] = null;
			$console['footer_rt'] = null;
			
			$data['content']['body'] = $this->load->view('console', $console, true);
			$data['content']['side'] = $this->load->view('_sidebar', null, true);
			
			$this->load->view('main',$data);
			
		} else show_error('Profile does not exist.');
		
	}
예제 #4
0
	<div id="heading">
		<?php if (element('status',$order) == 'estimate') : ?>
		<h1>Estimate</h1>
		<p>Expires: <?=date('F j, Y', strtotime(element('tsCreated',$order).' +1 month'))?></p>
		<?php else : ?>
		<h1>Order Summary</h1>
		<?php endif; ?>
	</div>
	
	<table class="grid">
		<tr>
			<th><?=(element('status',$order) == 'estimate') ? 'Estimate' : 'Order'?> Number</th>
			<td><?=$orid?></td>
			
			<th>Account Number</th>
			<td><?=acctnum_format($this->entity->getValue('acctnum', $order['eid']))?></td>
		</tr>
		<tr>
			<th>Date Created</th>
			<td><?=date('F j, Y', strtotime($order['tsCreated']))?></td>
			
			<th>Prepared By</th>
			<td><?=$this->entity->getValue('name', $order['eidCreated'])?></td>
		</tr>
	</table>
	
	<table>
		<thead>
			<tr>
				<td>SKU</td>
				<td>Item</td>
예제 #5
0
파일: view.php 프로젝트: G-LAB/glab-cms
		</div>
		<?php endif; ?>
		<table id="pf-accounts">
			<thead>
				<tr>
					<td>Manager's Name</td>
					<td>Account Number</td>
					<td>Job Title</td>
					<td>Actions</td>
				</tr>
			</thead>
			<tbody>
				<?php foreach($profile->manager->fetch_array() as $manager) : ?>
				<tr>
					<td><?=profile_link($manager->profile->pid)?></td>
					<td><?=acctnum_format($manager->profile->pid)?></td>
					<td><?=$manager->job_title?></td>
					<td><a href="#" class="button red in_development">Drop Permissions</a></td>
				</tr>
				<?php endforeach; ?>
			</tbody>
		</table>
	</div>
</div>
<script type="text/javascript">
	
	$('#btnAddEmail').click( function (event) {
		event.preventDefault();
		$('#addEmail').slideDown();
	});
	$('#btnAddPhone').click( function (event) {