to_time() 帝国CMS日期时间转UNIX时间戳函数

02 5 条评论

to_time()

函数:to_time()
功能:将日期 / 日期时间 类型转为unix时间戳的函数
位置:帝国CMS e/class/connect.php
版本:6.5

to_time($datetime)

$datetime : 日期类型格式如:2012-12-12 日期时间如:2012-12-12 12:12:12
函数返回unix时间戳

EcmsToSendMail() 帝国CMS发送邮件函数

02

EcmsToSendMail()

函数:EcmsToSendMail()
功能:帝国CMS邮件发送函数
位置:帝国CMS SendEmail.inc.php
版本:6.5

EcmsToSendMail($email,$subject,$content);

$emai : 邮件地址可为数组
$subject : 邮件标题
$content : 邮件内容

说明

函数遵循后台配置,后台配置使用什么方法发送邮件,函数将会使用什么方法发送邮件;
1.mail函数这个方法必须配置服务器邮件环境,环境不受待见得话会出来就是个垃圾邮件~
2.smtp这个方法不用配置服务器,使用163等邮箱smtp即可 就是老屏蔽

帝国CMS定义函数使用率 前100位

28

帝国CMS6.5 系统定义函数使用次数排列文档,做功能拓展和二次开发的童鞋前100肯定是必看的
排第一的果不其然就是printerror()这个信息提示函数 使用了1904次,sql类里的方法基本都靠前特别是query()1440次 , fetch() 720次 , fetch1 539 次; 所有函数排列点击《帝国CMS函数列表》

备注:不包括JS函数 系统标签函数

