Пример #1
0
function go_clipboard_menu()
{
    global $wpdb;
    if (!current_user_can('manage_options')) {
        wp_die(__('You do not have sufficient permissions to access this page.'));
    } else {
        go_style_clipboard();
        go_jquery_clipboard();
        ?>
 <div id="records_tabs">
<ul>
    <li><a href="#clipboard_wrap">Clipboard</a></li>
    <li><a href="#go_analysis">Analysis</a></li>
  </ul>
        <div id="clipboard_wrap">
        <select class="menuitem" id="go_clipboard_class_a_choice" onchange="go_clipboard_class_a_choice();">
      <option>...</option>
      
         <?php 
        $class_a = get_option('go_class_a');
        if ($class_a) {
            foreach ($class_a as $key => $value) {
                echo '<option class="ui-corner-all">' . $value . '</option>';
            }
        }
        ?>
</select>
    
    <div id="go_clipboard_add">
    <?php 
        go_options_help('http://maclab.guhsd.net/go/video/clipboard/clipboard.mp4', 'SAMPLE TEXT');
        ?>
	<label for="go_clipboard_points"><?php 
        echo go_return_options('go_points_name');
        ?>
: </label><input name="go_clipboard_points" id="go_clipboard_points" class='go_clipboard_add'/> 
	<label for="go_clipboard_currency"><?php 
        echo go_return_options('go_currency_name');
        ?>
: </label><input name="go_clipboard_currency" id="go_clipboard_currency" class='go_clipboard_add'/>
	<label for="go_clipboard_bonus_currency"><?php 
        echo go_return_options('go_bonus_currency_name');
        ?>
: </label> <input name="go_clipboard_bonus_currency" id="go_clipboard_bonus_currency" class='go_clipboard_add'/>
	<label for="go_clipboard_penalty"><?php 
        echo go_return_options('go_penalty_name');
        ?>
: </label><input name="go_clipboard_penalty" id="go_clipboard_penalty" class='go_clipboard_add'/>
	<label for="go_clipboard_badge">Badge ID:</label><input name="go_clipboard_badge" id="go_clipboard_badge" class='go_clipboard_add'/><br />
	<label name="go_clipboard_reason">Message: </label>
    <div>
    	<textarea name="go_clipboard_reason" id="go_clipboard_reason" placeholder='See me'></textarea><br/>
        <button class="ui-button-text" id="go_send_message" onclick="go_clipboard_add();">Add</button>
        <button id="go_fix_messages" onclick="fixmessages()">Fix Messages</button>
	</div>

	<table  id="go_clipboard_table" class="pretty" >
		<thead>
			<tr>
				<th><input type="checkbox" onClick="go_toggle(this);" /></th>
				<th class="header"><a href="#" >ID</a></th>
				<th class="header"><a href="#" ><?php 
        echo go_return_options('go_class_b_name');
        ?>
</a></th>
				<th class="header"><a href="#" >Student Name</a></th>
				<th class="header"><a href="#" >Display Name</a></th>
				<th class="header"><a href="#" ><?php 
        echo go_return_options('go_level_names');
        ?>
</a></th>
				<?php 
        if (go_return_options('go_focus_switch') == 'On') {
            ?>
<th class="header"><a href="#" ><?php 
            echo go_return_options('go_focus_name');
            ?>
</a></th><?php 
        }
        ?>
				<th class="header"><a href="#"><?php 
        echo go_return_options('go_points_name');
        ?>
</a></th>
				<th class="header"><a href="#" ><?php 
        echo go_return_options('go_currency_name');
        ?>
</a></th>
				<th class="header"><a href="#"><?php 
        echo go_return_options('go_bonus_currency_name');
        ?>
</a></th>
				<th class="header"><a href="#"><?php 
        echo go_return_options('go_penalty_name');
        ?>
</a></th>
				<th class="header"><a href="#"><?php 
        echo go_return_options('go_badges_name');
        ?>
</a></th>
			</tr>
		</thead>
	<tbody id="go_clipboard_table_body"></tbody>
	</table>
    </div>
    
     </div>
	 <div id="go_analysis">
		Choose the day at which data will be collected at midnight (0:00 AM)
		<select id='go_day_select' onchange='go_update_script_day()'>
			<?php 
        $script_day = go_return_options('go_analysis_script_day');
        if ($script_day) {
            echo "<option value='{$script_day}'>{$script_day}</option>";
        }
        ?>
			<option value='Monday'>Monday</option>
			<option value='Tuesday'>Tuesday</option>
			<option value='Wednesday'>Wednesday</option>
			<option value='Thursday'>Thursday</option>
			<option value='Friday'>Friday</option>
			<option value='Saturday'>Saturday</option>
			<option value='Sunday'>Sunday</option>
		</select>
         <select id="go_selection" onchange="go_update_graph();">
            <option value="1"><?php 
        echo go_return_options('go_points_name');
        ?>
</option>
            <option value="4"><?php 
        echo go_return_options('go_currency_name');
        ?>
</option>
            <option value="0"><?php 
        echo go_return_options('go_bonus_currency_name');
        ?>
</option>
            <option value="0"><?php 
        echo go_return_options('go_penalty_name');
        ?>
</option>
            <option value="2"><?php 
        echo go_return_options('go_third_stage_name');
        ?>
</option>
            <option value="3"><?php 
        echo go_return_options('go_fourth_stage_name');
        ?>
</option>
         </select>
         <div id="choices">
         <?php 
        if ($class_a) {
            foreach ($class_a as $class) {
                ?>
                	<input type="checkbox" class="go_class_a" name="<?php 
                echo strtolower(preg_replace('/\\s+/', '', $class));
                ?>
" value="<?php 
                echo $class;
                ?>
" onclick="go_update_graph(this)"/><?php 
                echo $class;
                ?>
<br />
                    <div id="<?php 
                echo strtolower(preg_replace('/\\s+/', '', $class));
                ?>
" class="go_class_a_results"></div>
                <?php 
                $i++;
            }
        }
        ?>
         </div>
         <div class="container">
             <div id="placeholder" style="width:98%;height:98%;">
             </div>  
         </div>
     </div>
     </div>
	 <?php 
    }
}
Пример #2
0
function go_task_pods()
{
    if (!empty($_GET['settings-updated']) && ($_GET['settings-updated'] === true || $_GET['settings-updated'] === 'true')) {
        echo "\n\t\t <script type='text/javascript'>\n\t\t\twindow.location = '" . esc_url(admin_url()) . "admin.php?page=go_pods'\n\t\t </script>";
    }
    $post_custom = get_post_custom(get_the_id());
    $pods_options = get_option('go_task_pod_globals');
    $pods_array = array();
    $args = array('pad_counts' => 1, 'taxonomy' => 'task_pods');
    ?>
	<div class="wrap go_wrap">
		<h2>Pods</h2><?php 
    go_options_help('http://maclab.guhsd.net/go/video/pods.mp4', 'Group ' . go_return_options('go_tasks_plural_name') . ' into pods where user must complete a designated amount of ' . go_return_options('go_tasks_plural_name') . ' to continue.', true);
    ?>
		<form method="post" action="options.php" id="go_pod_form">
			<?php 
    wp_nonce_field('update-options');
    foreach (get_categories($args) as $category) {
        $pods_array[] = $category;
    }
    foreach ($pods_array as $pod_category) {
        $link = get_category_link($pod_category);
        $slug = $pod_category->slug;
        $total = $pod_category->count;
        $name = $pod_category->name;
        echo "<span class='go_pod_list_item' id='go_pod_span_{$slug}'><b><a href='" . (!empty($pods_options[$slug]['go_pod_link']) ? $pods_options[$slug]['go_pod_link'] : '#') . "'>" . $pod_category->name . "</a></b>";
        ?>
				<br/>
				<input type='text' id='go_pod_link[<?php 
        echo $slug;
        ?>
]' name='go_task_pod_globals[<?php 
        echo $slug;
        ?>
][go_pod_link]' 
					value='<?php 
        echo !empty($pods_options[$slug]['go_pod_link']) ? $pods_options[$slug]['go_pod_link'] : '';
        ?>
' placeholder='Link to Pod Page'/><br/>
				Must Complete 
				<select id='go_pod_stage_select[<?php 
        echo $slug;
        ?>
]' name='go_task_pod_globals[<?php 
        echo $slug;
        ?>
][go_pod_stage_select]'>
					<option <?php 
        echo !empty($pods_options[$slug]['go_pod_stage_select']) && 'third_stage' == $pods_options[$slug]['go_pod_stage_select'] ? 'selected' : '';
        ?>
 
						value='third_stage'>Stage 3</option>
					<option <?php 
        echo !empty($pods_options[$slug]['go_pod_stage_select']) && 'fourth_stage' == $pods_options[$slug]['go_pod_stage_select'] ? 'selected' : '';
        ?>
 
						value='fourth_stage'>Stage 4</option>
				</select> 
				of 
				<input type='number' id='go_pod_number[ <?php 
        echo $slug;
        ?>
 ]' name='go_task_pod_globals[<?php 
        echo $slug;
        ?>
][go_pod_number]' 
					value='<?php 
        echo isset($pods_options[$slug]['go_pod_number']) ? $pods_options[$slug]['go_pod_number'] : 1;
        ?>
