PageRenderTime 223ms CodeModel.GetById 120ms app.highlight 5ms RepoModel.GetById 95ms app.codeStats 0ms

/halogy/application/modules/images/views/admin/popup.php

https://bitbucket.org/haloweb/halogy-1.0/
PHP | 78 lines | 63 code | 15 blank | 0 comment | 3 complexity | fcab8d8884989de08f0053d463dc176e MD5 | raw file
 1<?php if ($errors = validation_errors()): ?>
 2	<div class="error clear">
 3		<?php echo $errors; ?>
 4	</div>
 5<?php endif; ?>
 6
 7<?php if ($this->core->is_ajax()): ?>
 8
 9	<a class="halogycms_close" href="#"><img title="Close" src="<?php echo $this->config->item('staticPath'); ?>/images/btn_close.png"/></a>
10	<a href="/admin/images/" class="halogycms_button halogycms_confirm" target="_top">Manage Images</a>
11
12<?php endif; ?>		
13
14<form method="post" action="<?php echo $this->uri->uri_string(); ?>" enctype="multipart/form-data" class="halogycms_form">
15
16<?php
17	$image = $this->uploads->load_image($data['imageRef']);
18	$thumb = $this->uploads->load_image($data['imageRef'], true);
19	$imagePath = $image['src'];
20	$imageThumbPath = $thumb['src'];
21?>	
22<?php echo ($thumb = display_image($imageThumbPath, $data['imageName'], 100, 'class="pic" ')) ? $thumb : display_image($imagePath, $data['imageName'], 100, 'class="pic"'); ?>
23
24	<label for="image">Image:</label>
25	<div class="uploadfile">
26		<?php echo @form_upload('image', '', 'size="16" id="image"'); ?>
27	</div>
28	<br class="clear" />
29
30	<label for="folderID">Folder:</label>
31	<?php
32		$options[0] = 'No Folder';
33		if ($folders):
34			foreach ($folders as $folderID):
35				$options[$folderID['folderID']] = $folderID['folderName'];
36			endforeach;
37		endif;
38			
39		echo @form_dropdown('folderID',$options,set_value('folderID', $data['folderID']),'id="folderID" class="formelement"');
40	?>	
41	<br class="clear" />
42	
43	<label for="imageName">Description:</label>
44	<?php echo @form_input('imageName', $data['imageName'], 'class="formelement" id="imageName"'); ?>
45	<br class="clear" />
46
47	<label for="imageRef">Reference:</label>
48	<?php echo @form_input('imageRef', $data['imageRef'], 'class="formelement" id="imageRef"'); ?>
49	<br class="clear" />
50
51	<label for="class">Display:</label>
52	<?php
53		$values = array(
54			'default' => 'Default',	
55			'left' => 'Left Align',
56			'center' => 'Center Align',			
57			'right' => 'Right Align',
58			'bordered' => 'Border',
59			'bordered left' => 'Border - Left Align',
60			'bordered center' => 'Border - Center Align',			
61			'bordered right' => 'Border - Right Align',
62			'full' => 'Full Width',			
63			'' => 'No Style'
64		);					
65		echo @form_dropdown('class',$values,$data['class'], 'class="formelement"'); 
66	?>
67	<br class="clear" />
68
69	<label for="maxsize">Max Size (px):</label>
70	<?php echo @form_input('maxsize', set_value('maxsize', (($data['maxsize']) ? $data['maxsize'] : '')), 'class="formelement" id="maxsize"'); ?>
71	<br class="clear" /><br />	
72
73	<input type="submit" value="Save Changes" class="button nolabel" id="submit" />
74	<br class="clear" />
75	
76</form>
77
78<br class="clear" />