$f_DATE_LAST_SHOW = explode(" ", $f_DATE_LAST_SHOW);
 $row->AddViewField("SHOW_COUNT_LAST_SHOW", $f_DATE_LAST_SHOW[0] . "<br>" . $f_DATE_LAST_SHOW[1]);
 $row->AddViewField("CLICK_COUNT", $f_CLICK_COUNT);
 if ($canAddbanner) {
     $row->AddInputField("MAX_CLICK_COUNT");
 } else {
     $row->AddViewField("MAX_CLICK_COUNT", $f_MAX_CLICK_COUNT);
 }
 $f_DATE_LAST_CLICK = explode(" ", $f_DATE_LAST_CLICK);
 $row->AddViewField("CLICK_COUNT_LAST_CLICK", $f_DATE_LAST_CLICK[0] . "<br>" . $f_DATE_LAST_CLICK[1]);
 $row->AddViewField("CTR", $f_CTR);
 // Calculate UNIFORM FIELD
 $f_UNIFORM_COEF = $arRes["FLYUNIFORM"] == "N" ? GetMessage("AD_NO") : GetMessage("AD_YES");
 if (isset($arRes["FLYUNIFORM"]) and $arRes["FLYUNIFORM"] == "Y") {
     $rot = CAdvBanner_all::CalculateRotationProgress($arRes);
     $tim = CAdvBanner_all::CalculateTimeProgress($arRes);
     if ($rot and $tim) {
         $arProgress = $rot / $tim;
         $f_UNIFORM_COEF = round($rot * 100) . "%&nbsp;/&nbsp;" . round($tim * 100) . "%&nbsp;=&nbsp;" . round($arProgress, 3);
     }
 }
 $row->AddViewField("UNIFORM_COEF", $f_UNIFORM_COEF);
 ///
 // FIRST_SHOW
 $f_FIRST_SHOW = GetMessage("AD_NOFIRST_SHOW_DATE");
 if (isset($arRes["DATE_SHOW_FIRST"])) {
     $f_FIRST_SHOW = $arRes["DATE_SHOW_FIRST"];
 }
 $row->AddViewField("FIRST_SHOW", $f_FIRST_SHOW);
 ///
 $arActions = array();
示例#2
0
        } else {
            echo CFileInput::Show("IMAGE_ID", $str_IMAGE_ID, array("IMAGE" => $str_AD_TYPE == 'image' ? "Y" : "N", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y"), array('upload' => true, 'medialib' => true, 'file_dialog' => true, 'cloud' => true, 'del' => true, 'description' => false));
        }
        ?>
		</td>
	</tr>
	<?php 
    }
    ?>

	<?php 
    if (intval($str_IMAGE_ID) > 0) {
        ?>
	<tr valign="top" id="eFileLoaded" style="display: none;">
		<td align="center" colspan="2"><?php 
        echo CAdvBanner_all::GetHTML(array("IMAGE_ID" => $str_IMAGE_ID, "FLASH_JS" => $str_FLASH_JS, "FLASH_IMAGE" => $str_FLASH_IMAGE, "FLASH_TRANSPARENT" => $str_FLASH_TRANSPARENT, "FLASH_VER" => $str_FLASH_VER));
        ?>
</td>
	</tr>
	<?php 
    }
    ?>

	<tr id="eFlashTrans" style="display: none;">
		<td><?php 
    echo GetMessage('AD_FLASH_TRANSPARENT');
    ?>
</td>
		<td>
			<select id="FLASH_TRANSPARENT" name="FLASH_TRANSPARENT">
				<option value="transparent"<?php 
示例#3
0
 function CalculateTimeProgress($arBanner)
 {
     $dt = CAdvBanner_all::__innerExtractBitrixDates($arBanner);
     $stmpnow = time();
     $dtformat = "DD.MM.YYYY HH:MI:SS";
     $stmpfirst = MakeTimeStamp($dt["first"], $dtformat);
     $stmpfrom = MakeTimeStamp($dt["from"], $dtformat);
     $stmpto = MakeTimeStamp($dt["to"], $dtformat);
     // Check if FirstShowDate valid, then use it.
     if ($stmpfirst > 0 and $stmpfirst >= $stmpfrom and $stmpto > $stmpfirst) {
         $stmpfrom = $stmpfirst;
     }
     $stmpnow -= $stmpfrom;
     $diff = CAdvBanner_all::CalculateTimeDiff($arBanner);
     if ($stmpnow <= 0 or !$diff) {
         return 0;
     }
     return $stmpnow / $diff;
 }
示例#4
0
 public static function CheckDynamicFilter($arFilter)
 {
     $err_mess = CAdvBanner_all::err_mess() . "<br>Function: CheckDynamicFilter<br>Line: ";
     global $strError;
     $str = "";
     $find_date_1 = $arFilter["DATE_1"];
     $find_date_2 = $arFilter["DATE_2"];
     if (strlen(trim($find_date_1)) > 0 || strlen(trim($find_date_2)) > 0) {
         $date_1_ok = false;
         $date1_stm = MkDateTime(ConvertDateTime($find_date_1, "D.M.Y"), "d.m.Y");
         $date2_stm = MkDateTime(ConvertDateTime($find_date_2, "D.M.Y") . " 23:59", "d.m.Y H:i");
         if (!$date1_stm && strlen(trim($find_date_1)) > 0) {
             $str .= GetMessage("AD_ERROR_WRONG_PERIOD_FROM") . "<br>";
         } else {
             $date_1_ok = true;
         }
         if (!$date2_stm && strlen(trim($find_date_2)) > 0) {
             $str .= GetMessage("AD_ERROR_WRONG_PERIOD_TILL") . "<br>";
         } elseif ($date_1_ok && $date2_stm <= $date1_stm && strlen($date2_stm) > 0) {
             $str .= GetMessage("AD_ERROR_FROM_TILL_PERIOD") . "<br>";
         }
     }
     $strError .= $str;
     if (strlen($str) > 0) {
         return false;
     } else {
         return true;
     }
 }