// ------------------------------------------- if ($_GET['gridsearch']) { makemap(false, false, $gval['gridid'], true, DB_array("SELECT userid FROM " . $dbprefix . "user WHERE (url LIKE '%" . mysql_real_escape_string(stripslashes($_GET['gridsearch'])) . "%' OR title LIKE '%" . mysql_real_escape_string(stripslashes($_GET['gridsearch'])) . "%') AND submit IS NOT NULL AND gridid='" . $gval['gridid'] . "'", '+'), true); } else { @(include 'grids/area_' . $gval['gridid'] . '.htm'); } print '</map>'; if ($_GET['zoom']) { print '<div id="zoom" onmouseover="zoom_on(event,' . $gwidth . ',' . $gheight . ',\'' . $gridfile . '?x=' . @filemtime($gridfile) . '\');" onmousemove="zoom_move(event);" onmouseout="zoom_off();">'; print '<img src="' . $gridfile . '?x=' . @filemtime($gridfile) . '" style="position:relative;z-index:0;padding:0;margin:0;border:0" width=' . $gwidth . ' height=' . $gheight . ' usemap="#grid_' . $gval['gridid'] . '" /></div>'; } else { print '<img src="' . $gridfile . '?x=' . @filemtime($gridfile) . '" width=' . $gwidth . ' height=' . $gheight . ' usemap="#grid_' . $gval['gridid'] . '" ' . ($gval['buy_on_click'] && !$gval['dontbuy'] ? ' onClick="if(!tooo) location.href=\'getp.php?gr=' . $gval['gridid'] . $trackpage_ . '\'" style="cursor:hand"' : '') . '>'; } // Jobs: Zufallspixel anzeigen --------------- if (is_array($SHOW_JOB[$gval['gridid']])) { print $SHOW_JOB[$gval['gridid']]['url'] . '<img src="' . $designpath . 'marked_pixel.gif" style="width:' . $gval['blocksize_x'] . ';height:' . $gval['blocksize_y'] . ';position:absolute;left:' . (fsubstr($SHOW_JOB[$gval['gridid']]['field'] - 1, -2) * $gval['blocksize_x'] + $x_plus) . 'px;top:' . ((int) (($SHOW_JOB[$gval['gridid']]['field'] - 1) / 100) * $gval['blocksize_y'] + $y_plus) . 'px;z-index:0"></a></div>'; } // ------------------------------------------- print '</td></tr></table>'; if ($gval['hoverimage'] || $gval['animated'] || is_array($SHOW_JOB[$gval['gridid']])) { print '</div>'; } // Jobs $TMP['%[GRIDS]%'] .= $TMP['%[GRID_' . $gval['gridid'] . ']%'] = ob_get_contents(); ob_end_clean(); if ($gval['show_box'] == !$_GET['zoom']) { $include_tooltip = true; } if ($gval['popup']) { $include_popup = true; }
include_once CONF . 'newsconf.php'; $news_Glink = '/news' . ($news_cat == '1' ? '/' : '-'); $news_Gpage = '/news' . ($news_cat == '1' ? '/' : '.html'); $lastnew = ""; $data = array_reverse(file($newsdbfilename)); $allnews = count($data); if ($allnews >= 1) { for ($i = 1; $i <= min($newsonmainpage, $allnews); $i++) { //$datas=unserialize(array_shift($data)); $datas = unserialize($data[$i - 1]); $head = $datas['head']; $head = str_replace(""", '"', $datas['head']); $mess = strip_tags($datas['mess']); $pubdate = $datas['pubdate']; $p = $allnews - $i + 1; if (fstrlen($head) > $lengthhead) { $head = fsubstr($head, 0, $lengthhead); } if (fstrlen($mess) > $lengthnews) { $mess = fsubstr($mess, 0, $lengthnews); } $head = close_dangling_tags($head); $mess = close_dangling_tags($mess); $mess .= ' <a href="' . cc_link($news_Glink . $p . '.html') . '" class="more">...' . __('читать далее') . '</a>'; $lastnew .= '<li><p class="title"><span class="news-date-time">' . $pubdate . '</span>, ' . $head . '</p><div class="entry">' . $mess . '</div></li>'; } $lastnew .= '<li id="nobackground"><div class="links"><a href="' . cc_link($news_Gpage) . '" class="more">' . __('все новости') . '</a></div></li>'; echo $lastnew; } else { echo '<li><p class="title">' . __('Записей нет!') . '</p></li>'; }
function makemap($only_premap = false, $dir = '', $gridid, $return = false, $results = '', $onlyarea = false) { global $gridsizes, $iformat, $CONFIG, $dbprefix, $designpath; @ini_set("memory_limit", "64M"); if (!$gridid) { return; } if (!($gdata = DB_query("SELECT * FROM " . $dbprefix . "grids WHERE gridid='" . (int) $gridid . "'", '*'))) { return; } if (!($data = DB_array("SELECT * FROM " . $dbprefix . "user WHERE gridid='" . (int) $gridid . "'", '*'))) { $data = array(); } if ($gdata['reserve_pixel']) { $only_premap = false; } $gdata['transparency'] = (int) $gdata['transparency'] > 0 ? 100 - $gdata['transparency'] : 100; $gdata['transparency_grey'] = (int) $gdata['transparency_grey'] > 0 ? 100 - $gdata['transparency_grey'] : 100; $BLOCKSIZE_X = $gdata['blocksize_x']; $BLOCKSIZE_Y = $gdata['blocksize_y']; $width = $gdata['grid_type'] ? $gridsizes[$gdata['grid_type']]['x'] : (int) ($gdata['x'] * $BLOCKSIZE_X); $height = $gdata['grid_type'] ? $gridsizes[$gdata['grid_type']]['y'] : (int) ($gdata['y'] * $BLOCKSIZE_Y); $x_plus = $gridsizes[$gdata['grid_type']]['x+']; $y_plus = $gridsizes[$gdata['grid_type']]['y+']; if (!$onlyarea) { if ((int) $gdata['grid_type']) { $grid_template = $dir . 'incs/grid_banner/' . (int) $gdata['grid_type'] . '.png'; $grid_template_premap = @file_exists($dir . 'incs/grid_banner/premap_' . (int) $gdata['grid_type'] . '.png') ? $dir . 'incs/grid_banner/premap_' . (int) $gdata['grid_type'] . '.png' : $grid_template; } else { $grid_template = $dir . 'incs/grid_templates/' . html_entity_decode(stripslashes($gdata['grid_template'])); $grid_template_premap = @file_exists($dir . 'incs/grid_templates/premap_' . html_entity_decode(stripslashes($gdata['grid_template']))) ? $dir . 'incs/grid_templates/premap_' . html_entity_decode(stripslashes($gdata['grid_template'])) : $grid_template; } if (!($checkextension = @getimagesize($grid_template))) { return; } $grid_template_ext = strtolower($checkextension[2]); if (!(int) $gdata['grid_type'] && stristr($gdata['grid_template'], '_block_')) { $grid_create_from_block = true; } if (!$only_premap) { if (!($dest = @imagecreatetruecolor($width, $height))) { $dest = imagecreate($width, $height); } if ($grid_template_ext == 3) { $dest_blank = imagecreatefrompng($grid_template); } elseif ($grid_template_ext == 2) { $dest_blank = imagecreatefromjpeg($grid_template); } elseif ($grid_template_ext == 1) { $dest_blank = imagecreatefromgif($grid_template); } if ($grid_create_from_block) { for ($i = 0; $i < $gdata['y']; $i++) { for ($j = 0; $j < $gdata['x']; $j++) { imagecopyresized($dest, $dest_blank, $j * $BLOCKSIZE_X, $i * $BLOCKSIZE_Y, 0, 0, $BLOCKSIZE_X, $BLOCKSIZE_Y, $checkextension[0], $checkextension[1]); } } } else { imagecopy($dest, $dest_blank, 0, 0, 0, 0, $width, $height); } imagedestroy($dest_blank); } if (!($dest_premap = @imagecreatetruecolor($width, $height))) { $dest_premap = imagecreate($width, $height); } if ($grid_template_ext == 3) { $dest_premap_blank = imagecreatefrompng($grid_template_premap); } elseif ($grid_template_ext == 2) { $dest_premap_blank = imagecreatefromjpeg($grid_template_premap); } elseif ($grid_template_ext == 1) { $dest_premap_blank = imagecreatefromgif($grid_template_premap); } if ($grid_create_from_block) { for ($i = 0; $i < $gdata['y']; $i++) { for ($j = 0; $j < $gdata['x']; $j++) { imagecopyresized($dest_premap, $dest_premap_blank, $j * $BLOCKSIZE_X, $i * $BLOCKSIZE_Y, 0, 0, $BLOCKSIZE_X, $BLOCKSIZE_Y, $checkextension[0], $checkextension[1]); } } } else { imagecopy($dest_premap, $dest_premap_blank, 0, 0, 0, 0, $width, $height); } imagedestroy($dest_premap_blank); $src_reserved = imagecreatetruecolor($BLOCKSIZE_X, $BLOCKSIZE_Y); if (!empty($gdata['reserve_bgcolor'])) { $rgb = hex2rgb($gdata['reserve_bgcolor']); imagefill($src_reserved, 0, 0, ImageColorAllocate($src_reserved, $rgb[0], $rgb[1], $rgb[2])); } else { $src_res = imagecreatefrompng($dir . $designpath . 'reserved_pixel.png'); $reserved_x = imagesx($src_res); $reserved_y = imagesy($src_res); if ($reserved_x != $BLOCKSIZE_X || $reserved_y != $BLOCKSIZE_Y) { if (function_exists("imagecopyresampled")) { imagecopyresampled($src_reserved, $src_res, 0, 0, 0, 0, $BLOCKSIZE_X, $BLOCKSIZE_Y, $reserved_x, $reserved_y); } else { imagecopyresized($src_reserved, $src_res, 0, 0, 0, 0, $BLOCKSIZE_X, $BLOCKSIZE_Y, $reserved_x, $reserved_y); } } imagedestroy($src_res); } $imagemap = array(); if ($gdata['grid_type']) { $imagemap[] = '<area shape="rect" coords="' . $gridsizes[$gdata['grid_type']]['x1'] . ',' . $gridsizes[$gdata['grid_type']]['y1'] . ',' . $gridsizes[$gdata['grid_type']]['x2'] . ',' . $gridsizes[$gdata['grid_type']]['y2'] . '" href="' . $CONFIG['scriptpath'] . '/getp.php?gr=' . $gridid . '&pa=' . $gdata['page_id'] . '" target="_blank" />'; } } while (list(, $d) = each($data)) { if (is_array($results)) { if (!in_array($d['userid'], $results)) { $gdata['transparency'] = 8; $nomap = true; } else { $gdata['transparency'] = 100; $nomap = false; } $gdata['animated'] = $gdata['hoverimage'] = false; } unset($top, $left, $tops, $lefts, $f_hidden, $koordinaten, $start, $x, $y, $imap); $f_hidden = explode(',', $d['felder']); sort($f_hidden); while (list(, $v) = each($f_hidden)) { $tops[] = (int) (($v - 1) / 100) * $BLOCKSIZE_Y; $lefts[] = fsubstr($v - 1, -2) * $BLOCKSIZE_X; } sort($tops); sort($lefts); reset($f_hidden); if (!$onlyarea) { if ($d['submit'] && !$d['reserved'] && $gdata['hoverimage']) { $imghover = '<image src="grids/u' . $d['userid'] . '.png?x=' . time() . '" border="0" id="tt' . $d['userid'] . 'b" style="position:absolute; top:' . $tops[0] . 'px; left:' . $lefts[0] . 'px;display:none" '; } if ($d['submit'] && !$d['reserved'] && $gdata['animated']) { $imganimasize = @getimagesize($dir . 'grids/u' . $d['userid'] . '.png'); $imganimapic = @file_exists($dir . 'grids/u' . $d['userid'] . '_orig' . $d['bildext']) ? '_orig' . $d['bildext'] : '.png'; $imganima = '<image src="grids/u' . $d['userid'] . $imganimapic . '?x=' . time() . '" border="0" id="tt' . $d['userid'] . 'b" style="position:absolute;top:' . $tops[0] . 'px; left:' . $lefts[0] . 'px;z-index:0" ' . $imganimasize[3] . ' '; } $CONFIG['reduce_memory'] = 1; if ($CONFIG['reduce_memory'] && @file_exists($dir . 'grids/u' . $d['userid'] . '.png')) { $src = imagecreatefrompng($dir . 'grids/u' . $d['userid'] . '.png'); } else { $src = imagecreatefromstring(base64_decode($d['bild'])); } if ($return === false || is_string($return)) { if ($CONFIG['reduce_memory'] && @file_exists($dir . 'grids/u' . $d['userid'] . '.png')) { $src_pre = imagecreatefrompng($dir . 'grids/u' . $d['userid'] . '.png'); } else { $src_pre = imagecreatefromstring(base64_decode($d['bild'])); } for ($i = 0; $i < imagecolorstotal($src_pre); $i++) { $f = imagecolorsforindex($src_pre, $i); $gst = ($f["red"] + $f["green"] + $f["blue"]) / 3; imagecolorset($src_pre, $i, $gst, $gst, $gst); } } $RES = false; } while (list(, $v) = each($f_hidden)) { $top = (int) (($v - 1) / 100) * $BLOCKSIZE_Y + $y_plus; $left = fsubstr($v - 1, -2) * $BLOCKSIZE_X + $x_plus; if (!$start) { $start = "{$left},{$top}"; $ende = "{$left}," . ($top + $BLOCKSIZE_Y); $x = $left; $y = $top; } if (!$only_premap) { if ($d['submit'] && !$d['reserved']) { if (!$onlyarea) { imagecopymerge($dest, $src, $left, $top, $left - $lefts[0], $top - $tops[0], $BLOCKSIZE_X, $BLOCKSIZE_Y, $gdata['transparency']); } $koordinaten["{$left},{$top}"] = true; $koordinaten[$left + $BLOCKSIZE_X . ",{$top}"] = true; $koordinaten[$left + $BLOCKSIZE_X . "," . ($top + $BLOCKSIZE_Y)] = true; $koordinaten["{$left}," . ($top + $BLOCKSIZE_Y)] = true; } elseif ($gdata['reserve_pixel'] && !$onlyarea) { if ((int) $gdata['transparency'] > 0) { imagecopymerge($dest, $src_reserved, $left, $top, 0, 0, $BLOCKSIZE_X, $BLOCKSIZE_Y, $gdata['transparency']); } elseif (function_exists("imagecopyresampled")) { imagecopyresampled($dest, $src_reserved, $left, $top, 0, 0, $BLOCKSIZE_X, $BLOCKSIZE_Y, $BLOCKSIZE_X, $BLOCKSIZE_Y); } else { imagecopyresized($dest, $src_reserved, $left, $top, 0, 0, $BLOCKSIZE_X, $BLOCKSIZE_Y, $BLOCKSIZE_X, $BLOCKSIZE_Y); } } } if ($return === false || is_string($return)) { if ($d['submit'] && !$d['reserved'] && !$onlyarea) { imagecopymerge($dest_premap, $src_pre, $left, $top, $left - $lefts[0], $top - $tops[0], $BLOCKSIZE_X, $BLOCKSIZE_Y, $gdata['transparency_grey']); } elseif (!$onlyarea) { if ((int) $gdata['transparency_grey'] > 0) { imagecopymerge($dest_premap, $src_reserved, $left, $top, 0, 0, $BLOCKSIZE_X, $BLOCKSIZE_Y, $gdata['transparency_grey']); } elseif (function_exists("imagecopyresampled")) { imagecopyresampled($dest_premap, $src_reserved, $left, $top, 0, 0, $BLOCKSIZE_X, $BLOCKSIZE_Y, $BLOCKSIZE_X, $BLOCKSIZE_Y); } else { imagecopyresized($dest_premap, $src_reserved, $left, $top, 0, 0, $BLOCKSIZE_X, $BLOCKSIZE_Y, $BLOCKSIZE_X, $BLOCKSIZE_Y); } } if (!$RES && (!$d['submit'] || $d['reserved']) && $gdata['reserve_char'] && $gdata['reserve_charcolor'] && !$onlyarea) { $RES = true; $rgb = hex2rgb($gdata['reserve_charcolor']); imageString($dest_premap, $gdata['reserve_charsize'], $left + 2, $top + 2, $gdata['reserve_char'], ImageColorAllocate($dest_premap, $rgb[0], $rgb[1], $rgb[2])); if ($gdata['reserve_pixel']) { imageString($dest, $gdata['reserve_charsize'], $left + 2, $top + 2, $gdata['reserve_char'], ImageColorAllocate($dest, $rgb[0], $rgb[1], $rgb[2])); } } } } if (!$onlyarea) { if ($return === false || is_string($return)) { @imagedestroy($src_pre); } @imagedestroy($src); } if ($koordinaten && !$nomap) { $imap = array(); $imap[0] = $start; $nrichtung = 4; $lrichtung = 2; do { if ($koordinaten["{$x}," . ($y - $BLOCKSIZE_Y)] && !in_array("{$x}," . ($y - $BLOCKSIZE_Y), $imap) && $nrichtung == 1) { if ($lrichtung != 1) { $imap[] = "{$x},{$y}"; } $nrichtung = 3; $lrichtung = 1; $y -= $BLOCKSIZE_Y; } elseif ($koordinaten[$x + $BLOCKSIZE_X . ",{$y}"] && !in_array($x + $BLOCKSIZE_X . ",{$y}", $imap) && $nrichtung == 2) { if ($lrichtung != 2) { $imap[] = "{$x},{$y}"; } $nrichtung = 0; $lrichtung = 2; $x += $BLOCKSIZE_X; } elseif ($koordinaten["{$x}," . ($y + $BLOCKSIZE_Y)] && !in_array("{$x}," . ($y + $BLOCKSIZE_Y), $imap) && $nrichtung == 3) { if ($lrichtung != 3) { $imap[] = "{$x},{$y}"; } $nrichtung = 1; $lrichtung = 3; $y += $BLOCKSIZE_Y; } elseif ($koordinaten[$x - $BLOCKSIZE_X . ",{$y}"] && !in_array($x - $BLOCKSIZE_X . ",{$y}", $imap) && $nrichtung == 4) { if ($lrichtung != 4) { $imap[] = "{$x},{$y}"; } $nrichtung = 2; $lrichtung = 4; $x -= $BLOCKSIZE_X; } $nrichtung = $nrichtung == 4 ? 1 : $nrichtung + 1; } while ("{$x},{$y}" != $ende && $i++ < 10000); $imap[] = $ende; $href = !$gdata['real_url'] || empty($d['url']) ? 'index.php?u=' . $d['userid'] : $d['url']; $hits = $gdata['track_clicks'] && $gdata['show_clicks'] ? ' (' . $d['hits'] . ')' : ''; $hits_tt = $gdata['track_clicks'] && $gdata['show_clicks'] ? $d['hits'] : ''; if (empty($d['target'])) { $blank = $gdata['new_window'] ? ' target="_blank"' : ''; } else { $blank = ' target="' . htmlspecialchars($d['target'], ENT_QUOTES) . '"'; } $onMouseOut = 'onMouseOut="htoo(\'tt' . $d['userid'] . 'a\')"'; $title = $gdata['show_box'] ? ' onMouseOver="stoo(\'tt' . $d['userid'] . '\')" ' . (!$imghover ? $onMouseOut : '') : 'title="' . htmlspecialchars(stripslashes($d['title'])) . $hits . '" ' . ($imghover ? 'onMouseOver="document.getElementById(\'tt' . $d['userid'] . 'b\').style.display = \'block\';if(bi) bi.style.display=\'none\'" onMouseOut="document.getElementById(\'tt' . $d['userid'] . 'b\').style.display = \'none\'"' : ''); if (!$d['title']) { $d['title'] = $d['url']; } $tooltipcontent = eregi_replace('_TITLE_', stripslashes($d['title']), stripslashes($gdata['tooltip_layout'])); $tooltipcontent = eregi_replace('_HITS_', $hits_tt, $tooltipcontent); $tooltipcontent = eregi_replace('_PIXEL_', '<img src="grids/u' . $d['userid'] . '.png?x=' . time() . '">', $tooltipcontent); $endung = stristr($tooltipcontent, '_IMAGE_') && !@file_exists($dir . 'grids/u' . $d['userid'] . '_orig' . $d['bildext']) || !$gdata['image_saveorig'] ? '.png' : '_orig' . $d['bildext']; $tooltipcontent = eregi_replace('_IMAGE_', '<img src="grids/u' . $d['userid'] . $endung . '?x=' . time() . '">', $tooltipcontent); $onClick = $gdata['real_url'] && !empty($d['url']) ? ' onClick="window.open(\'index.php?u=' . $d['userid'] . '\',\'' . htmlspecialchars($d['target'], ENT_QUOTES) . '\');return false"' : ''; if ($gdata['popup'] && empty($d['url'])) { $href = 'javascript:P(\'' . $href . '\',\'' . $d['userid'] . '\',\'sr\',' . (int) $gdata['popup_width'] . ',' . (int) $gdata['popup_height'] . ')'; $blank = ''; } $tooltips[] = '<div class="tooltip_' . $gdata['gridid'] . '" id="tt' . $d['userid'] . '">' . $tooltipcontent . '</div>'; $imagemap[] = '<area shape="poly" coords="' . @implode(',', $imap) . '" href="' . $href . '" ' . $title . $blank . $onClick . '>'; if ($imghover) { $imagehover[] = '<a href="' . $href . '"' . $blank . $onClick . '>' . $imghover . ' ' . ($gdata['show_box'] ? 'onMouseOver="an=false;stoo(\'tt' . $d['userid'] . '\')" ' . $onMouseOut . '"></a>' : 'onMouseOver="this.style.display = \'block\';bi=document.getElementById(\'tt' . $d['userid'] . 'b\')" onMouseOut="this.style.display = \'none\'"'); } if ($imganima) { $imganimate[] = '<a href="' . $href . '"' . $blank . $onClick . '>' . $imganima . ' ' . ($gdata['show_box'] ? 'onMouseOver="an=true;stoo(\'tt' . $d['userid'] . '\')" ' . $onMouseOut . '"></a>' : ''); } } } @imagedestroy($src_reserved); $quality = $gdata['image_reduce'] && $gdata['image_format'] == 2 ? '75' : '100'; if (!$only_premap) { if (!$onlyarea) { if ($gdata['image_interlace']) { imageinterlace($dest, 1); } if ($gdata['image_reduce'] && function_exists("imagetruecolortopalette") && $gdata['image_format'] == 1) { imagetruecolortopalette($dest, true, 256); } $gridsavepath = $dir . 'grids/grid_' . $gdata['gridid'] . '.' . $iformat[$gdata['image_format']]; $pregridsavepath = $dir . 'grids/pregrid_' . $gdata['gridid'] . '.' . $iformat[$gdata['image_format']]; $areasavepath = $dir . 'grids/area_' . $gdata['gridid'] . '.htm'; if ($return && is_string($return)) { $gridsavepath = $dir . $return . '/grid_' . $gdata['gridid'] . '.' . $iformat[$gdata['image_format']]; $pregridsavepath = $dir . $return . '/pregrid_' . $gdata['gridid'] . '.' . $iformat[$gdata['image_format']]; $areasavepath = $dir . $return . '/area_' . $gdata['gridid'] . '.htm'; } elseif ($return === true) { $gridsavepath = false; $pregridsavepath = false; $areasavepath = false; } if ($gridsavepath) { if ($gdata['image_format'] == 1) { imagepng($dest, $gridsavepath); } elseif ($gdata['image_format'] == 2) { imagejpeg($dest, $gridsavepath, $quality); } elseif ($gdata['image_format'] == 3) { imagegif($dest, $gridsavepath); } } else { if ($gdata['image_format'] == 1) { header("Content-type: image/png"); imagepng($dest); } elseif ($gdata['image_format'] == 2) { header("Content-type: image/jpeg"); imagejpeg($dest, '', $quality); } elseif ($gdata['image_format'] == 3) { header("Content-type: image/gif"); imagegif($dest); } } if ($return === false) { $small_width = 200; $small_height = 200; $orig_height = round($small_width * $height / $width); if ($orig_height > $small_height) { $small_width = round($width / ($height / $small_height)); $orig_height = $small_height; } if (!($admin_dest = @imagecreatetruecolor($small_width, $orig_height))) { $admin_dest = imagecreate($small_width, $orig_height); } if (!@imagecopyresampled($admin_dest, $dest, 0, 0, 0, 0, $small_width, $orig_height, $width, $height)) { imagecopyresized($admin_dest, $dest, 0, 0, 0, 0, $small_width, $orig_height, $width, $height); } imagepng($admin_dest, $dir . 'grids/grid_' . $gdata['gridid'] . '_small.png'); imagedestroy($admin_dest); } imagedestroy($dest); } $toolt = '<style> .tooltip_' . $gdata['gridid'] . ' { position:absolute;z-index:1;display:none; ' . stripslashes($gdata['tooltip_style']) . ' } </style> '; if ($areasavepath) { $handle = fopen($areasavepath, "w"); if ($tooltips) { fwrite($handle, $toolt . implode(" ", $tooltips)); } if ($imagemap) { fwrite($handle, implode(" ", $imagemap)); } if ($imagehover) { fwrite($handle, implode(" ", $imagehover)); } if ($imganimate) { fwrite($handle, implode(" ", $imganimate)); } fclose($handle); } elseif ($onlyarea) { if ($tooltips) { print $toolt . implode(" ", $tooltips); } if ($imagemap) { print implode(" ", $imagemap); } } } if ($pregridsavepath) { if ($gdata['image_interlace']) { imageinterlace($dest_premap, 1); } if ($gdata['image_reduce'] && function_exists("imagetruecolortopalette") && $gdata['image_format'] == 1) { imagetruecolortopalette($dest_premap, true, 256); } if ($gdata['image_format'] == 1) { imagepng($dest_premap, $pregridsavepath); } elseif ($gdata['image_format'] == 2) { imagejpeg($dest_premap, $pregridsavepath, $quality); } elseif ($gdata['image_format'] == 3) { imagegif($dest_premap, $pregridsavepath); } imagedestroy($dest_premap); return true; } }
echo '<div class="title"><h2><a href="' . cc_link($news_Glink . $newnum . '.html') . '">' . $head . '</a></h2></div><div class="entry">' . $startnews . '</div><br />'; echo '<p class="links">' . $pubdata_text . '<a href="' . cc_link($news_Glink . $newnum . '.html#comment_begin') . '"> | ' . __('Комментарии') . ': ' . getcountcomments($new['id'], $commentsdbfilename, $moder_comments) . '</a> | <a href="' . cc_link($news_Glink . $newnum . '.html') . '" class="comments">' . __('Читать полностью') . '</a></p><br /><br />'; } } elseif (file_exists(ARTICLES . $data[2] . '.dat')) { $artdata = file_get_contents(ARTICLES . $data[2] . '.dat'); $hs_text = articlesparam('title', $artdata); $s_text = articlesparam('content', $artdata); $pubdata_text = articlesparam('pubdate', $artdata); if (!empty($pubdata_text)) { $pubdata_text = date('d.m.Y', $pubdata_text) . ' | '; } $pos = strpos($s_text, ' ', min(strlen($s_text), $saftertitle)); if ($pos) { $s_text = substr($s_text, 0, $pos); } $s_text .= '....'; $s_text = close_dangling_tags($s_text); if (substr($data[2], -4) == 'main') { $aname = fsubstr($data[2], 0, -4); } else { $aname = $data[2] . '.html'; } echo '<div class="title"><h2>' . art_catalog($data[2], '->') . '<a href="' . cc_link($aname) . '" name="' . str_replace('/', '--', $aname) . '">' . $hs_text . '</a></h2></div><div class="entry">' . $s_text . '</div><br />'; echo '<p class="links">' . $pubdata_text . '<a href="' . cc_link('/' . $aname . '#comment_begin') . '">' . __('Комментарии') . ': ' . getcountcomments(0, ARTICLES . $data[2] . '.dat.comment', $moder_comments) . '</a> | <a href="' . cc_link('/' . $aname) . '" class="comments">' . __('Читать полностью') . '</a></p><br /><br />'; } $arrclouds[$data[0]] = $arrclouds[$data[0]] + 1; } } } } }
if (is_array($f_hidden)) { $f_hidden = array_unique($f_hidden); while (list(, $v) = each($f_hidden)) { if ($_GET['zonetype'] == '') { $price_cats_color = ''; for ($i = 0; $i < count($spi_felder); $i++) { if (strpos(',' . $spi_felder[$i]['felder'] . ',', ',' . $v . ',') !== false) { $price_cats_color = $price_cats[$spi_felder[$i]['zonetype']]['price_color']; break; } } } if (!$price_cats_color) { $price_cats_color = $zoneselect_color; } $FL .= '<table height=' . $BLOCKSIZE_Y . ' width=' . $BLOCKSIZE_X . ' style="background-color:' . $price_cats_color . ';position:absolute;left:' . (fsubstr($v - 1, -2) * $BLOCKSIZE_X + $x_plus) . ';top:' . ((int) (($v - 1) / 100) * $BLOCKSIZE_Y + $y_plus) . ';z-index:0"><tr><td></td></tr></table>'; } reset($f_hidden); } if ($_GET['zonetype'] != '') { if (!$f_hidden_zoneid && !empty($f_hidden)) { $f_hidden_zoneid = DB_query("INSERT INTO " . $dbprefix . "zones SET zonetype='" . (int) $_GET['zonetype'] . "',gridid='" . (int) $_GET['gr'] . "',felder='" . @implode(',', $f_hidden) . "'", '##'); } elseif ($f_hidden_zoneid && $f_hidden_zoneid == (int) $_GET['zoneid']) { if (empty($f_hidden)) { DB_query("DELETE FROM " . $dbprefix . "zones WHERE zoneid='" . $f_hidden_zoneid . "' LIMIT 1", '#'); } else { DB_query("UPDATE " . $dbprefix . "zones SET zonetype='" . (int) $_GET['zonetype'] . "',gridid='" . (int) $_GET['gr'] . "',felder='" . @implode(',', $f_hidden) . "' WHERE zoneid='" . $f_hidden_zoneid . "' LIMIT 1", '##'); } } } } elseif ($_GET['op'] == 'prices') {
$jobs_random_grid = DB_query("SELECT * FROM " . $dbprefix . "grids WHERE active=1 AND gridid='" . $job['job_gridid'] . "' {$jobs_gridpayed}", '*'); } else { $jobs_random_grid = DB_query("SELECT * FROM " . $dbprefix . "grids WHERE active=1 {$jobs_gridpayed} ORDER BY RAND() LIMIT 1", '*'); } $jobs_random_fieldnr = $jobs_random_grid['grid_type'] ? (int) rand(1, $gridsizes[$jobs_random_grid['grid_type']]['pix']) : (int) rand(1, $jobs_random_grid['x'] * $jobs_random_grid['y']); $jobs_random_gridid = $jobs_random_grid['gridid']; $jobs_random_blocksize_x = $jobs_random_grid['grid_type'] ? 10 : $jobs_random_grid['blocksize_x']; $jobs_random_blocksize_y = $jobs_random_grid['grid_type'] ? 10 : $jobs_random_grid['blocksize_y']; $jobs_random_x_plus = $jobs_random_grid['grid_type'] ? $gridsizes[$jobs_random_grid['grid_type']]['x+'] : 0; $jobs_random_y_plus = $jobs_random_grid['grid_type'] ? $gridsizes[$jobs_random_grid['grid_type']]['y+'] : 0; // Usertreffer? $jobs_random_field = DB_query("SELECT * FROM " . $dbprefix . "user WHERE '{$jobs_random_fieldnr}' IN(felder) AND gridid='" . $jobs_random_grid['gridid'] . "' AND submit IS NOT NULL", '*'); } if ($jobs_random_fieldnr) { $jobs_posx = (int) (($jobs_random_fieldnr - 1) / 100) * $jobs_random_blocksize_x + $jobs_random_x_plus; $jobs_posy = fsubstr($jobs_random_fieldnr - 1, -2) * $jobs_random_blocksize_y + $jobs_random_y_plus; $jobs_positions = $jobs_posx . "/" . $jobs_posy; } $job_inactive_now = $job['job_date'] ? 'job_active=0,' : ''; DB_query("UPDATE " . $dbprefix . "jobs SET " . $job_inactive_now . "job_laststart=NOW(),job_selected_userid='" . $jobs_random_field['userid'] . "',job_selected_field=" . (int) $jobs_random_fieldnr . ",job_selected_gridid='" . $jobs_random_gridid . "',job_selected_position='" . $jobs_positions . "' WHERE job_id='" . $job['job_id'] . "'", '#'); $tmp['%[GRIDID]%'] = $jobs_random_gridid; $tmp['%[FIELD]%'] = $jobs_random_fieldnr; $tmp['%[POS_X]%'] = $jobs_posx; $tmp['%[POS_Y]%'] = $jobs_posy; // Mail an User if ($job['job_email_user'] && $jobs_random_field['email']) { // Sprache checken if ($jobs_random_field['lang'] != $CONFIG['standard_language']) { if (!$active_languages) { $active_languages = DB_array("SELECT code FROM " . $dbprefix . "languages WHERE active=1", '+'); }
if (count($f_hidden) > 0) { $tmp['%[BETRAG]%'] = $tmp['%[AMOUNT]%'] = $BETRAG > 0 ? '<br>' . $_SP[26] . ' ' . number_format($BETRAG, $CURR_DEC, $LANG_ACTIVE[$lang]['dec_point'], $LANG_ACTIVE[$lang]['thousands']) . ' ' . $CURR : ''; } if (count($f_hidden) > 0 && $MWST > 0) { $tmp['%[VAT]%'] = $tmp['%[MWST]%'] = number_format($MWST, 1, $LANG_ACTIVE[$lang]['dec_point'], $LANG_ACTIVE[$lang]['thousands']) . ' %'; $tmp['%[BETRAG]%'] = $tmp['%[AMOUNT]%'] = $tmp['%[AMOUNT]%'] . '<br>' . ($MWST_ADD ? sprintf($_SP[101], $tmp['%[VAT]%']) : sprintf($_SP[100], $tmp['%[VAT]%'])); } else { $tmp['%[VAT]%'] = $tmp['%[MWST]%'] = ''; } if (count($f_hidden) > 1) { $tmp['%[SELECTED_PIXEL_INFO]%'] = count($f_hidden) . ' ' . $_SP[28] . ' '; } elseif (count($f_hidden) == 1) { $tmp['%[SELECTED_PIXEL_INFO]%'] = count($f_hidden) . ' ' . $_SP[27] . ' '; } while (list(, $v) = each($f_hidden)) { $FL .= '<img src="' . $blockimg . '" height="' . $BLOCKSIZE_Y . '" width="' . $BLOCKSIZE_X . '" border="0" style="position:absolute;left:' . (fsubstr($v - 1, -2) * $BLOCKSIZE_X + $x_plus) . 'px;top:' . ((int) (($v - 1) / 100) * $BLOCKSIZE_Y + $y_plus) . 'px;z-index:0">'; } } ob_start(); ?> <table width=<?php echo $gwidth; ?> height=<?php echo $gheight; ?> style="background: url(<?php echo $gridfile; ?> ?x=<?php echo @filemtime($gridfile);
$f_hidden = explode(',', $logindata['felder']); $BLOCKSIZE_X = $logindata['blocksize_x']; $BLOCKSIZE_Y = $logindata['blocksize_y']; while (list(, $v) = each($f_hidden)) { $tops[] = (int) (($v - 1) / 100) * $BLOCKSIZE_Y; $lefts[] = fsubstr($v - 1, -2) * $BLOCKSIZE_X; } sort($tops); sort($lefts); $hoehe = $tops[count($tops) - 1] - $tops[0]; $breite = $lefts[count($lefts) - 1] - $lefts[0]; reset($f_hidden); $xy = array(); while (list(, $v) = each($f_hidden)) { $top = (int) (($v - 1) / 100) * $BLOCKSIZE_Y; $left = fsubstr($v - 1, -2) * $BLOCKSIZE_X; $xy[(int) $i]['x'] = $left - $lefts[0]; $xy[(int) $i++]['y'] = $top - $tops[0]; } reset($f_hidden); $imageinfo = getimagesize($_FILES['upload']['tmp_name']); $imagetype = array(1 => '.gif', '.jpg', '.png'); if ($imageinfo[2] > 0 && $imageinfo[2] < 4) { $Ext = $imagetype[$imageinfo[2]]; $image = $_FILES['upload']['tmp_name']; } //-> Logo generieren $logineditprocess = true; if ($Ext) { $temp_pic = (include 'ci.php'); } else {
$aname = str_replace('.dat%', '', $key . '%'); $hs_text = articlesparam('title', $data); $s_text = articlesparam('content', $data); $pubdata_text = articlesparam('pubdate', $data); if (!empty($pubdata_text)) { $pubdata_text = date('d.m.Y', $pubdata_text) . ' | '; } $pos = @fstrpos($s_text, ' ', 1000); if ($pos) { $s_text = fsubstr($s_text, 0, $pos); } $s_text .= "...."; $s_text = close_dangling_tags($s_text); $commentsfilename = ARTICLES . $aname . '.dat.comment'; if (substr($aname, -4) == 'main') { $aname = fsubstr($aname, 0, fstrlen($aname) - 4); } else { $aname .= '.html'; } echo '<div class="title"><h2>' . art_catalog($key, '->') . '<a href="' . cc_link('/' . $aname) . '" name="' . str_replace('/', '--', $aname) . '">' . $hs_text . '</a></h2></div><div class="entry">' . $s_text . '</div><br />'; echo '<p class="links">' . $pubdata_text . '<a href="' . cc_link('/' . $aname . '#comment_begin') . '">' . __('Комментарии') . ': ' . getcountcomments(0, $commentsfilename, $moder_comments) . '</a> | <a href="' . cc_link('/' . $aname) . '" class="comments">' . __('Читать полностью') . '</a></p><br /><br />'; } } $index_arr++; } echo '<div id="navigation"><b>' . __('Страницы') . ':</b> '; $all = ceil($countallstati / $sperpage); for ($i = 1; $i <= $all; $i++) { if ($_REQUEST['page'] == $i) { echo '«<b>' . $i . '</b>» '; } else {