function get_list($condition, $order = 'listorder ASC,itemid ASC') { global $MOD, $pages, $page, $pagesize, $offset, $sum; if ($page > 1 && $sum) { $items = $sum; } else { $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table} WHERE {$condition}"); $items = $r['num']; } $pages = pages($items, $page, $pagesize); if ($items < 1) { return array(); } $lists = array(); $result = $this->db->query("SELECT * FROM {$this->table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}"); while ($r = $this->db->fetch_array($result)) { $r['adddate'] = timetodate($r['addtime'], 5); $r['editdate'] = timetodate($r['edittime'], 5); if ($r['areaid']) { $r['address'] = area_pos($r['areaid'], '') . $r['address']; } $lists[] = $r; } return $lists; }
function set($post) { global $DT_TIME, $_username; if (isset($post['areaid'])) { $post['address'] = area_pos($post['areaid'], '') . $post['address']; } $post['edittime'] = $DT_TIME; $post['editor'] = $_username; $post['listorder'] = intval($post['listorder']); if ($this->itemid) { //$post['editor'] = $_username; } else { $post['addtime'] = $DT_TIME; } $post = dhtmlspecialchars($post); return array_map("trim", $post); }
?> 不限<?php } ?> </td> <td><?php if ($v['areaid']) { ?> <a href="<?php echo $MODULE[$v['mid']]['linkurl']; ?> search.php?areaid=<?php echo $v['areaid']; ?> " target="_blank"><?php echo area_pos($v['areaid'], '-'); ?> </a><?php } else { ?> 不限<?php } ?> </td> <td class="px11 f_gray"><?php echo timetodate($v['addtime'], 5); ?> </td> <?php if ($v['sendtime']) { ?>
echo $t['minsalary']; echo $DT['money_unit']; ?> /月以上 <?php } else { if ($t['maxsalary']) { echo $t['maxsalary']; echo $DT['money_unit']; ?> /月以内 <?php } else { ?> 面议 <?php } } } ?> </td> <td width="80" align="center"><?php echo area_pos($t['areaid'], '', 1); ?> </td> </tr> <?php } } ?> </table>
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 : ''; switch ($seo_file) { case 'index': if ($MOD['title_index']) { eval("\$seo_title = \"{$MOD['title_index']}\";"); } else { $seo_title = $seo_modulename . $seo_delimiter . $seo_sitename; } if ($MOD['keywords_index']) { eval("\$head_keywords = \"{$MOD['keywords_index']}\";"); } if ($MOD['description_index']) { eval("\$head_description = \"{$MOD['description_index']}\";"); }
continue; } $r['alt'] = $r['title']; $r['title'] = dsubstr($r['title'], 40, '..'); $r['linkurl'] = $MOD['linkurl'] . $r['linkurl']; $r['key'] = $r['itemid']; $tags[$r['itemid']] = $r; } if ($tags) { foreach ($data as $k => $v) { if (isset($tags[$k])) { $lists[] = $tags[$k]; } } } } if ($lists) { $address = array(); $result = $db->query("SELECT * FROM {$DT_PRE}address WHERE username='******' ORDER BY listorder ASC,itemid ASC LIMIT 30"); while ($r = $db->fetch_array($result)) { if ($r['areaid']) { $r['address'] = area_pos($r['areaid'], '') . $r['address']; } $address[] = $r; } $user = userinfo($_username); } } $head_title = $L['buy_title']; include template('buy', $module); }
?> " width="80"/></td> </tr> <?php } if (isset($E['areaid'])) { ?> <tr onmouseover="this.className='on';" onmouseout="this.className='';"> <td align="center"><input type="checkbox" name="pass[]" value="areaid" checked/></td> <td align="center">所在地区</td> <td><?php echo area_pos($U['areaid'], ' / '); ?> </td> <td><?php echo area_pos($E['areaid'], ' / '); ?> </td> </tr> <?php } ?> <?php if (isset($E['type'])) { ?> <tr onmouseover="this.className='on';" onmouseout="this.className='';"> <td align="center"><input type="checkbox" name="pass[]" value="type" checked/></td> <td align="center">公司类型</td> <td><?php echo $U['type'];
$item = $db->get_one("SELECT * FROM {$table} WHERE itemid={$itemid}"); if ($item && $item['status'] > 2) { if ($item['process'] == 2) { message($L['group_expired']); } if ($item['username'] == $_username) { message($L['buy_self']); } } else { message(lang('message->item_not_exists'), $MOD['linkurl']); } $user = userinfo($_username); if ($submit) { if ($item['logistic']) { $add = array_map('trim', $add); $add['address'] = area_pos($add['areaid'], '') . $add['address']; $add = array_map('htmlspecialchars', $add); $buyer_address = $add['address']; if (strlen($buyer_address) < 10) { message($L['msg_type_address']); } $buyer_postcode = $add['postcode']; if (strlen($buyer_postcode) < 6) { message($L['msg_type_postcode']); } $buyer_name = $add['truename']; if (strlen($buyer_name) < 2) { message($L['msg_type_truename']); } $buyer_phone = $add['telephone']; $buyer_receive = $add['receive'];
</td> <td class="tl">公司规模</td> <td> <?php echo $size; ?> </td> </tr> <tr> <td class="tl">成立年份</td> <td> <?php echo $regyear; ?> </td> <td class="tl">公司所在地</td> <td> <?php echo area_pos($areaid, '/'); ?> </td> </tr> <tr> <td class="tl">销售的产品 (提供的服务)</td> <td> <?php echo $sell; ?> </td> <td class="tl">采购的产品 (需要的服务)</td> <td> <?php echo $buy; ?> </td> </tr>
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']), ',')) . strip_tags(area_pos($item['areaid'], ',')); if ($keyword != $item['keyword']) { $keyword = str_replace("//", '', addslashes($keyword)); $update .= ",keyword='{$keyword}'"; } $item['itemid'] = $itemid; $linkurl = $item['islink'] ? $item['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', '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}"); } }
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}"); } }
function set_member($member) { global $MOD; $member['email'] = trim($member['email']); $member['mail'] = isset($member['mail']) ? trim($member['mail']) : ''; is_email($member['mail']) or $member['mail'] = ''; $member['msn'] = isset($member['msn']) ? trim($member['msn']) : ''; is_email($member['msn']) or $member['msn'] = ''; $member['qq'] = isset($member['qq']) ? trim($member['qq']) : ''; is_numeric($member['qq']) or $member['qq'] = ''; $member['ali'] = isset($member['ali']) ? trim($member['ali']) : ''; if (!$this->is_clean($member['ali'])) { $member['ali'] = ''; } $member['skype'] = isset($member['skype']) ? trim($member['skype']) : ''; if (!$this->is_clean($member['skype'])) { $member['skype'] = ''; } $member['address'] = isset($member['address']) ? trim($member['address']) : ''; if (!$this->is_clean($member['address'])) { $member['address'] = ''; } $member['postcode'] = isset($member['postcode']) ? trim($member['postcode']) : ''; is_numeric($member['postcode']) or $member['postcode'] = ''; $member['mode'] = isset($member['mode']) && is_array($member['mode']) && $member['mode'] ? implode(',', $member['mode']) : ''; $member['keyword'] = $member['company']; $member['homepage'] = isset($member['homepage']) ? fix_link($member['homepage']) : ''; $member['capital'] = isset($member['capital']) ? dround($member['capital']) : ''; $member['sound'] = intval($member['sound']); if ($this->userid) { $member['keyword'] = $member['company'] . strip_tags(area_pos($member['areaid'], ',')) . ',' . $member['business'] . ',' . $member['sell'] . ',' . $member['buy'] . ',' . $member['mode']; clear_upload($member['thumb'] . $member['introduce'], $this->userid); $new = $member['introduce']; if ($member['thumb']) { $new .= '<img src="' . $member['thumb'] . '">'; } $content_table = content_table(4, $this->userid, is_file(DT_CACHE . '/4.part'), $this->table_company_data); $r = $this->db->get_one("SELECT content FROM {$content_table} WHERE userid={$this->userid}"); $old = $r['content']; $r = $this->get_one(); if ($r['thumb']) { $old .= '<img src="' . $r['thumb'] . '">'; } delete_diff($new, $old); } else { if ($member['thumb']) { clear_upload($member['thumb'] . $member['introduce']); } } $member['content'] = $member['introduce']; $member['introduce'] = addslashes(get_intro($member['content'], $MOD['introduce_length'])); if (!defined('DT_ADMIN')) { $content = $member['content']; unset($member['content']); $member = dhtmlspecialchars($member); $member['content'] = dsafe($content); } if ($MOD['introduce_clear'] || $MOD['introduce_save']) { $member['content'] = stripslashes($member['content']); $member['content'] = save_local($member['content']); if ($MOD['introduce_clear']) { $member['content'] = clear_link($member['content']); } if ($MOD['introduce_save']) { $member['content'] = save_remote($member['content']); } $member['content'] = addslashes($member['content']); } if ($member['catid']) { $catids = explode(',', substr($member['catid'], 1, -1)); $cids = ''; foreach ($catids as $catid) { $C = get_cat($catid); if ($C) { $catid = $C['parentid'] ? $C['arrparentid'] . ',' . $catid : $catid; $cids .= $catid . ','; } } $cids = array_unique(explode(',', substr(str_replace(',0,', ',', ',' . $cids), 1, -1))); $member['catids'] = ',' . implode(',', $cids) . ','; } return $member; }
$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>'; echo '<link>' . $rss_link . '</link>'; echo '<pubDate>' . timetodate($DT_TIME) . '</pubDate>'; if ($MOD['feed_enable']) { $tags = tag("moduleid={$moduleid}&table={$table}&condition={$condition}&pagesize={$pagesize}&order=addtime desc&template=null" . $cat, -1); foreach ($tags as $t) {
<td><?php echo $item['truename']; ?> </td> </tr> <tr> <td class="tl">手机</td> <td><?php echo $item['mobile']; ?> </td> </tr> <tr> <td class="tl">地址</td> <td><?php echo area_pos($item['areaid'], ''); echo $item['address']; ?> </td> </tr> <tr> <td class="tl">邮编</td> <td><?php echo $item['postcode']; ?> </td> </tr> <tr> <td class="tl">邮件</td> <td><?php echo $item['email'];
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']), ',')) . strip_tags(area_pos($item['areaid'], ',')); 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}"); } }