<?php

/******************************************************************************
 *
 *	PROJECT: Flynax Classifieds Software
 *	VERSION: 4.0
 *	LISENSE: http://www.flynax.com/license-agreement.html
 *	PRODUCT: General Classifieds
 *	
 *	FILE: HOME.INC.PHP
 *
 *	This script is a commercial software and any kind of using it must be 
 *	coordinate with Flynax Owners Team and be agree to Flynax License Agreement
 *
 *	This block may not be removed from this file or any other files with out 
 *	permission of Flynax respective owners.
 *
 *	Copyrights Flynax Classifieds Software | 2012
 *	http://www.flynax.com/
 *
 ******************************************************************************/

/* get blocks */
$rlAdmin -> assignBlocks();

/* get statistics */
$rlAdmin -> getStatistics();
/*$plugin_statistics[] = array(
	'name' => 'test1',
	'items' => array(
		array(
			'name' => 'Item 1',
			'link' => 'http://www.com/item1',
			'count' => 1
		),
		array(
			'name' => 'Item 2',
			'link' => 'http://www.com/item2',
			'count' => 2,
			'note' => 'per 2 last days'
		)
	)
);*/
$rlSmarty -> assign_by_ref('plugin_statistics', $plugin_statistics);

/* build desktop settings */
foreach ( $languages as $key => $value )
{
	$sett_languages[$key] = array(
		'Key' => $value['Code'],
		'name' => $value['name']
	);
}

$desktop_settings = array(
	array(
		'Key' => 'lang',
		'Type' => 'select',
		'Name' => $lang['language'],
		'Default' => RL_LANG_CODE,
		'Values' => $sett_languages,
		'Deny' => true
	),
	array(
		'Key' => 'admin_hide_denied_items',
		'Type' => 'bool',
		'Name' => $lang['config+name+admin_hide_denied_items'],
		'Default' => $config['admin_hide_denied_items']
	)
);
$rlSmarty -> assign_by_ref( 'desktop_settings', $desktop_settings );

$rlHook -> load('apPhpHome');

/* registr ajax functions */
$rlXajax -> registerFunction( array( 'saveConfig', $rlAdmin, 'ajaxSaveConfig' ) );

$reefless -> loadClass('Plugin', 'admin');
$rlXajax -> registerFunction( array( 'remoteInstall', $rlPlugin, 'ajaxRemoteInstall' ) );
$rlXajax -> registerFunction( array( 'remoteUpdate', $rlPlugin, 'ajaxRemoteUpdate' ) );
$rlXajax -> registerFunction( array( 'install', $rlPlugin, 'ajaxInstall' ) );
$rlXajax -> registerFunction( array( 'update', $rlPlugin, 'ajaxUpdate' ) );