Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/kanvakanva.com/public_html/application/views/admin/categories/ |
Upload File : |
<div class="modal-header"> <a href="<?= base_url('admin/categories'); ?>"><< Back to Category List Page</a><br><br> <h4><?= empty($categories->id_categories) ? 'Add a new category' : 'Edit category: ' . $categories->category; ?></h4> <?= $this->session->flashdata('success'); //to display success message ?> <?= $this->session->flashdata('result'); //to display result message ?> </div> <div class="modal-body" style="max-height:1200px;"> <?= form_open_multipart(); ?> <table class="table"> <tr> <td>Category Name</td> <td><?= form_input('category_name' , set_value('category_name', $categories->category)); ?> <?= form_error('category_name'); ?> </td> </tr> <tr> <td>Parent Category</td> <td> <select name="parent_id"> <option value="no-parent" <?php if ($categories->parent == NULL) : ?> selected="selected" <?php endif; ?> >No parent</option> <?php foreach($parent_categories as $parent) : ?> <option value="<?= $parent->id_categories; ?>" <?php if ($categories->parent == $parent->id_categories): ?> selected="selected" <?php endif ?> ><?= ucfirst($parent->category); ?></option> <?php $this->db->select('*')->from('categories')->where('parent', $parent->id_categories)->order_by('priority', 'ASC'); $child = $this->db->get()->result(); ?> <?php foreach ($child as $child_category) : ?> <option value="<?= $child_category->id_categories; ?>" <?php if ($categories->parent == $child_category->id_categories): ?> selected="selected" <?php endif ?> >- <?= ucfirst($child_category->category); ?></option> <?php endforeach; ?> <?php endforeach; ?> </select> <?= form_error('parent_id'); ?> </td> </tr> <tr> <td>Category Description</td> <td><?php echo form_textarea('description', set_value('description', $categories->description, FALSE)); ?> <?php echo form_error('description'); ?> </tr> <tr> <td>Category Image <?php if (!empty($categories->image)) : ?> <img style="width:200px; height:auto;" src="<?= base_url() . 'uploads/category/' . $categories->image; ?>" alt="" /> <i class="icon-trash"></i> <a href="<?= base_url() . 'admin/categories/delete_image/' . $categories->id_categories; ?>">Delete</a> <?php endif; ?> </td> <td> <input type="file" name="userfile" size="20" /><br> <?php //get max image width and height from configuration table $this->db->select('category_image_width, category_image_height')->from('configuration')->where('id_configuration', 1); $image_dimension = $this->db->get()->row(); ?> <span style="font-size:12px; font-style: italic;">Image size must be <?= $image_dimension->category_image_width;?> pixel width. <?= $image_dimension->category_image_height;?> pixel height, png/jpg, max 500KB</span> <span style="color:#F7931E;"><?php echo form_error('userfile'); ?></span> <?php echo $this->session->flashdata('error'); //to display error message ?> </td> </tr> <tr> <td>Display Priority (must be number only)</td> <td><?= form_input('priority' , set_value('priority', $categories->priority)); ?> <?= form_error('priority'); ?> </td> </tr> <tr> <td>Display</td> <td> <?php $options = array( 1 => 'Yes', 0 => 'No' ); echo form_dropdown('status', $options, $categories->status); ?> </td> </tr> <tr> <td><strong>SEO (Search Engine Optimization)</strong></td> <td></td> </tr> <tr> <td>Page Meta Description</td> <td><?= form_input('meta_description' , set_value('meta_description', $categories->meta_description)); ?> <?= form_error('meta_description'); ?> </td> </tr> <tr> <td>Page Meta Keywords<br>(separated with comma)</td> <td><?= form_input('meta_keywords' , set_value('meta_keywords', $categories->meta_keywords)); ?> <?= form_error('meta_keywords'); ?> </td> </tr> <tr> <td></td> <td> <?= form_submit('submit', 'Update', 'class="btn btn-primary btn-success button-brown"'); ?> <?= anchor('admin/categories', 'cancel'); ?> </td> </tr> </table> <?= form_close(); ?> </div>