本文整理汇总了PHP中property_value函数的典型用法代码示例。如果您正苦于以下问题:PHP property_value函数的具体用法?PHP property_value怎么用?PHP property_value使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了property_value函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: extract
if (!$item || $item['status'] < 3 || $item['islink'] > 0) {
return false;
}
extract($item);
$CAT = get_cat($catid);
$content_table = content_table($moduleid, $itemid, $MOD['split'], $table_data);
$t = $db->get_one("SELECT content FROM {$content_table} WHERE itemid={$itemid}");
$content = $t['content'];
if ($lazy) {
$content = img_lazy($content);
}
$CP = $MOD['cat_property'] && $CAT['property'];
if ($CP) {
require_once DT_ROOT . '/include/property.func.php';
$options = property_option($catid);
$values = property_value($moduleid, $itemid);
}
$adddate = timetodate($addtime, 3);
$editdate = timetodate($edittime, 3);
if ($voteid) {
$voteid = explode(' ', $voteid);
}
if ($fromurl) {
$fromurl = fix_link($fromurl);
}
$fileurl = $linkurl;
$linkurl = $MOD['linkurl'] . $linkurl;
$titles = array();
if ($subtitle) {
$titles = explode("\n", $subtitle);
$titles = array_map('trim', $titles);
示例2: defined
<?php
defined('IN_DESTOON') or exit('Access Denied');
$CAT or exit;
$CAT['property'] or exit;
include DT_ROOT . '/include/property.func.php';
$admin = isset($admin) && $admin ? 1 : 0;
$moduleid = $CAT['moduleid'];
$options = property_option($catid);
$values = $itemid ? property_value($moduleid, $itemid) : array();
$select = '<select id="property_required" style="display:none;">';
$table = '';
foreach ($options as $k => $v) {
isset($values[$v['oid']]) or $values[$v['oid']] = '';
if ($v['required']) {
$star = '<span class="f_red">*</span> ';
} else {
$star = $admin ? '<span class="f_hid">*</span> ' : '';
}
$table .= '<tr><td class="tl">' . $star . $v['name'] . '</td><td class="tr">' . property_html($values[$v['oid']], $v['oid'], $v['type'], $v['value'], $v['extend']) . '</td></tr>';
$select .= $v['required'] ? '<option value="' . $v['oid'] . '">' . $v['name'] . '</option>' : '';
}
$select .= '</select>';
echo substr($table, 0, -10) . $select . '</td></tr>';