' style='width : 45px;' 
					min='0' max='<?php 
        echo $total;
        ?>
'/> <?php 
        echo go_return_options('go_tasks_plural_name');
        ?>
 
				to continue to 
				<select class='go_next_pod_select' id='go_next_pod_select[ <?php 
        echo $slug;
        ?>
 ]' name='go_task_pod_globals[<?php 
        echo $slug;
        ?>
][go_next_pod_select]'>
					<option>...</option>
					<?php 
        foreach ($pods_array as $pod) {
            if ($pod->slug !== $slug) {
                $pod_name = $pod->name;
                ?>
							<option <?php 
                echo !empty($pods_options[$slug]['go_next_pod_select']) && $pods_options[$slug]['go_next_pod_select'] == $pod_name ? 'selected' : '';
                ?>
 
								value='<?php 
                echo $pod_name;
                ?>
'
								slug='<?php 
                echo $pod->slug;
                ?>
'
							>
								<?php 
                echo $pod_name;
                ?>
							</option>
							<?php 
            }
        }
        ?>
				</select>
				<input type='hidden' class='go_pod_previous_pod_slug' id='go_previous_pod[ <?php 
        echo $slug;
        ?>
 ]' name='go_task_pod_globals[<?php 
        echo $slug;
        ?>
][go_previous_pod]' 
					value='<?php 
        echo isset($pod_options[$slug]['go_previous_pod']) ? $pod_options[$slug]['go_previous_pod'] : '';
        ?>
