function xt_admin_ajax_link_convert() { $result = array('code' => 0, 'msg' => '', 'result' => array()); if (!current_user_can('manage_options')) { $result['code'] = 500; $result['msg'] = '您无权操作此功能'; exit(json_encode($result)); } $links = $_POST['links']; if (empty($links)) { $result['code'] = 500; $result['msg'] = '未指定要转换的链接'; exit(json_encode($result)); } $_result = array(); foreach ($links as $link) { if (!empty($link)) { $_result[] = xt_jump_url(array('type' => 'url', 'url' => $link)); } else { $_result[] = ''; } } $result['result'] = $_result; exit(json_encode($result)); }
function _xt_widget_blog_daogou($layout) { echo '<ul class="media-list">'; if (have_posts()) { global $post; while (have_posts()) { the_post(); ?> <li class="media"> <?php if (has_post_thumbnail()) { echo '<a class="pull-left" href="' . get_permalink() . '" target="_blank">' . get_the_post_thumbnail(null, 'xt-daogou-post-thumbnail') . '</a>'; } else { echo '<a class="pull-left" href="' . get_permalink() . '" target="_blank"><img class="media-object" data-src="holder.js/180x180/text:无图无真相"></a>'; } ?> <div class="media-body"> <h4 class="media-heading"><a href="<?php the_permalink(); ?> " target="_blank"><?php the_title(); ?> </a></h4> <div class="media"> <?php echo wp_trim_words(strip_tags(get_the_content()), $layout == 'span12' ? 280 : 150); ?> <a href="<?php the_permalink(); ?> " target="_blank" rel="nofollow">阅读全文</a> </div> </div> <div class="pull-right"> <ul class="thumbnails"> <?php $items = get_post_meta($post->ID, 'xt_items', true); if (!empty($items)) { foreach ($items as $item) { if (!empty($item['pic'])) { ?> <li><a class="thumbnail" href="<?php echo xt_jump_url(array('id' => get_the_share_key($item['key']), 'type' => $item['type'], 'share' => $item['guid'])); ?> " target="_blank"> <img src="<?php echo xt_pic_url($item['pic'], 160, $item['type']); ?> "></a></li> <?php } } } ?> </ul> </div> </li> <?php } } echo '</ul>'; }
<?php $_url = isset($_POST['url']) ? $_POST['url'] : ''; $item = array(); $msg = ''; if (!empty($_url)) { $result = xt_share_fetch($_url, -1); if ($result['code'] == 0) { $item = $result['result']; } else { $msg = $result['msg']; } } if (!empty($item)) { $clickUrl = xt_jump_url(array('id' => get_the_share_key($item['share_key']), 'type' => $item['from_type'])); if ($item['from_type'] == 'taobao') { ?> <div class="row-fluid"> <div class="span9"> <div class="pull-left" style="width:300px;overflow:hidden"> <a href="<?php echo $clickUrl; ?> " target="_blank"> <img src="<?php echo xt_pic_url($item['pic_url'], 300, $item['from_type']); ?> "/> </a> </div> <div class="pull-left" style="margin-left: 20px;width:380px;overflow: hidden;">
?> </th> <th>交易时间</th> </tr> </thead> <tbody> <?php if ($_total > 0) { $rate = 0; if ($isUnorder) { $rate = xt_get_rate(get_current_user_id()); } foreach ($_orders as $_o) { $_item_title = ''; if ($_o->commId) { $_item_title = '<a target="_blank" href="' . xt_jump_url(array('id' => $_o->commId, 'type' => 'paipai')) . '">' . $_o->commName . '</a>'; } else { $_item_title = $_o->commName; } $dealId = $isUnorder ? substr_replace($_o->dealId, str_repeat('*', strlen($_o->dealId) - 2), 1, -1) . '<br><a data-id="' . $_o->id . '" data-platform="paipai" href="javascript:;" class="xt-unorder-open">找回</a>' : $_o->dealId; $cash = $jifen = 0; $isJifenbao = xt_fanxian_is_jifenbao('paipai'); if ($isUnorder) { if ($isJifenbao) { $jifen = ($isUnorder ? round($_o->brokeragePrice / 100 * $rate / 100, 2) : $_o->cash) * 100; } else { $cash = $isUnorder ? round($_o->brokeragePrice / 100 * $rate / 100, 2) : $_o->cash; } } else { $jifen = $_o->jifen; $cash = $_o->cash;
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); echo $before_widget; global $post; if (have_posts()) { while (have_posts()) { the_post(); echo '<div class="hd"><h4 class="xt-bd-l"><span><a href="' . get_permalink() . '">' . get_the_title() . '</a> <small>' . get_the_date() . '</small></span></h4></div><div class="bd">'; echo '<div class="row-fluid">'; the_content(); $items = get_post_meta($post->ID, 'xt_items', true); if (!empty($items)) { $itemsHtml = ''; foreach ($items as $item) { if (!empty($item['pic'])) { $_url = xt_jump_url(array('id' => get_the_share_key($item['key']), 'type' => $item['type'], 'share' => $item['guid'])); $itemsHtml .= '<li> <a class="thumbnail" rel="nofollow" target="_blank" href="' . $_url . '" title="' . $item['title'] . '">' . xt_write_pic(base64_encode(xt_pic_url($item['pic'], 160, $item['type'])), $item['title'], 0, 0, '', '', false) . '</a> <div class="caption"> <div class="desc"><a rel="nofollow" target="_blank" href="' . $_url . '" class="permalink">' . $item['title'] . '</a></div> </div> </li>'; } } if (!empty($itemsHtml)) { echo '<div class="span12"><h4>推荐的宝贝</h4><ul class="thumbnails">' . $itemsHtml . '</ul></div>'; } } comments_template('xt-daogou_comments.php', true); echo '</div></div>'; } } echo $after_widget; }
?> </th> <th>交易时间</th> </tr> </thead> <tbody> <?php if ($_total > 0) { $rate = 0; if ($isUnorder) { $rate = xt_get_rate(get_current_user_id()); } foreach ($_orders as $_o) { $_item_title = ''; if ($_o->num_iid > 0) { $_item_title = '<a target="_blank" href="' . xt_jump_url(array('id' => $_o->num_iid)) . '">' . $_o->item_title . '</a>'; } else { $_item_title = $_o->item_title; } $trade_id = $isUnorder ? substr_replace($_o->trade_id, str_repeat('*', strlen($_o->trade_id) - 2), 1, -1) . '<br><a data-id="' . $_o->id . '" data-platform="taobao" href="javascript:;" class="xt-unorder-open">找回</a>' : $_o->trade_id; $cash = $jifen = 0; $isJifenbao = xt_fanxian_is_jifenbao('taobao'); if ($isUnorder) { if ($isJifenbao) { $jifen = ($isUnorder ? round($_o->commission * $rate / 100, 2) : $_o->cash) * 100; } else { $cash = $isUnorder ? round($_o->commission * $rate / 100, 2) : $_o->cash; } } else { $jifen = $_o->jifen; $cash = $_o->cash;
function get_the_share_go($share_id = 0) { if ($share_id == 0) { global $share; $share_id = $share->id; } $_url = xt_jump_url(array('type' => get_the_share_fromtype(), 'id' => get_the_share_key(), 'share' => get_the_share_guid())); return apply_filters('the_share_go', $_url); }
function xt_widget_template_grid_sidesmall_item_bijia($_count, $rate, $item) { $_title = esc_html($item['p_name']); $_pic = $item['pic_url']; parse_str($item['p_o_url'], $params); $_url = isset($params['t']) ? urldecode($params['t']) : $item['p_o_url']; $_topUrl = ''; if (!empty($item['web_name']) && !empty($item['web_id'])) { $_topUrl = xt_jump_url(array('type' => 'mall', 'id' => $item['web_id'], 'title' => $item['web_name'])); } ?> <li class="media"<?php echo $_count == 0 ? ' style="padding-top:0px;"' : ''; ?> > <a rel="nofollow" class="pull-left" href="<?php echo $_url; ?> " target="_blank"> <?php xt_write_pic(base64_encode($_pic), $_title, 0, 0, 'media-object'); ?> </a> <div class="media-body"> <h4 class="media-heading"><a rel="nofollow" class="text-gray" href="<?php echo $_url; ?> " target="_blank"><?php echo $_title; ?> </a></h4> <div class="media"> <p><span>¥</span><strong><?php echo $item['cur_price']; ?> </strong></p> <p><span>来自:</span><a rel="nofollow" href="<?php echo $_topUrl; ?> " target="_blank"><?php echo $item['web_name']; ?> </a></p> </div> </div> </li> <?php }
TOP.api({ method:'taobao.taobaoke.widget.url.convert', url:'<?php echo $_url; ?> ', outer_code:'<?php echo xt_outercode(); ?> ' },function(resp){ try{ if(resp.taobaoke_item){ url = resp.taobaoke_item.click_url; redirect_to = '<?php echo xt_jump_url(array('type' => 'url', 'url' => '_URL_')); ?> '; redirect_to = encodeURIComponent(redirect_to.replace(encode64('_URL_'), encode64(url))); } }catch(e){ } <?php if ($IS_URL_LOGIN_SHOW) { ?> var params={ page:'jump', url:encode64(url), type:'<?php echo $_type; ?>