コード例 #1
0
 /**
  * @param $isZip Allows disabling of ZIP function mostly just for testing.
  * @param $includeParent Include parent items that have related items.
  */
 function XMMMovieDatabasePlugin($isZip = TRUE, $includeParent = FALSE)
 {
     $this->isZip = $isZip;
     $this->includeParent = $includeParent;
     if ($this->isZip) {
         $this->zipfile = new zipfile();
     }
     // TODO - support other site plugins to provide DVD image
     $site_plugin_r = fetch_site_plugin_r('imdb');
     if ($site_plugin_r !== FALSE) {
         $this->imdbUrl = $site_plugin_r['more_info_url'];
     } else {
         $this->imdbUrl = NULL;
     }
 }
コード例 #2
0
ファイル: SitePlugin.class.php プロジェクト: horrabin/opendb
 function SitePlugin($site_type)
 {
     global $SITE_PLUGIN_SNOOPY;
     $this->_type = $site_type;
     $this->_site_plugin_r = fetch_site_plugin_r($this->_type);
     $this->_site_plugin_conf_r = get_site_plugin_conf_r($this->_type);
     // for simplicity sake we want an array always, even if empty.
     if (!is_array($this->_site_plugin_conf_r)) {
         $this->_site_plugin_conf_r = array();
     }
     if (is_numeric($this->_site_plugin_r['items_per_page'])) {
         $this->_items_per_page = $this->_site_plugin_r['items_per_page'];
     } else {
         $this->_items_per_page = 25;
     }
     // parse this URL now once
     if (strlen($this->_site_plugin_r['more_info_url']) > 0) {
         $this->_more_info_url = $this->_site_plugin_r['more_info_url'];
     }
     // Construct a single copy of this object for use within the site plugin
     $this->_httpClient =& $SITE_PLUGIN_SNOOPY;
     //debugging always on
     $this->_titleMaskCfg = new TitleMask();
 }
コード例 #3
0
ファイル: index.php プロジェクト: horrabin/opendb
 } else {
     if ($HTTP_VARS['op'] == 'sql') {
         $site_plugin_r = fetch_site_plugin_r($HTTP_VARS['site_type']);
         if (is_not_empty_array($site_plugin_r)) {
             header("Cache-control: no-store");
             header("Pragma: no-store");
             header("Expires: 0");
             header("Content-disposition: attachment; filename=" . $HTTP_VARS['site_type'] . ".sql");
             header("Content-type: application/octet-stream");
             echo generate_site_plugin_sql($site_plugin_r);
         } else {
             echo format_error_block(array('error' => 'Site Plugin not found'));
         }
     } else {
         if ($HTTP_VARS['op'] == 'maintain_site_plugin_install') {
             $site_plugin_r = fetch_site_plugin_r($HTTP_VARS['site_type']);
             if (is_not_empty_array($site_plugin_r)) {
                 if (strlen($HTTP_VARS['import_file']) > 0 && file_exists('./admin/s_site_plugin/upload/' . $HTTP_VARS['import_file'])) {
                     @set_time_limit(600);
                     echo "<div class=\"footer\">[<a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&site_type=" . $HTTP_VARS['site_type'] . "&op=maintain_site_plugin_install\">Back to CSV File List</a>]</div>";
                     echo "\n<h3>" . $site_plugin_r['title'] . " Installation Maintenance</h3>";
                     echo "<p>Importing " . $HTTP_VARS['import_file'] . "...</p>";
                     $jobObj->printJobProgressBar($HTTP_VARS['import_file']);
                 } else {
                     //if(strlen($HTTP_VARS['import_file'])>0)
                     echo "\n<p>[<a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=list_site_plugins\">Back to Main</a>]</p>";
                     echo "\n<h3>" . $site_plugin_r['title'] . " Installation Maintenance</h3>";
                     $classname = "Install_" . $HTTP_VARS['site_type'];
                     include_once "./admin/s_site_plugin/sql/" . $HTTP_VARS['site_type'] . ".install.class.php";
                     $installPlugin = new $classname();
                     $recordCount = $installPlugin->getRecordCount();