<?php 
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); 
/**
* @version $Id: admin.show_cfg.php,v 1.12 2005/01/27 19:34:00 soeren_nb Exp $
* @package mambo-phpShop
* @subpackage HTML
* @copyright (C) 2004-2005 Soeren Eberhardt
*
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* mambo-phpShop is Free Software.
* mambo-phpShop comes with absolute no warranty.
*
* www.mambo-phpshop.net
*/
mm_showMyFileName( __FILE__ );
?>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
<script language="Javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script>
<table width="100%" cellspacing="0" cellpadding="4" border="0">
<tr>
      <td width="60">
      &nbsp;&nbsp;&nbsp;<img src="<?php echo IMAGEURL ?>ps_image/settings.png" width="32" height="32" border="0" /><br /><br />
      </td>
      <td width="60%" valign="middle">
      <span class="sectionname">&nbsp;&nbsp;&nbsp;<?php echo $PHPSHOP_LANG->_PHPSHOP_CONFIG;?></span>
    </td>
    <td align="left" width="40%" class="sectionname"><br />
   <?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_FILE_STATUS ?><br /> phpshop.cfg.php<?php 
        echo is_writable( $mosConfig_absolute_path.'/administrator/components/com_phpshop/phpshop.cfg.php' ) 
        ? '&nbsp;<span style="color:green;font-weight:bold;">'.$PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_FILE_STATUS_WRITEABLE.'</span>' 
        : '&nbsp;<span style="color:red;font-weight:bold;">'.$PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_FILE_STATUS_UNWRITEABLE.'</span>' ?>
        <br /><br />
    </td>
  </tr>
</table>
  
