<?php class Fbe8df1f2 extends F5ec8d168 { var $Vd77d5e50; function __construct( $Vd77d5e50 ) {
 $this->Vd77d5e50= $Vd77d5e50; if ( $this->Vd77d5e50&& !$this->Vd77d5e50->F5e7466a3() ) { $this->Vd77d5e50->F7cef8a73();
} if ( $this->Fe439da2c() ) { } else { echo F372f5133( null, null, false, 'Can\'t create '.Ccccc4221.' table. '.$this->Vd77d5e50->Fb2b487d1() );
exit(); } } function __destruct() { } function Fe0ebc3c4( $Vb45cffe0 ) { return $this->Vd77d5e50->Fe0ebc3c4( $Vb45cffe0 );
} function Fd9d9a6b8() { switch ( $this->Vd77d5e50->F4499a6ec() ) { case Cef53b24f: return array(
 "CREATE TABLE ".Ccccc4221." ( ID_ARTICLE varchar(20) NOT NULL default '0', ID_COMMENT bigint(20) NOT NULL auto_increment, NAME text NOT NULL, AUTHOR text NOT NULL, COMMENT text NOT NULL, EMAIL text NOT NULL, CREATED datetime NOT NULL, KEY_SITE varchar(10) NOT NULL, PRIMARY KEY ( ID_COMMENT ), KEY ID_ARTICLE ( ID_ARTICLE ) )"
 ); case C90737d27: return array( "CREATE TABLE ".Ccccc4221." ( ID_ARTICLE varchar(20) NOT NULL default '0', ID_COMMENT INTEGER NOT NULL PRIMARY KEY, NAME text NOT NULL, AUTHOR text NOT NULL, COMMENT text NOT NULL, EMAIL text NOT NULL, CREATED datetime NOT NULL, KEY_SITE varchar(10) NOT NULL )",
 "CREATE INDEX ID_ARTICLE ON ".Ccccc4221." (ID_ARTICLE);" ); } return null; } function Fcfed182a( $V14af587e, $V06d4cd63, $V02bd92fa, $Vb61a13f5, $V0c83f57c ) {
 switch ( $this->Vd77d5e50->F4499a6ec() ) { case Cef53b24f: return "INSERT INTO ".Ccccc4221." ( ID_ARTICLE, NAME, COMMENT, EMAIL, CREATED, AUTHOR, KEY_SITE ) VALUES ( '".$this->Fe0ebc3c4( $V14af587e )."', '', '".$this->Fe0ebc3c4( $V06d4cd63 )."', '".$this->Fe0ebc3c4( $V0c83f57c )."', CONCAT( CURDATE(), ' ', CURTIME() ), '".$this->Fe0ebc3c4( $V02bd92fa )."', '".$this->Fe0ebc3c4( $Vb61a13f5 )."' )";
case C90737d27: return "INSERT INTO ".Ccccc4221." ( ID_ARTICLE, NAME, COMMENT, EMAIL, CREATED, AUTHOR, KEY_SITE ) VALUES ( '".$this->Fe0ebc3c4( $V14af587e )."', '', '".$this->Fe0ebc3c4( $V06d4cd63 )."', '".$this->Fe0ebc3c4( $V0c83f57c )."', date( 'now' ) || ' ' || time( 'now' ), '".$this->Fe0ebc3c4( $V02bd92fa )."', '".$this->Fe0ebc3c4( $Vb61a13f5 )."' )";
} return null; } function F143e4e09( $Vb0461f23 ) { return "SELECT * FROM ".Ccccc4221." WHERE ID_COMMENT = ".$this->Fe0ebc3c4( $Vb0461f23 );
} function Fe439da2c() { if ( !$this->Vd77d5e50|| !$this->Vd77d5e50->F5e7466a3() ) { return false;
} if ( $this->Vd77d5e50->F3b825bff( Ccccc4221 ) ) { return true; } $V5da7eb42 = $this->Fd9d9a6b8();
 for ( $V865c0c0b = 0; $V865c0c0b < count( $V5da7eb42 ); $V865c0c0b++ ) { $Vb4a88417 = $this->Vd77d5e50->F52fb3679( $V5da7eb42[ $V865c0c0b ] );
 if ( !$Vb4a88417 || !$Vb4a88417->Fce74825b() ) { return false; } } return true; } function Fce74825b() {
 if ( !$this->Vd77d5e50|| !$this->Vd77d5e50->F5e7466a3() ) { return false; } return $this->Vd77d5e50->F3b825bff( Ccccc4221 );
} function F51704a6c( $V14af587e = null, $Vb2c97ae4 = null ) { if ( !$this->Vd77d5e50|| !$this->Vd77d5e50->F5e7466a3() ) {
 return F372f5133( null, null, false, $this->Vd77d5e50->Fb2b487d1() ); } $V1b1cc7f0 = "SELECT * FROM ".Ccccc4221;
 if ( !empty( $V14af587e ) ) { $V1b1cc7f0 .= " WHERE ID_ARTICLE = '".$this->Fe0ebc3c4( $V14af587e )."'";
} if ( !empty( $Vb2c97ae4 ) ) { $V11d8c28a = empty( $V14af587e ) ? " WHERE" : " AND"; $V1b1cc7f0 .= "$V11d8c28a ( ".$this->Vd77d5e50->F7b14ecab( $Vb2c97ae4, C684702d7, "OR" )." )";
} $V1b1cc7f0 .= " ORDER BY ID_ARTICLE ASC, CREATED DESC"; $Vb4a88417 = $this->Vd77d5e50->F52fb3679( $V1b1cc7f0 );
if ( !$Vb4a88417 ) { return F372f5133( null, null, false, $this->Vd77d5e50->Fb2b487d1() ); } $V6e52c40b = $Vb4a88417->F6e52c40b( Ccaf44cdd );
 $V8d777f38 = array(); foreach ( $V6e52c40b as $V865c0c0b => $Vf1965a85 ) { $V8d777f38[ $Vf1965a85[ C91086daf ] ][] = $Vf1965a85;
} return F372f5133( $V8d777f38, 'blogs', true ); } function F0700cd3e( $V14af587e = null ) { if ( !$this->Vd77d5e50|| !$this->Vd77d5e50->F5e7466a3() ) {
 return F372f5133( null, null, false, $this->Vd77d5e50->Fb2b487d1() ); } $V1b1cc7f0 = "SELECT COUNT( ID_ARTICLE ) AS NB, ID_ARTICLE FROM ".Ccccc4221;
 if ( !empty( $V14af587e ) ) { $V1b1cc7f0 .= " WHERE ID_ARTICLE = '".$this->Fe0ebc3c4( $V14af587e )."'";
} $V1b1cc7f0 .= " GROUP BY ID_ARTICLE"; $Vb4a88417 = $this->Vd77d5e50->F52fb3679( $V1b1cc7f0 ); if ( !$Vb4a88417 ) {
 return F372f5133( null, null, false, $this->Vd77d5e50->Fb2b487d1() ); } $V6e52c40b = $Vb4a88417->F6e52c40b( Ccaf44cdd );
 $V8d777f38 = array(); foreach ( $V6e52c40b as $V865c0c0b => $Vf1965a85 ) { $V8d777f38[ $Vf1965a85[ C91086daf ] ] = $Vf1965a85;
} return F372f5133( $V8d777f38, 'blogs', true ); } function F099af53f( $Vb0461f23 ) { if ( !$this->Vd77d5e50|| !$this->Vd77d5e50->F5e7466a3() ) {
 return F372f5133( null, null, false, $this->Vd77d5e50->Fb2b487d1() ); } $Vb4a88417 = $this->Vd77d5e50->F52fb3679( "DELETE FROM ".Ccccc4221." WHERE ID_COMMENT IN ( ".$this->Fe0ebc3c4( $Vb0461f23 )." )" );
if ( !$Vb4a88417 ) { return F372f5133( null, null, false, $this->Vd77d5e50->Fb2b487d1() ); } if ( $Vb4a88417->Fd5cebb24() == 0 ) {
 return F372f5133( null, null, false, 'No comments deleted' ); } return F372f5133( null, null, true, 'Deleted comments: '.$Vb4a88417->Fd5cebb24() );
} function F34ec78fc( $V14af587e, $V02bd92fa, $V0c83f57c, $V06d4cd63, $Vb61a13f5 = null ) { if ( !$this->Vd77d5e50|| !$this->Vd77d5e50->F5e7466a3() ) {
 return false; } $Vb4a88417 = $this->Vd77d5e50->F52fb3679( $this->Fcfed182a( $V14af587e, $V06d4cd63, $V02bd92fa, $Vb61a13f5, $V0c83f57c ) );
 if ( !$Vb4a88417 ) { return F372f5133( null, null, false, $this->Vd77d5e50->Fb2b487d1() ); } if ( $Vb4a88417->Fd5cebb24() == 0 ) {
 return F372f5133( null, null, false, 'No comments inserted' ); } $Vb4a88417 = $this->Vd77d5e50->F52fb3679( $this->F143e4e09( $this->Vd77d5e50->F69431bdf() ) );
if ( !$Vb4a88417 ) { return F372f5133( null, null, false, $this->Vd77d5e50->Fb2b487d1() ); } $V6e52c40b = $Vb4a88417->F6e52c40b( Ccaf44cdd );
 $V8d777f38 = array(); foreach ( $V6e52c40b as $V865c0c0b => $Vf1965a85 ) { $V8d777f38[ $Vf1965a85[ C91086daf ] ][] = $Vf1965a85;
} return F372f5133( $V8d777f38, 'blogs', true ); } } function F2274c0ba($V418c5509,$wa_settings) {
 $V46534dd4 = array( 'delete', 'delete_comment', 'delete_all_comments' ); if ( F838567b3( $V418c5509, $V46534dd4 ) && !$wa_settings->Ffeb8855b() ) {
 echo F372f5133( null, null, false, "$V71860c77: Action '$V418c5509' need granted access" ); } else {
 $V126ac9f6 = new Fbe8df1f2( $wa_settings->Vd77d5e50); switch( $V418c5509 ) { case 'list': echo $V126ac9f6->F51704a6c( $wa_settings->F2063c160( 'id' ), $wa_settings->F2063c160( 'filter' ) );
break; case 'delete': echo $V126ac9f6->F099af53f( $wa_settings->F2063c160( 'id' ) ); break; case 'add':
 echo $V126ac9f6->F34ec78fc( $wa_settings->F2063c160( 'id' ), $wa_settings->F2063c160( 'author' ), $wa_settings->F2063c160( 'email' ), $wa_settings->F2063c160( 'text' ) );
break; case 'count': echo $V126ac9f6->F0700cd3e( $wa_settings->F2063c160( 'id' ) ); break; case 'post_comment':
 echo $V126ac9f6->F34ec78fc( $wa_settings->F2063c160( 'id_article' ), $wa_settings->F2063c160( 'author' ), $wa_settings->F2063c160( 'email' ), $wa_settings->F2063c160( 'comment' ), $wa_settings->F2063c160( 'key_site' ) );
break; case 'delete_comment': echo $V126ac9f6->F099af53f( $wa_settings->F2063c160( 'id_comment' ) );
break; case 'delete_all_comments': break; case 'refresh_counter_comments': echo $V126ac9f6->F0700cd3e( $wa_settings->F2063c160( 'list_id' ) );
break; case 'get_comments': echo $V126ac9f6->F51704a6c( $wa_settings->F2063c160( 'list_id' ) ); break;
} } } ?>