<?php echo $header; ?>
<?php echo $column_left; ?>

<div id="content">

    <div class="page-header">
        <div class="container-fluid">
            <div class="pull-right">
                <button type="submit" form="form" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>
                <a href="<?php echo $cancel; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a>
            </div>
            <h1>&nbsp;&nbsp;&nbsp;<?php echo $heading_title; ?></h1>
            <br/>
            <ul class="breadcrumb">
                <?php foreach ($breadcrumbs as $breadcrumb) { ?>
                <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
                <?php } ?>
            </ul>
        </div>
    </div>
    <div class="container-fluid">
        <?php if ($error_warning) { ?>
        <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
            <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>
        <?php } ?>
        <?php if ($error) { ?>
        <?php foreach ($error as $key => $error_message){ ?>
        <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_message; ?>
            <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>
        <?php } ?>
        <?php } ?>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-pencil"></i> <?php echo $oc_exchange_1c_text_edit; ?></h3>
            </div>
            <div class="panel-body">
                <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
                    <ul id="tabs" class="nav nav-tabs tab-up">
                        <li class="active"><a href="#tab-general" data-target="#tab-general" class="media_node active span" id="general_tab" data-toggle="tabajax" rel="tooltip"><?php echo $oc_exchange_1c_text_tab_general; ?></a></li>
                        <li><a href="#tab-product" data-target="#tab-product" class="media_node span" id="product_tab" data-toggle="tabajax" rel="tooltip"><?php echo $oc_exchange_1c_text_tab_product; ?></a></li>
                        <li><a href="#tab-order" data-target="#tab-order" class="media_node span" id="order_tab" data-toggle="tabajax" rel="tooltip"><?php echo $oc_exchange_1c_text_tab_order; ?></a></li>
                    </ul>
                    <div class="tab-content">

                        <div id="tab-general" class="tab-pane active">
                        	<div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_status"><?php echo $oc_exchange_1c_text_status; ?></label>
                                <div class="col-sm-8">
                                    <select class="form-control" name="oc_exchange_1c_status">
                                    <?php if ($oc_exchange_1c_status) { ?>
                                    <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                                    <option value="0"><?php echo $text_disabled; ?></option>
                                    <?php } else { ?>
                                    <option value="1"><?php echo $text_enabled; ?></option>
                                    <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                                    <?php } ?>
                                    </select>
                                </div>
                            </div>
                            
                            <?php if ($oc_exchange_1c_enabled){ ?>
                            <hr/>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_login"><?php echo $oc_exchange_1c_text_login; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_login" type="text" value="<?php echo $oc_exchange_1c_login; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_pass"><span data-toggle="tooltip" title="<?php echo $oc_exchange_1c_text_help_pass; ?>"><?php echo $oc_exchange_1c_text_pass; ?></span></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_pass" type="text" value="<?php echo $oc_exchange_1c_pass; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_IP"><?php echo $oc_exchange_1c_text_IP; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_IP" type="text" value="<?php echo $oc_exchange_1c_IP; ?>" /></div>
                            </div>
                            
                            <hr/>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_log"><?php echo $oc_exchange_1c_text_log; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_log">
                                <?php foreach ($oc_exchange_1c_log as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_timeout"><span data-toggle="tooltip" title="<?php echo $oc_exchange_1c_text_help_timeout; ?>"><?php echo $oc_exchange_1c_text_timeout; ?></span></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_timeout" type="text" value="<?php echo $oc_exchange_1c_timeout; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_timelimit"><span data-toggle="tooltip" title="<?php echo $oc_exchange_1c_text_help_timelimit; ?>"><?php echo $oc_exchange_1c_text_timelimit; ?></span></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_timelimit" type="text" value="<?php echo $oc_exchange_1c_timelimit; ?>" /></div>
                            </div>
                            
                            <hr/>
                            <div class="form-group">
                       			<center><label class="col-sm-4 control-label" style="float:none; width:auto; color:green;"><?php echo $oc_exchange_1c_licese_msg ?></label></center>
                         	</div>
                         	<?php } ?>
                        </div>

					<?php if ($oc_exchange_1c_enabled){ ?>
                        <div id="tab-product" class="tab-pane">
                        
                        	<div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_categories; ?></label>
                                <div class="col-sm-8"></div>
                            </div>
                        
                        	 <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_sinc_categories; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_sinc_categories">
                                <?php foreach ($oc_exchange_1c_sinc_categories as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            
                             <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_show_1c_categories; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_show_1c_categories">
                                <?php foreach ($oc_exchange_1c_show_1c_categories as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            
                             <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_show_site_categories; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_show_site_categories">
                                <?php foreach ($oc_exchange_1c_show_site_categories as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_categories_corr"><?php echo $oc_exchange_1c_text_categories_corr; ?></label>
                                <div class="col-sm-8">
                                <textarea class="form-control" name="oc_exchange_1c_categories_corr" rows=10><?php echo $oc_exchange_1c_categories_corr; ?></textarea>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_default_category"><?php echo $oc_exchange_1c_text_default_category; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_default_category">
                                <?php foreach ($oc_exchange_1c_default_category as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            
                            <hr/>
							<div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_products; ?></label>
                                <div class="col-sm-8"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_add_new_products; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_add_new_products">
                                <?php foreach ($oc_exchange_1c_add_new_products as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_add_new_products_zero; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_add_new_products_zero">
                                <?php foreach ($oc_exchange_1c_add_new_products_zero as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
							 
                            <hr />
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_parameters; ?></label>
                                <div class="col-sm-8"></div>
                            </div>
                            
                            <?php foreach ($oc_exchange_1c_main as $pole => $main){ ?>
                            <div class="form-group <?php echo $main['star']==''?'':'required'; ?>">
                                <?php if ($pole == 'price'){ ?>
                                	<label class="col-sm-4 control-label" for="oc_exchange_1c_<?php echo $pole ?>"><span data-toggle="tooltip" title="<?php echo $oc_exchange_1c_text_help_price; ?>"><?php echo $main['title']; ?></span></label>
                                <?php }else{ ?>
                               		<label class="col-sm-4 control-label" for="oc_exchange_1c_<?php echo $pole ?>"><?php echo $main['title'].'<br/>'.$main['comment']; ?></label>
                                <?php } ?>
                                <div class="col-sm-8">
                   	                 <?php if ($pole == 'price'){ ?>
                   	                 <input class="form-control" name="oc_exchange_1c_price" type="text" value="<?php echo $oc_exchange_1c_price; ?>" />
                   	                 <?php } ?>
                   	                 <div class="col-sm-10">
                   	                 <label class="checkbox-inline">
                   						<input type="checkbox" name="oc_exchange_1c_update_<?php echo $pole ?>" value="1" <?php echo $main['checked'] ?> /> <?php echo $oc_exchange_1c_text_update ?>
                   	                 </label>
                                 	</div>
                                 	<?php if (in_array($pole, $keys)){ ?>
	                                 	<div class="col-sm-10">
	                 					<label class="radio-inline">
	                                    <input type="radio" name="oc_exchange_1c_key" value="<?php echo $pole; ?>" <?php echo $main['key_checked'] ?> /> <?php echo $oc_exchange_1c_text_keys ?>
	                                    </label>
	                                    </div>
                                    <?php } ?>
                                </div>
                            </div>
                            <?php } ?>
                            	
                            <hr />
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_attributes_title; ?></label>
                                <div class="col-sm-8"></div>
                            </div>
                            
                             <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_attributes_group"><?php echo $oc_exchange_1c_text_attributes_group_title; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_attributes_group">
                                <?php foreach ($attributes_groups as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_attributes"><?php echo $oc_exchange_1c_text_attributes; ?></label>
                                <div class="col-sm-8"><textarea class="form-control" name="oc_exchange_1c_attributes" rows=6><?php echo $oc_exchange_1c_attributes; ?></textarea>
                                <div class="col-sm-10">
                   	                 <label class="checkbox-inline">
                   						<input type="checkbox" name="oc_exchange_1c_update_attributes" value="1" <?php echo $oc_exchange_1c_update_attributes ?> /> <?php echo $oc_exchange_1c_text_update ?>
                   	                 </label>
                                 	</div>
                                </div>
                            </div>
                            
                            <hr />
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_options_title; ?></label>
                                <div class="col-sm-8"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_options_variant"><?php echo $oc_exchange_1c_text_variant_title; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_options_variant">
                                <?php foreach ($options_variant as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_options"><?php echo $oc_exchange_1c_text_options; ?></label>
                                <div class="col-sm-8"><textarea class="form-control" name="oc_exchange_1c_options" rows=6><?php echo $oc_exchange_1c_options; ?></textarea>
                                <div class="col-sm-10">
                   	                 <label class="checkbox-inline">
                   						<input type="checkbox" name="oc_exchange_1c_update_options" value="1" <?php echo $oc_exchange_1c_update_options ?> /> <?php echo $oc_exchange_1c_text_update ?>
                   	                 </label>
                                 	</div>
                                </div>
                            </div>

                            
                            <hr />
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_parameters_title; ?></label>
                                <div class="col-sm-8"></div>
                            </div>
                            
                            <?php foreach ($oc_exchange_1c_default_values as $pole => $default){ ?>
                            	<?php if (isset($default['option'])){ ?>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_<?php echo $pole ?>"><?php echo $default['title']; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_<?php echo $pole ?>">
                                <?php foreach ($default['option'] as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            	<?php }else{ ?>
                            <div class="form-group">
                            	<label class="col-sm-4 control-label" for="oc_exchange_1c_<?php echo $pole ?>"><?php echo $default['title']; ?></label>
                            	<div class="col-sm-8">
                            	<input class="form-control" name="oc_exchange_1c_<?php echo $pole ?>" type="text" value="<?php echo $default['value']; ?>" />
                            	</div>
                            </div>
                            	<?php } ?>
                            <?php } ?>
                            
                            <hr />
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_formulas_category; ?></label>
                                <div class="col-sm-8"><?php echo $oc_exchange_1c_text_formulas_category_comment; ?></div>
                            </div>
                            <div class="form-group required">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_meta_title_category"><?php echo $oc_exchange_1c_text_meta_title_category; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_meta_title_category" type="text" value="<?php echo $oc_exchange_1c_meta_title_category; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_meta_h1_category"><?php echo $oc_exchange_1c_text_meta_h1_category; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_meta_h1_category" type="text" value="<?php echo $oc_exchange_1c_meta_h1_category; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_meta_description_category"><?php echo $oc_exchange_1c_text_meta_description_category; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_meta_description_category" type="text" value="<?php echo $oc_exchange_1c_meta_description_category; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_meta_keywords_category"><?php echo $oc_exchange_1c_text_meta_keywords_category; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_meta_keywords_category" type="text" value="<?php echo $oc_exchange_1c_meta_keywords_category; ?>" /></div>
                            </div>
                            
                            <hr />
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_formulas_product; ?></label>
                                <div class="col-sm-8"><?php echo $oc_exchange_1c_text_formulas_product_comment; ?></div>
                            </div>
                            <div class="form-group required">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_meta_title"><?php echo $oc_exchange_1c_text_meta_title; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_meta_title" type="text" value="<?php echo $oc_exchange_1c_meta_title; ?>" />
                            	<div class="col-sm-10">
                                  <label class="checkbox-inline">
                   					<input type="checkbox" name="oc_exchange_1c_update_meta_title" value="1" <?php echo $oc_exchange_1c_update_meta_title ?> /> <?php echo $oc_exchange_1c_text_update ?>
                   	              </label>
                                 </div>
                                 </div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_meta_h1"><?php echo $oc_exchange_1c_text_meta_h1; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_meta_h1" type="text" value="<?php echo $oc_exchange_1c_meta_h1; ?>" />
                            	<div class="col-sm-10">
                                  <label class="checkbox-inline">
                   					<input type="checkbox" name="oc_exchange_1c_update_meta_h1" value="1" <?php echo $oc_exchange_1c_update_meta_h1 ?> /> <?php echo $oc_exchange_1c_text_update ?>
                   	              </label>
                                 </div>
                                 </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_meta_description"><?php echo $oc_exchange_1c_text_meta_description; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_meta_description" type="text" value="<?php echo $oc_exchange_1c_meta_description; ?>" />
                                <div class="col-sm-10">
                                  <label class="checkbox-inline">
                   					<input type="checkbox" name="oc_exchange_1c_update_meta_description" value="1" <?php echo $oc_exchange_1c_update_meta_description ?> /> <?php echo $oc_exchange_1c_text_update ?>
                   	              </label>
                                 </div>
                                 </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_meta_keywords"><?php echo $oc_exchange_1c_text_meta_keywords; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_meta_keywords" type="text" value="<?php echo $oc_exchange_1c_meta_keywords; ?>" />
                                <div class="col-sm-10">
                                  <label class="checkbox-inline">
                   					<input type="checkbox" name="oc_exchange_1c_update_meta_keywords" value="1" <?php echo $oc_exchange_1c_update_meta_keywords?> /> <?php echo $oc_exchange_1c_text_update ?>
                   	              </label>
                                 </div>
                                 </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_seourl"><?php echo $oc_exchange_1c_text_seourl; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_seourl" type="text" value="<?php echo $oc_exchange_1c_seourl; ?>" />
                                <div class="col-sm-10">
                                  <label class="checkbox-inline">
                   					<input type="checkbox" name="oc_exchange_1c_update_seourl" value="1" <?php echo $oc_exchange_1c_update_seourl?> /> <?php echo $oc_exchange_1c_text_update ?>
                   	              </label>
                                 </div>
                                 </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_symbols_deleted_from_tag"><?php echo $oc_exchange_1c_text_symbols_deleted_from_tag; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_symbols_deleted_from_tag" type="text" value="<?php echo $oc_exchange_1c_symbols_deleted_from_tag; ?>" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_words_deleted_from_tag"><?php echo $oc_exchange_1c_text_words_deleted_from_tag; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_words_deleted_from_tag" type="text" value="<?php echo $oc_exchange_1c_words_deleted_from_tag; ?>" />
                                <div class="col-sm-10">
                                  <label class="checkbox-inline">
                   					<input type="checkbox" name="oc_exchange_1c_update_tag" value="1" <?php echo $oc_exchange_1c_update_tag ?> /> <?php echo $oc_exchange_1c_text_update_tag ?>
                   	              </label>
                                 </div>
                                 </div>
                            </div>
                            
                            <hr />
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_images; ?></label>
                                <div class="col-sm-8"></div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_image_load_from_1c; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_image_load_from_1c">
                                <?php foreach ($oc_exchange_1c_image_load_from_1c as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_image_test_main; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_image_test_main">
                                <?php foreach ($oc_exchange_1c_image_test_main as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_image_ext"><?php echo $oc_exchange_1c_text_image_ext; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_image_ext" type="text" value="<?php echo $oc_exchange_1c_image_ext; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_image_output"><?php echo $oc_exchange_1c_text_image_output; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_image_output" type="text" value="<?php echo $oc_exchange_1c_image_output; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_image_width"><?php echo $oc_exchange_1c_text_image_width; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_image_width" type="text" value="<?php echo $oc_exchange_1c_image_width; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_image_height"><?php echo $oc_exchange_1c_text_image_height; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_image_height" type="text" value="<?php echo $oc_exchange_1c_image_height; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_image_quality"><?php echo $oc_exchange_1c_text_image_quality; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_image_quality" type="text" value="<?php echo $oc_exchange_1c_image_quality; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_image_dir"><?php echo $oc_exchange_1c_text_image_dir; ?></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_image_dir" type="text" value="<?php echo $oc_exchange_1c_image_dir; ?>" /></div>
                            </div>
                            
                            <hr />
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_special; ?></label>
                                <div class="col-sm-8"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_hide_missing_products; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_hide_missing_products">
                                <?php foreach ($oc_exchange_1c_hide_missing_products as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_hide_products_with_zero_quantity; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_hide_products_with_zero_quantity">
                                <?php foreach ($oc_exchange_1c_hide_products_with_zero_quantity as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_show_not_changed; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_show_not_changed">
                                <?php foreach ($oc_exchange_1c_show_not_changed as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            
                            <hr />
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_cache"><span data-toggle="tooltip" title="<?php echo $oc_exchange_1c_text_help_cache; ?>"><?php echo $oc_exchange_1c_text_cache; ?></span></label>
                                <div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_cache" type="text" value="<?php echo $oc_exchange_1c_cache; ?>" /></div>
                            </div>
                            

                        </div>

                        <div id="tab-order" class="tab-pane">
                        	<div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_order_parameters; ?></label>
                                <div class="col-sm-8"></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_order_status_to_exchange"><?php echo $oc_exchange_1c_text_order_status_to_exchange; ?></label>
                                <div class="col-sm-8"><select class="form-control" name="oc_exchange_1c_order_status_to_exchange">
                                            <?php foreach ($order_statuses as $order_status) { ?>
                                            <option value="<?php echo $order_status['order_status_id'];?>" <?php echo ($oc_exchange_1c_order_status_to_exchange == $order_status['order_status_id'])? 'selected' : '' ;?>><?php echo $order_status['name']; ?></option>
                                            <?php } ?>
                                        </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label" for="oc_exchange_1c_order_status"><?php echo $oc_exchange_1c_text_order_status; ?></label>
                                <div class="col-sm-8">
                                        <select class="form-control" name="oc_exchange_1c_order_status">
                                            <?php foreach ($order_statuses as $order_status) { ?>
                                            <option value="<?php echo $order_status['order_status_id'];?>" <?php echo ($oc_exchange_1c_order_status == $order_status['order_status_id'])? 'selected' : '' ;?>><?php echo $order_status['name']; ?></option>
                                            <?php } ?>
                                        </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_order_charset; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_order_charset">
                                <?php foreach ($oc_exchange_1c_order_charset as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            <div class="form-group required">
                            	<label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_order_currency; ?></label>
                            	<div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_order_currency" type="text" value="<?php echo $oc_exchange_1c_order_currency; ?>" /></div>
                            </div>
                            <div class="form-group required">
                            	<label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_order_scheme_version; ?></label>
                            	<div class="col-sm-8"><input class="form-control" name="oc_exchange_1c_order_scheme_version" type="text" value="<?php echo $oc_exchange_1c_order_scheme_version; ?>" /></div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $oc_exchange_1c_text_order_confirm; ?></label>
                                <div class="col-sm-8">
                                <select class="form-control" name="oc_exchange_1c_order_confirm">
                                <?php foreach ($oc_exchange_1c_order_confirm as $i => $value){ ?>
                                	<option value="<?php echo $value['value'];?>" <?php echo ($value['selected']==1)? 'selected' : '' ;?>><?php echo $value['name'];?></option>
                                <?php } ?>
                                </select>
                                </div>
                            </div>
                            
                        </div>
                    <?php } ?>
                </div>
                
            <hr />
            <div style="text-align:center; opacity: .5">
                <p><?php echo $oc_exchange_1c_version_text; ?> | <a target="_blank" href="<?php echo $LS; ?>"><?php echo $oc_exchange_1c_text_homepage; ?></a></p>
            </div>
            </form>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    //$('.panel-body #tabs a').click(function (e) {
    $('[data-toggle="tabajax"]').click(function (e){
        e.preventDefault();
        $(this).tab('show');
        return false;
    });
</script>


<?php echo $footer; ?>