<?php

if ( !defined( 'SMARTY_DIR' ) ) {
	include_once( 'init.php' );
}

include_once( 'affsessioninc.php' );

$t->assign ( 'refcounter', $osDB->getOne( 'SELECT count(*) as acount FROM ! where affid = ?', array( AFFILIATE_REFERALS_TABLE, $_SESSION['AffId' ] ) ) );

$t->assign ( 'profcounter',$osDB->getOne( 'SELECT count(*) as num2 FROM ! where affid = ? and userid <> ?', array( AFFILIATE_REFERALS_TABLE, $_SESSION['AffId'], 0  ) ) );

$t->assign( 'rendered_page', $t->fetch( 'affpanel.tpl' ) );

$t->display ( 'index.tpl' );

?>