Пример #1
0
 /**
  * Loads a language file and appends the results to the existing strings
  * @param string The name of the file
  * @return boolean True if successful, false is failed
  */
 function load($filename)
 {
     if (file_exists($filename)) {
         if ($fp = fopen($filename, 'r')) {
             $content = fread($fp, filesize($filename));
             fclose($fp);
             $this->_elements[] = mShop_ini::parse($content, false, true);
         }
     }
 }
Пример #2
0
 function method_list($payment_method_id = "")
 {
     global $mosConfig_absolute_path;
     $ps_vendor_id = $_SESSION["ps_vendor_id"];
     $db = new ps_DB();
     $row = array();
     $files = vmReadDirectory(CLASSPATH . 'shipping/', '.ini$');
     if ($files) {
         require_once CLASSPATH . 'ps_ini.php';
         $ShippingModule = new mShop_ini();
         $i = 0;
         foreach ($files as $file) {
             $i++;
             $ShippingModule->load(CLASSPATH . 'shipping/' . $file);
         }
         return $ShippingModule->_elements;
     } else {
         return false;
     }
 }