本文整理汇总了PHP中itemurl函数的典型用法代码示例。如果您正苦于以下问题:PHP itemurl函数的具体用法?PHP itemurl怎么用?PHP itemurl使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了itemurl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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}')");
}
示例2: 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}");
}
}
示例3: 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}");
}
}
示例4: get_user
$T = $db->get_one("SELECT manager FROM {$table}_group WHERE itemid={$catid}");
if ($T && $T['manager'] && strpos($T['manager'], $name) !== false) {
$username = get_user($name, 'passport', 'username');
if ($username) {
dheader(userurl($username));
}
}
}
dheader($MOD['linkurl']);
} else {
$itemid or dheader($MOD['linkurl']);
$R = $db->get_one("SELECT * FROM {$table}_reply WHERE itemid={$itemid}");
$R or dheader($MOD['linkurl']);
$tid = $R['tid'];
$T = $db->get_one("SELECT * FROM {$table} WHERE itemid={$tid}");
$T or dheader($MOD['linkurl']);
if ($MOD['reply_pagesize']) {
$pagesize = $MOD['reply_pagesize'];
}
if ($R['fid']) {
$page = ceil($R['fid'] / $pagesize);
} else {
$page = ceil(($T['reply'] + 1) / $pagesize);
}
if ($page == 1) {
$linkurl = $T['linkurl'];
} else {
$linkurl = itemurl($T, $page);
}
dheader($MOD['linkurl'] . $linkurl . '#R' . $itemid);
}
示例5: property_option
if ($CP) {
require DT_ROOT . '/include/property.func.php';
$options = property_option($catid);
$values = property_value($moduleid, $itemid);
}
$adddate = timetodate($addtime, 3);
$editdate = timetodate($edittime, 3);
$linkurl = $MOD['linkurl'] . $linkurl;
$T = array();
$result = $db->query("SELECT itemid,thumb,introduce FROM {$table_item} WHERE item={$itemid} ORDER BY listorder ASC,itemid ASC");
while ($r = $db->fetch_array($result)) {
$r['middle'] = str_replace('.thumb.', '.middle.', $r['thumb']);
$r['big'] = str_replace('.thumb.' . file_ext($r['thumb']), '', $r['thumb']);
$T[] = $r;
}
$demo_url = $MOD['linkurl'] . itemurl($item, '{destoon_page}');
$next_photo = $items > 1 ? next_photo($page, $items, $demo_url) : $linkurl;
$prev_photo = $items > 1 ? prev_photo($page, $items, $demo_url) : $linkurl;
if ($T) {
$S = side_photo($T, $page, $demo_url);
} else {
$S = array();
$T[0]['thumb'] = DT_SKIN . 'image/spacer.gif';
$T[0]['introduce'] = $L['no_picture'];
}
$P = $T[$page - 1];
$P['src'] = str_replace('.thumb.' . file_ext($P['thumb']), '', $P['thumb']);
$user_status = 3;
$update = '';
$fee = get_fee($item['fee'], $MOD['fee_view']);
if ($fee) {
示例6: 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}");
}
}
示例7: 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}");
}
}
示例8: dheader
if ($_userid && check_pay($moduleid, $itemid)) {
$user_status = 3;
} else {
$user_status = 0;
}
}
} else {
$user_status = 3;
}
$user_status == 3 or dheader($linkurl);
$adddate = timetodate($addtime, 3);
$editdate = timetodate($edittime, 3);
$linkurl = $MOD['linkurl'] . $linkurl;
$pagesize = 30;
$offset = ($page - 1) * $pagesize;
$pages = pages($items, $page, $pagesize);
$T = array();
$i = 1;
$result = $db->query("SELECT itemid,thumb,introduce FROM {$table_item} WHERE item={$itemid} ORDER BY listorder ASC,itemid ASC LIMIT {$offset},{$pagesize}");
while ($r = $db->fetch_array($result)) {
$r['number'] = $offset + $i++;
$r['linkurl'] = $MOD['linkurl'] . itemurl($item, $r['number']) . '#p';
$r['thumb'] = str_replace('.thumb.', '.middle.', $r['thumb']);
$r['title'] = $r['introduce'] ? dsubstr($r['introduce'], 46, '..') : ' ';
$T[] = $r;
}
$update = '';
include DT_ROOT . '/include/update.inc.php';
$seo_file = 'show';
include DT_ROOT . '/include/seo.inc.php';
include template('view', $module);
示例9: 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}");
}
}
示例10: timetodate
$editdate = timetodate($edittime, 3);
$linkurl = $MOD['linkurl'] . $linkurl;
$update = '';
$fee = get_fee($item['fee'], $MOD['fee_view']);
if ($fee) {
$user_status = 4;
$destoon_task = "moduleid={$moduleid}&html=show&itemid={$itemid}";
$description = get_description($content, $MOD['pre_view']);
} else {
$user_status = 3;
}
$pages = '';
if (strpos($content, '<hr class="de-pagebreak" />') !== false) {
$content = explode('<hr class="de-pagebreak" />', $content);
$total = count($content);
$pages = pages($total, $page, 1, $MOD['linkurl'] . itemurl($item, '{destoon_page}'));
if ($pages) {
$pages = substr($pages, 0, strpos($pages, '<cite>'));
}
$content = $content[$page - 1];
}
if ($MOD['keylink']) {
$content = keylink($content, $moduleid);
}
include DT_ROOT . '/include/update.inc.php';
$seo_file = 'show';
include DT_ROOT . '/include/seo.inc.php';
if ($EXT['mobile_enable']) {
$head_mobile = $EXT['mobile_url'] . mobileurl($moduleid, 0, $itemid, $page);
}
$template = $item['template'] ? $item['template'] : ($CAT['show_template'] ? $CAT['show_template'] : 'show');
示例11: set_cookie
}
} else {
$error = '';
if ($submit) {
if ($key && $key == $_key) {
$pass = true;
set_cookie('photo_' . $itemid, md5(md5($DT_IP . $open . $_key . DT_KEY)), $DT_TIME + 86400);
dheader($linkurl);
} else {
$error = $open == 2 ? $L['error_password'] : $L['error_answer'];
}
}
}
$update = '';
include DT_ROOT . '/include/update.inc.php';
$head_canonical = $MOD['linkurl'] . ($page == 1 ? $item['linkurl'] : itemurl($item, $page));
$head_title = $title . $DT['seo_delimiter'] . $head_title;
$head_keywords = $keyword;
$head_description = $introduce ? $introduce : $title;
} else {
$url = "file={$file}";
$condition = "username='{$username}' AND status=3 AND items>0";
if ($kw) {
$condition .= " AND keyword LIKE '%{$keyword}%'";
$url .= "&kw={$kw}";
$head_title = $kw . $DT['seo_delimiter'] . $head_title;
}
$demo_url = userurl($username, $url . '&page={destoon_page}', $domain);
$pagesize = intval($menu_num[$menuid]);
if (!$pagesize || $pagesize > 100) {
$pagesize = 16;
示例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: pages
if ($best && $best['expert']) {
$E = $db->get_one("SELECT * FROM {$table}_expert WHERE username='{$best['username']}'");
}
}
$pages = '';
if ($process == 0 || $process == 3) {
if ($MOD['answer_pagesize']) {
$pagesize = $MOD['answer_pagesize'];
$offset = ($page - 1) * $pagesize;
}
$items = $answer;
if ($aid) {
$items--;
}
if ($items > 0) {
$pages = pages($items, $page, $pagesize, $MOD['linkurl'] . itemurl($item, '{destoon_page}'));
$result = $db->query("SELECT * FROM {$table}_answer WHERE qid={$itemid} AND status=3 ORDER BY itemid ASC LIMIT {$offset},{$pagesize}");
while ($r = $db->fetch_array($result)) {
if ($r['itemid'] == $aid) {
continue;
}
$answers[] = $r;
}
}
}
include DT_ROOT . '/include/update.inc.php';
if ($EXT['mobile_enable']) {
$head_mobile = $EXT['mobile_url'] . mobileurl($moduleid, 0, $itemid, $page);
}
$seo_file = 'show';
include DT_ROOT . '/include/seo.inc.php';
示例14: showpages
function showpages($item, $total, $page = 1)
{
global $MOD, $L;
$pages = '';
$home_url = $MOD['linkurl'] . itemurl($item);
$demo_url = $MOD['linkurl'] . itemurl($item, '{destoon_page}');
$_page = $page <= 1 ? $total : $page - 1;
$url = $_page == 1 ? $home_url : str_replace('{destoon_page}', $_page, $demo_url);
$pages .= '<input type="hidden" id="des' . 'toon_previous" value="' . $url . '"/><a href="' . $url . '" title="' . $L['prev_page'] . '"> « </a> ';
for ($_page = 1; $_page <= $total; $_page++) {
$url = $_page == 1 ? $home_url : str_replace('{destoon_page}', $_page, $demo_url);
$pages .= $page == $_page ? '<strong> ' . $_page . ' </strong> ' : ' <a href="' . $url . '"> ' . $_page . ' </a> ';
}
$_page = $page >= $total ? 1 : $page + 1;
$url = $_page == 1 ? $home_url : str_replace('{destoon_page}', $_page, $demo_url);
$pages .= '<a href="' . $url . '" title="' . $L['next_page'] . '"> » </a> <input type="hidden" id="des' . 'toon_next" value="' . $url . '"/>';
return $pages;
}
示例15: delete
function delete($itemid, $all = true)
{
global $MOD;
if (is_array($itemid)) {
foreach ($itemid as $v) {
$this->delete($v, $all);
}
} else {
$this->itemid = $itemid;
$r = $this->get_one();
if ($MOD['show_html']) {
$_file = DT_ROOT . '/' . $MOD['moduledir'] . '/' . $r['linkurl'];
if (is_file($_file)) {
unlink($_file);
}
$i = 1;
while ($i) {
$_file = DT_ROOT . '/' . $MOD['moduledir'] . '/' . itemurl($r, $i);
if (is_file($_file)) {
unlink($_file);
$i++;
} else {
break;
}
}
}
if ($all) {
$userid = get_user($r['username']);
if ($r['thumb']) {
delete_upload($r['thumb'], $userid);
}
if ($r['content']) {
delete_local($r['content'], $userid);
}
$this->db->query("DELETE FROM {$this->table} WHERE itemid={$itemid}");
$content_table = content_table($this->moduleid, $this->itemid, $this->split, $this->table_data);
$this->db->query("DELETE FROM {$content_table} WHERE itemid={$itemid}");
if ($MOD['cat_property']) {
$this->db->query("DELETE FROM {$this->db->pre}category_value WHERE moduleid={$this->moduleid} AND itemid={$itemid}");
}
if ($r['username'] && $MOD['credit_del']) {
credit_add($r['username'], -$MOD['credit_del']);
credit_record($r['username'], -$MOD['credit_del'], 'system', lang('my->credit_record_del', array($MOD['name'])), 'ID:' . $this->itemid);
}
}
}
}