Пример #1
0
   'name'    => "М/с "Симпсоны", 19 сезон, 19-20 эп.",
   'descr'   => "США, 1989, комедия. В ролях: Дэн Кастелланета, Джули Кэвнер, Нэнси Картрайт, Йердли Смит. Семейство Симпсонов живет в маленьком американском городке Спрингфилд. Глава семейства Гомер работает на атомной электростанции, принося предприятия больше убытков, чем пользы. Он любит пить пиво с...",
   'start'   => 1287508860,
   'end'     => 1287512400
);
*/
// load background image ...
$im = imagecreatefromjpeg(EPGIMG);
if ($im && is_array($showinfo)) {
    // avoid timeouts ...
    set_time_limit(0);
    $days = array(1 => "Понедельник", 2 => "Вторник", 3 => "Среда", 4 => "Четверг", 5 => "Пятница", 6 => "Суббота", 7 => "Воскресенье");
    header('Content-Type: image/jpeg');
    // add logo if path was given ...
    if ($showinfo['icon'] != "") {
        addLogo($im, $showinfo['icon']);
    }
    // colors ...
    $white = imagecolorallocate($im, 255, 255, 255);
    $cyan = imagecolorallocate($im, 50, 198, 215);
    $yellow = imagecolorallocate($im, 243, 246, 14);
    // top and left margin: 150px
    $x = 150;
    $y = 150;
    // the f...ing bounding box ... !
    // The height of the text we want to write
    // isn't that easy to count ...
    // font height (40) + place for any accent above (font height / 2)
    $y += 60;
    // add channel ...
    imagettftext($im, 40, 0, $x, $y, $cyan, EPGFONTBD, $showinfo['channel']);
Пример #2
0
         if ($Brand->insert() > 0) {
             addLogo($Brand);
             $insert = true;
         }
     } else {
         if ($control == Controls::Update) {
             if (isset($_POST["txtLogoURL_Old"])) {
                 $Brand->setLogoURL($_POST["txtLogoURL_Old"]);
             }
             if (isset($_POST["chkStatus"])) {
                 $Brand->setStatus($_POST["chkStatus"]);
             } else {
                 $Brand->setStatus(0);
             }
             $Brand->update();
             addLogo($Brand);
             $update = true;
         }
     }
 } else {
     if (isset($_GET["BraID"]) && isset($_GET["control"])) {
         $control->setValue($_GET["control"]);
         $Brand = Brand::getBrand($_GET["BraID"]);
         if ($Brand != null) {
             if ($control == Controls::Update) {
                 echo "<script> \$(function () { \$(window).load(function(){ \$('#modalBra').modal( { backdrop: 'static', keyboard: false }, 'show');});  });</script>";
             } else {
                 if ($control == Controls::Delete) {
                     $Brand->delete();
                     $path = '../assets/images/logoBrands/' . $Brand->getBraID();
                     if (file_exists($path)) {
Пример #3
0
$descr = $xp->query("/response/film/description")->item(0)->nodeValue;
$poster = $xp->query("/response/film/poster")->item(0)->nodeValue;
$lenght = $xp->query("/response/film/lenght")->item(0)->nodeValue;
$year = $xp->query("/response/film/year")->item(0)->nodeValue;
$director = $xp->query("/response/film/director")->item(0)->nodeValue;
$actors = $xp->query("/response/film/actors")->item(0)->nodeValue;
$country = $xp->query("/response/film/country")->item(0)->nodeValue;
// load background image ...
$im = imagecreatefromjpeg(EPGIMG);
if ($im) {
    // avoid timeouts ...
    set_time_limit(0);
    header('Content-Type: image/jpeg');
    // add logo if path was given ...
    if ($poster != "") {
        addLogo($im, KARTINA_HOST . $poster);
    }
    // colors ...
    $white = imagecolorallocate($im, 255, 255, 255);
    $cyan = imagecolorallocate($im, 50, 198, 215);
    $yellow = imagecolorallocate($im, 243, 246, 14);
    // top and left margin: 150px
    $x = 150;
    $y = 150;
    // the f...ing bounding box ... !
    // The height of the text we want to write
    // isn't that easy to count ...
    // font height (40) + place for any accent above (font height / 2)
    $y += 60;
    // add channel ...
    imagettftext($im, 40, 0, $x, $y, $cyan, EPGFONTBD, $name);