Alterei e nada, o "eregi" aparece em vários arquivos. <?PHP
// bad practice, i know
if ($HTTP_SESSION_VARS) {extract($HTTP_SESSION_VARS, EXTR_SKIP);}
if ($_SESSION) {extract($_SESSION, EXTR_SKIP);}
if ($HTTP_COOKIE_VARS) {extract($HTTP_COOKIE_VARS, EXTR_SKIP);}
if ($_COOKIE) {extract($_COOKIE, EXTR_SKIP);}
if ($HTTP_POST_VARS) {extract($HTTP_POST_VARS, EXTR_SKIP);}
if ($_POST) {extract($_POST, EXTR_SKIP);}
if ($HTTP_GET_VARS) {extract($HTTP_GET_VARS, EXTR_SKIP);}
if ($_GET) {extract($_GET, EXTR_SKIP);}
if ($HTTP_ENV_VARS) {extract($HTTP_ENV_VARS, EXTR_SKIP);}
if ($_ENV) {extract($_ENV, EXTR_SKIP);}
//----------------------------------
// Sanitize Variables
//----------------------------------
if( isset($template) and $template != "" and !eregi("^[_a-zA-Z0-9-]{1,}$", $template)){ die("invalid template characters"); }
if( isset($archive) and $archive != "" and !eregi("^[_a-zA-Z0-9-]{1,}$", $archive)){ die("invalid archive characters"); }
if($PHP_SELF == ""){ $PHP_SELF = $_SERVER["PHP_SELF"]; }
$phpversion = @phpversion();
$a7f89abdcf9324b3 = "";
$comm_start_from = htmlspecialchars($comm_start_from);
$start_from = htmlspecialchars($start_from);
$archive = htmlspecialchars($archive);
$subaction = htmlspecialchars($subaction);
$id = htmlspecialchars($id);
$ucat = htmlspecialchars($ucat);
if(is_array($category)){ foreach($category as $ckey=>$cvalue){ $category[$ckey] = htmlspecialchars($category[$ckey]);} }
else{ $category = htmlspecialchars($category); }
$number = htmlspecialchars($number);
$template = htmlspecialchars($template);
$show = htmlspecialchars($show);
$config_version_name = "CuteNews v1.4.6";
$config_version_id = 186;
//----------------------------------
// Some Special Chars
//----------------------------------
$HTML_SPECIAL_CHARS = Array ( // Master array replaced ALWAYS !!!
'”' => '”',
'“' => '“',
'œ' => 'œ',
'™' => '™',
'’' => '’',
'‘' => '‘',
'‰' => '‰',
'…' => '…',
'€' => '€',
'¡' => '¡',
'¢' => '¢',
'£' => '£',
'¤' => '¤',
'¥' => '¥',
'¦' => '&brvb script:InsertIntoArea('$insert_location','$advanced_smile'); return false;\"><img style=\"border: none;\" alt=\"$smile\" src=\"$config_http_script_dir/data/emoticons/$smile.gif\" /></a>";
$output .= "<a href=# onclick=\"document.getElementById('$insert_location').contentWindow.document.execCommand('InsertImage', false, '$config_http_script_dir/data/emoticons/$smile.gif'); return false;\"><img style=\"border: none;\" alt=\"$smile\" src=\"$config_http_script_dir/data/emoticons/$smile.gif\" /></a>";
}
else{ $output .= "<a href=# onclick=\"java script:document.getElementById('$insert_location').value += ' :$smile:'; return false;\"><img style=\"border: none;\" alt=\"$smile\" src=\"$config_http_script_dir/data/emoticons/$smile.gif\" /></a>"; }
}else{
$output .= "<a href=\"java script:insertext(':$smile:','$insert_location')\"><img style=\"border: none;\" alt=\"$smile\" src=\"$config_http_script_dir/data/emoticons/$smile.gif\" /></a>";
};
if( isset($break_location) && (int)$break_location > 0 && $i%$break_location == 0 )
{
$output .= "<br />";
}else{ $output .= " "; }
}
return $output;
}
////////////////////////////////////////////////////////
// Function: replace_comments
// Description: Replaces comments charactars
function replace_comment($way, $sourse){
global $HTML_SPECIAL_CHARS, $config_allow_html_in_news, $config_allow_html_in_comments, $config_http_script_dir, $config_smilies;
$sourse = stripslashes(trim($sourse));
if($way == "add"){
$find = array(
"'\"'",
"'\''",
"'<'",
"'>'",
"'\|'",
"'\n'",
"'\r'",
);
$replace = array(
""",
"'",
"<",
">",
"|",
" <br />",
"",
);
}
elseif($way == "show"){
$find = array(
"'\[b\](.*?)\[/b\]'i",
"'\[i\](.*?)\[/i\]'i",
"'\[u\](.*?)\[/u\]'i",
"'\[link\](.*?)\[/link\]'i",
"'\[link=(.*?)\](.*?)\[/link\]'i",
"'\[quote=(.*?)\](.*?)\[/quote\]'",
"'\[quote\](.*?)\[/quote\]'",
);
$replace = array(
"<strong>\\1</strong>",
"<em>\\1</em>",
"<span style=\"text-decoration: underline;\">\\1</span>",
"<a href=\"\\1\">\\1</a>",
"<a href=\"\\1\">\\2</a>",
"<blockquote><div style=\"font-size: 13px;\">quote (\\1):</div><hr style=\"border: 1px solid #ACA899;\" /><div>\\2</div><hr style=\"border: 1px solid #ACA899;\" /></blockquote>",
"<blockquote><div style=\"font-size: 13px;\">quote:</div><hr style=\"border: 1px solid #ACA899;\" /><div>\\1</div><hr style=\"border: 1px solid #ACA899;\" /></blockquote>",
);
$smilies_arr = explode(",", $config_smilies);
foreach($smilies_arr as $smile){
$smile = trim($smile);
$find[] = "':$smile:'";
$replace[] = "<img style=\"border: none;\" alt=\"$smile\" src=\"$config_http_script_dir/data/emoticons/$smile.gif\" />";
}
}
$sourse = preg_replace($find,$replace,$sourse);
foreach ( $HTML_SPECIAL_CHARS as $key=>$value ){
$sourse = str_replace($key,$value,$sourse);
}
return $sourse;
}
////////////////////////////////////////////////////////
// Function: rteSafe
// Description: safe data for the RTE
function rteSafe($strText) {
//returns safe code for preloading in the RTE
$tmpString = $strText;
//convert all types of single quotes
$tmpString = str_replace(chr(145), chr(39), $tmpString);
$tmpString = str_replace(chr(146), chr(39), $tmpString);
$tmpString = str_replace("'", "'", $tmpString);
//convert all types of double quotes
$tmpString = str_replace(chr(147), chr(34), $tmpString);
$tmpString = str_replace(chr(148), chr(34), $tmpString);
// $tmpString = str_replace("\"", """, $tmpString); // we are pasting the content within '' quotes so " are valid
//replace carriage returns & line feeds
$tmpString = str_replace(chr(10), " ", $tmpString);
$tmpString = str_replace(chr(13), " ", $tmpString);
return $tmpString;
}
////////////////////////////////////////////////////////
// Function: get_skin
// Description: Hello skin!
function get_skin($skin){
if(!file_exists('./data/reg.php')){ $stts = base64_decode('KHVucmVnaXN0ZXJlZCk='); }
else{
include('./data/reg.php');
if(preg_match('/\\A(\\w{6})-\\w{6}-\\w{6}\\z/', $reg_site_key, $mmbrid)){
if(!isset($reg_display_name) or !$reg_display_name or $reg_display_name == ''){
$stts = "<!-- (-$mmbrid[1]-) -->";
}else{
$stts = "<label title='(-$mmbrid[1]-)'>". base64_decode('TGljZW5zZWQgdG86IA==').$reg_display_name.'</label>';
}
}
else{ $stts = '!'.base64_decode('KHVucmVnaXN0ZXJlZCk=').'!'; }
}
$MSN = bd_config('c2tpbg==');
$cr = bd_config('e2NvcHlyaWdodHN9');
$lct = bd_config('PGRpdiBzdHlsZT0nZm9udC1zaXplOiA5cHgnPlBvd2VyZWQgYnkgPGEgc3R5bGU9J2ZvbnQtc2l6ZTogOXB4JyBocmVmPSJodHRwOi8vY3V0ZXBocC5jb20vY3V0ZW5ld3MvIiB0YXJnZXQ9Il9ibGFuayI+Q3V0ZU5ld3MgMS40LjY8L2E+ICZjb3B5OyAyMDA4IDxhIHN0eWxlPSdmb250LXNpemU6IDlweCcgaHJlZj0iaHR0cDovL2N1dGVwaHAuY29tLyIgdGFyZ2V0PSJfYmxhbmsiPkN1dGVQSFA8L2E+Ljxicj57bC1zdGF0dXN9PC9kaXY+');
$lct = preg_replace("/{l-status}/", $stts, $lct);
$$MSN = preg_replace("/$cr/", $lct, $$MSN);
return $$MSN;
}
////////////////////////////////////////////////////////
// Function: replace_news
// Description: Replaces news charactars
function replace_news($way, $sourse, $replce_n_to_br=TRUE, $use_html=TRUE){
global $HTML_SPECIAL_CHARS, $config_allow_html_in_news, $config_allow_html_in_comments, $config_http_script_dir, $config_smilies;
$sourse = stripslashes($sourse);
if($way == "show")
{
$find= array(
/* 1 */ "'\[upimage=([^\]]*?) ([^\]]*?)\]'i",
/* 2 */ "'\[upimage=(.*?)\]'i",
/* 3 */ "'\[b\](.*?)\[/b\]'i",
/* 4 */ "'\[i\](.*?)\[/i\]'i",
/* 5 */ "'\[u\](.*?)\[/u\]'i",
/* 6 */ "'\[link\](.*?)\[/link\]'i",
/* 7 */ "'\[color=(.*?)\](.*?)\[/color\]'i",
/* 8 */ "'\[size=(.*?)\](.*?)\[/size\]'i",
/* 9 */ "'\[font=(.*?)\](.*?)\[/font\]'i",
/* 10 */ "'\[align=(.*?)\](.*?)\[/align\]'i",
/* 12 */ "'\[image=(.*?)\]'i",
/* 13 */ "'\[link=(.*?)\](.*?)\[/link\]'i",
/* 14 */ "'\[quote=(.*?)\](.*?)\[/quote\]'i",
/* 15 */ "'\[quote\](.*?)\[/quote\]'i",
/* 16 */ "'\[list\]'i",
/* 17 */ "'\[/list\]'i",
/* 18 */ "'\[\*\]'i",
"'{nl}'",
);
$replace=array(
/* 1 */ "<img \\2 src=\"${config_http_script_dir}/skins/images/upskins/images/\\1\" style=\"border: none;\" alt=\"\" />",
/* 2 */ "<img src=\"${config_http_script_dir}/skins/images/upskins/images/\\1\" style=\"border: none;\" alt=\"\" />",
/* 3 */ "<strong>\\1</strong>",
/* 4 */ "<em>\\1</em>",
/* 5 */ "<span style=\"text-decoration: underline;\">\\1</span>",
/* 6 */ "<a href=\"\\1\">\\1</a>",
/* 7 */ "<span style=\"color: \\1;\">\\2</span>",
/* 8 */ "<span style=\"font-size: \\1pt;\">\\2</span>",
/* 9 */ "<span style=\"font-family: \\1;\">\\2</span>",
/* 10 */ "<div style=\"text-align: \\1;\">\\2</div>",
/* 12 */ "<img src=\"\\1\" style=\"border: none;\" alt=\"\" />",
/* 13 */ "<a href=\"\\1\">\\2</a>",
/* 14 */ "<blockquote><div style=\"font-size: 13px;\">quote (\\1):</div><hr style=\"border: 1px solid #ACA899;\" /><div>\\2</div><hr style=\"border: 1px solid #ACA899;\" /></blockquote>",
/* 15 */ "<blockquote><div style=\"font-size: 13px;\">quote:</div><hr style=\"border: 1px solid #ACA899;\" /><div>\\1</div><hr style=\"border: 1px solid #ACA899;\" /></blockquote>",
/* 16 */ "<ul>",
/* 17 */ "</ul>",
/* 18 */ "<li>",
"\n",
);
$smilies_arr = explode(",", $config_smilies);
foreach($smilies_arr as $smile){
$smile = trim($smile);
$find[] = "':$smile:'";
$replace[] = "<img style=\"border: none;\" alt=\"$smile\" src=\"$config_http_script_dir/data/emoticons/$smile.gif\" />";
}
}
elseif($way == "add"){
$find = array(
"'\|'",
"'\r'",
);
$replace = array(
"|",
"",
);
if($use_html != TRUE){
$find[] = "'<'";
$find[] = "'>'";
$replace[] = "<";
$replace[] = ">";
}
if($replce_n_to_br == TRUE){
$find[] = "'\n'";
$replace[] = "<br />";
}else{
$find[] = "'\n'";
$replace[] = "{nl}";
}
}
elseif($way == "admin"){
$find = array(
"''",
"'{nl}'",
);
$replace = array(
"",
"\n",
);
//this is for 'edit news' section when we use WYSIWYG
if(!$replce_n_to_br){$find[] = "'<br />'"; }
if(!$replce_n_to_br){$replace[] = "\n"; }
}
$sourse = preg_replace($find,$replace,$sourse);
foreach ( $HTML_SPECIAL_CHARS as $key=>$value ){
$sourse = str_replace($key,$value,$sourse);
}
return $sourse;
}
function bd_config($str){
return base64_decode($str);
}
?>