PageRenderTime 101ms CodeModel.GetById 40ms app.highlight 6ms RepoModel.GetById 35ms app.codeStats 0ms

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

https://bitbucket.org/haloweb/halogy-1.0/
PHP | 74 lines | 62 code | 12 blank | 0 comment | 2 complexity | d5dfe995305fc224ebd599f7d6d61b5f 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<div style="float: right;">
 8	<?php
 9		$image = $this->uploads->load_image($data['imageRef']);
10		$thumb = $this->uploads->load_image($data['imageRef'], true);
11		$imagePath = $image['src'];
12		$imageThumbPath = $thumb['src'];
13	?>	
14	<?php echo ($thumb = display_image($imageThumbPath, $data['imageName'], 100, 'class="pic" ')) ? $thumb : display_image($imagePath, $data['imageName'], 100, 'class="pic"'); ?>		
15</div>
16
17<form method="post" action="<?php echo $this->uri->uri_string(); ?>" enctype="multipart/form-data" class="default" style="width: 450px; float: left;">
18
19	<label for="image">Image:</label>
20	<div class="uploadfile">
21		<?php echo @form_upload('image', '', 'size="16" id="image"'); ?>
22	</div>
23	<br class="clear" />
24
25	<label for="folderID">Folder: <small>[<a href="/admin/images/folders" onclick="return confirm('You will lose any unsaved changes.\n\nContinue anyway?')">update</a>]</small></label>
26	<?php
27		$options[0] = 'No Folder';
28		if ($folders):
29			foreach ($folders as $folderID):
30				$options[$folderID['folderID']] = $folderID['folderName'];
31			endforeach;
32		endif;
33			
34		echo @form_dropdown('folderID',$options,set_value('folderID', $data['folderID']),'id="folderID" class="formelement"');
35	?>	
36	<br class="clear" />
37	
38	<label for="imageName">Description:</label>
39	<?php echo @form_input('imageName', $data['imageName'], 'class="formelement" id="imageName"'); ?>
40	<br class="clear" />
41
42	<label for="imageRef">Reference:</label>
43	<?php echo @form_input('imageRef', $data['imageRef'], 'class="formelement" id="imageRef"'); ?>
44	<br class="clear" />
45
46	<label for="class">Display:</label>
47	<?php
48		$values = array(
49			'default' => 'Default',	
50			'left' => 'Left Align',
51			'center' => 'Center Align',			
52			'right' => 'Right Align',
53			'bordered' => 'Border',
54			'bordered left' => 'Border - Left Align',
55			'bordered center' => 'Border - Center Align',			
56			'bordered right' => 'Border - Right Align',
57			'full' => 'Full Width',			
58			'' => 'No Style'
59		);					
60		echo @form_dropdown('class',$values,$data['class'], 'class="formelement"'); 
61	?>
62	<br class="clear" />
63
64	<label for="maxsize">Max Size (px):</label>
65	<?php echo @form_input('maxsize', set_value('maxsize', (($data['maxsize']) ? $data['maxsize'] : '')), 'class="formelement" id="maxsize"'); ?>
66	<br class="clear" /><br />	
67
68	<input type="submit" value="Save Changes" class="button nolabel" id="submit" />
69	<a href="<?php echo $this->session->userdata('lastPage'); ?>" class="button cancel grey">Cancel</a>
70	<br class="clear" />
71	
72</form>
73
74<br class="clear" />