Beispiel #1
0
 function readCreativeDetails($fileName)
 {
     // The standard check can fail with compressed SWF files and zlib not statically compiled in,
     // so we need to be more relaxed here and accept all matching files
     if (!phpAds_SWFVersion($this->content)) {
         return new PEAR_Error('Unrecognized image file format');
     }
     $this->contentType = 'swf';
     list($this->width, $this->height) = phpAds_SWFDimensions($this->content);
     $this->pluginVersion = phpAds_SWFVersion($this->content);
     $this->hardcodedLinks = phpAds_SWFInfo($this->content);
     return true;
 }
     case 'swf':
         $final['contenttype'] = 'swf';
         break;
     case 'dcr':
         $final['contenttype'] = 'dcr';
         break;
     case 'rpm':
         $final['contenttype'] = 'rpm';
         break;
     case 'mov':
         $final['contenttype'] = 'mov';
         break;
 }
 if ($final['contenttype'] == 'swf') {
     // Get dimensions of Flash file
     list($final['width'], $final['height']) = phpAds_SWFDimensions($uploaded['buffer']);
     $final['pluginversion'] = phpAds_SWFVersion($uploaded['buffer']);
     // Check if the Flash banner includes hard coded urls
     if ($checkswf == 't' && $final['pluginversion'] >= 3 && phpAds_SWFInfo($uploaded['buffer'])) {
         $edit_swf = true;
     }
 } else {
     $final['pluginversion'] = 0;
 }
 // Add slashes to the file for storage
 $final['filename'] = phpAds_ImageStore($storagetype, $final['filename'], $uploaded['buffer']);
 //$final['imageurl'] = $phpAds_config['type_web_url'].'/'.$final['filename'];
 $final['imageurl'] = '{image_url_prefix}/' . $final['filename'];
 if ($final['filename'] == false) {
     phpAds_PageHeader("1");
     if ($phpAds_config['type_web_mode'] == 0) {