예제 #1
0
 /**
  * repository::_init_plugger()
  *
  * { Description }
  *
  * @param [type] $call_files
  */
 function _init_plugger($name, $call_files = false)
 {
     unset($this->_plugger);
     $class = $name . '_meta';
     $file = $this->_plugin_dir . $name . '/' . $class . '.php';
     if (lib_check_file($file, true)) {
         include_once 'inc/class.plugin_meta.php';
         include_once trim($file);
         $this->_plugger = new $class($call_files);
         if ($this->_plugger->get('root_name') != $name) {
             $this->_plugger->set('root_name', $name);
         }
         return true;
     } elseif ($_class = lib_read_file($file)) {
         if ($_class == '-1' || $_class == '-2') {
             return $this->_set_error('0', '1622');
         }
         include_once 'inc/class.plugin_meta.php';
         eval("?>" . $_class);
         $this->_plugger = new $class($call_files);
         if ($this->_plugger->get('root_name') != $name) {
             $this->_plugger->set('root_name', $name);
         }
         return true;
     } else {
         $this->_set_error('0', '1622');
     }
 }
예제 #2
0
 function _execute_metafile($file)
 {
     $_file = $this->dir_name . $this->_meta_dir . '/' . $file;
     if (!$this->is_unix) {
         $_file = str_replace('/', '\\', $_file);
     }
     $_source = lib_read_file($_file);
     if ($_source != '-1' && $_source != '-2') {
         if (preg_match('!^<\\?php!i', $_source)) {
             //PHP
             //return $this->rep->bulk_sql($_source);
             return $this->rep->run_php($_source);
         } else {
             //SQL
             return $this->rep->bulk_sql($_source);
         }
     }
     return true;
 }