Example #1
0
 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}");
     }
 }
Example #2
0
 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}')");
 }
Example #3
0
<?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;
Example #4
0
 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}");
     }
 }
Example #5
0
<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 
}
Example #6
0
 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}");
     }
 }
Example #7
0
 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}");
     }
 }
Example #8
0
 $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>';
Example #9
0
<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>
Example #10
0
        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='******' 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='******' AND status={$i}");
    $nums[$i] = $r['num'];
Example #11
0
 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}");
     }
 }
Example #12
0
 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}')");
 }
Example #13
0
 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}");
     }
 }
Example #14
0
 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}");
     }
 }
Example #15
0
}
?>
&nbsp;最多可添加 <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>
Example #16
0
	[Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com
	This is NOT a freeware, use is subject to license.txt
*/
defined('IN_DESTOON') or exit('Access Denied');
$seo_modulename = $MOD['name'];
$seo_sitename = $city_sitename ? $city_sitename : $DT['sitename'];
$seo_sitetitle = $DT['seo_title'];
$seo_sitekeywords = $DT['seo_keywords'];
$seo_sitedescription = $DT['seo_description'];
$seo_delimiter = $DT['seo_delimiter'];
$seo_page = $page > 1 ? lang($L['seo_page'], array($page)) . $seo_delimiter : '';
$seo_catname = $seo_cattitle = $seo_parentname = $seo_catkeywords = $seo_catdescription = '';
if ($catid) {
    if ($CAT['parentid']) {
        $seo_catname = '';
        $tmp = strip_tags(cat_pos($CAT, 'DESTOON'));
        $tmp = explode('DESTOON', $tmp);
        $tmp = array_reverse($tmp);
        foreach ($tmp as $k => $v) {
            $seo_catname .= $v . $seo_delimiter;
        }
    } else {
        $seo_catname = $CAT['catname'] . $seo_delimiter;
    }
    $seo_cattitle = $CAT['seo_title'] ? $CAT['seo_title'] . $seo_delimiter : $seo_catname;
    $seo_catkeywords = $CAT['seo_keywords'] ? $CAT['seo_keywords'] : '';
    $seo_catdescription = $CAT['seo_description'] ? $CAT['seo_description'] : '';
}
$seo_areaname = isset($areaid) && $areaid ? area_pos($areaid, $seo_delimiter) . $seo_delimiter : '';
$seo_showtitle = isset($title) ? $title : '';
$seo_showintroduce = isset($introduce) ? $introduce : '';
Example #17
0
 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 = itemurl($item);
     if ($linkurl != $item['linkurl']) {
         $update .= ",linkurl='{$linkurl}'";
     }
     if ($item['process'] == 0 || $item['process'] == 3) {
         $answer = $this->db->count($this->table . '_answer', "qid={$itemid} AND status=3");
         if ($answer != $item['answer']) {
             $update .= ",answer='{$answer}'";
         }
     }
     if ($item['username']) {
         $passport = addslashes(get_user($item['username'], 'username', 'passport'));
         if ($passport != $item['passport']) {
             $update .= ",passport='{$passport}'";
         }
     }
     if ($update) {
         $this->db->query("UPDATE {$this->table} SET " . substr($update, 1) . " WHERE itemid={$itemid}");
     }
 }