📄 edit.php
字号:
//--></script> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="50%" height="100%" valign="top"> <fieldset style="height: 100%;"> <legend><?php echo $osC_Language->get('subsection_price'); ?></legend> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo $osC_Language->get('field_tax_class'); ?></td> <td><?php echo osc_draw_pull_down_menu('products_tax_class_id', $tax_class_array, (isset($osC_ObjectInfo) ? $osC_ObjectInfo->get('products_tax_class_id') : null), 'onchange="updateGross(\'products_price\');"'); ?></td> </tr> <tr> <td><?php echo $osC_Language->get('field_price_net'); ?></td> <td><?php echo osc_draw_input_field('products_price', (isset($osC_ObjectInfo) ? $osC_ObjectInfo->get('products_price') : null), 'onkeyup="updateGross(\'products_price\')"'); ?></td> </tr> <tr> <td><?php echo $osC_Language->get('field_price_gross'); ?></td> <td><?php echo osc_draw_input_field('products_price_gross', (isset($osC_ObjectInfo) ? $osC_ObjectInfo->get('products_price') : null), 'onkeyup="updateNet(\'products_price\')"'); ?></td> </tr> </table> <script type="text/javascript"><!-- updateGross('products_price'); //--></script> </fieldset> </td> <td width="50%" height="100%" valign="top"> <fieldset style="height: 100%;"> <legend><?php echo $osC_Language->get('subsection_data'); ?></legend> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo $osC_Language->get('field_manufacturer'); ?></td> <td><?php echo osc_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($osC_ObjectInfo) ? $osC_ObjectInfo->get('manufacturers_id') : null)); ?></td> </tr> <tr> <td><?php echo $osC_Language->get('field_quantity'); ?></td> <td><?php echo osc_draw_input_field('products_quantity', (isset($osC_ObjectInfo) ? $osC_ObjectInfo->get('products_quantity') : null)); ?></td> </tr> <tr> <td><?php echo $osC_Language->get('field_weight'); ?></td> <td><?php echo osc_draw_input_field('products_weight', (isset($osC_ObjectInfo) ? $osC_ObjectInfo->get('products_weight') : null)). ' ' . osc_draw_pull_down_menu('products_weight_class', $weight_class_array, (isset($osC_ObjectInfo) ? $osC_ObjectInfo->get('products_weight_class') : SHIPPING_WEIGHT_UNIT)); ?></td> </tr> </table> </fieldset> </td> </tr> <tr> <td width="50%" height="100%" valign="top"> <fieldset style="height: 100%;"> <legend><?php echo $osC_Language->get('subsection_status'); ?></legend> <?php echo osc_draw_radio_field('products_status', array(array('id' => '1', 'text' => $osC_Language->get('status_enabled')), array('id' => '0', 'text' => $osC_Language->get('status_disabled'))), (isset($osC_ObjectInfo) ? $osC_ObjectInfo->get('products_status') : '0'), null, '<br />'); ?> </fieldset> </td> <td width="50%" height="100%" valign="top"> <fieldset style="height: 100%;"> <legend><?php echo $osC_Language->get('subsection_information'); ?></legend> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo $osC_Language->get('field_date_available'); ?></td> <td><?php echo osc_draw_input_field('products_date_available', (isset($osC_ObjectInfo) ? $osC_ObjectInfo->get('products_date_available') : null)); ?><input type="button" value="..." id="calendarTrigger" class="operationButton"><script type="text/javascript">Calendar.setup( { inputField: "products_date_available", ifFormat: "%Y-%m-%d", button: "calendarTrigger" } );</script><small>(YYYY-MM-DD)</small></td> </tr> </table> </fieldset> </td> </tr> </table> </div> <div class="tab-page" id="tabImages"> <h2 class="tab"><?php echo $osC_Language->get('section_images'); ?></h2> <script type="text/javascript"><!-- mainTabPane.addTabPage( document.getElementById( "tabImages" ) ); //--></script> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="100%" height="100%" valign="top"> <fieldset style="height: 100%;"> <legend><?php echo $osC_Language->get('subsection_new_image'); ?></legend> <div style="float: right;"> <a href="#" id="remoteFilesLink" onclick="switchImageFilesView('remote');" style="background-color: #E5EFE5;"><?php echo $osC_Language->get('image_remote_upload'); ?></a> | <a href="#" id="localFilesLink" onclick="switchImageFilesView('local');"><?php echo $osC_Language->get('image_local_files'); ?></a> </div> <div id="remoteFiles"> <span id="fileUploadField"></span><?php if ( isset($osC_ObjectInfo) ) { echo '<input type="submit" value="' . $osC_Language->get('button_send_to_server') . '" class="operationButton" onclick="document.product.target=\'fileUploadFrame\'; document.product.action=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&action=fileUpload' . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '')) . '\'; document.getElementById(\'showProgress\').style.display=\'inline\';" /><div id="showProgress" style="display: none; padding-left: 10px;">' . osc_icon('progress_ani.gif') . ' ' . $osC_Language->get('image_upload_progress') . '</div>'; }?> </div><script type="text/javascript"><!-- setFileUploadField();//--></script> <div id="localFiles" style="display: none;"> <p><?php echo $osC_Language->get('introduction_select_local_images'); ?></p> <select id="localImagesSelection" name="localimages[]" size="5" multiple="multiple" style="width: 100%;"></select> <div id="showProgressGetLocalImages" style="display: none; float: right; padding-right: 10px;"><?php echo osc_icon('progress_ani.gif') . ' ' . $osC_Language->get('image_retrieving_local_files'); ?></div> <p><?php echo realpath('../images/products/_upload'); ?></p><?php if ( isset($osC_ObjectInfo) ) { echo '<input type="submit" value="Assign To Product" class="operationButton" onclick="document.product.target=\'fileUploadFrame\'; document.product.action=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&action=assignLocalImages' . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '')) . '\'; document.getElementById(\'showProgressAssigningLocalImages\').style.display=\'inline\';" /><div id="showProgressAssigningLocalImages" style="display: none; padding-left: 10px;">' . osc_icon('progress_ani.gif') . ' ' . $osC_Language->get('image_multiple_upload_progress') . '</div>'; }?> </div> <iframe id="fileUploadFrame" name="fileUploadFrame" style="height: 0px; width: 0px; border: 0px"></iframe> </fieldset><script type="text/javascript"><!-- getLocalImages();//--></script><?php if ( isset($osC_ObjectInfo) ) {?> <fieldset style="height: 100%;"> <legend><?php echo $osC_Language->get('subsection_original_images'); ?></legend> <div id="imagesOriginal" style="overflow: auto;"></div> </fieldset> <fieldset style="height: 100%;"> <legend><?php echo $osC_Language->get('subsection_images'); ?></legend> <div id="imagesOther" style="overflow: auto;"></div> </fieldset><script type="text/javascript"><!-- getImages();//--></script><?php }?> </td> </tr> </table> </div> <div class="tab-page" id="tabAttributes"> <h2 class="tab"><?php echo $osC_Language->get('section_attributes'); ?></h2><script type="text/javascript">mainTabPane.addTabPage( document.getElementById( "tabAttributes" ) );</script> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="30%" valign="top"><select name="attributes" size="20" style="width: 100%;"><?php $Qoptions = $osC_Database->query('select products_options_id, products_options_name from :table_products_options where language_id = :language_id order by products_options_name'); $Qoptions->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS); $Qoptions->bindInt(':language_id', $osC_Language->getID()); $Qoptions->execute(); while ($Qoptions->next()) { echo ' <optgroup label="' . $Qoptions->value('products_options_name') . '" id="' . $Qoptions->value('products_options_id') . '">' . "\n"; $Qvalues = $osC_Database->query('select pov.products_options_values_id, pov.products_options_values_name from :table_products_options_values pov, :table_products_options_values_to_products_options pov2po where pov2po.products_options_id = :products_options_id and pov2po.products_options_values_id = pov.products_options_values_id and pov.language_id = :language_id order by pov.products_options_values_name'); $Qvalues->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES); $Qvalues->bindTable(':table_products_options_values_to_products_options', TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS); $Qvalues->bindInt(':products_options_id', $Qoptions->valueInt('products_options_id')); $Qvalues->bindInt(':language_id', $osC_Language->getID()); $Qvalues->execute(); while ($Qvalues->next()) { echo ' <option value="' . $Qvalues->valueInt('products_options_values_id') . '">' . $Qvalues->value('products_options_values_name') . '</option>' . "\n"; } echo ' </optgroup>' . "\n"; }?> </select></td> <td align="center" width="10%"> <input type="button" value=">>" onclick="moreFields()" class="infoBoxButton"> </td> <td width="60%" valign="top""> <fieldset> <legend><?php echo $osC_Language->get('subsection_assigned_attributes'); ?></legend><?php if (isset($_GET['pID'])) { echo '<table border="0" width="100%" cellspacing="0" cellpadding="2">'; $Qattributes = $osC_Database->query('select po.products_options_id, po.products_options_name, pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from :table_products_attributes pa, :table_products_options po, :table_products_options_values pov where pa.products_id = :products_id and pa.options_id = po.products_options_id and po.language_id = :language_id and pa.options_values_id = pov.products_options_values_id and pov.language_id = :language_id order by po.products_options_name, pov.products_options_values_name'); $Qattributes->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES); $Qattributes->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS); $Qattributes->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES); $Qattributes->bindInt(':products_id', $_GET['pID']); $Qattributes->bindInt(':language_id', $osC_Language->getID()); $Qattributes->bindInt(':language_id', $osC_Language->getID()); $Qattributes->execute(); $current_attribute_group = ''; while ($Qattributes->next()) { if ($Qattributes->value('products_options_name') != $current_attribute_group) { echo ' <tr>' . "\n" . ' <td colspan="3"><b>' . $Qattributes->value('products_options_name') . '</b></td>' . "\n" . ' </tr>' . "\n"; $current_attribute_group = $Qattributes->value('products_options_name'); } echo ' <tr id="attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '">' . "\n" . ' <td width="50%">' . $Qattributes->value('products_options_values_name') . '</td>' . "\n" . ' <td>' . osc_draw_pull_down_menu('attribute_prefix[' . $Qattributes->valueInt('products_options_id') . '][' . $Qattributes->valueInt('products_options_values_id') . ']', array(array('id' => '+', 'text' => '+'), array('id' => '-', 'text' => '-')), $Qattributes->value('price_prefix')) . ' ' . osc_draw_input_field('attribute_price[' . $Qattributes->valueInt('products_options_id') . '][' . $Qattributes->valueInt('products_options_values_id') . ']', $Qattributes->value('options_values_price')) . '</td>' . "\n" . ' <td align="right"><input type="button" value="-" id="attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '-button" onclick="toggleAttributeStatus(\'attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '\');" class="infoBoxButton"></td>' . "\n" . ' </tr>' . "\n"; } echo '</table>'; }?> <span id="writeroot"></span> <div id="readroot" style="display: none"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td colspan="3"><b><span id="attribteGroupName"> </span></b></td> </tr> <tr class="attributeAdd"> <td width="50%"><span id="attributeKey"> </span></td> <td><?php echo osc_draw_pull_down_menu('new_attribute_prefix', array(array('id' => '+', 'text' => '+'), array('id' => '-', 'text' => '-')), '+', 'disabled="disabled"') . ' ' . osc_draw_input_field('new_attribute_price', null, 'disabled="disabled"'); ?></td> <td align="right"><input type="button" value="-" onclick="this.parentNode.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode.parentNode);" class="infoBoxButton"></td> </tr> </table> </div> </fieldset> </td> </tr> </table> </div> <div class="tab-page" id="tabCategories"> <h2 class="tab"><?php echo $osC_Language->get('section_categories'); ?></h2><script type="text/javascript">mainTabPane.addTabPage( document.getElementById( "tabCategories" ) );</script> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable"> <thead> <tr> <th width="20"> </th> <th><?php echo $osC_Language->get('table_heading_categories'); ?></th> </tr> </thead> <tbody><?php $product_categories_array = array(); if (isset($_GET['pID'])) { $Qcategories = $osC_Database->query('select categories_id from :table_products_to_categories where products_id = :products_id'); $Qcategories->bindTable(':table_products_to_categories', TABLE_PRODUCTS_TO_CATEGORIES); $Qcategories->bindInt(':products_id', $_GET['pID']); $Qcategories->execute(); while ($Qcategories->next()) { $product_categories_array[] = $Qcategories->valueInt('categories_id'); } } $assignedCategoryTree = new osC_CategoryTree(); $assignedCategoryTree->setBreadcrumbUsage(false); $assignedCategoryTree->setSpacerString(' ', 5); foreach ($assignedCategoryTree->getTree() as $value) { echo ' <tr onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . "\n" . ' <td>' . osc_draw_checkbox_field('categories[]', $value['id'], in_array($value['id'], $product_categories_array), 'id="categories_' . $value['id'] . '"') . '</td>' . "\n" . ' <td><a href="#" onclick="document.product.categories_' . $value['id'] . '.checked=!document.product.categories_' . $value['id'] . '.checked;">' . $value['title'] . '</a></td>' . "\n" . ' </tr>' . "\n"; }?> </table></td> </tr> </table> </div> <p align="right"><?php echo osc_draw_hidden_field('subaction', 'confirm') . '<input type="submit" value="' . $osC_Language->get('button_save') . '" class="operationButton" onclick="' . (isset($osC_ObjectInfo) ? 'setFileUploadField(); ' : '') . 'document.product.target=\'_self\'; document.product.action=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&cPath=' . $_GET['cPath'] . '&search=' . $_GET['search'] . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=save') . '\';" /> <input type="button" value="' . $osC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&cPath=' . $_GET['cPath'] . '&search=' . $_GET['search'] . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '')) . '\';" class="operationButton" />'; ?></p> </form></div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -