Skip to content

Commit 65dec06

Browse files
hong.lihong.li
hong.li
authored and
hong.li
committed
origin push
1 parent 3d3cc37 commit 65dec06

File tree

7,469 files changed

+742584
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

7,469 files changed

+742584
-0
lines changed

a/huiyuanshouce/2014/0707/60.html

+662
Large diffs are not rendered by default.

a/huiyuanshouce/2014/0709/61.html

+626
Large diffs are not rendered by default.

a/huiyuanshouce/2014/0709/62.html

+626
Large diffs are not rendered by default.

a/huiyuanshouce/2014/0709/63.html

+633
Large diffs are not rendered by default.

a/huiyuanshouce/2014/0725/68.html

+668
Large diffs are not rendered by default.

a/huiyuanshouce/2014/0813/69.html

+712
Large diffs are not rendered by default.

a/huiyuanshouce/2014/0815/71.html

+631
Large diffs are not rendered by default.

a/huiyuanshouce/2014/0905/94.html

+655
Large diffs are not rendered by default.

a/huiyuanshouce/index.html

+781
Large diffs are not rendered by default.

a/huiyuanshouce/list_17_1.html

+781
Large diffs are not rendered by default.

about/index.html

+732
Large diffs are not rendered by default.

admin_jh/action_search.php

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
/**
3+
* 检索操作
4+
*
5+
* @version $Id: action_search.php 1 8:26 2010年7月12日Z tianya $
6+
* @package DedeCMS.Administrator
7+
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
8+
* @license http://help.dedecms.com/usersguide/license.html
9+
* @link http://www.dedecms.com
10+
*/
11+
require_once(dirname(__FILE__)."/config.php");
12+
require_once(dirname(__FILE__)."/actionsearch_class.php");
13+
14+
//增加权限检查
15+
if(empty($dopost)) $dopost = "";
16+
17+
$keyword=empty($keyword)? "" : $keyword;
18+
$actsearch = new ActionSearch($keyword);
19+
$asresult = $actsearch->Search();
20+
include DedeInclude('templets/action_search.htm');

admin_jh/actionsearch_class.php

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?php
2+
/**
3+
* @version $Id: actionsearch_class.php 1 8:26 2010年7月12日Z tianya $
4+
* @package DedeCMS.Administrator
5+
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
6+
* @license http://help.dedecms.com/usersguide/license.html
7+
* @link http://www.dedecms.com
8+
*/
9+
class ActionSearch
10+
{
11+
var $keyword;
12+
var $asarray = array();
13+
var $result = array();
14+
15+
//初始化系统
16+
function ActionSearch($keyword){
17+
$this->asarray = $this->GetSearchstr();
18+
$this->keyword = $keyword;
19+
}
20+
21+
function GetSearchstr()
22+
{
23+
require_once(dirname(__FILE__)."/inc/inc_action_info.php");
24+
return is_array($actionSearch)? $actionSearch : array();
25+
}
26+
27+
function search(){
28+
$this->searchkeyword();
29+
return $this->result;
30+
}
31+
32+
/**
33+
* 遍历功能配置项进行关键词匹配
34+
*
35+
* @return void
36+
*/
37+
function searchkeyword(){
38+
$i = 0; //数组序列索引
39+
foreach ($this->asarray as $key=>$value)
40+
{
41+
//对二级项目进行匹配
42+
if(is_array($this->asarray[$key]['soniterm']))
43+
{
44+
foreach ($this->asarray[$key]['soniterm'] as $k=> $val)
45+
{
46+
//进行权限判断
47+
if(TestPurview($val['purview']))
48+
{
49+
//如果有操作权限
50+
if($this->_strpos($val['title'], $this->keyword) !== false || $this->_strpos($val['description'], $this->keyword)!== false)
51+
{
52+
//一级项目匹配
53+
$this->result[$i]['toptitle'] = $this->redColorKeyword($this->asarray[$key]['toptitle']);
54+
$this->result[$i]['title'] = $this->redColorKeyword($this->asarray[$key]['title']);
55+
$this->result[$i]['description'] = $this->redColorKeyword($this->asarray[$key]['description']);
56+
//二级项目匹配
57+
$this->result[$i]['soniterm'][] = $this->redColorKeyword($val);
58+
}
59+
}
60+
}
61+
}
62+
$i++;
63+
}
64+
}
65+
66+
/**
67+
* 加亮关键词
68+
*
69+
* @access public
70+
* @param string $text 关键词
71+
* @return string
72+
*/
73+
function redColorKeyword($text){
74+
if(is_array($text))
75+
{
76+
foreach ($text as $key => $value) {
77+
if($key == 'title' || $key == 'description')
78+
{
79+
//仅对title,description进行数组替换
80+
$text[$key] = str_replace($this->keyword,'<font color="red">'.$this->keyword.'</font>',$text[$key]);
81+
}
82+
}
83+
} else {
84+
$text = str_replace($this->keyword,'<font color="red">'.$this->keyword.'</font>',$text);
85+
}
86+
return $text;
87+
}
88+
89+
function _strpos($string,$find)
90+
{
91+
if (function_exists('stripos')) return stripos($string,$find);
92+
return strpos($string,$find);
93+
}
94+
}

