<?php
$query = $db->get_row ( 'setting' );
?>
<div class="page-content">
	<div class="page-header position-relative"></div>
	<!--/.page-header-->

	<div class="row-fluid">
		<div class="span12">
			<!--PAGE CONTENT BEGINS-->





			<div class="row-fluid">
				<div class="span12">
					<div class="widget-box">
						<div class="widget-header widget-header-blue widget-header-flat">
							<h4 class="lighter">Your Account Setting</h4>


						</div>

						<div class="widget-body">
							<div class="widget-main">
								<div class="row-fluid">


									<div class="step-content row-fluid position-relative"
										id="step-container">
										<div class="step-pane active">

											<form class="form-horizontal" method="post" action=""
												enctype="multipart/form-data">

												<div class="control-group">
													<label class="control-label" for="companyname">Company Name</label>
													<div class="controls">
														<input type="text" class="span6" name="setting[c_name]"
															value="<?php echo $query['c_name'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->


												<div class="control-group">
													<label class="control-label" for="companyemail">Company
														Email</label>
													<div class="controls">
														<input type="text" class="span6" name="setting[c_email]"
															value="<?php echo $query['c_email'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<label class="control-label" for="companyemail">Company
														Website</label>
													<div class="controls">
														<input type="text" class="span6" name="setting[website]"
															value="<?php echo $query['website'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->


												<div class="control-group">
													<label class="control-label" for="address">Address</label>
													<div class="controls">
														<input type="text" class="span4" name="setting[address]"
															value="<?php echo $query['address'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->


												<div class="control-group">
													<label class="control-label" for="city">City</label>
													<div class="controls">
														<input type="text" class="span4" name="setting[city]"
															value="<?php echo $query['city'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->


												<div class="control-group">
													<label class="control-label" for="state">State</label>
													<div class="controls">
														<input type="text" class="span4" name="setting[state]"
															value="<?php echo $query['state'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<label class="control-label" for="zip">Zip</label>
													<div class="controls">
														<input type="text" class="span4" name="setting[zip]"
															value="<?php echo $query['zip'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<label class="control-label" for="telephone">Telephone 1</label>
													<div class="controls">
														<input type="text" class="span4" name="setting[telephone]"
															value="<?php echo $query['telephone'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<label class="control-label" for="telephone">Telephone 2</label>
													<div class="controls">
														<input type="text" class="span4"
															name="setting[telephone2]"
															value="<?php echo $query['telephone2'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<label class="control-label" for="telephone">Fax</label>
													<div class="controls">
														<input type="text" class="span4" name="setting[fax]"
															value="<?php echo $query['fax'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<label class="control-label">Company Logo</label>
													<div class="controls">
														<div class="span4">
															<input type="file" size="32" name="my_field[]" />
														</div>
														<div class="span8">
																			<?php
																			
																			$logo = explode ( '___', $query ['c_logo'] );
																			
																			if ($logo [1] != '') {
																				echo '<div class="hidden-phone visible-desktop action-buttons">
																					<a href="' . $link->link ( 'downloads', Admin, '?logoname=' . $query ['c_logo'] . '&path=' . 'uploads/image' . '/' ) . ' ">' . $logo [1] . '</a>' . '&nbsp' . '<a class="red"  href="' . $link->link ( 'setting', Admin, '?id=' . $query ['id'] ) . '">
																					<i class="icon-trash bigger-130"></i>
																					</a>
																					</div>';
																			}
																			
																			?>
																		</div>
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->





												<div class="control-group">
													<label class="control-label">Enabled Tax</label>


													<div class="controls">

														<div class="span2">
															<input type="radio" name="setting[e_tax]"
																<?php if($query['e_tax']== "yes") { echo "checked";}?>
																value="yes"> <span class="lbl">Yes</span>
														</div>

														<div class="span2">
															<input type="radio" name="setting[e_tax]"
																<?php if($query['e_tax'] == "no" || $query['e_tax']== "") {echo "checked";} ?>
																value="no"> <span class="lbl">No</span>
														</div>

													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<label class="control-label">Tax Value</label>
													<div class="controls">
														<input type="text" class="span4" name="setting[taxvalue]"
															value="<?php echo $query['taxvalue'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<label class="control-label">Registration Number</label>
													<div class="controls">
														<input type="text" class="span4"
															name="setting[registration]"
															value="<?php echo $query['registration'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<label class="control-label">Tax Number</label>
													<div class="controls">
														<input type="text" class="span4" name="setting[taxnumber]"
															value="<?php echo $query['taxnumber'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<label class="control-label">Currency symbol</label>
													<div class="controls">
														<input type="text" class="span4" name="setting[currency]"
															value="<?php echo $query['currency'];?>">
													</div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->


												<div class="control-group">
													<label class="control-label">Fiscal Year Start</label>
													<div class="controls">
														<div class="span12">
															<input type="text" class="span3 date-picker"
																data-date-format="dd-mm-yyyy" name="setting[fiscal]"
																value="<?php echo $query['fiscal'];  ?>"
																id="id-date-picker-1"> <span class="add-on"> <i
																class="icon-calendar"></i>
															</span>
														</div>
													</div>

													<div class="controls"></div>
													<!-- /controls -->
												</div>
												<!-- /control-group -->

												<div class="control-group">
													<div class="controls">
														<span class="span12"> <input type="hidden" name="check"
															value="setting"> <input type="hidden" name="action"
															value="multiple" />
															<button type="submit" name="submit"
																class="btn btn-small btn-primary">Save</button>
														</span>
													</div>
													<!-- .Controls -->
												</div>
												<!-- .Control Group -->

											</form>
										</div>
									</div>

								</div>
							</div>
							<!--/widget-main-->
						</div>
						<!--/widget-body-->
					</div>
				</div>
			</div>

			<!--PAGE CONTENT ENDS-->
		</div>
		<!--/.span-->
	</div>
	<!--/.row-fluid-->
</div>
<!--/.page-content-->

</div>
<!--/.main-content-->