예제 #1
0
파일: admincp.php 프로젝트: josev814/hero
 function images($id)
 {
     $this->admin_navigation->module_link('Manage Galleries', site_url('admincp/gallery'));
     $this->admin_navigation->module_link('Edit this Gallery', site_url('admincp/gallery/edit/' . $id));
     $this->load->model('publish/content_model');
     $gallery = $this->content_model->get_content($id);
     // get images
     $this->load->model('gallery/gallery_image_model');
     $gallery['images'] = $this->gallery_image_model->get_images($gallery['id']);
     // gallery
     $this->load->library('image_gallery_form');
     $image_gallery = new Image_gallery_form();
     //$gallery->label('Upload New Images');
     //$gallery->name('product_images');
     $image_gallery->show_upload_button(FALSE);
     $this->load->helper('format_size');
     $this->load->helper('image_thumb');
     $data = array('form_action' => site_url('admincp/gallery/post_images/' . $gallery['id']), 'gallery' => $gallery, 'images' => $image_gallery->display());
     $this->load->view('gallery', $data);
 }
예제 #2
0
파일: admincp.php 프로젝트: josev814/hero
 function product($product_id)
 {
     $this->admin_navigation->module_link('Add a Product', site_url('admincp/store/add'));
     $this->admin_navigation->module_link('Edit this Product', site_url('admincp/store/edit/' . $product_id));
     $this->load->model('products_model');
     $product = $this->products_model->get_product($product_id);
     if (!$product) {
         die(show_error('Unable to retrieve product.'));
     }
     // get usergroups
     $this->load->model('users/usergroup_model');
     $usergroups = $this->usergroup_model->get_usergroups();
     $options = array();
     foreach ($usergroups as $group) {
         $options[$group['id']] = $group['name'];
     }
     $usergroups = $options;
     // get custom fields
     $this->load->model('custom_fields_model');
     $custom_fields = $this->custom_fields_model->get_custom_fields(array('group' => setting('products_custom_field_group')));
     // gallery
     // image gallery
     $this->load->library('image_gallery_form');
     $gallery = new Image_gallery_form();
     $gallery->label('Upload New Images');
     $gallery->name('product_images');
     $gallery->show_upload_button(TRUE);
     $this->load->helper('format_size');
     $this->load->helper('image_thumb');
     $data = array('product' => $product, 'usergroups' => $usergroups, 'custom_fields' => $custom_fields, 'gallery' => $gallery->display());
     $this->load->view('product', $data);
 }