<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: 			*/
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004-2010 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts VistaCart                     |
// +----------------------------------------------------------------------+
// | Authors: Jipson<jipson.thomas@armiasystems.com>             		  |
// +----------------------------------------------------------------------+
?>
<?php //echo $javascript->link('prototype'); ?>
<?php echo $javascript->link('jquery.js'); ?>
<?php echo $javascript->link('hint.js'); ?>
<?php echo $javascript->link('jquery.min.js'); ?>
<?php echo $javascript->link('jquery-ui.min.js'); ?>
<script>
    /*---- Logo Dynamic Display ----*/
function readURL(input) {
            if (input.files && input.files[0]) {
                var reader = new FileReader();

                reader.onload = function (e) {
                    $('#currnt_logo')
                        .attr('src', e.target.result)
                        .width(48)
                        .height(46);
                };

                reader.readAsDataURL(input.files[0]);
            }
        }


      $(document).ready(function() { 
         jQuery('#changeImage').click(function(){
           jQuery('#fileUpload').show('slow');
         });
         
          jQuery('#streamsendEnable').click(function(){
           if(jQuery('#streamsendEnable').is(':checked')){
                    jQuery('#divstreamsend').show();
                }else{
                    jQuery('#divstreamsend').hide();
                }
         });

          jQuery('#enable_facebook').click(function(){
           if(jQuery('#enable_facebook').is(':checked')){
                    jQuery('#divfacebook').show();
                }else{
                    jQuery('#divfacebook').hide();
                }
         });

          jQuery('#enable_twitter').click(function(){
           if(jQuery('#enable_twitter').is(':checked')){
                    jQuery('#divtwitter').show();
                }else{
                    jQuery('#divtwitter').hide();
                }
         });


      });
jQuery.noConflict();
/*scripts for General Tab starts here */


function showfaxdiv(arg)
{
  if(arg=='Y')
  {   jQuery('.faxbox1').slideDown();   jQuery('.faxbox2').slideDown();  }
  if(arg=='N')
  {   jQuery('.faxbox1').slideUp();   jQuery('.faxbox2').slideUp();  }
  return true;
}
/*scripts for General Tab ends here */
/*scripts for site Template Preview starts here here */
function changetemp(val){

		<?php
		$pth	=	explode("/app/webroot/index.php",$_SERVER['SCRIPT_NAME']);
		?>
/*		 new Ajax.Updater('temp','<?php //echo $pth[0]; ?>/settings/tempreviu/'+val, {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'temp']})
*/
         $.ajax({
            type: "GET",
            url: "<?php echo $pth[0]; ?>/settings/tempreviu/"+val,
            data: ({}),
            success: function(response){
                $('#temp').html(response);
            }
        });
}
/*scripts for site Template Preview starts ends here */
</script>