ID 函数 使用次数 定义位置
1 printerror() 1904 /e/class/connect.php line 132
2 query() 1440 /e/class/db_sql.php line 10
3 fetch1() 720 /e/class/db_sql.php line 30
4 fetch() 539 /e/class/db_sql.php line 22
5 checklevel() 513 /e/class/functions.php line 3414
6 insert_dolog() 370 /e/class/functions.php line 3625
7 db_connect() 366 /e/class/connect.php line 66
8 db_close() 363 /e/class/connect.php line 110
9 is_login() 267 /e/class/functions.php line 3466
10 reppostvar() 222 /e/class/connect.php line 334
11 gettotal() 193 /e/class/db_sql.php line 52
12 gotourl() 148 /e/admin/map.php line 25
13 getcvar() 138 /e/class/connect.php line 125
14 loadlang() 128 /e/class/connect.php line 294
15 doreqvalue() 113 /e/class/qinfofun.php line 72
16 getdotemptb() 112 /e/class/connect.php line 266
17 esetcookie() 87 /e/class/connect.php line 118
18 lastid() 86 /e/class/db_sql.php line 70
19 islogin() 72 /e/class/user.php line 775
20 close() 70 /e/class/class.smtp.php line 193
21 reppoststr() 70 /e/class/connect.php line 381
22 page2() 66 /e/class/functions.php line 58
23 spopenchfile() 57 /e/admin/EditCjNews.php line 102
24 gettemptb() 57 /e/class/connect.php line 248
25 returnclass() 55 /e/class/connect.php line 1624
26 repphpaspjspcode() 50 /e/class/q_functions.php line 47
27 sys_returnbqtitlelink() 49 /e/class/connect.php line 797
28 getconfig() 47 /e/class/functions.php line 4745
29 to_time() 46 /e/class/connect.php line 587
30 doutfandgbk() 41 /e/class/user.php line 50
31 checkfilemod() 36 /e/admin/PathLevel.php line 37
32 writefiletext_n() 36 /e/class/connect.php line 671
33 sub() 34 /e/class/connect.php line 442
34 delfiletext() 34 /e/class/connect.php line 632
35 over() 32 /e/admin/adminstyle/2/AdminMain.php line 61
36 checkall() 32 /e/admin/tags/ListTags.php line 430
37 out() 32 /e/admin/adminstyle/2/AdminMain.php line 73
38 sys_returnbqclassname() 32 /e/class/connect.php line 890
39 readfiletext() 31 /e/class/connect.php line 637
40 getnewsjs() 30 /e/class/functions.php line 2634
41 delfj() 30 /e/data/html/q2.php line 16
42 addfj() 30 /e/data/html/q2.php line 7
43 forecolor() 29 /e/admin/sp/AddSpInfo.php line 80
44 egetip() 29 /e/class/connect.php line 300
45 jumptomain() 29 /e/admin/adminstyle/2/AdminMain.php line 97
46 reppostvar2() 29 /e/class/connect.php line 358
47 getfiletype() 28 /e/class/connect.php line 411
48 addrepad() 28 /e/admin/AddInfoClass.php line 181
49 lmescape_str() 28 /e/class/moddofun.php line 2264
50 replaceloadtgtemp() 28 /e/class/tempfun.php line 906
51 writefiletext() 27 /e/class/connect.php line 658
52 clearaddsdata() 26 /e/class/connect.php line 2046
53 stripaddsdata() 25 /e/class/connect.php line 2064
54 getclass() 23 /e/class/functions.php line 5174
55 repinfozz() 23 /e/class/functions.php line 1103
56 page1() 23 /e/class/connect.php line 539
57 listhtml() 22 /e/class/functions.php line 1618
58 wipespecial() 22 /e/class/ftp.php line 8
59 replacefc() 22 /e/class/cjfun.php line 582
60 checktempgroup() 22 /e/class/functions.php line 373
61 gettxtfieldtext() 22 /e/class/connect.php line 2072
62 showclass_addclass() 21 /e/class/functions.php line 997
63 ecms_showeditorvar() 21 /e/admin/ecmseditor/infoeditor/fckeditor.php line 8
64 get_lines() 21 /e/class/class.smtp.php line 962
65 returnformhidden() 20 /e/class/functions.php line 388
66 repsperssstr() 20 /e/web/index.php line 44
67 getinfostr() 19 /e/class/cjfun.php line 589
68 gethtml() 19 /e/class/functions.php line 1992
69 error_handler() 18 /e/class/SendEmail.inc.php line 1396
70 make_password() 18 /e/class/connect.php line 503
71 newsbq() 17 /e/class/functions.php line 1403
72 returnresult() 17 /e/install/data/fun.php line 32
73 returnyhsql() 17 /e/class/connect.php line 1020
74 echoviewfile() 16 /e/data/ecmseditor/infoeditor/epage/TranMedia.php line 98
75 encodeconfig() 16 /e/admin/ecmseditor/infoeditor/fckeditor_php4.php line 219
76 ecms_qeditorprinterror() 16 /e/class/qinfofun.php line 1208
77 ajax_printerror() 15 /e/class/connect.php line 204
78 connected() 14 /e/class/class.smtp.php line 168
79 dotitlefont() 14 /e/class/connect.php line 683
80 repphpaspjspcodetext() 14 /e/class/functions.php line 203
81 repfieldtextnbsp() 14 /e/class/connect.php line 1890
82 togetfiletype() 14 /e/admin/ecmseditor/infoeditor/epage/TranFlash.php line 79
83 returnfilesavepath() 14 /e/class/connect.php line 1371
84 addcheckviewtempcode() 13 /e/class/functions.php line 47
85 num() 13 /e/class/db_sql.php line 37
86 sys_returnbqtemp() 12 /e/class/t_functions.php line 579
87 returnmfilef() 12 /e/class/functions.php line 3854
88 returnreplacelistf() 12 /e/class/connect.php line 1047
89 installshowmsg() 12 /e/install/data/fun.php line 218
90 dellistenews() 12 /e/class/functions.php line 180
91 replacelistvars() 12 /e/class/connect.php line 1056
92 docheckall() 11 /e/admin/db/AddM.php line 284
93 replacetempvar() 11 /e/class/q_functions.php line 639
94 ecms_editorprinterror() 11 /e/admin/ecmseditor/editorfun.php line 3
95 delnewsfile() 11 /e/class/functions.php line 769
96 getsearch() 11 /e/class/functions.php line 2917
97 domkdir() 11 /e/class/connect.php line 708
98 checksavetranfiletype() 11 /e/class/connect.php line 1895
99 copyecmstb() 11 /e/class/functions.php line 3819
100 returnsqllistf() 11 /e/class/connect.php line 1036

