Over the past few months, we have received a lot of requests concerning the revision of our prices.
It’s now done on the batch file prices, with prices reduced by -60% on all our offers !
This offer will remain for life, even on our future services in preparation for file decompilation : PHP 8.0, 8.1, and more.
The Team DeZender
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
<?php
if ( !defined( "_JEXEC" ) )
{
exit( "Restricted access" );
}
class NgrabnewsControllerFilters extends NgrabnewsController
{
public function __construct( )
{
$FN_-2147483647( );
$this->registerTask( "add", "edit" );
$this->registerTask( "apply", "save" );
$file = JRequest::getvar( "Filedata", "", "files", "array" );
jimport( "joomla.filesystem.file" );
$file['name'] = JFile::makesafe( $file['name'] );
if ( isset( $file['name'] ) && $file['name'] != "" )
{
$format = strtolower( JFile::getext( $file['name'] ) );
if ( $format == "txt" )
{
$filecontent = JFile::read( $file['tmp_name'] );
if ( strrpos( $filecontent, "BEGIN HEADER" ) === false || strrpos( $filecontent, "BEGIN DO" ) === false || strrpos( $filecontent, "BEGIN INFORMATION" ) === false || strrpos( $filecontent, "BEGIN ACTION" ) === false || strrpos( $filecontent, "nntitle=" ) === false || strrpos( $filecontent, "nntype=" ) === false || strrpos( $filecontent, "nnunique=" ) === false || strrpos( $filecontent, "nntrack=" ) === false || strrpos( $filecontent, "nntop=" ) === false || strrpos( $filecontent, "nnbot=" ) === false )
{
JError::raisewarning( 400, JText::_( "The content of file is not filter format" ) );
}
else
{
$database =& JFactory::getdbo( );
$my =& JFactory::getuser( );
$limitarr = NgrabnewsHelper::loadlimitlic( );
$query = "SELECT count(*) FROM #__ngrab_filter";
$database->setQuery( $query );
$countfillter = $database->loadResult( );
$contentarr = explode( "\n", $filecontent );
$c = 0;
$pharsecontent = array( );
$i = 0;
while ( $i <= count( $contentarr ) )
{
if ( strrpos( $contentarr[$i], "nntitle=" ) !== false )
{
$c = 1;
}
if ( strrpos( $contentarr[$i], "nntype=" ) !== false )
{
$c = 2;
}
if ( strrpos( $contentarr[$i], "nnunique=" ) !== false )
{
$c = 3;
}
if ( strrpos( $contentarr[$i], "nntrack=" ) !== false )
{
$c = 4;
}
if ( strrpos( $contentarr[$i], "nntop=" ) !== false )
{
$c = 5;
}
if ( strrpos( $contentarr[$i], "nnbot=" ) !== false )
{
$c = 6;
}
$pharsecontent[$c] .= $contentarr[$i]."\n";
++$i;
}
$remote_num = intval( str_replace( "nnunique=", "", trim( $pharsecontent[3] ) ) );
$version_num = intval( str_replace( "nntrack=", "", trim( $pharsecontent[4] ) ) );
$query = "SELECT id FROM #__ngrab_filter WHERE remote_num=".$remote_num;
$database->setQuery( $query );
$foundID = $database->loadResult( );
$query = "SELECT * FROM #__ngrab_lic WHERE id = 1";
$database->setQuery( $query );
$ret = $database->loadObject( );
$lic_data = pack( "H".strlen( $ret->license ), $ret->license );
$nng = new NNewsGrabber( $ret->serial_number, $ret->license_key, $lic_data );
$filter_spec = bin2hex( $nng->encrypt_filter( trim( $pharsecontent[0] ) ) );
$filters = new stdClass( );
$filters->user_id = $my->id;
$filters->filter_name = str_replace( "nntitle=", "", trim( $pharsecontent[1] ) );
$filters->filter_spec = $filter_spec;
$filters->inc_top = str_replace( "nntop=", "", trim( $pharsecontent[5] ) );
$filters->inc_bot = str_replace( "nnbot=", "", trim( $pharsecontent[6] ) );
$filters->filter_type = str_replace( "nntype=", "", trim( $pharsecontent[2] ) );
$filters->remote_num = $remote_num;
$filters->version_num = $version_num;
$filters->mdate = date( "Y-m-d H:i:s" );
$filters->cdate = date( "Y-m-d H:i:s" );
if ( $limitarr['limitfilter'] != 0 - 1 )
{
if ( $foundID )
{
if ( 0 < $limitarr['limitfilter'] && $limitarr['limitfilter'] < $countfillter )
{
JError::raisewarning( 400, JText::_( "You have reach the limit number of filter" ) );
}
else
{
$filters->id = $foundID;
$database->updateObject( "#__ngrab_filter", $filters, "id" );
$msg = $filters->filter_name." ".JText::_( "updated successfull" );
}
}
else if ( 0 < $limitarr['limitfilter'] && $limitarr['limitfilter'] <= $countfillter )
{
JError::raisewarning( 400, JText::_( "You have reach the limit number of filter" ) );
}
else
{
$filters->id = NULL;
$database->insertObject( "#__ngrab_filter", $filters, "id" );
$msg = $filters->filter_name." ".JText::_( "added successfull" );
}
}
else
{
JError::raisewarning( 500, JText::_( "Can not load filter limit infomation" ) );
}
$link = "index.php?option=com_ngrabnews&view=filters";
$this->setRedirect( $link, $msg );
}
}
else
{
JError::raisewarning( 400, JText::_( "This extension is not allowed" ) );
}
}
}
public function save( )
{
if ( !JRequest::checktoken( ) )
{
jexit( "Invalid Token" );
}
$task = JRequest::getvar( "task" );
$post = JRequest::get( "post" );
$post['filter_spec'] = JRequest::getvar( "filter_spec", "", "post", "STRING", JREQUEST_ALLOWRAW );
$post['inc_top'] = JRequest::getvar( "inc_top", "", "post", "STRING", JREQUEST_ALLOWRAW );
$post['inc_bot'] = JRequest::getvar( "inc_bot", "", "post", "STRING", JREQUEST_ALLOWRAW );
$model = $this->getModel( "Filter" );
if ( $model->store( $post ) )
{
switch ( $task )
{
case "apply" :
}
$link = "index.php?option=com_ngrabnews&view=filter&cid[]=".( integer )$model->get( "id" )."&hidemainmenu=1";
break;
$link = "index.php?option=com_ngrabnews&view=filters";
break;
$msg = JText::_( "Filter Saved" );
$cache =& JFactory::getcache( "com_ngrabnews" );
$cache->clean( );
}
else
{
$msg = JText::_( "Error Saving Filter" );
$link = "index.php?option=com_ngrabnews&view=filters";
}
$this->setRedirect( $link, $msg );
}
public function remove( )
{
if ( !JRequest::checktoken( ) )
{
jexit( "Invalid Token" );
}
$cid = JRequest::getvar( "cid", array( 0 ), "post", "array" );
if ( !is_array( $cid ) || count( $cid ) < 1 )
{
$msg = "";
JError::raisewarning( 500, JText::_( "SELECT ITEM DELETE" ) );
}
else
{
$model = $this->getModel( "Filters" );
if ( $model->delete( $cid ) )
{
$msg = JText::_( "ITEM DELETE SUCCESSFUL" );
}
}
$this->setRedirect( "index.php?option=com_ngrabnews&view=filters", $msg );
}
public function cancel( )
{
if ( !JRequest::checktoken( ) )
{
jexit( "Invalid Token" );
}
$product =& JTable::getinstance( "Filter", "Table" );
$product->bind( JRequest::get( "post" ) );
$this->setRedirect( "index.php?option=com_ngrabnews&view=filters" );
}
public function edit( )
{
JRequest::setvar( "view", "filter" );
JRequest::setvar( "hidemainmenu", 1 );
$model = $this->getModel( "Filter" );
parent::display( );
}
}
?>
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.