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