Analysis Information:

Source : EmpireCMS6.5 (201007201830) GBK
Order : references DEST LIMIT 100
DateTime : 2010-08-28 07:13:00

Author : ⌒_⌒TryLife (bbs.phome.net)

Tools : Unnamed PHP Source Analytics Tools by Trylife
Blog : www.trylife.cn

esetcookie() getcvar() -帝国CMS cookie 操作函数

28

esetcookie()

函数:esetcookie()
功能:设置cookie / 函数向客户端发送一个 HTTP cookie 主要带了帝国CMS前后台cookie前缀 path 等用起来方便
位置:帝国CMS e/class/connect.php
版本:6.5

esetcookie($var,$val,$life=0,$ecms=0)

$var : 必填 cookie名
$val : 必填 cookie值
$life : 选填 过期unix时间戳
$ecms : 选填 0 前台 1 后台 默认0

getcvar()

函数:getcvar()
功能:返回cookie / 配合esetcookie()使用 事半功倍
位置:帝国CMS e/class/connect.php
版本:6.5

getcvar($var,$ecms=0)

$var : 必填 cookie名
$ecms : 选填 0 前台 1 后台 默认0

ReplaceSvars() 帝国CMS函数

24

函数:ReplaceSvars()
功能:替换公共标记
位置:帝国CMS e/class/connect.php

修改例子一:增加网站名称标签

1.函数体return $temp;上方加入代码如下

//增加网站名称标签
$temp=str_replace('[!--sitename--]',$public_r['sitename'],$temp);

2.[!--sitename--]标签加入模板测试 可以显示网站名称

讨论:

0.只针对部分模板有用 比如首页模板 ,对列表模板 内容模板 是其他函数作用:

列表:e/class/functions.php Class_ReplaceSvars()
内容:e/class/functions.php nfo_ReplaceSvars()
搜索:e/class/functions.php nfo_ReplaceStemp()

1.例子本身没有什么意义,在模板中我们完全可以使用<?=$public_r[sitename]?>来表示网站名称
2.模板内多处使用网站地址使用[!--news.url--]要比使用<?=$public_r[newsurl]?>效率稍高

  • MySQL ./configure --helphow long does marijuana stay in your system
    How can i get thc out my system fast? If you're clean now and you don't smoke again between now and then, 3 weeks should be more than plenty of time for it to get out of your ...
  • 帝国CMS二次开发 迅雷/快车批量下载插件 (截图)SwopeWeep
    Portuguese, also as pairs of trail shoes for kinds race. I predicted it becoming heat in Brazil (becauseallow for air to circulate involving its consumer and the backpack by itself. This kind of bag technology will help preserve theare seriously PVC-free and supply memory becoming a member of plus new jersey ship regarding the safe. The foot of all thechallenge or take a seat to the sidelines and see we stay pass. A great thought is at present - we do not getIn contrast to a few other hiking footwear appears so basic, eye-catching Ugg boots continually shift their north face jackets winter things to do at bay. Enough purpose for 40 years of out of doorways gear design and style and screeningjackets and ski pants and foot wears designed to supply comfort and security to ski lovers. As ages pass bytrick: a aspect entrance. This additional entrance may make it a lot easier to identify things buried deep inside your bag.exclusive and trendy variations obviously suit present-day tendencies and furthermore meet kind wants. north encounter Jacketsfrom giving heat and defense through the elements, it also provides a enjoyable really feel. Luxurious in
  • make: ./libtool: Command not foundRegistry Cleaners
    Fascinating blog! Is your theme custom made or did you download it from somewhere? A design like yours with a few simple tweeks would really make my blog jump out. Please let me know where you got your theme. Thank you
  • 开发使用并出售愤怒的站长
    :razz: 必须顶一个
  • 新的帝国CMS反馈发送邮箱示例
    邮件内容:联系人:$add['lianxiren'],联系手机:$add['tel'] , 不能读取字段;是什么原因?
  • 2147483647Alternative Healing Methods
    Cure physical and mental problems. Get information about various alternative healing methods.