'/>
				<input type='hidden' class='go_pod_current_pod_name' id='go_pod_name[ <?php 
        echo $slug;
        ?>
 ]' name='go_task_pod_globals[<?php 
        echo $slug;
        ?>
][go_pod_name]' value='<?php 
        echo $name;
        ?>
'/>
				<input type='hidden' class='go_pod_current_pod_slug' value='<?php 
        echo $slug;
        ?>
'/>
				</span>
				</br>
				</br>
				<?php 
    }
    ?>
			<input type="submit" name="Submit" value="Save Pods" />
			<input type="hidden" name="action" value="update" />
			<input type="hidden" name="page_options" value="go_task_pod_globals"/>
		</form>
	</div>
	<?php 
}
Пример #3
0
function go_clipboard_menu()
{
    if (!current_user_can('manage_options')) {
        wp_die(__('You do not have sufficient permissions to access this page.'));
    } else {
        go_style_clipboard();
        go_jquery_clipboard();
        ?>
		<div id="records_tabs">
			<ul>
				<li><a href="#clipboard_wrap">Clipboard</a></li>
				<li><a href="#clipboard_messages_wrap">Messages</a></li>
			</ul>
			<div id="clipboard_wrap">
				<select class="menuitem" id="go_clipboard_class_a_choice" onchange="go_clipboard_class_a_choice();">
					<option>...</option>
					<?php 
        $class_a = get_option('go_class_a');
        if ($class_a) {
            foreach ($class_a as $key => $value) {
                echo "<option class='ui-corner-all'>{$value}</option>";
            }
        }
        ?>
				</select>
			
				<div id="go_clipboard_add">
					<?php 
        go_options_help('http://maclab.guhsd.net/go/video/clipboard/clipboard.mp4', 'Clipboard Help');
        ?>
					<label for="go_clipboard_points"><?php 
        echo go_return_options('go_points_name');
        ?>
: </label><input name="go_clipboard_points" id="go_clipboard_points" class='go_clipboard_add'/> 
					<label for="go_clipboard_currency"><?php 
        echo go_return_options('go_currency_name');
        ?>
: </label><input name="go_clipboard_currency" id="go_clipboard_currency" class='go_clipboard_add'/>
					<label for="go_clipboard_bonus_currency"><?php 
        echo go_return_options('go_bonus_currency_name');
        ?>
: </label> <input name="go_clipboard_bonus_currency" id="go_clipboard_bonus_currency" class='go_clipboard_add'/>
					<label for="go_clipboard_penalty"><?php 
        echo go_return_options('go_penalty_name');
        ?>
: </label><input name="go_clipboard_penalty" id="go_clipboard_penalty" class='go_clipboard_add'/>
					<label for="go_clipboard_minutes"><?php 
        echo go_return_options('go_minutes_name');
        ?>
: </label><input name="go_clipboard_minutes" id="go_clipboard_minutes" class='go_clipboard_add'/>
					<label for="go_clipboard_badge">Badge ID:</label><input name="go_clipboard_badge" id="go_clipboard_badge" class='go_clipboard_add'/><br/>
					<label name="go_clipboard_reason">Message: </label>
					<div>
						<textarea name="go_clipboard_reason" id="go_clipboard_reason" placeholder='See me'></textarea><br/>
						<button class="ui-button-text" id="go_send_message" onclick="go_clipboard_add();">Add</button>
						<button id="go_fix_messages" onclick="fixmessages()">Fix Messages</button>
					</div>
				
					<table id="go_clipboard_table" class="pretty">
						<thead>
							<tr>
								<th><input type="checkbox" onClick="go_toggle(this);" /></th>
								<th class="header"><a href="#" >ID</a></th>
								<th class="header"><a href="#" ><?php 
        echo go_return_options('go_class_b_name');
        ?>
</a></th>
								<th class="header"><a href="#" >Student Name</a></th>
								<th class="header"><a href="#" >Display Name</a></th>
								<th class="header"><a href="#" ><?php 
        echo go_return_options('go_level_names');
        ?>
</a></th>
								<?php 
        if (go_return_options('go_focus_switch') == 'On') {
            ?>
<th class="header"><a href="#" ><?php 
            echo go_return_options('go_focus_name');
            ?>
</a></th><?php 
        }
        ?>
								<th class="header"><a href="#"><?php 
        echo go_return_options('go_points_name');
        ?>
</a></th>
								<th class="header"><a href="#"><?php 
        echo go_return_options('go_currency_name');
        ?>
</a></th>
								<th class="header"><a href="#"><?php 
        echo go_return_options('go_bonus_currency_name');
        ?>
</a></th>
								<th class="header"><a href="#"><?php 
        echo go_return_options('go_penalty_name');
        ?>
</a></th>
								<th class="header"><a href="#"><?php 
        echo go_return_options('go_minutes_name');
        ?>
</a></th>
								<th class="header"><a href="#"><?php 
        echo go_return_options('go_badges_name');
        ?>
</a></th>
							</tr>
						</thead>
						<tbody id="go_clipboard_table_body"></tbody>
					</table>
				</div>
			</div>
			<div id="clipboard_messages_wrap">
				<select class="menuitem" id="go_clipboard_class_a_choice_messages" onchange="go_clipboard_class_a_choice_messages();">
					<option>...</option>
					<?php 
        $class_a_messages = get_option('go_class_a');
        if ($class_a_messages) {
            foreach ($class_a_messages as $key => $value) {
                echo "<option class='ui-corner-all'>{$value}</option>";
            }
        }
        ?>
					<option>All</option>
				</select>
				<table id="go_clipboard_messages" class="pretty">
					<thead>
						<tr>
							<th class="header" width="5%" id="messages_id"><a href="#" >ID</a></th>
							<th class="header" width="5%" id="messages_computer"><a href="#"><?php 
        echo go_return_options('go_class_b_name');
        ?>
</a></th>
							<th class="header" width="6.5%" id="messages_student"><a href="#">Student Name</a></th>
							<th class="header" width="6.5%" id="messages_display"><a href="#">Display Name</a></th>
							<th class="header" width="6%" id="messages_date"><a href="#">Date</a></th>
							<th class="header" id="messages_message"><a href="#">Message</a></th>
						</tr>
					</thead>
					<tbody id="go_clipboard_messages_body"></tbody>
				</table>
			</div>
		</div>
	<?php 
    }
}
Пример #4
0
    function game_on_options()
    {
        wp_enqueue_script('go_options', plugin_dir_url(__FILE__) . 'scripts/go_options.js');
        if (!empty($_GET['settings-updated']) && true === $_GET['settings-updated'] || !empty($_GET['settings-updated']) && 'true' === $_GET['settings-updated']) {
            go_update_globals();
            echo "\n\t\t\t<script type='text/javascript'>\n\t\t\t\twindow.location = '" . admin_url() . "/?page=game-on-options.php'\n\t\t\t</script>";
        }
        ?>
		<div class="wrap go_wrap">
		<h2>Game On Options</h2>
		<a href='http://maclab.guhsd.net/game-on' target='_blank'>Documentation Page</a>
		<form method="post" action="options.php" id="go_options_form">
			<?php 
        wp_nonce_field('update-options');
        ?>
			<div id='go_options_admin_email_wrap' class='go_options_wrap'>
			<?php 
        go_options_input('Admin Email', 'text', 'go_admin_email', 'http://maclab.guhsd.net/go/video/options/adminEmail.mp4', 'IMPORTANT: Enter your email and click the Save Options button');
        ?>
			</div>
			 <div class='go_options_accordion_wrap' opt='0'><?php 
        go_options_accordion_help('http://maclab.guhsd.net/go/video/options/namingConventions.mp4', 'Customize the names used for tasks, points, currency, etc.');
        ?>
<div class='go_options_accordion'>Naming Conventions<div class='go_triangle_container'><div class='go_options_triangle'></div></div></div></div>
				<div id='go_options_naming_conventions_wrap' class='go_options_wrap'>
					<?php 
        go_options_field('Tasks', 2, array(1 => 'go_tasks_name', 2 => 'go_tasks_plural_name'), 'http://maclab.guhsd.net/go/video/options/tasks.mp4', 'Name your assignments');
        go_options_field('Stages', 5, array(1 => 'go_first_stage_name', 2 => 'go_second_stage_name', 3 => 'go_third_stage_name', 4 => 'go_fourth_stage_name', 5 => 'go_fifth_stage_name'), 'http://maclab.guhsd.net/go/video/options/stages.mp4', 'Name the steps within your assignments');
        go_options_field('Stage Buttons', 5, array(1 => 'go_abandon_stage_button', 2 => 'go_second_stage_button', 3 => 'go_third_stage_button', 4 => 'go_fourth_stage_button', 5 => 'go_fifth_stage_button'), 'http://maclab.guhsd.net/go/video/options/stageButtons.mp4', 'Name the buttons associated with each step in your assignments');
        go_options_field('Store', 1, array(1 => 'go_store_name'), 'http://maclab.guhsd.net/go/video/options/store.mp4', 'Name the store (independent of store page title)');
        go_options_field('Task Loot', 1, array(1 => 'go_task_loot_name'), 'http://maclab.guhsd.net/go/video/options/taskLoot.mp4', 'Name the loot that has 100% rarity rewarded for task mastery');
        go_options_field('Bonus Loot', 1, array(1 => 'go_bonus_loot_name'), 'http://maclab.guhsd.net/go/video/options/bonusLoot.mp4', 'Name the rare loot rewarded for task mastery');
        go_options_field('Points', 3, array(1 => 'go_points_name', 2 => 'go_points_prefix', 3 => 'go_points_suffix'), 'http://maclab.guhsd.net/go/video/options/points.mp4', 'Name your points system (used for leveling)');
        go_options_field('Currency', 3, array(1 => 'go_currency_name', 2 => 'go_currency_prefix', 3 => 'go_currency_suffix'), 'http://maclab.guhsd.net/go/video/options/currency.mp4', 'Name your virtual currency (used to purchase goods in the store)');
        go_options_field('Bonus', 3, array(1 => 'go_bonus_currency_name', 2 => 'go_bonus_currency_prefix', 3 => 'go_bonus_currency_suffix'), 'http://maclab.guhsd.net/go/video/options/bonus.mp4', 'Name your bonus mechanism');
        go_options_field('Penalty', 3, array(1 => 'go_penalty_name', 2 => 'go_penalty_prefix', 3 => 'go_penalty_suffix'), 'http://maclab.guhsd.net/go/video/options/penalty.mp4', 'Name your penalty mechanism');
        go_options_field('Minutes', 3, array(1 => 'go_minutes_name', 2 => 'go_minutes_prefix', 3 => 'go_minutes_suffix'), 'http://maclab.guhsd.net/go/video/options/minutes.mp4', 'Name your timing mechanism');
        go_options_field('Ranks', 2, array(1 => 'go_level_names', 2 => 'go_level_plural_names'), 'http://maclab.guhsd.net/go/video/options/ranks.mp4', 'Name your leveling system');
        go_options_field('Classifications', 3, array(1 => 'go_organization_name', 2 => 'go_class_a_name', 3 => 'go_class_b_name'), 'http://maclab.guhsd.net/go/video/options/classifications.mp4', 'Name your classroom management system');
        go_options_field('Focus', 1, array(1 => 'go_focus_name'), 'http://maclab.guhsd.net/go/video/options/focus.mp4', 'Name your sub-groups');
        go_options_field('Stats', 1, array(1 => 'go_stats_name'), 'http://maclab.guhsd.net/go/video/options/stats.mp4', 'Name your data display mechanism');
        go_options_field('Inventory', 1, array(1 => 'go_inventory_name'), 'http://maclab.guhsd.net/go/video/options/inventory.mp4', 'Name your purchased items category');
        go_options_field('Badges', 1, array(1 => 'go_badges_name'), 'http://maclab.guhsd.net/go/video/options/badges.mp4', 'Name your badging system');
        go_options_field('Leaderboard', 1, array(1 => 'go_leaderboard_name'), 'http://maclab.guhsd.net/go/video/options/leaderboard.mp4', 'Name your leaderboard');
        ?>
				</div>
			 <div class='go_options_accordion_wrap' opt='1'><?php 
        go_options_accordion_help('http://maclab.guhsd.net/go/video/options/lootPresets.mp4', 'Customize rewards earned within your game');
        ?>
<div class='go_options_accordion'>Loot Presets<div class='go_triangle_container'><div class='go_options_triangle'></div></div></div></div>
				<div id='go_options_loot_presets_wrap' class='go_options_wrap'>
					<?php 
        $presets = get_option('go_presets', false);
        if ($presets) {
            $first = 1;
            foreach ($presets['name'] as $key => $name) {
                if ($first == 1) {
                    ?>
								<div id='go_options_preset_name_wrap'>
									<div class='go_options_field_title_wrap'><span class='go_options_field_title'>Preset Name<?php 
                    go_options_help('http://maclab.guhsd.net/go/video/options/presetName.mp4', 'Name your assignments (by difficulty, time required, etc.)');
                    ?>
</span></div>
									<div id='go_options_preset_name'></div>
								</div>
								<?php 
                }
                ?>
									<input type='text' class='go_options_preset_name_input go_options_preset_input' name='go_presets[name][<?php 
                echo $key;
                ?>
]' key='<?php 
                echo $key;
                ?>
' value='<?php 
                echo $name;
                ?>
'/>
								<?php 
                $first++;
            }
            $first = 1;
            foreach ($presets['points'] as $key => $points) {
                if ($first == 1) {
                    ?>
								<div id='go_options_preset_points_wrap'>
									<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
                    echo get_option('go_points_name');
                    go_options_help('http://maclab.guhsd.net/go/video/options/presetPoints.mp4', 'Set your point values');
                    ?>
</span></div>
									<div id='go_options_preset_points'></div>
								</div>
								<?php 
                }
                foreach ($points as $point) {
                    ?>
									<input type='text' class='go_options_preset_points_input go_options_preset_input' name='go_presets[points][<?php 
                    echo $key;
                    ?>
][]' key='<?php 
                    echo $key;
                    ?>
' value='<?php 
                    echo $point;
                    ?>
'/>
								<?php 
                }
                $first++;
            }
            $first = 1;
            foreach ($presets['currency'] as $key => $currency) {
                if ($first == 1) {
                    ?>
								<div id='go_options_preset_currency_wrap'>
									<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
                    echo get_option('go_currency_name');
                    go_options_help('http://maclab.guhsd.net/go/video/options/presetCurrency.mp4', 'Set your currency values');
                    ?>
</span></div>
									<div id='go_options_preset_currency'></div>
								</div>
								<?php 
                }
                foreach ($currency as $cur) {
                    ?>
									<input type='text' class='go_options_preset_currency_input go_options_preset_input' name='go_presets[currency][<?php 
                    echo $key;
                    ?>
][]' key='<?php 
                    echo $key;
                    ?>
' value='<?php 
                    echo $cur;
                    ?>
'/>
								<?php 
                }
                $first++;
            }
        }
        ?>
					<div class='go_options'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        go_options_help('http://maclab.guhsd.net/go/video/options/addPreset.mp4', 'Add or subtract tiers');
        ?>
