コード例 #1
0
ファイル: seo_rank.php プロジェクト: ohjack/mallerp_standard
 public function seo_rank_result()
 {
     $url_search = trim($this->input->post('url_search'));
     $main_url = get_main_domain($url_search);
     $a_rank = get_alexa_ranking($url_search);
     $index_url = get_index_url($url_search);
     $index_pr = get_pr($index_url);
     $page_pr = get_pr($url_search);
     $reach_rate = get_change_percent($url_search);
     $data = array('rank' => $a_rank, 'index_pr' => $index_pr, 'page_pr' => $page_pr, 'index_url' => $main_url, 'page_url' => $url_search, 'rank_url' => $main_url, 'reach_rate' => $reach_rate);
     $this->load->view("seo/seo_rank_search_result", $data);
 }
コード例 #2
0
ファイル: function.php プロジェクト: gitchenze/soloshop
function get_list_field($data, $grid)
{
    // 获取当前字段数据
    foreach ($grid['field'] as $field) {
        $array = explode('|', $field);
        $temp = $data[$array[0]];
        // 函数支持
        if (isset($array[1])) {
            $temp = call_user_func($array[1], $temp);
        }
        $data2[$array[0]] = $temp;
    }
    if (!empty($grid['format'])) {
        $value = preg_replace_callback('/\\[([a-z_]+)\\]/', function ($match) use($data2) {
            return $data2[$match[1]];
        }, $grid['format']);
    } else {
        $value = implode(' ', $data2);
    }
    // 链接支持
    if (!empty($grid['href'])) {
        $links = explode(',', $grid['href']);
        foreach ($links as $link) {
            $array = explode('|', $link);
            $href = $array[0];
            if (preg_match('/^\\[([a-z_]+)\\]$/', $href, $matches)) {
                $val[] = $data2[$matches[1]];
            } else {
                $show = isset($array[1]) ? $array[1] : $value;
                // 替换系统特殊字符串
                $href = str_replace(array('[DELETE]', '[EDIT]', '[SEE]', '[LIST]'), array('del?ids=[id]&model=[model_id]', 'edit?id=[id]&model=[model_id]&cate_id=[category_id]', get_index_url() . '/index.php?s=/home/article/detail/id/[id].html', 'index?pid=[id]&model=[model_id]&cate_id=[category_id]'), $href);
                // 替换数据变量
                $href = preg_replace_callback('/\\[([a-z_]+)\\]/', function ($match) use($data) {
                    return $data[$match[1]];
                }, $href);
                $val[] = '<a href="' . get_nav_url($href) . '" target="' . get_target_attr($href) . '">' . $show . '</a>';
            }
        }
        $value = implode(' ', $val);
    }
    return $value;
}
コード例 #3
0
            ?>
"><a href="<?php 
            echo get_nav_url($menu["url"]);
            ?>
"><?php 
            echo $menu["title"];
            ?>
</a></li><?php 
        }
    }
} else {
    echo "";
}
?>
			<li><a href="<?php 
echo get_index_url();
?>
" target="_blank">网站首页</a></li>
        </ul>
        <!-- /主导航 -->

        <!-- 用户栏 -->
        <div class="user-bar">
            <a href="javascript:;" class="user-entrance"><i class="icon-user"></i></a>
            <ul class="nav-list user-menu hidden">
                <li class="manager">你好,<em title="<?php 
echo session('user_auth.username');
?>
"><?php 
echo session('user_auth.username');
?>
コード例 #4
0
ファイル: index.php プロジェクト: BGCX261/zhuoao-svn-to-git
 //网站配置文件
 $_confing = get_confing($lang);
 $is_template = isset($_confing['web_template']) ? $_confing['web_template'] : '';
 if ($is_template) {
     if (!file_exists(CMS_PATH . 'template/' . $_confing['web_template'])) {
         $err_msg = str_replace('@', $lang_name, $language['msg_info2']);
         die($err_msg);
     }
 } else {
     $err_msg = str_replace('@', $lang_name, $language['msg_info3']);
     die($err_msg);
 }
 $index_focus = "focus";
 //指向首页
 if ($_confing['web_html'] && !$is_html) {
     $html_url = get_index_url($lang) ? 'index.html' : 'index_' . $lang . '.html';
     if (file_exists($html_url)) {
         include $html_url;
         //header("location:index_{$lang}.html");
     } else {
         $err_msg = str_replace('@', $lang_name, $language['msg_info4']);
         die($err_msg);
     }
 } else {
     $tpl->template_dir = TP_PATH . $_confing['web_template'] . '/';
     $tpl->template_lang = $lang;
     if ($_confing['is_cache']) {
         $tpl->template_is_cache = 1;
         //缓存
         $tpl->template_time = $_confing['cache_time'] ? $_confing['cache_time'] : 30;
         //开启缓存但不存在缓存时间使用30秒
コード例 #5
0
}
//模型缓存
if (file_exists(DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php')) {
    include DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php';
}
//当前语言下的栏目
@set_time_limit(0);
if ($action == 'htm') {
    include 'template/admin_htm_index.html';
} elseif ($action == 'index') {
    //生成首页
    //global $lang,$_confing,$_index,$language,$tpl;
    if (!$_confing['web_html'][0]) {
        err('<span style="color:red">请先开启【' . $lang . '】语言的html生成</span>');
    }
    $index_url = get_index_url($lang);
    //设定访问的语言
    ob_start();
    $index_focus = "focus";
    $index_fl = $index_url ? CMS_PATH . 'index.html' : CMS_PATH . 'index_' . $lang . '.html';
    $tpl->display('index');
    creat_html($index_fl);
    $index_fl = $index_url ? CMS_SELF . 'index.html' : CMS_SELF . 'index_' . $lang . '.html';
    err('首页生成完成【<a target="_blank" href="' . $index_fl . '">浏览' . $lang . '语言首页</a>】');
    //栏目生成界面
} elseif ($action == 'cate') {
    global $lang;
    if (file_exists(DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php')) {
        include DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php';
    }
    include 'template/admin_htm_cate.html';
コード例 #6
0
ファイル: common.php プロジェクト: keyu199314/php
 function url($con = 'index', $m = 'index', $paramer = array(), $index = "")
 {
     if ($index != '1') {
         if ($con == 'index' && $m == 'index') {
             $url .= 'index.php';
         } elseif ($con == 'index') {
             $url .= 'index.php?m=' . $m;
         } elseif ($m == 'index') {
             $url .= 'index.php?con=' . $con;
         } else {
             $url .= 'index.php?con=' . $con . '&m=' . $m;
         }
         if ($paramer) {
             $p = '';
             foreach ($paramer as $k => $v) {
                 if (!empty($v)) {
                     $p .= '&' . $k . '=' . $v;
                 }
             }
             if (strpos($url, '?')) {
                 $url .= $p;
             } else {
                 $url .= '?' . substr($p, 1);
             }
         }
         return $url;
     } else {
         global $seo;
         $paramer['con'] = $con;
         $paramer['m'] = $m;
         $url = get_index_url($paramer, $this->config, $seo, "", $index);
         return $url;
     }
 }
コード例 #7
0
ファイル: lib.php プロジェクト: BGCX261/zhuoao-svn-to-git
function nav_bottom()
{
    global $lang, $cat_id, $language, $cate_list;
    $_confing = get_confing($GLOBALS['lang']);
    if (file_exists(DATA_PATH . $lang . '_info.php')) {
        include DATA_PATH . $lang . '_info.php';
    }
    if (file_exists(DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php')) {
        include DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php';
    }
    //当前语言下的栏目
    $rel = array();
    $is_main_lang = get_index_url($lang);
    //是否是进站语言
    $path = CMS_SELF;
    if (!empty($cate_list)) {
        foreach ($cate_list as $k => $v) {
            $cate_nav = empty($v['cate_nav']) ? array('') : explode(',', $v['cate_nav']);
            if (in_array('3', $cate_nav)) {
                if ($v['cate_hide']) {
                    unset($cate_list[$k]);
                    continue;
                }
                $channel_info = get_cate_info($v['cate_channel'], $GLOBALS['channel']);
                //获得内容模型信息
                $list_php = empty($channel_info['list_php']) ? 'show_list.php' : $channel_info['list_php'];
                $rel[$k] = $cate_list[$k];
                $rel[$k]['cate_pic1'] = CMS_SELF . 'upload/' . $v['cate_pic1'];
                $rel[$k]['cate_pic2'] = CMS_SELF . 'upload/' . $v['cate_pic2'];
                $rel[$k]['cate_pic3'] = CMS_SELF . 'upload/' . $v['cate_pic3'];
                $rel[$k]['target'] = intval($v['cate_is_open']) ? 'target="_blank"' : '';
                //新窗口
                if ($v['cate_tpl'] == 2) {
                    $url = $v['cate_url'];
                } else {
                    $url = $v['cate_html'] && $_confing['web_html'][0] ? $path . 'htm/' . $v['cate_fold_name'] : $path . $list_php . '?id=' . $v['id'];
                    if ($v['cate_tpl'] == 3) {
                        $url = $v['cate_html'] && $_confing['web_html'][0] ? $path . 'htm/' . $v['cate_fold_name'] . '/' : $path . $list_php . '?id=' . $v['id'];
                    }
                    //表单
                    if ($v['cate_channel'] == '-9') {
                        $url = $v['cate_html'] && $_confing['web_html'][0] ? $path . 'htm/' . $v['cate_fold_name'] : $path . 'order/order.php?id=' . $v['id'];
                    }
                }
                $rel[$k]['url'] = $url;
            } else {
                unset($cate_list[$k]);
            }
        }
    }
    if ($is_main_lang) {
        $map_arr['url'] = $_confing['web_html'][0] ? $path . 'htm/' . $lang . '_sitemap.html' : $path . 'sitemap/sitemap.php';
    } else {
        $map_arr['url'] = $_confing['web_html'][0] ? $path . 'htm/' . $lang . '_sitemap.html' : $path . 'sitemap/sitemap.php?lang=' . $lang;
    }
    $map_arr['cate_name'] = $language['sitemap'];
    $rel[] = $map_arr;
    //存在留言本放在后面
    $sql = "select book_pos from " . DB_PRE . "book_info where id=1";
    $pos = $GLOBALS['mysql']->get_row($sql);
    $pos_arr = empty($pos) ? array() : explode(',', $pos);
    $is_book = is_array($pos_arr) ? in_array('2', $pos_arr) : '';
    if ($is_book) {
        $book['cate_name'] = $GLOBALS['language']['book'];
        if ($is_main_lang) {
            $book['url'] = CMS_SELF . 'book/book.php';
        } else {
            $book['url'] = CMS_SELF . 'book/book.php?lang=' . $lang;
        }
        $rel[] = $book;
    }
    if (!empty($rel)) {
        $i = 1;
        $num = count($rel);
        foreach ($rel as $k => $v) {
            $rel[$k]['autoindex'] = $i;
            $rel[$k]['first'] = $i == 1 ? 1 : 0;
            $rel[$k]['last'] = $num == $i ? 1 : 0;
            $i = $i + 1;
        }
    }
    return $rel;
}
コード例 #8
0
 function Url($con = 'index', $m = 'index', $paramer = array(), $index = "")
 {
     global $db, $db_config, $config, $seo;
     $paramer['con'] = $con;
     $paramer['m'] = $m;
     $url = get_index_url($paramer, $config, $seo, "", $index);
     return $url;
 }