<div id="sidebar">
<?php
// If Admin is logged, display the link to Orders page
global $current_user;
get_currentuserinfo();
if( $current_user->ID == 1 ) {
	$aOptions = SofaShoppr::initOptions( false );
	$orderspage = $aOptions[ 'orderspage' ];
	$perma_orders = get_permalink( $orderspage );
	$use_stock_inventory = $aOptions[ 'use_stock_inventory' ];
	
	echo '<div class="widget">';
	echo '<h1 class="titleprice"><a href="' . $perma_orders . '" rel="nofollow">' . __( "Orders Overview", "sofa_shoppr" ) . '</a></h1>';
	echo '</div>';
	// stock inventory
	if( $use_stock_inventory == 'yes' ) {
		echo '<div class="widget">';
		echo '<h1 class="titleprice"><a href="' . ( get_bloginfo( 'template_directory' ) . '/inventory.php' ) . '" rel="nofollow">' . __( "Stock Inventory", "sofa_shoppr" ) . '</a></h1>';
		echo '</div>';
	}
}
?>
<?php if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( 'Sidebar Page' ) ) : ?>

<?php endif; ?>

</div>