<div align="center" class="subheading">
              <div align="left">General Settings</div>
            </div>
            <br />
			<?php if($session->check('Message.flash')) { ?><div id="okbox"><font color="#446423"><?php $session->flash(); ?></font></div><?php } ?>			
			
			<div align="left" id="item_details_admin">

	<form id="setting" name="setting" method="post" enctype="multipart/form-data">
	<div align="left" id="item_details_admin">
              <div align="center" id="items_display_area_admin">
                  <div align="left" class="inner_content_area_admin">
                           
					 <!-- Start of fields -->   
						   <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Site Name</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="site_name" value="<?php echo Sanitize::html($data['site_name']);?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="Name your site. This name is the website title. This will be visible to users within the browser tab. Try to use keywords describing your site to help visitors understand your page quickly." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>	
									</a>		
								</span>							
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  
                                                <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Site Email</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="admin_email" value="<?php echo Sanitize::html($data['admin_email']);?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="This is the email where all site notifications, alerts and approvals will be sent." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Site Logo (Ideal size is 48 X 46 or greater.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Upload only .gif files) </p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">

                                                                    <?php
                                                                    if(file_exists(WWW_ROOT.IMAGES_URL.'/'."SiteLogo_disp.gif")){
                                                                        echo $html->image('/img/SiteLogo_disp.gif', array('width' => 48, 'height' => 46, 'border' => 0, 'id' => 'currnt_logo'));
                                                                    }
                                                                    ?>
                                                                    <div id="changeImage">

                                                                        <?php //echo $html->link('Edit','','') ?>
                                                                        <font size="2">
                                                                        <a href="#">Edit</a>
                                                                        <a href="#" class="tooltip" title="This is where you can change the logo of the site. Click Browse to upload a file saved on your computer." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
                                                                        </font>
                                                                     </div>
                                                                    <div id="fileUpload" style="display: none">
                                                                        <input type="file" name="site_logo" id="site_logo" class="box2_admin" size="27" onchange="readURL(this);">

                                                                    </div>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Page Title</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="page_title" value="<?php echo Sanitize::html($data['page_title']);?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="Enter the Page title to be displayed in the browser Title Bar." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>

							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Meta Description</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<textarea name="meta_description" id="meta_description" class="box2_admin"><?php echo Sanitize::html($data['meta_description']);?></textarea>
									<a href="#" class="tooltip" title="The meta description is a meta tag that is used to describe the current Web page. It provides a short summary of the page so that readers can decide whether the page is what they are looking for or looks interesting." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>



						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Meta Keywords </p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<textarea name="meta_keywords" id="meta_keywords" class="box2_admin"><?php echo Sanitize::html($data['meta_keywords']);?></textarea>
									<a href="#" class="tooltip" title="Meta Keywords, or tags, are additional copy included in your website's HTML. (1) keep your list of keywords or keyword phrases down to 10 - 15 unique words or phrases; (2) separate the words or phrases using a comma (you do not need to leave a space between words separated by commas); (3) do not repeat words or phrases; (4) put your most important word or phrases at the beginning of your list." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Site Template</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
											<select name="style" id="style"  onChange="javascript:changetemp(this.value);"  class="box2_admin"  style="width:295px; ">
												<?php foreach($csarr as $stle){?>
													<option value="<?php echo $stle; ?>" <?php if ($data['style'] == $stle){ ?> selected <?php } ?> ><?php echo $stle; ?></option>
												<?php }?>
											</select>
								</span>

							<div id="temp">
							<br /><?php echo $html->image('/img/'.$data['style'].'.gif',array('border' => '0', 'height' => '235', 'width' => '295'));?>
                                                        <a href="#" class="tooltip" title="You may select the color scheme and design of your site here. Choose one of the preloaded templates to chancge the look and feel of your site instantly." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
							</div>
							</div>




							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>


						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Number of Images / Product</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="product_images" value="<?php echo Sanitize::html($data["product_images"]);?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="How many images will you allow per product?" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Items Per Page</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="items_perpage" value="<?php echo Sanitize::html($data["items_perpage"]);?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="How many items would you like displayed on each page?" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

                                         <!-- User credit settings-->
                                         <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">User Credit (<?php echo $curlogo;?>)</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="user_credit" value="<?php echo number_format($data["user_credit"],2,'.','');?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="What dollar amount is one user credit point worth?  Points may be used in place of dollars." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						   <!-- User credit settings ends-->

                                                 <!-- Streamsend settings-->


                                                  <div id="grid_admin">
                                                        <div align="left" id="inner_leftcontent">
                                                            <p class="maintext_inner"> Enable Bulk Email(Using StreamSend)</p>
                                                        </div>
                                                        <div align="right" id="inner_rightcontent" class="newwidth">
                                                            <span class="toplinks">
                                                                <input type="checkbox" name="streamsendEnable" id="streamsendEnable" value="Y" <?php if($data['streamsendEnable']=='Y') {?> checked <?php } ?>>
                                                                <a href="#" class="tooltip" title="If enabled StreamSend API will be used to send bulk emails." onclick="return false;">
                                                                                                                                                                                                                <?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
                                                                </a>
                                                            </span>
                                                        </div>
                                                        <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
                                                    </div>
                                                 <?php
                                                 $display = "";
                                                 if($data['streamsendEnable']!='Y') {
                                                     $display = 'none';
                                                 }
                                                     ?>


                                                 <div id="divstreamsend" style="display: <?php echo $display;?>">
                                                  <div id="grid_admin">
                                                        <div align="left" id="inner_leftcontent">
                                                            <p class="maintext_inner"> Start a new account</p>
                                                        </div>
                                                        <div align="right" id="inner_rightcontent" class="newwidth">
                                                            <span class="toplinks">
                                                                <a href="https://www.streamsend.com" target="_blank"><?php echo $html->image('/img/streamsendlogo.png', array('width' => 100, 'height' => 25));?> </a>

                                                            </span>
                                                        </div>
                                                        <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
                                                    </div>


                                         <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Streamsend Login ID</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="streamsendLoginID" value="<?php echo $data["streamsendLoginID"];?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="Streamsend Login ID." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>


                                         <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Streamsend Key</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="streamsendKey" value="<?php echo $data["streamsendKey"];?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="Streamsend Key." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

                                         <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Streamsend List ID</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="streamsendListID" value="<?php echo $data["streamsendListID"];?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="Streamsend List ID." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						   <!-- Streamsend settings ends-->
                                                 </div>



                                                    <!-- Social media settings-->
                                                    <div id="grid_admin">
                                                        <div align="left" id="inner_leftcontent">
                                                            <p class="maintext_inner">Enable Facebook</p>
                                                        </div>
                                                        <div align="right" id="inner_rightcontent" class="newwidth">
                                                            <span class="toplinks">
                                                                <input type="checkbox" name="enable_facebook" id="enable_facebook" value="Y" <?php if($data['enable_facebook']=='Y') {?> checked <?php } ?>>
                                                                <a href="#" class="tooltip" title="Would you like your site linked to Facebook?" onclick="return false;">
                                                                                                                                                                                                                <?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
                                                                </a>
                                                            </span>
                                                        </div>
                                                        <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
                                                    </div>
                                                     <?php
                                                     $display = "";
                                                     if($data['enable_facebook']!='Y') {
                                                         $display = 'none';
                                                     }
                                                     ?>
                                                    <div id="divfacebook" style="display: <?php echo $display;?>">
                                                    <div id="grid_admin">
                                                        <div align="left" id="inner_leftcontent">
                                                            <p class="maintext_inner">Facebook Url</p>
                                                        </div>
                                                        <div align="right" id="inner_rightcontent" class="newwidth">
                                                            <span class="toplinks">
                                                               <input type="text" name="facebook_url" value="<?php echo $data["facebook_url"];?>" class="box2_admin" size="27">
                                                                <a href="#" class="tooltip" title="Please enter your facebook url." onclick="return false;">
                                                                                                                                                                                                                <?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
                                                                </a>
                                                            </span>
                                                        </div>
                                                        <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
                                                    </div>
                                                    </div>

                                                    <div id="grid_admin">
                                                        <div align="left" id="inner_leftcontent">
                                                            <p class="maintext_inner">Enable Twitter</p>
                                                        </div>
                                                        <div align="right" id="inner_rightcontent" class="newwidth">
                                                            <span class="toplinks">
                                                                <input type="checkbox" name="enable_twitter" id="enable_twitter" value="Y" <?php if($data['enable_twitter']=='Y') {?> checked <?php } ?>>
                                                                <a href="#" class="tooltip" title="Would you like your site linked  to Twitter?" onclick="return false;">
                                                                                                                                                                                                                <?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
                                                                </a>
                                                            </span>
                                                        </div>
                                                        <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
                                                    </div>

                                                    <?php
                                                     $display = "";
                                                     if($data['enable_twitter']!='Y') {
                                                         $display = 'none';
                                                     }
                                                     ?>
                                                    <div id="divtwitter" style="display: <?php echo $display;?>">
                                                    <div id="grid_admin">
                                                        <div align="left" id="inner_leftcontent">
                                                            <p class="maintext_inner">Twitter Url</p>
                                                        </div>
                                                        <div align="right" id="inner_rightcontent" class="newwidth">
                                                            <span class="toplinks">
                                                               <input type="text" name="twitter_url" value="<?php echo $data["twitter_url"];?>" class="box2_admin" size="27">
                                                                <a href="#" class="tooltip" title="Please enter your twitter url." onclick="return false;">
                                                                                                                                                                                                                <?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
                                                                </a>
                                                            </span>
                                                        </div>
                                                        <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
                                                    </div>
                                                    </div>
						   <!-- Social media settings ends-->



						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Allow Promo Codes</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<div class="maintext_inner">
									 <input type="radio" name="allow_giftcoupon" value="Y" <?php if($data["allow_giftcoupon"] == "Y"){ ?> checked <?php } ?>>Yes &nbsp;
									<input type="radio" name="allow_giftcoupon" value="N"  <?php if($data["allow_giftcoupon"] == "N"){ ?> checked <?php } ?>>No
									<a href="#" class="tooltip" title="Enable this feature to allow users to enter promo codes in order to receive discounts on purchases." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
									</div>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>


						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Allow Gift Cards</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<div class="maintext_inner">
									 <input type="radio" name="allow_giftcard" value="Y" <?php if($data["allow_giftcard"] == "Y"){ ?> checked <?php } ?>>Yes &nbsp;
									<input type="radio" name="allow_giftcard" value="N"  <?php if($data["allow_giftcard"] == "N"){ ?> checked <?php } ?>>No
									<a href="#" class="tooltip" title="Would you like to offer site-wide gift cards? Gift cards will be applicable to all sales." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
									</div>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>


						  <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Allow Refund</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<div class="maintext_inner">
									 <input type="radio" name="allow_rma" value="Y" <?php if($data["allow_rma"] == "Y"){ ?> checked <?php } ?>>Yes &nbsp;
									<input type="radio" name="allow_rma" value="N"  <?php if($data["allow_rma"] == "N"){ ?> checked <?php } ?>>No
									<a href="#" class="tooltip" title="Will your store and sellers accept refunds?" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
									</div>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Allow Product Rating</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
								   <div class="maintext_inner">
									<input type="radio" name="allow_rating" value="Y" <?php if($data["allow_rating"] == "Y"){ ?> checked <?php } ?>>Yes &nbsp;
									<input type="radio" name="allow_rating" value="N"  <?php if($data["allow_rating"] == "N"){ ?> checked <?php } ?>>No
									<a href="#" class="tooltip" title="Do you want users to be able to rate products on the site?" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								  </div>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>


						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Allow Product Feedback from Customers</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
								 <div class="maintext_inner">
									<input type="radio" name="allow_product_feedback" value="Y" <?php if($data["allow_product_feedback"] == "Y"){ ?> checked <?php } ?>>Yes &nbsp;
									<input type="radio" name="allow_product_feedback" value="N"  <?php if($data["allow_product_feedback"] == "N"){ ?> checked <?php } ?>>No
									<a href="#" class="tooltip" title="Should users be allowed to post feedback on products?" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								 </div>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

                                         <!-----Blog Settings---->
                                          <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Enable Blog (Using Wordpress)</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
								 <div class="maintext_inner">
									<input type="radio" name="admin_blog_settings" value="Y" <?php if($data["admin_blog_settings"] == "Y"){ ?> checked <?php } ?>>Yes &nbsp;
									<input type="radio" name="admin_blog_settings" value="N"  <?php if($data["admin_blog_settings"] == "N"){ ?> checked <?php } ?>>No
									<a href="#" class="tooltip" title="Add a blog to your site by enabling this feature." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								 </div>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
                                         <!-----Blog Settings Ends---->

						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">SiteBase URL</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<div class="maintext_inner">
									<?php echo $sitebase; ?><input type="text" name="sitebasefolder" value="<?php echo Sanitize::html($data['sitebasefolder']);?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="Enter the folder the site is installed on. If you have the files installed on the root folder, leave this field blank. " onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
									</div>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
                                                  <div id="grid_admin">
                                                                <div align="left" id="inner_leftcontent">
                                                                  <p class="maintext_inner">Secure URL</p>
                                                                </div>
                                                                <div align="right" id="inner_rightcontent" class="newwidth">
                                                                        <span class="toplinks">
                                                                                <div class="maintext_inner">
                                                                                    <input type="text" name="secureURL" value="<?php echo isset ($data['secureURL'])?$data['secureURL']:"";?>" class="box2_admin" size="27">
                                                                                <a href="#" class="tooltip" title="Enter your secure URL if SSL is enabled." onclick="return false;">
                                                                                <?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
                                                                                </a>
                                                                                </div>
                                                                        </span>
                                                                </div>
                                                                <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
                                                          </div>




						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Products download expiry time (in hours)</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="digitalproduct_download_limit" value="<?php echo Sanitize::html($data['digitalproduct_download_limit']);?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="When users purchase digital products, how long should the download link be good for?" onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>


						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Send Order Alerts via Fax</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks" >
								<div class="maintext_inner">
									<input type="radio" name="allow_fax" value="Y" <?php if($data["allow_fax"] == "Y"){ ?> checked <?php } ?> onClick="javascript: return showfaxdiv(this.value);">Yes &nbsp;
									<input type="radio" name="allow_fax" value="N"  <?php if($data["allow_fax"] == "N"){ ?> checked <?php } ?> onClick="javascript: return showfaxdiv(this.value);">No
									<a href="#" class="tooltip" title="Enable this feature is you would like to receive orders via fax." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</div>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						    <div id="grid_admin"  class="faxbox1">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Enter Ring Central Email</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="fax_email" value="<?php echo Sanitize::html($data['fax_email']);?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="Enter the email used to create account at Ring Central." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						    <div id="grid_admin" class="faxbox2">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">Enter Fax Number</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
									<input type="text" name="fax_number" value="<?php echo Sanitize::html($data['fax_number']);?>" class="box2_admin" size="27">
									<a href="#" class="tooltip" title="Enter the fax number to receive orders." onclick="return false;">
									<?php echo $html->image('/img/hint.png', array('border' => 0, 'text-decoration' => 'none'));?>
									</a>
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>

						    <div id="grid_admin">
							<div align="left" id="inner_leftcontent">
							  <p class="maintext_inner">&nbsp;</p>
							</div>
							<div align="right" id="inner_rightcontent" class="newwidth">
								<span class="toplinks">
	                               <input type="button" value="Back" class="buttn_admin" onClick="javascript:history.go(-1);">
                                       <input type="submit" value="Save" class="buttn_admin">
								</span>
							</div>
							<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1));?></div>
						  </div>
						  <!-- End of fields -->
						  
						  
           </div>
      </div>
</div>
</form>
				
 <div align="left" class="float_clear1"></div>
</div>
 <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif');?></div> 
 
<script language="javascript" type="text/javascript">
	changetemp('<?php echo $data['style']; ?>');

</script>

<script>
<?php 
if($data["allow_fax"] == "Y")
{?>
showfaxdiv('Y');
<?php } else if($data["allow_fax"] == "N"){ ?>
showfaxdiv('N');
<?php } ?>
</script>   