<?php
/* -----------------------------------------------------------------
 * 	$Id: new_value.php 693 2013-10-21 22:28:10Z akausch $
 * 	Copyright (c) 2011-2021 commerce:SEO by Webdesign Erfurt
 * 	http://www.commerce-seo.de
 * ------------------------------------------------------------------
 * 	based on:
 * 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
 * 	(c) 2002-2003 osCommerce - www.oscommerce.com
 * 	(c) 2003     nextcommerce - www.nextcommerce.org
 * 	(c) 2005     xt:Commerce - www.xt-commerce.com
 * 	Released under the GNU General Public License
 * --------------------------------------------------------------- */
defined("_VALID_XTC") or die("Direct access to this location isn't allowed.");

echo xtc_draw_form('new_value', 'categories.php', '', 'POST', 'id="value_form"');
?>
<table width="100%" cellpadding="6">
    <?php
    $languages = get_languages();
    for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
        ?>
        <tr>
            <td colspan="2">
    <?php echo xtc_image('../lang/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']) . ' <b>' . $languages[$i]['name'] ?></b>
            </td>
        </tr>
        <tr>
            <td width="15%">
                Option:
            </td>
            <td width="55%">
                <select name="option_id">
                    <?php
                    $optionsq = xtc_db_query("SELECT
														products_options_id,
														products_options_name
													FROM
														" . TABLE_PRODUCTS_OPTIONS . "
													WHERE
														language_id = '" . $languages[$i]['id'] . "'
													ORDER BY
														products_options_name");
                    while ($options = xtc_db_fetch_array($optionsq)) {
                        echo '<option name="' . $options['products_options_name'] . '" value="' . $options['products_options_id'] . '">' . $options['products_options_name'] . '</option>';
                    }
                    ?>
                </select>
            </td>
        </tr>
        <tr>
            <td>
                Optionswert:
            </td>
            <td>
    <?php echo xtc_draw_input_field('value_name[' . $languages[$i]['id'] . ']'); ?>
            </td>
        </tr>
        <tr>
                <td>
                        Farbcode:
                </td>
                <td>
    <?php echo xtc_draw_input_field('hex_image[' . $languages[$i]['id'] . ']'); ?> <em style="font-size:85%">Farb-Hex-Code (z.B.: #68AB16)</em> 
                </td>
        </tr>
        <tr>
        <td valign="top">
            Beschreibung:
        </td>
        <td>
    <?php echo '<textarea name="value_desc[' . $languages[$i]['id'] . ']" cols="50" rows="4" style="width:95%"></textarea>'; ?>
        </td>
    </tr>
    <tr><td colspan="2" style="border-bottom: 1px dotted #ccc">&nbsp;</td></tr>
<?php } ?>
<tr>
    <td></td>
    <td>
        <button type="button" class="button" onclick="xajax_saveNewValue(xajax.getFormValues('value_form'))"><?php echo BUTTON_SAVE ?></button>
    </td>
</tr>
</table>
</form>