當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OmAvailableModel::getProValNameById方法代碼示例

本文整理匯總了PHP中OmAvailableModel::getProValNameById方法的典型用法代碼示例。如果您正苦於以下問題:PHP OmAvailableModel::getProValNameById方法的具體用法?PHP OmAvailableModel::getProValNameById怎麽用?PHP OmAvailableModel::getProValNameById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OmAvailableModel的用法示例。


在下文中一共展示了OmAvailableModel::getProValNameById方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: content_52664a83f11110_93730017

    function content_52664a83f11110_93730017($_smarty_tpl)
    {
        echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript" src="./js/property.js"></script>
<div class="fourvar">
            	<div class="pathvar">
                <?php 
        echo $_smarty_tpl->getSubTemplate('pcNav.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

                </div>
                <div class="texvar">
                </div>
                <div class="pagination">
                </div>
            </div>
<div class="servar products-servar">


            </div>
            <div class="main products-main">
            	<form id="formAddPPV" name="form" method="post" action="index.php?mod=property&act=addPropertyValueOn" id="propertyValidation">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
                            <input name="propertyId" value="<?php 
        echo $_smarty_tpl->tpl_vars['propertyId']->value;
        ?>
" type="hidden"/>
                            <td>屬性名:
							<?php 
        echo OmAvailableModel::getProValNameById($_smarty_tpl->tpl_vars['propertyId']->value);
        ?>
</td>
						</tr>
                        <tr>
                            <td><span style="color:#F00;">*</span>&nbsp;屬性值:
							<input class="validate[required]" name="propertyValue" id="propertyValue"/></td>
						</tr>
                        <tr>
                            <td>&nbsp;&nbsp;&nbsp;&nbsp;別名:
							<input name="propertyValueAlias" id="propertyValueAlias"/></td>
						</tr>
                        <tr>
                            <td>字母簡寫:
							<input name="propertyValueShort" id="propertyValueShort"/></td>
						</tr>
                        <tr>
                            <td><input type="submit" value="提交"/>
							<input type="button" value="返回" id="back"/></td>
						</tr>
					</table>

				</form>
            </div>
            <div class="bottomvar">
            	<div class="texvar">

            	</div>
            	<div class="pagination">
            	</div>
            </div>
<?php 
        echo $_smarty_tpl->getSubTemplate("footer.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
    }
開發者ID:ohjack,項目名稱:newErp,代碼行數:66,代碼來源:ea1838bafee3e83819d53228e20974b4a15eefc9.file.addPropertyValue.htm.php

示例2: view_updatePropertyValueOn

 public function view_updatePropertyValueOn()
 {
     $id = $_GET['id'];
     $propertyId = $_GET['propertyId'];
     $propertyValue = $_GET['propertyValue'] ? post_check(trim($_GET['propertyValue'])) : '';
     $propertyValueAlias = $_GET['propertyValueAlias'] ? post_check(trim($_GET['propertyValueAlias'])) : '';
     $propertyValueShort = $_GET['propertyValueShort'] ? post_check(trim($_GET['propertyValueShort'])) : '';
     if (intval($propertyId) == 0 || intval($id) == 0) {
         $status = "屬性Id或屬性值Id錯誤";
         header("Location:index.php?mod=property&act=getPropertyList&status={$status}");
         exit;
     }
     if ($propertyValue == '') {
         $tName = 'pc_archive_spu_property_value_relation';
         $where = "WHERE propertyId={$propertyId} and propertyValueId={$id}";
         $countPPV = OmAvailableModel::getTNameCount($tName, $where);
         if ($countPPV) {
             $status = "該屬性值已經綁定了SPU,不能刪除";
             header("Location:index.php?mod=property&act=updatePropertyValue&id={$propertyId}&status={$status}");
             exit;
         }
         $tName = 'pc_archive_property_value';
         $where = "WHERE id={$id}";
         OmAvailableModel::deleteTNameRow($tName, $where);
         $status = "刪除成功";
         header("Location:index.php?mod=property&act=updatePropertyValue&id={$propertyId}&status={$status}");
         exit;
     }
     $tName = 'pc_archive_property_value';
     $select = 'propertyValue';
     $where = "WHERE id='{$id}'";
     $propertyList = OmAvailableModel::getTNameList($tName, $select, $where);
     if (empty($propertyList)) {
         $status = "不存在Id為{$id的屬性值記錄}";
         header("Location:index.php?mod=property&act=updatePropertyValue&id={$propertyId}&status={$status}");
         exit;
     }
     $propertyName = OmAvailableModel::getProValNameById($propertyId);
     if (empty($propertyName)) {
         $status = "不存在該屬性";
         header("Location:index.php?mod=property&act=updatePropertyValue&id={$propertyId}&status={$status}");
         exit;
     }
     $tName = 'pc_archive_property_value';
     $where = "WHERE propertyId='{$propertyId}' and propertyValue='{$propertyValue}' and id<>{$id}";
     $count = OmAvailableModel::getTNameCount($tName, $where);
     if ($count) {
         $status = "{$propertyName} 屬性下已經存在 {$propertyValue}";
         header("Location:index.php?mod=property&act=updatePropertyValue&id={$propertyId}&status={$status}");
         exit;
     }
     if (!empty($propertyValueShort)) {
         $tName = 'pc_archive_property_value';
         $where = "WHERE propertyId='{$propertyId}' and propertyValueShort='{$propertyValueShort}' and id<>{$id}";
         $count = OmAvailableModel::getTNameCount($tName, $where);
         if ($count) {
             $status = "{$propertyName} 屬性字母簡寫下已經存在 {$propertyValueShort}";
             header("Location:index.php?mod=property&act=updatePropertyValue&id={$propertyId}&status={$status}");
             exit;
         }
     }
     $set = "SET propertyValue='{$propertyValue}',propertyValueAlias='{$propertyValueAlias}',propertyValueShort='{$propertyValueShort}'";
     $where = "WHERE id='{$id}'";
     $affectRow = OmAvailableModel::updateTNameRow($tName, $set, $where);
     if (!$affectRow) {
         $status = "無數據修改";
         header("Location:index.php?mod=property&act=updatePropertyValue&id={$propertyId}&status={$status}");
         exit;
     }
     $status = "{$propertyName} 屬性 {$propertyList[0]['propertyValue']}{$propertyList[0]['propertyValueShort']} 修改為 {$propertyValue}{$propertyValueShort} 成功";
     header("Location:index.php?mod=property&act=updatePropertyValue&id={$propertyId}&status={$status}");
 }
開發者ID:ohjack,項目名稱:newErp,代碼行數:72,代碼來源:property.view.php

示例3: content_52664ad389b3c4_06848378

    function content_52664ad389b3c4_06848378($_smarty_tpl)
    {
        echo $_smarty_tpl->getSubTemplate("header.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

<script type="text/javascript" src="./js/property.js"></script>
<div class="fourvar">
            	<div class="pathvar">
                <?php 
        echo $_smarty_tpl->getSubTemplate('pcNav.htm', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
        ?>

                </div>
                <div class="texvar">
                </div>
                <div class="pagination">
                </div>
            </div>
<div class="servar products-servar">


            </div>
            <div class="main feedback-main">
					<table class="products-action" width="100%" border="0" cellpadding="0" cellspacing="0">
                        <input type="hidden" value="<?php 
        echo $_smarty_tpl->tpl_vars['propertyId']->value;
        ?>
" id='propertyId'/>
                        <tr>
                            <td colspan="4">屬性名:<?php 
        echo OmAvailableModel::getProValNameById($_smarty_tpl->tpl_vars['propertyId']->value);
        ?>
</td>
                        </tr>
					    <?php 
        $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['value']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['propertyValueList']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
            $_smarty_tpl->tpl_vars['value']->_loop = true;
            ?>
						<tr>
                            <td>
                            屬性值:
                            <input id="propertyValue<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['propertyValue'];
            ?>
"/>
							</td>
                            <td>
                            別名:
                            <input id="propertyValueAlias<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['propertyValueAlias'];
            ?>
"/>
							</td>
                            <td>
                            字母簡寫:
                            <input id="propertyValueShort<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" value="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['propertyValueShort'];
            ?>
"/>
							</td>
                            <td>
                            <input type="button" class="updatePPV" pid="<?php 
            echo $_smarty_tpl->tpl_vars['value']->value['id'];
            ?>
" value="修改"/>
							</td>
						</tr>
                        <?php 
        }
        ?>
					</table>
            </div>
            <div class="bottomvar">
            	<div class="texvar">

            	</div>
            	<div class="pagination">
            	</div>
            </div>
<?php 
        echo $_smarty_tpl->getSubTemplate("footer.htm", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);
    }
開發者ID:ohjack,項目名稱:newErp,代碼行數:97,代碼來源:f733b8eedac6bbc549d7c15b65b56b2f4a422063.file.updatePropertyValue.htm.php


注:本文中的OmAvailableModel::getProValNameById方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。