admin_jh/ad_add.php

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?php
2+
/**
3+
* 广告添加
4+
*
5+
* @version $Id: ad_add.php 1 8:26 2010年7月12日Z tianya $
6+
* @package DedeCMS.Administrator
7+
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
8+
* @license http://help.dedecms.com/usersguide/license.html
9+
* @link http://www.dedecms.com
10+
*/
11+
12+
require(dirname(__FILE__)."/config.php");
13+
CheckPurview('plus_广告管理');
14+
require_once DEDEINC."/typelink.class.php";
15+
if(empty($dopost)) $dopost = "";
16+
17+
if($dopost=="save")
18+
{
19+
//timeset tagname typeid normbody expbody
20+
$tagname = trim($tagname);
21+
$row = $dsql->GetOne("SELECT typeid FROM #@__myad WHERE typeid='$typeid' AND tagname LIKE '$tagname'");
22+
if(is_array($row))
23+
{
24+
ShowMsg("在相同栏目下已经存在同名的标记!","-1");
25+
exit();
26+
}
27+
$starttime = GetMkTime($starttime);
28+
$endtime = GetMkTime($endtime);
29+
$link = addslashes($normbody['link']);
30+
if($normbody['style']=='code')
31+
{
32+
$normbody = addslashes($normbody['htmlcode']);
33+
}
34+
else if($normbody['style']=='txt')
35+
{
36+
37+
$normbody = "<a href=\"{$link}\" font-size=\"{$normbody['size']}\" color=\"{$normbody['color']}\">{$normbody['title']}</a>";
38+
}
39+
else if($normbody['style']=='img')
40+
{
41+
if(empty($normbody['width']))
42+
{
43+
$width = "";
44+
}
45+
else
46+
{
47+
$width = " width=\"{$normbody['width']}\"";
48+
}
49+
if (empty($normbody['height']))
50+
{
51+
$height = "";
52+
}
53+
else
54+
{
55+
$height = "height=\"{$normbody['height']}\"";
56+
}
57+
$normbody = "<a href=\"{$link}\"><img src=\"{$normbody['url']}\"$width $height border=\"0\" /></a>";
58+
}
59+
else
60+
{
61+
if(empty($normbody['width']))
62+
{
63+
$width = "";
64+
}
65+
else
66+
{
67+
$width = " width=\"{$normbody['width']}\"";
68+
}
69+
if (empty($normbody['height']))
70+
{
71+
$height = "";
72+
}
73+
else
74+
{
75+
$height = "height=\"{$normbody['height']}\"";
76+
}
77+
$normbody = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.Macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"$width $height><param name=\"movie\" value=\"{$link}\"/><param name=\"quality\" value=\"high\"/></object>";
78+
}
79+
$query = "
80+
INSERT INTO #@__myad(clsid,typeid,tagname,adname,timeset,starttime,endtime,normbody,expbody)
81+
VALUES('$clsid','$typeid','$tagname','$adname','$timeset','$starttime','$endtime','$normbody','$expbody');
82+
";
83+
$dsql->ExecuteNoneQuery($query);
84+
ShowMsg("成功增加一个广告!","ad_main.php");
85+
exit();
86+
}
87+
$dsql->Execute('dd','SELECT * FROM `#@__myadtype` ORDER BY id DESC');
88+
$option = '';
89+
while($arr = $dsql->GetArray('dd'))
90+
{
91+
$option .= "<option value='{$arr['id']}'>{$arr['typename']}</option>\n\r";
92+
}
93+
$startDay = time();
94+
$endDay = AddDay($startDay,30);
95+
$startDay = GetDateTimeMk($startDay);
96+
$endDay = GetDateTimeMk($endDay);
97+
include DedeInclude('templets/ad_add.htm');