</span></div>
						<button type="button"  class='go_add_preset'>+</button>
					</div>
					<div class='go_options'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        go_options_help('http://maclab.guhsd.net/go/video/options/resetPresets.mp4', 'Revert to default presets');
        ?>
</span></div>
						<button type="button" id='go_reset_presets' class='go_options_button'>Reset Presets</button>
					</div>
					<div class='go_options'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        go_options_help('http://maclab.guhsd.net/go/video/options/savePresets.mp4', 'Save changes to loot presets');
        ?>
</span></div>
						<button type="button" id='go_save_presets' class='go_options_button'>Save Presets</button>
					</div>
				</div>
			 <div class='go_options_accordion_wrap' opt='2'><?php 
        go_options_accordion_help('http://maclab.guhsd.net/go/video/options/adminBar.mp4', 'Options for the Admin Bar ');
        ?>
<div class='go_options_accordion'>Admin Bar<div class='go_triangle_container'><div class='go_options_triangle'></div></div></div></div>
				<div id='go_options_admin_bar_wrap' class='go_options_wrap'>
					<?php 
        go_options_input('Display', 'checkbox', 'go_admin_bar_display_switch', 'http://maclab.guhsd.net/go/video/options/adminBarDisplay.mp4', 'Show login option in admin bar (recommended)');
        go_options_input('User Redirect', 'checkbox', 'go_admin_bar_user_redirect', 'http://maclab.guhsd.net/go/video/options/userRedirect.mp4', 'Send users to home page after login (recommended)');
        go_options_input('Add Switch', 'checkbox', 'go_admin_bar_add_switch', 'http://maclab.guhsd.net/go/video/options/adminBarAddSwitch.mp4', 'Activate the manual scoring system (not recommended)');
        go_options_input('Minutes Only', 'checkbox', 'go_admin_bar_add_minutes_switch', 'http://maclab.guhsd.net/go/video/options/adminBarAddMinutesOnly.mp4', 'SAMPLE TEXT');
        ?>
				</div>
			 <div class='go_options_accordion_wrap' opt='3'><?php 
        go_options_accordion_help('http://maclab.guhsd.net/go/video/options/levels.mp4', 'Customize names, numbers, and award badges');
        ?>
