<?php
$absolute_path = __FILE__;
$path_to_file = explode('wp-content', $absolute_path);
$path_to_wp = $path_to_file[0];

//Access WordPress
require_once( $path_to_wp.'/wp-load.php' );
?>
<!DOCTYPE html>

<html lang="en">
<head>
	<meta charset="utf-8">
	<style>
		#main-shortcodes { width: 95%; }
		#ktz-shortcodes label { font-weight: bold; }
		#ktz-shortcodes select,#ktz-shortcodes input[type=text],#ktz-shortcodes textarea {background:#f8f8f8; color: #252525;font-size: 14px;border: 1px solid #d0d0d0;width: 99%;padding: 5px;margin-bottom: 10px; border-radius:3px; -moz-border-radius:3px; -webkit-border-radius:3px; -khtml-border-radius:3px}
		#ktz-shortcodes select:focus,#ktz-shortcodes input[type=text]:focus, #ktz-shortcodes textarea:focus{border-color:#bbb;}
		#ktz-shortcodes th { padding: 14px 10px; }
		#ktz-shortcodes small { font-style:italic;font-size:11px;line-height:13px; }
	</style>
</head>
<body>

<div id="main-shortcodes">
	<table id="ktz-shortcodes" class="form-table">
		<tbody>
			<!-- Dropdown menu -->
			<tr>
				<th>
					<label for="shortcode-dropdown"><?php _e('Select shortcodes', ktz_admin_textdomain); ?></label>
				</th>
				<td>
					<select name="shortcode-dropdown" id="shortcode-dropdown" class="widefat">
						<option value=""><?php _e('Select shortcodes', ktz_admin_textdomain); ?></option>
						<optgroup label="--- <?php _e('General', ktz_admin_textdomain); ?> ---">
							<option value="googlemap"><?php _e('Googlemap', ktz_admin_textdomain); ?></option>
							<option value="soundcloud"><?php _e('Soundcloud', ktz_admin_textdomain); ?></option>
							<option value="video"><?php _e('Video', ktz_admin_textdomain); ?></option>
						</optgroup>
					</select>
				</td>
			</tr>
			

			<!-- Googlemap -->
			<tr class="option googlemap">
				<th><label for="googlemap-width"><?php _e('Googlemap width', ktz_admin_textdomain); ?></label></th>
				<td><input type="text" id="googlemap-width" name="width" value="100%" /><br />
				<small><?php _e('Please fill with googlemap width for display example 300 without px. For responsive use 100%.', ktz_admin_textdomain); ?></small></td>
			</tr>
			<tr class="option googlemap">
				<th><label for="googlemap-height"><?php _e('googlemap height', ktz_admin_textdomain); ?></label></th>
				<td><input type="text" id="googlemap-height" name="height" value="250" /><br />
				<small><?php _e('Please fill with googlemap height for display example 250 without px.', ktz_admin_textdomain); ?></small></td>
			</tr>
			<tr class="option googlemap">
				<th><label for="googlemap-url"><?php _e('googlemap url', ktz_admin_textdomain); ?></label></th>
				<td><input type="text" id="googlemap-url" name="id" value="https://maps.google.com/?ll=6.664608,-34.453125&spn=129.846642,346.289063&t=m&z=2" /><br />
				<small><?php _e('Please fill with your googlemap url. Example https://maps.google.com/?ll=6.664608,-34.453125&spn=129.846642,346.289063&t=m&z=2', ktz_admin_textdomain); ?></small></td>
			</tr>

			<!-- Soundcloud -->			
			<tr class="option soundcloud">
				<th><label for="soundcloud-url"><?php _e('soundcloud url', ktz_admin_textdomain); ?></label></th>
				<td><input type="text" id="soundcloud-url" name="surl" value="http://api.soundcloud.com/tracks/44200324" /><br />
					<small><?php _e('Insert soundcloud code API link example http://api.soundcloud.com/tracks/44200324. Insert: http://api.soundcloud.com/tracks/44200324.', ktz_admin_textdomain); ?></small></td>
			</tr>

			<!-- Video -->					
			<tr class="option video">
				<th><label for="Video-choice"><?php _e('Select video', ktz_admin_textdomain); ?></label></th>
				<td><select name="vchoice" id="video-choice">
					<option value="youtube"><?php _e('Youtube', ktz_admin_textdomain); ?></option>
					<option value="vimeo"><?php _e('Vimeo', ktz_admin_textdomain); ?></option>
					</select><br />
					<small><?php _e('Select your video came from.. Example youtube, vimeo.', ktz_admin_textdomain); ?></small></td>
			</tr>
			<tr class="option video">
				<th><label for="video-width"><?php _e('Video width', ktz_admin_textdomain); ?></label></th>
				<td><input type="text" id="video-width" name="vwidth" value="100%" /><br />
				<small><?php _e('Please fill with video width. Example 600 (without px), for responsive use 100%', ktz_admin_textdomain); ?></small></td>
			</tr>
			<tr class="option video">
				<th><label for="video-height"><?php _e('video height', ktz_admin_textdomain); ?></label></th>
				<td><input type="text" id="video-height" name="vheight" value="300" /><br />
				<small><?php _e('Please fill with video height for display example 300 without px.', ktz_admin_textdomain); ?></small></td>
			</tr>
			<tr class="option video">
				<th><label for="video-url"><?php _e('video url', ktz_admin_textdomain); ?></label></th>
				<td><input type="text" id="video-url" name="vurl" value="pigScdcN7CI" /><br />
				<small><?php _e('Insert youtube code link example http://www.youtube.com/watch?v=pigScdcN7CI&feature=related. Just insert: pigScdcN7CI. For vimeo example http://vimeo.com/51175339 just insert 51175339.', ktz_admin_textdomain); ?></small></td>
			</tr>
			
			<!-- Insert button -->
			<tr>
				<td>
					<p><button id="insert-shortcode" class="button-primary"><?php _e('Insert Shortcode', ktz_admin_textdomain); ?></button></p>
				</td>
			</tr>
		</tbody>
	</table>
</div>
<script>jQuery('.option').hide();</script>
</body>
</html>