if (PRICE_IS_BRUTTO == 'true') {
                        $attribute_value_price_calculate = $vamPrice->Format(vam_round($attribute_value_price * ((100 + vam_get_tax_rate(vam_get_tax_class_id($_POST['current_product_id']))) / 100), PRICE_PRECISION), false);
                    } else {
                        $attribute_value_price_calculate = vam_round($attribute_value_price, PRICE_PRECISION);
                    }
                    echo "<TD class=\"main\" align=\"left\"><input type=\"text\" name=\"" . $current_value_id . "_price\" value=\"" . $attribute_value_price_calculate . "\" size=\"10\">";
                    // brutto Admin
                    if (PRICE_IS_BRUTTO == 'true') {
                        echo TEXT_NETTO . '<b>' . $vamPrice->Format(vam_round($attribute_value_price, PRICE_PRECISION), true) . '</b>  ';
                    }
                    echo "</TD>";
                    echo "<TD class=\"main\" align=\"left\"><SELECT name=\"" . $current_value_id . "_prefix\"> <OPTION value=\"+\"" . $posCheck . ">+<OPTION value=\"-\"" . $negCheck . ">-</SELECT></TD>";
                    echo "</TR>";
                    // Download function start
                    if (DOWNLOAD_ENABLED == 'true') {
                        $file_list = vam_array_merge(array('0' => array('id' => '', 'text' => SELECT_FILE)), vam_getFiles(DIR_FS_CATALOG . 'download/'));
                        echo "<tr>";
                        // echo "<td colspan=\"2\">File: <input type=\"file\" name=\"" . $current_value_id . "_download_file\"></td>";
                        //                echo "<td colspan=\"2\" class=\"main\">&nbsp;" . DL_FILE . "<br>" . vam_draw_pull_down_menu($current_value_id . '_download_file', vam_getDownloads(), $attribute_value_download_filename, '')."</td>";
                        echo "<td colspan=\"2\" class=\"main\">&nbsp;" . DL_FILE . "<br>" . vam_draw_pull_down_menu($current_value_id . '_download_file', $file_list, $attribute_value_download_filename) . "</td>";
                        echo "<td class=\"main\">&nbsp;" . DL_COUNT . "<br><input type=\"text\" name=\"" . $current_value_id . "_download_count\" value=\"" . $attribute_value_download_count . "\"></td>";
                        echo "<td class=\"main\">&nbsp;" . DL_EXPIRE . "<br><input type=\"text\" name=\"" . $current_value_id . "_download_expire\" value=\"" . $attribute_value_download_expire . "\"></td>";
                        ?>
                 <td class="main" align="left"><?php 
                        echo TABLE_TEXT_IS_PIN;
                        ?>
 <?php 
                        echo vam_draw_checkbox_field($current_value_id . '_ispin', '', $products_attributes_is_pin, 1);
                        ?>
&nbsp;</td>
                <?php 
Пример #2
0
function vam_getFiles($startdir, $ext = array('.zip', '.rar', '.png', '.gif', '.mp3', '.jpg', '.exe', '.pdf', '.tar.gz', '.tar.bz2', '.7z', '.uha'), $dir_only = false, $subdir = '')
{
    //		echo 'Directory: ' . $startdir . '  Subirectory: ' . $subdir . '<br />';
    if (!is_array($ext)) {
        $ext = array();
    }
    $dirname = $startdir . $subdir;
    if ($dir = opendir($dirname)) {
        while ($file = readdir($dir)) {
            if (substr($file, 0, 1) != '.') {
                if (is_file($dirname . $file) && !$dir_only) {
                    if (in_array(substr($file, strrpos($file, '.')), $ext)) {
                        //							echo '&nbsp;&nbsp;File: ' . $subdir.$file . '<br />';
                        $files[] = array('id' => $subdir . $file, 'text' => $subdir . $file);
                        array_multisort($files, SORT_ASC);
                    }
                } elseif (is_dir($dirname . $file)) {
                    if ($dir_only) {
                        $files[] = array('id' => $subdir . $file . '/', 'text' => $subdir . $file . '/');
                        array_multisort($files, SORT_ASC);
                    }
                    $files = vam_array_merge($files, vam_getFiles($startdir, $ext, $dir_only, $subdir . $file . '/'));
                }
            }
        }
        closedir($dir);
    }
    return $files;
}
Пример #3
0
    if (is_writable($file_admin)) {
        $chmod_admin = '<font color="Green">' . TEXT_YES . '</font>';
    } else {
        $chmod_admin = '<font color="Red">' . TEXT_NO . '</font>';
    }
    if (file_exists($file_admin)) {
        $code_admin = file_get_contents($file_admin);
    } else {
        $code_admin = TEXT_FILE_SELECT;
    }
}
echo vam_draw_form('select_admin', FILENAME_EMAIL_MANAGER, '', 'get');
?>

<?php 
$file_list_admin = vam_array_merge(array('0' => array('id' => '', 'text' => SELECT_FILE)), vam_getFiles(DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/', array('.txt', '.html')));
echo vam_draw_pull_down_menu('file_admin', $file_list_admin, $_REQUEST['file_admin']);
echo '&nbsp;<span class="button"><button type="submit" value="' . BUTTON_EDIT . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</button></span>';
?>
<br /><br />
</form>
<?php 
echo vam_draw_form('edit_admin', FILENAME_EMAIL_MANAGER, vam_get_all_get_params(), 'post');
?>

<?php 
if ($_POST['save'] && is_file($file_admin)) {
    ?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">