<?php
    $tabs = new mShopTabs(0, 1, "_main");
    $tabs->startPane("content-pane");
    $tabs->startTab( $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_GLOBAL, "global-page");
        $subtabs1 = new mShopTabs(0, 0, "_global");
        $subtabs1->startPane("cfg-pane");
        $subtabs1->startTab( $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_GLOBAL." I", "cfg-1-page");
  ?>
    <table class="adminform">  
    <tr><form action="<? echo $_SERVER['PHP_SELF'] ?>" method="post" name="adminForm">
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_USE_ONLY_AS_CATALOGUE ?></strong></td>
        <td>
            <input type="checkbox" name="conf_USE_AS_CATALOGUE" class="inputbox" <? if (USE_AS_CATALOGUE == 1) echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_USE_ONLY_AS_CATALOGUE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SHOW_PRICES ?></strong></td>
        <td>
            <input type="checkbox" name="conf__SHOW_PRICES" class="inputbox" <? if (_SHOW_PRICES == 1) echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SHOW_PRICES_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_PRICES_INCLUDE_TAX ?></strong></td>
        <td>
            <input type="checkbox" name="conf_SHOW_PRICE_WITH_TAX" class="inputbox" <? if (SHOW_PRICE_WITH_TAX == 1) echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_PRICES_INCLUDE_TAX_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_VIRTUAL_TAX ?></strong></td>
        <td align="left">
            <input type="checkbox" name="conf_TAX_VIRTUAL" class="inputbox" <? if (TAX_VIRTUAL == 1) echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_VIRTUAL_TAX_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_TAX_MODE ?></strong></td>
        <td>
            <select name="conf_TAX_MODE" class="inputbox">
            <option value="0" <? if (TAX_MODE == 0) echo "selected"; ?>>
            <?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_TAX_MODE_SHIP ?>
            </option>
            <option value="1" <? if (TAX_MODE == 1) echo "selected"; ?>>
            <?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_TAX_MODE_VENDOR ?>
            </option>
            </select>
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_TAX_MODE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_MULTI_TAX_RATE ?></strong></td>
        <td>
            <input type="checkbox" name="conf_MULTIPLE_TAXRATES_ENABLE" class="inputbox" <? if (MULTIPLE_TAXRATES_ENABLE == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_MULTI_TAX_RATE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SUBSTRACT_PAYEMENT_BEFORE ?></strong></td>
        <td>
            <input type="checkbox" name="conf_PAYMENT_DISCOUNT_BEFORE" class="inputbox" <? if (PAYMENT_DISCOUNT_BEFORE == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SUBSTRACT_PAYEMENT_BEFORE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td><div align="right">
            <strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_STORE_ENCODEKEY ?></strong>&nbsp;&nbsp;
            <?php echo mostooltip( $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_STORE_ENCODEKEY_EXPLAIN ); ?>
            </div>
        </td>
        <td colspan="2">
            <input type="text" name="conf_ENCODE_KEY" class="inputbox" value="<? echo ENCODE_KEY ?>" />
        </td>
    </tr>
</table>
    <?php
    $subtabs1->endTab();
    $subtabs1->startTab( $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_GLOBAL." II", "cfg-2-page");
    ?>
<table>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_COUPONS_ENABLE ?></strong></td>
        <td>
            <input type="checkbox" name="conf_PSHOP_COUPONS_ENABLE" class="inputbox" <? if (PSHOP_COUPONS_ENABLE == '1') echo "checked='checked'"; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_COUPONS_ENABLE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_REVIEW ?></strong></td>
        <td>
            <input type="checkbox" name="conf_PSHOP_ALLOW_REVIEWS" class="inputbox" <? if (PSHOP_ALLOW_REVIEWS == '1') echo "checked='checked'"; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_REVIEW_EXPLAIN ?>
        </td>
    </tr>
    <tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ACCOUNT_CAN_BE_BLANK ?></strong></td>
        <td>
            <input type="checkbox" name="conf_LEAVE_BANK_DATA" class="inputbox" <? if (LEAVE_BANK_DATA == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ACCOUNT_CAN_BE_BLANK_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CAN_SELECT_STATE ?></strong></td>
        <td>
            <input type="checkbox" name="conf_CAN_SELECT_STATES" class="inputbox" <? if (CAN_SELECT_STATES == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CAN_SELECT_STATE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_AGREE_TERMS ?></strong></td>
        <td>
            <input type="checkbox" name="conf_MUST_AGREE_TO_TOS" class="inputbox" <? if (MUST_AGREE_TO_TOS == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_AGREE_TERMS_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_AGREE_TERMS_ONORDER ?></strong></td>
        <td>
            <input type="checkbox" name="conf_PSHOP_AGREE_TO_TOS_ONORDER" class="inputbox" <? if (PSHOP_AGREE_TO_TOS_ONORDER == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_AGREE_TERMS_ONORDER_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CHECK_STOCK ?></strong></td>
        <td>
            <input type="checkbox" name="conf_CHECK_STOCK" class="inputbox" <? if (CHECK_STOCK == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CHECK_STOCK_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ENABLE_AFFILIATE ?></strong></td>
        <td>
            <input type="checkbox" name="conf_AFFILIATE_ENABLE" class="inputbox" <? if (AFFILIATE_ENABLE == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ENABLE_AFFILIATE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_MAIL_FORMAT ?></strong></td>
        <td>
            <select name="conf_ORDER_MAIL_HTML" class="inputbox">
            <option value="0" <? if (ORDER_MAIL_HTML == '0') echo "selected"; ?>>
           <?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_MAIL_FORMAT_TEXT ?>
            </option>
            <option value="1" <? if (ORDER_MAIL_HTML == '1') echo "selected"; ?>>
            <?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_MAIL_FORMAT_HTML ?>
            </option>
            </select>
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_MAIL_FORMAT_EXPLAIN ?>
        </td>
    </tr>
<?php
  if (stristr($my->usertype, "admin")) { ?>
      <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_FRONTENDAMDIN ?></strong></td>
        <td>
            <input type="checkbox" name="conf_PSHOP_ALLOW_FRONTENDADMIN_FOR_NOBACKENDERS" class="inputbox" <? if (PSHOP_ALLOW_FRONTENDADMIN_FOR_NOBACKENDERS == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_FRONTENDAMDIN_EXPLAIN ?>
        </td>
    </tr>
<?php
  } ?>
</table>

<?php
    $subtabs1->endTab();
    $subtabs1->endPane();
$tabs->endTab();
$tabs->startTab( $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_PATHANDURL, "pathandurl-page");
?>

<table class="adminform">
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_URL ?></strong></td>
        <td>
            <input size="40" type="text" name="conf_URL" class="inputbox" value="<? echo URL ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_URL_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_URLSECURE ?></strong></td>
        <td>
            <input size="40" type="text" name="conf_SECUREURL" class="inputbox" value="<? echo SECUREURL ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_URLSECURE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_URLCOMPONENT ?></strong></td>
        <td>
            <input size="40" type="text" name="conf_COMPONENTURL" class="inputbox" value="<? echo COMPONENTURL ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_URLCOMPONENT_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_URLIMAGE ?></strong></td>
        <td>
            <input size="40" type="text" name="conf_IMAGEURL" class="inputbox" value="<? echo IMAGEURL ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_URLIMAGE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ADMINPATH ?></strong></td>
        <td>
            <input size="40" type="text" name="conf_ADMINPATH" class="inputbox" value="<? echo ADMINPATH ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ADMINPATH_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CLASSPATH ?></strong></td>
        <td>
            <input size="40" type="text" name="conf_CLASSPATH" class="inputbox" value="<? echo CLASSPATH ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CLASSPATH_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_PAGEPATH ?></strong></td>
        <td>
            <input size="40" type="text" name="conf_PAGEPATH" class="inputbox" value="<? echo PAGEPATH ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_PAGEPATH_EXPLAIN ?>
        </td>
    </tr>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_IMAGEPATH ?></strong></td>
        <td>
            <input size="40" type="text" name="conf_IMAGEPATH" class="inputbox" value="<? echo IMAGEPATH ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_IMAGEPATH_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_HOMEPAGE ?></strong></td>
        <td>
            <input type="text" name="conf_HOMEPAGE" class="inputbox" value="<? echo HOMEPAGE ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_HOMEPAGE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ERRORPAGE ?></strong></td>
        <td>
            <input type="text" name="conf_ERRORPAGE" class="inputbox" value="<? echo ERRORPAGE ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ERRORPAGE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DEBUGPAGE ?></strong></td>
        <td>
            <input type="text" name="conf_DEBUGPAGE" class="inputbox" value="<? echo DEBUGPAGE ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DEBUGPAGE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DEBUG ?></strong></td>
        <td>
            <input type="checkbox" name="conf_DEBUG" class="inputbox" <? if (DEBUG == 1) echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DEBUG_EXPLAIN ?>
        </td>
    </tr>
</table>

<?php
  $tabs->endTab();
  $tabs->startTab( $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SITE, "site-page");
    $subtabs2 = new mShopTabs(0, 0, "_layout");
    $subtabs2->startPane("layout-pane");
    $subtabs2->startTab( "Display", "layout-1-page");
?>

<table class="adminform">
    <tr>
        <td align="right"><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_PDF_BUTTON ?><strong></strong></td>
        <td>
        <input type="checkbox" name="conf_PSHOP_PDF_BUTTON_ENABLE" class="inputbox" <? if (PSHOP_PDF_BUTTON_ENABLE == 1) echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_PDF_BUTTON_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_FLYPAGE ?></strong></td>
        <td>
            <input type="text" name="conf_FLYPAGE" class="inputbox" value="<? echo FLYPAGE ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_FLYPAGE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CATEGORY_TEMPLATE ?></strong></td>
        <td>
            <input type="text" name="conf_CATEGORY_TEMPLATE" class="inputbox" value="<? echo CATEGORY_TEMPLATE ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CATEGORY_TEMPLATE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_PRODUCTS_PER_ROW ?></strong></td>
        <td>
            <input type="text" name="conf_PRODUCTS_PER_ROW" size="4" class="inputbox" value="<? echo PRODUCTS_PER_ROW ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_PRODUCTS_PER_ROW_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_NOIMAGEPAGE ?></strong></td>
        <td>
            <input type="text" name="conf_NO_IMAGE" class="inputbox" value="<? echo NO_IMAGE ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_NOIMAGEPAGE_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SEARCHROWS ?></strong></td>
        <td>
            <input type="text" name="conf_SEARCH_ROWS" class="inputbox" value="<? echo SEARCH_ROWS ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SEARCHROWS_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_MAXIMUMROWS ?></strong></td>
        <td>
            <input type="text" name="conf_MAX_ROWS" class="inputbox" value="<? echo MAX_ROWS ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_MAXIMUMROWS_EXPLAIN ?>
        </td>
    </tr>

    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SHOWPHPSHOP_VERSION ?></strong></td>
        <td>
            <input type="checkbox" name="conf_SHOWVERSION" class="inputbox" <? if (SHOWVERSION == 1) echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SHOWPHPSHOP_VERSION_EXPLAIN ?>
        </td>
    </tr>
</table>
<?php
    $subtabs2->endTab();
    $subtabs2->startTab( "Layout", "layout-2-page");
?>
<table width="100%">
    <tr>
        <td valign="top"><strong>Add-to-Cart Button Style</strong></td>
        <td valign="middle" colspan="2"><?php
                    $path = IMAGEPATH."ps_image";
            $files = mosReadDirectory( "$path", "add-to-cart_?.", true, true);
            foreach ($files as $file) { 
                $file_info = pathinfo($file);
                $filename = $file_info['basename'];
                $checked = ($filename == PSHOP_ADD_TO_CART_STYLE) ? "checked=\"checked\"" : "";
                echo "<input type=\"radio\" name=\"conf_PSHOP_ADD_TO_CART_STYLE\" value=\"$filename\" $checked />&nbsp;&nbsp;";
                echo "<img align=\"center\" src=\"".IMAGEURL."ps_image/$filename\" border=\"0\" alt=\"$filename\" />";
                echo "&nbsp;&nbsp;($filename)<br />";
            }
        ?></td>
    </tr>
    <tr>
        <td colspan="3"><hr />&nbsp;</td>
    </tr>
    <tr>
        <td width="30%" valign="top" align="right"><strong>Enable Dynamic Thumbnail Resizing?</strong></td>
        <td width="15%" valign="top">
            <input type="checkbox" name="conf_PSHOP_IMG_RESIZE_ENABLE" class="inputbox" <? if (PSHOP_IMG_RESIZE_ENABLE == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td width="55%">If checked, you enable dynamic Image Resizing. This means that all Thumbnail Images are resized to fit the Sizes you provide below,
        using PHP's GD2 functions (you can check if you have GD2 support by browsing to "System" -> "System Info" -> "PHP Info" -> gd. 
        The Thumbnail Image quality is much better than Images which were "resized" by the browser.
        The newly generated Images are put into the directory /shop_image/prduct/resized. If the Image has already been
        resized, this copy will be send to the browser, so no image is resized again and again.
        </td>
    </tr>
    <tr>
        <td align="right"><strong>Thumbnail Image Width</strong></td>
        <td>
            <input type="text" name="conf_PSHOP_IMG_WIDTH" class="inputbox" value="<? echo PSHOP_IMG_WIDTH ?>" />
        </td>
        <td>The target <strong>width</strong> of the resized Thumbnail Image.</td>
    </tr>
    <tr>
        <td align="right"><strong>Thumbnail Image Height</strong></td>
        <td>
            <input type="text" name="conf_PSHOP_IMG_HEIGHT" class="inputbox" value="<? echo PSHOP_IMG_HEIGHT ?>" />
        </td>
        <td>The target <strong>height</strong> of the resized Thumbnail Image.</td>
    </tr>
    <tr>
        <td colspan="3"><hr />&nbsp;</td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SEARCHCOLOR1 ?></strong></td>
        <td>
            <input type="text" name="conf_SEARCH_COLOR_1" class="inputbox" value="<? echo SEARCH_COLOR_1 ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SEARCHCOLOR1_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td align="right"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SEARCHCOLOR2 ?></strong></td>
        <td>
            <input type="text" name="conf_SEARCH_COLOR_2" class="inputbox" value="<? echo SEARCH_COLOR_2 ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SEARCHCOLOR2_EXPLAIN ?>
        </td>
    </tr>
</table>

<?php
    $subtabs2->endTab();
    $subtabs2->endPane();
  $tabs->endTab();
  
  /* 
  TEST IF WE ARE RUNNING MAMBO 4.5 1.0.9
  */
  if( defined( '_RELEASE' ) )
    /*
    SHOW MAIL CONFIGURATION DIALOG
    */
    if( _RELEASE == '4.5' ) {

		$tabs->startTab("Mail","mail-page");
		?>
		<table width="100%" class="adminform">
		<tr>
			<td>
			Mailer:
			</td>
			<td>
            <?php
            $select_mailer=Array();
            if( CFG_MAILER == 'mail' ) { $select_mailer[0] = "checked=\"checked\""; $select_mailer[1] = $select_mailer[2] = ""; }
            elseif( CFG_MAILER == 'sendmail' ) { $select_mailer[1] = "checked=\"checked\""; $select_mailer[0] = $select_mailer[2] = ""; }
            else { $select_mailer[2] = "checked=\"checked\""; $select_mailer[0] = $select_mailer[1] = ""; }
            ?>
			<select name="CFG_MAILER" class="inputbox" size="1">
                <option value="mail" <?php echo $select_mailer[0] ?>>PHP mail function</option>
                <option value="sendmail" <?php echo $select_mailer[1] ?>>Sendmail</option>
                <option value="smtp" <?php echo $select_mailer[2] ?>>SMTP Server</option>
            </select>
			</td>
		</tr>
		<tr>
			<td>
			Mail From:
			</td>
			<td>
			<input class="text_area" type="text" name="CFG_MAILFROM" size="25" value="<?php echo CFG_MAILFROM; ?>">
			</td>
		</tr>
		<tr>
			<td>
			From Name:
			</td>
			<td>
			<input class="text_area" type="text" name="CFG_MAILFROM_NAME" size="25" value="<?php echo CFG_MAILFROM_NAME; ?>">
			</td>
		</tr>
		<tr>
			<td>
			SMTP Auth:
			</td>
			<td>
            <?php
            $select_auth=Array();
            if( CFG_SMTPAUTH == '0' ) { $select_auth[0] = "checked=\"checked\""; $select_auth[1] = ""; }
            else { $select_auth[1] = "checked=\"checked\""; $select_auth[0] = ""; }
            ?>
			<input type="radio" name="CFG_SMTPAUTH" value="0" <?php echo $select_auth[0] ?> class="inputbox" />No
            <input type="radio" name="CFG_SMTPAUTH" value="1" <?php echo $select_auth[1] ?> class="inputbox" />Yes
			</td>
		</tr>
		<tr>
			<td>
			SMTP User:
			</td>
			<td>
			<input class="text_area" type="text" name="CFG_SMTPUSER" size="15" value="<?php echo CFG_SMTPUSER; ?>">
			</td>
		</tr>
		<tr>
			<td>
			SMTP Pass:
			</td>
			<td>
			<input class="text_area" type="text" name="CFG_SMTPPASS" size="12" value="<?php echo CFG_SMTPPASS; ?>">
			</td>
		</tr>
		<tr>
			<td>
			SMTP Host:
			</td>
			<td>
			<input class="text_area" type="text" name="CFG_SMTPHOST" size="20" value="<?php echo CFG_SMTPHOST; ?>">
			</td>
		</tr>
		</table>
		<?php
		$tabs->endTab();
    }
  $tabs->startTab( $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_SHIPPING, "shipping-page");
?>

<table class="adminform">
<tr><td colspan="2"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_STORE_SHIPPING_METHOD ?></strong></td></tr>
<?php
require_once( CLASSPATH. "ps_shipping_method.php" );
$ps_shipping_method = new ps_shipping_method;
$rows = $ps_shipping_method->method_list();
foreach( $rows as $row ) { 
    if( $row['filename'] == "standard_shipping.php" ) { ?>
    <tr>
        
        <div align="right"><td><div align="right">
            <input type="radio" name="conf_SHIPPING" <? if (PSHOP_SHIPPING_MODULE == 'standard_shipping') echo "checked=\"checked\""; ?> value="standard_shipping" />
            </div>
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_STORE_SHIPPING_METHOD_STANDARD ?>
        </td>
    </tr><?php  
    }
    elseif( $row['filename'] == "zone_shipping.php" ) { ?>
    <tr>
        <td valign="top"><div align="right">
            <input type="radio" name="conf_SHIPPING" <? if (PSHOP_SHIPPING_MODULE == 'zone_shipping') echo "checked=\"checked\""; ?> value="zone_shipping" />
            </div>
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_STORE_SHIPPING_METHOD_ZONE ?>
        </td>
    </tr><?php  
    }
    elseif( $row['filename'] == "ups.php" ) { ?>
    <tr>
        <td><div align="right">
            <input type="radio" name="conf_SHIPPING" <? if (PSHOP_SHIPPING_MODULE == 'ups') echo "checked=\"checked\""; ?> value="ups" />
            </div>
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_STORE_SHIPPING_METHOD_UPS ?>
        </td>
    </tr><?php  
    }
    elseif( $row['filename'] == "intershipper.php" ) { ?>
    <tr>
        <td><div align="right">
            <input type="radio" name="conf_SHIPPING" <? if (PSHOP_SHIPPING_MODULE == 'intershipper') echo "checked=\"checked\""; ?> value="intershipper" />
            </div>
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_STORE_SHIPPING_METHOD_INTERSHIPPER ?>
        </td>
    </tr><?php  
    }
    elseif( $row['filename'] != "no_shipping.php" ) {
?><tr>
    <td><div align="right">
        <input type="radio" name="conf_SHIPPING" <? if (PSHOP_SHIPPING_MODULE == basename($row['filename'], ".php")) echo "checked=\"checked\""; ?> value="<?php echo basename($row['filename'], ".php") ?>" />
        </div>
    </td>
    <td><?php echo $row["description"]; ?></td>
    </tr><?php    
    }
}
    ?>
    <tr><td colspan="2"><hr/></td></tr>
    <tr>
        <td><div align="right">
            <input type="radio" name="conf_SHIPPING" <? if (PSHOP_SHIPPING_MODULE == 'no_shipping') echo "checked=\"checked\""; ?> value="no_shipping" />
            </div>
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_STORE_SHIPPING_METHOD_DISABLE ?>
        </td>
    </tr>
</table>
    
<?php
  $tabs->endTab();
  $tabs->startTab( $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CHECKOUT, "checkout-page");
?>

<table class="adminform">
   <tr>
        <td><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ENABLE_CHECKOUTBAR ?></strong></td>
        <td>
            <input type="checkbox" name="conf_SHOW_CHECKOUT_BAR" class="inputbox" <? if (SHOW_CHECKOUT_BAR == 1) echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ENABLE_CHECKOUTBAR_EXPLAIN ?>
        </td>
    </tr>
        <td rowspan="4" valign="top"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CHECKOUT_PROCESS ?></strong></td>
        <td width="40" valign="top">
            <input type="radio" name="conf_CHECKOUT_STYLE" <? if (CHECKOUT_STYLE == '1') echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CHECKOUT_PROCESS_STANDARD ?>
        </td>
    </tr>
    <tr>
        <td valign="top">
            <input type="radio" name="conf_CHECKOUT_STYLE" <? if (CHECKOUT_STYLE == '2') echo "checked=\"checked\""; ?> value="2" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CHECKOUT_PROCESS_2 ?>
        </td>
    </tr>
    <tr>
        <td valign="top">
            <input type="radio" name="conf_CHECKOUT_STYLE" <? if (CHECKOUT_STYLE == '3') echo "checked=\"checked\""; ?> value="3" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CHECKOUT_PROCESS_3 ?>
        </td>
    </tr>
    <tr>
        <td valign="top">
            <input type="radio" name="conf_CHECKOUT_STYLE" <? if (CHECKOUT_STYLE == '4') echo "checked=\"checked\""; ?> value="4" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_CHECKOUT_PROCESS_4 ?>
        </td>
    </tr>
  </table>

<?php
  $tabs->endTab();
  $tabs->startTab( $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DOWNLOADABLEGOODS, "download-page");
?>

  <table class="adminform">
  <tr>
        <td><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ENABLE_DOWNLOADS ?></strong></td>
        <td>
            <input type="checkbox" name="conf_ENABLE_DOWNLOADS" class="inputbox" <? if (ENABLE_DOWNLOADS == 1) echo "checked=\"checked\""; ?> value="1" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ENABLE_DOWNLOADS_EXPLAIN ?>
        </td>
    </tr>
    <tr>
        <td><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ORDER_ENABLE_DOWNLOADS ?></strong></td>
        <td>
            <select name="conf_ENABLE_DOWNLOAD_STATUS" class="inputbox" >
            <?php
                $db = new ps_DB;
                $q = "SELECT order_status_name,order_status_code FROM #__pshop_order_status ORDER BY list_order";
                $db->query($q);
                $order_status_code = Array();
                $order_status_name = Array();
                
                while ($db->next_record()) {
                  $order_status_code[] = $db->f("order_status_code");
                  $order_status_name[] =  $db->f("order_status_name");
                }
                
                for ($i = 0; $i < sizeof($order_status_code); $i++) {
                  echo "<option value=\"" . $order_status_code[$i];
                  if (ENABLE_DOWNLOAD_STATUS == $order_status_code[$i]) 
                     echo "\" selected=\"selected\">";
                  else
                     echo "\">";
                  echo $order_status_name[$i] . "</option>\n";
                }?>
                </select>
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ORDER_ENABLE_DOWNLOADS_EXPLAIN ?>
        </td>
    </tr>
        <tr>
        <td><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ORDER_DISABLE_DOWNLOADS ?></strong></td>
        <td>
            <select name="conf_DISABLE_DOWNLOAD_STATUS" class="inputbox" >
            <?php
                for ($i = 0; $i < sizeof($order_status_code); $i++) {
                  echo "<option value=\"" . $order_status_code[$i];
                  if (DISABLE_DOWNLOAD_STATUS == $order_status_code[$i]) 
                     echo "\" selected=\"selected\">";
                  else
                     echo "\">";
                  echo $order_status_name[$i] . "</option>\n";
                }?>
                </select>
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_ORDER_DISABLE_DOWNLOADS_EXPLAIN ?>
        </td>
    </tr>
      <tr>
        <td valign="top"><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DOWNLOADROOT ?></strong></td>
        <td valign="top">
            <input size="40" type="text" name="conf_DOWNLOADROOT" class="inputbox" value="<? echo DOWNLOADROOT ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DOWNLOADROOT_EXPLAIN ?>
        </td>
    </tr>
    <tr>
      <td><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DOWNLOAD_MAX ?></strong></td>
        <td>
            <input size="3" type="text" name="conf_DOWNLOAD_MAX" class="inputbox" value="<? echo DOWNLOAD_MAX ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DOWNLOAD_MAX_EXPLAIN ?>
        </td>
    </tr>
    <tr>
      <td><strong><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DOWNLOAD_EXPIRE ?></strong></td>
        <td>
            <input size="8" type="text" name="conf_DOWNLOAD_EXPIRE" class="inputbox" value="<? echo DOWNLOAD_EXPIRE ?>" />
        </td>
        <td><?php echo $PHPSHOP_LANG->_PHPSHOP_ADMIN_CFG_DOWNLOAD_EXPIRE_EXPLAIN ?>
        </td>
    </tr>
  </table>  

<?php
  $tabs->endTab();
  $tabs->endPane();
?>   

<input type="hidden" name="option" value="com_phpshop" />
<input type="hidden" name="func" value="writeConfig" />
<input type="hidden" name="page" value="admin.index" />
<input type="hidden" name="myname" value="Jabba Binks" />
  <input type="hidden" name="task" value="">
</form>

