⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 product_attribute_form.ihtml

📁 php做的网上商店系统。简单易懂
💻 IHTML
字号:
<h2><?php echo $attribute_form_lbl ?> </H2><?php
$product_id = $vars["product_id"];
if ($attribute_name = $vars["attribute_name"]) {
  if (!$product_parent_id) {
    echo $attribute_form_update_for_product . " ";
  } else {
    echo $attribute_form_update_for_item . " ";
  }
} else {
  if (!$product_parent_id) {
    echo $attribute_form_new_for_product . " ";
  } else {
    echo $attribute_form_new_for_item . " ";
  }
}
?><?php
$url = SECUREURL . "?page=$modulename/product_form&product_id=$product_id&product_parent_id=$product_parent_id";
echo "<A HREF=" . $sess->url($url) . ">";
echo $ps_product->get_field($product_id,"product_name");
echo "</A>"; 
?> <?php if ($attribute_name) {
  $db = new ps_DB;
  $q = "SELECT * FROM product_attribute_sku WHERE product_id='$product_id' ";
  $q .= "AND attribute_name = '$attribute_name' ";
  $db->query($q); 
  $db->next_record();} ?> 
<form method="post" action="<?php $sess->purl(SECUREURL) ?>" name="" enctype="multipart/form-data">
  <table width="100%" border="0" cellpadding="2" cellspacing="0">
    <tr> 
      <td valign="top" colspan="2"> 
        <input type="hidden" name="product_id" value="<?php echo $product_id; ?>">
        <input type="hidden" name="old_attribute_name" value="<?php echo $attribute_name; ?>">
        <input type="hidden" name="func" value="<?php if ($attribute_name) { echo "productAttributeUpdate";} else {echo "productAttributeAdd";} ?>">
        <input type="hidden" name="page" value="<?php echo $modulename?>/product_attribute_list">
        <input type="hidden" name="return_args" value="<?php echo $return_args; ?>">
        <?php
$sess->hidden_session();
?> </td>
    </tr>
    <tr> 
      <td width="23%" height="20" valign="top"> 
        <div align="right"><?php echo $attribute_form_name ?>:</div>
      </td>
      <td width="77%" height="20"> 
        <input type="text" name="attribute_name" value="<?php $db->sp("attribute_name"); ?>" size="32" maxlength="255">
      </td>
    </tr>
    <tr> 
      <td width="23%" height="10" valign="top"> 
        <div align="right"><?php echo $attribute_form_order ?>:</div>
      </td>
      <td width="77%" height="10"> 
        <input type="text" name="attribute_list" value="<?php $db->sp("attribute_list"); ?>" size="5" maxlength="11">
      </td>
    </tr>
    <tr> 
      <td colspan="2" height="2"> </td>
    </tr>
    <tr> 
      <td colspan="2" height="22">&nbsp;</td>
    </tr>
    <tr> 
      <td colspan="2" height="22"> <?php if (!$attribute_name) { ?> 
        <table width="75%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr align="center"> 
            <td width="50%"> 
              <input type="image" border="0" src="/phpshop/ps_image/save.gif" width="50" height="16">
            </td>
            <td width="50%"><a href="<?php $sess->purl(SECUREURL . "?page=$modulename/product_attribute_list&product_id=$product_id&return_args=" . urlencode($return_args)); ?>"><img src="/phpshop/ps_image/cancel.gif" width="50" height="16" border="0"></a> 
            </td>
          </tr>
        </table>
        <?php } else { ?> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr align="center"> 
            <td width="33%"> 
              <input type="image" border="0" src="/phpshop/ps_image/save.gif" width="50" height="16">
            </td>
            <td width="34%"><a href="<?php $sess->purl(SECUREURL . "?page=$modulename/product_attribute_list&func=productAttributeDelete&product_id=$product_id&attribute_name=" . urlencode($attribute_name) . "&return_args=" . urlencode($return_args)); ?>" onClick="return confirm('Are you sure you want to delete this Attribute?')"><img src="/phpshop/ps_image/delete.gif" width="50" height="16" border="0"></a> 
            </td>
            <td width="33%"><a href="<?php $sess->purl(SECUREURL . "?page=$modulename/product_attribute_list&product_id=$product_id&return_args=" . urlencode($return_args)); ?>"><img src="/phpshop/ps_image/cancel.gif" width="50" height="16" border="0"></a></td>
          </tr>
        </table>
        <?php } ?> </td>
    </tr>
  </table>
</form>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -