<?php
/////////////////////////////////////////

// ************* Theme Options Page *********** //

add_action('admin_menu', 'mkt_add_product'); //Add new menu block to admin side

function mkt_add_product(){	
	if(function_exists(add_object_page))
    {
        add_object_page ('Geo Places', 'Geo Places', 8,'product_menu.php', 'admin_settings',  get_bloginfo('template_url').'/images/favicon.ico');
    }
    else
    {
        add_menu_page ('Geo Places', 'Geo Places', 8,'product_menu.php', 'admin_settings',  get_bloginfo('template_url').'/images/favicon.ico'); 
    }
   	
	add_submenu_page('product_menu.php', "General Settings", "General Settings", 8, 'product_menu.php', 'admin_settings');
	add_submenu_page('product_menu.php', "Design Settings", "Design Settings", 8, 'theme_settings', 'theme_settings');
	add_submenu_page('product_menu.php', "Payment Options", "Payment Options", 8, 'paymentoptions', 'payment_options');
	add_submenu_page('product_menu.php', "Catetory Icons", "Catetory Icons", 8, 'catetory_icons', 'catetory_icons');
	add_submenu_page('product_menu.php', "Manage Coupon", "Manage Coupon", 8, 'managecoupon', 'manage_coupon');
	add_submenu_page('product_menu.php', "Manage Price", "Manage Price", 8, 'price', 'manage_price');
	add_submenu_page('product_menu.php', "Manage Post Custom Fields", "Custom Field Settings", 8, 'custom', 'manage_custom');
	add_submenu_page('product_menu.php', "Bulk Upload", "Bulk Upload", 8, 'bulk', 'bulk_upload');
}

function manage_custom()
{
	include_once(TEMPLATEPATH . '/admin/admin_manage_custom_fields.php');
}

function bulk_upload()
{
	include_once(TEMPLATEPATH . '/library/includes/admin_bulk_upload.php');
}
function admin_settings()
{
	include_once(TEMPLATEPATH . '/library/includes/admin_settings.php');
}
function theme_settings()
{
	mytheme_add_admin();
}
function payment_options()
{
	include_once(TEMPLATEPATH . '/library/includes/admin_paymethods.php');
}
function catetory_icons()
{
	include_once(TEMPLATEPATH . '/library/includes/admin_catetory_icons.php');
}
function manage_coupon()
{
	if($_REQUEST['pagetype']=='addedit')
	{
		include_once(TEMPLATEPATH . '/library/includes/admin_coupon.php');
	}else
	{
		include_once(TEMPLATEPATH . '/library/includes/admin_manage_coupon.php');
	}
}
function manage_price()
{
	if($_REQUEST['pagetype']=='addedit')
	{
		include_once(TEMPLATEPATH . '/library/includes/admin_price.php');
	}else
	{
		include_once(TEMPLATEPATH . '/library/includes/admin_manage_price.php');
	}
}
?>