<?php 


/** 
***************************************************
*欢迎使用免费版SiteTeam企业建站软件！
*这是一个专业为搜索引擎营销而设计的，极稳定、极易维护的建站软件！
*官方客服：help@php.net.cn
*官方下载网址：http://www.SiteTeam.cn 
***************************************************
**/




if(!defined('IN_SITETEAM')) { exit('Access Denied'); } $type = empty($_GET['type']) ? empty($_POST['type']) ? '' : $_POST['type'] : $_GET['type']; $category = empty($_GET['category']) ? empty($_POST['category']) ? '' : $_POST['category'] : $_GET['category']; $key = empty($_GET['key']) ? empty($_POST['key']) ? '' : $_POST['key'] : $_GET['key']; if (!empty($type) && !empty($category) && !empty($key)) { if (!file_exists($user_keywords_internal_data_file) || time() - filemtime($user_keywords_internal_data_file) > 3600) { save_array_to_file(keywords_internal_parse(), $user_keywords_internal_data_file, "words_internal_data"); } include $user_keywords_internal_data_file; if ($type == 'product') { $product_info_file = SITE_ROOT . "/data/setting/{$site_url}/product/{$category}/{$key}.txt"; if (file_exists($product_info_file)) { $product_info = read_array_file($product_info_file); $product_info['content'] = keywords_update_internal_link($product_info['content']); save_array_file($product_info, $product_info_file); } } if ($type == 'article') { $article_info_file = SITE_ROOT . "/data/setting/{$site_url}/article/{$category}/{$key}.txt"; if (file_exists($article_info_file)) { $article_info = read_array_file($article_info_file); $article_info['content'] = keywords_update_internal_link($article_info['content']); save_array_file($article_info, $article_info_file); } } echo '<font color="#FF0000">OK...</font>'; } else { $db = new txtSQL('./data/siteteam'); $db->connect("root", "siteteam"); $article_list = $db->execute("select", array('db' => dbname($site_id), 'select' => array('*'), 'table' => 'sm_article')); $product_list = $db->execute("select", array('db' => dbname($site_id), 'select' => array('*'), 'table' => 'sm_product')); $db->disconnect(); include "admin/tpl/keywords_internal_update.tpl.php"; } ?>