admin_jh/ad_edit.php

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?php
2+
/**
3+
* 广告编辑
4+
*
5+
* @version $Id: ad_edit.php 1 8:26 2010年7月12日Z tianya $
6+
* @package DedeCMS.Administrator
7+
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
8+
* @license http://help.dedecms.com/usersguide/license.html
9+
* @link http://www.dedecms.com
10+
*/
11+
require(dirname(__FILE__)."/config.php");
12+
CheckPurview('plus_广告管理');
13+
require_once(DEDEINC.'/typelink.class.php');
14+
if(empty($dopost)) $dopost = '';
15+
$aid = preg_replace("#[^0-9]#", '', $aid);
16+
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "ad_main.php" : $_COOKIE['ENV_GOBACK_URL'];
17+
18+
if($dopost=='delete')
19+
{
20+
$dsql->ExecuteNoneQuery("DELETE FROM `#@__myad` WHERE aid='$aid' ");
21+
ShowMsg("成功删除一则广告代码!",$ENV_GOBACK_URL);
22+
exit();
23+
}
24+
else if($dopost=="gettag")
25+
{
26+
require_once(DEDEINC.'/oxwindow.class.php');
27+
$jscode = "<script src='{$cfg_phpurl}/ad_js.php?aid=$aid' language='javascript'></script>";
28+
$showhtml = "<xmp style='color:#333333;background-color:#ffffff'>\r\n\r\n$jscode\r\n\r\n</xmp>";
29+
$showhtml .= "预览:<iframe name='testfrm' frameborder='0' src='ad_edit.php?aid={$aid}&dopost=testjs' id='testfrm' width='100%' height='200'></iframe>";
30+
$row = $dsql->GetOne("SELECT tagname from `#@__myad` WHERE aid='$aid' ");
31+
32+
$showtag = '{'."dede:myad name='{$row['tagname']}'/".'}';
33+
$info = "<b>说明:</b>如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告更改后需要重新生成。<br />
34+
如果不希望重新生成所有页面,则直接调用JS代码即可。
35+
";
36+
$wintitle = "广告管理-获取广告标签";
37+
$wecome_info = "<a href='ad_main.php'><u>广告管理</u></a>::获取JS";
38+
$win = new OxWindow();
39+
$win->Init();
40+
$winform = $win->GetWindow("hand",$info);
41+
$win->AddTitle("织梦CMS标签调用代码:");
42+
$winform = $win->GetWindow("hand",$showtag);
43+
$win->myWinItem = '';
44+
$win->AddTitle("以下为选定广告的JS调用代码:");
45+
$winform = $win->GetWindow("hand",$showhtml);
46+
$win->Display();
47+
exit();
48+
}
49+
else if($dopost=='testjs')
50+
{
51+
echo "<script src='{$cfg_phpurl}/ad_js.php?aid=$aid&nocache=1' language='javascript'></script>";
52+
exit();
53+
}
54+
else if($dopost=='saveedit')
55+
{
56+
$starttime = GetMkTime($starttime);
57+
$endtime = GetMkTime($endtime);
58+
$query = "UPDATE `#@__myad`
59+
SET
60+
clsid='$clsid',
61+
typeid='$typeid',
62+
adname='$adname',
63+
timeset='$timeset',
64+
starttime='$starttime',
65+
endtime='$endtime',
66+
normbody='$normbody',
67+
expbody='$expbody'
68+
WHERE aid='$aid'
69+
";
70+
$dsql->ExecuteNoneQuery($query);
71+
ShowMsg("成功更改一则广告代码!",$ENV_GOBACK_URL);
72+
exit();
73+
}
74+
75+
$row = $dsql->GetOne("SELECT * FROM `#@__myad` WHERE aid='$aid'");
76+
$dsql->Execute('dd','SELECT * FROM `#@__myadtype` ORDER BY id DESC');
77+
$option = '';
78+
while($arr = $dsql->GetArray('dd'))
79+
{
80+
if ($arr['id'] == $row['clsid'])
81+
{
82+
$option .= "<option value='{$arr['id']}' selected='selected'>{$arr['typename']}</option>\n\r";
83+
} else {
84+
$option .= "<option value='{$arr['id']}'>{$arr['typename']}</option>\n\r";
85+
}
86+
}
87+
include DedeInclude('templets/ad_edit.htm');

