<?php 


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




if(!defined('IN_SITETEAM')) { exit('Access Denied'); } $settingfile = "data/setting/{$site_url}/product.setting.txt"; $defaultsettingfile = "data/default.product.setting.txt"; $content['body_name'] = array("type"=>"varchar", "length" => "90", "name" => "产品系统内容区名字", "class" => "txt", "description" => ""); $content['body_title'] = array("type"=>"varchar", "length" => "90", "name" => "产品系统内容区小标题", "class" => "txt", "description" => ""); $content['sidebar_name'] = array("type"=>"varchar", "length" => "90", "name" => "边栏名字", "class" => "txt", "description" => ""); $content['top_title'] = array("type"=>"varchar", "length" => "90", "name" => "顶部标题宣传语", "class" => "txt", "description" => ""); $content['top_description'] = array("type"=>"varchar", "length" => "1024", "name" => "顶部标题宣传语简述", "class" => "tarea", "description" => ""); $content['banner_off'] = array("type"=>"varchar", "length" => "2", "name" => "关闭产品系统的BANNER", "class" => "txt", "description" => "关闭请输入“1”，不关闭请输入“4”"); $content['product_banner'] = array("type"=>"images", "length" => "10000", "name" => "产品系统默认横幅广告", "class" => "uploadbtn marginbot", "description" => "请上传宽：927，高：150的广告图片"); $content['product_banner_link'] = array("type"=>"varchar", "length" => "90", "name" => "产品系统默认横幅广告链接地址", "class" => "txt", "description" => "若为空，则不显示BANNER广告"); $seo['seo_title'] = array("type"=>"varchar", "length" => "90", "name" => "SEO标题", "class" => "txt", "description" => ""); $seo['seo_description'] = array("type"=>"varchar", "length" => "90", "name" => "SE0描述", "class" => "txt", "description" => ""); $seo['seo_keywords'] = array("type"=>"varchar", "length" => "90", "name" => "SEO关键词", "class" => "txt", "description" => ""); if (!empty($_POST['dosubmit'])) { $savedata = $_POST['data']; if (!empty($_FILES['product_banner']['name'])) { $fileinfo = pathinfo($_FILES['product_banner']['name']); if (!in_array(@strtolower($fileinfo['extension']), $upload_file_type)) { go_url("admin.php?action=product&operation=setting", "文件格式是不允许上传的！"); } $filename = "{$user_upload_dir}/product_banner.{$fileinfo['extension']}"; if (file_exists($filename)) unlink($filename); if (file_exists($savedata['product_banner']) && preg_match("/^attachments/i", $savedata['product_banner'])) unlink($savedata['product_banner']); if (move_uploaded_file($_FILES['product_banner']['tmp_name'],$filename)) { img_resize($filename, 927, 150); $savedata['product_banner'] = str_replace(SITE_ROOT . '/', '', $filename); } } save_array_file($savedata, $settingfile); cache_update("setting"); go_url("admin.php?action=product&operation=setting"); } else { if (file_exists($settingfile) && filesize($settingfile) > 0) { $form = read_array_file($settingfile); } else { $form = read_array_file($defaultsettingfile); } if (is_array($form) && count($form) > 0) foreach ($form as $k => $v) { if (array_key_exists($k, $content)) $content[$k]['value'] = $v; if (array_key_exists($k, $seo)) $seo[$k]['value'] = $v; } include "admin/tpl/product_setting.tpl.php"; } ?>