本文整理汇总了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> 属性值:
<input class="validate[required]" name="propertyValue" id="propertyValue"/></td>
</tr>
<tr>
<td> 别名:
<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}");
}
示例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