seregatrash 0 Опубликовано: 11 мая 2009 Рассказать Опубликовано: 11 мая 2009 Зайдите пожалуйсто на сайт http://prostoshara.ru/ и посмотрите на верх сайта что это за ошибка такая: Warning: Cannot modify header information - headers already sent by (output started at /var/www/seregatrash/data/www/prostoshara.ru/index.php:1) in /var/www/seregatrash/data/www/prostoshara.ru/engine/modules/functions.php on line 866 Warning: Cannot modify header information - headers already sent by (output started at /var/www/seregatrash/data/www/prostoshara.ru/index.php:1) in /var/www/seregatrash/data/www/prostoshara.ru/engine/modules/functions.php on line 866 Warning: Cannot modify header information - headers already sent by (output started at /var/www/seregatrash/data/www/prostoshara.ru/index.php:1) in /var/www/seregatrash/data/www/prostoshara.ru/engine/modules/functions.php on line 866 Подскажите пожалуйсто что делать!!!!!!!!!!!!!!!! Цитата Ссылка на сообщение Поделиться на других сайтах
svlogic 0 Опубликовано: 11 мая 2009 Рассказать Опубликовано: 11 мая 2009 1. у тебя на сайте троян! 2. открой файл engine/modules/functions.php и посмотри что у тебя в 866 строке Цитата Ссылка на сообщение Поделиться на других сайтах
seregatrash 0 Опубликовано: 11 мая 2009 Рассказать Опубликовано: 11 мая 2009 Автор 1. у тебя на сайте троян! 2. открой файл engine/modules/functions.php и посмотри что у тебя в 866 строке у меня нет такой строки вот все что там есть: может хто знает помогите пожалуйсто я просто не знаю что тут надо удалять если что тут не так <?PHP /* ===================================================== DataLife Engine - by SoftNews Media Group ----------------------------------------------------- http://dle-news.ru/ ----------------------------------------------------- Copyright © 2004,2009 SoftNews Media Group ===================================================== Данный код защищен авторскими правами ===================================================== Файл: functions.php ----------------------------------------------------- Назначение: Основные функции ===================================================== */ if( ! defined( 'DATALIFEENGINE' ) ) { die( "Hacking attempt!" ); } function formatsize($file_size) { if( $file_size >= 1073741824 ) { $file_size = round( $file_size / 1073741824 * 100 ) / 100 . " Gb"; } elseif( $file_size >= 1048576 ) { $file_size = round( $file_size / 1048576 * 100 ) / 100 . " Mb"; } elseif( $file_size >= 1024 ) { $file_size = round( $file_size / 1024 * 100 ) / 100 . " Kb"; } else { $file_size = $file_size . " b"; } return $file_size; } class microTimer { function start() { global $starttime; $mtime = microtime(); $mtime = explode( ' ', $mtime ); $mtime = $mtime[1] + $mtime[0]; $starttime = $mtime; } function stop() { global $starttime; $mtime = microtime(); $mtime = explode( ' ', $mtime ); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; $totaltime = round( ($endtime - $starttime), 5 ); return $totaltime; } } function flooder($ip) { global $config, $db; $this_time = time() + ($config['date_adjust'] * 60) - $config['flood_time']; $db->query( "DELETE FROM " . PREFIX . "_flood where id < '$this_time'" ); $sql_flood = "SELECT * FROM " . PREFIX . "_flood WHERE ip = '$ip'"; if( $db->num_rows( $db->query( $sql_flood ) ) > 0 ) { $db->free(); return TRUE; } else { $db->free(); return FALSE; } } function totranslit($var, $lower = true, $punkt = true) { $NpjLettersFrom = "абвгдезиклмнопрстуфцыі"; $NpjLettersTo = "abvgdeziklmnoprstufcyi"; $NpjBiLetters = array ("й" => "j", "ё" => "yo", "ж" => "zh", "х" => "x", "ч" => "ch", "ш" => "sh", "щ" => "shh", "э" => "ye", "ю" => "yu", "я" => "ya", "ъ" => "", "ь" => "", "ї" => "yi", "є" => "ye" ); $NpjCaps = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЪЫЭЮЯЇЄІ"; $NpjSmall = "абвгдеёжзийклмнопрстуфхцчшщьъыэюяїєі"; $var = str_replace( ".php", "", $var ); $var = trim( strip_tags( $var ) ); $var = preg_replace( "/\s+/ms", "-", $var ); $var = strtr( $var, $NpjCaps, $NpjSmall ); $var = strtr( $var, $NpjLettersFrom, $NpjLettersTo ); $var = strtr( $var, $NpjBiLetters ); if ( $punkt ) $var = preg_replace( "/[^a-z0-9\_\-.]+/mi", "", $var ); else $var = preg_replace( "/[^a-z0-9\_\-]+/mi", "", $var ); $var = preg_replace( '#[\-]+#i', '-', $var ); if ( $lower ) $var = strtolower( $var ); if( strlen( $var ) > 50 ) { $var = substr( $var, 0, 50 ); if( ($temp_max = strrpos( $var, '-' )) ) $var = substr( $var, 0, $temp_max ); } return $var; } function langdate($format, $stamp) { global $langdate; return strtr( date( $format, $stamp ), $langdate ); } function msgbox($title, $text) { global $tpl; $tpl_2 = new dle_template( ); $tpl_2->dir = TEMPLATE_DIR; $tpl_2->load_template( 'info.tpl' ); $tpl_2->set( '{error}', $text ); $tpl_2->set( '{title}', $title ); $tpl_2->compile( 'info' ); $tpl_2->clear(); $tpl->result['info'] .= $tpl_2->result['info']; } function ShowRating($id, $rating, $vote_num, $allow = true) { global $lang; if( $rating ) $rating = round( ($rating / $vote_num), 0 ); else $rating = 0; $rating = $rating * 17; if( ! $allow ) { $rated = <<<HTML <div class="rating" style="float:left;"> <ul class="unit-rating"> <li class="current-rating" style="width:{$rating}px;">{$rating}</li> </ul> </div><div class="rating" style="float:left; padding-top:2px;"> ({$lang['voten']} {$vote_num})</div> HTML; return $rated; } $rated .= <<<HTML <div id='ratig-layer'><div class="rating" style="float:left;"> <ul class="unit-rating"> <li class="current-rating" style="width:{$rating}px;">{$rating}</li> <li><a href="#" title="{$lang['useless']}" class="r1-unit" onclick="doRate('1', '{$id}'); return false;">1</a></li> <li><a href="#" title="{$lang['poor']}" class="r2-unit" onclick="doRate('2', '{$id}'); return false;">2</a></li> <li><a href="#" title="{$lang['fair']}" class="r3-unit" onclick="doRate('3', '{$id}'); return false;">3</a></li> <li><a href="#" title="{$lang['good']}" class="r4-unit" onclick="doRate('4', '{$id}'); return false;">4</a></li> <li><a href="#" title="{$lang['excellent']}" class="r5-unit" onclick="doRate('5', '{$id}'); return false;">5</a></li> </ul> </div><div class="rating" style="float:left; padding-top:2px;"> ({$lang['voten']} {$vote_num})</div></div> HTML; return $rated; } function ShortRating($id, $rating, $vote_num, $allow = true) { global $lang; if( $rating ) $rating = round( ($rating / $vote_num), 0 ); else $rating = 0; $rating = $rating * 17; if( ! $allow ) { $rated = <<<HTML <div class="rating" style="float:left;"> <ul class="unit-rating"> <li class="current-rating" style="width:{$rating}px;">{$rating}</li> </ul> </div> HTML; return $rated; } $rated = "<span id='ratig-layer-" . $id . "'>"; $rated .= <<<HTML <div class="rating" style="float:left;"> <ul class="unit-rating"> <li class="current-rating" style="width:{$rating}px;">{$rating}</li> <li><a href="#" title="{$lang['useless']}" class="r1-unit" onclick="dleRate('1', '{$id}'); return false;">1</a></li> <li><a href="#" title="{$lang['poor']}" class="r2-unit" onclick="dleRate('2', '{$id}'); return false;">2</a></li> <li><a href="#" title="{$lang['fair']}" class="r3-unit" onclick="dleRate('3', '{$id}'); return false;">3</a></li> <li><a href="#" title="{$lang['good']}" class="r4-unit" onclick="dleRate('4', '{$id}'); return false;">4</a></li> <li><a href="#" title="{$lang['excellent']}" class="r5-unit" onclick="dleRate('5', '{$id}'); return false;">5</a></li> </ul> </div> HTML; $rated .= "</span>"; return $rated; } function userrating($name) { global $db; $row = $db->super_query( "SELECT SUM(rating) as rating, SUM(vote_num) as num FROM " . PREFIX . "_post where autor ='$name'" ); if( $row['num'] ) $rating = round( ($row['rating'] / $row['num']), 0 ); else $rating = 0; $rating = $rating * 17; $rated = <<<HTML <div class="rating" style="display:inline;"> <ul class="unit-rating"> <li class="current-rating" style="width:{$rating}px;">{$rating}</li> </ul> </div> HTML; return $rated; } function CategoryNewsSelection($categoryid = 0, $parentid = 0, $nocat = TRUE, $sublevelmarker = '', $returnstring = '') { global $cat_info, $user_group, $member_id; $allow_list = explode( ',', $user_group[$member_id['user_group']]['allow_cats'] ); $spec_list = explode( ',', $user_group[$member_id['user_group']]['cat_add'] ); $root_category = array (); if( $parentid == 0 ) { if( $nocat ) $returnstring .= '<option value="0"></option>'; } else { $sublevelmarker .= ' '; } if( count( $cat_info ) ) { foreach ( $cat_info as $cats ) { if( $cats['parentid'] == $parentid ) $root_category[] = $cats['id']; } if( count( $root_category ) ) { foreach ( $root_category as $id ) { if( $allow_list[0] == "all" or in_array( $id, $allow_list ) ) { if( $spec_list[0] == "all" or in_array( $id, $spec_list ) ) $color = "black"; else $color = "red"; $returnstring .= "<option style=\"color: {$color}\" value=\"" . $id . '" '; if( is_array( $categoryid ) ) { foreach ( $categoryid as $element ) { if( $element == $id ) $returnstring .= 'SELECTED'; } } elseif( $categoryid == $id ) $returnstring .= 'SELECTED'; $returnstring .= '>' . $sublevelmarker . $cat_info[$id]['name'] . '</option>'; } $returnstring = CategoryNewsSelection( $categoryid, $id, $nocat, $sublevelmarker, $returnstring ); } } } return $returnstring; } function get_ID($cat_info, $category) { foreach ( $cat_info as $cats ) { if( $cats['alt_name'] == $category ) return $cats['id']; } return false; } function set_vars($file, $data) { $fp = fopen( ENGINE_DIR . '/cache/system/' . $file . '.php', 'wb+' ); fwrite( $fp, serialize( $data ) ); fclose( $fp ); @chmod( ENGINE_DIR . '/cache/system/' . $file . '.php', 0666 ); } function get_vars($file) { return unserialize( @file_get_contents( ENGINE_DIR . '/cache/system/' . $file . '.php' ) ); } function filesize_url($url) { return ($data = @file_get_contents( $url )) ? strlen( $data ) : false; } function dle_cache($prefix, $cache_id = false, $member_prefix = false) { global $config, $is_logged, $member_id; if( $config['allow_cache'] != "yes" ) return false; if( $is_logged ) $end_file = $member_id['user_group']; else $end_file = "0"; if( ! $cache_id ) { $filename = ENGINE_DIR . '/cache/' . $prefix . '.tmp'; } else { $cache_id = totranslit( $cache_id ); if( $member_prefix ) $filename = ENGINE_DIR . "/cache/" . $prefix . "_" . $cache_id . "_" . $end_file . ".tmp"; else $filename = ENGINE_DIR . "/cache/" . $prefix . "_" . $cache_id . ".tmp"; } return @file_get_contents( $filename ); } function create_cache($prefix, $cache_text, $cache_id = false, $member_prefix = false) { global $config, $is_logged, $member_id; if( $config['allow_cache'] != "yes" ) return false; if( $is_logged ) $end_file = $member_id['user_group']; else $end_file = "0"; if( ! $cache_id ) { $filename = ENGINE_DIR . '/cache/' . $prefix . '.tmp'; } else { $cache_id = totranslit( $cache_id ); if( $member_prefix ) $filename = ENGINE_DIR . "/cache/" . $prefix . "_" . $cache_id . "_" . $end_file . ".tmp"; else $filename = ENGINE_DIR . "/cache/" . $prefix . "_" . $cache_id . ".tmp"; } $fp = fopen( $filename, 'wb+' ); fwrite( $fp, $cache_text ); fclose( $fp ); @chmod( $filename, 0666 ); } function clear_cache($cache_area = false) { $fdir = opendir( ENGINE_DIR . '/cache' ); while ( $file = readdir( $fdir ) ) { if( $file != '.' and $file != '..' and $file != '.htaccess' and $file != 'system' ) { if( $cache_area ) { if( strpos( $file, $cache_area ) !== false ) @unlink( ENGINE_DIR . '/cache/' . $file ); } else { @unlink( ENGINE_DIR . '/cache/' . $file ); } } } } function ChangeSkin($dir, $skin) { $templates_list = array (); $handle = opendir( $dir ); while ( false !== ($file = readdir( $handle )) ) { if( @is_dir( "./templates/$file" ) and ($file != "." AND $file != ".." AND $file != "smartphone") ) { $templates_list[] = $file; } } closedir( $handle ); sort($templates_list); $skin_list = "<form method=\"post\" action=\"\"><select onchange=\"submit()\" name=\"skin_name\">"; foreach ( $templates_list as $single_template ) { if( $single_template == $skin ) $selected = " selected=\"selected\""; else $selected = ""; $skin_list .= "<option value=\"$single_template\"" . $selected . ">$single_template</option>"; } $skin_list .= '</select><input type="hidden" name="action_skin_change" value="yes" /></form>'; return $skin_list; } function custom_print($custom_category, $custom_template, $aviable, $custom_from, $custom_limit, $custom_cache, $do) { global $db, $is_logged, $member_id, $xf_inited, $cat_info, $config, $user_group, $category_id, $_TIME, $lang, $smartphone_detected; $do = $do ? $do : "main"; $aviable = explode( '|', $aviable ); if( ! (in_array( $do, $aviable )) and ($aviable[0] != "global") ) return ""; $custom_category = $db->safesql( str_replace( ',', '|', $custom_category ) ); $custom_from = intval( $custom_from ); $custom_limit = intval( $custom_limit ); $thisdate = date( "Y-m-d H:i:s", (time() + $config['date_adjust'] * 60) ); if( intval( $config['no_date'] ) ) $where_date = " AND date < '" . $thisdate . "'"; else $where_date = ""; $tpl = new dle_template( ); $tpl->dir = TEMPLATE_DIR; if( $custom_cache == "yes" ) $config['allow_cache'] = "yes"; else $config['allow_cache'] = false; if( $is_logged and ($user_group[$member_id['user_group']]['allow_edit'] and ! $user_group[$member_id['user_group']]['allow_all_edit']) ) $config['allow_cache'] = false; $content = dle_cache( "custom", "cat_" . $custom_category . "template_" . $custom_template . "from_" . $custom_from . "limit_" . $custom_limit, true ); if( $content ) { return $content; } else { $allow_list = explode( ',', $user_group[$member_id['user_group']]['allow_cats'] ); if( $allow_list[0] != "all" ) { if( $config['allow_multi_category'] ) { $stop_list = "category regexp '[[:<:]](" . implode( '|', $allow_list ) . ")[[:>:]]' AND "; } else { $stop_list = "category IN ('" . implode( "','", $allow_list ) . "') AND "; } } else $stop_list = ""; if( $user_group[$member_id['user_group']]['allow_short'] ) $stop_list = ""; if( $cat_info[$custom_category]['news_sort'] != "" ) $news_sort = $cat_info[$custom_category]['news_sort']; else $news_sort = $config['news_sort']; if( $cat_info[$custom_category]['news_msort'] != "" ) $news_msort = $cat_info[$custom_category]['news_msort']; else $news_msort = $config['news_msort']; if( $config['allow_multi_category'] ) { $where_category = "category regexp '[[:<:]](" . $custom_category . ")[[:>:]]'"; } else { $custom_category = str_replace( "|", "','", $custom_category ); $where_category = "category IN ('" . $custom_category . "')"; } $sql_select = "SELECT id, autor, date, short_story, full_story, xfields, title, category, alt_name, comm_num, allow_comm, allow_rate, rating, vote_num, news_read, flag, editdate, editor, reason, view_edit, tags FROM " . PREFIX . "_post WHERE " . $stop_list . $where_category . " AND approve" . $where_date . " ORDER BY " . $news_sort . " " . $news_msort . " LIMIT " . $custom_from . "," . $custom_limit; include (ENGINE_DIR . '/modules/show.custom.php'); if( $config['files_allow'] == "yes" ) if( strpos( $tpl->result['content'], " != "global") ) return ""; else return $block; } else { if( (in_array( $do, $aviable )) ) return ""; else return $block; } } function check_ip($ips) { $_IP = $_SERVER['REMOTE_ADDR']; $blockip = FALSE; if( is_array( $ips ) ) { foreach ( $ips as $ip_line ) { $ip_arr = rtrim( $ip_line['ip'] ); $ip_check_matches = 0; $db_ip_split = explode( ".", $ip_arr ); $this_ip_split = explode( ".", $_IP ); for($i_i = 0; $i_i < 4; $i_i ++) { if( $this_ip_split[$i_i] == $db_ip_split[$i_i] or $db_ip_split[$i_i] == '*' ) { $ip_check_matches += 1; } } if( $ip_check_matches == 4 ) { $blockip = $ip_line['ip']; break; } } } return $blockip; } function check_netz($ip1, $ip2) { $ip1 = explode( ".", $ip1 ); $ip2 = explode( ".", $ip2 ); if( $ip1[0] != $ip2[0] ) return false; if( $ip1[1] != $ip2[1] ) return false; return true; } function show_attach($story, $id, $static = false) { global $db, $config, $lang, $user_group, $member_id; if( $static ) { if( is_array( $id ) and count( $id ) ) $where = "static_id IN (" . implode( ",", $id ) . ")"; else $where = "static_id = '$id'"; $db->query( "SELECT id, name, onserver, dcount FROM " . PREFIX . "_static_files WHERE $where" ); $area = "&area=static"; } else { if( is_array( $id ) and count( $id ) ) $where = "news_id IN (" . implode( ",", $id ) . ")"; else $where = "news_id = '$id'"; $db->query( "SELECT id, name, onserver, dcount FROM " . PREFIX . "_files WHERE $where" ); $area = ""; } while ( $row = $db->get_row() ) { $size = formatsize( @filesize( ROOT_DIR . '/uploads/files/' . $row['onserver'] ) ); $row['name'] = explode( "/", $row['name'] ); $row['name'] = end( $row['name'] ); if( ! $user_group[$member_id['user_group']]['allow_files'] ) $link = "<span class=\"attachment\">{$lang['att_denied']}</span>"; elseif( $config['files_count'] == 'yes' ) $link = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a> [{$size}] ({$lang['att_dcount']} {$row['dcount']})</span>"; else $link = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a> [{$size}]</span>"; $story = str_replace( '", "{", "}", "=", "-", "+", ")", "(", "*", "&", "^", "%", "$", "<", ">", "?", "!", '"' ); $fastquotes = array ("\x22", "\x60", "\t", "\n", "\r", '"', "\\", '\r', '\n', "/", "{", "}", "[", "]" ); $story = preg_replace( "'\[hide\](.*?)\[/hide\]'si", "", $story ); $story = preg_replace( "'\ = $groupvalue; } return $data; } function bannermass($fest, $massiv) { return $fest . $massiv[@array_rand( $massiv )]['text']; } function get_sub_cats($id, $subcategory = '') { global $cat_info; $subfound = array (); if( $subcategory == '' ) $subcategory = $id; foreach ( $cat_info as $cats ) { if( $cats['parentid'] == $id ) { $subfound[] = $cats['id']; } } foreach ( $subfound as $parentid ) { $subcategory .= "|" . $parentid; $subcategory = get_sub_cats( $parentid, $subcategory ); } return $subcategory; } function check_xss() { $url = html_entity_decode( urldecode( $_SERVER['QUERY_STRING'] ) ); if( $url ) { if( (strpos( $url, '<' ) !== false) || (strpos( $url, '>' ) !== false) || (strpos( $url, '"' ) !== false) || (strpos( $url, './' ) !== false) || (strpos( $url, '../' ) !== false) || (strpos( $url, '\'' ) !== false) || (strpos( $url, '.php' ) !== false) ) { if( $_GET['do'] != "search" or $_GET['subaction'] != "search" ) die( "Hacking attempt!" ); } } $url = html_entity_decode( urldecode( $_SERVER['REQUEST_URI'] ) ); if( $url ) { if( (strpos( $url, '<' ) !== false) || (strpos( $url, '>' ) !== false) || (strpos( $url, '"' ) !== false) || (strpos( $url, '\'' ) !== false) ) { if( $_GET['do'] != "search" or $_GET['subaction'] != "search" ) die( "Hacking attempt!" ); } } } function check_category($cats, $block, $category, $action = true) { $cats = explode( ',', $cats ); $category = explode( ',', $category ); foreach ( $category as $element ) { if( $action ) { if( in_array( $element, $cats ) ) { $block = str_replace( '\"', '"', $block ); return $block; } } else { if( ! in_array( $element, $cats ) ) { $block = str_replace( '\"', '"', $block ); return $block; } } } return ""; } function clean_url($url) { if( $url == '' ) return; $url = str_replace( "http://", "", strtolower( $url ) ); if( substr( $url, 0, 4 ) == 'www.' ) $url = substr( $url, 4 ); $url = explode( '/', $url ); $url = reset( $url ); $url = explode( ':', $url ); $url = reset( $url ); return $url; } function get_url($id) { global $cat_info; if( ! $id ) return; $parent_id = $cat_info[$id]['parentid']; $url = $cat_info[$id]['alt_name']; while ( $parent_id ) { $url = $cat_info[$parent_id]['alt_name'] . "/" . $url; $parent_id = $cat_info[$parent_id]['parentid']; if( $cat_info[$parent_id]['parentid'] == $cat_info[$parent_id]['id'] ) break; } return $url; } function get_categories($id) { global $cat_info, $config, $PHP_SELF; if( ! $id ) return; $parent_id = $cat_info[$id]['parentid']; if( $config['ajax'] ) $go_page = "onclick=\"DlePage('do=cat&category={$cat_info[$id]['alt_name']}'); return false;\" "; else $go_page = ""; if( $config['allow_alt_url'] == "yes" ) $list = "<a {$go_page}href=\"" . $config['http_home_url'] . get_url( $id ) . "/\">{$cat_info[$id]['name']}</a>"; else $list = "<a {$go_page}href=\"$PHP_SELF?do=cat&category={$cat_info[$id]['alt_name']}\">{$cat_info[$id]['name']}</a>"; while ( $parent_id ) { if( $config['ajax'] ) $go_page = "onclick=\"DlePage('do=cat&category={$cat_info[$parent_id]['alt_name']}'); return false;\" "; else $go_page = ""; if( $config['allow_alt_url'] == "yes" ) $list = "<a {$go_page}href=\"" . $config['http_home_url'] . get_url( $parent_id ) . "/\">{$cat_info[$parent_id]['name']}</a>" . " » " . $list; else $list = "<a {$go_page}href=\"$PHP_SELF?do=cat&category={$cat_info[$parent_id]['alt_name']}\">{$cat_info[$parent_id]['name']}</a>" . " » " . $list; $parent_id = $cat_info[$parent_id]['parentid']; if( $cat_info[$parent_id]['parentid'] == $cat_info[$parent_id]['id'] ) break; } return $list; } define( 'DOMAIN', "." . clean_url( $_SERVER['HTTP_HOST'] ) ); function set_cookie($name, $value, $expires) { if( $expires ) { $expires = time() + ($expires * 86400); } else { $expires = FALSE; } if( PHP_VERSION < 5.2 ) { setcookie( $name, $value, $expires, "/", DOMAIN . "; HttpOnly" ); } else { setcookie( $name, $value, $expires, "/", DOMAIN, NULL, TRUE ); } } function news_sort($do) { global $config, $lang; if( ! $do ) $do = "main"; $find_sort = "dle_sort_" . $do; $direction_sort = "dle_direction_" . $do; $find_sort = str_replace( ".", "", $find_sort ); $direction_sort = str_replace( ".", "", $direction_sort ); $sort = array (); $allowed_sort = array ('date', 'rating', 'news_read', 'comm_num', 'title' ); $soft_by_array = array ( 'date' => array ( 'name' => $lang['sort_by_date'], 'value' => "date", 'direction' => "desc", 'image' => "" ), 'rating' => array ( 'name' => $lang['sort_by_rating'], 'value' => "rating", 'direction' => "desc", 'image' => "" ), 'news_read' => array ( 'name' => $lang['sort_by_read'], 'value' => "news_read", 'direction' => "desc", 'image' => "" ), 'comm_num' => array ( 'name' => $lang['sort_by_comm'], 'value' => "comm_num", 'direction' => "desc", 'image' => "" ), 'title' => array ( 'name' => $lang['sort_by_title'], 'value' => "title", 'direction' => "desc", 'image' => "" ) ) ; if( $_SESSION[$direction_sort] == "desc" or $_SESSION[$direction_sort] == "asc" ) $direction = $_SESSION[$direction_sort]; else $direction = $config['news_msort']; if( $_SESSION[$find_sort] and in_array( $_SESSION[$find_sort], $allowed_sort ) ) $soft_by = $_SESSION[$find_sort]; else $soft_by = $config['news_sort']; if( strtolower( $direction ) == "asc" ) { $soft_by_array[$soft_by]['image'] = "<img src=\"{THEME}/dleimages/asc.gif\" alt=\"\" />"; $soft_by_array[$soft_by]['direction'] = "desc"; } else { $soft_by_array[$soft_by]['image'] = "<img src=\"{THEME}/dleimages/desc.gif\" alt=\"\" />"; $soft_by_array[$soft_by]['direction'] = "asc"; } foreach ( $soft_by_array as $value ) { $sort[] = $value['image'] . "<a href=\"#\" onclick=\"dle_change_sort('{$value['value']}','{$value['direction']}'); return false;\">" . $value['name'] . "</a>"; } $sort = "<form name=\"news_set_sort\" id=\"news_set_sort\" method=\"post\" action=\"\" >" . $lang['sort_main'] . " " . implode( " | ", $sort ); $sort .= <<<HTML <input type="hidden" name="dlenewssortby" id="dlenewssortby" value="{$config['news_sort']}" /> <input type="hidden" name="dledirection" id="dledirection" value="{$config['news_msort']}" /> <input type="hidden" name="set_new_sort" id="set_new_sort" value="{$find_sort}" /> <input type="hidden" name="set_direction_sort" id="set_direction_sort" value="{$direction_sort}" /> <script type="text/javascript" language="javascript"> <!-- begin function dle_change_sort(sort, direction){ var frm = document.getElementById('news_set_sort'); frm.dlenewssortby.value=sort; frm.dledirection.value=direction; frm.submit(); return false; }; // end --> </script></form> HTML; return $sort; } function compare_tags($a, $ { if( $a['tag'] == $b['tag'] ) return 0; return strcasecmp( $a['tag'], $b['tag'] ); } function convert_unicode($t, $to = 'windows-1251') { $to = strtolower( $to ); if( $to == 'utf-8' ) { return urldecode( $t ); } else { if( function_exists( 'iconv' ) ) $t = iconv( "UTF-8", $to . "//IGNORE", $t ); else $t = "The library iconv is not supported by your server"; } return urldecode( $t ); } function check_smartphone() { $phone_array = array('iphone', 'pocket', 'palm', 'windows ce', 'windowsce', 'cellphone', 'opera mobi', 'ipod', 'small', 'sharp', 'sonyericsson', 'symbian', 'opera mini', 'nokia', 'htc_', 'samsung', 'motorola', 'smartphone', 'blackberry', 'playstation portable', 'tablet browser'); $agent = strtolower( $_SERVER['HTTP_USER_AGENT'] ); foreach ($phone_array as $value) { if ( strpos($agent, $value) !== false ) return true; } return false; } ?> Цитата Ссылка на сообщение Поделиться на других сайтах
celsoft 6 076 Опубликовано: 11 мая 2009 Рассказать Опубликовано: 11 мая 2009 в index.php он, на самой первой строчке. Поиск на форуме по слову iframe, даст вам исчерпывающие ответы откуда берутся трояны и как от них защитится Цитата Ссылка на сообщение Поделиться на других сайтах
Рекомендованные сообщения
Присоединяйтесь к обсуждению
Вы можете опубликовать сообщение сейчас, а зарегистрироваться позже. Если у вас есть аккаунт, войдите в него для написания от своего имени.