예제 #1
0
 function __construct()
 {
     if (!empty($_POST['multiupload']) && $_POST['multiupload'] == 145) {
         $this->require_login = FALSE;
     }
     parent::__construct();
 }
예제 #2
0
 function __construct()
 {
     parent::__construct();
     $this->load->model('page_attributegroup_model');
     $this->load->model('page_attributevalue_model');
     $this->MODEL = $this->page_attributegroup_model;
 }
예제 #3
0
 public function __construct()
 {
     parent::__construct();
     $this->MODULE_CONF = $this->loadConfig($this->module);
     $this->_setDiskPaths();
     $this->layout->setLayout('plain');
 }
예제 #4
0
 function __construct()
 {
     parent::__construct();
     $this->load->library('admin/xml_builder');
     $this->load->model('page_attributegroup_model');
     $this->load->model('page_attributejoin_model');
     $this->load->model('page_attributevalue_model');
     if (!empty($this->ADMIN_CONF['google_api_key'])) {
         $this->layout->asset->add('js', $this->ADMIN_CONF['google_api_js'] . $this->ADMIN_CONF['google_api_key'], 'google', false);
     }
     $this->hide_redirects = $this->session->userdata('am_' . $this->module . '_hideredicts') ? $this->session->userdata('am_' . $this->module . '_hideredicts') : $this->hide_redirects;
 }
예제 #5
0
 function __construct()
 {
     parent::__construct();
     // Add controller to wrapper title
     $this->layout->appendTitle('Util : Database');
     $this->authentication->requirePermission('mysql');
     // Set internal navigation variables
     $this->current_table = $this->uri->segment(2);
     $this->current_action = $this->uri->segment(3);
     $this->current_id = $this->uri->segment(4);
     $this->tables = $this->db->list_tables();
 }
예제 #6
0
 function __construct()
 {
     parent::__construct();
     $this->FILE_CONF = $this->loadConfig('file');
     ini_set('auto_detect_line_endings', 1);
     $this->upload_path = DOCROOT . zonepath($this->FILE_CONF['file_directory'], 'local') . '/' . $this->FILE_CONF['temp_folder'] . '/';
     // Required models
     $this->load->model('page_model');
     $this->load->model('page_attributejoin_model');
     $this->load->model('page_attributevalue_model');
     $this->load->model('template_model');
     //error_reporting(E_ALL);
 }
예제 #7
0
 public function __construct()
 {
     parent::__construct();
     $this->url_admin = new URLAdmin();
 }
예제 #8
0
 function __construct()
 {
     parent::__construct();
 }
예제 #9
0
 function __construct()
 {
     parent::__construct();
     $this->activity_link = $this->admin_path . 'activity/';
 }
예제 #10
0
 function __construct()
 {
     parent::__construct();
     $this->load->library('site_maintenance');
 }
예제 #11
0
 function __construct()
 {
     parent::__construct();
     $this->load->model('page_attributegroup_model');
 }
예제 #12
0
 function __construct()
 {
     parent::__construct();
     if ($this->input->get("directory_path") == "" || $this->input->get("parent_id") == "") {
         exit("Please enter a directory_path and a parent_id");
     }
     $this->load->model("file_model");
     $this->load->helper("directory");
     $output = '';
     $year = $this->input->get('year');
     $path = $this->input->get("directory_path");
     $files = directory_map($path);
     foreach ($files as $key => $value) {
         $collection_xml = array();
         $collection_xml[] = '<data>';
         $collection_xml[] = '<title>' . $key . '</title>';
         $collection_xml[] = '<subtitle>' . $year . '</subtitle>';
         $collection_xml[] = '<thumbnail/>';
         $collection_xml[] = '<images>';
         //make a folder
         $fields = array();
         $fields['title'] = $key;
         $fields['type'] = "collection";
         $fields['parent_id'] = $this->input->get("parent_id");
         $upload_result = $this->file_model->update($fields);
         $folder_id = $upload_result["file_id"];
         //add files to folder
         $i = 0;
         while ($i < sizeof($value)) {
             $raw_file_name = $value[$i];
             $pretty_file_name = $key . "_" . $value[$i];
             $path = $this->input->get("directory_path") . "/" . $key . "/" . $raw_file_name;
             if (is_dir($path)) {
                 continue;
             }
             if (!strpos($raw_file_name, '.jpg')) {
                 continue;
             }
             $imagedata = getimagesize($path);
             $fields = array();
             // Add tmp_file values to fields before update
             $fields['file_name'] = $pretty_file_name;
             $fields['title'] = $pretty_file_name;
             $fields['is_image'] = 1;
             $fields['mime'] = $imagedata["mime"];
             $fields['type'] = "file";
             $fields['parent_id'] = $folder_id;
             $fields['ext'] = substr($raw_file_name, sizeof($raw_file_name) - 5);
             $fields['options'] = array('image_size_str' => "width=\"" . $imagedata[0] . "\" height=\"" . $imagedata[1] . "\"", 'image_width' => $imagedata[0], 'image_height' => $imagedata[1]);
             // UPDATE DATABASE
             $upload_result = $this->file_model->update($fields);
             $collection_xml[] = '<image file_path="" file_title="" file_id="' . $upload_result['file_id'] . '"/>';
             // Make sure the id directory exists
             $this->file_model->getIdDirectory($upload_result['server_path']);
             if (file_exists($path)) {
                 // Move file (we need the id from insert)
                 rename($path, $upload_result['server_path']);
             }
             $i++;
         }
         echo '<p>' . $key . '</p>';
         $collection_xml[] = '</images>';
         $collection_xml[] = '</data>';
         $output .= $key . chr(10) . implode(chr(10), $collection_xml) . chr(10) . chr(10);
     }
     mail('*****@*****.**', 'IMG Import', $output);
     echo 'DONE!';
 }