<?php

global 	$tab_feature_b1,
        $tab_feature_b2,
        $seo_meta_tags,
        $geourl_meta_tags,
        $geourl_loc,
        $geourl_title,
	        $next_page,
	        $next_page_txt,
        $screen_width,
        $theme_version,
        $tab_count_b1,
        $tab_count_b2,
        $tab_b1_titles,
        $tab_b2_titles;



function  gn_print_option_page()
{
	global 	$tab_feature_b1,
	        $tab_feature_b2,
	        $seo_meta_tags,
	        $next_page,
	        $next_page_txt,
	        $geourl_meta_tags,
	        $geourl_loc,
	        $geourl_title,
	        $theme_version,
	        $screen_width,
	        $tab_count_b1,
	        $tab_count_b2,
	        $tab_b1_titles,
 	        $tab_b2_titles;


  $show_header = get_option("gn_show_header");
	if ( $show_header == 'on' )
	{
		$show_header_checkbox = ' checked="checked" ';
	}
	else
	{
		$show_header_checkbox = ' ';
	}


  echo '  <div class="wrap">' . "\n";
  echo '    <h2>German Newspaper Theme Options</h2>' . "\n";
  echo '    <form action="" method="post">
				<p class="submit">
					<input type="submit" name="info_update" value="Update Options &raquo;" />
					<br />
				</p>

				<fieldset>
			  	<h3>Theme Version</h3>
					<div id="theme_option_set">
			  			<p>
         German NewsPaper Version ' . $theme_version . '
				  		</p>
					</div>
				</fieldset>

				<br />

				<fieldset>
			  	<h3>Theme Image Background</h3>
					<div id="theme_option_set">
			  			<p>
				  			' . __( 'Here you can set the Background Color for images.', 'german_newspaper') . '
				  		</p>
						<table>
							<tr>
								<td>
					         			' . __( 'Background Color:', 'german_newspaper') . '
						  	</td>
								<td>
									<input type="text" size="8" name="new_gn_img_background" value="' . get_option("gn_img_background" ) . '" />
								</td>
							</tr>
						  </table>
					</div>
				</fieldset>

				<br />
				
				<fieldset>
			  	<h3>Theme Header - Show Only Image</h3>
					<div id="theme_option_set">
			  			<p>
				  			' . __( 'Here you can decide if you want that only your own image in the header is visble without', 'german_newspaper') . ' <br />
				  			' . __( 'the blog title and description.', 'german_newspaper') . '
				  		</p>
						<table>
							<tr>
								<td>
					        Show only header image:
						  	</td>
								<td>
  								<input type="checkbox" name="new_gn_show_header" value="open" ' . $show_header_checkbox . '/>
								</td>
							</tr>
						  </table>
					</div>
					<br />
			  	<h3>Header Image Location</h3>
					<div id="theme_option_set">
			  			<p>
				  			' . __( 'Here you can set the URL for the header image.', 'german_newspaper') . '
				  		</p>
						<table>
							<tr>
								<td>
					         			Image Location:
						  		</td>
								<td>
									<input type="text" size="25" name="new_gn_header_img" value="' . get_option("gn_header_img" ) . '" />
								</td>
							</tr>
						  </table>
					</div>
				</fieldset>

				<br />

				<fieldset>
					<h3>News-Headline - Image Location and Name</h3>
					<div id="theme_option_set">
						<p>
							' . __( 'Here you can type in the URL and name of the Images in des News-Headline.', 'german_newspaper') . '
						</p>
						<table>
							<tr>
								<td><strong>
									Left-Image:
								</strong></td>
								<td>
								</td>
							</tr>
							<tr>
								<td>
									Location:
								</td>
								<td>
									<input type="text" size="75" name="new_gn_left_img" value="' . get_option( "gn_left_img" ) . '" />
								</td>
							</tr>
							<tr>
								<td>
									Alternate Text:
								</td>
								<td>
									<input type="text" size="75" name="new_gn_left_img_atxt" value="' . get_option( "gn_left_img_atxt" ) . '" />
								</td>
							</tr>
							<tr>
								<td>
									Link-URL:
								</td>
								<td>
									<input type="text" size="75" name="new_gn_left_img_lnk" value="' . get_option( "gn_left_img_lnk" ) . '" />
								</td>
							</tr>
							<tr>
							</tr>
							<tr>
						  		<td><strong>
							    		Right-Image:
								</strong></td>
								<td>
							  	</td>
							</tr>
							<tr>
						  		<td>
							    		Location:
								</td>
								<td>
									<input type="text" size="75" name="new_gn_right_img" value="' . get_option( 'gn_right_img' ) . '" />
							  	</td>
							</tr>
							<tr>
						  		<td>
							    		Alternate Text:
								</td>
								<td>
									<input type="text" size="75" name="new_gn_right_img_atxt" value="' . get_option( 'gn_right_img_atxt' ) . '" />
							  	</td>
							</tr>
							<tr>
						  		<td>
							    		Link-URL:
								</td>
								<td>
									<input type="text" size="75" name="new_gn_right_img_lnk" value="' . get_option( 'gn_right_img_lnk' ) . '" />
							  	</td>
							</tr>
						</table>
					</div>
				</fieldset>

				<br />

				<fieldset>
			  	<h3>Theme - Color Settings</h3>
					<div id="theme_option_set">
			  		<p>
				  		' . __( 'Here you can set the values of different Theme colors.' , 'german_newspaper') . '
			  		</p>
					  <table>
							<tr>
							  <td>
         		    	Outer Border Color:
					  		</td>
							  <td>
					        <input type="text" size="25" name="new_gn_body_background" value="' . get_option("gn_body_background" ) . '" />
							  </td>
							</tr>
							<tr>
							  <td>
							  	Main Background Color:
							  </td>
							  <td>
					        <input type="text" size="25" name="new_gn_wrapper_background" value="' . get_option("gn_wrapper_background" ) . '" />
							  </td>
							</tr>
							<tr>
							  <td>
							  	Main Text Color:
							  </td>
							  <td>
					        <input type="text" size="25" name="new_gn_body_color" value="' . get_option("gn_body_color" ) . '" />
							  </td>
							</tr>
					  </table>
					</div>
				</fieldset>

				<br />';
				


  //  set checkboxes
  $next_page = get_option("gn_next_page");
	if ( $next_page == 'on' )
	{
		$next_page_checkbox = ' checked="checked" ';
	}
	else
	{
		$next_page_checkbox = ' ';
	}

  $screen_width = get_option("gn_screen_width");
	if ( $screen_width == 'on' )
	{
		$width_checkbox = ' checked="checked" ';
	}
	else
	{
		$width_checkbox = ' ';
	}

  $seo_meta_tags = get_option("gn_seo_meta_tags");
	if ( $seo_meta_tags == 'on' )
	{
		$seo_meta_tags_checkbox = ' checked="checked" ';
	}
	else
	{
		$seo_meta_tags_checkbox = ' ';
	}

  $geourl_meta_tags = get_option("gn_geourl_meta_tags");
	if ( $geourl_meta_tags == 'on' )
	{
		$geourl_meta_tags_checkbox = ' checked="checked" ';
	}
	else
	{
		$geourl_meta_tags_checkbox = ' ';
	}




	echo '
				<fieldset>
			  	<h3>Theme - Width</h3>
					<div id="theme_option_set">
			  		<p>
            ' . __( 'Here you can decide in which size you want the theme - 800px or 1024px (default).', 'german_newspaper') . '
			  		</p>
					  <table>
							<tr>
							  <td>
            Width 800px:
								<input type="checkbox" name="new_gn_screen_width" value="open" ' . $width_checkbox . '/>
					  		</td>
							  <td>
							  </td>
							</tr>
					  </table>
					</div>
				</fieldset>

				<br />

				<fieldset>
			  	<h3>Theme - Next Page String</h3>
					<div id="theme_option_set">
			  		<p>
            ' . __( 'Here you can decide if you want change the \'Read more ...\' String.', 'german_newspaper') . '
			  		</p>
					  <table>
							<tr>
							  <td>
            Change Default String:
								<input type="checkbox" name="new_gn_next_page" value="open" ' . $next_page_checkbox . '/>
					  		</td>
							  <td>
							  </td>
							  <td>
							  </td>';

							  
					if ( $next_page == 'on' )
					{
						$class = '';
					}
					else
					{
						$class = ' class="hidden" ';
					}
							  
  echo '							  <td' . $class .  '>
            Next Page String:
					  		</td>
							  <td' . $class .  '>
									<input type="text" size="20" name="new_gn_next_page_txt" maxlength="60" value="' . get_option("gn_next_page_txt" ) . '" />
							  </td>
							</tr>
					  </table>
					</div>
				</fieldset>

				<br />

				<fieldset>
			  	<h3>Theme - HTML Source Code - meta tags</h3>
					<div id="theme_option_set">
			  		<p>
            ' . __( 'Here you can decide which meta tags should be in the HTML source code or not.', 'german_newspaper') . '
			  		</p>
					  <table>
							<tr>
							  <td>
            print SEO meta tags:
					  		</td>
							  <td>
									<input type="checkbox" name="new_gn_seo_meta_tags" value="open" ' . $seo_meta_tags_checkbox . '/>
							  </td>
							</tr>
							<tr>
							  <td>
							  </td>
							  <td>
							  </td>
							  <td>
							Keywords:
							  </td>
							  <td>
									<input type="text" size="35" name="new_gn_seo_meta_keyw" maxlength="200" value="' . get_option("gn_seo_meta_keyw" ) . '" />
							  </td>
							</tr>
							<tr>
							  <td>
							  </td>
							  <td>
							  </td>
							  <td>
							Description:
							  </td>
							  <td>
									<input type="text" size="35" name="new_gn_seo_meta_desc" value="' . get_option("gn_seo_meta_desc" ) . '" />
							  </td>
							</tr>
							<tr>
							  <td>
							  </td>
							  <td>
							  </td>
							  <td>
							Author:
							  </td>
							  <td>
									<input type="text" size="35" name="new_gn_seo_meta_author" value="' . get_option("gn_seo_meta_author" ) . '" />
							  </td>
							</tr>
							<tr>
							  <td>
            print GeoUrl meta tags:
					  		</td>
							  <td>
									<input type="checkbox" name="new_gn_geourl_meta_tags" value="open" ' . $geourl_meta_tags_checkbox . '/>
					  		</td>
							</tr>
							<tr>
							  <td>
							  </td>
							  <td>
							  </td>
							  <td>
							GeoUrl Location:
							  </td>
							  <td>
									<input type="text" name="new_gn_geourl_loc" value="' . get_option("gn_geourl_loc" ) . '" />      <a href="http://geotags.com/geobot/add-tags.html" target="_blank" title="What is this ?">?</a>
							  </td>
							</tr>
							<tr>
							  <td>
							  </td>
							  <td>
							  </td>
							  <td>
							GeoUrl Title:
							  </td>
							  <td>
									<input type="text" name="new_gn_geourl_title" value="' . get_option("gn_geourl_title" ) . '" />
								</td>
							</tr>
					  </table>
					</div>
				</fieldset>

				<br />

				<fieldset>
			  	<h3>Theme - Page Bar - Site exclusion</h3>
					<div id="theme_option_set">
				   	<p>
					   	' . __( 'Here you can define which pages should not be visible in the page bar of the header.', 'german_newspaper') . '
							<br />
					   	' . __( 'Please type in the Id of the pages you want exclude separated by comma.', 'german_newspaper') . '
				   	</p>
				   	<p>
				  	 	Page-Id: <input type="text" name="new_gn_page_exclude" value="' . get_option("gn_page_exclude" ) . '" />
					   	</p>
					</div>
				</fieldset>

				<br />';
				

	if ( $tab_feature_b1 == 'on' )
	{
		$tab_b1_checkbox = ' checked="checked" ';
	}
	else
	{
		$tab_b1_checkbox = ' ';
	}

	if ( $tab_feature_b2 == 'on' )
	{
		$tab_b2_checkbox = ' checked="checked" ';
	}
	else
	{
		$tab_b2_checkbox = ' ';
	}

	echo '			<fieldset>
					<h3>Theme - Tab Panel Feature for Bottom Bars</h3>
					<div id="theme_option_set">
						<p>
						' . __( 'Here you can define if you like to have a Tab-Panel inside your two bottom bars or not.', 'german_newspaper') . '
						<br />
						</p>

						<br />

						<table>
							<tr>
								<td>
								Bottom Bar 1:
								<input type="checkbox" name="new_gn_tab_feature_b1" value="open" ' . $tab_b1_checkbox . '/>
								</td>
								<td>';

					if ( $tab_feature_b1 == 'on' )
					{
						$class = '';
					}
					else
					{
						$class = ' class="hidden" ';
					}
					
  echo '<label for="new_gn_tab_count_b1"' . $class . '>Count of Tabs: </label><input type="text"' . $class .  'size="5" name="new_gn_tab_count_b1" value="' . $tab_count_b1 . '" />
							<br />';

	echo '							</td>
	              <td>
	              </td>
							</tr>';

					  get_tab_b1_titles();

						foreach ( $tab_b1_titles as $index => $title )
						{
							echo '						<tr>
								<td>
								</td>
								<td>
								</td>
								<td>
									<label for="new_gn_b1_tab_' . $index . '_title"' . $class . '>Title Tab ' . $index . ': </label>
									<input type="text" size="15"' . $class . ' name="new_gn_b1_tab_' . $index . '_title" value="' . $title . '" />
								</td>
							<tr>';
						}

	echo '							<td>
								Bottom Bar 2:
								<input type="checkbox" name="new_gn_tab_feature_b2" value="open" ' . $tab_b2_checkbox . '/>
							</td>
							<td>';

					if ( $tab_feature_b2 == 'on' )
					{
						$class = '';
					}
					else
					{
						$class = ' class="hidden" ';
					}

		  		echo '<label for="new_gn_tab_count_b2"' . $class . '>Count of Tabs: </label><input type="text"' . $class .  'size="5" name="new_gn_tab_count_b2" value="' . $tab_count_b2 . '" />
							<br />';

	echo '						</td>
	            <td>
	            </td>
							</tr>';
							
					  get_tab_b2_titles();

						foreach ( $tab_b2_titles as $index => $title )
						{
							echo '						<tr>
								<td>
								</td>
								<td>
								</td>
								<td>
									<label for="new_gn_b2_tab_' . $index . '_title"' . $class . '>Title Tab ' . $index . ': </label>
									<input type="text" size="15"' . $class . ' name="new_gn_b2_tab_' . $index . '_title" value="' . $title . '" />
								</td>
							<tr>';
						}

	echo '					</table>
						</div>
         </fieldset>

				<br />

				<fieldset>
			  	<h3>Theme - remove all registered widgets</h3>
					<div id="theme_option_set">
				   	<p>
					   	' . __( 'Set this if you want remove all registered widgets from all sidebars: ', 'german_newspaper') . '<input type="checkbox" name="new_gn_rem_widgets" value="open" />
				   	</p>
					</div>
				</fieldset>

    		<br />

				<p class="submit">
					<input type="submit" name="info_update" value="Update Options &raquo;" />
				</p>
			</form>
		</div>';
}

?>