本文整理汇总了PHP中cat_pos函数的典型用法代码示例。如果您正苦于以下问题:PHP cat_pos函数的具体用法?PHP cat_pos怎么用?PHP cat_pos使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cat_pos函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update
function update($itemid)
{
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
}
$item['itemid'] = $itemid;
$linkurl = isset($item['domain']) && $item['domain'] ? $item['domain'] : ($item['islink'] ? $item['linkurl'] : itemurl($item));
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
}
示例2: update
function update($itemid)
{
global $TYPE;
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . $TYPE[$item['typeid']] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
} else {
$keyword = str_replace("//", '', addslashes($keyword));
}
$item['itemid'] = $itemid;
$linkurl = itemurl($item);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
$member = $item['username'] ? userinfo($item['username']) : array();
if ($member) {
$update .= update_user($member, $item);
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
$sorttime = $this->get_sorttime($item['edittime'], $item['vip']);
$this->db->query("REPLACE INTO {$this->table_search} (itemid,catid,areaid,status,content,sorttime) VALUES ({$itemid},'{$item['catid']}','{$item['areaid']}','{$item['status']}','{$keyword}','{$sorttime}')");
}
示例3: defined
<?php
defined('IN_DESTOON') or exit('Access Denied');
isset($name) or $name = '';
if (!$name || strlen($name) < 2 || strlen($name) > 30) {
exit;
}
$name = convert($name, 'UTF-8', DT_CHARSET);
$limit = $DT['schcate_limit'] ? intval($DT['schcate_limit']) : 10;
$html = '';
$result = $db->query("SELECT catid,arrparentid FROM {$DT_PRE}category WHERE moduleid={$moduleid} AND catname LIKE '%{$name}%' ORDER BY item DESC,catid DESC LIMIT {$limit}");
while ($r = $db->fetch_array($result)) {
$html .= '<input type="radio" name="dtcate" value="' . $r['catid'] . '" onclick="load_category(' . $r['catid'] . ', 1);" id="dtcate_' . $r['catid'] . '"/> <label for="dtcate_' . $r['catid'] . '">' . strip_tags(cat_pos($r)) . '</label><br/>';
}
echo $html;
示例4: update
function update($itemid)
{
global $TYPE;
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . ($item['tag'] ? $item['tag'] . ',' : '') . $TYPE[$item['typeid']] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
}
$item['itemid'] = $itemid;
$linkurl = itemurl($item);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
$member = $item['username'] ? userinfo($item['username']) : array();
if ($member) {
$update .= update_user($member, $item);
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
}
示例5: explode
<td class="tl">主营行业:</td>
<td colspan="3">
<?php
$catids = explode(',', substr($catid, 1, -1));
?>
<table cellpadding="2" cellspacing="2" width="100%">
<?php
foreach ($catids as $i => $c) {
?>
<?php
if ($i % 3 == 0) {
echo '<tr>';
}
?>
<td width="33%"><?php
echo cat_pos(get_cat($c), ' / ', '_blank');
?>
</td>
<?php
if ($i % 3 == 2) {
echo '</tr>';
}
?>
<?php
}
?>
</table>
</td>
</tr>
<?php
}
示例6: update
function update($itemid)
{
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . $item['company'] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
}
$item['itemid'] = $itemid;
$linkurl = itemurl($item);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
$member = $item['username'] ? userinfo($item['username']) : array();
if ($member) {
foreach (array('groupid', 'vip', 'validated', 'company', 'areaid', 'truename', 'telephone', 'mobile', 'address', 'qq', 'msn', 'ali', 'skype') as $v) {
if ($item[$v] != $member[$v]) {
$update .= ",{$v}='" . addslashes($member[$v]) . "'";
}
}
if ($item['email'] != $member['mail']) {
$update .= ",email='" . addslashes($member['mail']) . "'";
}
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
}
示例7: update
function update($itemid)
{
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
}
$item['itemid'] = $itemid;
if ($item['template'] == 'show-ebook' || $item['template'] == 'show-ebookfull') {
if (strpos($item['filepath'], '/') === false) {
$filepath = 'E' . $itemid . '/index.html';
$update .= ",filepath='{$filepath}'";
}
}
$linkurl = itemurl($item);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
}
示例8: in_array
$table = in_array($module, array('article', 'brand', 'buy', 'down', 'info', 'photo', 'sell', 'video')) ? $module . '_' . $moduleid : $module;
$rss_title = $MODULE[$mid]['name'];
if ($MOD['feed_enable']) {
$pagesize = $MOD['feed_pagesize'] ? intval($MOD['feed_pagesize']) : 50;
$condition = "status=3";
$cat = '';
if ($MOD['feed_enable'] == 2) {
if ($kw) {
$rss_title = $rss_title . $DT['seo_delimiter'] . $kw;
}
if ($keyword) {
$condition .= " and keyword LIKE '%{$keyword}%'";
}
if ($catid) {
$cat .= "&catid={$catid}";
$rss_title = $rss_title . $DT['seo_delimiter'] . strip_tags(cat_pos($catid, $DT['seo_delimiter']));
}
if ($areaid) {
$AREA = cache_read('area.php');
$condition .= $AREA[$areaid]['child'] ? " and areaid IN (" . $AREA[$areaid]['arrchildid'] . ")" : " and areaid={$areaid}";
$rss_title = $rss_title . $DT['seo_delimiter'] . strip_tags(area_pos($areaid, $DT['seo_delimiter']));
}
}
}
$rss_title = $rss_title . $DT['seo_delimiter'] . $DT['sitename'];
$rss_link = DT_PATH;
header("content-type:application/xml");
echo '<?xml version="1.0" encoding="' . DT_CHARSET . '"?>';
echo '<rss version="2.0">';
echo '<channel>';
echo '<title>' . $rss_title . '</title>';
示例9: cat_pos
<td><input name="post[<?php
echo $v['pid'];
?>
][unit]" type="text" size="5" value="<?php
echo $v['unit'];
?>
"/></td>
<td><input name="post[<?php
echo $v['pid'];
?>
][catid]" type="text" size="5" value="<?php
echo $v['catid'];
?>
"/></td>
<td><?php
echo cat_pos($v['catid'], ' ', 1);
?>
</td>
<td><a href="?moduleid=<?php
echo $moduleid;
?>
&file=<?php
echo $file;
?>
&pid=<?php
echo $v['pid'];
?>
&action=manage"><?php
echo $v['items'];
?>
</a></td>
示例10: message
if (!$r || $r['username'] != $_username) {
message();
}
$do->delete($itemid);
dmsg($L['op_del_success'], $forward);
break;
default:
$status = isset($status) ? intval($status) : 3;
in_array($status, array(2, 3)) or $status = 3;
$condition = "username='{$_username}' AND status={$status}";
$lists = $do->get_list($condition);
if ($lists) {
$tmp = $MOD['linkurl'];
foreach ($lists as $k => $v) {
if ($v['catid']) {
$lists[$k]['cate'] = cat_pos(get_cat($v['catid']), '-', 1);
}
if ($v['email'] != $_email) {
$db->query("UPDATE {$DT_PRE}alert SET email='{$_email}' WHERE itemid={$v['itemid']}");
}
}
$MOD['linkurl'] = $tmp;
}
$head_title = $L['alert_title'];
break;
}
$nums = array();
$limit_used = 0;
for ($i = 2; $i < 4; $i++) {
$r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}alert WHERE username='{$_username}' AND status={$i}");
$nums[$i] = $r['num'];
示例11: update
function update($itemid)
{
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$GRP = get_group($item['gid']);
$keyword = $item['title'] . ',' . $GRP['title'] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
}
if ($item['username']) {
$passport = addslashes(get_user($item['username'], 'username', 'passport'));
if ($passport != $item['passport']) {
$update .= ",passport='{$passport}'";
}
}
$item['itemid'] = $itemid;
$linkurl = itemurl($item);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
if ($item['hits'] > 1 || $item['status'] == 3) {
$reply = $this->db->count($this->table . '_reply', "tid={$itemid} AND status=3");
if ($reply != $item['reply']) {
$update .= ",reply='{$reply}'";
}
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
}
示例12: update
function update($itemid)
{
global $TYPE;
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . $TYPE[$item['typeid']] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
} else {
$keyword = str_replace("//", '', addslashes($keyword));
}
$item['itemid'] = $itemid;
$linkurl = itemurl($item);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
$member = $item['username'] ? userinfo($item['username']) : array();
if ($member) {
foreach (array('groupid', 'vip', 'validated', 'company', 'areaid', 'truename', 'telephone', 'mobile', 'address', 'qq', 'msn', 'ali', 'skype') as $v) {
if ($item[$v] != $member[$v]) {
$update .= ",{$v}='" . addslashes($member[$v]) . "'";
}
}
if ($item['email'] != $member['mail']) {
$update .= ",email='" . addslashes($member['mail']) . "'";
}
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
$sorttime = $this->get_sorttime($item['edittime'], $item['vip']);
$this->db->query("REPLACE INTO {$this->table_search} (itemid,catid,areaid,status,content,sorttime) VALUES ({$itemid},'{$item['catid']}','{$item['areaid']}','{$item['status']}','{$keyword}','{$sorttime}')");
}
示例13: update
function update($itemid)
{
global $GENDER, $MARRIAGE, $EDUCATION;
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . $item['truename'] . ',' . $item['major'] . ',' . strip_tags(cat_pos(get_cat($item['catid']), ',')) . strip_tags(area_pos($item['areaid'], ',')) . ',' . $item['skill'] . ',' . $item['language'] . ',' . $item['school'] . ',' . $GENDER[$item['gender']] . ',' . $MARRIAGE[$item['marriage']] . ',' . $EDUCATION[$item['education']];
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
}
$linkurl = rewrite('resume.php?itemid=' . $itemid);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
}
示例14: update
function update($itemid)
{
$item = $this->db->get_one("SELECT * FROM {$this->table} WHERE itemid={$itemid}");
$update = '';
$keyword = $item['title'] . ',' . ($item['tag'] ? str_replace(' ', ',', trim($item['tag'])) . ',' : '') . strip_tags(cat_pos(get_cat($item['catid']), ','));
if ($keyword != $item['keyword']) {
$keyword = str_replace("//", '', addslashes($keyword));
$update .= ",keyword='{$keyword}'";
}
$mobile = $this->m3u8($item['video']) ? 1 : 0;
if ($mobile != $item['mobile']) {
$update .= ",mobile='{$mobile}'";
}
$item['itemid'] = $itemid;
$linkurl = itemurl($item);
if ($linkurl != $item['linkurl']) {
$update .= ",linkurl='{$linkurl}'";
}
if ($update) {
$this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
}
}
示例15: foreach
}
?>
最多可添加 <strong class="f_red"><?php
echo $MOD['cate_max'];
?>
</strong> 个主营行业
<br/><select name="cates" id="cates" size="2" style="height:100px;width:380px;margin-top:5px;">
<?php
if (is_array($cates)) {
foreach ($cates as $c) {
?>
<option value="<?php
echo $c;
?>
"><?php
echo strip_tags(cat_pos(get_cat($c), '/'));
?>
</option>
<?php
}
}
?>
</select>
<input type="hidden" name="member[catid]" value="<?php
echo $catid;
?>
" id="catid"/><br/>
<span id="dcatid" class="f_red"></span>
</td>
</tr>
<tr>