?>
</textarea></td>
	  </tr>
	  <tr>
    	<td width="1%" align="right" nowrap><?php 
echo $sc_warranty;
?>
 : &nbsp;</td>
	    <td><textarea name="warranty" style="height:70;width:50%"><?php 
echo $warranty;
?>
</textarea></td>
	  </tr>

<?php 
$choice = new choice_list();
if (!$is_attachment) {
    $pro2 = new products();
    $pro2->get_attach_categories($category_id, true);
    while ($pro2->next_record()) {
        ?>
	  <tr>
	  	<td width="1%" align="right" nowrap><?php 
        echo $pro2->f('name');
        ?>
 : &nbsp;</td>
		<td>
<?php 
        $choice->clear();
        $cate_id = $pro2->f('id');
        $pro->get_attachments($cate_id);
<?php

$preload_files = 'modules/products/classes/products.class.php';
require "../../Group-Office.php";
require '../../lib/tkdlib.php';
$GO_SECURITY->authenticate();
$GO_MODULES->authenticate('products');
require $GO_LANGUAGE->get_language_file('products');
require $GO_THEME->theme_path . "header.inc";
$pro = new products();
$choice = new choice_list();
switch ($_REQUEST['task']) {
    case 'update':
        $i = (int) $pro->update_category($_POST['id'], $_POST['category'], $_POST['parent_id'], $_POST['template_id']);
        if ($i == $pro->err_duplicate) {
            alert(sprintf($sc_Duplicate, $sc_category));
        }
        if ($i == $pro->err_child_of_itsself) {
            alert($sc_ChildOfItsself);
        }
        break;
    case 'add':
        if ((int) $pro->add_category($_POST['category'], $_POST['parent_id'], $_POST['template_id']) == $pro->err_duplicate) {
            alert(sprintf($sc_Duplicate, $sc_category));
        }
        break;
    case 'delete':
        if (!$pro->delete_category($_POST['id'])) {
            alert(sprintf($sc_CannotDelete, $_POST['txt_name']));
        }
        break;