Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
     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) {
         phpAds_Die('Error', $strErrorStoreLocal);
     } else {
         phpAds_Die('Error', $strErrorStoreFTP);
Ejemplo n.º 3
0
            $swf_file = phpAds_ImageRetrieve($row['storagetype'], $row['filename']);
        }
    } else {
        // Banner is not a flash banner, return to banner-edit.php
        header("Location: banner-edit.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&bannerid=" . $bannerid);
        exit;
    }
} else {
    // Banner does not exist, return to banner-edit.php
    header("Location: banner-edit.php?clientid=" . $clientid . "&campaignid=" . $campaignid);
    exit;
}
/*********************************************************/
/* Main code                                             */
/*********************************************************/
$result = phpAds_SWFInfo($swf_file);
$version = phpAds_SWFVersion($swf_file);
$compressed = phpAds_SWFCompressed($swf_file);
if ($result) {
    echo $strConvertSWF . '<br>';
    echo "<table border='0' width='100%' cellpadding='0' cellspacing='0' bgcolor='#F6F6F6'>";
    echo "<form action='banner-swf.php' method='post'>";
    echo "<input type='hidden' name='clientid' value='{$clientid}'>";
    echo "<input type='hidden' name='campaignid' value='{$campaignid}'>";
    echo "<input type='hidden' name='bannerid' value='{$bannerid}'>";
    echo "<tr><td height='25' colspan='4' bgcolor='#FFFFFF'><img src='images/" . $phpAds_TextDirection . "/icon-undo.gif' align='absmiddle'>&nbsp;<b>" . $strHardcodedLinks . "</b></td></tr>";
    echo "<tr><td height='1' colspan='4' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
    echo "<tr><td height='10' colspan='4'>&nbsp;</td></tr>";
    $i = 0;
    while (list($key, $val) = each($result)) {
        list($url, $target) = $val;