<div class='go_options_accordion'><?php 
        echo go_return_options('go_level_plural_names');
        ?>
<div class='go_triangle_container'><div class='go_options_triangle'></div></div></div></div>
				<div id='go_options_levels_wrap' class='go_options_wrap'>
					<?php 
        $ranks = get_option('go_ranks', false);
        $rank_name = get_option('go_level_names', 'Level');
        $plural_rank_name = get_option('go_level_plural_names', 'Levels');
        if ($ranks !== false) {
            if (!empty($ranks['name'])) {
                ?>
							<div id='go_options_level_names_wrap'>
								<div class='go_options_field_title_wrap'><span class='go_options_field_title'>Preset Name <?php 
                go_options_help('http://maclab.guhsd.net/go/video/options/levelName.mp4', 'Name your individual levels');
                ?>
</span></div>
								<div id='go_options_level_names'>
							<?php 
                foreach ($ranks['name'] as $key => $name) {
                    ?>
									<input type='text' class='go_options_level_names_input' name='go_ranks[name][<?php 
                    echo $key;
                    ?>
]' value='<?php 
                    echo $name;
                    ?>
'/>
								<?php 
                }
                ?>
								</div>
							</div>
							<?php 
            }
            if (!empty($ranks['points'])) {
                $first = 1;
                foreach ($ranks['points'] as $key => $points) {
                    if ($first == 1) {
                        ?>
									<div id='go_options_level_points_wrap'>
										<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
                        echo get_option('go_points_name');
                        go_options_help('http://maclab.guhsd.net/go/video/options/levelPoints.mp4', 'Establish thresholds for each level. IMPORTANT: The first level must be set to 0 (zero)');
                        ?>
</span></div>
										<div id='go_options_level_points'></div>
									</div>
									<?php 
                    }
                    ?>
										<input type='text' class='go_options_level_points_input' name='go_ranks[points][<?php 
                    echo $key;
                    ?>
]' value='<?php 
                    echo $points;
                    ?>
'/>
									<?php 
                    $first++;
                }
            }
            if (!empty($ranks['badges'])) {
                $first = 1;
                foreach ($ranks['badges'] as $key => $badge) {
                    if ($first == 1) {
                        ?>
								<div id='go_options_level_badges_wrap'>
									<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
                        echo go_return_options('go_badges_name');
                        go_options_help('http://maclab.guhsd.net/go/video/options/levelBadges.mp4', 'Award badges when players reach certain levels');
                        ?>
</span></div>
									<div id='go_options_level_badges'></div>
								</div>
								<?php 
                    }
                    ?>
									<input type='text' class='go_options_level_badges_input' name='go_ranks[badges][<?php 
                    echo $key;
                    ?>
]' value='<?php 
                    echo $badge;
                    ?>
'/>
								<?php 
                    $first++;
                }
            }
        }
        ?>
					<div class='go_options'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        go_options_help('http://maclab.guhsd.net/go/video/options/addLevel.mp4', 'Add or subtract levels');
        ?>
