예제 #1
0
             $file_path = $ad_type_image_path;
         }
         break;
     case "flash":
         if ($flash_method == 'url') {
             $file_path = $ad_type_flash_url;
         }
         if ($flash_method == 'file' && $_FILES['ad_type_flash_file']['name']) {
             $file_path = keke_file_class::upload_file('ad_type_flash_file', '', 1, 'ad/');
         }
         break;
 }
 $file_path && $ad_obj->setAd_file($file_path);
 $ad_name = $hdn_ad_name ? $hdn_ad_name : $ad_name;
 $ad_obj->setAd_name($ad_name);
 $start_time && $ad_obj->setStart_time(strtotime($start_time));
 $end_time && $ad_obj->setEnd_time(strtotime($end_time));
 $ad_obj->setAd_type($ad_type);
 $ad_obj->setAd_position($ad_position);
 $width = ${$type . '_width'};
 $width && $ad_obj->setWidth($width);
 $height = ${$type . '_height'};
 $height && $ad_obj->setHeight($height);
 $content = ${$type . '_content'};
 if ($ad_type == 'code') {
     $content = htmlspecialchars_decode($content);
 }
 $content && $ad_obj->setAd_content($content);
 $hdn_target_id && $ad_obj->setTarget_id(intval($hdn_target_id));
 $ckb_tpl_type && ($tpl_type = implode(',', $ckb_tpl_type));
 $ad_obj->setTpl_type($tpl_type);