Ejemplo n.º 1
0
 public function init()
 {
     $this->logId = time();
     $key = $this->config->get('paymillcreditcard_privatekey');
     $this->paymillProcessor = new Services_Paymill_PaymentProcessor($key, $this->apiEndpoint);
     $this->paymillPreauth = new Services_Paymill_Preauthorizations($key, $this->apiEndpoint);
     $this->paymillTransaction = new Services_Paymill_Transactions($key, $this->apiEndpoint);
     $this->paymillRefund = new Services_Paymill_Refunds($key, $this->apiEndpoint);
     $metadata = new metadata();
     $source = $metadata->getVersion() . "_opencart_" . VERSION;
     $this->paymillProcessor->setSource($source);
     $this->paymillProcessor->setLogger($this);
 }
Ejemplo n.º 2
0
 public function getVersion()
 {
     $metadata = new metadata();
     return $metadata->getVersion();
 }
Ejemplo n.º 3
0
<?php

require 'config.php';
require 'tidalinfo_class.php';
$info = new tidalinfo();
require 'audio-metadata/metadata.php';
$metadata = new metadata();
if (!isset($options)) {
    $options = getopt("", array('compilation::', 'album:', 'playlist:', 'order', 'id', 'nodelete'));
}
if (empty($options)) {
    $error = "Sample usage:\nRename a playlist:\tphp rename.php --order --playlist 43acd778-4985-4304-a460-37e5565881b8\nRename an album:\tphp rename.php --order --album 530705\nAlbum and playlist parameters also accepts URLs containing the id.\n";
} else {
    if (isset($options['order'])) {
        $path = $inpath_order;
    } else {
        $path = $inpath_id;
    }
    $files = array_merge(glob($path . '/*.m4a'), glob($path . '/*.flac'));
    sort($files);
    $filecount = count($files);
    if (isset($options['album'])) {
        if (preg_match('^.+album/([0-9]+)^', $options['album'], $albumid)) {
            //Get album ID from URL
            $options['album'] = $albumid[1];
        }
        if (!is_numeric($options['album'])) {
            $error = "Invalid album id or URL: {$options['album']}";
        } else {
            $albuminfo = $info->album($options['album']);
            //Get info about the album itself
<?php

/**
 * 
 * @author Julia Tejerina, Oscar Sanchez, Javier Gonzalez 
 * @version $Id: editmetadata.php,v 2.0 2009/25/04
 * @package webquestscorm
 **/
require_once "../../config.php";
$cmid = optional_param('cmid', 0, PARAM_INT);
$element = optional_param('element', 0);
require "{$CFG->dirroot}/mod/webquestscorm/metadata.class.php";
$metadatainstance = new metadata($cmid);
require_login($metadatainstance->course->id);
if (has_capability('mod/webquestscorm:manage', $metadatainstance->context)) {
    if ($form = data_submitted()) {
        if ($form->mode == 'metadata') {
            switch ($form->submode) {
                case 'general':
                    $metadatainstance->set_general($form);
                    break;
                case 'lifecycle':
                    $metadatainstance->set_lifecycle($form);
                    break;
                case 'metametadata':
                    $metadatainstance->set_metametadata($form);
                    break;
                case 'technical':
                    $metadatainstance->set_technical($form);
                    break;
                case 'educational':
Ejemplo n.º 5
0
         $newFileName = $cleanFileNameNoExt . $x . '.' . $extension;
         $mediaCheckNew = mysqli_query($db, "SELECT SQL_CALC_FOUND_ROWS filename FROM {$dbinfo[pre]}media WHERE owner = '{$memID}' AND filename = '{$newFileName}'");
         if (getRows()) {
             $x++;
         } else {
             $mediaCheckRows = 0;
         }
     }
     $cleanFileNameNoExt = $cleanFileNameNoExt . $x;
     $cleanFileName = $cleanFileNameNoExt . '.' . $extension;
 }
 /*
  * Get image meta data
  */
 if (in_array(strtolower($extension), $metadataFileTypes)) {
     $imageMetadata = new metadata($filePath);
     // UTF8 Detection
     if ($config['settings']['iptc_utf8']) {
         // utf-8
         $imageMetadata->setCharset('utf-8');
     } else {
         $imageMetadata->setCharset('off');
     }
     // utf8_encode off
     if ($config['settings']['readiptc']) {
         $iptc = $imageMetadata->getIPTC();
         if ($iptc) {
             $iptc = array_map("addSlashesMap", $iptc);
         }
         // fix ' and " issues
     }
Ejemplo n.º 6
0
echo "<html>";
echo "<head><meta http-equiv='Content-Type' content='text/html; charset={$langset[lang_charset]}' /></head>";
echo "<body>";
if (function_exists('iptcparse')) {
    echo "iptcparse Exists<br>";
} else {
    echo "iptcparse Does not exist<br>";
}
if (function_exists('exif_read_data')) {
    echo "exif_read_data Exists<br>";
} else {
    echo "exif_read_data Does not exist<br>";
}
echo "<br>";
try {
    $imagemetadata = new metadata('test.jpg');
    //$imagemetadata->charset = '';
    $iptc = $imagemetadata->getIPTC();
    if (function_exists('exif_read_data')) {
        $exif = $imagemetadata->getEXIF();
    }
    //print_r($iptc);
} catch (Exception $e) {
    echo $e->getMessage();
}
echo "<strong>IPTC:</strong> <br>";
foreach ($iptc as $key => $value) {
    echo "{$key}: {$value}<br>";
}
echo "<br><br><strong>EXIF</strong>: <br>";
foreach ($exif as $key => $value) {