</span></div>
						<button type="button"  class='go_add_level'>+</button>
					</div>
					<div class='go_options'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        go_options_help('http://maclab.guhsd.net/go/video/options/resetLevels.mp4', 'Revert to default presets');
        ?>
</span></div>
						<button type="button" id='go_reset_levels' class='go_options_button'>Reset <?php 
        echo $plural_rank_name;
        ?>
</button>
					</div>
					<div class='go_options'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        go_options_help('http://maclab.guhsd.net/go/video/options/saveLevels.mp4', 'Save changes to level presets');
        ?>
</span></div>
						<button type="button" id='go_save_levels' class='go_options_button'>Save <?php 
        echo $plural_rank_name;
        ?>
</button>
					</div>
					<div class='go_options'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        go_options_help('http://maclab.guhsd.net/go/video/options/fixLevels.mp4', 'Repair errors caused by improper level settings');
        ?>
</span></div>
						<button type="button" id='go_fix_levels' class='go_options_button'>Fix <?php 
        echo $plural_rank_name;
        ?>
</button>
					</div>
				</div>
			 <div class='go_options_accordion_wrap' opt='4'><?php 
        go_options_accordion_help('http://maclab.guhsd.net/go/video/options/seatingChart.mp4', 'Customize user info to suit your needs');
        ?>
