<?php

/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*\
<< ******************************************************************** >>
<< * ---------------------------------------------------------------- * >>
<< * Copyright ©2011-2012 Ozzy47                                      * >>
<< * All Rights Reserved. 											  * >>
<< * This file may not be redistributed in whole or significant part. * >>
<< * ---------------------------------------------------------------- * >>
<< * You are not allowed to use this on your server unless the files  * >>
<< * you downloaded were done so with permission.					  * >>
<< * ---------------------------------------------------------------- * >>
<< ******************************************************************** >>
\*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/

// ############################# LOG ACTION ##############################
log_admin_action();
// ############################# END LOG ACTION ##########################

print_cp_header();

 {  
	if ($_REQUEST['do'] == 'edittab')
	{
	$vbulletin->input->clean_array_gpc('r', array(
		'tabid' => TYPE_INT
	));
		
	$tab = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "dbtech_vbnavtabs WHERE  tabid = ". $vbulletin->GPC['tabid'] ."");
	$head_table = "$tab[title] (id:$tab[tabid])";

	}

	print_form_header('vbnavtabs', 'updatetab');
	construct_hidden_code('tabid', $vbulletin->GPC['tabid']);
    construct_hidden_code('type_of_tab','regular');
	print_table_header($head_table, 2);
    print_yes_no_row($vbphrase['dbtech_vbnavtabs_active_tab'], 'enable', $tab['enable']);
	print_input_row($vbphrase['dbtech_vbnavtabs_add_tab_name'], 'title', $tab['title'],true,35);
	print_input_row($vbphrase['dbtech_vbnavtabs_tab_vbphrase'], 'vbphrase', $tab['vbphrase'],true,35);
	print_input_row($vbphrase['dbtech_vbnavtabs_tab_url'], 'url', $tab['url']);
	print_input_row($vbphrase['dbtech_vbnavtabs_image_tab'], 'image', $tab['image']);
	print_select_row($vbphrase['dbtech_vbnavtabs_tab_mode'], 'tabmode',array ('THIS_SCRIPT'=>'THIS_SCRIPT','URL'=>'URL','URL_PARAMETER'=>'URL_PARAMETER'), $tab['tabmode']);
	print_input_row($vbphrase['dbtech_vbnavtabs_this_script'], 'script', $tab['script']);
	print_select_row($vbphrase['dbtech_vbnavtabs_tab_target'], 'target', array ('_self'=>'_self','_blank'=>'_blank','_parent'=>'_parent','_top'=>'_top'),$tab['target']);	
	print_membergroup_row($vbphrase['dbtech_vbnavtabs_ug_allowed_tab'], "allowedusergroup",$vbulletin->options['dbtech_vbnavtabs_num_col'],array('usergroupid' => 0, 'membergroupids' => $tab['allowedusergroup']));
	print_membergroup_row($vbphrase['dbtech_vbnavtabs_ug_not_allowed_tab'], "blockedusergroup",$vbulletin->options['dbtech_vbnavtabs_num_col'],array('usergroupid' => 0, 'membergroupids' => $tab['blockedusergroup']));
	print_select_row($vbphrase['dbtech_vbnavtabs_position_navbar'], "position", array (right=>$vbphrase['dbtech_vbnavtabs_right'],left=>$vbphrase['dbtech_vbnavtabs_left'],center=>$vbphrase['dbtech_vbnavtabs_center'],navbartwo=>$vbphrase['dbtech_vbnavtabs_navbar_two']),$tab['position']);
	print_input_row($vbphrase['dbtech_vbnavtabs_display_tab_order'], 'displayorder', $tab['displayorder'],true,35);
    print_textarea_row($vbphrase['dbtech_vbnavtabs_tab_notes'], 'notes', $tab['notes'], 15, 35);
	print_submit_row($vbphrase['dbtech_vbnavtabs_save']);
}

print_cp_footer();

/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*\
<< ********************************************************************* >>
<< * Created: 19:30, Fri Nov 25th 2011                                 * >>
<< * VER: 1.0.1                                                        * >>
<< ********************************************************************* >>
\*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/

?>