admin_jh/ad_main.php

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
/**
3+
* 广告管理
4+
*
5+
* @version $Id: ad_main.php 1 8:26 2010年7月12日Z tianya $
6+
* @package DedeCMS.Administrator
7+
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
8+
* @license http://help.dedecms.com/usersguide/license.html
9+
* @link http://www.dedecms.com
10+
*/
11+
require_once(dirname(__FILE__).'/config.php');
12+
require_once(DEDEINC.'/datalistcp.class.php');
13+
require_once(DEDEINC.'/common.func.php');
14+
setcookie('ENV_GOBACK_URL',$dedeNowurl,time()+3600,'/');
15+
16+
$clsid = isset($clsid)? intval($clsid) : 0;
17+
$keyword = isset($keyword)? addslashes($keyword) : '';
18+
19+
$dsql->Execute('dd','SELECT * FROM `#@__myadtype` ORDER BY id DESC');
20+
$option = '';
21+
while($arr = $dsql->GetArray('dd'))
22+
{
23+
if ($arr['id'] == $clsid)
24+
{
25+
$option .= "<option value='{$arr['id']}' selected='selected'>{$arr['typename']}</option>\n\r";
26+
} else {
27+
$option .= "<option value='{$arr['id']}'>{$arr['typename']}</option>\n\r";
28+
}
29+
}
30+
$where_sql = ' 1=1';
31+
if($clsid!=0) $where_sql .= " AND clsid = $clsid";
32+
if($keyword!='') $where_sql .= " AND (ad.adname like '%$keyword%') ";
33+
34+
$sql = "SELECT ad.aid,ad.clsid,ad.tagname,tp.typename as typename,ad.adname,ad.timeset,ad.endtime,ap.typename as clsname
35+
FROM `#@__myad` ad
36+
LEFT JOIN `#@__arctype` tp on tp.id=ad.typeid
37+
LEFT JOIN `#@__myadtype` ap on ap.id=ad.clsid
38+
WHERE $where_sql
39+
ORDER BY ad.aid desc";
40+
$dlist = new DataListCP();
41+
$dlist->SetTemplet(DEDEADMIN."/templets/ad_main.htm");
42+
$dlist->SetSource($sql);
43+
$dlist->display();
44+
45+
function TestType($tname, $type="")
46+
{
47+
if($tname=="")
48+
{
49+
return ($type == 1)? "默认分类" : "所有栏目";
50+
}
51+
else
52+
{
53+
return $tname;
54+
}
55+
}
56+
57+
function TimeSetValue($ts)
58+
{
59+
if($ts==0)
60+
{
61+
return "不限时间";
62+
}
63+
else
64+
{
65+
return "限时标记";
66+
}
67+
}

0 commit comments

Comments
 (0)