<div class='go_options_accordion'><?php 
        echo go_return_options('go_organization_name');
        ?>
<div class='go_triangle_container'><div class='go_options_triangle'></div></div></div></div>
				<div id='go_options_seating_chart_wrap' class='go_options_wrap'>
					<?php 
        $class_a = get_option('go_class_a');
        $period_name = get_option('go_class_a_name');
        $class_b = get_option('go_class_b');
        $computer_name = get_option('go_class_b_name');
        ?>
					<div id='go_options_periods_wrap'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        echo $period_name;
        go_options_help('http://maclab.guhsd.net/go/video/options/periods.mp4', 'Name the first sorting method');
        ?>
</span></div>							
						<div id='go_options_periods'>
					<?php 
        foreach ($class_a as $key => $period) {
            ?>
							<input type='text' class='go_options_period_input' name='go_class_a[]' value='<?php 
            echo $period;
            ?>
'/>
						<?php 
        }
        ?>
						</div>
					</div>
					<div class='go_options'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        go_options_help('http://maclab.guhsd.net/go/video/options/addPeriod.mp4', 'Add or subtract first sorting settings');
        ?>
</span></div>
						<button type="button"  class='go_add_period'>+</button>
					</div>
					<div id='go_options_computers_wrap'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        echo $computer_name;
        go_options_help('http://maclab.guhsd.net/go/video/options/computers.mp4', 'Name the second sorting method');
        ?>
</span></div>
						<div id='go_options_computers'>
					<?php 
        foreach ($class_b as $key => $computer) {
            ?>
							<input type='text' class='go_options_computer_input' name='go_class_b[]' value='<?php 
            echo $computer;
            ?>
'/>
						<?php 
        }
        ?>
						</div>
					</div>
					<div class='go_options'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'><?php 
        go_options_help('http://maclab.guhsd.net/go/video/options/addComputer.mp4', 'Add or subtract second sorting settings');
        ?>
</span></div>
						<button type="button" class='go_add_computer'>+</button>
					</div>
				</div>
			 <div class='go_options_accordion_wrap' opt='5'><?php 
        go_options_accordion_help('http://maclab.guhsd.net/go/video/options/profession.mp4', 'Optional grouping system');
        ?>
<div class='go_options_accordion'><?php 
        echo go_return_options('go_focus_name');
        ?>
<div class='go_triangle_container'><div class='go_options_triangle'></div></div></div></div>
				<div id='go_options_profession_wrap' class='go_options_wrap'>
					<?php 
        go_options_input('Setting', 'checkbox', 'go_focus_switch', 'http://maclab.guhsd.net/go/video/options/professionSwitch.mp4', 'Enable groups (off by default)');
        $focuses = get_option('go_focus');
        $first = 1;
        if (is_array($focuses) && !empty($focuses)) {
            foreach ($focuses as $focus) {
                if ($first == 1) {
                    ?>
							<div id='go_options_professions_names_wrap'>
								<div class='go_options_field_title_wrap'><span class='go_options_field_title'>Name<?php 
                    go_options_help('http://maclab.guhsd.net/go/video/options/professionName.mp4', 'Name and add or subtract groups');
                    ?>
</span></div>
								<div id='go_options_professions'></div>
							</div>
							<?php 
                }
                ?>
								<input type='text' class='go_options_profession_input' name='go_focus[]' value='<?php 
                echo esc_attr($focus);
                ?>
'/>
							<?php 
                $first++;
            }
        } else {
            ?>
						<div id='go_options_professions_names_wrap'>
							<div class='go_options_field_title_wrap'><span class='go_options_field_title'>Name<?php 
            go_options_help('http://maclab.guhsd.net/go/video/options/professionName.mp4', 'Name and add or subtract groups');
            ?>
</span></div>
							<div id='go_options_professions'></div>
						</div>
						<input type='text' class='go_options_profession_input' name='go_focus[]' value=''/>
					<?php 
        }
        ?>
				</div>
			 <div class='go_options_accordion_wrap' opt='6'><?php 
        go_options_accordion_help('http://maclab.guhsd.net/go/video/options/additionalSettings.mp4', 'Extra custom settings and tools');
        ?>
