<?php
/******************************************************************************/
//                                                                            //
//                             Smarty plugin                                  //
//                            @package Smarty                                 //
//							 @subpackage plugins                              //
//                        http://life-style.uz/                               //
//                   produced by Life Style, life-style.uz                    //
//                                                                            //
/******************************************************************************/

function smarty_function_socials($params, &$smarty) {
	global $socials;
	
	$assign	= fetch_getParam('assign', $params, 'socials');
	$fields	= fetch_getParam('fields', $params, 'socialId, name, url, fileName, icon, status');
	$status  = fetch_getParam('status', $params, 'V');

	if (!empty($status)) connect()->where('status', $status);

    $socials = connect()->table('socials')->select($fields)->orderBy('orderBy', 'ASC')->getAll('array');

    $smarty->assign($assign, $socials);

}




?>