<div class='go_options_accordion'>Additional Settings<div class='go_triangle_container'><div class='go_options_triangle'></div></div></div></div>
				<div id='go_options_additional_settings_wrap' class='go_options_wrap'>
					<?php 
        go_options_field('Video Default', 2, array(1 => 'go_video_width', 2 => 'go_video_height'), 'http://maclab.guhsd.net/go/video/options/videoDefault.mp4', 'Set your default video size');
        go_options_input('From Email Address', 'text', 'go_email_from', 'http://maclab.guhsd.net/go/video/options/emailFrom.mp4', 'Set the "from" address of the store and file-uploader emails (default: "*****@*****.**" )');
        go_options_input('Store Receipts', 'checkbox', 'go_store_receipt_switch', 'http://maclab.guhsd.net/go/video/options/storeReceipt.mp4', 'Receive email notification for each store purchase (off by default)');
        go_options_input('Full Student Name', 'checkbox', 'go_full_student_name_switch', 'http://maclab.guhsd.net/go/video/options/fullStudentName.mp4', 'Display only first name and last initial (default)');
        go_options_input(get_option('go_bonus_currency_name', 'Bonus'), 'checkbox', 'go_multiplier_switch', 'http://maclab.guhsd.net/go/video/options/multiplier.mp4', 'Enable bonus mechanism to boost rewards');
        go_options_input(get_option('go_bonus_currency_name', 'Bonus') . ' Threshold', 'text', 'go_multiplier_threshold', 'http://maclab.guhsd.net/go/video/options/multiplierThreshold.mp4', 'Number of bonus points required to boost rewards');
        go_options_input(go_return_options('go_penalty_name'), 'checkbox', 'go_penalty_switch', 'http://maclab.guhsd.net/go/video/options/penalty2.mp4', 'Enable penalty mechanism to reduce rewards');
        go_options_input(go_return_options('go_penalty_name') . ' Threshold', 'text', 'go_penalty_threshold', 'http://maclab.guhsd.net/go/video/options/penaltyThreshold.mp4', 'Number of penalty points required to reduce rewards');
        go_options_input('Multiplier %', 'text', 'go_multiplier_percentage', 'http://maclab.guhsd.net/go/video/options/multiplierPercentage.mp4', 'Percentage of rewards awarded or deducted at each threshold');
        go_options_input('Data Reset', 'checkbox', 'go_data_reset_switch', 'http://maclab.guhsd.net/go/video/options/dataReset.mp4', 'Clear all user data for specific categories DANGER!');
        go_options_input(go_return_options('go_points_name'), 'checkbox', 'go_data_reset_points', '', null, false, 'points');
        go_options_input(go_return_options('go_currency_name'), 'checkbox', 'go_data_reset_currency', '', null, false, 'currency');
        go_options_input(go_return_options('go_bonus_currency_name'), 'checkbox', 'go_data_reset_bonus_currency', '', null, false, 'bonus_currency');
        go_options_input(go_return_options('go_penalty_name'), 'checkbox', 'go_data_reset_penalty', '', null, false, 'penalty');
        go_options_input(go_return_options('go_minutes_name'), 'checkbox', 'go_data_reset_minutes', '', null, false, 'minutes');
        go_options_input(go_return_options('go_badges_name'), 'checkbox', 'go_data_reset_badges', '', null, false, 'badges');
        go_options_input('All', 'checkbox', 'go_data_reset_all', '', null, false);
        ?>
					<div class='go_options'>
						<div class='go_options_field_title_wrap'><span class='go_options_field_title'>Reset <?php 
        go_options_help('http://maclab.guhsd.net/go/video/options/dataReset2.mp4', 'Clear all user data for specific categories DANGER!');
        ?>
</span></div>
						<button type="button" id='go_data_reset'>Go</button>
					</div>
				</div>
			<input type="submit" name="Submit" value="Save Options" />
			<input type="hidden" name="action" value="update" />
			<input type="hidden" name="page_options" value="go_tasks_name, go_tasks_plural_name, go_first_stage_name, go_second_stage_name, go_third_stage_name, go_fourth_stage_name, go_fifth_stage_name, go_abandon_stage_button, go_second_stage_button, go_third_stage_button, go_fourth_stage_button, go_fifth_stage_button, go_store_name, go_task_loot_name, go_bonus_loot_name, go_points_name, go_points_prefix, go_points_suffix, go_currency_name, go_currency_prefix, go_currency_suffix, go_bonus_currency_name, go_bonus_currency_prefix, go_bonus_currency_suffix, go_penalty_name, go_penalty_prefix, go_penalty_suffix, go_minutes_name, go_minutes_prefix, go_minutes_suffix, go_level_names, go_level_plural_names, go_organization_name, go_class_a_name, go_class_b_name, go_focus_name, go_stats_name, go_inventory_name, go_badges_name, go_leaderboard_name, go_presets, go_admin_bar_display_switch, go_admin_bar_user_redirect, go_admin_bar_add_switch, go_admin_bar_add_minutes_switch, go_ranks, go_class_a, go_class_b, go_focus_switch, go_focus, go_admin_email, go_video_width, go_video_height, go_email_from, go_store_receipt_switch, go_full_student_name_switch, go_multiplier_switch, go_multiplier_threshold, go_penalty_switch, go_penalty_threshold, go_multiplier_percentage, go_data_reset_switch"/>
		</form>
		</div>
		<?php 
    }