code
stringlengths 1
2.01M
| repo_name
stringlengths 3
62
| path
stringlengths 1
267
| language
stringclasses 231
values | license
stringclasses 13
values | size
int64 1
2.01M
|
|---|---|---|---|---|---|
@charset "utf-8";
.r{float:right}#wraper{background:url(img/bg_wrap.png) no-repeat center 0}a,a:hover{outline:none}#wraper{zoom:1}#wraper:after{clear:both;display:block;content:"";height:0;visibility:hidden}.layout_main{width:690px;float:left}.layout_side{float:right;width:202px}.cell_loading{background:#BFC9D2;height:40px;padding:20px
120px 20px 0;font-size:24px;font-family:"microsoft yahei",黑体;color:#50687D;text-align:center}.cell_my_avatar{width:66px}.cell_my_avatar
.avatar{width:64px;height:64px;overflow:hidden}.cell_my_avatar .avatar
a{display:block;width:64px;height:64px;text-indent:-10000px;overflow:hidden}.cell_my_avatar
.avatar{-moz-border-radius:5px;-khtml-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 1px 0 #ACB3CB;-moz-box-shadow:0 1px 0px #ACB3CB;*border:1px
solid #ccc;border:1px
solid #cccccc\0}.icon_user_big,.icon_user_feed,.icon_user_like,.icon_ilove_red,.icon_ilove_gray,.icon_add,.icon_recom_save,.icon_response{width:16px;height:18px;background:url(img/global.png) no-repeat 0 0;vertical-align:middle;margin-right:5px}.user_info li.cur
.icon_user_big{background-position:-224px -64px}.icon_user_feed{height:17px;background-position:-192px -64px}.user_info li.cur
.icon_user_feed{background-position:-256px -64px}.icon_user_like{background-position:-352px -96px;height:14px}.user_info li.cur
.icon_user_like{background-position:-352px -128px}.icon_add{background-position:-256px top;vertical-align:middle;height:14px;width:12px}.icon_recom_save{background-position:-288px top;vertical-align:middle;width:18px}.icon_response{background-position:-256px -32px;height:14px}.user_info li.cur
.icon_response{background-position:-288px -32px}.icon_ilove_red{background-position:-352px -192px;height:14px;width:17px;vertical-align:middle}.icon_ilove_gray{background-position:-352px -160px;height:14px;width:17px;vertical-align:middle}.icon_short_article,.icon_short_article_cur{width:32px;height:32px;background:url(img/global.png) no-repeat 0 -64px}.icon_short_article_cur, .mod_editor .content .tab li.cur
.icon_short_article{background-position:-64px -64px}.icon_photo,.icon_photo_cur{width:32px;height:32px;background:url(img/global.png) no-repeat 0 -96px}.icon_photo_cur, .mod_editor .content .tab li.cur
.icon_photo{background-position:-64px -96px}.icon_article,.icon_article_cur{width:32px;height:32px;background:url(img/global.png) no-repeat 0 -128px}.icon_article_cur, .mod_editor .content .tab li.cur
.icon_article{background-position:-64px -128px}.icon_video,.icon_video_cur{width:32px;height:32px;background:url(img/global.png) no-repeat 0 -160px}.icon_video_cur, .mod_editor .content .tab li.cur
.icon_video{background-position:-64px -160px}.icon_music,.icon_music_cur{width:32px;height:32px;background:url(img/global.png) no-repeat 0 -192px}.icon_music_cur, .mod_editor .content .tab li.cur
.icon_music{background-position:-64px -192px}.icon_file,.icon_file_cur{width:32px;height:32px;background:url(img/global.png) no-repeat 0 -224px}.icon_file_cur, .mod_editor .content .tab li.cur
.icon_file{background-position:-64px -224px}.icon_user{width:12px;height:15px;_height:12px;background:url(img/global.png) no-repeat 0 -32px}.icon_my{width:12px;height:14px;background:url(img/global.png) no-repeat -32px 0;vertical-align:middle;margin-right:5px}.icon_record{width:12px;height:15px;background:url(img/global.png) no-repeat -64px 0;vertical-align:middle;margin-right:5px}.icon_more_tag{width:12px;height:12px;background:url(img/global.png) no-repeat -32px -32px}.icon_del{width:12px;height:12px;background:url(img/global.png) no-repeat -62px -29px}.icon_horn{width:13px;height:18px;background:url(img/global.png) -32px -64px no-repeat}.icon_suc{width:14px;height:10px;background:url(img/global.png) no-repeat left -256px}.icon_focus{width:36px;height:23px;line-height:23px;padding-left:20px;display:inline-block;background:url(img/global.png) no-repeat -192px top}.cell_fri_list .status
a.icon_focus{color:#333}.icon_b,.icon_list{background:url(img/global.png) no-repeat -64px -352px;width:26px;height:24px;display:inline-block;margin-right:3px}.icon_list{background-position:-96px -352px}.icon_set,.icon_unfold,.icon_fold_big,.icon_unfold_big{background:url(img/global.png) -320px -128px no-repeat;width:14px;height:10px}.icon_unfold{background-position:-160px -256px;vertical-align:middle;height:7px}.icon_close{width:7px;height:7px;background:url(img/global.png) no-repeat -64px -418px}.icon_unfold_big{background-position:-224px -416px;height:12px;width:12px;vertical-align:middle;margin-left:3px}.icon_fold_big{background-position:-96px -416px;height:10px;width:12px;vertical-align:middle;margin-left:3px}.icon_voice,.icon_upload{background:url(img/global.png) -288px -352px no-repeat;width:15px;height:18px;vertical-align:middle}.icon_upload{background-position:-320px -352px;width:10px;height:16px}.icon_loading,.icon_con_loading{background:url(../../img/theme/theme_canon/loading.gif?v=1306834228) no-repeat;width:39px;height:39px;display:inline-block;margin-right:10px;vertical-align:middle}.icon_big_loading{background:url(../../img/theme/theme_canon/imgloading.gif?v=1306834228) no-repeat;width:39px;height:39px;display:inline-block;vertical-align:middle}.icon_con_loading{background:url(../../img/theme/theme_canon/conloading.gif?v=1306834228) no-repeat}.icon_small_loading{background:url(../../img/theme/theme_canon/loadingS.gif?v=1306834228) no-repeat;width:16px;height:16px;vertical-align:middle;margin-right:5px}.icon_contact{width:14px;height:15px;background:url(img/global.png) no-repeat -32px -160px}.icon_erro{width:12px;height:12px;background:url(img/global.png) no-repeat -128px -160px}.cancel_btn,.review_btn,.submit_btn{display:inline-block;width:88px;height:37px;line-height:37px;text-align:center;font-size:16px;margin-left:10px;background:url(img/global.png) left -288px no-repeat;color:#666;vertical-align:middle}a.cancel_btn:hover{color:#333}.review_btn{background-position:-96px -288px;color:#FFF;font-weight:bold}.submit_btn{background-position:-192px -288px;color:#333;font-weight:bold;margin:0
10px;border:none}.btn_a{width:78px;height:30px;display:inline-block;text-align:center;line-height:30px;border:0
none;background:url(img/global.png) no-repeat -96px -64px;font-size:14px;color:#FFF;vertical-align:middle}a.btn_a:hover,.btn_a_hover{background-position:-288px -64px;color:#fff}a.review_btn:hover{background-position:-288px -288px;color:#fff}input.text,textarea.text{background-image:url(../../img/theme/theme_canon/input.png?v=1306834228);background-repeat:no-repeat;border:1px
#bebebe solid;color:#ccc}input.write,textarea.write{color:#111}.cell_page{padding:10px
0 20px;text-align:center}.cell_page
a{margin:0
10px}.cell_page
a.current{color:#708490}.font_g{color:#999}.font_error{color:#f30}body{color:#333}#wraper{margin:0
0 20px}#header{height:77px;background:none;width:900px;margin:0
auto}#header
.code{background:url(img/global.png) -256px -447px no-repeat;padding-left:23px;float:right;margin:25px
10px 0 0;display:block;line-height:1.2}#header .code
a{font-size:14px;text-decoration:underline;color:#666}#main{padding:20px;width:920px;margin:0
auto;background:#e9edf2;-moz-border-radius:5px 5px 0 0;-khtml-border-radius:5px 5px 0 0;-webkit-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}#main:after{clear:both;display:block;content:"";height:0;visibility:hidden}.browsing_tips{width:900px;margin:0
auto;background:url(../../img/theme/theme_canon/tips.png?v=1306834228) center top no-repeat;height:102px;margin-bottom:20px;position:relative;z-index:0;text-align:right}.browsing_tips
.close{background:url(../../img/theme/theme_canon/tips.png?v=1306834228) left -128px no-repeat;width:20px;height:20px;display:block;position:absolute;right:5px;top:18px;overflow:hidden}.browsing_tips .close
span{display:none}.browsing_tips
.tab{padding-right:30px;float:right}.browsing_tips .tab
a{width:90px;height:102px;display:inline-block;margin-left:10px;overflow:hidden}.browsing_tips .tab a
span{display:none}a{color:#a2b1c3}a:hover{color:#708490}.mod_editor{zoom:1;margin-bottom:20px}.mod_editor:after{clear:both;display:block;content:"";height:0;visibility:hidden}.mod_editor
h3{display:none}.mod_editor
.cell_my_avatar{float:left}.mod_editor
.content{float:right;width:820px;display:inline;position:relative;z-index:1;
-moz-border-radius:5px;
-khtml-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
-webkit-box-shadow:0px 1px 2px #64a0de;
-moz-box-shadow:0px 1px 2px #64a0de;
background:#64a0de}
.mod_editor .content
.icon_horn{position:absolute;left:-12px;top:22px;background:url(img/global.png) -32px -192px no-repeat}.mod_editor .content
.tab{zoom:1;height:58px;margin-bottom:5px;background:#64A0DE;-moz-border-radius:5px 5px 0 0;-khtml-border-radius:5px 5px 0 0;-webkit-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.mod_editor .content .tab:after{clear:both;display:block;content:"";height:0;visibility:hidden}.mod_editor .content .tab
li{float:left;width:129px;text-align:center;height:58px;position:relative;background:url(img/line.png) right center no-repeat;z-index:2}.mod_editor .content .tab
li.last{background:none}.mod_editor .content .tab li
.arrow{width:13px;height:8px;position:absolute;left:60px;top:56px;display:none;background:url(img/global.png) -32px -96px no-repeat}.mod_editor .content .tab li.cur
.arrow{display:block}.mod_editor .content .tab
button{border:0
none;height:32px;background:0;font-size:20px;font-family:"microsoft yahei","黑体";margin-top:16px;cursor:pointer;color:#fff}.mod_editor .content .tab button
img{vertical-align:middle;margin-right:8px}
.mod_editor .post{padding:20px;border-top:1px #e3ebf2 solid;min-height:100px;_height:100px;-moz-border-radius:0 0 5px 5px;-khtml-border-radius:0 0 5px 5px;-webkit-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;background:#FFF;position:relative}.mod_editor .post
.text{font-size:14px;padding:5px;width:768px;font-family:"microsoft yahei"}.mod_editor .post
input.text{font-size:20px;height:28px;line-height:28px;padding:2px
5px;font-weight:normal}.post
.action{min-height:37px;_height:37px;clear:both;position:relative;z-index:0;zoom:1}.post .action:after{clear:both;display:block;content:"";height:0;visibility:hidden}.post .action
.link{float:right;font-size:16px;padding-top:10px;position:relative;display:inline-block;width:66px}.post .action .link
.inputFile{width:80px;position:absolute;top:0;left:0;*left:-20px;display:inline-block;background:transparent;cursor:pointer;-moz-opacity:0;filter:alpha(opacity=0);opacity:0;width:65px;height:30px;outline:none;border:none}.post .action
.rechoose{float:left;margin-top:10px;clear:both}.cell_word{}.cell_word
.txt_box{margin-bottom:10px}.cell_word .txt_box
.text{width:723px;height:100px;display:block;overflow:auto;font-size:20px;font-weight:normal}.cell_video{}.cell_video
.input_box{font-size:14px;padding:10px
0 0}.cell_video .input_box
.text{display:block;margin-bottom:5px}.cell_video .input_box
.font_g{font-size:12px}.cell_video
.video_play_box{zoom:1;padding:0
0 10px}.cell_video .video_play_box:after{clear:both;display:block;content:"";height:0;visibility:hidden}.cell_video_play{width:165px;height:124px;float:left;position:relative}.cell_video_play
.play_btn{display:block;width:165px;height:124px;position:absolute;top:0;left:0;background:url(../../img/theme/theme_canon/paly_btn.png?v=1306834228) no-repeat;_background:url(../../img/theme/theme_canon/paly_btn_ie6.png?v=1306834228) no-repeat}.cell_video
.video_text{width:560px;float:left;padding-left:10px}.cell_video .video_text
input.text{width:548px;color:#111}.cell_video .video_text
textarea.text{width:548px;height:70px;overflow:auto;color:#111;display:block;margin-top:10px}.cell_photo{}.upload_box{text-align:center;padding:25px
0;width:500px;margin:0
auto}.upload_btn{width:148px;height:60px;line-height:60px;padding-left:10px;color:#333;font-family:"microsoft yahei";font-size:18px;display:inline-block;background:url(img/global.png) -96px -192px no-repeat;position:relative;overflow:hidden}a.upload_btn:hover{color:#333}.inputFile{width:80px;position:absolute;top:0;left:0;*left:-20px;display:inline-block;background:transparent;cursor:pointer;-moz-opacity:0;filter:alpha(opacity=0);opacity:0;width:166px;height:66px;outline:none;border:none}.upload_tips{padding:10px
0}.upload_tips
.go_snapshot{font-weight:bold;text-decoration:underline}.cell_photo
.issue_box{width:735px;overflow:hidden}.cell_photo .issue_box
.text{display:block}.cell_photo
.action{width:735px}.cell_photo
.photo_list{width:735px;overflow:hidden}.cell_photo .photo_list
ul{width:760px;zoom:1}.cell_photo .photo_list ul:after{clear:both;display:block;content:"";height:0;visibility:hidden}.cell_photo .photo_list
li{overflow:hidden;width:171px;height:201px;float:left;zoom:1;margin:10px
17px 10px 0;cursor:move}.cell_photo .photo_list li
.li_content{position:relative;padding:2px;border:1px
#ccc solid}.cell_photo .photo_list
li.no_img{cursor:default}.cell_photo .photo_list li.no_img
.li_content{padding:1px;border:2px
#d4e5ed dashed;height:27px;overflow:hidden;padding:5px
0}.cell_photo .photo_list li.uploading
.li_contents{padding:2px;border:1px
#ccc solid}.cell_photo .photo_list li.waiting
.li_content{padding:2px;border:1px
#ccc solid}.cell_photo .photo_list li
.img_box{width:165px;height:150px;position:relative;overflow:hidden}.cell_photo .photo_list li.no_img
.img_box{width:165px;height:130px;position:relative;overflow:hidden}.cell_photo .photo_list li .write_box
.text{width:165px;overflow:auto;height:40px;font-size:14px;border:none;padding:0;background:none;border:0;line-height:20px;zoom:1;margin-top:5px}.cell_photo .photo_list li
.img_title_box{text-indent:4px;*padding-top:1px;padding-top:2px\0;width:165px;height:16px;overflow:hidden}.cell_photo .photo_list li
.uploading_progress_box{margin-top:5px;background:url(../../img/theme/theme_canon/loading_progress_bg_p.png?v=1306834228) repeat-x;width:165px}.cell_photo .photo_list li .uploading_progress_box
.percentage{background:url(../../img/theme/theme_canon/loading_progress_bg_span.png?v=1306834228) repeat-x;display:inline-block;color:#fff;font-weight:bold;height:17px;line-height:17px}.cell_photo .photo_list li .uploading_progress_box
.waiting_hint{text-indent:4px;color:#ccc;height:17px;line-height:17px;display:inline-block}.cell_photo .photo_list li
.uploading_error{background:#ffe1e1;margin-top:5px;color:#f00}.cell_photo .photo_list li
.guide_box{text-align:center}.cell_photo .photo_list li .guide_box
img{vertical-align:middle;margin-right:10px}.cell_photo .photo_list li .write_box
.write{border:0}.cell_photo .photo_list li
.btn_close_box{position:absolute;top:2px;right:2px;_top:3px}.cell_photo .photo_list li .btn_close_box
a{display:inline-block;width:17px;height:17px;-moz-opacity:0.6;opacity:.60;filter:alpha(opacity=60);background-color:#949494}.cell_photo .photo_list li .btn_close_box a:hover{-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80)}.cell_photo .photo_list li .btn_close_box a
img{position:absolute;top:5px;right:5px}.cell_photo
.action{*padding-top:10px}.cell_photo .snapshot_box
.flash_container{margin:10px
-10px}li.move{-moz-opacity:0.5;opacity:.50;filter:alpha(opacity=50);cursor:move;list-style:none;margin:0;width:165px;height:180px}li.move
.li_content{border:1px
#ccc dashed;padding:2px}li.move
input.text{background:none;border:none;width:165px;height:14px}.loading_box{padding:70px
0;text-align:center;width:500px;margin:0
auto}.mod_feeds
h3.title{display:none}.mod_feeds
.feed_group{zoom:1;padding-top:10px}.mod_feeds .feed_group:after{clear:both;display:block;content:"";height:0;visibility:hidden}.mod_feeds .feed_group
.cell_my_avatar{float:left}.mod_feeds .feed_group
.content{width:590px;float:right}.mod_feeds
.feed{position:relative;margin-bottom:10px;background:#fff;-moz-border-radius:5px;-khtml-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-webkit-box-shadow:0px 1px 2px #BDC3D4;-moz-box-shadow:0px 1px 2px #BDC3D4}.mod_feeds .feed
.icon_horn{position:absolute;left:-12px;top:22px}.mod_feeds .feed
b{font-weight:normal}.mod_feeds
.hide_face{padding-top:0}.mod_feeds .hide_face .cell_my_avatar,
.mod_feeds .hide_face
.icon_horn{visibility:hidden}.mod_feeds .hide_face .cell_user_info
a{display:none}.mod_feeds .hide_face .cell_user_info
.icon_phone{visibility:hidden}.mod_feeds .empty, .mod_focus
.empty{color:#958d66;font-family:"microsoft yahei";font-size:16px;margin:0
0 0 86px;text-align:center;padding:10px;background:#fffbd2;border:1px
#e1ddb9 solid;-moz-border-radius:5px;-khtml-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.feed{word-wrap:break-word;zoom:1}.feed
.txt{font-size:20px;line-height:1.3;padding:15px 15px;font-family:"microsoft yahei";font-weight:normal}.feed
.reply{padding:10px
0;position:relative;background:#f7f8f8;border-top:1px solid #F1F1F1;-moz-border-radius:0 0 5px 5px;-khtml-border-radius:0 0 5px 5px;-webkit-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;margin-top:5px}.feed .reply
.arrow{display:block;width:13px;height:6px;position:absolute;top:-6px;right:96px;background:url(img/global.png) -32px -128px no-repeat}.feed .reply
.editor{padding:0
15px;zoom:1}.feed .reply .editor
p{color:#999;clear:both;padding-top:5px;padding-bottom:5px}.feed .reply .editor:after{clear:both;display:block;content:"";height:0;visibility:hidden}.feed .reply .editor
.text{width:430px;margin-right:10px;_margin-right:5px;height:18px;padding:5px
3px 5px 7px;vertical-align:middle;float:left;_float:none;overflow:auto}.feed .reply .editor
.btn_a{float:left;_float:none}.feed .reply .reply_list
li{zoom:1;padding:8px
15px;line-height:1.5;border-bottom:1px solid #f1f1f1}.feed .reply .reply_list li:after{clear:both;display:block;content:"";height:0;visibility:hidden}.feed .reply .reply_list li
.info{margin:0
60px 0 25px;*margin-top:5px;margin-top:3px\9;word-break:break-all;word-wrap:break-word}.feed .reply .reply_list li
a.reply_link{background:url(img/global.png) -192px -477px no-repeat;padding-left:12px;float:right;visibility:hidden;margin-right:5px}.feed .reply .reply_list
li.last{border:none}.feed .reply .reply_list li .avatar
img{width:20px;height:20px;margin-right:5px;display:inline-block}.feed .reply .reply_list li
.avatar{float:left}.feed .reply .reply_list li
.del{float:right;visibility:hidden}.feed .reply .reply_list li.hover .del,.feed .reply .reply_list li.hover
a.reply_link{float:right;visibility:visible}.feed
.more{padding:0
10px}.feed
.music_box{padding:0
15px;zoom:1}.feed .music_box:after{clear:both;display:block;content:"";height:0;visibility:hidden}.feed .music_box .music_play
.layer{left:15px}.feed .music_box
.music_info{margin-left:180px}.feed
.act{height:39px}.feed .act
.play{float:left}.feed .motion
a{margin:0
3px;vertical-align:middle;display:inline-block}.feed .act .motion
a{margin:0
5px}.feed .act .motion
a.share{margin:9px
5px 0}.feed .music_box .music_info
.name{color:#999;font-size:12px}.feed .music_box .music_info
.info{font-size:14px;line-height:1.5;font-family:"microsoft yahei";font-weight:normal}.feed .music_box .music_info
h2.title{padding:0
0 10px}.feed .music_box_full .music_pic
img{max-width:528px}.feed .music_box_full
.music_info{padding:10px
0 0;margin:0}.feed .music_box_full
h2.title{padding:0
0 10px}.feed
h2.title{font-size:20px;font-family:"microsoft yahei";padding:0
15px 5px;font-weight:normal}.feed
.feed_cont_group{padding:0
15px;line-height:1.5}.feed .feed_cont_group
ul{zoom:1;*padding-bottom:5px;padding-bottom:5px\9}.feed .feed_cont_group ul:after{clear:both;display:block;content:"";height:0;visibility:hidden}.feed .feed_cont_group
li{background:#F0F3F8;width:165px;height:165px;overflow:hidden;float:left;margin:0
10px 10px 0;text-align:center;display:table;*display:inline;*position:relative;zoom:1}.feed .feed_cont_group li
p{display:table-cell;*position:absolute;*top:50%;*left:50%;vertical-align:middle}.feed .feed_cont_group li p
img{*position:relative;*top:-50%;*left:-50%;vertical-align:middle}.feed .feed_cont_group
img{max-width:528px}.feed .feed_cont_group
.icon_unfold{*margin-top:3px;margin-top:3px\9}.feed
.more_links{text-align:right;padding:10px}.feed
.feed_group_big{padding:0
15px;line-height:1.5}.feed .feed_group_big
img{max-width:530px}.feed .feed_group_big
.info{padding:10px
0;font-size:14px;font-family:"microsoft yahei";font-weight:normal}.feed
.repost_from{font-size:12px;font-weight:normal;color:#A2B1C3}.feed
.repost_reason{font-size:20px;line-height:1.3;padding:5px
15px 10px;font-family:"microsoft yahei";font-weight:normal}.feed
.repost_info{padding:5px
0 0}.feed .repost_info
.del{color:#999;padding:10px
0;font-size:14px}.feed .feed_photo_small,.feed
.feed_photo_big{padding:10px
15px;line-height:1.5;font-size:14px}.feed
.feed_photo_small{zoom:1}.feed .feed_photo_small:after{clear:both;display:block;content:"";height:0;visibility:hidden}.feed .feed_photo_small
img{float:left;margin-right:10px;max-width:518px}.feed .feed_photo_small
.info{font-size:14px;font-family:"microsoft yahei";font-weight:normal}.feed .feed_photo_big
img{max-width:528px;margin-bottom:5px}.feed .feed_photo_big
.info{font-size:14px;font-family:"microsoft yahei";font-weight:normal}.feed
.video_box{zoom:1;padding:0
15px;clear:both;position:relative}.feed .video_box:after{clear:both;display:block;content:"";height:0;visibility:hidden}.feed
.cell_video_play{float:left;margin-right:10px}.feed .video_box
.info{font-size:14px;line-height:1.5;font-family:"microsoft yahei";font-weight:normal}.feed
.video_full{padding:0
15px}.feed .video_full
.video_intro{zoom:1;line-height:1.5}.feed .video_full .video_intro:after{clear:both;display:block;content:"";height:0;visibility:hidden}.feed .video_full .video_intro
.video_url{float:left}.feed .video_full .video_intro
.small{}.feed .video_full
.info{word-wrap:break-word;font-size:14px;line-height:1.5;font-family:"microsoft yahei";font-weight:normal}.feed
.file_box{padding:0
15px;zoom:1;_height:155px}.feed .file_box:after{clear:both;display:block;content:"";height:0;visibility:hidden}.feed .file_box
.file_album{background:url(../../img/theme/theme_canon/blum.png?v=1306834228) -192px top no-repeat;width:77px;height:114px;float:left;padding:20px
10px 20px 30px;;color:#424d5e;line-height:1.2;font-size:14px;margin-right:15px}.cell_feed_response .post_list
.title{zoom:1}.cell_feed_response .post_list .title:after{clear:both;display:block;content:"";height:0;visibility:hidden}.cell_feed_response .post_list .title
img{width:20px;height:20px;vertical-align:middle}.cell_feed_response
.reply_text{text-align:right;margin-top:-17px}.cell_feed_response
a.reply_link{background:url(img/global.png) -192px -477px no-repeat;padding-left:12px;margin:0;border:none;color:#B6BEC9;visibility:hidden}.cell_feed_response a.reply_link:hover{color:#747a81}.cell_feed_response .post_list li.hover
a.reply_link{visibility:visible}.cell_feed_response .reply
.arrow{right:20px}.feed_msg
.cell_feed_response{margin:0}.mod_feeds
.cell_feed_msg{background:#f3f9ff;-webkit-box-shadow:0px 1px 2px #dadfe8;-moz-box-shadow:0px 1px 2px #dadfe8;margin-bottom:10px;zoom:1;color:#a3a9b2;line-height:1.5}.cell_feed_msg
h2.title{display:block;padding:10px
15px 5px;font-size:12px;font-family:"宋体";height:21px;line-height:21px}.cell_feed_msg h2.title
a.know_btn{background:url(img/global.png) -96px -256px no-repeat;display:block;height:21px;line-height:21px;color:#fff;width:60px;text-align:center;float:right}.cell_feed_msg h2.title a.know_btn:hover{color:#fff;background-position:-192px -256px}.cell_feed_msg
.msg_list{border-top:1px #dee8f0 solid;padding:0
15px}.cell_feed_msg .msg_list
li{border-bottom:1px #e0e9f2 dashed;padding:8px
0}.cell_feed_msg .msg_list
li.last{border:none}.cell_feed_msg .msg_list
a{color:#a3a9b2;margin:0
5px;border-bottom:1px #a3a9b2 solid}.cell_feed_msg .msg_list a:hover{color:#747a81}.cell_feed_msg .msg_list
a.user_name{margin:0
5px 0 0}.cell_feed_msg
.more{padding:15px;min-height:21px;_height:21px}.cell_feed_msg .more
a{color:#a3a9b2}.cell_feed_msg .more a:hover{color:#747a81}.cell_feed_msg
.icon_unfold{margin-left:5px}.cell_feed_photos{}.cell_feed_photo_group{}.cell_feed_videos{line-height:1.5}.cell_feed_music{}.cell_feed_file{}.cell_feed_article{}.cell_feed_repost
.txt{padding:0}.cell_feed_repost .article_box .info
.first_img{max-width:513px}.cell_feed_repost .article_box_big .info,
.cell_feed_repost .article_box .info,
.cell_feed_repost .file_box .file_info
.info{margin:0}.post_tag{text-align:right;padding:10px
15px;zoom:1}.post_tag
a{zoom:1;margin-left:15px}.post_tag a:hover
.icon_ilove_gray{background-position:-352px -224px}.post_tag
.tag{color:#A2B1C3;margin-left:15px}.post_tag
.tags{float:left;color:#A2B1C3;width:300px;text-align:left;height:16px;overflow:hidden;white-space:normal}.post_tag .tags
a{margin:0
5px 0 0;white-space:nowrap}.cell_user_info{padding:10px
15px 5px}.mod_side_nav{}.mod_side_nav
a{color:#384d67}.mod_side_nav a:hover{color:#6785ab}.mod_side_nav .user_info
li{width:194px;padding-left:8px;height:35px;font-size:14px;display:block;position:relative;background-color:#E9EDF2}.mod_side_nav .user_info li
.num{padding:0
5px}.mod_side_nav .user_info li
.fans_num{padding:0
5px 0 0}.mod_side_nav .user_info li
a{display:block;zoom:1;height:33px;line-height:33px;padding-left:5px;_padding-top:9px;_height:26px;_line-height:28px}.mod_side_nav .user_info li
a.icon_set{padding:0;margin:0;height:14px;_line-height:14px;position:absolute;right:10px;top:10px;overflow:hidden;text-indent:-9999px;display:block}.mod_side_nav .user_info li .num_tips,.mod_side_nav .user_info li .num_tips
span{background:url(img/global.png) right -544px no-repeat;height:22px;display:inline-block;padding:0
5px 0 0;font-size:12px}.mod_side_nav .user_info li
.num_tips{position:absolute;left:100px;top:0}.mod_side_nav .user_info li .num_tips
span{background-position:left -544px;padding:0
0 5px 5px;height:17px;line-height:17px;color:#fff;font-weight:bold}.mod_side_nav .user_info
li.cur{background:url(img/global.png) -96px -96px no-repeat;color:#fff}.mod_side_nav .user_info li.cur
a{color:#fff}.mod_side_nav .user_info li.cur
a.icon_set{background-position:-320px -96px}.mod_side_nav
.user_info_title{font-size:14px;margin:0
0 0 10px;font-weight:bold;border-top:1px #c6d1de solid;word-wrap:break-word}.mod_side_nav .user_info_title
a{display:block;border-top:1px #fff solid;padding:15px
5px 10px;text-shadow:0 1px 0 #ccc}.mod_side_nav
.feed_area{margin:0
0 0 8px;padding-bottom:10px}.mod_side_nav .feed_area
li{word-wrap:break-word;margin:0
0 7px 7px;font-size:14px}.mod_side_nav .feed_area li
.num{padding-right:5px}.mod_side_nav .feed_area
li.cur{font-weight:bold}.mod_side_nav
.email_area{color:#384d67;margin:0
0 15px 8px;border-top:1px #c6d1de solid;font-size:14px}.mod_side_nav .email_area
h3{padding:15px
0 10px;border-top:1px #fff solid;padding-left:7px}.mod_side_nav .email_area
a{margin-left:7px;line-height:1}.mod_side_nav .email_area
img{vertical-align:middle;margin-right:5px}.mod_side_nav
.recom_area{color:#384d67;margin:0
0 15px 8px;border-top:1px #c6d1de solid;font-size:14px}.mod_side_nav .recom_area
h3{padding:15px
0 10px;border-top:1px #fff solid;padding-left:7px}.mod_side_nav .recom_area h3
.r{float:right}.mod_side_nav .recom_area
.content{background:#cdd4dd;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:5px;margin:0
0 5px 4px;zoom:1;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.4);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.4)}.mod_side_nav .recom_area
.from_info{margin-left:7px;font-size:12px;height:16px;overflow:hidden;word-wrap:break-word;word-break:break-all}.mod_side_nav .recom_area
.recom_post{width:180px;overflow:hidden}.mod_side_nav .recom_area
.video_post{width:180px;height:180px;position:relative}.mod_side_nav .recom_area
.mod_side_nav
.banner_area{color:#384d67;margin:0
0 15px 8px;border-top:1px #c6d1de solid;font-size:14px}.mod_side_nav .banner_area
h3{padding:15px
0 10px;border-top:1px #fff solid;padding-left:7px}.mod_side_nav .banner_area
.content{background:#cdd4dd;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:5px;margin:0
0 5px 4px;zoom:1;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.4);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.4);width:180px;height:40px;overflow:hidden}
.pic_url{font-size:14px;padding:5px;width:568px;font-family:"Arial,Helvetica,sans-serif";font-weight: normal;}
|
108wo
|
statics/plugin/loveit/loveit_home.css
|
CSS
|
asf20
| 28,682
|
body,html{background: #fff url(../images/member/hd_bg.png) repeat-x;}
body{color:#333}a{text-decoration:none; color:#333}
a:hover{text-decoration:underline;}
body fieldset{border:1px solid #D8D8D8; padding:10px;}
body fieldset legend{padding:3px 8px;font-weight:700;border:1px solid #D8D8D8;background-color: #F9F9F9;}
body fieldset.blue{border:1px solid #dce3ed}
body fieldset.blue legend{padding:3px 8px;font-weight:700;color:#347add; background:none; border:none}
.picBut {background:url("../images/admin_img/picBnt.png") no-repeat 0 -28px;color:#FFF;float:left; text-align:center;font-weight:700;height:28px;line-height:26px;*line-height:30px;margin-right:10px;width:75px}
.picBut a{color:#fff;text-decoration: none}
.search{ border:1px solid #d7e3ea; padding:8px 10px; margin-bottom:10px; background:#f6fafd; zoom:1}
#header{ position:relative;}
#header,
#memberArea,
#footer{ width:940px; margin:auto}
#header{ margin-bottom:10px}
#memberArea:after{content:".";display:block;height:0;clear:both;visibility:hidden;}#memberArea{display:inline-block;}/* Hides from IE-mac \*/* html #memberArea{height:1%;}#memberArea{display:block;}
#header .logo{background: url(../images/member/logo.png) no-repeat right center; height:70px; float:left; padding-right:120px}
#header .logo img{ margin-top:5px}
#header .logo h3{ display:none}
#header .link { position: absolute; right:0px; top:10px}
#header .link a{ color:#333;}
#header .link span{ color:#ccc}
.nav-bar,map,.nav-site,a.on,a.on span{background: url(../images/member/member_nav.png) no-repeat; display:block}
.nav-bar{background-position: left -51px; padding-left:5px; position:relative; left:-2px; clear:both}
.nav-bar map{background-position: right -103px; padding-right:5px; display:block;position:relative; right:-4px}
.nav-bar ul{background-position: right -155px;background-repeat: repeat-x; height:33px; padding:10px 0 0 10px;}
.nav-bar ul li{ float:left; margin-right:5px;}
.nav-bar ul li.line{ color:#dfdfdf; padding:0 6px; font-size:14px; margin:4px 0 0}
.nav-bar ul li a{float:left;padding-left:3px; font-size:14px; padding-top:5px;color:#386ea8;font-weight:700;}
.nav-bar ul li a span{height:27px; float:left }
.nav-bar ul li a.on{ background-position: left -0px; padding-top:0}
.nav-bar ul li a.on span{background-position: right -0px;height:27px;padding:5px 10px 0 8px}
.nav-bar ul li a.on{color:#fff; }
.col-1{position:relative; border:1px solid #c4d5df; zoom:1;background: url(../images/member/member_title.png) repeat-x}
.col-1 span.o1,
.col-1 span.o2,
.col-1 span.o3,
.col-1 span.o4{position:absolute;width:3px;height:3px;background: url(../images/fillet.png) no-repeat; overflow:hidden}
.col-1 span.o1{background-position: left -6px; top:-1px; left:-1px}
.col-1 span.o2{background-position: right -6px; top:-1px; right:-1px}
.col-1 span.o3{background-position: left -9px; bottom:-1px; left:-1px}
.col-1 span.o4{background-position: right -9px; bottom:-1px; right:-1px;}
.col-1 h5.title, .col-1 h6.title{color:#386ea8; padding:5px 10px 3px}
.col-1 h6.title{margin-bottom:8px; font-size:14px}
.col-1 div.content{padding:0px 10px 10px}
.left-memu{ width:200px; margin-right:8px; background:none}
.left-memu .title{background: url(../images/member/member_left_menu.png) no-repeat; height:22px; font-size:12px}
.left-memu h5.title{background-position: left -1px; margin-bottom:0}
.left-memu h6.title{margin-bottom:0}
.left-memu ul{ padding:10px 5px}
.left-memu ul li{ line-height:24px; padding:0 6px; height:24px; overflow:hidden}
.left-memu ul li a{ display:block;line-height:24px; overflow:hidden;_float:left;zoom:1;outline:none;}
.left-memu ul li a.add{float:right; overflow:visible}
.left-memu ul li.on{ background:#e0ebf1;_padding-top:3px;_height:21px}
.left-memu ul li:hover{ background:#ecf3f7}
.col-auto .col-right{ width:200px; margin-left:10px}
.point{border:1px solid #ffbf7a; background:#fffced; margin-bottom:10px; position:relative}
.point .content{padding:8px 10px;}
.point .content .title{color:#ff8400}
.point .content p{color:#777; text-indent:20px}
.point a.close span{display:none}
.point a.close{background: url(../images/cross.png) no-repeat left 3px; display:block; width:16px; height:16px;position: absolute; right:4px; top:4px;outline:none;}
.point a.close:hover{background-position: left -46px}
.point span.o1,
.point span.o2,
.point span.o3,
.point span.o4{position:absolute;width:3px;height:3px;background: url(../images/fillet.png) no-repeat; overflow:hidden}
.point span.o1{background-position: left top; top:-1px; left:-1px}
.point span.o2{background-position: right top; top:-1px; right:-1px}
.point span.o3{background-position: left -3px; bottom:-1px; left:-1px}
.point span.o4{background-position: right -3px; bottom:-1px; right:-1px;}
.col-avatar li{margin-bottom:4px; color:#999}
.col-avatar li img{ border:1px solid #ccc}
.member-info{background:none}
.member-info div.content{padding:10px;}
.member-info div.content .col-left{ margin-right:10px}
.member-info div.content .col-left img{ border:1px solid #eee}
.member-info div.content .col-auto h5{ border-bottom:1px solid #eee; margin-bottom:3px; color:#ff6c00; padding-bottom:3px}
.member-info div.content .col-auto{_height:74px; overflow:hidden}
.title-list{}
.title-list li{ position: relative; font-family:"宋体"; color:#999; line-height:22px}
.title-list li a{ color:#333}
.title-list li em{ font-size:10px; font-family:Arial, Helvetica, sans-serif; color:#999; padding-left:8px}
.title-list li span{ position:absolute; right:30px}
#footer{color:#666; line-height:24px;text-align:center; padding:12px 0; margin-top:30px; border-top:1px solid #e5e5e5}
#footer a{color:#666;}
/*投稿*/
.addContent{width:1003px; margin:auto; overflow:hidden}
.addContent .col-left{width:798px}
.addContent .col-auto .content h6{ border-bottom:1px solid #cfdce3; padding:8px 0 3px; margin-bottom:7px}
.addContent .col-auto .content .upload-pic{width:180px;height:145px;text-align:center;overflow:hidden;}
.addContent .col-auto .content .upload-pic a{display:table-cell;vertical-align:middle;width:180px;height:145px;text-align:center;*display:block;*font-size:105px}
.addContent .col-auto .content .upload-pic{ background:#eef2f2; border:1px solid #dce6ea; zoom:1; padding:1px;}
.list-dot{ padding-bottom:10px}
.list-dot li{padding:5px 0; border-bottom:1px dotted #c6dde0; font-family:"宋体"; color:#bbb; position:relative}
.list-dot li:hover{ background-color:#d9e5ee}
.list-dot li span{color:#004499}
.list-dot li a.close span{display:none}
.list-dot li a.close{background: url(../images/cross.png) no-repeat left 3px; display:block; width:16px; height:16px;position: absolute; right:5px; bottom:5px;outline:none;}
.list-dot li a.close:hover{background-position: left -46px}
/*财务模块*/
.payment-show{ border:#dae6ed solid 1px; padding:10px; margin-bottom:10px; display:block}
.payment-show-on{background:#f0f5f8}
.payment-show em{ font-size:14px; }
.payment-show-on em{font-weight:700}
.payment-show .payment-desc{ color:#999; display:block; overflow:auto}
.payment-show .payment-desc img{ border:1px solid #E7E7E7}
.pay-btn{background:url(../images/member/pay-btn.png) no-repeat 0 0; color:#fff;height:24px; width:41px; border:0 none;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline;cursor: hand;!important;cursor: pointer}
.member-por{ padding:0 5px 10px; overflow:auto}
.member-por li{padding:8px 0;color:#999;background: url(../images/uline.gif) repeat-x left top; overflow:hidden}
.li-none li{ background-image:none}
.member-por li:hover,.member-por-row li:hover{background-color:#e7f1f3}
.member-por li p{ position:relative; display:block; padding-left:6px}
.member-por li a.add{background: url(../images/member/att.png) no-repeat; width:40px; height:16px; position:absolute; right:0; text-indent:-1000px; overflow:hidden; top:0px}
.member-por li img{ float:left; margin-right:6px; border:1px solid #e6e9ea}
.member-por-row{ padding:0 5px 8px}
.member-por-row li{width:60px;display:inline-block;zoom:1;*display:inline; vertical-align:top}
.member-por-row li div{ width:50px; margin:auto; text-align:center; padding:5px 0}
.member-por-row li div img{margin:0 0 3px;border:1px solid #e6e9ea}
/*分页*/
#pages { padding:14px 0 10px; text-align: right; font-family:宋体 }
#pages a { display:inline-block; width:26px; height:22px; line-height:22px; background:#fff; border:1px solid #e3e3e3; text-align:center; color:#333}
#pages a.a1 { background:url(../images/admin_img/pages.png) no-repeat 0 5px; width:56px; }
#pages a:hover { background:#f1f1f1; color:#000; text-decoration:none; }
#pages span { display:inline-block; width:26px; height:22px; line-height:22px; background:#5a85b2; border:1px solid #5a85b2; color:#fff; text-align:center; }
.page .noPage { display:inline-block; width:56px; height:22px; line-height:22px; background:url(../img/icu/titleBg.png) repeat-x 0 -55px ; border:1px solid #e3e3e3; text-align:center; color:#a4a4a4; }
/*以下黄页增加的样式 tab*/
.tab-but{ border-bottom:1px solid #c4d5df; padding:0 10px; margin:14px 10px 10px}
.tab-but a,.tab-but a span{ color:#1975c8;display:inline-block;zoom:1;*display:inline; height:25px; line-height:100%;background:url(../images/member/tab_bg.png) no-repeat}
.tab-but a{padding-left:14px; margin-right:5px; background-color:#f7fafb; }
.tab-but a span{background-position:right top; padding-right:14px; padding-top:8px; height:17px}
.tab-but a.on{ background-color:#FFF;position:relative;margin-bottom:-1px;*bottom:-1px; height:26px; font-weight:700}
.left-info li a{ background:url(../images/member/left_icon.png) no-repeat left center; padding-left:8px}
.left-info li a.add{ background-image:none; padding:0}
/*模板列表*/
.temp-list{float:left; width:215px; margin-right:14px; padding:5px; margin-bottom:16px}
.temp-list a.img{ display:block; float:left;height: 98px;padding: 1px;width: 98px;border: 1px solid #EAEAEA; margin-right:8px}
.temp-list a.img:hover{ border-style: dashed; border-color:#999}
.temp-list ul{ overflow:hidden;_float:left;zoom:1}
.temp-list ul li{border-bottom: 1px dashed #DDDDDD; height:25px; line-height:25px}
/*附加参数*/
#addition_param { padding-top:16px}
#addition_param h5{border-bottom: 1px solid #E7E7E7;color: #383838; padding-bottom:6px}
.products-para td,.products-para th{ border:1px solid #c3d4e7; line-height:30px}
.products-para th{ background-color:#f6f9fc; font-weight:normal; text-align:right; padding-right:10px; width:100px}
.products-para caption{ border:1px solid #c3d4e7; font-weight:700; border-bottom:none; background:url(../images/yp/xbg.png) left -40px; height:26px; line-height:26px;padding-left:10px; text-align:left}
.products-para thead td,.products-para thead th{ background-color:#F6F9FC}
.products-para thead td{ text-align:center}
.products-para td{ padding-left:6px}
.home{background: url("../images/v9/icon.png") no-repeat left -40px; padding-left:18px;}
|
108wo
|
statics/css/member.css
|
CSS
|
asf20
| 11,096
|
.treeview, .treeview ul {
padding: 0;
margin: 0;
list-style: none;
}
.treeview ul {
background-color: white;
margin-top: 4px;
}
.treeview .hitarea {
background: url(../images/treeview-default.gif) -64px -25px no-repeat;
height: 16px;
width: 16px;
margin-left: -16px;
float: left;
cursor: pointer;
}
.treeview .placeholder {
background: url("../images/admin_img/onLoad.gif") no-repeat scroll 0 0 transparent;
display: block;
height: 16px;
width: 16px;
}
/* fix for IE6 */
* html .hitarea {
display: inline;
float:none;
}
.treeview li {
margin: 0;
padding: 3px 0pt 3px 16px;
}
.treeview a.selected {
background-color: #eee;
}
#treecontrol { padding-left:4px;margin: 1em 15; display: ; }
.treeview .hover { color: red; cursor: pointer; }
.treeview li { background: url(../images/treeview-default-line.gif) 0 0 no-repeat; }
.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; }
.treeview .expandable-hitarea { background-position: -80px -3px; }
.treeview li.last { background-position: 0 -1766px }
.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(../images/treeview-default.gif); }
.treeview li.lastCollapsable { background-position: 0 -111px }
.treeview li.lastExpandable { background-position: -32px -67px }
.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; }
.treeview-red li { background-image: url(../images/treeview-red-line.gif); }
.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(../images/treeview-red.gif); }
.treeview-black li { background-image: url(../images/treeview-black-line.gif); }
.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(../images/treeview-black.gif); }
.treeview-gray li { background-image: url(../images/treeview-gray-line.gif); }
.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(../images/treeview-gray.gif); }
.treeview-famfamfam li { background-image: url(../images/treeview-famfamfam-line.gif); }
.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(../images/treeview-famfamfam.gif); }
.filetree li { padding: 3px 0 2px 16px; }
.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; }
.filetree span.folder { background: url(../images/folder.gif) 0 0 no-repeat; }
.filetree li.expandable span.folder { background: url(../images/folder-closed.gif) 0 0 no-repeat; }
.filetree span.file { background: url(../images/file.gif) 0 0 no-repeat; }
|
108wo
|
statics/css/jquery.treeview.css
|
CSS
|
asf20
| 2,833
|
/* 2010-06-01 */
.ui_title_wrap, .ui_bottom button { font-size:12px 'Microsoft Yahei', Arial; }
.ui_content_wrap { min-width:9em; vertical-align:top}/*设置对话框最小尺寸*/
.ui_overlay div { background:#000; filter:alpha(opacity=40); opacity:0.4; }/*设置遮罩颜色与透明度*/
.ui_loading_tip { width:16px; height:16px; margin:-8px 0 0 -8px; text-indent:-9999em; background:url(../images/msg_img/loading.gif) no-repeat center center; }/*iframe加载的loading动画*/
.ui_dialog_main { background:#FFF; }
.ui_title_wrap { _width:100px; }/*IE6下设置一个最小长度,防止关闭按钮错位*/
.ui_title { width:100%; height:26px; position:absolute; top:0; left:0; _left:auto; }
.ui_title_text { height:26px; line-height:25px; padding:0 60px 0 12px; _padding:0 90px 0 6px; color:#FFF; font-weight:700}
.ui_td_00, .ui_td_02, .ui_td_10, .ui_td_12, .ui_td_20, .ui_td_22, .ui_close { background-image:url(../images/msg_img/chrome_s.png); background-repeat:no-repeat;}
.ui_td_00 { width:5px; height:26px; background-position: -46px -9px; }/*左上*/
.ui_td_02 { width:5px; height:26px; background-position: -53px -9px; }/*右上*/
.ui_td_10 { background-position:-62px 0; background-repeat:repeat-y; }/*左边*/
.ui_td_12 { background-position:-66px 0; background-repeat:repeat-y; }/*右边*/
.ui_td_20 { width:5px; height:5px; background-position: -46px -1px;}/*左下*/
.ui_td_22 { width:5px; height:5px; background-position: -53px -1px;}/*右下*/
.ui_close { top:4px; right:6px; _right:3px; width:18px; height:18px; background-position:0 0; _font-size:0; _line-height:0; text-indent:-9999em; }
.ui_close:hover { background-position:0 -19px; }
.ui_td_01, .ui_td_21 { background-image:url(../images/msg_img/border.png); background-repeat:repeat-x; }
.ui_td_01 { background-position:0 top; }
.ui_td_21 { background: none #FFF; border-bottom:1px solid #1e64c8}
.ui_btns { background-color:#F6F6F6; border-top:solid 1px #DADEE5; }
.ui_btns span, .ui_btns button { background-color:transparent; background-image:url(../images/msg_img/btns.png); background-repeat:no-repeat; }
.ui_btns span { padding:0 0 0 5px; overflow:hidden; background-position:left -42px; }
.ui_btns button { height:21px; line-height:21px; padding:0 10px 0 5px; max-width:200px; border:none 0; background-position:right 0; }
.ui_btns span:hover { background-position:left -63px; }
.ui_btns span:hover button { background-position:right -21px; }
.ui_resize { width:10px; height:10px; }
html:hover .ui_btns button:focus { outline:none 0; }
.ui_move_temp div { background-color:#214FA3; filter:alpha(opacity=40); opacity:0.4; }/*拖动用的替身对话框*/
/*
主题拓展参数[可添加组合在'style'参数中]
可用来支持消息类型图标等
*/
.ui_dialog_icon {display:inline-block; *zoom:1; *display:inline; background-image:url(../images/msg_img/icons.png); background-repeat:no-repeat; }
/*警告消息*/
.alert .ui_dialog_icon { margin-right:10px; width:48px; height:48px; background-position:0 -96px; }
/*询问消息*/
.confirm .ui_dialog_icon { margin-right:10px; width:48px; height:48px; background-position:0 -144px; }
/*错误消息*/
.error .ui_dialog_icon { margin-right:10px; width:48px; height:48px; background-position:0 -48px; }
/*成功消息*/
.succeed .ui_dialog_icon { margin-right:10px; width:48px; height:48px; background-position:0 0; }
.none_icon .ui_dialog_icon{display:none}
.ui_content_m .ui_content{ padding:10px 1px; margin:0; width:100%}
/*去除所有背景*/
.noSkin .ui_border, .noSkin .ui_title_wrap, .noSkin .ui_dialog_icon { display:none; }
.noSkin .ui_bottom_wrap { display:none; *display:block; *height:0; overflow:hidden; }
* html .noSkin .ui_btns { height:0; overflow:hidden; position:absolute; left:-99999em; }
.noSkin .ui_content { margin:0; }
.noSkin .ui_dialog_main { background:transparent;}
/*警告消息*/
.gb_tip_layer,
.gb_tip_layer .gtl_ico_succ,
.gb_tip_layer .gtl_ico_fail,
.gb_tip_layer .gtl_ico_hits,
.gb_tip_layer .gtl_ico_clear,
.gb_tip_layer .gtl_end{float: left;height:54px;line-height:54px;font-weight:bold;font-size:14px;color:#606060;background-image:url("../images/gb_tip_layer.png");_background-image:url("../images/gb_tip_layer_ie6.png");background-repeat:no-repeat;}
.gb_tip_layer{background-position:0 -161px;background-repeat:repeat-x;left:50%;position:absolute;top:40%;padding:0 18px 0 9px; margin-left:-130px}
.gb_tip_layer .gtl_ico_succ{background-position:-6px 0;left:-45px;top:0;width:45px;position:absolute;}
.gb_tip_layer .gtl_end{background-position:0 0;position:absolute;right:-6px;top:0;width:6px;}
.gb_tip_layer .gtl_ico_fail{background-position:-6px -108px;position:absolute;left:-45px;top:0;width:45px;}
.gb_tip_layer .gtl_ico_hits{background-position:-6px -54px;position:absolute;left:-45px;top:0;width:45px;}
.gb_tip_layer .gtl_ico_clear{background-position:-6px 0;left:-5px;width:5px;position:absolute;top:0;}
.gb_tip_layer img{float:left;margin:19px 10px 0 5px ;}
|
108wo
|
statics/css/dialog.css
|
CSS
|
asf20
| 5,015
|
.admin_piao{background-color:#E8F2FE;position:relative;min-height:24px; height:auto !important;height:24px;overflow:visible;
}
.admin_piao_img{cursor: pointer;float:right;}
.admin_piao_edit{ z-index:100;color:#fff;height:24px;line-height:24px;width:60px;text-align:center;font-size:12px;position:absolute;top:0;right:0;text-decoration: none;background:#1162a7}
.admin_piao_edit:hover{background-color:#ff6600}
.admin_block{background-color:#FFFFC2; border:#F3F3B6 solid 1px; cursor: pointer;}
|
108wo
|
statics/css/admin_visualization.css
|
CSS
|
asf20
| 497
|
/* jQuery TreeTable Core 2.0 stylesheet
*
* This file contains styles that are used to display the tree table. Each tree
* table is assigned the +treeTable+ class.
* ========================================================================= */
/* jquery.treeTable.collapsible
* ------------------------------------------------------------------------- */
.treeTable tr td .expander {
background-position: left center;
background-repeat: no-repeat;
cursor: pointer;
padding: 0;
zoom: 1; /* IE7 Hack */
}
.treeTable tr.collapsed td .expander {
background-image: url(../images/admin_img/toggle-expand-dark.png);
}
.treeTable tr.expanded td .expander {
background-image: url(../images/admin_img/toggle-collapse-dark.png);
}
/* jquery.treeTable.sortable
* ------------------------------------------------------------------------- */
.treeTable tr.selected, .treeTable tr.accept {
background-color: #3875d7;
color: #fff;
}
.treeTable tr.collapsed.selected td .expander, .treeTable tr.collapsed.accept td .expander {
background-image: url(../images/admin_img/toggle-expand-light.png);
}
.treeTable tr.expanded.selected td .expander, .treeTable tr.expanded.accept td .expander {
background-image: url(../images/admin_img/toggle-collapse-light.png);
}
.treeTable .ui-draggable-dragging {
color: #000;
z-index: 1;
}
|
108wo
|
statics/css/jquery.treeTable.css
|
CSS
|
asf20
| 1,343
|
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{padding:0px; margin:0px;}
fieldset, img{border:0;}
ol, ul{list-style: none;}
.clr:after{content:" "; display:block; height:0px; clear:both; visibility:hidden;}.clr{display:inline-block;}* html .clr{height:0%;}.clr{display:block;}
.col{display:inline-block;zoom:1;*display:inline;overflow:hidden;vertical-align:middle;}
.wrap{overflow:hidden; *display:inline-block;}.wrap{*display:block;}
.l{ float:left;}.r{ float:right;}
h1{font-size:34px;}h2{font-size:26px;}h3{font-size:18px; }h4{font-size:16px;}h5{font-size:14px;}h6{font-size:12px;}h1,h2,h3{font-family:microsoft yahei,simhei;}
body{background:url(../images/i_body_bg.jpg) repeat-x #006295;}
.body_box{background:url(../images/i_bodyb_bg.jpg) repeat-x 0% 100%; padding-bottom:28px;}
.main_box{width:1000px; margin:0px auto;}
.hd{height:288px; overflow:hidden; background:url(../images/i_hd_bg.jpg) no-repeat; position:relative;}
.ct{ margin:10px 0px; background-color:#117CB9;}
.ct .l{ background:url(../images/i_c_icon.jpg) no-repeat; width:231px; height:200px; margin:20px 40px 20px 20px;}
.ct .ct_box{color:#fff; float:left; width:660px; font-size:12px; line-height:24px;height:auto!important; height:300px; min-height:300px;margin:20px 0;}
.ct .bg_t{background:url(../images/i_c_tbg.gif) no-repeat; height:8px;}
.ct .bg_b{background:url(../images/i_c_bbg.gif) no-repeat 0% 100%; height:8px;}
.btn_box a{background:url(../images/i_t_btn.jpg) no-repeat; display:inline-block;zoom:1;*display:inline;overflow:hidden;vertical-align:middle;}
.btn_box{text-align:center;}
a.is_btn{width:140px; height:65px; background-position:-111px 0px; margin:0px 10px;line-height:40px;color:#FFF; font-size:16px; font-weight:bold; text-decoration:none;}
a.s_btn,a.x_btn{background-position:0px 0px; width:100px; height:65px; line-height:40px; font-size:16px; font-weight:bold; text-decoration:none;color:#FFF;margin:0px 4px;}
a.pre{color:#CCC;}
a.pre:hover{color:#fff;}
.bz{background:url(../images/i_loadin.jpg) no-repeat; width:1000px; height:114px; position:absolute; bottom:1px;}
.bz .jj_bg{ background:url(../images/jj_bg.jpg) no-repeat 100% 0px; width:23px; height:8px; position:absolute;right:0;top:49px;}
.hd .a1{width:140px;}.hd .a2{width:290px;}.hd .a3{width:440px;}.hd .a4{width:554px;}.hd .a5{width:704px;}.hd .a5{width:704px;}.hd .a6{width:818px;}.hd .a7{width:1000px;}
.a7 .jj_bg{display:none;}
|
108wo
|
statics/css/install.css
|
CSS
|
asf20
| 2,503
|
table{border-collapse:collapse;border-spacing:0;}
.wrap{overflow:hidden; *display:inline-block;}.wrap{*display:block;}
.main img{_vertical-align:baseline;}
.align_r{ text-align:right;}
.col3 li, .col4 li{overflow:hidden; float:left;}
ul.col3 li{width:33.3%!important; *width:33.2%!important; }
ul.col4 li{width:25%!important; *width:24.9%!important;}
.brd{border:1px solid #C3D4E7;}
.mg_b10{margin-bottom:10px;}
.mg_t20{ margin-top:20px;}
.h28 li{ height:26px; line-height:26px;text-align:center;}
.boxsbg{ background:url(../images/down_boxbg.jpg) repeat-x;}
.down_txt{ color:#999;}
.l{ float:left;}
.xz_a a{ background:url(../images/bg_member_1.gif) no-repeat -5px -126px; padding-left:16px;}
.icon_1, .icon_2, .icon_3, .icon_4 {
background:url(../images/bg_member_1.gif) no-repeat scroll 0 -371px transparent;color:#077AC7;height:18px;margin-right:6px;padding-left:20px;}
.icon_3 {background-position:8px -128px;}
.icon_4 {background-position:8px -28px;}
.sysnews{ margin:20px;}
.sysnews h5{ background:none; border:none; padding-left:0px;}
.down_list{ border-bottom:1px dashed #CCC; padding-bottom:20px;}
.down_info{width:96%;}
.down_info td,.down_info th{ border:1px solid #DCE7F3; padding:10px; color:#000;}
.down_info caption h5{ font-size:14px; font-weight:bold; margin:20px 0px; background:none; border:none; text-align:left; padding-left:0px;}
@media screen and (-webkit-min-device-pixel-ratio:0) {
.down_info caption h5{height:60px; line-height:60px;}
}
h5.tit{ background:#DEEAF6; color:#FFF; text-align:left; border:none; margin:20px 0px; font-size:12px; color:#1E50A2;}
h4.tits{ background:none; border:none; font-size:16px;}
.down_intro,.down_address,.text_list,.commnent_tag,.commenttext{ margin:10px 20px;}
.divl div{ float:left; margin:0px 10px;}
.xz_btn a{ background:url(../images/bdxz_btn.jpg) no-repeat; width:136px; height:59px; cursor:pointer; display:block;}
.xzs_btn{background:url(../images/bdxz_btn.jpg) no-repeat; width:136px; height:59px;position:absolute;top:50%;left:50%;margin:-100px auto 0px -68px;}
.xz_a{ margin-right:20px; *width:10em; overflow:hidden; width:288px;}
.xz_a li{ height:24px; line-height:24px; width:12em; float:left; overflow:hidden;}
.fs12 a{ font-size:12px;}
.footer p.info{*margin-top:0px;}
.contents{ *width:698px; overflow:hidden;}
.main{overflow:hidden;}
|
108wo
|
statics/css/download.css
|
CSS
|
asf20
| 2,360
|
body{color:#444; height:100%}a{text-decoration:none; color:#444}
html.off,html.off body {background: #e2e9ea url(../images/admin_img/left_bg.png) repeat-y -40px top;}
html.on,html.on body{background: #e2e9ea; background-image:none;}
html.addbg,html.addbg body{background:#e2e9ea}
a:hover{text-decoration:underline;}
.pad-6{padding:6px; overflow:hidden}.pad-10{padding:10px; overflow:hidden}.pad_10,.pad-lr-10{padding:0 10px}.pad-lr-6{padding:0 6px}
.hr{background: url(../images/uline.gif) repeat-x center center;}
.hr hr{display:none}
.border-none,.border-none-td td,{border:none}
.ib, .ib-li li, .ib-a a, .ib-span span,.common-form ul li span.text,.fixed-bottom .fixed-but .button,.arrowhead,.arrowhead-b,#Skin li,.shortcut a,.shortcut a span,.picBut a,.tab-use,.scroll a{display:inline-block;zoom:1;*display:inline;}
.cut_line span{ color:#4d82bc; padding:0 4px}
.mr6{margin-right:6px}.mr8{margin-right:8px}.mr10{margin-right:10px}.mb6{margin-bottom:6px}.mb8{margin-bottom:8px}.mb10{margin-bottom:10px}
.picBut {background:url("../images/admin_img/picBnt.png") no-repeat 0 -28px;color:#FFF;float:left; text-align:center;font-weight:700;height:28px;line-height:26px;*line-height:30px;margin-right:10px;width:75px}
.picBut a{color:#fff;text-decoration: none; width:75px}
.line-x{border-bottom:1px solid #eee;}
.title-1{border-bottom:1px solid #eee; padding-left:5px}
.title-2{text-align:left;height:34px;*height:33px;font:18px/31px "MicroSoft YaHei","SimHei";color:#333;*line-height:33px; margin:0; padding:8px 0 3px 0px}
body fieldset{border:1px solid #D8D8D8; padding:10px;}
body fieldset legend{padding:3px 8px;font-weight:700;border:1px solid #D8D8D8;background-color: #F9F9F9;}
body fieldset.blue{border:1px solid #dce3ed}
body fieldset.blue legend{padding:3px 8px;font-weight:700;color:#347add; background:none; border:none}
.fixed-bottom{height:60px;_margin-top:12px}
.fixed-bottom .fixed-but{position: fixed;_position: relative; bottom:0;height:30px; border-top:1px solid #f1f1f1; padding:10px 0; width:100%;background: #fff url(../images/admin_img/x_bg.png) repeat-x 0 -100px;}
.fixed-bottom .fixed-but .button,.fixed-bottom .fixed-but .button input{
background: url(../images/admin_img/btn-content.png) no-repeat; border:none; height:32px; line-height:32px; vertical-align:middle; margin:0;}
.fixed-bottom .fixed-but .button{padding:0 0 0 10px; margin:0; margin:0 5px}
.fixed-bottom .fixed-but .button input{padding-right:10px; margin:0;background-position: right top; display:block;color:#004092; font-size:14px; font-weight:700; white-space: nowrap;}
.subnav{ padding:10px}.subnav h2{ margin-bottom:6px}
.explain-col{ border:1px solid #ffbe7a;zoom:1; background: #fffced; padding:8px 10px; line-height:20px}
.vote_bar{width:90%; height:13px; border:1px solid #999}
.vote_bar div{background: url(../images/admin_img/x_bg.png) repeat-x left -194px; float: left; position:relative; height:16px;_height:13px}
.vote_bar div span{ display:block; position:absolute; left:0; top:0; width:180px; text-align:center; height:16px; font-size:10px; line-height:12px; vertical-align:middle}
/*头部*/
.crumbs,.tab-web-panel li a:hover,.tab-web-panel li.on a{background: url(../images/admin_img/icon_use.png) no-repeat}
.header {background:#3a6ea5 url(../images/admin_img/h_bg.gif) repeat-x left bottom; height:80px; position:relative}
.header .logo{float:left;width:136px;height:80px;margin-right:10px;_margin-right:7px;background: url(../images/admin_img/logo_1.gif) no-repeat;}
.header .logo a{display:block;height:80px;text-decoration: none;}
.header .rt-col{position:absolute;top:0px; right:0px; width:280px; height:44px; z-index:10}
.header .nav{ display:block; height:34px; position:relative; bottom:-10px}
.header .col-auto{overflow:visible;float:none}
.header .nav li,
.header .nav li a{background: url(../images/admin_img/nav_bg.png) no-repeat;display:block;_float:left;height:34px; line-height:38px; font-size:14px; font-weight:700}
.header .nav li{float:left;padding:0 0 0 8px}
.header .nav li a{background-position: right top; padding:0 15px 0 7px}
.header .nav li.on{background-position: left -43px;}
.header .nav li.on a{background-position: right -43px; color:#367abb;}
.header .nav li.tab_web{ position:relative}
.header .nav li.tab_web a{ position:absolute;}
.header .nav li.tab_web a,
.header .nav li.tab_web a span{background: url(../images/admin_img/site.png) no-repeat;height:34px;line-height:34px;*line-height:38px;_float: left}
.header .nav li.tab_web{background:none; line-height:38px; vertical-align:middle; padding:0;}
.header .nav li.tab_web a{padding:0;padding-left:10px;cursor: hand;!important;cursor: pointer;white-space: nowrap;}
.header .nav li.tab_web a:hover,.header .nav li.tab_web a.on{text-decoration: none;color:#3a6ea5;background-position: left -40px; }
.header .nav li.tab_web a span{ display:block; padding-right:24px;background-position:right 2px;}
.header .nav li.tab_web a:hover span,.header .nav li.tab_web a.on span{background-position:right -40px;}
.tab-web-panel{ border:1px solid #b3cbe4;zoom:1; padding:1px; background:#fff}
.tab-web-panel li{background:#f0f5f6; margin-top:1px}
.tab-web-panel li a{padding:3px 8px 3px 8px;display:block; padding-right:22px;height:18px;line-height:18px;white-space: nowrap;width:105px}
.tab-web-panel li a:hover,.tab-web-panel li.on a{ background-color:#d5e5f6;background-position:50px -52px;}
.header .col-auto{height:80px}
.header .log{padding:16px 0 0 6px; height:20px}
.header .tab_style{padding:16px 14px 0 0}
#Skin{padding:14px 0 0 0; position:relative; z-index:1000; height:11px; font-size:0;}
#Skin li {cursor:pointer;height:11px;width:14px;_overflow:hidden;background:url(../images/admin_img/skinbt.png) no-repeat;}
#Skin .s1 {background-position:-14px -66px}
#Skin .s2 {background-position:0 -55px}
#Skin .s3 {background-position:0 -33px}
#Skin .s4 {}
/*主体样式*/
.left_menu{width:145px; position:relative; display:block; padding-top:10px; overflow:hidden; }
#Scroll{ float:left; width:125px;padding:0 2px 0 10px; overflow:hidden}
.left_menu_on{ width:10px; padding:0;}
.left_menu_on #Scroll{display:none}
.left_menu h3{font-weight: 700;color: #275d96;border-bottom:1px solid #d9e4ea; line-height:24px; height:24px; margin-bottom:5px}
.left_menu ul li{color:#666; display:block; margin-right:1px}
.left_menu ul li a{line-height:24px;padding-left:8px;display:block;text-decoration: none;background-color:#f7fbfc;}
.left_menu ul li a:hover,
.left_menu ul li.on,.left_menu h3 span{background: url(../images/admin_img/left_menu.png) no-repeat;text-decoration: none; margin-right:6px}
.left_menu ul li.on{ height:29px; padding-left:20px; margin-right:0}
.left_menu ul li.on a{ height:29px; line-height:29px; background:none; padding:0; display:block}
.left_menu ul li.on a:hover{background:none}
.left_menu ul li a:hover{background-position: left -38px}
.left_menu a.open,.left_menu a.close{background: url(../images/admin_img/left_menu_openClose.png) no-repeat 3px center;width:8px; display:block; float:left;height:auto; right:-11px; top:0}
.left_menu a.open:hover,.left_menu a.close:hover{ background-color:#d6e1e4}
.left_menu a.close{background-position:right center; width:10px}
.left_menu h3 span{background-position: left -78px; display:block; float:right; height:14px; width:14px; margin-top:5px}
.left_menu h3 span.on{background-position: -33px -78px;}
.scroll{ position:absolute; left:10px; bottom:14px; width:120px; height:17px; overflow:hidden; display:none}
.scroll a{ background:url(../images/admin_img/scroll_bg.png) no-repeat left top; width:48px; height:17px; margin:0 5px}
.scroll a:hover{ background-position:left bottom}
.scroll a.next{background-position:right top}
.scroll a.next:hover{ background-position:right bottom}
/*当前位置*/
.crumbs{background-position:left -18px; height:22px; padding:6px 0 0 18px;*height:20px;*padding:8px 0 0 18px;}
.shortcut{ float:right; position:relative; top:-3px;*top:-4px;}
.shortcut a{ margin-left:6px; padding-left:6px; color:#0364ae}
.shortcut a,.shortcut a span{background: url(../images/admin_img/bnt_bg.png) no-repeat 0 -83px; height:21px; line-height:21px;*line-height:24px;_line-height:20px; text-align:center;}
.shortcut a span{background-position: right -83px; padding-right:6px;}
/*容器样式*/
.col-tab{ }
.col-tab ul.tabBut{height:27px; padding-left:14px;position:relative;bottom:-1px}
.col-tab ul.tabBut li{float:left; border:1px solid #dce3ed; height:25px; line-height:26px; margin-right:5px;}
.col-tab ul.tabBut li{ background:#eaeef4; padding:0 8px;}
.col-tab ul.tabBut li.on{position:relative; background:#fff;border-bottom:0;height:26px;_height:27px; font-weight:700;}
.col-tab ul.tabBut li.icon{background-image:url(../images/icon/exclamation_small.png);padding-left:18px;background-repeat: no-repeat;background-position: 3px center;}
.col-tab .content{border:1px solid #dce3ed;_zoom:1;}
.col-tab .content-r{border-top:1px solid #dce3ed}
.col-tab .contentList{border:1px solid #dce3ed;_zoom:1;}
.col-1{ border:1px solid #f4f6f5;zoom:1; background:#fff}
.col-1 div.content{border:1px solid #c2d1d8;zoom:1;}
.col-2{ border:1px solid #c7d8ea;zoom:1;}
.col-2 h6{border-bottom:1px solid #c7d8ea; color:#3a6ea5;background: url(../images/admin_img/x_bg.png) repeat-x left -42px; height:26px; line-height:28px; padding:0 10px}
.col-2 div.content{ padding:9px 10px}
/*栏目菜单*/
.cat-menu{ width:180px; margin:10px 8px 0 0; }
.cat-menu div.content{padding-left:8px}
/*收藏导航*/
.fav-nav,.fav-nav span,.fav-nav a{height:28px;line-height:28px;background: url(../images/admin_img/fav-nav-bg.png) repeat-x left top;}
.fav-nav{padding:0 0 0 12px;position: absolute; left:0;bottom:0px;width:100%;}
.fav-nav span{background-position: right -78px;position:relative;display:block;float:left;background-repeat: no-repeat; padding-right:2px}
.fav-nav div{ float:left}
.fav-nav a{padding:0 20px 0 8px; display:block;float:left}
.fav-nav a:hover,.fav-nav a.on{background-position: right -40px;text-decoration: none}
.fav-nav a.panel-delete{padding-right:10px;background: url(../images/cross.png) no-repeat;width:16px; height:16px; padding:0;background-position: center 3px;position:absolute; right:4px; top:7px; z-index:10}
.fav-nav a.panel-add{background-position: right -120px; width:16px; float:left; padding:0; margin-left:5px;_margin-left:3px}
.fav-nav a.panel-add:hover{background-position: center -163px;}
.fav-nav a.panel-delete:hover{background-position: center -46px;}
.fav-nav a.panel-delete em,.fav-nav a.panel-add em{ display:none}
.fav-help{display:none;height:26px; line-height:26px; float:none; background:#fff url(../images/icon/info.png) no-repeat 3px 6px; padding:0 10px 0 24px; position:absolute; top:2px; right:14px}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
.fav-help a.panel-delete{right:2px; top:5px; margin:0}
.fav-help a:hover {color:#CC3300;}
/*内容菜单*/
.content-menu{ padding:0 0 6px}
.content-menu a:hover{text-decoration: none}
.content-menu a em{display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline;}
.content-menu a.add,.content-menu a.add em,
.content-menu a.on,.content-menu a.on em{background: url(../images/admin_img/bnt_bg.png) no-repeat;height:28px; line-height:28px;*line-height:28px}
.content-menu span{color:#ddd; padding:0 8px}
.content-menu a{cursor:pointer;}
.content-menu a.add{ padding:0 0 0 5px;}
.content-menu a.add em{ padding:0 10px 0 5px;color:#fff;background-position: right top}
.content-menu a.on{background-position: left -40px;*background-position: left -41px;_background-position: left -39px; color:#fff; padding:0 0 0 5px;}
.content-menu a.on em{background-position: right -40px;*background-position: right -41px;_background-position: right -39px; padding:0 10px 0 5px}
/*eddy 修改分页样式*/
/*分页*/
#pages ul { padding:14px 0 10px;font-family:宋体; text-align:right; float:right;}
#pages ul li {float:left; margin-right:2px;}
#pages ul li a { display:inline-block; height:22px; line-height:22px; background:#fff; border:1px solid #e3e3e3; text-align:center; color:#333; padding:0 10px}
#pages ul li a.a1 { background:url(../images/admin_img/pages.png) no-repeat 0 5px; width:56px; padding:0 }
#pages ul li a:hover { background:#f1f1f1; color:#000; text-decoration:none; }
#pages ul li a.current { display:inline-block; height:22px;padding:0 10px; line-height:22px; background:#5a85b2; border:1px solid #5a85b2; color:#fff; text-align:center; }
.page ui li .noPage { display:inline-block; height:22px; line-height:22px; background:url(../img/icu/titleBg.png) repeat-x 0 -55px ; border:1px solid #e3e3e3; text-align:center; color:#a4a4a4; }
/*
#pages { padding:14px 0 10px;font-family:宋体; text-align:right}
#pages a { display:inline-block; height:22px; line-height:22px; background:#fff; border:1px solid #e3e3e3; text-align:center; color:#333; padding:0 10px}
#pages a.a1 { background:url(../images/admin_img/pages.png) no-repeat 0 5px; width:56px; padding:0 }
#pages a:hover { background:#f1f1f1; color:#000; text-decoration:none; }
#pages span { display:inline-block; height:22px;padding:0 10px; line-height:22px; background:#5a85b2; border:1px solid #5a85b2; color:#fff; text-align:center; }
.page .noPage { display:inline-block; height:22px; line-height:22px; background:url(../img/icu/titleBg.png) repeat-x 0 -55px ; border:1px solid #e3e3e3; text-align:center; color:#a4a4a4; }
*/
/*图片列表水平左右居中*/
.img-wrap{border:1px solid #eee;text-align:center;overflow:hidden;background:#fff}
.img-wrap a{display:table-cell;vertical-align:middle;text-align:center;*display:block;}
#imgPreview td.on{background:#f4f9fe}
#imgPreview td.on a{background:url("../images/msg_bg.png") no-repeat right -250px;vertical-align:middle; padding-right:70px;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline; height:16px; line-height:16px}
/*角色权限设置*/
.role-memu{ padding:5px 0}
.role-memu li a{cursor: hand;!important;cursor: pointer;display:block;color:#2e74d7;text-decoration: none; height:24px; padding:0 6px; overflow:hidden; line-height:24px; vertical-align:middle; background-color:#FFF}
.role-memu li a em{ width:80px; overflow:hidden; display:block}
.role-memu li a span{float:right; color: #999}
.role-memu li a span img{ margin-right:2px}
.role-memu li.on a{ background:#e0e9f0}
.role-but,.role-but span{background: url(../images/admin_img/tbtn.png) no-repeat; height:36px; line-height:36px; vertical-align:middle; padding-left:12px; border:none;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline;}
.role-but span{background-position: right top; padding:0 12px 0 0; font-weight:700; font-size:14px; color:#fff}
/*发布内容
.addContent{width:960px; margin:0 auto; overflow:hidden;}
.addContent .col-auto{width:750px;margin-right:6px;_margin-right:5px;}
.addContent .col-right .content h6{ border-bottom:1px solid #cfdce3; padding:8px 0 3px; margin-bottom:7px}
.addContent .col-right .content input{max-width:182px}
.addContent .col-right .content .upload-pic{width:180px;height:170px;text-align:center;overflow:hidden;}
.addContent .col-right .content .upload-pic a{display:table-cell;vertical-align:middle;width:180px;height:145px;text-align:center;*display:block;*font-size:105px}
.addContent .col-right .content .upload-pic{ background:#eef2f2; border:1px solid #dce6ea; zoom:1; padding:1px;}
.addContent .col-right select#template{max-width:188px;*width:188px;_width:188px}
*/
.addContent{width:960px; margin:0 auto; overflow:hidden;}
.addContent .col-auto{}
.addContent .col-right{ width:204px; overflow:hidden; margin-left:6px;}
.addContent .col-right .content h6{ border-bottom:1px solid #cfdce3; padding:8px 0 3px; margin-bottom:7px}
.addContent .col-right .content input{max-width:182px}
.addContent .col-right .content .upload-pic{width:180px;height:180px;text-align:center;overflow:hidden;}
.addContent .col-right .content .upload-pic a{display:table-cell;vertical-align:middle;width:180px;height:145px;text-align:center;*display:block;*font-size:105px}
.addContent .col-right .content .upload-pic{ background:#eef2f2; border:1px solid #dce6ea; zoom:1; padding:1px;}
.addContent .col-right select#template{max-width:188px;*width:188px;_width:188px}
.list-dot{ padding-bottom:10px}
.list-dot li,.list-dot-othors li{padding:5px 0; border-bottom:1px dotted #c6dde0; font-family:"宋体"; color:#bbb; position:relative;_height:22px}
.list-dot li:hover,.list-dot-othors li:hover{ background-color:#d9e5ee}
.list-dot li span,.list-dot-othors li span{color:#004499}
.list-dot li a.close span,.list-dot-othors li a.close span{display:none}
.list-dot li a.close,.list-dot-othors li a.close{background: url(../images/cross.png) no-repeat left 3px; display:block; width:16px; height:16px;position: absolute;outline:none;right:5px; bottom:5px}
.list-dot li a.close:hover,.list-dot-othors li a.close:hover{background-position: left -46px}
.list-dot-othors li{float:left;width:24%;overflow:hidden;}
/*评论*/
.comment{ padding:8px 10px}
.comment .title{ margin-bottom:5px}
.comment .title span{ position:relative; top:-5px}
.comment .content{ font-size:14px; background:#f6f9fb; border:1px solid #c4d5df; zoom:1; padding:8px 10px; margin:5px 0}
.comment .content span{display:block;}
.comment_button{margin-bottom:15px;}
.comment_button a{padding:5px; border:solid 1px #C3D4E7; }
.comment_button a.on{background:#4C7FB6; color:#fff;border:solid 1px #3E73A9}
/*圆角*/
.fillet{position:relative; border:1px solid #c4d5df; zoom:1;}
.fillet span.o1,
.fillet span.o2,
.fillet span.o3,
.fillet span.o4{position:absolute;width:3px;height:3px; font-size:1px;background: url(../images/fillet.png) no-repeat}
.fillet span.o1{background-position: left -6px; top:-1px; left:-1px}
.fillet span.o2{background-position: right -6px; top:-1px; right:-1px}
.fillet span.o3{background-position: left bottom; bottom:-1px; left:-1px}
.fillet span.o4{background-position: right bottom; bottom:-1px; right:-1px;}
/*工作流*/
.workflow{padding:10px 140px 10px 10px;}
.workflow .col{padding-bottom:20px;background: url(../images/admin_img/arrowhead-y.png) no-repeat 10px bottom;}
.workflow div.off{padding:0; background:none}
.workflow .content{left:130px; position:relative;}
.workflow .title{position:absolute; left:-130px; top:-1px; width:90px; font-size:14px; font-weight:700; text-align:center; padding: 0 0 3px 0; background:#fff}
.workflow .title span.line{border-bottom:1px solid #95b9cf; width:32px; height:1px; font-size:1px; position:absolute; right:-37px; top:17px}
.workflow .fillet{background:#f6f9fb; padding:8px 10px 7px}
.workflow .name{font-size:14px}
/*锁频*/
.ScreenLock {background-color:#3a6ea5;background-image:url("../images/admin_img/ScreenLock.png")}
.ScreenLock {background-position:50% 50%;background-repeat:no-repeat;height:100%;left:0;position:absolute;top:0;width:100%;z-index:2000}
.ScreenLock .inputpwd {font-size:14px;height:134px;left:50%;margin:-102px 0 0 -150px;padding:28px;position:absolute;top:50%;width:280px}
.ScreenLock h5{ height:60px; line-height:60px; padding-top:10px; padding-left:40px;background:url(../images/msg_img/msg_bg.png) no-repeat 0px -476px;}
.ScreenLock .input-text{border:1px solid #A7A6AA;height:18px;margin:0 5px 0 0;padding:2px 0 2px 5px;border: 1px solid #d0d0d0;background: #FFF url(../images/admin_img/input.png) repeat-x; font-family: Verdana, Geneva, sans-serif,"宋体";font-size:12px;}
.ScreenLock .submit{ background: url(../images/admin_img/ScreenLockBut.png) no-repeat; height:24px; width:55px;cursor:hand;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline; border:none}
/*网站地图*/
.map-menu ul{margin:4px;width:156px;border:1px solid #A4C0F7;}
.map-menu ul li.title{background:#EDF2F8;font-weight:bold;padding-left:5px;}
.map-menu ul li.title2{font-weight:bold;padding-left:10px;}
.map-menu ul li{padding:4px;padding-left:20px;}
/*附件 未使用-已使用*/
.tab-use{ position: relative}
.tab-use .arrows{background: url(../images/admin_img/toggle-collapse-dark.png) no-repeat; width:16px; height:16px; overflow:hidden; position:absolute; left:0; top:-11px;}
.tab-use ul{ position:absolute; display:none; top:5px; left:0; width:80px}
.tab-use ul li{}
.tab-use ul a{ width:auto;padding:3px 8px}
|
108wo
|
statics/css/zh-cn-system.css
|
CSS
|
asf20
| 20,557
|
body fieldset{border:1px solid #D8D8D8; padding:10px;}
body fieldset legend{padding:3px 8px;font-weight:700;border:1px solid #D8D8D8;background-color: #F9F9F9;}
body fieldset.blue{border:1px solid #dce3ed}
body fieldset.blue legend{padding:3px 8px;font-weight:700;color:#347add; background:none; border:none}
.picBut {background:url("../images/admin_img/picBnt.png") no-repeat 0 -28px;color:#FFF;float:left; text-align:center;font-weight:700;height:28px;line-height:26px;*line-height:30px;margin-right:10px;width:75px}
.picBut a{color:#fff;text-decoration: none; width:75px; height:28px;display:inline-block;zoom:1;*display:inline;}
.table-list td,.table-list th{padding-left:12px}
.table-list thead th{ height:30px; background:#eef3f7; border-bottom:1px solid #d5dfe8; font-weight:normal}
.table-list tbody td,.table-list .btn{border-bottom: #eee 1px solid; padding-top:5px; padding-bottom:5px}
div.btn{background:#f6f6f6; padding:6px 12px 0 12px; height:30px;line-height:30px}
.table-list tr:hover,.table-list table tbody tr:hover{ background:#fbffe4}
.nHover tr:hover,.nHover tr:hover td{ background:none}
.table-list .input-text-c{ padding:0; height:18px}
.input-text-c{border:1px solid #A7A6AA;height:18px;padding:2px 0 0; text-align:center}
.td-line{border:1px solid #eee}
.td-line td,.td-line th{border:1px solid #eee}
.button{background:#ddd;height:24px; border-top:0;border-left:0; border-bottom:1px solid #666; border-right:1px solid #666; padding:3px 6px; margin-right:5px}
.table-list tr.on,.table-list tr.on td,.table-list tr.on th,.table-list td.on,.table-list th.on{background:#fdf9e5;}
a.close-own{background: url(../images/cross.png) no-repeat left 3px; display:block; width:16px; height:16px;position: absolute;outline:none;right:7px; top:8px; text-indent:200px; overflow: hidden}
a.close-own:hover{background-position: left -46px}
/*通用表单*/
.common-form{}
.common-form div.contentWrap{padding-right:20px}
.common-form ul li{color:#444; clear:both; vertical-align:middle}
.common-form ul li span.text{width:60px}
.common-form .set{border:1px dashed #e0e7ed;zoom:1; background:#f2f7fb; padding:10px; font-size:12px; margin-bottom:10px}
.common-form .set table td,.common-form .set table th{padding-left:12px}
.common-form .set table th{font-weight:normal; text-align:left;padding:0 8px}
.common-form .set table td{ padding:3px 0 3px 5px}
.common-form .set table td.y-bg{background: url(../images/admin_img/set_y_line.png) repeat-y right top}
.common-form .set table td input{ background-image:none; height:18px; font-size:12px}
.input-text,.measure-input,textarea,input.date,input.endDate,.input-focus{border:1px solid #A7A6AA;height:18px;margin:0 5px 0 0;padding:2px 0 2px 5px;border: 1px solid #d0d0d0;background: #FFF url(../images/admin_img/input.png) repeat-x; font-family: Verdana, Geneva, sans-serif,"宋体";font-size:12px;}
.input-focus{background: #FFF url(../images/admin_img/input_focus.png) repeat-x; border-color:#afcee6;font-size:12px;}
input.date,input.endDate{background: #fff url(../images/admin_img/input_date.png) no-repeat right 3px; padding-right:18px;font-size:12px;}
textarea,textarea.input-text,textarea.input-focus{font-size:12px;height:auto; padding:5px; margin:0;}
select{ vertical-align:middle;background:none repeat scroll 0 0 #F9F9F9;border-color:#666666 #CCCCCC #CCCCCC #666666;border-style:solid;border-width:1px;color:#333;padding:2px;}
.search-form{ margin-bottom:10px}
/*表格表单*/
.table_form{font-size:12px}
.table_form td{padding-left:12px}
.table_form th{font-weight:normal; text-align:right;padding-right:10px; color:#777}
.table_form td label{ vertical-align:middle}
.table_form td,.table_form th{padding:4px 0 4px 8px}
.table_form tbody td,.table_form tbody th{border-bottom:1px solid #eee; }
.colorpanel tbody td,.colorpanel tbody th{ padding:0;border-bottom: none;}
/*select美化*/
.js ul.newList {left:-9999px;}
ul.newList * {margin:0; padding:0;}
ul.newList {margin:0; padding:0; list-style:none; color:#000; background:#fff; position:absolute; border:1px solid #ccc; top:22px; left:0; overflow:auto; z-index:9999;}
.newListSelected {color:#000; height:22px; padding:4px 0 0 6px; float:left; background:url(../images/select-bg.png) no-repeat right 0; border-left:1px solid #dfdfdf}
.newListSelected span {display:block;}
ul.newList li a {padding:3px 8px;display:block;text-decoration: none;}
.selectedTxt {overflow:hidden; height:16px; padding:0 23px 0 0;}
.measure-input {background:url("../images/ruler.gif") repeat-x scroll 0 9px transparent}
.hiLite {background:#e0ebf4!important; color:#444!important;}
.newListHover {background:#f2f7fb!important; color:#000!important; cursor:default;}
.newListSelHover, .newListSelFocus {background-position:right -26px; cursor:default;}
.newListOptionTitle {font-weight:bold;}
.newListOptionTitle ul {margin:3px 0 0;}
.newListOptionTitle li {font-weight:normal; border-left:1px solid #ccc;}
/*表单验证*/
.onShow,.onFocus,.onError,.onCorrect,.onLoad,.onTime{display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline; vertical-align:middle;background:url(../images/msg_bg.png) no-repeat; color:#444;line-height:18px;padding:2px 10px 2px 23px; margin-left:10px;_margin-left:5px}
.onShow{background-position:3px -147px;border-color:#40B3FF;color:#959595}
.onFocus{background-position:3px -147px;border-color:#40B3FF;}
.onError{background-position:3px -47px;border-color:#40B3FF; color:red}
.onCorrect{background-position:3px -247px;border-color:#40B3FF;}
.onLamp{background-position:3px -200px}
.onTime{background-position:3px -1356px}
/*联动菜单*/
.linkage-menu{height:200px; overflow-y:auto; padding:0 4px}
.linkage-menu h6{ border-bottom:1px solid #e2ecee; padding:2px 0 3px; margin-bottom:5px}
.linkage-menu h6 a.rt{ font-weight:normal; font-family:'宋体';color:#377abe}
.linkage-menu div.menu a{width:74px; line-height:22px;text-decoration: none; padding-left:4px; overflow:hidden; height:22px}
.linkage-menu div.menu a:hover{ background:#d9e4ed; color:#377abe}
div#areaid{border:1px solid #A7A6AA;height:18px;margin:0 5px 0 0;padding:2px 5px 2px;border: 1px solid #d0d0d0;background: #FFF url(../images/admin_img/input.png) repeat-x; position:relative; top:-2px;*top:2px;}
.picList li{ padding:0 0 8px}
.display {display:none}
|
108wo
|
statics/css/table_form.css
|
CSS
|
asf20
| 6,352
|
@charset "utf-8";
body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div,dl,dd,dt{margin:0;padding:0;border:0;}
html{ width:100%; height:100%}
body{background:url(../../images/108wo/body_bg.gif) no-repeat center 0 #F9F9F9;color:#585858;font-size:12px;font-family:"微软雅黑",Verdana,"宋体",Arial,Sans; height:100%; width:100%;}
ul,ol,li,dl,dd,dt{list-style-type:none;}
select,input,img,select,button{vertical-align:middle; font-size:12px;font-family:"微软雅黑",Verdana,"宋体",Arial,Sans;}
a{text-decoration:none; color:#575757}
a:link{color:#575757}
a:hover,a:active,a:focus{color:#9CB83D;}
.clearit{clear:both;}
.b{font-weight:bold}
.red{ color:#ee0000}
.orange{ color:#ff6c00}
.black{ color:#222}
.blue{ color:#0294C5}
.green{ color:#ABC74C}
.font11{ font-size:11px}
.font14{ font-size:14px}
.pageList{ height:60px; padding:10px 0px;}
.pageList ul{}
.pageList ul li{ float:left; margin-right:5px; color:#999}
.pageList ul li a{ display:block; float:left; padding:5px 12px; line-height:18px; background:#fff; border:1px #ddd solid; color:#888}
.pageList ul li a:hover{ background:#f2f2f2; color:#ABC74C}
.pageList ul li a.current{ padding:6px 13px; border:none; background:#ABC74C; color:#fff}
/*
.pageList{ height:60px; padding:10px 0px; color:#999}
.pageList span{ display:block; margin-right:5px; float:left; padding:6px 13px; line-height:18px; background:#ABC74C; border:none; color:#fff}
.pageList a{ display:block; margin-right:5px; float:left; padding:5px 12px; line-height:18px; background:#fff; border:1px #ddd solid; color:#888}
.pageList a:hover{ background:#f2f2f2; color:#ABC74C}
*/
#wrapper{width:980px; margin:auto;}
#header{height:90px; position:relative}
#header .welcome{ position:absolute;top:62px; left:171px; color:#ADADAD}
#header .welcome a{ color:#fff}
#header .welcome a:hover{ text-decoration:underline}
#header .logo{ height:61px; width:280px; margin-top:16px; float:left;}
#header .search{ width:240px; height:34px; background:url(../../images/108wo/search_bg.png) no-repeat; float:right; margin-top:35px;}
#header .search input{ margin:2px 5px; background:url(); border:0px; height:18px; line-height:18px; width:200px; color:#999; position:relative}
#header .search button{ text-indent:-10000px; width:24px; height:20px; border:0px; cursor:pointer; background:url(); position:relative}
#nav{ height:49px;overflow:hidden}
#nav ul.nav{ float:left; padding:0px 0px; position:relative}
#nav ul.nav li{float:left;height:49px; margin-right:30px;display: inline;}
#nav ul.nav li a{ display:block; padding:0px 5px; line-height:46px;font-weight:bold; color:#777;position: relative; z-index:200; font-size:13px}
#nav ul.nav li a:hover{color:#ABC74C}
#nav ul.nav li.current a{ color:#444; border-bottom:3px #ABC74C solid}
#menuBg { position:absolute; z-index:100;top:10px;left:0;width:100px; height:3px; background:#ABC74C; overflow:hidden; }
#nav ul.changeStyle{ float:right; margin-top:13px}
#nav ul.changeStyle a{ margin-left:5px}
#main{margin:20px 0px 45px 0px}
#footer{ background:#F5F5F5; border-top:1px #eee solid; padding-bottom:30px; padding-top:15px}
#footer div{ width:980px; margin:0px auto; line-height:21px; position:relative}
#footer div a#goTop{ display:block; width:114px; height:37px; background:url(../../images/108wo/gotop.gif) no-repeat; position:absolute; right:70px;top:-52px; text-indent:-10000px}
#footer div .left{ float:left; color:#888}
#footer div .right{ float:right; color:#888;}
#footer div .right a{ margin:0px 5px}
#footer div .right a:hover{ text-decoration:underline}
/*page*/
#page{}
#page .left{ width:710px; float:left}
#page .right{ width:270px; float:left; position:relative;}
#page .right .contact{ width:270px; height:150px; background:url(../../images/108wo/contact.png) no-repeat}
#page .right .contact a{ display:block; position:relative; float:left}
#page .right .contact a.qq1{ width:60px; height:20px;top:70px; text-align:center; padding-top:45px;}
#page .right .contact a.qq2{ width:60px; height:20px;top:70px; margin-left:5px;text-align:center; padding-top:45px;}
#page .right .contact a.msn{ width:50px; height:20px;top:70px; margin-left:5px;text-align:center; padding-top:45px;}
#page .right .contact a.share{ width:75px; height:67px; top:70px; margin-left:15px; text-indent:-10000px}
#page .right .listBar{ border:1px #EAE9EA solid; padding:10px; background:#fff; position:relative; margin-top:10px}
#page .right .listBar h2{background:url(../../images/108wo/dot.gif) repeat-x 0 bottom;font-size:13px; height:25px}
#page .right .listBar ul{ padding:10px 0px}
#page .right .listBar ul table{ width:100%}
#page .right .listBar ul table td{ padding:2px 3px}
#page .right .listBar ul table td a.num{ color:#999;}
#page .right .listBar ul table td a.num:hover{ text-decoration:underline; color:#666; }
#page .right .listBar ul table td input{*margin-top:-2px}
#page .right .listBar ul a.createBtn{ background:url(../../images/108wo/btn_bg.gif) no-repeat; display:block; width:59px; height:24px; color:#fff; line-height:24px; font-size:13px; padding-left:20px; margin-top:10px; margin-left:163px}
#page .right .listBar ul a.createBtn:hover{ color:#E0E0E0}
#page .right .listBar ul div.icon {background:url(../../images/108wo/listBar_icon.png) no-repeat; width:32px; height:32px; position:absolute;top:-7px; right:5px}
#page .right .cate{ margin-top:15px}
#page .right .cate h2{ font-size:13px; height:32px; line-height:30px; position:relative; z-index:3}
#page .right .cate h2 a{ display:block; float:left; padding:0px 20px; margin-right:7px; border:1px #EAE9EA solid}
#page .right .cate h2 a.current{ background:#fff; border-bottom:1px #fff solid; color:#9CB83D}
#page .right .cate div{border:1px #EAE9EA solid; padding:10px 20px 20px 20px; background:#fff; position:relative;top:-1px; z-index:2;}
#page .right .cate div h3{background:url(../../images/108wo/dot.gif) repeat-x 0 bottom;height:30px; line-height:30px; font-size:12px; margin-bottom:5px}
#page .right .cate div h3 span{background:url(../../images/108wo/li2.gif) no-repeat 0px center ;padding-left:15px; color:#555; cursor:pointer; display:block; width:210px}
#page .right .cate div h3 span:hover{ color:#ABC74C}
#page .right .cate div br{ line-height:0;}
#page .right .cate div ul{ padding:10px 0px; display:none}
#page .right .cate div ul li{ width:110px; padding:3px 0px;float:left; position:relative; color:#888}
#page .right .cate div ul li a{ margin-right:3px;}
#page .right .cate div ul li a:hover{ text-decoration:underline}
/*#page .right .cate div#content2 a{ line-height:24px;white-space:nowrap}*/
#page .right .cate div#content2 li{width:230px;float:none;}
#page .right .cate div#content2 ul li a{ margin-left:3px;height:auto;}
#page .right .cate div#content2 ul li a:hover{ text-decoration:underline}
#page .right .cate div#content2 ul li span{color:#bbb}
/*picList*/
.business{ background:url(../../images/108wo/info_bg.gif) repeat-x #A9C24F;height:68px; padding:17px 20px 10px 22px; width:628px; color:#444}
.business table{ width:100%;}
.business table td{ padding:5px}
.business table td a{ margin-left:10px}
.subCate{ margin-top:10px; font-size:14px; padding-bottom:10px; border-bottom:1px #dedede solid; width:670px; color:#ccc; background:url(../../images/108wo/li5.gif) no-repeat 0px 5px; padding-left:20px; width:650px;}
.subCate a{ color:#888}
.subCate a:hover{ color:#ABC64E;; text-decoration:underline}
.subCate a.current{ color:#ABC64E; font-weight:bold}
.picList{ margin-top:20px}
.picList .listTop{ width:670px; height:26px; background:url(../../images/108wo/dot.gif) repeat-x 0px bottom; color:#888; }
.picList .listTop .l{ float:left; background:url(../../images/108wo/li3.gif) no-repeat 0 center; padding-left:15px;}
.picList .listTop .l select{ font-size:12px; color:#777; margin:0px 5px}
.picList .listTop .r{ float:right}
.picList .listTop .r a{ color:#888;background:url(../../images/108wo/li4.gif) no-repeat; padding-left:16px}
.picList .listTop .r a:hover{ color:#444; }
.picList .listCo{ margin-top:25px; width:710px; overflow:hidden}
.picList .listCo li{ width:320px; height:240px; float:left; margin-right:30px; margin-bottom:20px; position:relative}
.picList .listCo li a.image{width:320px; height:200px; display:block; overflow:hidden;}
.picList .listCo li a.image img{}
.picList .listCo li a.btn{ display:block; width:29px; height:26px; background:url(../../images/108wo/btn2.gif) no-repeat; top:170px; right:4px; position:absolute; display:none}
.picList .listCo li p{ margin-top:10px; text-align:right; color:#999; font-family:"宋体",Verdana,"宋体",Arial,Sans; line-height:22px}
.picList .listCo li p span{ float:left; font-size:15px;font-family:"微软雅黑",Verdana,"宋体",Arial,Sans; position:relative;top:-2px}
.picList .listCo li p a{ margin-left:5px}
.picList div.clearit{ height:20px; background:url(../../images/108wo/dot.gif) repeat-x; width:670px}
/*会员中心*/
.user{}
.user .left{ width:190px; border:1px #EAE9EA solid; background:#fff; padding:10px; float:left}
.user .left h2{ background:url(../../images/108wo/user_left_t.gif) no-repeat;font-size:15px; padding-left:22px; height:30px}
.user .left ul{ padding:10px 0px 35px 0px}
.user .left ul li{ background:url(../../images/108wo/dot.gif) repeat-x 0 bottom;}
.user .left ul li a{ background:url(../../images/108wo/li1.gif) no-repeat 25px center; padding-left:35px; display:block;height:27px;padding-top:10px}
.user .right{ width:700px;float:left; margin-left:36px; padding:15px; padding-bottom:35px; background:#fff; border:1px #EAE9EA solid; min-height:360px;_height:360px; overflow:visible}
.user .right .po{ height:25px; background:url(../../images/108wo/dot.gif) repeat-x 0px bottom; margin-bottom:20px; color:#888}
.user .right .po span{color:#555}
/*清单列表*/
.myList{}
.myList table{ width:100%; background:#EAE9EA}
.myList table td{ padding:7px 10px}
.myList table thead tr{ background:#F2F2F2}
.myList table thead tr td{ font-weight:bold}
.myList table tbody tr{ background:#fff; color:#888}
.myList table tbody tr td img{ margin:0px 3px;}
.myList table tbody tr td span{ font-size:12px; line-height:12px; color:#ccc; font-family:Arial, Helvetica, sans-serif; position:relative;*top:-2px}
.myList table tfoot tr{ background:#fff}
/*修改密码*/
.password{}
.password table{ width:100%}
.password table td{ padding:5px 5px}
.password table td input{ width:40%; height:18px; border-top:1px #aaa solid; border-left:1px #aaa solid; border-right:1px #ddd solid; border-bottom:1px #ddd solid; padding:2px 5px; line-height:18px; color:#999}
.password table td button{ padding:5px 12px;*padding:2px 3px}
/*个人资料*/
.information{}
.information table{ width:100%}
.information table td{ padding:5px 5px}
.information table td input{height:18px; border-top:1px #aaa solid; border-left:1px #aaa solid; border-right:1px #ddd solid; border-bottom:1px #ddd solid; padding:2px 5px; line-height:18px; color:#999}
.information table td select{ color:#666}
.information table td button{ padding:5px 12px;*padding:2px 3px}
/*清单查看*/
.listView{}
.listView .info{ text-align:right; padding:8px 15px;background:#ABC64E; color:#fff}
.listView .info b{ margin-left:5px}
.listView .info span{ float:left; }
.listView .subMenu{ margin-top:20px; position:relative}
.listView .subMenu{ color:#aaa}
.listView .subMenu a{ margin-right:3px; font-size:12px}
.listView .subMenu a.current{ font-weight:bold}
.listView .subMenu a.btn{ position:absolute; right:20px; background:url(../../images/108wo/icon2.gif) no-repeat 0px center; padding-left:16px; color:#009933}
.listView .subMenu a.btn:hover{ text-decoration:underline}
.listView table{ margin-top:10px; width:100%;}
.listView table thead tr{ background:#ddd; font-weight:bold}
.listView table td{ padding:8px}
.listView table td span{ color:#aaa; margin:0px 5px}
.listView table tbody td{ background:url(../../images/108wo/dot.gif) repeat-x 0px bottom}
.listView table a.downloadBtn{background:url(../../images/108wo/btn_bg.gif) no-repeat; display:block; width:59px; height:24px; color:#fff; line-height:24px; font-size:13px; padding-left:20px; margin-top:10px; float:right}
/*我的产品*/
.product{}
.product p{ margin-bottom:15px; padding:10px 20px; border:1px #ddd dotted; color:#ABC74C}
.product .subMenu{position:relative;height:50px;}
.product .subMenu{ color:#aaa}
.product .subMenu li {float:left;line-height:18px;border-right:5px #fff solid;}
.product .subMenu li ul{top:23px;position:absolute; width:658px;left:0px; border:1px #eee solid;padding:10px 20px;height:18px;z-index:1}
.product .subMenu span a{font-size:12px;display:block;height:18px;padding:3px 15px;background:#ddd;position:relative;z-index:2;float:left}
.product .subMenu span .current{ font-weight:bold;background:#ABC74C;color:#Fff}
.product .subMenu a.btn{ position:absolute; right:20px; background:url(../../images/108wo/icon2.gif) no-repeat 0px center; padding-left:16px; color:#009933}
.product .subMenu a.btn:hover{ text-decoration:underline}
.product .subMenu li ul a.current{ font-weight:bold;color:#ABC74C}
.product .subMenu li ul li{padding:0px 5px}
.product table{ width:100%; margin-top:30px}
.product table thead tr{ background:#ddd; font-weight:bold}
.product table td{ padding:8px}
.product table td span{ color:#aaa; margin:0px 5px}
.product table tbody td{ background:url(../../images/108wo/dot.gif) repeat-x 0px bottom}
/*询价*/
.price{}
.price p{ height:30px;}
.price table{ width:100%}
.price table thead tr{ background:#ddd; font-weight:bold}
.price table td{ padding:8px}
.price table td span{ color:#aaa; margin:0px 5px}
.price table tbody td{ background:url(../../images/108wo/dot.gif) repeat-x 0px bottom; line-height:25px;}
.price table tbody td.member div.info{ position:relative; z-index:2}
.price table tbody td.member div.info ul{ position:absolute; width:80px; height:60px ; background:#fff; border:1px #ddd solid; padding:10px; z-index:3; top:-30px; right:-100px}
/*about*/
.about{}
.about .left{ width:190px; border:1px #EAE9EA solid; background:#fff; padding:10px; float:left}
.about .left h2{ background:url(../../images/108wo/user_left_t.gif) no-repeat;font-size:15px; padding-left:22px; height:30px}
.about .left ul{ padding:10px 0px 35px 0px}
.about .left ul li{background:url(../../images/108wo/dot.gif) repeat-x 0 bottom;}
.about .left ul li a{ background:url(../../images/108wo/li1.gif) no-repeat 25px center; padding-left:35px; display:block;height:27px;padding-top:10px}
.about .right{ width:700px;float:left; margin-left:36px; padding:15px; padding-bottom:35px; background:#fff; border:1px #EAE9EA solid; min-height:400px;_height:400px; overflow:visible}
.about .right .po{ height:25px; background:url(../../images/108wo/dot.gif) repeat-x 0px bottom; margin-bottom:20px; color:#888}
.about .right .po span{color:#555}
.aboutContent{ line-height:24px; font-size:13px;}
.aboutContent p{ margin:10px 0; text-indent:2em}
/*创建清单*/
#createList{ width:400px; height:230px; padding:15px; }
#createList h1{ font-size:14px; background:url(../../images/108wo/dot.gif) repeat-x 0px bottom; padding-bottom:10px}
#createList ul{ padding:10px 0px}
#createList table{ width:100%}
#createList table td{ padding:5px 10px}
#createList table td .input{height:18px; border-top:1px #aaa solid; border-left:1px #aaa solid; border-right:1px #ddd solid; border-bottom:1px #ddd solid; padding:2px 5px; line-height:18px; color:#999}
#createList table td textarea{height:120px; width:280px; overflow:auto; border-top:1px #aaa solid; border-left:1px #aaa solid; border-right:1px #ddd solid; border-bottom:1px #ddd solid; padding:2px 5px; line-height:18px; color:#333}
#createList table td span{ font-size:12px; color:#aaa; margin-left:10px}
#createList table td button{ padding:5px 12px;*padding:2px 3px}
/*login*/
#login{}
#login .logo{width:980px; margin:0px auto 0px auto; padding-top:50px}
#login .picList{ height:300px; background:url(../../images/108wo/login_bg.jpg) no-repeat; margin-top:30px;}
#login .picList div.marquee{ width:980px; margin:auto; padding-top:60px; height:180px; overflow:hidden;}
#login .picList div.marquee ul{ width:9999px}
#login .picList div.marquee ul li{ width:245px; height:180px; float:left; text-align:center; }
#login .picList div.marquee ul li img{ border:5px #fff solid;}
#login .picList div.marquee ul li p{ width:220px; margin:10px auto; text-align:right; color:#fff; font-size:13px}
#login .picList div.form{ position:relative; z-index:3; width:980px; margin:auto}
#login .picList div.form div{ position:absolute;right:30px;top:-296px;width:400px; background:#fff; border:1px #eee solid}
#login .picList div.form div h1{ font-size:15px; height:19px; padding:18px 0px; border-bottom:1px #eee solid; background:url(../../images/108wo/login_icon.gif) no-repeat 15px 10px; padding-left:55px; position:relative}
#login .picList div.form div h1 a{ font-size:12px; font-weight:normal; right:20px; position:absolute; color:#999}
#login .picList div.form div h1 a:hover{ color:#555}
#login .picList div.form div ul{ padding:20px 0px 20px 50px; height:125px; overflow:hidden}
#login .picList div.form div ul li{ height:40px; font-size:14px;}
#login .picList div.form div ul li .input{ height:22px; width:230px; border:1px #ddd solid; padding:2px 2px; margin-left:10px; line-height:22px}
#login .picList div.form div ul li .inputHover{border:1px #ABC74C solid;}
#login .picList div.form div ul li .checkbox{ margin-left:50px; position:relative;*top:1px; margin-right:3px;}
#login .picList div.form div ul li span{ font-size:12px; color:#888; }
#login .picList div.form div ul li button{ position:relative; top:-35px; left:208px; width:80px; height:30px; border:1px #ddd solid; background:#fff; cursor:pointer; font-size:14px;}
#login .picList div.form div ul li button.hover{border:1px #ABC74C solid; color:#6B7D2E}
#login .copyright{ text-align:center; margin-top:20px; line-height:24px; color:#aaa}
#login .copyright span{ color:#888}
#login .copyright a{ font-size:12px; margin:0px 8px}
#login .copyright a.msg{ background:url(../../images/108wo/icon_msg.gif) no-repeat 0px 4px; padding-left:20px}
/*reg*/
#reg{}
#reg .logo{width:980px; margin:0px auto 0px auto; padding-top:50px}
#reg .picList{ height:300px; background:url(../../images/108wo/login_bg.jpg) no-repeat; margin-top:30px;}
#reg .picList div.marquee{ width:980px; margin:auto; padding-top:60px; height:180px; overflow:hidden;}
#reg .picList div.marquee ul{ width:9999px}
#reg .picList div.marquee ul li{ width:245px; height:180px; float:left; text-align:center; }
#reg .picList div.marquee ul li img{ border:5px #fff solid;}
#reg .picList div.marquee ul li p{ width:220px; margin:10px auto; text-align:right; color:#fff; font-size:13px}
#reg .picList div.form{ position:relative; z-index:5; width:980px; margin:auto}
#reg .picList div.form div.formBg{ position:absolute;margin-left:550px;margin-top:-297px;width:390px; height:425px; overflow:hidden; background:url(../../images/108wo/reg_from_bg.png) no-repeat; padding-right:10px; z-index:99}
#reg .picList div.form div.fm{ position:absolute;margin-left:550px;margin-top:-297px;width:390px; height:425px; overflow:hidden;padding-right:10px; z-index:100}
#reg .picList div.form div.fm h1{ font-size:15px; height:19px; padding:18px 0px; border-bottom:1px #eee solid; background:url(../../images/108wo/login_icon.gif) no-repeat 15px 10px; padding-left:55px;}
#reg .picList div.form div.fm ul{ padding:20px 0px 20px 40px; overflow:hidden; }
#reg .picList div.form div.fm ul li{ height:40px; font-size:14px;}
#reg .picList div.form div.fm ul li .input{ height:22px; width:230px; border:1px #ddd solid; padding:2px 2px; margin-left:10px; line-height:22px;}
#reg .picList div.form div.fm ul li .inputHover{border:1px #ABC74C solid;}
#reg .picList div.form div.fm ul li .checkbox{ position:relative;*top:1px; margin-right:3px;}
#reg .picList div.form div.fm ul li span{ font-size:12px; color:#888; }
#reg .picList div.form div.fm ul li span a{ color:#0066CC; text-decoration:underline}
#reg .picList div.form div.fm ul li span a:hover{ text-decoration:none}
#reg .picList div.form div.fm ul li button{ margin:0px 5px;width:80px; height:30px; border:1px #ddd solid; background:#fff; cursor:pointer; font-size:14px;}
#reg .picList div.form div.fm ul li button.hover{border:1px #ABC74C solid; color:#6B7D2E}
#reg .copyright{ text-align:center; margin-top:20px; line-height:24px; color:#aaa; margin-right:420px}
#reg .copyright span{ color:#888}
#reg .copyright a{ font-size:12px; margin:0px 8px}
#reg .copyright a.msg{ background:url(../../images/108wo/icon_msg.gif) no-repeat 0px 4px; padding-left:20px}
/*message*/
#message{ padding:20px 30px; border:1px #ddd dashed; color:#333; width:400px; margin:150px auto; text-align:left; background:#fff;}
#message p{ margin:10px 0px; font-size:14px;}
#message a{ color:blue; text-decoration:underline}
#message a:hover { color:#cc0000; text-decoration:none}
#message .msgErr{ background:url(../../images/108wo/err.gif) no-repeat; padding-left:100px; height:70px; padding-top:10px;}
/*login*/
#msgBox{ position:absolute; z-index:9999; width:160px; height:48px; display:none;position: fixed;top: 50%;left: 50%;margin-top: -24px;margin-left: -80px;_position: absolute;_top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');}
#msgBox .err{ color:#ee0000; background:url(../../images/108wo/bg_err.gif) no-repeat; width:110px; height:33px; padding:15px 0px 0px 50px;}
#msgBox .suc{ color:#59903B; background:url(../../images/108wo/bg_suc.gif) no-repeat; width:115px; height:33px; padding:15px 0px 0px 45px;}
#msgBox .loading{ color:#666; background:url(../../images/108wo/bg_loading.gif) no-repeat; width:110px; height:33px; padding:15px 0px 0px 50px;}
.chromestyle {FLOAT: left; OVERFLOW: hidden}
.dropmenudiv {BORDER: #d4d4d4 1px solid; Z-INDEX: 100; VISIBILITY: hidden; FONT: 12px/18px Verdana;POSITION: absolute; TOP: 0px; BACKGROUND: #fff; padding:6px 12px;filter:alpha(opacity=95); line-height:22px; width:150px;}
|
108wo
|
statics/css/108wo/style.css
|
CSS
|
asf20
| 22,485
|
/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
#ie_historyFrame { width: 0px; height: 0px; display:none }
#firefox_anchorDiv { width: 0px; height: 0px; display:none }
#safari_formDiv { width: 0px; height: 0px; display:none }
#safari_rememberDiv { width: 0px; height: 0px; display:none }
|
108wo
|
statics/css/crop.css
|
CSS
|
asf20
| 365
|
table{border-collapse:collapse;border-spacing:0;}
.wrap{overflow:hidden; *display:inline-block;}.wrap{*display:block;}
.main img{_vertical-align:baseline;}
.align_r{ text-align:right;}
.brd{border:1px solid #C3D4E7;}
.l{ float:left;}
.r{ float:right;}
.footer p.info{margin-top:0px;}
.tit{color:#1E50A0;}
.tit h5{ margin-left:1em;}
.tit span.r{ margin-right:1em;}
.txt_b{ font-weight:bold;}
.nobrd{ border:none;}
.vote_result,.tit,.vote_result .c_box{background:url(../images/vote/vote_bg.jpg) repeat-x;}
.vote_result{margin:20px; border:1px solid #C3D4E7; background:url(../images/vote/vote_bg2.jpg) repeat-x 0% 100%;}
.tit{background-position:0px 0px; height:33px; line-height:33px; overflow:hidden;}
.tit h5{ background:url(../images/vote/vote_bg.gif) no-repeat 0px 10px; padding-left:20px;}
.vote_result .tit span{ background:url(../images/vote/vote_bg.gif) no-repeat 0px -32px;padding-left:20px;}
.vote_result .tit span strong{color:#900;}
.vote_result .c_box{background-position:0px -46px;}
.vote_result .c_box table{ margin:40px 0px;}
.vote_result .c_box table td,.vote_result .c_box table th,.vote_result .c_box table{ border:1px solid #E7EEF5;}
.vote_result .c_box table th{ text-align:center; font-weight:bold; color:#999; width:2em;}
.vote_result .c_box table td{ padding:10px 4px;}
.vote_result .c_box table td.tdcol3{width:5em; font-weight:bold; color:#1E50A0;}
.tp_tit{ width:30em;color:#1E50A0;}
.vote_result .c_box table td div{ background:#efefef; padding:4px 0px;}
.vote_result .c_box table td div img{ height:11px;}
.vote_listt{margin:20px;}
.vote_listt .tit{ border-bottom:2px solid #99B4D2; }
.licol2 li{float:left; width:50%;}
.icon3j{margin-top:20px;}
.icon3j li{ height:30px; line-height:30px; overflow:hidden;}
.icon3j li a{background:url(../images/vote/bg_member_1.gif) no-repeat 0px -128px; padding-left:20px;}
.icon3j li span{background:url(../images/vote/v9/icon.png) no-repeat 0 -71px #FFFFFF; padding-left:13px; width:30px; margin-left:10px;}
.tp .tp_tit{ text-align:center; width:2em;}
.tp td.ls{color:#1E50A0;}
.shuru_btn{text-align:center;}
.tp_btn{ background:url(../images/vote/tp_btn.jpg) no-repeat; width:136px; height:59px;margin:20px; border:none;cursor:pointer;}
.votesss .col-left{margin:0px; margin-right:10px;}
.votesss .mg_t10{margin-top:10px;}
.tps .vote_result,.tps .vote_listt{margin:10px 0px;}
|
108wo
|
statics/css/vote.css
|
CSS
|
asf20
| 2,392
|
.ad-gallery {
width: 316px;
}
.ad-gallery, .ad-gallery * {
margin: 0;
padding: 0;
}
.ad-gallery .ad-image-wrapper {
width: 100%;
height: 240px;
position: relative;
overflow: hidden;
}
.ad-gallery .ad-border{border:1px solid #E3E3E3; padding:5px}
.ad-gallery .ad-image-wrapper .ad-loader {
position: absolute;
z-index: 10;
top: 48%;
left: 48%;
border: 1px solid #CCC;
}
.ad-gallery .ad-image-wrapper .ad-next {
position: absolute;
right: 0;
top: 0;
width: 25%;
height: 100%;
cursor: pointer;
display: block;
z-index: 100;
}
.ad-gallery .ad-image-wrapper .ad-prev {
position: absolute;
left: 0;
top: 0;
width: 25%;
height: 100%;
cursor: pointer;
display: block;
z-index: 100;
}
.ad-gallery .ad-image-wrapper .ad-prev, .ad-gallery .ad-image-wrapper .ad-next {
/* Or else IE will hide it */
background: url(../images/yp/non-existing.jpg)\9
}
.ad-gallery .ad-image-wrapper .ad-prev .ad-prev-image, .ad-gallery .ad-image-wrapper .ad-next .ad-next-image {
background: url(../images/yp/ad_prev.png);
width: 30px;
height: 30px;
display: none;
position: absolute;
top: 47%;
left: 0;
z-index: 101;
}
.ad-gallery .ad-image-wrapper .ad-next .ad-next-image {
background: url(../images/yp/ad_next.png);
width: 30px;
height: 30px;
right: 0;
left: auto;
}
.ad-gallery .ad-image-wrapper .ad-image {
position: absolute;
overflow: hidden;
top: 0;
left: 0;
z-index: 9;
}
.ad-gallery .ad-image-wrapper .ad-image a img {
border: 0;
}
.ad-gallery .ad-image-wrapper .ad-image .ad-image-description {
position: absolute;
bottom: 0px;
left: 0px;
padding: 7px;
text-align: left;
width: 100%;
z-index: 2;
background: url(../images/yp/opa75.png);
color: #000; display:none;
}
* html .ad-gallery .ad-image-wrapper .ad-image .ad-image-description {
background: none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (enabled=true, sizingMethod=scale, src='../images/yp/opa75.png');
}
.ad-gallery .ad-image-wrapper .ad-image .ad-image-description .ad-description-title {
display: block;
}
.ad-gallery .ad-controls {
height: 20px; position:relative; margin-top:-20px; z-index:100; padding:0 2px; margin-bottom:10px
}
.ad-gallery .ad-info {
float: left; background-color:#fff; padding:0 5px; font-size:12px; font-family: Arial; font-weight:700 }
.ad-gallery .ad-slideshow-controls {
float: right;
}
.ad-gallery .ad-slideshow-controls .ad-slideshow-start, .ad-gallery .ad-slideshow-controls .ad-slideshow-stop {
padding-left: 5px;
cursor: pointer;
}
.ad-gallery .ad-slideshow-controls .ad-slideshow-countdown {
padding-left: 5px;
font-size: 0.9em;
}
.ad-gallery .ad-slideshow-running .ad-slideshow-start {
cursor: default;
font-style: italic;
}
.ad-gallery .ad-nav {
width: 100%;
position: relative;relative;width:276px; margin-left:20px
}
.ad-gallery .ad-forward, .ad-gallery .ad-back {
position: absolute;
top: 0;
height: 100%;
z-index: 10;
}
/* IE 6 doesn't like height: 100% */
* html .ad-gallery .ad-forward, .ad-gallery .ad-back {
height: 46px;
}
.ad-gallery .ad-back {
cursor: pointer;
left: -20px;
width: 13px;
display: block;
background:#f3f3f3 url(../images/yp/ad_scroll_back.png) 4px 15px no-repeat; border:1px solid #c6c6c6
}
.ad-gallery .ad-forward {
cursor: pointer;
display: block;
right: -20px;
width: 13px;
background:#f3f3f3 url(../images/yp/ad_scroll_forward.png) 4px 15px no-repeat;border:1px solid #c6c6c6
}
.ad-gallery .ad-nav .ad-thumbs {
overflow: hidden;
width: 100%;
}
.ad-gallery .ad-thumbs .ad-thumb-list {
float: left;
width: 9000px;
list-style: none;
}
.ad-gallery .ad-thumbs li {
float: left;
padding-right: 5px;
}
.ad-gallery .ad-thumbs li a {
display: block;
}
.ad-gallery .ad-thumbs li a img {
border: 1px solid #CCC; padding:2px;
display: block; width:60px; height:40px
}
.ad-gallery .ad-thumbs li a.ad-active img {
border: 1px solid #616161;
}
/* Can't do display none, since Opera won't load the images then */
.ad-preloads {
position: absolute;
left: -9000px;
top: -9000px;
}
|
108wo
|
statics/css/jquery.ad-gallery.css
|
CSS
|
asf20
| 5,044
|
body{color:#444; height:100%}a{text-decoration:none; color:#444}
html.off,html.off body {background: #e2e9ea url(../images/admin_img/left_bg.png) repeat-y -40px top;}
html.on,html.on body{background: #e2e9ea; background-image:none;}
html.addbg,html.addbg body{background:#e2e9ea}
a:hover{text-decoration:underline;}
.pad-6{padding:6px; overflow:hidden}.pad-10{padding:10px; overflow:hidden}.pad_10,.pad-lr-10{padding:0 10px}.pad-lr-6{padding:0 6px}
.hr{background: url(../images/uline.gif) repeat-x center center;}
.hr hr{display:none}
.border-none,.border-none-td td,{border:none}
.ib, .ib-li li, .ib-a a, .ib-span span,.common-form ul li span.text,.fixed-bottom .fixed-but .button,.arrowhead,.arrowhead-b,#Skin li,.shortcut a,.shortcut a span,.picBut a,.tab-use{display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline;}
.cut_line span{ color:#4d82bc; padding:0 4px}
.mr6{margin-right:6px}.mr8{margin-right:8px}.mr10{margin-right:10px}.mb6{margin-bottom:6px}.mb8{margin-bottom:8px}.mb10{margin-bottom:10px}
.picBut {background:url("../images/admin_img/picBnt.png") no-repeat 0 -28px;color:#FFF;float:left; text-align:center;font-weight:700;height:28px;line-height:26px;*line-height:30px;margin-right:10px;width:75px}
.picBut a{color:#fff;text-decoration: none; width:75px}
.line-x{border-bottom:1px solid #eee;}
.title-1{border-bottom:1px solid #eee; padding-left:5px}
.title-2{text-align:left;height:34px;*height:33px;font:18px/31px "MicroSoft YaHei","SimHei";color:#333;*line-height:33px; margin:0; padding:8px 0 3px 0px}
body fieldset{border:1px solid #D8D8D8; padding:10px;}
body fieldset legend{padding:3px 8px;font-weight:700;border:1px solid #D8D8D8;background-color: #F9F9F9;}
body fieldset.blue{border:1px solid #dce3ed}
body fieldset.blue legend{padding:3px 8px;font-weight:700;color:#347add; background:none; border:none}
.fixed-bottom{height:60px;_margin-top:12px}
.fixed-bottom .fixed-but{position: fixed;_position: relative; bottom:0;height:30px; border-top:1px solid #f1f1f1; padding:10px 0; width:100%;background: #fff url(../images/admin_img/x_bg.png) repeat-x 0 -100px;}
.fixed-bottom .fixed-but .button,.fixed-bottom .fixed-but .button input{
background: url(../images/admin_img/btn-content.png) no-repeat; border:none; height:32px; line-height:32px; vertical-align:middle; margin:0;}
.fixed-bottom .fixed-but .button{padding:0 0 0 10px; margin:0; margin:0 5px}
.fixed-bottom .fixed-but .button input{padding-right:10px; margin:0;background-position: right top; display:block;color:#004092; font-size:14px; font-weight:700; white-space: nowrap;}
.subnav{ padding:10px}.subnav h2{ margin-bottom:6px}
.explain-col{ border:1px solid #ffbe7a;zoom:1; background: #fffced; padding:8px 10px; line-height:20px}
.vote_bar{width:90%; height:13px; border:1px solid #999}
.vote_bar div{background: url(../images/admin_img/x_bg.png) repeat-x left -194px; float: left; position:relative; height:16px;_height:13px}
.vote_bar div span{ display:block; position:absolute; left:0; top:0; width:180px; text-align:center; height:16px; font-size:10px; line-height:12px; vertical-align:middle}
/*头部*/
.crumbs,.tab-web-panel li a:hover,.tab-web-panel li.on a{background: url(../images/admin_img/icon_use.png) no-repeat}
.header {background:#3a6ea5 url(../images/admin_img/h_bg.gif) repeat-x left bottom; height:80px}
.header .logo{float:left;width:136px;height:80px;margin-right:10px;_margin-right:7px;background: url(../images/admin_img/logo_1.gif) no-repeat;}
.header .logo a{display:block;height:80px;text-decoration: none;}
.header .rt{width:290px;}
.header .nav{ display:block; height:34px; position:relative; bottom:-10px}
.header .col-auto{ overflow:visible}
.header .nav li,
.header .nav li a{background: url(../images/admin_img/nav_bg.png) no-repeat;display:block;_float:left;height:34px; line-height:38px; font-size:14px; font-weight:700}
.header .nav li{float:left;padding:0 0 0 8px}
.header .nav li a{background-position: right top; padding:0 15px 0 7px}
.header .nav li.on{background-position: left -43px;}
.header .nav li.on a{background-position: right -43px; color:#367abb;}
.header .nav li.tab_web{ position:relative}
.header .nav li.tab_web a{ position:absolute;}
.header .nav li.tab_web a,
.header .nav li.tab_web a span{background: url(../images/admin_img/site.png) no-repeat;height:34px;line-height:34px;*line-height:38px;_float: left}
.header .nav li.tab_web{background:none; line-height:38px; vertical-align:middle; padding:0;}
.header .nav li.tab_web a{padding:0;padding-left:10px;cursor: hand;!important;cursor: pointer;white-space: nowrap;}
.header .nav li.tab_web a:hover,.header .nav li.tab_web a.on{text-decoration: none;color:#3a6ea5;background-position: left -40px; }
.header .nav li.tab_web a span{ display:block; padding-right:24px;background-position:right 2px;}
.header .nav li.tab_web a:hover span,.header .nav li.tab_web a.on span{background-position:right -40px;}
.tab-web-panel{ border:1px solid #b3cbe4;zoom:1; padding:1px; background:#fff}
.tab-web-panel li{background:#f0f5f6; margin-top:1px}
.tab-web-panel li a{padding:3px 8px 3px 8px;display:block; padding-right:22px;height:18px;line-height:18px;white-space: nowrap;width:105px}
.tab-web-panel li a:hover,.tab-web-panel li.on a{ background-color:#d5e5f6;background-position:50px -52px;}
.header .col-auto{height:80px}
.header .log{padding:16px 0 0 6px; height:20px}
.header .tab_style{padding:16px 14px 0 0}
#Skin{padding:14px 0 0 0; position:relative; z-index:1000; height:11px; font-size:0;}
#Skin li {cursor:pointer;height:11px;width:14px;_overflow:hidden;background:url(../images/admin_img/skinbt.png) no-repeat;}
#Skin .s1 {background-position:-14px -66px}
#Skin .s2 {background-position:0 -55px}
#Skin .s3 {background-position:0 -33px}
#Skin .s4 {}
/*主体样式*/
.left_menu{margin-right:12px;_margin-right:10px;padding:12px;_padding:12px 0 12px 12px;width:110px; position:relative; display:block;}
.left_menu_on{ width:0; padding:0;}
.left_menu_on div{ visibility:hidden;_display:none}
.left_menu h3{font-weight: 700;color: #275d96;border-bottom:1px solid #d9e4ea; line-height:24px; height:24px; margin-bottom:4px;_width:112px;_margin-right:12px}
.left_menu ul li{width:122px;color:#666; display:block;_margin-right:2px}
.left_menu ul li a{line-height:24px;padding-left:8px;display:block;text-decoration: none;background-color:#f7fbfc;_width:100px;}
.left_menu ul li a:hover,
.left_menu ul li.on,.left_menu h3 span{background: url(../images/admin_img/left_menu.png) no-repeat;text-decoration: none}
.left_menu ul li.on{width:104px; height:29px; padding-left:20px; margin:0}
.left_menu ul li.on a{ height:29px; line-height:29px; background:none; padding:0; display:block}
.left_menu ul li.on a:hover{background:none}
.left_menu ul li a:hover{background-position: left -38px}
.left_menu a.open,.left_menu a.close{background: url(../images/admin_img/left_menu_openClose.png) no-repeat 3px center;width:10px; display:block; position:absolute; z-index:100; height:auto; right:-11px; top:0}
.left_menu a.open:hover,.left_menu a.close:hover{ background-color:#d6e1e4}
.left_menu a.close{background-position:right center}
.left_menu h3 span{background-position: left -78px; display:block; float:right; height:14px; width:14px; margin-top:5px}
.left_menu h3 span.on{background-position: -33px -78px;}
/*当前位置*/
.crumbs{background-position:left -18px; height:22px; padding:6px 0 0 18px;*height:20px;*padding:8px 0 0 18px;}
.shortcut{ float:right; position:relative; top:-3px;*top:-4px;}
.shortcut a{ margin-left:6px; padding-left:6px; color:#0364ae}
.shortcut a,.shortcut a span{background: url(../images/admin_img/bnt_bg.png) no-repeat 0 -83px; height:21px; line-height:21px;*line-height:24px;_line-height:20px; text-align:center;}
.shortcut a span{background-position: right -83px; padding-right:6px;}
/*容器样式*/
.col-tab{ }
.col-tab ul.tabBut{height:27px; padding-left:14px;position:relative;bottom:-1px}
.col-tab ul.tabBut li{float:left; border:1px solid #dce3ed; height:25px; line-height:26px; margin-right:5px;}
.col-tab ul.tabBut li{ background:#eaeef4; padding:0 8px;}
.col-tab ul.tabBut li.on{position:relative; background:#fff;border-bottom:0;height:26px;_height:27px; font-weight:700;}
.col-tab ul.tabBut li.icon{background-image:url(../images/icon/exclamation_small.png);padding-left:18px;background-repeat: no-repeat;background-position: 3px center;}
.col-tab .content{border:1px solid #dce3ed;_zoom:1;}
.col-tab .content-r{border-top:1px solid #dce3ed}
.col-tab .contentList{border:1px solid #dce3ed;_zoom:1;}
.col-1{ border:1px solid #f4f6f5;zoom:1; background:#fff}
.col-1 div.content{border:1px solid #c2d1d8;zoom:1;}
.col-2{ border:1px solid #c7d8ea;zoom:1;}
.col-2 h6{border-bottom:1px solid #c7d8ea; color:#3a6ea5;background: url(../images/admin_img/x_bg.png) repeat-x left -42px; height:26px; line-height:28px; padding:0 10px}
.col-2 div.content{ padding:9px 10px}
/*栏目菜单*/
.cat-menu{ width:180px; margin:10px 8px 0 0; }
.cat-menu div.content{padding-left:8px}
/*收藏导航*/
.fav-nav,.fav-nav span,.fav-nav a{height:28px;line-height:28px;background: url(../images/admin_img/fav-nav-bg.png) repeat-x left top;}
.fav-nav{padding:0 0 0 12px;position: absolute; left:0;bottom:0px;width:100%;}
.fav-nav span{background-position: right -78px;position:relative;display:block;float:left;background-repeat: no-repeat; padding-right:2px}
.fav-nav div{ float:left}
.fav-nav a{padding:0 20px 0 8px; display:block;float:left}
.fav-nav a:hover,.fav-nav a.on{background-position: right -40px;text-decoration: none}
.fav-nav a.panel-delete{padding-right:10px;background: url(../images/cross.png) no-repeat;width:16px; height:16px; padding:0;background-position: center 3px;position:absolute; right:4px; top:7px; z-index:10}
.fav-nav a.panel-add{background-position: right -120px; width:16px; float:left; padding:0; margin-left:5px;_margin-left:3px}
.fav-nav a.panel-add:hover{background-position: center -163px;}
.fav-nav a.panel-delete:hover{background-position: center -46px;}
.fav-nav a.panel-delete em,.fav-nav a.panel-add em{ display:none}
.fav-help{display:none;height:26px; line-height:26px; float:none; background:#fff url(../images/icon/info.png) no-repeat 3px 6px; padding:0 10px 0 24px; position:absolute; top:2px; right:14px}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
.fav-help a.panel-delete{right:2px; top:5px; margin:0}
.fav-help a:hover {color:#CC3300;}
/*内容菜单*/
.content-menu{ padding:0 0 6px}
.content-menu a:hover{text-decoration: none}
.content-menu a em{display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline;}
.content-menu a.add,.content-menu a.add em,
.content-menu a.on,.content-menu a.on em{background: url(../images/admin_img/bnt_bg.png) no-repeat;height:28px; line-height:28px;*line-height:28px}
.content-menu span{color:#ddd; padding:0 8px}
.content-menu a{cursor:pointer;}
.content-menu a.add{ padding:0 0 0 5px;}
.content-menu a.add em{ padding:0 10px 0 5px;color:#fff;background-position: right top}
.content-menu a.on{background-position: left -40px;*background-position: left -41px;_background-position: left -39px; color:#fff; padding:0 0 0 5px;}
.content-menu a.on em{background-position: right -40px;*background-position: right -41px;_background-position: right -39px; padding:0 10px 0 5px}
/*分页*/
#pages { padding:14px 0 10px;font-family:宋体; text-align:right}
#pages a { display:inline-block; height:22px; line-height:22px; background:#fff; border:1px solid #e3e3e3; text-align:center; color:#333; padding:0 10px}
#pages a.a1 { background:url(../images/admin_img/pages.png) no-repeat 0 5px; width:56px; padding:0 }
#pages a:hover { background:#f1f1f1; color:#000; text-decoration:none; }
#pages span { display:inline-block; height:22px;padding:0 10px; line-height:22px; background:#5a85b2; border:1px solid #5a85b2; color:#fff; text-align:center; }
.page .noPage { display:inline-block; height:22px; line-height:22px; background:url(../img/icu/titleBg.png) repeat-x 0 -55px ; border:1px solid #e3e3e3; text-align:center; color:#a4a4a4; }
/*图片列表水平左右居中*/
.img-wrap{border:1px solid #eee;text-align:center;overflow:hidden;background:#fff}
.img-wrap a{display:table-cell;vertical-align:middle;text-align:center;*display:block;}
#imgPreview td.on{background:#f4f9fe}
#imgPreview td.on a{background:url("../images/msg_bg.png") no-repeat right -250px;vertical-align:middle; padding-right:70px;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline; height:16px; line-height:16px}
/*角色权限设置*/
.role-memu{ padding:5px 0}
.role-memu li a{cursor: hand;!important;cursor: pointer;display:block;color:#2e74d7;text-decoration: none; height:24px; padding:0 6px; overflow:hidden; line-height:24px; vertical-align:middle; background-color:#FFF}
.role-memu li a em{ width:80px; overflow:hidden; display:block}
.role-memu li a span{float:right; color: #999}
.role-memu li a span img{ margin-right:2px}
.role-memu li.on a{ background:#e0e9f0}
.role-but,.role-but span{background: url(../images/admin_img/tbtn.png) no-repeat; height:36px; line-height:36px; vertical-align:middle; padding-left:12px; border:none;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline;}
.role-but span{background-position: right top; padding:0 12px 0 0; font-weight:700; font-size:14px; color:#fff}
/*发布内容
.addContent{width:960px; margin:0 auto; overflow:hidden;}
.addContent .col-auto{width:750px;margin-right:6px;_margin-right:5px;}
.addContent .col-right .content h6{ border-bottom:1px solid #cfdce3; padding:8px 0 3px; margin-bottom:7px}
.addContent .col-right .content input{max-width:182px}
.addContent .col-right .content .upload-pic{width:180px;height:170px;text-align:center;overflow:hidden;}
.addContent .col-right .content .upload-pic a{display:table-cell;vertical-align:middle;width:180px;height:145px;text-align:center;*display:block;*font-size:105px}
.addContent .col-right .content .upload-pic{ background:#eef2f2; border:1px solid #dce6ea; zoom:1; padding:1px;}
.addContent .col-right select#template{max-width:188px;*width:188px;_width:188px}
*/
.addContent{width:960px; margin:0 auto; overflow:hidden;}
.addContent .col-auto{}
.addContent .col-right{ width:204px; overflow:hidden; margin-left:6px;}
.addContent .col-right .content h6{ border-bottom:1px solid #cfdce3; padding:8px 0 3px; margin-bottom:7px}
.addContent .col-right .content input{max-width:182px}
.addContent .col-right .content .upload-pic{width:180px;height:180px;text-align:center;overflow:hidden;}
.addContent .col-right .content .upload-pic a{display:table-cell;vertical-align:middle;width:180px;height:145px;text-align:center;*display:block;*font-size:105px}
.addContent .col-right .content .upload-pic{ background:#eef2f2; border:1px solid #dce6ea; zoom:1; padding:1px;}
.addContent .col-right select#template{max-width:188px;*width:188px;_width:188px}
.list-dot{ padding-bottom:10px}
.list-dot li,.list-dot-othors li{padding:5px 0; border-bottom:1px dotted #c6dde0; font-family:"宋体"; color:#bbb; position:relative;_height:22px}
.list-dot li:hover,.list-dot-othors li:hover{ background-color:#d9e5ee}
.list-dot li span,.list-dot-othors li span{color:#004499}
.list-dot li a.close span,.list-dot-othors li a.close span{display:none}
.list-dot li a.close,.list-dot-othors li a.close{background: url(../images/cross.png) no-repeat left 3px; display:block; width:16px; height:16px;position: absolute;outline:none;right:5px; bottom:5px}
.list-dot li a.close:hover,.list-dot-othors li a.close:hover{background-position: left -46px}
.list-dot-othors li{float:left;width:24%;overflow:hidden;}
/*评论*/
.comment{ padding:8px 10px}
.comment .title{ margin-bottom:5px}
.comment .title span{ position:relative; top:-5px}
.comment .content{ font-size:14px; background:#f6f9fb; border:1px solid #c4d5df; zoom:1; padding:8px 10px; margin:5px 0}
.comment .content span{display:block;}
.comment_button{margin-bottom:15px;}
.comment_button a{padding:5px; border:solid 1px #C3D4E7; }
.comment_button a.on{background:#4C7FB6; color:#fff;border:solid 1px #3E73A9}
/*圆角*/
.fillet{position:relative; border:1px solid #c4d5df; zoom:1;}
.fillet span.o1,
.fillet span.o2,
.fillet span.o3,
.fillet span.o4{position:absolute;width:3px;height:3px; font-size:1px;background: url(../images/fillet.png) no-repeat}
.fillet span.o1{background-position: left -6px; top:-1px; left:-1px}
.fillet span.o2{background-position: right -6px; top:-1px; right:-1px}
.fillet span.o3{background-position: left bottom; bottom:-1px; left:-1px}
.fillet span.o4{background-position: right bottom; bottom:-1px; right:-1px;}
/*工作流*/
.workflow{padding:10px 140px 10px 10px;}
.workflow .col{padding-bottom:20px;background: url(../images/admin_img/arrowhead-y.png) no-repeat 10px bottom;}
.workflow div.off{padding:0; background:none}
.workflow .content{left:130px; position:relative;}
.workflow .title{position:absolute; left:-130px; top:-1px; width:90px; font-size:14px; font-weight:700; text-align:center; padding: 0 0 3px 0; background:#fff}
.workflow .title span.line{border-bottom:1px solid #95b9cf; width:32px; height:1px; font-size:1px; position:absolute; right:-37px; top:17px}
.workflow .fillet{background:#f6f9fb; padding:8px 10px 7px}
.workflow .name{font-size:14px}
/*锁频*/
.ScreenLock {background-color:#3a6ea5;background-image:url("../images/admin_img/ScreenLock.png")}
.ScreenLock {background-position:50% 50%;background-repeat:no-repeat;height:100%;left:0;position:absolute;top:0;width:100%;z-index:2000}
.ScreenLock .inputpwd {font-size:14px;height:134px;left:50%;margin:-102px 0 0 -150px;padding:28px;position:absolute;top:50%;width:280px}
.ScreenLock h5{ height:60px; line-height:60px; padding-top:10px; padding-left:40px;background:url(../images/msg_img/msg_bg.png) no-repeat 0px -476px;}
.ScreenLock .input-text{border:1px solid #A7A6AA;height:18px;margin:0 5px 0 0;padding:2px 0 2px 5px;border: 1px solid #d0d0d0;background: #FFF url(../images/admin_img/input.png) repeat-x; font-family: Verdana, Geneva, sans-serif,"宋体";font-size:12px;}
.ScreenLock .submit{ background: url(../images/admin_img/ScreenLockBut.png) no-repeat; height:24px; width:55px;cursor:hand;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline; border:none}
/*网站地图*/
.map-menu ul{margin:4px;width:156px;border:1px solid #A4C0F7;}
.map-menu ul li.title{background:#EDF2F8;font-weight:bold;padding-left:5px;}
.map-menu ul li.title2{font-weight:bold;padding-left:10px;}
.map-menu ul li{padding:4px;padding-left:20px;}
/*附件 未使用-已使用*/
.tab-use{ position: relative}
.tab-use .arrows{background: url(../images/admin_img/toggle-collapse-dark.png) no-repeat; width:16px; height:16px; overflow:hidden; position:absolute; left:0; top:-11px;}
.tab-use ul{ position:absolute; display:none; top:5px; left:0; width:80px}
.tab-use ul li{}
.tab-use ul a{ width:auto;padding:3px 8px}
|
108wo
|
statics/css/system.css
|
CSS
|
asf20
| 19,243
|
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{margin:0;padding:0;word-wrap:break-word}
body,html,input{font:12px/1.5 tahoma,arial,\5b8b\4f53,sans-serif;}
table{border-collapse:collapse;border-spacing:0;}img{border:none}
pre {white-space: pre-wrap; /* css-3 */white-space: -moz-pre-wrap; /* Mozilla, since 1999 */white-space: -pre-wrap; /* Opera 4-6 */white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */}
h1,h2,h3,h4,h5,h6{font-size:100%;}input.dialog{height:0; height:0; font-size:0; line-height:0; border:none}
h1{font-size:34px;}h2{font-size:26px;}h3{font-size:18px; }h4{font-size:16px;}h5{font-size:14px;}h6{font-size:12px;}
input,label,img,th{vertical-align:middle;}.font-fixh{font-family: Georgia,Arial; color: #f00; font-size: 16px; font-weight: 700;}address,cite,dfn,em,var{font-style:normal;}
code,kbd,pre,samp{font-family:courier new,courier,monospace;}
input.button ,input.btn{padding:0.25em;width: auto;_width:0;overflow:visible !ie;}
ul,ol,li{list-style:none;}
a{text-decoration:none;}
a:hover{text-decoration:underline;}
.white,.white a{color:#fff}.blue,.blue a{color:#004499}.gray4,a.gray4{color:#999}
.red, .red a, a.red{color:red;}.green{color:#0E774A}
select optgroup{color:#CAC8BB;}
header{ display:block}
/*通用样式*/
.hidden{display:none;}.invisible{visibility:hidden;}
.ib,.ib-a a{display:inline-block;zoom:1;*display:inline;}
.clear:after,.main:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.clear,.main{display:inline-block;}/* Hides from IE-mac \*/* html .clear,* html .main{height:1%;}.clear,.main{display:block;}
.f12{font-size: 12px}.f14{font-size: 14px}.f16{font-size: 16px}.f18{font-size:18px}.f20{font-size:20px}
.lh20{line-height: 20px}.lh22{line-height: 22px}.lh24{line-height: 24px}.lh26{line-height: 26px}.lh28{line-height: 28px}
.fb{ font-weight:bold}.fn{ font-weight:normal}
.bk,.bk3,.bk6,.bk8,.bk10,.bk15,.bk20,.bk30{clear: both;font-size: 1px;height: 0;line-height: 1px}
.bk3{height: 3px;}.bk6{height: 6px}.bk8{height: 8px}.bk10{height: 10px}.bk15{height: 15px}.bk20{height: 20px}.bk30{height: 30px}
.row-2 li{ float:left; width:50%}.row-3 li{ float:left; width:33%}.row-4 li{ float:left; width:25%}.row-5 li{ float:left; width:20%}
.cu,.cu-li li,.cu-span span {cursor: hand;!important;cursor: pointer}
.text-c{text-align: center}.text-l{text-align: left}.text-r{text-align: right}
.lf{float: left}.rt{float: right}.pr{ position:relative}.pa{ position:absolute}
.img-wrap{border:1px solid #eee;text-align:center;overflow:hidden}
.img-wrap a{display:table-cell;vertical-align:middle;*display:block; overflow:hidden; background-color:#fff}
.img-wrap a:hover{ background-color:#e8eff6}
.col-left{float:left}
.col-auto{overflow:hidden;_zoom:1;_float:left;}
.col-right{float:right}
|
108wo
|
statics/css/reset.css
|
CSS
|
asf20
| 2,883
|
div{overflow:hidden; *display:inline-block;}div{*display:block;}
.login_box{background:url(../images/admin_img/login_bg.jpg) no-repeat; width:602px; height:416px; margin:auto; overflow:hidden;}
.login_iptbox{margin-top:295px;*margin-top:297px; height: 26px; line-height:26px; margin-left: 68px;}
.login_iptbox .ipt{border:none; margin-top: 4px; height: 20px; width: 90px; margin-right:62px; *margin-right:60px; background:none;font-size:12px;}
.login_iptbox img{ cursor:pointer;}
.login_iptbox .ipt_reg{margin-left:12px;width:46px; margin-right:16px;}
.login_tj_btn{ background:url(../images/admin_img/login_dl_btn.jpg) no-repeat 0px 0px; width:52px; height:24px; margin-left:16px; _margin-left:8px; border:none; cursor:pointer; padding:0px; float:right;margin-right:20px;
margin-top:2px;}
.cr{ margin-top:22px;font-size:12px;font-style:inherit;text-align:center;color:#ccc;}
.login_box{position: fixed;top: 25%;left: 50%; margin:0 0 0 -301px;_position:absolute;}
|
108wo
|
statics/css/login.css
|
CSS
|
asf20
| 980
|
body{color:#444;background: #eee url(../images/v9/body-bg.png) repeat-y center}
a{text-decoration:none; color:#444}
a:hover{text-decoration:underline; color:#1E50A2}
.blue,blue a,.box h5 a,.box h6 a,.box a.more,.crumbs a{ color:#004499}
.keylink,.keylink:link,.keylink:hover,.keylink:active {text-decoration:underline;width:26px; height:22px; line-height:22px; background:#fff; border:1px dotted #aaa; text-align:center}
textarea{border:1px solid #DCDDDD; background:#fff;clear:both;color:#555;font-size:14px;height:130px;padding:5px 0 0 5px;text-align:left;width:99%; margin-bottom:8px}
.input-text,input.date,input.endDate,.input-focus{border:1px solid #DCDDDD; height:22px; padding:0 0 0 3px}
input.date,input.endDate{background: #fff url(../images/admin_img/input_date.png) no-repeat right 3px; padding-right:18px;font-size:12px;}
.pad-6{padding:6px; overflow:hidden}.pad-10{padding:10px; overflow:hidden}.pad_10,.pad-lr-10{padding:0 10px}.pad-lr-6{padding:0 6px}
.hr{background: url(../images/uline.gif) repeat-x center center;}
.hr hr{display:none}
.ib, .ib-li li, .ib-a a, .ib-span span,.btn,.btn input,.photo-hot li,.Article-Tool a ,.photo-list li,.photo-channel .photo-slide .change i,.photo-channel .tool .auto,.photo-channel .tool .up,.photo-channel .tool .next,.photo-cat .content h5 span.blue a,.submit{display:inline-block;zoom:1;*display:inline;}
.body-top,.header,.header .logo{background: url(../images/v9/body-top.png) repeat-x left -115px;}
.body-top{height:26px; background-color:#eee; vertical-align:middle}
.body-top .login{ float:right}
.body-top .login span{ color:#CCC}
.body-top .login a.rss{width:32px; float:right;overflow:hidden; text-indent:-222px;background: url(../images/icon/rsso.gif) no-repeat left center; margin-left:8px}
.body-top .content{ margin:auto; width:960px;}
.special-body-top{height:38px;background-position: left -104px; background-color:#fff}
.special-body-top a.logo{background: url(../images/v9/special-show.png) no-repeat right center; padding-right:58px; float:left; display:block}
.special-body-top .content{ padding:2px 0}
.special-body-top .nav{ float:left; padding:10px 0 0 12px}
.special-body-top .nav span{ padding:0 8px; color:#CCC}
body fieldset{border:1px solid #D8D8D8; padding:0 10px 10px;*padding:10px;}
body fieldset legend{padding:3px 8px;font-weight:700;}
body fieldset.blue{border:1px solid #dce3ed}
body fieldset.blue legend{padding:3px 8px;font-weight:700;color:#347add; background:none; border:none}
/* 通用按钮 */
.btn{ padding-left:6px}
.btn,.btn input{background: url(../images/v9/button.png) no-repeat; height:24px; line-height:24px;width:auto;_width:0;overflow:visible !ie}
.btn input{background-position: right 0; border:0 none; color:#fff; padding-right:6px;_height:25px}
.submit{padding-left:3px}
.submit,.submit input{ background: url(../images/member/but.png) no-repeat; height:29px;width:auto;_width:0;overflow:visible !ie}
.submit input{background-position: right top; border:none; padding:0 10px 0 7px; font-size:14px}
/* 页面宽度 (更改页面宽度后,需要更改“images/v9/body-bg.png”图片的宽度) */
.header,.main,.footer{width:960px;margin:0 auto;}
/* 头部 */
.header{padding:10px 7px;background-position: left -142px}
.header .logo{float:left;background-position: right -10px;background-repeat: no-repeat; padding:0 20px 0 10px; height:70px; text-align:center;*font-size:40px;}
.header .logo a{display:table-cell;vertical-align:middle;text-align:center;*display:block; height:70px; float:left}
.header .search{ float:left; width:360px;_width:auto; padding-left:20px; height:70px}
.header .search .tab{ padding:3px 0}
.header .search .tab span{ color:#ddd}
.header .search .tab a{ color:#6f7172}
.header .search .tab a.on{ font-weight:700}
.header .search .bd{ background:#ededed; padding:5px; float:left;}
.header .search .text{border:1px solid #e5e5e7;padding:4px 0 3px 40px; height:18px;width:210px;background:#fff url(../images/v9/icon.png) no-repeat}
.header .search .button{ background:#3a6ea5; border:none; color:#fff; height:1.9em;margin-left:3px;width:4.2em; margin-left:6px;vertical-align:middle; text-align:center}
.header .banner{ overflow:hidden;zoom:1;_float:right; text-align:right; }
/* 导航 */
.header .nav-bar{clear:both; height:33px}
.header .nav-bar,.header .nav-bar map,.header .nav-site,.header .nav-site li.line,.header .subnav{background: url(../images/v9/nav.png) no-repeat}
.header .nav-bar map{background-position: right -130px; display:block}
.header .nav-site{height:33px;background-position: left -65px;background-repeat: repeat-x; margin:0 5px; padding-left:5px}
.header .nav-site li{float:left; height:33px; line-height:33px; padding:0 5px; }
.header .nav-site li a{color:#fff; font-size:14px; font-weight:700;*display:block}
.header .nav-site li.line{background-position: 2px -215px; padding:0; width:10px; text-indent:-10000px}
.header .subnav{ padding-left:16px; border-left:1px solid #d2dfed;border-right:1px solid #d2dfed;background-position: left -33px;background-repeat: repeat-x; height:32px; line-height:32px}
.header .subnav a{ color:#004499}
.header .subnav span{ padding:0 3px; color:#c8d8e9;}
/* main style */
.main{}
.main .col-left{width:700px; margin-right:10px}
.news-hot{background: url(../images/v9/hot_bg.png) no-repeat;float:left; width:380px; margin-right:9px; height:380px}
.main .col-left .slide{overflow:hidden;_float:left;zoom:1}
/* 通用容器 */
.box{border:1px solid #c3d4e7;zoom:1; overflow:auto; padding-bottom:10px}
.box h5,.box h6{background: url(../images/v9/title.png) no-repeat right top;color:#1e50a2; height:26px; margin-bottom:10px; line-height:26px; padding-left:10px;border-bottom:1px solid #dce7f3; position:relative}
.box h6{ margin-bottom:0}
.box h5.title-1,.box h6.title-1{background-position: right -52px}
.box h5.title-2,.box h6.title-2{background-position: right -100px}
.box h5.title-2 span.tab{float:right; padding-right:6px; color:#a4bcd6}
.box h5.title-2 span.tab span{ color:#2064ae;cursor: hand;!important;cursor: pointer}
.box a.more{ font-size:12px; font-family:"宋体"; margin-right:8px; font-weight:normal; position:absolute;top:0; *top:1px;_top:1px; right:0}
.box .content{ padding:0 10px; overflow:auto}
/* 默认幻灯片 */
.FocusPic{zoom:1;position:relative; overflow:hidden}
.FocusPic .content{overflow:hidden}
.FocusPic .changeDiv a{position:absolute;top:0px;left:0px;display:none;}
.FocusPic .title-bg,.FocusPic .title{position:absolute;left:0px;bottom:0;width:434px;height:30px;line-height:30px;overflow:hidden}
.FocusPic .title-bg{background:#000;filter:alpha(opacity=50);opacity:0.5;}
.FocusPic .title a{display:block;padding-left:15px;color:#fff; font-size:14px;}
.FocusPic .change{bottom:4px;height:20px;right:3px;*right:5px;_right:4px;position:absolute;text-align:right;z-index:9999;}
.FocusPic .change i {background:#666;color:#FFF;cursor:pointer;font-family:Arial;font-size:12px;line-height:15px;margin-right:2px;padding:2px 6px; font-style:normal; height:15px;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline;}
.FocusPic .change i.cur {background:#FF7700;}
/* 滚动公告 */
#announ{ height:22px; line-height:22px; overflow:hidden; float:left;background: url(../images/v9/icon.png) no-repeat left -461px; padding-left:20px}
/* 首页 */
.extend{ padding:0;}
.extend img{ margin:1px}
.extend .col-left{background: url(../images/v9/extend.png) no-repeat;height:36px; width:22px; color:#fff; text-align:center; padding-top:3px; font-weight:700; margin-right:6px}
.extend .col-auto{ font-family:"宋体"; color:#CCC;; padding:4px 0 0 0; height:40px}
.box .news-photo{padding:0 0}
.box .news-photo li{ float:left; width:139px; text-align:center; padding:5px 0; vertical-align:top}
.box .news-photo li div.img-wrap{ width:110px; margin:auto; margin-bottom:5px; height:85px;}
.box .news-photo li div.img-wrap a{ width:110px; height:85px;*font-size:62px;}
/*new-hot*/
.news-hot{}
.news-hot .content{ padding:16px 10px 0 16px}
.news-hot .content h4{ padding:1px 0 5px 5px; font-size:18px; font-family:"宋体",Verdana;}
.news-hot p {color:#777}
.news-hot p img{ float:left; margin-right:10px}
/* special */
.box{ background-color:#fff}
.box .special p{overflow:auto; margin-top:14px}
.box .special p img{margin-right:10px; float:left}
/* Digg */
.box .digg{background: url(../images/v9/num_list.png) no-repeat 10px 5px; padding-left:30px}
.box .digg li{ height:24px; line-height:24px; overflow:hidden; position:relative}
.box .digg li span{background:#fff url(../images/v9/icon.png) no-repeat 0 -67px; position:absolute; right:0; top:0; padding:0 0 0 13px; width:30px}
/* vote */
.box .vote h4{ font-size:14px; font-weight:normal}
.box .vote label{display:block; line-height:22px}
.box .vote .btn{ margin:6px 12px 0 0}
/* rank */
.rank li{background: url(../images/uline.gif) repeat-x left top; clear:both;margin-top:-1px; overflow:hidden;*height:57px;}
.rank li span{float:left;font-family:Arial,Helvetica,sans-serif;font-size:18px;font-style:italic;height:58px;color:#1E50A2;line-height:58px;overflow:hidden;padding-right:10px;text-align:right;width:60px;background: url(../images/v9/rank.png) no-repeat right 10px;}
.rank li a.title{padding:9px 0 0; display:block; margin-left:76px}
/*board*/
.list{ font-family:"宋体"; color:#888;}
.list li span{font-size:12px; padding:0 6px}
.cat-area{width:343px; float:left}
.cat-area .content p img{ margin-right:10px; float:left}
.cat-area .content p{color:#777; height:75px; overflow:hidden}
.cat-area .content p strong{ font-size:14px; color:#333}
/* Blogroll */
.blogroll {}
.blogroll h5{ background:none; font-size:12px; margin:0 2px}
/* 当前位置 */
.crumbs{background: url(../images/v9/icon.png) no-repeat left -38px; padding:3px 0 3px 18px; font-family:"宋体"; border-bottom:1px solid #c3d4e7; margin-bottom:10px}
.crumbs span{color:#7e7e7e}
/* 栏目信息搜索 */
.search-form{ background-color:#FFFCED;border:1px solid #FFBF7A; padding:5px 10px; overflow:hidden;zoom:1}
.search-form li{ float:left; padding:5px 12px 5px 0; height:24px; line-height:24px; white-space:nowrap}
.search-form li.bk{ float:none; height:1px; line-height:1px; overflow:hidden; padding:0}
.search-form *{vertical-align: middle}
.search-form label{ padding:0 8px 0 0}
.search_term{line-height:28px}
.search_term th{ font-weight:normal; text-align:right; padding-right:8px; color:#666; width:70px}
.search-list li{border-bottom:1px dashed #ccc;margin:6px 0 0; padding:10px 0; overflow:hidden}
.search-list li img{float:left; margin-right:8px}
.search-list li p{ color:#999}
.search-point{background-color:#E6F1FB; padding:6px 10px; margin:10px 0}
/* 新闻频道 */
.main .channel-hot{width:450px}
.channel-hot .news-hot,.channel-hot .news-hot .icon,.photo-slide,.photo-channel .photo-hots,.box-hots,.box-hots .icon,.photo-channel .photo-hots .icon,.photo-channel .photo-cat,.photo-channel #Article,.photo-channel .relevance,.comment{background: url(../images/v9/cat_hot_bg.png) repeat-x left -38px}
.channel-hot .news-hot,.photo-channel .photo-hots,.photo-channel .photo-cat,.box-hots{width: auto; position:relative; border:1px solid #c3d4e7; margin:0; height:302px}
.channel-hot .news-hot .icon,.photo-channel .photo-hots .icon,.box-hots .icon{position:absolute;top:0px;left:0;width:37px;height:37px;background-position: left top;background-repeat: no-repeat}
.channel-hot .news-hot{width:450px}
.channel-hot .news-hot div.hr{width:422px}
.channel-slide{border:1px solid #c3d4e7; padding:3px}
.channel-slide .thumb{ width:94px; float:left}
.channel-slide .thumb li{ margin-top:4px; position:relative}
.channel-slide .thumb li a .icon{display:none}
.channel-slide .thumb li.on a .icon{position:absolute;top:25px;right:-2px;background: url(../images/v9/channel_slide.png) no-repeat; width:8px; height:8px; display:block}
.channel-slide .thumb li img{border:3px solid #fff}
.channel-slide .thumb li.on img{border-color:#6e96be}
.channel-slide .photo{ overflow:hidden;_float:left;_zoom:1; position:relative; width:398px;_width:392px; height:234px}
.channel-slide .photo li{ display:none; position:absolute; top:0; left:0}
.channel-slide .title{ height:60px;background: url(../images/v9/channel_slide.png) repeat-x left -17px}
.channel-slide .title p{ padding:8px 10px 0; color:#666; display:none}
.channel-slide .title p strong{font-size:18px; color:#0066cc; line-height:22px}
/* 图片频道 - photo */
.photo-channel .photo-slide{ width:435px; padding:5px;border:1px solid #c3d4e7;zoom:1;}
.photo-channel .photo-slide .FocusPic .title-bg,.photo-channel .photo-slide .FocusPic .title{ bottom:35px}
.photo-channel .photo-slide .change{bottom:0px; left:0; text-align:left; height:30px;}
.photo-channel .photo-slide .change i{background: url(../images/v9/focusBg.gif) no-repeat right top; width:39px; height:30px; text-align:center; padding:0; margin-right:8px; line-height:30px;color:#049}
.photo-channel .photo-slide .change i.cur{background-position: left top; color:#fff; font-weight:700}
.photo-channel .photo-hots,.box-hots{float:left; width:242px; margin-right:10px;_margin-right:5px; height:auto; overflow:hidden;padding-bottom:5px;}
.photo-channel .photo-hots h4, .box-hots h4{text-align:left;height:26px;*height:25px;font:18px/26px "MicroSoft YaHei","SimHei";color:#457bb4;*line-height:25px;margin:0; padding:5px 0 0px 30px}
.photo-channel .photo-cat{ position:relative; height:auto}
.photo-cat .content h5 a,.photo-cat .content h5 a strong{background-image: url(../images/v9/title_photo.png);background-repeat: no-repeat; height:35px; padding-left:10px;display:block; float:left;text-decoration: none;}
.photo-cat .content{padding-bottom:6px}
.photo-cat .content h5 a strong{background-position: right top; padding-right:14px; color:#fff; float:left; line-height:35px}
.photo-cat .content h5{position:absolute;left:14px; top:-4px; width:98%}
.photo-cat .content h5 span{ font-size:12px; font-weight:normal; padding-left:12px; line-height:38px}
.photo-cat .content h5 span.blue a{ background-image:none; float:none; padding:0 4px; height:auto}
.photo-cat .content h5 span.blue a:hover{ color:#F30}
.photo-cat .content h5 span.blue a.more{ float:right}
.photo-cat .photo-list{ padding-top:45px}
.photo-list li{ vertical-align:top; width:188px;*width:191px; text-align:center; padding-bottom:12px}
.photo-list li div.img-wrap{ width:160px; height:120px; margin:auto; margin-bottom:3px}
.photo-list li div.img-wrap a{ width:160px; height:120px;*font-size:88px;}
/*专题*/
.special-channel .box-hots{ width: auto; float:none; margin:0}
.special-channel .box-hots .content{ padding:10px}
.special-channel .special-slide{position:relative}
.special-channel .special-slide .change{ position:absolute; top:0px; right:0px;height:8px;font-size:0}
.special-channel .special-slide .change i{background: url(../images/v9/special-slide.png) no-repeat top right; width:8px; height:8px; text-indent:-1000px; font-size:0; margin-left:6px; display: block; float:left;cursor: hand;!important;cursor: pointer}
.special-channel .special-slide .change i.cur{background-position: left top;}
.special-channel .special-slide .changeDiv{ overflow: auto; padding:10px 0 0 10px}
.special-channel .special-slide .changeDiv a{ position:absolute; width:660px; display:none}
.special-channel .special-slide .changeDiv a img{ float:left; margin-right:10px}
.special-channel .header{ overflow:hidden; padding:0}
.special-channel .new{ width:315px}
.special-channel .img-text .intro{ padding:6px 8px}
.special-channel .img-text .news-hot{ background-image:none; width:auto; padding:10px 0 0 0; margin:0; height:auto}
.special-channel .img-text{width:385px}
.special-channel .img-text .box a.title{ padding:6px 0 3px; display:block}
.special-channel .img-text .vote{ padding:0}.special-channel .img-text .vote .content{ padding:0 8px 10px}
.special-channel .int{ background-color:#f5f5f5; padding:8px 10px}
.special-channel .int .box{ padding:8px 10px; height:374px; overflow:hidden}
.special-channel .int .box h4{ font-size:12px; font-weight:normal}
.special-channel .int .box p{ color:#979090}
.special-channel .news-photo li{ width:156px}
/*RSS*/
.rss-channel{background: url(../images/v9/rss_bg.png) repeat-x left 38px;}
.rss-channel .header,.rss-channel .navlist .memu .content div,.rss-channel .navlist .memu .content ul li,.rss-channel .xml .rss dt,.rss-channel .xml a.xmlbut,.rss-channel .xml .rss dd a{background: url(../images/v9/rss.png) no-repeat;}
.rss-channel .header{height:88px; overflow:hidden}
.rss-channel .special-body-top a.logo{background-image:none; padding-right:0px}
.rss-channel .box h5,.rss-channel .box h6{ position:static}
.rss-channel .main{overflow:visible; background-color:#fff}
.rss-channel .navlist{width:200px}
.rss-channel .navlist .memu{padding:0}
.rss-channel .navlist .memu .content {padding:1px 1px 0}
.rss-channel .navlist .memu .content div{background-color:#dae7f4;height:24px;line-height:24px;margin-bottom:1px;font-weight:700;background-position: 18px -216px; padding-left:26px}
.rss-channel .navlist .memu .content div.color{ background-color:#eaf2f9}
.rss-channel .navlist .memu .content div.on{background-position: 16px -188px;}
.rss-channel .navlist .memu .content ul{display:none; line-height:22px; padding:3px 0 3px 30px}
.rss-channel .navlist .memu .content ul li{background-position: left -161px;_background-position: left -165px; padding-left:10px; height:22px}
.rss-channel .navlist .memu .content ul li.on,.rss-channel .navlist .memu .content ul li:hover{background-position: left -140px; color:#F60}
.rss-channel .rsslist{ width:730px}
.rss-channel .rsslist .box{ width:358px; float:left; overflow:visible}
.rss-channel .xml{ float:right; font-size:12px; font-weight:normal; }
.rss-channel .xml a.xmlbut{background-position: left -116px; display:block; width:24px; font-size:1px; text-indent:-1000px; float:left; height:15px; margin-right:5px; overflow:hidden; margin-top:4px}
.rss-channel .xml .rss{float:left; position:relative; z-index:1}
.rss-channel .xml .rss dl{ overflow:hidden; height:26px;width:65px;}
.rss-channel .xml .rss dt{background-position: -28px -116px; padding-left:18px;height:21px; line-height:17px; margin-top:5px;}
.rss-channel .xml .rss dd{height:16px; line-height:16px; padding:5px 0}
.rss-channel .xml .rss dd a{ padding-left:14px;background-position: 5px -258px;}
.rss-channel .xml .cur{width:65px; z-index:2}
.rss-channel .xml .cur dl{width:65px;border:1px solid #C3D4E7; position: absolute; top:-1px; right:-1px; background-color:#fff; z-index:999;overflow:visible; height:auto}
.rss-channel .xml .cur dd{border-top:1px dashed #DCDDDD;}
/* 内容 */
#Article{ overflow:hidden}
#Article,.photo-channel .relevance{ border:1px solid #C3D4E7;zoom:1; padding:0 20px}
#Article h1{color:#000;font:800 26px/30px "宋体",arial;margin-bottom:6px; text-align:center; padding:16px 0 8px; border-bottom:1px solid #e5e5e5}
#Article h1 span{ font-size:12px; font-weight:normal; line-height:20px; color:#999}
#Article .content{ font-size:14px}
#Article .content p{font-size:14px;line-height:23px;text-align:justify;word-wrap:break-word; padding:8px 0}
#Article .related{ border-top:dashed 1px #ccc; margin-top:15px}
#Article .related h5{padding-bottom:4px}
#Article .related{ padding:10px 0 0}
#Article .related a{ color:#0b3b8c}
.Article-Tool{ border:1px solid #c3d4e7; position:relative; top:-1px; text-align:right; padding:8px; vertical-align:middle; height:15px; background-color:#f4f8fd}
.Article-Tool a{width:16px;height:16px;line-height:16px;background: url(../images/v9/icon.png) no-repeat; margin-left:6px;}
.Article-Tool a:hover{text-decoration: none}
.Article-Tool a.t,.Article-Tool a.t6{background-position: left -336px; width:auto; padding-left:16px; color:#8896b1}
.Article-Tool a.t1{background-position: left -115px;}
.Article-Tool a.t2{background-position: left -159px;}
.Article-Tool a.t3{background-position: left -205px;}
.Article-Tool a.t4{background-position: left -250px;}
.Article-Tool a.t5{background-position: left -294px;}
.Article-Tool a.t6{background-position: left -421px;padding-left:18px;}
/*关键字提示*/
.point{border:1px solid #ffbf7a; background:#fffced; position: absolute; z-index:1000; width:auto;}
.point .arro{position:absolute; top:-9px;*top:-13px; left:97px; width:18px; height:9px;background: url(../images/v9/key_float.png) no-repeat;}
.point .contents{padding:8px 10px; text-indent:0;margin-right:10px;font-weight:normal;}
.point a.close span{display:none}
.point a.close{background: url(../images/cross.png) no-repeat left 3px; display:block; width:16px; height:16px;position: absolute; right:4px; top:4px;*top:0px;_top:0px;outline:none;}
.point a.close:hover{background-position: left -46px}
.point span.o1,
.point span.o2,
.point span.o3,
.point span.o4{position:absolute;width:3px;height:3px;background: url(../images/fillet.png) no-repeat; line-height:0; font-size:0}
.point span.o1{background-position: left top; top:-1px;*top:-5px; left:-1px;}
.point span.o2{background-position: right top; top:-1px;*top:-5px; right:-1px}
.point span.o3{background-position: left -3px; bottom:-1px;*bottom:3px; left:-1px}
.point span.o4{background-position: right -3px; bottom:-1px;*bottom:3px; right:-1px;}
/*图片内容*/
.photo-channel #Article .tool{ position:relative; height:35px; padding-top:6px}
.photo-channel #Article .tool .auto,.photo-channel .tool .up,.photo-channel .tool .next{background: url(../images/v9/up-next.png) no-repeat; height:27px; width:31px;margin-right:10px; overflow:hidden; line-height:27px}
.photo-channel #Article .tool .auto span,.photo-channel .tool .up span,.photo-channel .tool .next span{ visibility:hidden}
.photo-channel #Article .tool .auto{background-position: -39px top;}
.photo-channel #Article .tool .next{background-position: -78px top;}
.photo-channel #Article .Article-Tool{ position:absolute; right:0; border:none; background:none; font-size:12px; font-weight:normal}
.photo-channel #Article .tool .stat{ color:#999;}
.photo-channel #Article .big-pic{ text-align:center; padding:10px 0; border:1px solid #ededed; background-color:#fafcfe; position: relative}
.photo-channel #Article .big-pic #big-pic{display:table-cell;vertical-align:middle;*display:block; overflow:hidden;*font-size:480px; width:896px; height:650px}
.photo-channel #Article .big-pic .max{ position:absolute; bottom:0px; right:0px;background: #FFF url(../images/v9/max.png) no-repeat 5px center; z-index:101; padding:5px 5px 5px 20px}
.photo_prev{position:absolute;left:0;top:0;width:50%;height:100%;z-index:100}
.photo_next{ position:absolute; right:0; top:0; width:50%; height:100%; z-index:100}
.photo_prev a,.photo_next a{background-image: url(../images/blank.gif);display:block; width:100%; height:100%; outline:none;}
#Article .list-pic{ padding:22px 0 16px; height:100px}
#Article .cont{overflow:hidden; float: left; width:616px; height:80px}
#Article .cont li{ float:left; width:123px; text-align:center; display:block; overflow:hidden}
#Article .cont li .img-wrap{width:100px; height:75px; margin:0 auto;}
#Article .cont li .img-wrap a{*font-size:55px;width:100px; height:75px;outline: medium none;}
#Article .cont li.on .img-wrap{ border:2px solid #ffb017}
#Article .list-pic .pre,#Article .list-pic .next{float:left; display:block; position:relative;background: url(../images/v9/pic_bg.png) no-repeat;width:110px;height:86px; text-align:center}
#Article .list-pic .pre{ left:-8px;top:-3px; margin-right:14px}
#Article .list-pic .next{ right:-8px; float:right;top:-3px}
#Article .list-pic .pre .img-wrap,#Article .list-pic .next .img-wrap{width:102px; height:72px;border:none; padding:4px 0 8px}
#Article .list-pic .pre .img-wrap a,#Article .list-pic .next .img-wrap a{*font-size:53px;width:98px; height:72px; padding:0px 5px 0 4px;*padding:0px 5px 5px 0px }
#Article .list-pic .pre .img-wrap a:hover,#Article .list-pic .next .img-wrap a:hover{ background:none}
#Article .list-pic .next{ right:-8px; float:right;bottom:-2px}
#Article .pre-bnt,#Article .next-bnt{margin-top:3px;cursor: hand;!important;cursor: pointer}
#Article .pre-bnt,#Article .next-bnt,#Article .pre-bnt span,#Article .next-bnt span{background: url(../images/v9/big-btn.png) no-repeat; display:block; width:17px; height:69px; float:left;}
#Article .pre-bnt:hover, #Article .next-bnt:hover,#Article .pre-bnt-on,#Article .next-bnt-on{background-position: 0 -78px;}
#Article .pre-bnt span{background-position: -30px top;}
#Article .pre-bnt:hover span,#Article .pre-bnt-on span{background-position: -30px -78px;}
#Article .next-bnt span{background-position: -55px top;}
#Article .next-bnt:hover span,#Article .next-bnt-on span{background-position: -55px -78px;}
/* endSelect */
#endSelect{top:290px;left:333px;position:absolute;width:230px;height:71px;border:1px solid #8a8a8a;display:none;z-index:200;}
#endSelect .bg{height:100%;width:100%;background:#000;filter:Alpha(Opacity=50);opacity:0.5;}
#endSelect .E_Cont{position:absolute;top:10px;left:26px;color:#fff;font-size:14px;}
#endSelect .E_Cont p{padding:4px 0;zoom:1;overflow:hidden;}
#rePlayBut,#nextPicsBut,#endSelect #endSelClose{background:url(../images/v9/big-btn.png) no-repeat}
#rePlayBut{float:left;width:69px;height:23px;background-position: 0px -167px;}
#nextPicsBut{float:left;width:97px;height:23px;background-position: -100px -167px;margin-left:10px;}
#endSelect #endSelClose{background-position: 0px -217px;position:absolute;top:3px;right:3px;cursor:pointer;width:11px;height:11px;overflow:hidden;z-index:2;}
.photo-channel #Article .text{ border:1px solid #ddd; background-color:#f3f3f3; padding:8px 10px; zoom:1; margin-bottom:20px}
.photo-channel .relevance{ padding:5px 10px 10px}
.photo-channel .relevance h5,.comment h4{background: url(../images/v9/icon.png) no-repeat left -375px; padding-left:16px;}
.photo-channel .relevance .photo-list{ padding:0; overflow:auto; padding-top:10px}
.photo-channel .relevance .photo-list li{ float:left; width:153px; padding:0}
.photo-channel .relevance .photo-list li .img-wrap{width:110px;height:86px;margin:0 auto;background: url(../images/v9/pic_bg.png) no-repeat; border:none; margin-bottom:6px}
.photo-channel .relevance .photo-list li .img-wrap a{*font-size:59px;width:104px; height:86px; padding:1px 5px 5px 1px }
.photo-channel .relevance .photo-list li .img-wrap a:hover{ background:none}
.box .photo-hot{padding:0 2px}
.photo-hot li{width:119px;*width:50%; text-align:center; padding:5px 0; vertical-align:top}
.photo-hot li div.img-wrap{ width:94px; margin:auto; margin-bottom:5px; height:64px;}
.photo-hot li div.img-wrap a{ width:94px; height:64px;*font-size:48px;}
/* 分页 */
#pages { padding:14px 0 10px; font-family:宋体 }
#pages a { display:inline-block; height:22px; line-height:22px; background:#fff; border:1px solid #e3e3e3; text-align:center; color:#333; padding:0 10px}
#pages a.a1 { background:url(../images/admin_img/pages.png) no-repeat 0 5px; width:56px; padding:0 }
#pages a:hover { background:#f1f1f1; color:#000; text-decoration:none }
#pages span { display:inline-block; height:22px; line-height:22px; background:#5a85b2; border:1px solid #5a85b2; color:#fff; text-align:center;padding:0 10px}
.page .noPage { display:inline-block; width:56px; height:22px; line-height:22px; background:url(../img/icu/titleBg.png) repeat-x 0 -55px ; border:1px solid #e3e3e3; text-align:center; color:#a4a4a4; }
/* 广告位 */
.ads{padding-top:8px}
.ads .col-left{width:748px;}
.ads .col-auto{border:1px solid #c3d4e7; padding:1px;width:198px}
.ads .col-auto div.left{float:left; background:#dce2ea; width:20px; margin-right:8px; text-align:center; height:83px; padding-top:5px}
.ads .col-auto div.right{overflow:hidden; }
/* 评论-form */
.comment-form{border:1px solid #c3d4e7; padding:10px 20px; margin-bottom:10px}
.comment-form h5{ height:22px; padding-bottom:5px;border-bottom:1px solid #C3D4E7;}
.comment-form strong{background: url(../images/icon/user_comment.png) no-repeat; padding-left:21px; float:left}
.yzm{display:none;position:absolute; background:url(../images/admin_img/login_ts140x89.gif) no-repeat; width:140px; height:89px;text-align:center; font-size:12px;}
.yzm a:link,.yzm a:visited{color:#036;text-decoration:none;}
.yzm a:hover{ color:#C30;}
.yzm img{ cursor:pointer; margin:0px auto; width:130px; height:50px; margin-top:4px; border:1px solid #fff; margin-bottom:1px;}
.comment-form .posn{ padding:10px 0}
.comment-title{ text-align:center; padding:5px 0 10px}
.comment-title a:hover{ text-decoration: none; color: #F60;}
.comment{border:1px solid #C3D4E7;zoom:1; padding:8px 15px}
.comment h4{ border-bottom:1px solid #C3D4E7; padding-bottom:6px; margin-bottom:15px}
.comment .title{ margin-bottom:5px}
.comment .title span{ position:relative; top:-5px}
.comment .content{ font-size:14px; background:#f6f9fb; border:1px solid #c4d5df; zoom:1; padding:8px 10px; margin:5px 0}
.comment .content span{display:block;}
.comment_button{margin-bottom:15px;}
.comment_button a{padding:5px; border:solid 1px #C3D4E7; }
.comment_button a.on{background:#4C7FB6; color:#fff;border:solid 1px #3E73A9}
/* footer style */
/* link */
.footer p.info{}
.footer p.info{color:#666; line-height:24px;text-align:center; padding:12px 0; margin-top:15px; border-top:1px solid #dbe7ed}
.footer p.info a{color:#666;}
/*link*/
.colli li{display:inline-block;zoom:1;*display:inline;overflow:hidden;vertical-align:middle;}
.ylink h5 a.rt{ margin-right:8px; font-weight:normal; font-family:"宋体"}
.ylink h5 a.red{ color:red; font-weight:normal; padding:0 6px}
.ylink .imgul li{ text-align:center; margin:5px 10px;}
.ylink .linka a{ margin:10px; white-space:nowrap; height:30px; line-height:30px;}
.itemli{ margin:0px 10px;}
.itemli li{padding:10px 0px;}
.itemli li a{background:url(../images/bg_member_1.gif) no-repeat -5px -126px;font-weight:bold; padding-left:14px;color:#004499; font-size:13px;}
.pd_b0{padding-bottom:0px;}
/*内容摘要*/
.summary {background-color:#F6FAFD;border: 1px solid #DCDDDD;font-size: 14px;line-height: 23px;margin: 15px 0 0;padding: 12px 5px 6px;text-align: justify;text-indent: 2em;}
|
108wo
|
statics/css/default_blue.css
|
CSS
|
asf20
| 30,430
|
.progress_bar{height:30px; border:#214D7C solid 1px;margin-bottom:10px}
.p_bar{height:30px; background:#3A6EA5;width:0px;}
.progress_status{color:red;margin-left:10px}
#msg{padding:5px;background:#FFFFE1 url(../images/msg_bg.png) no-repeat 5px -194px; border:#808080 solid 1px;margin-bottom:10px;padding-left:23px}
|
108wo
|
statics/css/progress_bar.css
|
CSS
|
asf20
| 317
|
.ui_title_wrap, .ui_bottom button {font-size:12px 'Microsoft Yahei', Arial; }
.ui_content_wrap { min-width:9em; vertical-align:top;}/*设置对话框最小尺寸*/
.ui_overlay div { background:#000; filter:alpha(opacity=40); opacity:0.4; }/*设置遮罩颜色与透明度*/
.ui_loading_tip { width:16px; height:16px; margin:-8px 0 0 -8px; text-indent:-9999em; background:url(../images/msg_img/loading.gif) no-repeat center center; }/*iframe加载的loading动画*/
.ui_dialog_main { background:#FFF; }
.ui_title_wrap { _width:100px; }/*IE6下设置一个最小长度,防止关闭按钮错位*/
.ui_title{ padding:5px 5px 0px;}
.ui_title_text {text-align:left;font:18px/18px "MicroSoft YaHei","SimHei";color:#333;border-bottom:1px solid #eee; height:24px; padding-bottom:3px; padding-left:8px}
.ui_td_00,.ui_td_02,.ui_td_20,.ui_td_22 { width:8px; height:8px;}/*左上*/
.ui_td_10,.ui_td_12 { width:8px;}
.ui_close{_right:3px;_font-size:0; _line-height:0; text-indent:-9999em;display:block;width:16px;height:16px;position: absolute;top:14px;right:14px;outline:none;background: url(../images/cross.png) no-repeat left 3px}
.ui_close:hover{background-position: left -46px}
.ui_resize { width:10px; height:10px; }
html:hover .ui_btns button:focus { outline:none 0; }
span.ui_dialog_icon{display:none}
.ui_move_temp div { background-color:#214FA3; filter:alpha(opacity=40); opacity:0.4; }/*拖动用的替身对话框*/
.ui_border { background-color:#2f7cd2; filter:alpha(opacity=30); opacity:0.3 }/*设置外边框透明度*/
.ui_btns { background-color:#F6F6F6; border-top:solid 1px #DADEE5; text-align:center}
.ui_btns span, .ui_btns button { background-color:transparent; background-image:url(../images/msg_img/btns.png); background-repeat:no-repeat; }
.ui_btns span { padding:0 0 0 5px; overflow:hidden; background-position:left -42px; }
.ui_btns button { height:21px; line-height:21px; padding:0 10px 0 5px; max-width:200px; border:none 0; background-position:right 0; }
.ui_btns span:hover { background-position:left -63px; }
.ui_btns span:hover button { background-position:right -21px;}
.ui_content_m .ui_content{ padding:10px 1px; margin:0; width:100%}
/*
主题拓展参数[可添加组合在'style'参数中]
可用来支持消息类型图标等
*/
.ui_dialog_icon {display:inline-block; *zoom:1; *display:inline; background-image:url(../images/msg_img/icons.png); background-repeat:no-repeat; }
/*警告消息*/
.alert .ui_dialog_icon { margin-right:10px; width:48px; height:48px; background-position:0 -96px; }
/*询问消息*/
.confirm .ui_dialog_icon { margin-right:10px; width:48px; height:48px; background-position:0 -144px; }
/*错误消息*/
.error .ui_dialog_icon { margin-right:10px; width:48px; height:48px; background-position:0 -48px; }
/*成功消息*/
.succeed .ui_dialog_icon { margin-right:10px; width:48px; height:48px; background-position:0 0; }
.none_icon .ui_dialog_icon{display:none}
/*去除所有背景*/
.noSkin .ui_border, .noSkin .ui_title_wrap, .noSkin .ui_dialog_icon { display:none; }
.noSkin .ui_bottom_wrap { display:none; *display:block; *height:0; overflow:hidden; }
* html .noSkin .ui_btns { height:0; overflow:hidden; position:absolute; left:-99999em; }
.noSkin .ui_content { margin:0; }
.noSkin .ui_dialog_main { background:transparent;}
|
108wo
|
statics/css/dialog_simp.css
|
CSS
|
asf20
| 3,327
|
div.ibtn{height:40px; text-align: center;}div.ibtns{height:120px;}
div.ibtn form{display: inline;}
div.ibtn .button{background:url(../images/bgx.jpg) repeat-x 0px 0px; height:40px; line-height:40px; color:#fff; font-weight:900;cursor: pointer; border-radius: 4px; padding:0px 10px; border:none; * border:1px solid #eee; font-size:14px;}
div.ibtn .button:hover{background:url(../images/bgx.jpg) repeat-x 0px -40px;}
.nr{background:#FFF;border: 1px solid #D5D5D5; border-radius:6px; box-shadow: 0 0 4px #efefef; line-height: 21px; margin-bottom:20px; margin-top:10px; padding: 10px 20px;}
.nr p{text-indent: 2em; margin:8px 0px;}
.txtc{text-align:center}
.fs14{font-size:14px; padding:10px 0px;font-weight: bold;}
|
108wo
|
statics/css/open_admin.css
|
CSS
|
asf20
| 718
|
body{color:#444; height:100%}a{text-decoration:none; color:#444}
html.off,html.off body {background: #e2e9ea url(../images/admin_img/en_left_bg.png) repeat-y -40px top;}
html.on,html.on body{background: #e2e9ea; background-image:none;}
html.addbg,html.addbg body{background:#e2e9ea}
a:hover{text-decoration:underline;}
.pad-6{padding:6px; overflow:hidden}.pad-10{padding:10px; overflow:hidden}.pad_10,.pad-lr-10{padding:0 10px}.pad-lr-6{padding:0 6px}
.hr{background: url(../images/uline.gif) repeat-x center center;}
.hr hr{display:none}
.border-none,.border-none-td td,{border:none}
.ib, .ib-li li, .ib-a a, .ib-span span,.common-form ul li span.text,.fixed-bottom .fixed-but .button,.arrowhead,.arrowhead-b,#Skin li,.shortcut a,.shortcut a span,.picBut a,.tab-use,.scroll a{display:inline-block;zoom:1;*display:inline;}
.cut_line span{ color:#4d82bc; padding:0 4px}
.mr6{margin-right:6px}.mr8{margin-right:8px}.mr10{margin-right:10px}.mb6{margin-bottom:6px}.mb8{margin-bottom:8px}.mb10{margin-bottom:10px}
.picBut {background:url("../images/admin_img/picBnt.png") no-repeat 0 -28px;color:#FFF;float:left; text-align:center;font-weight:700;height:28px;line-height:26px;*line-height:30px;margin-right:10px;width:75px}
.picBut a{color:#fff;text-decoration: none; width:75px}
.line-x{border-bottom:1px solid #eee;}
.title-1{border-bottom:1px solid #eee; padding-left:5px}
.title-2{text-align:left;height:34px;*height:33px;font:18px/31px "MicroSoft YaHei","SimHei";color:#333;*line-height:33px; margin:0; padding:8px 0 3px 0px}
body fieldset{border:1px solid #D8D8D8; padding:10px;}
body fieldset legend{padding:3px 8px;font-weight:700;border:1px solid #D8D8D8;background-color: #F9F9F9;}
body fieldset.blue{border:1px solid #dce3ed}
body fieldset.blue legend{padding:3px 8px;font-weight:700;color:#347add; background:none; border:none}
.fixed-bottom{height:60px;_margin-top:12px}
.fixed-bottom .fixed-but{position: fixed;_position: relative; bottom:0;height:30px; border-top:1px solid #f1f1f1; padding:10px 0; width:100%;background: #fff url(../images/admin_img/x_bg.png) repeat-x 0 -100px;}
.fixed-bottom .fixed-but .button,.fixed-bottom .fixed-but .button input{
background: url(../images/admin_img/btn-content.png) no-repeat; border:none; height:32px; line-height:32px; vertical-align:middle; margin:0;}
.fixed-bottom .fixed-but .button{padding:0 0 0 10px; margin:0; margin:0 5px}
.fixed-bottom .fixed-but .button input{padding-right:10px; margin:0;background-position: right top; display:block;color:#004092; font-size:14px; font-weight:700; white-space: nowrap;}
.subnav{ padding:10px}.subnav h2{ margin-bottom:6px}
.explain-col{ border:1px solid #ffbe7a;zoom:1; background: #fffced; padding:8px 10px; line-height:20px}
.vote_bar{width:90%; height:13px; border:1px solid #999}
.vote_bar div{background: url(../images/admin_img/x_bg.png) repeat-x left -194px; float: left; position:relative; height:16px;_height:13px}
.vote_bar div span{ display:block; position:absolute; left:0; top:0; width:180px; text-align:center; height:16px; font-size:10px; line-height:12px; vertical-align:middle}
/*头部*/
.crumbs,.tab-web-panel li a:hover,.tab-web-panel li.on a{background: url(../images/admin_img/icon_use.png) no-repeat}
.header {background:#3a6ea5 url(../images/admin_img/h_bg.gif) repeat-x left bottom; height:80px; position:relative}
.header .logo{float:left;width:136px;height:80px;margin-right:10px;_margin-right:7px;background: url(../images/admin_img/logo_1.gif) no-repeat;}
.header .logo a{display:block;height:80px;text-decoration: none;}
.header .rt-col{position:absolute;top:0px; right:0px; width:280px; height:44px; z-index:10}
.header .nav{ display:block; height:34px; position:relative; bottom:-10px}
.header .col-auto{overflow:visible;float:none}
.header .nav li,
.header .nav li a{background: url(../images/admin_img/nav_bg.png) no-repeat;display:block;_float:left;height:34px; line-height:38px; font-size:14px; font-weight:700}
.header .nav li{float:left;padding:0 0 0 8px}
.header .nav li a{background-position: right top; padding:0 15px 0 7px}
.header .nav li.on{background-position: left -43px;}
.header .nav li.on a{background-position: right -43px; color:#367abb;}
.header .nav li.tab_web{ position:relative}
.header .nav li.tab_web a{ position:absolute;}
.header .nav li.tab_web a,
.header .nav li.tab_web a span{background: url(../images/admin_img/site.png) no-repeat;height:34px;line-height:34px;*line-height:38px;_float: left}
.header .nav li.tab_web{background:none; line-height:38px; vertical-align:middle; padding:0;}
.header .nav li.tab_web a{padding:0;padding-left:10px;cursor: hand;!important;cursor: pointer;white-space: nowrap;}
.header .nav li.tab_web a:hover,.header .nav li.tab_web a.on{text-decoration: none;color:#3a6ea5;background-position: left -40px; }
.header .nav li.tab_web a span{ display:block; padding-right:24px;background-position:right 2px;}
.header .nav li.tab_web a:hover span,.header .nav li.tab_web a.on span{background-position:right -40px;}
.tab-web-panel{ border:1px solid #b3cbe4;zoom:1; padding:1px; background:#fff}
.tab-web-panel li{background:#f0f5f6; margin-top:1px}
.tab-web-panel li a{padding:3px 8px 3px 8px;display:block; padding-right:22px;height:18px;line-height:18px;white-space: nowrap;width:105px}
.tab-web-panel li a:hover,.tab-web-panel li.on a{ background-color:#d5e5f6;background-position:50px -52px;}
.header .col-auto{height:80px}
.header .log{padding:16px 0 0 6px; height:20px}
.header .tab_style{padding:16px 14px 0 0}
#Skin{padding:14px 0 0 0; position:relative; z-index:1000; height:11px; font-size:0;}
#Skin li {cursor:pointer;height:11px;width:14px;_overflow:hidden;background:url(../images/admin_img/skinbt.png) no-repeat;}
#Skin .s1 {background-position:-14px -66px}
#Skin .s2 {background-position:0 -55px}
#Skin .s3 {background-position:0 -33px}
#Skin .s4 {}
/*主体样式*/
.left_menu{width:215px; position:relative; display:block; padding-top:10px; overflow:hidden; }
#Scroll{ float:left; width:194px;padding:0 2px 0 10px; overflow:hidden}
.left_menu_on{ width:10px; padding:0;}
.left_menu_on #Scroll{display:none}
.left_menu h3{font-weight: 700;color: #275d96;border-bottom:1px solid #d9e4ea; line-height:24px; height:24px; margin-bottom:5px; margin-right:8px}
.left_menu ul li{color:#666; display:block; margin-right:1px}
.left_menu ul li a{line-height:24px;padding-left:8px;display:block;text-decoration: none;background-color:#f7fbfc;}
.left_menu ul li a:hover,
.left_menu ul li.on,.left_menu h3 span{background: url(../images/admin_img/en_left_menu.png) no-repeat;text-decoration: none; margin-right:6px}
.left_menu ul li.on{ height:29px; padding-left:20px; margin-right:0}
.left_menu ul li.on a{ height:29px; line-height:29px; background:none; padding:0; display:block}
.left_menu ul li.on a:hover{background:none}
.left_menu ul li a:hover{background-position: left -38px}
.left_menu a.open,.left_menu a.close{background: url(../images/admin_img/left_menu_openClose.png) no-repeat 3px center;width:8px; display:block; float:left;height:auto; right:-11px; top:0}
.left_menu a.open:hover,.left_menu a.close:hover{ background-color:#d6e1e4}
.left_menu a.close{background-position:right center; width:10px}
.left_menu h3 span{background-position: left -78px; display:block; float:right; height:14px; width:14px; margin-top:5px}
.left_menu h3 span.on{background-position: -33px -78px;}
.scroll{ position:absolute; left:40px; bottom:14px; width:120px; height:17px; overflow:hidden; display:none}
.scroll a{ background:url(../images/admin_img/scroll_bg.png) no-repeat left top; width:48px; height:17px; margin:0 5px}
.scroll a:hover{ background-position:left bottom}
.scroll a.next{background-position:right top}
.scroll a.next:hover{ background-position:right bottom}
/*当前位置*/
.crumbs{background-position:left -18px; height:22px; padding:6px 0 0 18px;*height:20px;*padding:8px 0 0 18px;}
.shortcut{ float:right; position:relative; top:-3px;*top:-4px;}
.shortcut a{ margin-left:6px; padding-left:6px; color:#0364ae}
.shortcut a,.shortcut a span{background: url(../images/admin_img/bnt_bg.png) no-repeat 0 -83px; height:21px; line-height:21px;*line-height:24px;_line-height:20px; text-align:center;}
.shortcut a span{background-position: right -83px; padding-right:6px;}
/*容器样式*/
.col-tab{ }
.col-tab ul.tabBut{height:27px; padding-left:14px;position:relative;bottom:-1px}
.col-tab ul.tabBut li{float:left; border:1px solid #dce3ed; height:25px; line-height:26px; margin-right:5px;}
.col-tab ul.tabBut li{ background:#eaeef4; padding:0 8px;}
.col-tab ul.tabBut li.on{position:relative; background:#fff;border-bottom:0;height:26px;_height:27px; font-weight:700;}
.col-tab ul.tabBut li.icon{background-image:url(../images/icon/exclamation_small.png);padding-left:18px;background-repeat: no-repeat;background-position: 3px center;}
.col-tab .content{border:1px solid #dce3ed;_zoom:1;}
.col-tab .content-r{border-top:1px solid #dce3ed}
.col-tab .contentList{border:1px solid #dce3ed;_zoom:1;}
.col-1{ border:1px solid #f4f6f5;zoom:1; background:#fff}
.col-1 div.content{border:1px solid #c2d1d8;zoom:1;}
.col-2{ border:1px solid #c7d8ea;zoom:1;}
.col-2 h6{border-bottom:1px solid #c7d8ea; color:#3a6ea5;background: url(../images/admin_img/x_bg.png) repeat-x left -42px; height:26px; line-height:28px; padding:0 10px}
.col-2 div.content{ padding:9px 10px}
/*栏目菜单*/
.cat-menu{ width:180px; margin:10px 8px 0 0; }
.cat-menu div.content{padding-left:8px}
/*收藏导航*/
.fav-nav,.fav-nav span,.fav-nav a{height:28px;line-height:28px;background: url(../images/admin_img/fav-nav-bg.png) repeat-x left top;}
.fav-nav{padding:0 0 0 12px;position: absolute; left:0;bottom:0px;width:100%;}
.fav-nav span{background-position: right -78px;position:relative;display:block;float:left;background-repeat: no-repeat; padding-right:2px}
.fav-nav div{ float:left}
.fav-nav a{padding:0 20px 0 8px; display:block;float:left}
.fav-nav a:hover,.fav-nav a.on{background-position: right -40px;text-decoration: none}
.fav-nav a.panel-delete{padding-right:10px;background: url(../images/cross.png) no-repeat;width:16px; height:16px; padding:0;background-position: center 3px;position:absolute; right:4px; top:7px; z-index:10}
.fav-nav a.panel-add{background-position: right -120px; width:16px; float:left; padding:0; margin-left:5px;_margin-left:3px}
.fav-nav a.panel-add:hover{background-position: center -163px;}
.fav-nav a.panel-delete:hover{background-position: center -46px;}
.fav-nav a.panel-delete em,.fav-nav a.panel-add em{ display:none}
.fav-help{display:none;height:26px; line-height:26px; float:none; background:#fff url(../images/icon/info.png) no-repeat 3px 6px; padding:0 10px 0 24px; position:absolute; top:2px; right:14px}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
.fav-help a.panel-delete{right:2px; top:5px; margin:0}
.fav-help a:hover {color:#CC3300;}
/*内容菜单*/
.content-menu{ padding:0 0 6px}
.content-menu a:hover{text-decoration: none}
.content-menu a em{display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline;}
.content-menu a.add,.content-menu a.add em,
.content-menu a.on,.content-menu a.on em{background: url(../images/admin_img/bnt_bg.png) no-repeat;height:28px; line-height:28px;*line-height:28px}
.content-menu span{color:#ddd; padding:0 8px}
.content-menu a{cursor:pointer;}
.content-menu a.add{ padding:0 0 0 5px;}
.content-menu a.add em{ padding:0 10px 0 5px;color:#fff;background-position: right top}
.content-menu a.on{background-position: left -40px;*background-position: left -41px;_background-position: left -39px; color:#fff; padding:0 0 0 5px;}
.content-menu a.on em{background-position: right -40px;*background-position: right -41px;_background-position: right -39px; padding:0 10px 0 5px}
/*分页*/
#pages { padding:14px 0 10px;font-family:宋体; text-align:right}
#pages a { display:inline-block; height:22px; line-height:22px; background:#fff; border:1px solid #e3e3e3; text-align:center; color:#333; padding:0 10px}
#pages a.a1 { background:url(../images/admin_img/pages.png) no-repeat 0 5px; width:56px; padding:0 }
#pages a:hover { background:#f1f1f1; color:#000; text-decoration:none; }
#pages span { display:inline-block; height:22px;padding:0 10px; line-height:22px; background:#5a85b2; border:1px solid #5a85b2; color:#fff; text-align:center; }
.page .noPage { display:inline-block; height:22px; line-height:22px; background:url(../img/icu/titleBg.png) repeat-x 0 -55px ; border:1px solid #e3e3e3; text-align:center; color:#a4a4a4; }
/*图片列表水平左右居中*/
.img-wrap{border:1px solid #eee;text-align:center;overflow:hidden;background:#fff}
.img-wrap a{display:table-cell;vertical-align:middle;text-align:center;*display:block;}
#imgPreview td.on{background:#f4f9fe}
#imgPreview td.on a{background:url("../images/msg_bg.png") no-repeat right -250px;vertical-align:middle; padding-right:70px;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline; height:16px; line-height:16px}
/*角色权限设置*/
.role-memu{ padding:5px 0}
.role-memu li a{cursor: hand;!important;cursor: pointer;display:block;color:#2e74d7;text-decoration: none; height:24px; padding:0 6px; overflow:hidden; line-height:24px; vertical-align:middle; background-color:#FFF}
.role-memu li a em{ width:80px; overflow:hidden; display:block}
.role-memu li a span{float:right; color: #999}
.role-memu li a span img{ margin-right:2px}
.role-memu li.on a{ background:#e0e9f0}
.role-but,.role-but span{background: url(../images/admin_img/tbtn.png) no-repeat; height:36px; line-height:36px; vertical-align:middle; padding-left:12px; border:none;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline;}
.role-but span{background-position: right top; padding:0 12px 0 0; font-weight:700; font-size:14px; color:#fff}
/*发布内容
.addContent{width:960px; margin:0 auto; overflow:hidden;}
.addContent .col-auto{width:750px;margin-right:6px;_margin-right:5px;}
.addContent .col-right .content h6{ border-bottom:1px solid #cfdce3; padding:8px 0 3px; margin-bottom:7px}
.addContent .col-right .content input{max-width:182px}
.addContent .col-right .content .upload-pic{width:180px;height:170px;text-align:center;overflow:hidden;}
.addContent .col-right .content .upload-pic a{display:table-cell;vertical-align:middle;width:180px;height:145px;text-align:center;*display:block;*font-size:105px}
.addContent .col-right .content .upload-pic{ background:#eef2f2; border:1px solid #dce6ea; zoom:1; padding:1px;}
.addContent .col-right select#template{max-width:188px;*width:188px;_width:188px}
*/
.addContent{width:960px; margin:0 auto; overflow:hidden;}
.addContent .col-auto{}
.addContent .col-right{ width:204px; overflow:hidden; margin-left:6px;}
.addContent .col-right .content h6{ border-bottom:1px solid #cfdce3; padding:8px 0 3px; margin-bottom:7px}
.addContent .col-right .content input{max-width:182px}
.addContent .col-right .content .upload-pic{width:180px;height:180px;text-align:center;overflow:hidden;}
.addContent .col-right .content .upload-pic a{display:table-cell;vertical-align:middle;width:180px;height:145px;text-align:center;*display:block;*font-size:105px}
.addContent .col-right .content .upload-pic{ background:#eef2f2; border:1px solid #dce6ea; zoom:1; padding:1px;}
.addContent .col-right select#template{max-width:188px;*width:188px;_width:188px}
.list-dot{ padding-bottom:10px}
.list-dot li,.list-dot-othors li{padding:5px 0; border-bottom:1px dotted #c6dde0; font-family:"宋体"; color:#bbb; position:relative;_height:22px}
.list-dot li:hover,.list-dot-othors li:hover{ background-color:#d9e5ee}
.list-dot li span,.list-dot-othors li span{color:#004499}
.list-dot li a.close span,.list-dot-othors li a.close span{display:none}
.list-dot li a.close,.list-dot-othors li a.close{background: url(../images/cross.png) no-repeat left 3px; display:block; width:16px; height:16px;position: absolute;outline:none;right:5px; bottom:5px}
.list-dot li a.close:hover,.list-dot-othors li a.close:hover{background-position: left -46px}
.list-dot-othors li{float:left;width:24%;overflow:hidden;}
/*评论*/
.comment{ padding:8px 10px}
.comment .title{ margin-bottom:5px}
.comment .title span{ position:relative; top:-5px}
.comment .content{ font-size:14px; background:#f6f9fb; border:1px solid #c4d5df; zoom:1; padding:8px 10px; margin:5px 0}
.comment .content span{display:block;}
.comment_button{margin-bottom:15px;}
.comment_button a{padding:5px; border:solid 1px #C3D4E7; }
.comment_button a.on{background:#4C7FB6; color:#fff;border:solid 1px #3E73A9}
/*圆角*/
.fillet{position:relative; border:1px solid #c4d5df; zoom:1;}
.fillet span.o1,
.fillet span.o2,
.fillet span.o3,
.fillet span.o4{position:absolute;width:3px;height:3px; font-size:1px;background: url(../images/fillet.png) no-repeat}
.fillet span.o1{background-position: left -6px; top:-1px; left:-1px}
.fillet span.o2{background-position: right -6px; top:-1px; right:-1px}
.fillet span.o3{background-position: left bottom; bottom:-1px; left:-1px}
.fillet span.o4{background-position: right bottom; bottom:-1px; right:-1px;}
/*工作流*/
.workflow{padding:10px 140px 10px 10px;}
.workflow .col{padding-bottom:20px;background: url(../images/admin_img/arrowhead-y.png) no-repeat 10px bottom;}
.workflow div.off{padding:0; background:none}
.workflow .content{left:130px; position:relative;}
.workflow .title{position:absolute; left:-130px; top:-1px; width:90px; font-size:14px; font-weight:700; text-align:center; padding: 0 0 3px 0; background:#fff}
.workflow .title span.line{border-bottom:1px solid #95b9cf; width:32px; height:1px; font-size:1px; position:absolute; right:-37px; top:17px}
.workflow .fillet{background:#f6f9fb; padding:8px 10px 7px}
.workflow .name{font-size:14px}
/*锁频*/
.ScreenLock {background-color:#3a6ea5;background-image:url("../images/admin_img/ScreenLock.png")}
.ScreenLock {background-position:50% 50%;background-repeat:no-repeat;height:100%;left:0;position:absolute;top:0;width:100%;z-index:2000}
.ScreenLock .inputpwd {font-size:14px;height:134px;left:50%;margin:-102px 0 0 -150px;padding:28px;position:absolute;top:50%;width:280px}
.ScreenLock h5{ height:60px; line-height:60px; padding-top:10px; padding-left:40px;background:url(../images/msg_img/msg_bg.png) no-repeat 0px -476px;}
.ScreenLock .input-text{border:1px solid #A7A6AA;height:18px;margin:0 5px 0 0;padding:2px 0 2px 5px;border: 1px solid #d0d0d0;background: #FFF url(../images/admin_img/input.png) repeat-x; font-family: Verdana, Geneva, sans-serif,"宋体";font-size:12px;}
.ScreenLock .submit{ background: url(../images/admin_img/ScreenLockBut.png) no-repeat; height:24px; width:55px;cursor:hand;display:inline-block;display:-moz-inline-stack;zoom:1;*display:inline; border:none}
/*网站地图*/
.map-menu ul{margin:4px;width:156px;border:1px solid #A4C0F7;}
.map-menu ul li.title{background:#EDF2F8;font-weight:bold;padding-left:5px;}
.map-menu ul li.title2{font-weight:bold;padding-left:10px;}
.map-menu ul li{padding:4px;padding-left:20px;}
/*附件 未使用-已使用*/
.tab-use{ position: relative}
.tab-use .arrows{background: url(../images/admin_img/toggle-collapse-dark.png) no-repeat; width:16px; height:16px; overflow:hidden; position:absolute; left:0; top:-11px;}
.tab-use ul{ position:absolute; display:none; top:5px; left:0; width:80px}
.tab-use ul li{}
.tab-use ul a{ width:auto;padding:3px 8px}
|
108wo
|
statics/css/en-system.css
|
CSS
|
asf20
| 19,695
|
table{border-collapse:collapse;border-spacing:0;}
.wrap{overflow:hidden; *display:inline-block;}.wrap{*display:block;}
.main img{_vertical-align:baseline;}
.txt_r{text-align:right;}
.txt_c{text-align:center;}
.col3 li, .col4 li{overflow:hidden; float:left;}
ul.col3 li{width:33.3%!important; *width:33.2%!important; }
ul.col4 li{width:25%!important; *width:24.9%!important;}
.brd{border:1px solid #C3D4E7;}
.l{ float:left;}
.tag_a a{display:inline-block;zoom:1;*display:inline;overflow:hidden;vertical-align:middle; margin:6px; white-space:nowrap; font-weight:bold; color:#004499; background:url(../images/v9/bg_member_1.gif) no-repeat -5px -124px; padding-left:10px;}
.sqlj_btn{ background:url(../images/v9/sqyqlj_btn.jpg) no-repeat;width:142px; height:47px; display:block; margin:10px auto;}
.cboxs h5{background:url(../images/v9/nav.png) repeat-x 0px -33px;}
.cboxs .tag_a a{ padding:0px; background:none; margin:6px 10px; font-weight:100; margin-bottom:20px;}
.table_form{width:100%;}
.table_form caption{background:url(../images/v9/nav.png) repeat-x 0 -33px;border-bottom:medium none;color:#004499;font-size:14px;font-weight:bold;height:34px;line-height:30px;}
|
108wo
|
statics/css/link.css
|
CSS
|
asf20
| 1,186
|
html.off,html.off body{background-image:url(img2/left_bg_gray.png); background-color:#eee}
html.on,html.on body{ background: #eee; background-image:none}
.left_menu a.open:hover,.left_menu a.close:hover{ background-color:#e3e3e3}
.left_menu ul li a{ background-color:#f8f8f8}
#Skin .s1{background-position:0 -66px}
#Skin .s2{background-position:-14px -55px;}
.header {background: #333 url(img2/hdbg.gif) no-repeat right bottom}
.header .logo{background-image: url(img2/logo.png)}
.header .nav li, .header .nav li a{background-image: url(img2/nav_bg_gray.png)}
.header .nav li.on a{ color:#333}
.header .nav li a{color:#999}
.cut_line span{color:#5f5f5f}
.header .nav li.tab_web a, .header .nav li.tab_web a span{background-image: url(img2/site_gray.png); color:#fff}
.header .nav li.tab_web a:hover span,.header .nav li.tab_web a.on span{color:#333}
.shortcut a{background-position: 0 -113px; color:#666}
.shortcut a span{background-position: right -113px}
.tab-web-panel{ border-color: #CCC}
.tab-web-panel li{ background-color: #F5F5F5}
.tab-web-panel li:hover,.tab-web-panel li.on{background-color:#eaeaea}
.left_menu h3{ color:#333; border-bottom-color:#CCC}
.left_menu ul li a:hover, .left_menu ul li.on{background-image: url(img2/left_menu.png); }
.left_menu ul li.on a{color:#333}
.col-1 div.content{ border-color:#CCC}
.table-list thead th{background-color:#f0f0f0;border-bottom-color:#e2e3e3;}
.content-menu a.add, .content-menu a.add em, .content-menu a.on, .content-menu a.on em{background-image:url("img2/bnt_bg_gray.png");}
.content-menu a{ color:#333}
.col-1 div.content,.col-2{ border-color:#dfdfdf}
.col-2 h6{background-image:url("img2/x_bg.png"); border-bottom:1px solid #eee; color:#333}
.fixed-bottom .fixed-but{background-image:url("img2/x_bg.png");}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
.col-tab .contentList,.col-tab ul.tabBut li{ border-color:#e9e9e9}
.col-tab ul.tabBut li{ background-color:#f5f5f5}
.map-menu ul{border-color:#DFDFDF;}
.map-menu ul li.title{ background-color:#f2f2f2}
|
108wo
|
statics/css/style/styles2.css
|
CSS
|
asf20
| 2,087
|
html.off,html.off body{background-image:url(img2/left_bg_gray.png); background-color:#eee}
html.on,html.on body{ background: #eee; background-image:none}
.left_menu a.open:hover,.left_menu a.close:hover{ background-color:#e3e3e3}
.left_menu ul li a{ background-color:#f8f8f8}
#Skin .s1{background-position:0 -66px}
#Skin .s2{background-position:-14px -55px;}
.header {background: #333 url(img2/hdbg.gif) no-repeat right bottom}
.header .logo{background-image: url(img2/logo.png)}
.header .nav li, .header .nav li a{background-image: url(img2/nav_bg_gray.png)}
.header .nav li.on a{ color:#333}
.header .nav li a{color:#999}
.cut_line span{color:#5f5f5f}
.header .nav li.tab_web a, .header .nav li.tab_web a span{background-image: url(img2/site_gray.png); color:#fff}
.header .nav li.tab_web a:hover span,.header .nav li.tab_web a.on span{color:#333}
.shortcut a{background-position: 0 -113px; color:#666}
.shortcut a span{background-position: right -113px}
.tab-web-panel{ border-color: #CCC}
.tab-web-panel li{ background-color: #F5F5F5}
.tab-web-panel li:hover,.tab-web-panel li.on{background-color:#eaeaea}
.left_menu h3{ color:#333; border-bottom-color:#CCC}
.left_menu ul li a:hover, .left_menu ul li.on{background-image: url(img2/left_menu.png); }
.left_menu ul li.on a{color:#333}
.col-1 div.content{ border-color:#CCC}
.table-list thead th{background-color:#f0f0f0;border-bottom-color:#e2e3e3;}
.content-menu a.add, .content-menu a.add em, .content-menu a.on, .content-menu a.on em{background-image:url("img2/bnt_bg_gray.png");}
.content-menu a{ color:#333}
.col-1 div.content,.col-2{ border-color:#dfdfdf}
.col-2 h6{background-image:url("img2/x_bg.png"); border-bottom:1px solid #eee; color:#333}
.fixed-bottom .fixed-but{background-image:url("img2/x_bg.png");}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
.col-tab .contentList,.col-tab ul.tabBut li{ border-color:#e9e9e9}
.col-tab ul.tabBut li{ background-color:#f5f5f5}
.map-menu ul{border-color:#DFDFDF;}
.map-menu ul li.title{ background-color:#f2f2f2}
|
108wo
|
statics/css/style/zh-cn-styles2.css
|
CSS
|
asf20
| 2,087
|
.header {background: #3c86c5 url(img4/hdbg.gif) no-repeat right top;}
.header .logo{background-image: url(img4/logo.gif)}
.header .nav li, .header .nav li a{background-image: url(img4/nav_bg.png)}
.header .nav li.tab_web a, .header .nav li.tab_web a span{background-image: url(img4/site.png);}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
.cut_line span{color:#9fc7e8}
#Skin .s1{background-position:0 -66px}
#Skin .s4{background-position:-14px 0px;}
|
108wo
|
statics/css/style/en-styles4.css
|
CSS
|
asf20
| 486
|
html.off,html.off body{background-image:url(img3/en_left_bg.png); background-color:#edf2e3}
html.on,html.on body,html.addbg,html.addbg body{background: #edf2e3;background-image:none}
.header {background: #618d03 url(img3/hdbg.gif) no-repeat right bottom}
.header .logo{background-image: url(img3/logo.gif)}
.header .nav li, .header .nav li a{background-image: url(img3/nav_bg.png)}
.header .nav li.on a{ color:#333}
.header .nav li a{color:#e7f4cb}
.header .nav li.tab_web a, .header .nav li.tab_web a span{background-image: url(img3/site.png)}
.header .nav li.tab_web a:hover span,.header .nav li.tab_web a.on span{color:#618d03}
.shortcut a{background-position: 0 -143px; color:#666}
.shortcut a span{background-position: right -143px}
.tab-web-panel{ border-color: #dce8c4}
.tab-web-panel li{ background-color: #f1f5ea}
.tab-web-panel li:hover,.tab-web-panel li.on{background-color:#dde7ca}
.cut_line span{color:#7aaf0a}
#Skin .s1{background-position:0 -66px}
#Skin .s3{background-position:-14px -33px;}
.col-1 div.content,.col-2{ border-color:#c8daa3}
.col-2 h6{background-image:url("img3/x_bg.png"); border-bottom:1px solid #c8daa3; color:#444;}
.fixed-bottom .fixed-but{background-image:url("img3/x_bg.png");}
.fixed-bottom .fixed-but .button, .fixed-bottom .fixed-but .button input{background-image:url("img3/btn-content.png"); color:#6f971f}
.table-list thead th{background-color:#eef5de;border-bottom-color:#e2e3e3;}
.left_menu h3{ color:#333; border-bottom-color:#CCC}
.left_menu ul li a:hover, .left_menu ul li.on{background-image: url(img3/left_menu.png); }
.left_menu ul li.on a{color:#333}
.left_menu ul li a{ background-color:#f9fbf5}
.left_menu a.open:hover,.left_menu a.close:hover{ background-color:#e1edd2}
.content-menu a.add, .content-menu a.add em, .content-menu a.on, .content-menu a.on em{background-image:url("img3/bnt_bg.png");}
.content-menu a{ color:#333}
.ui_td_00, .ui_td_02, .ui_td_10, .ui_td_12, .ui_td_20, .ui_td_22, .ui_close {background-image:url("img3/chrome_s.png");}
.ui_td_01{background-image:url("img3/border.png");}
.ui_td_21{border-bottom:1px solid #457700;}
.fav-nav,.fav-nav span,.fav-nav a{background-image:url("img3/fav-nav-bg.png")}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
#pages span {background-color:#618d01;border-color:#618d01;}
.col-tab .contentList,.col-tab ul.tabBut li{ border-color:#dce8c4}
.col-tab ul.tabBut li{ background-color:#f1f5ea}
.map-menu ul{border-color:#C8DAA3;}
.map-menu ul li.title{ background-color:#f3f8e9}
|
108wo
|
statics/css/style/en-styles3.css
|
CSS
|
asf20
| 2,554
|
.header {background: #3c86c5 url(img4/hdbg.gif) no-repeat right top;}
.header .logo{background-image: url(img4/logo.gif)}
.header .nav li, .header .nav li a{background-image: url(img4/nav_bg.png)}
.header .nav li.tab_web a, .header .nav li.tab_web a span{background-image: url(img4/site.png);}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
.cut_line span{color:#9fc7e8}
#Skin .s1{background-position:0 -66px}
#Skin .s4{background-position:-14px 0px;}
|
108wo
|
statics/css/style/styles4.css
|
CSS
|
asf20
| 486
|
.header {background: #3c86c5 url(img4/hdbg.gif) no-repeat right top;}
.header .logo{background-image: url(img4/logo.gif)}
.header .nav li, .header .nav li a{background-image: url(img4/nav_bg.png)}
.header .nav li.tab_web a, .header .nav li.tab_web a span{background-image: url(img4/site.png);}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
.cut_line span{color:#9fc7e8}
#Skin .s1{background-position:0 -66px}
#Skin .s4{background-position:-14px 0px;}
|
108wo
|
statics/css/style/zh-cn-styles4.css
|
CSS
|
asf20
| 486
|
html.off,html.off body{background-image:url(img3/left_bg.png); background-color:#edf2e3}
html.on,html.on body,html.addbg,html.addbg body{background: #edf2e3;background-image:none}
.header {background: #618d03 url(img3/hdbg.gif) no-repeat right bottom}
.header .logo{background-image: url(img3/logo.gif)}
.header .nav li, .header .nav li a{background-image: url(img3/nav_bg.png)}
.header .nav li.on a{ color:#333}
.header .nav li a{color:#e7f4cb}
.header .nav li.tab_web a, .header .nav li.tab_web a span{background-image: url(img3/site.png)}
.header .nav li.tab_web a:hover span,.header .nav li.tab_web a.on span{color:#618d03}
.shortcut a{background-position: 0 -143px; color:#666}
.shortcut a span{background-position: right -143px}
.tab-web-panel{ border-color: #dce8c4}
.tab-web-panel li{ background-color: #f1f5ea}
.tab-web-panel li:hover,.tab-web-panel li.on{background-color:#dde7ca}
.cut_line span{color:#7aaf0a}
#Skin .s1{background-position:0 -66px}
#Skin .s3{background-position:-14px -33px;}
.col-1 div.content,.col-2{ border-color:#c8daa3}
.col-2 h6{background-image:url("img3/x_bg.png"); border-bottom:1px solid #c8daa3; color:#444;}
.fixed-bottom .fixed-but{background-image:url("img3/x_bg.png");}
.fixed-bottom .fixed-but .button, .fixed-bottom .fixed-but .button input{background-image:url("img3/btn-content.png"); color:#6f971f}
.table-list thead th{background-color:#eef5de;border-bottom-color:#e2e3e3;}
.left_menu h3{ color:#333; border-bottom-color:#CCC}
.left_menu ul li a:hover, .left_menu ul li.on{background-image: url(img3/left_menu.png); }
.left_menu ul li.on a{color:#333}
.left_menu ul li a{ background-color:#f9fbf5}
.left_menu a.open:hover,.left_menu a.close:hover{ background-color:#e1edd2}
.content-menu a.add, .content-menu a.add em, .content-menu a.on, .content-menu a.on em{background-image:url("img3/bnt_bg.png");}
.content-menu a{ color:#333}
.ui_td_00, .ui_td_02, .ui_td_10, .ui_td_12, .ui_td_20, .ui_td_22, .ui_close {background-image:url("img3/chrome_s.png");}
.ui_td_01{background-image:url("img3/border.png");}
.ui_td_21{border-bottom:1px solid #457700;}
.fav-nav,.fav-nav span,.fav-nav a{background-image:url("img3/fav-nav-bg.png")}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
#pages span {background-color:#618d01;border-color:#618d01;}
.col-tab .contentList,.col-tab ul.tabBut li{ border-color:#dce8c4}
.col-tab ul.tabBut li{ background-color:#f1f5ea}
.map-menu ul{border-color:#C8DAA3;}
.map-menu ul li.title{ background-color:#f3f8e9}
|
108wo
|
statics/css/style/zh-cn-styles3.css
|
CSS
|
asf20
| 2,551
|
html.off,html.off body{background-image:url(img3/left_bg.png); background-color:#edf2e3}
html.on,html.on body,html.addbg,html.addbg body{background: #edf2e3;background-image:none}
.header {background: #618d03 url(img3/hdbg.gif) no-repeat right bottom}
.header .logo{background-image: url(img3/logo.gif)}
.header .nav li, .header .nav li a{background-image: url(img3/nav_bg.png)}
.header .nav li.on a{ color:#333}
.header .nav li a{color:#e7f4cb}
.header .nav li.tab_web a, .header .nav li.tab_web a span{background-image: url(img3/site.png)}
.header .nav li.tab_web a:hover span,.header .nav li.tab_web a.on span{color:#618d03}
.shortcut a{background-position: 0 -143px; color:#666}
.shortcut a span{background-position: right -143px}
.tab-web-panel{ border-color: #dce8c4}
.tab-web-panel li{ background-color: #f1f5ea}
.tab-web-panel li:hover,.tab-web-panel li.on{background-color:#dde7ca}
.cut_line span{color:#7aaf0a}
#Skin .s1{background-position:0 -66px}
#Skin .s3{background-position:-14px -33px;}
.col-1 div.content,.col-2{ border-color:#c8daa3}
.col-2 h6{background-image:url("img3/x_bg.png"); border-bottom:1px solid #c8daa3; color:#444}
.fixed-bottom .fixed-but{background-image:url("img3/x_bg.png");}
.fixed-bottom .fixed-but .button, .fixed-bottom .fixed-but .button input{background-image:url("img3/btn-content.png"); color:#6f971f}
.table-list thead th{background-color:#eef5de;border-bottom-color:#e2e3e3;}
.left_menu h3{ color:#333; border-bottom-color:#CCC}
.left_menu ul li a:hover, .left_menu ul li.on{background-image: url(img3/left_menu.png); }
.left_menu ul li.on a{color:#333}
.left_menu ul li a{ background-color:#f9fbf5}
.left_menu a.open:hover,.left_menu a.close:hover{ background-color:#e1edd2}
.content-menu a.add, .content-menu a.add em, .content-menu a.on, .content-menu a.on em{background-image:url("img3/bnt_bg.png");}
.content-menu a{ color:#333}
.ui_td_00, .ui_td_02, .ui_td_10, .ui_td_12, .ui_td_20, .ui_td_22, .ui_close {background-image:url("img3/chrome_s.png");}
.ui_td_01{background-image:url("img3/border.png");}
.ui_td_21{border-bottom:1px solid #457700;}
.fav-nav,.fav-nav span,.fav-nav a{background-image:url("img3/fav-nav-bg.png")}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
#pages span {background-color:#618d01;border-color:#618d01;}
.col-tab .contentList,.col-tab ul.tabBut li{ border-color:#dce8c4}
.col-tab ul.tabBut li{ background-color:#f1f5ea}
.map-menu ul{border-color:#C8DAA3;}
.map-menu ul li.title{ background-color:#f3f8e9}
|
108wo
|
statics/css/style/styles3.css
|
CSS
|
asf20
| 2,550
|
html.off,html.off body{background-image:url(img2/en_left_bg.png); background-color:#eee}
html.on,html.on body{ background: #eee; background-image:none}
.left_menu a.open:hover,.left_menu a.close:hover{ background-color:#e3e3e3}
.left_menu ul li a{ background-color:#f8f8f8}
#Skin .s1{background-position:0 -66px}
#Skin .s2{background-position:-14px -55px;}
.header {background: #333 url(img2/hdbg.gif) no-repeat right bottom}
.header .logo{background-image: url(img2/logo.png)}
.header .nav li, .header .nav li a{background-image: url(img2/nav_bg_gray.png)}
.header .nav li.on a{ color:#333}
.header .nav li a{color:#999}
.cut_line span{color:#5f5f5f}
.header .nav li.tab_web a, .header .nav li.tab_web a span{background-image: url(img2/site_gray.png); color:#fff}
.header .nav li.tab_web a:hover span,.header .nav li.tab_web a.on span{color:#333}
.shortcut a{background-position: 0 -113px; color:#666}
.shortcut a span{background-position: right -113px}
.tab-web-panel{ border-color: #CCC}
.tab-web-panel li{ background-color: #F5F5F5}
.tab-web-panel li:hover,.tab-web-panel li.on{background-color:#eaeaea}
.left_menu h3{ color:#333; border-bottom-color:#CCC}
.left_menu ul li a:hover, .left_menu ul li.on{background-image: url(img2/en_left_menu.png); }
.left_menu ul li.on a{color:#333}
.col-1 div.content{ border-color:#CCC}
.table-list thead th{background-color:#f0f0f0;border-bottom-color:#e2e3e3;}
.content-menu a.add, .content-menu a.add em, .content-menu a.on, .content-menu a.on em{background-image:url("img2/bnt_bg_gray.png");}
.content-menu a{ color:#333}
.col-1 div.content,.col-2{ border-color:#dfdfdf}
.col-2 h6{background-image:url("img2/x_bg.png"); border-bottom:1px solid #eee; color:#333}
.fixed-bottom .fixed-but{background-image:url("img2/x_bg.png");}
.fav-help a{ background:none; height:auto; padding:0; margin:0 20px 0 0}
.col-tab .contentList,.col-tab ul.tabBut li{ border-color:#e9e9e9}
.col-tab ul.tabBut li{ background-color:#f5f5f5}
.map-menu ul{border-color:#DFDFDF;}
.map-menu ul li.title{ background-color:#f2f2f2}
|
108wo
|
statics/css/style/en-styles2.css
|
CSS
|
asf20
| 2,088
|
ul li{line-height:22px;}
a:link,a:visited{text-decoration:none; color:#005f9f;}a:hover{text-decoration:underline;}a img{overflow:hidden;}
.p_r{position:relative; overflow:hidden;}
/*public*/
div.tit{ border-bottom:1px solid #ccc; height:30px; line-height:20px;}
div.tit h5{color:#069;}
.tw_tb li{ text-align:center;}
.tw_tb li a{ text-align:center;}
.tw_tb li img{ margin-bottom:6px;}
.tw_ll{ text-align:left;}
.tw_ll img{ float:left; margin-right:10px;}
.icon1 li{ background:url(../images/dd_icon.gif) no-repeat 0px 50%; padding-left:10px;}
.hr1{ border:none; border-top:1px solid #ccc; height:1px; margin:0px; padding:0px;}
.txt_c{ text-align:center;}
.fs14{ font-size:14px;}
/*index*/
.hd_row1,.hd_nav,.hd_banner,.ct,.ft,.w960{width:960px; margin-left:auto; margin-right:auto;}
.hd_banner img{border-radius: 0px 0px 6px 6px; border: 1px solid #fff; border-top:0px; box-shadow: 0px 1px 4px #ccc; width:958px;}
.hd_row1 .r{color:#999;}
.hd_row1 .r a{margin:0px 8px;}
.hd_nav{ background:url(../images/nav.jpg) repeat-x 0% 0%; height:40px; line-height:40px; overflow:hidden;}
.hd_nav a{ font-size:14px; font-weight:bold; height:40px; display:block; float:left; text-align:center; width:83px; margin:0px 8px;}
.hd_nav a:link,.hd_nav a:visited{color:#FFF;}
.hd_nav a:hover,.hd_nav a.ac{ background:url(../images/nav.jpg) no-repeat 50% -43px; color:#0D4371!important; text-decoration:none;}
.ft{padding:20px 0px; text-align:center; color:#666;}
.cjyy_i{width:310px; margin-right:40px;}
.jszn_i{width:280px; margin-left:40px;}
.kfal_i{overflow:hidden;}
.kfal_i .tw_tb li{ margin-top:20px;}
/*reg infobg*/
.reg_info,.info1,.info2,.info3,.info4{background:url(../images/reg_infobg.jpg) no-repeat 0px 0px;height:140px; overflow:hidden;}
.info1,.info2,.info3,.info4{ background-position:0px -140px;}
.info0{width:0px;}.info1{width:286px;}.info2{width:500px;}.info3{width:756px;}.info4{width:960px;}
.brd1{ border:1px solid #e4e4e4; margin-top:1px; width:958px; margin-left:auto; margin-right:auto;}
.brd1 .ct_blk{ border-top:1px solid #e4e4e4; padding:30px 20px;}
.brd1 .ct_blk .tit{ border-bottom:1px solid #efefef;}
.brd1 .ct_blk .tit h4{color:#999;}
.tb2col{ margin-left:auto; margin-right:auto;}
.tb2col td{ padding:14px 20px;}
.tb2col td label{ margin-right:20px;}
.infos .ct_blk{ padding-top:60px;}
.w400{width:400px; margin-left:auto; margin-right:auto;}
.w130{ width:130px;}
.ljsys_btn{ background:url(../images/ljsy_btn.jpg) no-repeat; width:76px; height:23px; display:block; margin-left:6px; margin-top:10px;}
.appimg{ background:url(../images/app_bg1.jpg) no-repeat 0px 0px; width:87px; height:89px; text-align:center; overflow:hidden; padding-top:1px;}
.desul .mg20{ margin-top:30px;}
.desul .des{ margin-top:26px; width:280px; overflow:hidden; color:#999;}
.desul .des h5{ color:#069;}
.dstxt{ color:#666;}
#pages { padding:14px 0 10px; font-family:Arial, Helvetica, sans-serif; }
#pages a { display:inline-block; height:22px; line-height:22px; background:#fff; border:1px solid #e3e3e3; text-align:center; color:#333; padding:0 10px}
#pages a.a1 { background:url(../images/pages.png) no-repeat 0 5px; width:56px; padding:0;text-decoration: none; }
#pages a:hover { background:#f1f1f1; color:#000; text-decoration:none }
#pages span { display:inline-block; height:22px; line-height:22px; background:#5a85b2; border:1px solid #5a85b2; color:#fff; text-align:center;padding:0 10px}
.page .noPage { display:inline-block; width:56px; height:22px; line-height:22px; background:url(../../img/icu/titleBg.png) repeat-x 0 -55px ; border:1px solid #e3e3e3; text-align:center; color:#a4a4a4; }
.nr{ margin-top:0px;}
.zk{ margin:40px; margin-top:0px;}
.zk .txts{width:620px; _width:610px; padding-top:40px;line-height: 24px;}
.zk .txts p{text-indent: 2em; font-size:14px;}
.zk .txts h2{border-bottom: 1px solid #C3E0F1; color: #1F75AF; margin-bottom: 20px; padding-bottom: 20px; text-shadow: 1px 1px 4px #B7CEDE; margin-top:20px;}
.bars{width:216px; margin-left:40px; border:1px solid #B8DBEF; background:#EEF6F7; border-top:0px; border-radius:0px 0px 6px 6px; box-shadow:0px 2px 6px #B8DBEF;}
.bars .barss{border:1px solid #fff; border-radius:0px 0px 6px 6px;}
.bars ul.mgs li{font-size:14px; font-weight:bold; color:#069; border-top:1px solid #FFF; border-bottom:1px solid #C3E0F1;}
.bars ul.mgs li span.mg20{background:url(../images/sjbg1.jpg) no-repeat 0px 4px; padding-left:20px; display:inline-block; margin-left:20px; cursor:pointer;}
.bars ul.mgs li.ac span.mg20{background:url(../images/sjbg2.jpg) no-repeat 0px 5px;}
.bars ul.mgs .nes{border-top:1px solid #fff; padding-top:6px; display:none; clear:both;}
.bars ul.mgs .nes li{ border:none; padding-left:40px; font-size:12px; height:24px; line-height:24px; font-weight:100; margin:4px 0px; }
.bars ul.mgs .nes li a:link,.bars ul.mgs .nes li a:visited{color:#069;}
.bars ul.mgs .nes li a:hover{color:#fff; text-decoration:none;}
.bars ul.mgs .nes li.ac{ background:#069;}
.bars ul.mgs .nes li.ac a{color:#fff!important;}
.bars ul.mgs .ac{display:block;}
.dstxt p{ text-indent:2em; margin-top:12px;}
.mgt10{ margin-top:10px;}.mgt24{ margin-top:24px;}.mgt60{ margin-top:60px;}.mg20{ margin:20px;}.mg10{ margin:10px;}
.jszn_i .liht34 li{ height:34px; line-height:34px; overflow:hidden; color:#999;}
span.red{ color:red;}
span.blue{ color:#3A8DC9;}
span.gray{ color:#999;}
span.mg8{ margin:8px;}
.gray6{ color:#666;}
.tb2col span.red{font-size:16px; margin-right:4px;}
.lht30{ line-height:30px;}
.amglr20 a{ margin:10px 20px;}
.yj4{border-radius: 3px; border:1px solid #d3d3d3; padding:4px 8px; width:200px; background:url(../images/rpt_x.jpg) repeat-x 0px 0px; margin-bottom:6px;}
.yzm .gray{ display:block; margin-bottom:8px;}
.tj_btn,.cz_btn{ margin-right:20px; border-radius: 6px; background:url(../images/rx_1bg.jpg) repeat-x 0px 0px; font-size:14px; font-weight:bold; color:#FFF; width:6em; height:2em; border:1px solid #d3d3d3; cursor:pointer;}
.emailbg{ background:url(../images/email_bg.jpg) no-repeat 0px 0px; padding-left:40px;width:250px; margin-left:auto; margin-right:auto; margin-top:16px; margin-bottom:16px; height:28px; line-height:22px;}
.nx a{ float:left; display:block; margin:0px 30px;}
.nx .mgt10{ margin-top:10px; font-size:14px; text-decoration:underline;}
.cjyys_btn{ background:url(../images/cjyys_btn.jpg) no-repeat;cursor:pointer; width:120px; height:40px; display:block;}
.kfz_btn{ background:url(../images/cwkfz_btn.jpg) no-repeat; cursor:pointer; width:120px; height:40px;}
.jz{margin-left:auto; margin-right:auto;}
.brd0{ border:1px solid #fff; }
.appi{ border-bottom:1px solid #CCC;}
.appi .brd0{ background:url(../images/rxbg.jpg) repeat-x 0px 0px;}
.lstbrd1{ margin-top:0px; background:url(../images/rybg.jpg) repeat-y 0px -2px; border-top:1px solid #fff;}
.app_br h5{ padding-left:20px; background:url(../images/app_yy_icon.jpg) no-repeat 0px 50%;height: 39px;line-height: 39px;}
.app_br .r a{ background:url(../images/app_btn.jpg) no-repeat 0px 0px; width:39px; width:118px; display:block; float:left; margin:0px 14px; height:39px;}
.app_br .r a.51kf_btn{ background-position:-143px 0px;}
.app_br .mg10{margin:4px 10px;}
.brdb0{ border-bottom:none!important;}.brdt0{border-top:none!important;}
.appedit{ padding-top:30px;}
.appedit .l{width:200px; text-align:center;}
.appedit .l .mgt24 img{border:1px solid #d3d3d3; margin-bottom:10px; width:104px; height:104px;}
.appedit .txts{ background:url(../images/bar_rbg.jpg) no-repeat 0px 0px;padding-left:80px;width:600px; text-align:left; padding-top:20px; line-height:24px; height:auto!important; height:700px; min-height:700px;}
.grxx .new_blk{width:820px; margin-left:auto; margin-right:auto; background:url(../images/tj_bg.jpg) no-repeat 100% 8px; margin-top:40px; }
.grxx .new_blk img{ border:1px solid #CCC; padding:3px;}
.grxx .new_blk .des{margin-left:0px; line-height:22px; width:250px; overflow:hidden;}
.grxx .new_blk span.jc{ font-weight:bold; margin-right:10px;}
.grxx .new_blk .des a{margin-top:6px; display:block;float: left;}
.grxx .new_blk .cjyybtn{ display:block; float:right; margin-top:46px; width:120px; height:40px; background:url(../images/cjyys_btn.jpg) no-repeat; margin-right:32px;}
.grxx .new_blk .ljsy2btn{ display:block; float:right; margin-top:46px; width:120px; height:40px; background:url(../images/ljsy2_btn.jpg) no-repeat; margin-right:32px;}
.grxx .row2{ background:url(../images/sgbg.jpg) no-repeat 50% 0%; width:942px; margin-left:auto; margin-right:auto; margin-top:30px;}
.grxx .row2 .kk{ margin:30px 40px;}
.grxx .row2 .new_blk{ background:none;}
.grxx .row2 .new_blk a.r{ margin-left:40px;}
.tbbg td{ padding:0px 10px 4px 10px;}
.webifo{ margin-top:80px;}
.webifo span{ font-weight:bold; font-size:14px; float:left;}
.webifo .ztbar{ border:1px solid #e4e4e4; float:left; background:#efefef;}
.webifo .ztbar div{float:left; width:67px; background:url(../images/ptbg.gif) no-repeat 100% 0%; overflow:hidden; text-align:center;}
.webifo .ztbar div.ac{ background:url(../images/acbg.gif) no-repeat 100% 0%; color:#fff; font-weight:bold;}
.webifo .ztbar div.ot{background:url(../images/otbg.gif) no-repeat 100% 0% #fff; color:#fff; color:#333;}
.webifo .ztbar div.ot2{background:url(../images/otbg2.gif) no-repeat 100% 0% #fff; color:#fff; color:#333;}
.webifo .ztbar div.lastd{width:50px; background-position:60% 0%;}
.tb4col{ margin-top:80px; color:#666; font-weight:bold; font-size:14px;}
.tb4col td{ border:1px solid #e3e3e3; padding:6px 0px;}
.w6em{width:6em;}.iptr10 .gray{margin-left:10px;}
.w164{width:164px;}.w583{width:583px;}.amg10 a{margin-right:12px;}
|
108wo
|
statics/css/open_sty.css
|
CSS
|
asf20
| 9,705
|
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{padding:0px; margin:0px;}
fieldset, img{border:0;}
ol, ul{list-style: none;}
.clr:after{content:" "; display:block; height:0px; clear:both; visibility:hidden;}.clr{display:inline-block;}* html .clr{height:0%;}
.clr{display:block;}
.col{display:inline-block;zoom:1;*display:inline;overflow:hidden;vertical-align:middle;}
.wrap{overflow:hidden; *display:inline-block;}.wrap{*display:block;}
.l{ float:left;}.r{ float:right;}
.sr_body{background:url(../images/search/search_xbg.jpg) repeat-x;color:#1A7DAC;}
.sr_body a:link,.sr_body a:visited{color:#1A7DAC; text-decoration:none;}
.sr_body a:hover{text-decoration:underline;}
.sr_head{height:32px; line-height:32px; font-family:Arial,sans-serif; font-size:14px;}
.sr_head .r a{ margin-left:20px;}
.sr_head .l a.on{color:#000;outline: medium none;font-weight:bold;color:#1A7DAC;}
.sr_main{background:url(../images/search/search_cbg.jpg) no-repeat; width:1000px; margin:0px auto; text-align:center;}
.sr_frm{width:450px; margin:0px auto;text-align:left!important; height:280px;}
.sr_logo img{ margin-left:-80px;}
.sr_frm_box{height:33px; line-height:33px;}
.sr_frmipt{float:left;width:398px; height:32px;background:url(../images/search/sr_iptbg.gif) no-repeat -5px -5px; overflow:hidden;}
.sr_frmipt input,.sr_frmipt .sp{float:left; margin-left:9px;}
.sr_frmipt input.ipt{height:26px; line-height:26px;margin-left:8px;margin-top:3px; *margin-top:2px; width:282px; *width:278px; border:none; *border:0px!important;}
.ss_btn{background:url(../images/search/sr_iptbg.gif) no-repeat -350px -50px; width:82px; cursor:pointer; border:none; font-size:14px; font-weight:bold; color:#fff; height:32px!important; line-height:32px!important;}
.sp{ background:url(../images/search/sr_iptbg.gif) no-repeat -423px 0px; text-indent:-10000px; width:8px; margin-left:8px; margin-top:1px; height:30px; cursor:pointer;}
.sr_infoul{border:1px solid #91C0E3; padding:2px; width:310px; display:none;}
.sr_infoul ul li{ height:24px; line-height:24px; text-align:left!important; color:#666;}
.sr_infoul ul li a{display:block; color:#666!important;display:block; width:100%;}
.sr_infoul ul li a:hover,.sr_infoul ul li.ac_over a{color:#FFF!important; background:#069; text-decoration:none;}
.sr_footer{font-size:12px; line-height:22px; margin-top:30px; text-align:center; border-top:1px solid #DBE7ED; padding-top:10px;}
.sr_list{background:url(../images/search/sr_list_tbg.jpg) repeat-x;}
.sr_logo{height:auto!important; height:150px; min-height:150px;}
.sr_list .sr_frm_box{position:relative;}
.sr_list .sr_frm_box .sr_infoul{position:absolute; top:33px; background:#fff; left:0px!important;}
.sr_list .sr_main{background:url(../images/search/sr_listbg.jpg) no-repeat;}
.sr_list .sr_head{ padding:0px 30px;}
.sr_list .sr_logo img{ margin-left:0px;}
.sr_list .sr_logo{position:relative;overflow:visible;}
.sr_list .sr_logo div.l{ margin-top:80px;position:relative;}
.sr_list .jg{ text-align:left; font-size:12px; margin-top:16px;}
.brd1s{background:url(../images/search/sr_xbg.jpg) no-repeat; width:946px; height:2px; margin:10px auto 0px;}
.sr_lists{}
.sr_lists .l{ width:220px; float:left; background:url(../images/search/sr_ybg.jpg) no-repeat right top; height:auto!important; height:842px; min-height:842px;}
.sr_lists .l div{margin:16px 0px 0px; text-align:right; font-size:12px; background:url(../images/search/sr_bbg.jpg) no-repeat 100% 100%; padding:10px; padding-left:0px; margin-right:1px;}
.bgno{background:none!important;}
.sr_lists .l div span{ font-size:12px; color:#999;}
.sr_lists .l div ul{ margin-top:6px;}
.sr_lists .l div ul li{ height:24px; line-height:24px; overflow:hidden;}
.sr_lists .l div ul li a{ padding-right:16px;}
.sr_lists .l div ul li a:hover,.sr_lists .l div ul li a.ac{background:url(../images/search/bg_member_1.gif) no-repeat 100% -30px; font-weight:bold;}
.sr_lists .c{text-align:left;}
.sr_lists .c ul{ margin:10px;}
.sr_lists .c li{border-bottom:1px dashed #CCC; margin-top:18px;}
.sr_lists .c li div p{ line-height:25px; margin-top:6px; font-size:12px; color:#999;}
.sr_lists .c li div.adds{ font-size:12px; margin:10px 4px;}
.sr_lists .c li a img{float:left; border:1px solid #ADCBE9; padding:2px; background:#FFF; margin-right:10px;}
.sr_lists .c li a:hover img{background:#efefef;}
.sr_lists .c .a2{ margin:10px;}
/* pages */
#pages { padding:14px 0 10px; font-family:瀹嬩綋; margin:10px; }
#pages a { display:inline-block; width:26px; height:22px; line-height:22px; background:#fff; border:1px solid #e3e3e3; text-align:center; color:#333}
#pages a.a1 { background:url(../images/search/admin_img/pages.png) no-repeat 0 5px; width:56px; }
#pages a:hover { background:#f1f1f1; color:#000; text-decoration:none; }
#pages span { display:inline-block; width:26px; height:22px; line-height:22px; background:#5a85b2; border:1px solid #5a85b2; color:#fff; text-align:center; }
.page .noPage { display:inline-block; width:56px; height:22px; line-height:22px; background:url(../img/icu/titleBg.png) repeat-x 0 -55px ; border:1px solid #e3e3e3; text-align:center; color:#a4a4a4; }
.sgch{background:#F2F8FD;margin:10px;padding:6px;}
.sgch strong{display:block; color:#666; margin-bottom:10px; font-size:14px;}
.sgch a{font-size:12px; margin:4px 10px 8px 10px; text-decoration:underline!important; float:left; display:block;white-space:normal;}
|
108wo
|
statics/css/search.css
|
CSS
|
asf20
| 5,498
|
.wx980{width:980px; font: 12px/1.5 Arial,Simsun,"Arial Unicode MS",Mingliu,Helvetica; word-wrap:break-word;border-collapse:collapse;border-spacing:0;color:#666; font-weight:100;}
.wx980 ul,.wx980 ul li{ list-style:none;padding:0px; margin:0px;}
.wx980 img{ border:none;}
.wx980 .mgt6{ margin-top:6px;}
.wx980 ul.cola{text-align:justify; text-justify:distribute;}
.wx980 ul.cola li{display:inline-block; text-align:center; vertical-align:top;}
.wx980 div.row1{ background:url(../images/applstbg.jpg) no-repeat 0px 24px; height:150px; overflow:hidden; margin-top:10px;}
.wx980 .cr:before, .cr:after{content:"";display:table;}.wx980 .cr:after{clear:both;}.wx980 .cr{zoom:1;}
.wx980 ul.cola li{*display:inline;overflow:hidden;}
.wx980 ul.col li{display:inline-block;vertical-align:middle;zoom:1;*display:inline; overflow:hidden; text-align:center;}
.wx980 ul.col2 li{width:49%;}
.wx980 ul.col5 li{width:19.5%;}
.wx980 ul.col4 li{width:24.7%;}
.wx980 h5{font-size:14px;}
.wx980 h5{font-size:14px; height:21px; overflow:hidden;}
.wx980 h6{font-size:12px;}
.wx980 h5,.wx980 h6, .wx980 p{ padding:0px; margin:0px;}
.wx980 .r{float:right;}
.wx980 .l{float:left;}
.wx980 .row2{width:600px; margin:10px 0px;}
.wx980 ul.cola{overflow:hidden; _height:1%; padding-left:0px; margin-top:20px; _width:515px;}
.wx980 .row2 div.jj{ background:url(../images/applst_lbg.jpg) no-repeat; width:45px; height:137px;}
.wx980 ul.li20 li{width:100px; _width:55px; overflow:hidden;}
.wx980 ul.li20 li div,.wx980 ul.col4 li div{padding:6px; _padding:0px; border:1px solid #fff;}
.wx980 ul.li20 li div:hover,.wx980 ul.col4 li div:hover{border:1px solid #efefef; border-radius:6px; padding:6px; -webkit-transition-property:border; -o-transition-property:border;-moz-transition-property:border; -webkit-transition-duration:0.4s; -o-transition-duration:0.4s; -moz-transition-duration:0.4s;}
.wx980 ul.li20 a{display:block;}
.wx980 .row4{width:800px; margin-top:16px;}
.wx980 .row4 ul.col4{ margin:10px 0px;}
.wx980 .row4 ul.col4 li{ margin:20px 0px;}
.wx980 .fy li div{ width:130px; margin-left:auto; margin-right:auto; height:55px; text-align:left; overflow:hidden;}
.wx980 .fy img{ float:left; margin-right:8px;}
.wx980 #pages {text-align:left; padding:14px 0 10px; font-family:Arial, Helvetica, sans-serif; }
.wx980 #pages a { display:inline-block; height:22px; line-height:22px; background:#fff; border:1px solid #e3e3e3; text-align:center; color:#333; padding:0 10px}
.wx980 #pages a.a1 { background:url(../images/pages.jpg) no-repeat 0 5px; width:56px; padding:0;text-decoration: none; }
.wx980 #pages a:hover { background:#f1f1f1; color:#000; text-decoration:none }
.wx980 #pages span { display:inline-block; height:22px; line-height:22px; background:#5a85b2; border:1px solid #5a85b2; color:#fff; text-align:center;padding:0 10px}
.wx980 .grayv{color:#999;}
.cr:before, .cr:after{content:"";display:table;}
.cr:after{clear:both;}.cr{zoom:1;}
.wx980 div.rr2{ height:166px; background:url(../images/applstbg.jpg) 0px -126px;}
.wx980 div.rr3{ background:url(../images/applstbg.jpg) 0px -330px;}
.wx980 .row3{height:40px; line-height:40px;}
.wx980 .row3 a{margin:0px 20px; padding:0px 4px; font-size:14px; font-weight:bold; position:relative;}
.wx980 .row3 a:link,.wx980 .row3 a:visited{float:left; display:block;}
.wx980 .row3 a:hover,.wx980 .row3 a.ac{color:#049!important; text-decoration:none;}
.wx980 .row3 a:link span.sja,.wx980 .row3 a:visited span.sja{width:23px; height:14px; background:url(../images/flnavbg.jpg) no-repeat; display:block; position:absolute; width:23px; height:14px; margin-left:-11px; top:40px; left:50%; display:none;}
.wx980 .row3 a.ac span.sja,.wx980 .row3 a:hover span.sja{display:block!important;}
.wx980 .infoba{ position:absolute; border:1px solid #CCC; right:20px; width:288px; padding-bottom:12px; background-color:#fff; border-radius:3px; box-shadow:-1px 1px 3px #999; z-index:100; display:none;}
.wx980 .infoba .lsj{ background:url(../images/lsj.gif) no-repeat; width:14px; height:27px; position:absolute; left:-14px; bottom:8px;}
.wx980 .infoba .r1{ background-color:#DEEAFD; margin-bottom:12px; _height:87px;}
.wx980 .infoba .r1 h5{margin-top:16px;}
.wx980 .infoba .r1 img{ float:left; margin:16px;}
.wx980 .infoba p.nr{ margin:4px 10px; display:block; height:54px; overflow:hidden;}
.wx980 .infoba .r2 div.zz{ display:block; clear:both; margin-right:10px; text-align:right;}
.wx980 .prr{ position:relative;}
.wx980 a:link,.wx980 a:visited{color:#666; text-decoration:none;}.wx980 a:hover{ text-decoration:underline;}
.jx{ background:url(../images/wjxx.jpg) no-repeat 0px -31px; width:40px; position:relative; top:6px; height:7px; margin-left:10px; _margin-left:5px; margin-right:4px;}
.jx .xx1,.jx .xx2,.jx .xx3,.jx .xx4,.jx .xx5{height:7px; display:block; background:url(../images/wjxx.jpg) no-repeat 0px 0px;}
.jx .xx1{ width:7px;}.jx .xx2{ width:14px;}.jx .xx3{ width:25px;}.jx .xx4{ width:32px;}.jx .xx5{ width:40px;}
.djx{ width:78px; background:url(../images/xxs_bg.jpg) no-repeat 0px -40px;}
.djx .xx1,.djx .xx2,.djx .xx3,.djx .xx4,.djx .xx5{height:14px; display:block; background:url(../images/xxs_bg.jpg) no-repeat 0px 0px;}
.djx .xx1{width:15px;}.djx .xx2{ width:30px;}.djx .xx3{ width:45px;}.djx .xx4{ width:62px;}.djx .xx5{ width:78px;}
.wx980 .xs{ display:block;}
.wx980 .mbox{width:600px; height:120px; overflow:hidden; position:relative;}
.wx980 .mbox div{ position:relative;}
.wx980 .mbox div a,.wx980 .mbox div a img{display:block; width:600px; height:120px;}
.wx980 .sbox{ position:relative; left: 254px; top: 4px;}
.wx980 .sbox a{ margin:0px 4px; padding:0px 4px;}
.wx980 .sbox a:hover{ text-decoration:none;background:url(../images/xz.jpg) no-repeat;}
.wx980 .sbox .current{background:url(../images/xz.jpg) no-repeat;}
.tb4col.r{float:right;} .tb4col.l{float:left;}
.tb4col h5{font-size:14px;}.tb4col h6{font-size:12px;} .tb4col h5,.tb4col h6, .tb4col p{ padding:0px; margin:0px;}
.tb4col td{ border:1px solid #e3e3e3; padding:6px 0px;}
.tb4col caption,.tb4col th {text-align:left;}
.tb4col{font: 12px/1.5 Arial,Simsun,"Arial Unicode MS",Mingliu,Helvetica; word-wrap:break-word;border-collapse:collapse;border-spacing:0;color:#666; margin-left:auto; margin-right:auto; font-weight:100;}
.tb4col tbody tr td{ padding:10px 20px;}
.tb4col .thd img.imgbh{ float:left; padding:2px; background:#fff; border:1px solid #efefef; display:block; margin-right:10px; margin-left:20px;}
.tb4col .thd h5{ margin-bottom:6px;}.tb4col .thd p{ font-weight:100; font-size:12px;}
.tb4col .thd div.r img{float:right; margin:0px 10px;}
.tb4col .clj a{ float:left; display:block; padding-left:20px; background:url(../images/pagei.gif) no-repeat 0px 50%; height:30px; line-height:30px; margin-right:20px;}
|
108wo
|
statics/css/appcenter.css
|
CSS
|
asf20
| 6,803
|
<?php
/**
* base.php PHPCMS框架入口文件
*
* @copyright (C) 2005-2010 PHPCMS
* @license http://www.phpcms.cn/license/
* @lastmodify 2010-6-7
*/
define('IN_PHPCMS', true);
//PHPCMS框架路径
define('PC_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
if(!defined('PHPCMS_PATH')) define('PHPCMS_PATH', PC_PATH.'..'.DIRECTORY_SEPARATOR);
//缓存文件夹地址
define('CACHE_PATH', PHPCMS_PATH.'caches'.DIRECTORY_SEPARATOR);
//主机协议
define('SITE_PROTOCOL', isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'http://');
//当前访问的主机名
define('SITE_URL', (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''));
//来源
define('HTTP_REFERER', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '');
//系统开始时间
define('SYS_START_TIME', microtime());
//加载公用函数库
pc_base::load_sys_func('global');
pc_base::load_sys_func('extention');
pc_base::auto_load_func();
pc_base::load_config('system','errorlog') ? set_error_handler('my_error_handler') : error_reporting(E_ERROR | E_WARNING | E_PARSE);
//设置本地时差
function_exists('date_default_timezone_set') && date_default_timezone_set(pc_base::load_config('system','timezone'));
define('CHARSET' ,pc_base::load_config('system','charset'));
//输出页面字符集
header('Content-type: text/html; charset='.CHARSET);
define('SYS_TIME', time());
//定义网站根路径
define('WEB_PATH',pc_base::load_config('system','web_path'));
//js 路径
define('JS_PATH',pc_base::load_config('system','js_path'));
//css 路径
define('CSS_PATH',pc_base::load_config('system','css_path'));
//img 路径
define('IMG_PATH',pc_base::load_config('system','img_path'));
//动态程序路径
define('APP_PATH',pc_base::load_config('system','app_path'));
//应用静态文件路径
define('PLUGIN_STATICS_PATH',WEB_PATH.'statics/plugin/');
if(pc_base::load_config('system','gzip') && function_exists('ob_gzhandler')) {
ob_start('ob_gzhandler');
} else {
ob_start();
}
//eddy 定义顶部产品栏目ID
define('TOP_PRODUCT_CATID', 7);
class pc_base {
/**
* 初始化应用程序
*/
public static function creat_app() {
return self::load_sys_class('application');
}
/**
* 加载系统类方法
* @param string $classname 类名
* @param string $path 扩展地址
* @param intger $initialize 是否初始化
*/
public static function load_sys_class($classname, $path = '', $initialize = 1) {
return self::_load_class($classname, $path, $initialize);
}
/**
* 加载应用类方法
* @param string $classname 类名
* @param string $m 模块
* @param intger $initialize 是否初始化
*/
public static function load_app_class($classname, $m = '', $initialize = 1) {
$m = empty($m) && defined('ROUTE_M') ? ROUTE_M : $m;
if (empty($m)) return false;
return self::_load_class($classname, 'modules'.DIRECTORY_SEPARATOR.$m.DIRECTORY_SEPARATOR.'classes', $initialize);
}
/**
* 加载数据模型
* @param string $classname 类名
*/
public static function load_model($classname) {
return self::_load_class($classname,'model');
}
/**
* 加载类文件函数
* @param string $classname 类名
* @param string $path 扩展地址
* @param intger $initialize 是否初始化
*/
private static function _load_class($classname, $path = '', $initialize = 1) {
static $classes = array();
if (empty($path)) $path = 'libs'.DIRECTORY_SEPARATOR.'classes';
$key = md5($path.$classname);
if (isset($classes[$key])) {
if (!empty($classes[$key])) {
return $classes[$key];
} else {
return true;
}
}
if (file_exists(PC_PATH.$path.DIRECTORY_SEPARATOR.$classname.'.class.php')) {
include PC_PATH.$path.DIRECTORY_SEPARATOR.$classname.'.class.php';
$name = $classname;
if ($my_path = self::my_path(PC_PATH.$path.DIRECTORY_SEPARATOR.$classname.'.class.php')) {
include $my_path;
$name = 'MY_'.$classname;
}
if ($initialize) {
$classes[$key] = new $name;
} else {
$classes[$key] = true;
}
return $classes[$key];
} else {
return false;
}
}
/**
* 加载系统的函数库
* @param string $func 函数库名
*/
public static function load_sys_func($func) {
return self::_load_func($func);
}
/**
* 自动加载autoload目录下函数库
* @param string $func 函数库名
*/
public static function auto_load_func($path='') {
return self::_auto_load_func($path);
}
/**
* 加载应用函数库
* @param string $func 函数库名
* @param string $m 模型名
*/
public static function load_app_func($func, $m = '') {
$m = empty($m) && defined('ROUTE_M') ? ROUTE_M : $m;
if (empty($m)) return false;
return self::_load_func($func, 'modules'.DIRECTORY_SEPARATOR.$m.DIRECTORY_SEPARATOR.'functions');
}
/**
* 加载插件类库
*/
public static function load_plugin_class($classname, $identification = '' ,$initialize = 1) {
$identification = empty($identification) && defined('PLUGIN_ID') ? PLUGIN_ID : $identification;
if (empty($identification)) return false;
return pc_base::load_sys_class($classname, 'plugin'.DIRECTORY_SEPARATOR.$identification.DIRECTORY_SEPARATOR.'classes', $initialize);
}
/**
* 加载插件函数库
* @param string $func 函数文件名称
* @param string $identification 插件标识
*/
public static function load_plugin_func($func,$identification) {
static $funcs = array();
$identification = empty($identification) && defined('PLUGIN_ID') ? PLUGIN_ID : $identification;
if (empty($identification)) return false;
$path = 'plugin'.DIRECTORY_SEPARATOR.$identification.DIRECTORY_SEPARATOR.'functions'.DIRECTORY_SEPARATOR.$func.'.func.php';
$key = md5($path);
if (isset($funcs[$key])) return true;
if (file_exists(PC_PATH.$path)) {
include PC_PATH.$path;
} else {
$funcs[$key] = false;
return false;
}
$funcs[$key] = true;
return true;
}
/**
* 加载插件数据模型
* @param string $classname 类名
*/
public static function load_plugin_model($classname,$identification) {
$identification = empty($identification) && defined('PLUGIN_ID') ? PLUGIN_ID : $identification;
$path = 'plugin'.DIRECTORY_SEPARATOR.$identification.DIRECTORY_SEPARATOR.'model';
return self::_load_class($classname,$path);
}
/**
* 加载函数库
* @param string $func 函数库名
* @param string $path 地址
*/
private static function _load_func($func, $path = '') {
static $funcs = array();
if (empty($path)) $path = 'libs'.DIRECTORY_SEPARATOR.'functions';
$path .= DIRECTORY_SEPARATOR.$func.'.func.php';
$key = md5($path);
if (isset($funcs[$key])) return true;
if (file_exists(PC_PATH.$path)) {
include PC_PATH.$path;
} else {
$funcs[$key] = false;
return false;
}
$funcs[$key] = true;
return true;
}
/**
* 加载函数库
* @param string $func 函数库名
* @param string $path 地址
*/
private static function _auto_load_func($path = '') {
if (empty($path)) $path = 'libs'.DIRECTORY_SEPARATOR.'functions'.DIRECTORY_SEPARATOR.'autoload';
$path .= DIRECTORY_SEPARATOR.'*.func.php';
$auto_funcs = glob(PC_PATH.DIRECTORY_SEPARATOR.$path);
if(!empty($auto_funcs) && is_array($auto_funcs)) {
foreach($auto_funcs as $func_path) {
include $func_path;
}
}
}
/**
* 是否有自己的扩展文件
* @param string $filepath 路径
*/
public static function my_path($filepath) {
$path = pathinfo($filepath);
if (file_exists($path['dirname'].DIRECTORY_SEPARATOR.'MY_'.$path['basename'])) {
return $path['dirname'].DIRECTORY_SEPARATOR.'MY_'.$path['basename'];
} else {
return false;
}
}
/**
* 加载配置文件
* @param string $file 配置文件
* @param string $key 要获取的配置荐
* @param string $default 默认配置。当获取配置项目失败时该值发生作用。
* @param boolean $reload 强制重新加载。
*/
public static function load_config($file, $key = '', $default = '', $reload = false) {
static $configs = array();
if (!$reload && isset($configs[$file])) {
if (empty($key)) {
return $configs[$file];
} elseif (isset($configs[$file][$key])) {
return $configs[$file][$key];
} else {
return $default;
}
}
$path = CACHE_PATH.'configs'.DIRECTORY_SEPARATOR.$file.'.php';
if (file_exists($path)) {
$configs[$file] = include $path;
}
if (empty($key)) {
return $configs[$file];
} elseif (isset($configs[$file][$key])) {
return $configs[$file][$key];
} else {
return $default;
}
}
}
|
108wo
|
phpcms/base.php
|
PHP
|
asf20
| 8,836
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('UNINSTALL') or exit('Access Denied');
return array('tags', 'tags_content');
?>
|
108wo
|
phpcms/modules/tags/uninstall/model.php
|
PHP
|
asf20
| 147
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('UNINSTALL') or exit('Access Denied');
?>
|
108wo
|
phpcms/modules/tags/uninstall/extention.inc.php
|
PHP
|
asf20
| 108
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');
$models = getcache('model', 'commons');
$sitelist = getcache('sitelist', 'commons');
$i=0;
foreach($models as $model_v){
$model_arr .= 'model_arr['.$i++.'] = new Array("'.$model_v['modelid'].'","'.$model_v['name'].'","'.$model_v['siteid'].'");'."\n";
}
?>
<script type="text/javascript">
var model_arr = new Array();
<?php echo $model_arr ?>
function select_modelid(modelid){
var model_option = '<option value="0">所有模型</option>';
for(i=0; i< <?php echo $i?>; i++){
if(model_arr[i][2] == modelid){
model_option += '<option value="'+model_arr[i][0]+'" >'+model_arr[i][1]+'</option>';
}
}
$('#modelid').html(model_option);
}
</script>
<div class="pad_10">
<form action="?m=tags&c=tags&a=create" method="post" name="myform" >
<table cellpadding="2" cellspacing="1" class="table_form" width="100%">
<tr>
<th width="20%">请选择需要重建的站点:</th>
<td><select name="siteid" onchange="select_modelid($(this).val())">
<option value="0">所有站点</option>
<?php foreach($sitelist as $site_v){ ?>
<option value="<?php echo $site_v['siteid'];?>"><?php echo $site_v['name'];?></option>
<?php }?>
</select></td>
</tr>
<tr>
<th width="20%">请选择需要重建的模型:</th>
<td><select name="modelid" id="modelid" >
<option value="0">所有模型</option>
</select></td>
</tr>
<tr>
<th></th>
<td><input type="submit" name="dosubmit" id="dosubmit" value=" <?php echo L('submit')?> "></td>
</tr>
</table>
</form>
</div>
</body>
</html>
|
108wo
|
phpcms/modules/tags/templates/tags_create.tpl.php
|
PHP
|
asf20
| 1,656
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');
?>
<div class="pad-lr-10">
<form action="?m=tags&c=tags&a=edit&tagid=<?php echo $_GET['tagid']?>" method="post" id="myform">
<table width="100%" class="table_form">
<tr>
<th width="120">关键字:</th>
<td class="y-bg"><input type="text" name="info[tag]" value="<?php echo $data['tag']?>" /></td>
</tr>
<tr>
<th width="120">附加状态码</th>
<td class="y-bg"><input type="text" name="info[style]" value="<?php echo $data['style']?>" /></td>
</tr>
<tr>
<th width="120">使用次数</th>
<td class="y-bg"><input type="text" name="info[usetimes]" value="<?php echo $data['usetimes']?>" /></td>
</tr>
<tr>
<th>最后使用时间</th>
<td class="y-bg"><?php echo form::date("info[lastusetime]",date('Y-m-d H:i:s', $data['lastusetime']),1,1)?></td>
</tr>
<tr>
<th>点击量</th>
<td class="y-bg"><input type="text" name="info[hits]" value="<?php echo $data['hits']?>" /></td>
</tr>
<tr>
<th>最后点击时间</th>
<td class="y-bg"><?php echo form::date("info[lasthittime]",date('Y-m-d H:i:s', $data['lasthittime']),1,1)?></td>
</tr>
<tr>
<th><input type="hidden" name="tagid" value="<?php echo $_GET['tagid']?>" /></th>
<td> <input type="submit" id="dosubmit" name="dosubmit" value="<?php echo L('submit')?>" /></td>
</tr>
</table>
</form>
</div>
</body>
</html>
|
108wo
|
phpcms/modules/tags/templates/tags_edit.tpl.php
|
PHP
|
asf20
| 1,503
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header', 'admin');
?>
<div class="pad_10">
<div class="table-list">
<form action="" method="get">
<input type="hidden" name="m" value="tags" />
<input type="hidden" name="c" value="tags" />
<input type="hidden" name="a" id="action" value="delete" />
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="50"><input type="checkbox" value="" id="check_box" onclick="selectall('tagid[]');"></th>
<th width="50">排序</th>
<th>关键字</th>
<th>使用次数</th>
<th>最后使用时间</th>
<th>点击次数</th>
<th>最近访问时间</th>
<th>相关操作</th>
</tr>
</thead>
<tbody>
<?php
if(is_array($data))
foreach($data as $v){
?>
<tr>
<td width="50" align="center"><input type="checkbox" value="<?php echo $v['tagid']?>" name="tagid[]"></td>
<td><input type="text" name="listorder[]" value="<?php echo $v['listorder']?>" size="5" /></td>
<td align="center"><?php echo $v['tag']?></td>
<td align="center"><?php echo $v['usetimes']?></td>
<td align="center"><?php echo date('Y-m-d H:i:s', $v['lastusetime'])?></td>
<td align="center"><?php echo $v['hits']?></td>
<td align="center"><?php echo date('Y-m-d H:i:s', $v['lasthittime'])?></td>
<td align="center"><a href="?m=tags&c=tags&a=edit&tagid=<?php echo $v['tagid']?>">修改</a> | <a href="?m=tags&c=tags&a=delete&tagid=<?php echo $v['tagid']?>" onclick="return confirm('<?php echo htmlspecialchars(new_addslashes(L('confirm', array('message'=>$v['tag']))))?>')">删除</a></td>
</tr>
<?php } ?>
</tbody>
</table>
<div class="btn">
<label for="check_box"><?php echo L('select_all')?>/<?php echo L('cancel')?></label> <input type="submit" class="button" name="dosubmit" value="<?php echo L('delete')?>" onclick="return confirm('您确认删除么,该操作无法恢复!')" /> <input type="submit" class="button" name="dosubmit" onclick="$('#action').val('listorder')" value=" 更新排序 "
</div>
</from>
</div>
</div>
<div id="pages"><?php echo $pages?></div>
</body>
</html>
|
108wo
|
phpcms/modules/tags/templates/tags_list.tpl.php
|
PHP
|
asf20
| 2,134
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
class index {
public function __construct(){
$this->db = pc_base::load_model('tags_model');
$this->db_content = pc_base::load_model('tags_content_model');
}
public function init(){
$tag = $_GET['tag'];
$models = getcache('model', 'commons');
$sitelist = getcache('sitelist', 'commons');
$i=0;
$siteid = intval($_GET['siteid']);
$modelid = intval($_GET['modelid']);
$orderby = intval($_GET['orderby']);
foreach($models as $model_v){
$model_arr .= 'model_arr['.$i++.'] = new Array("'.$model_v['modelid'].'","'.$model_v['name'].'","'.$model_v['siteid'].'");'."\n";
}
$page = isset($_GET['page']) && intval($_GET['page']) ? intval($_GET['page']) : 1;
if($tag){
if($this->db->get_one(array('tag'=>$tag))){
$sql_arr = array('tag'=>$tag);
if($siteid){
$sql_arr['siteid'] = $siteid;
}
if($modelid){
$sql_arr['modelid'] = $modelid;
}
if($orderby){
$sql_ord = 'updatetime desc';
}else{
$sql_ord = 'updatetime asc';
}
$tagdata = $this->db_content->listinfo($sql_arr,$sql_ord, $page, 40);
$pages = $this->db_content->pages;
$total = $this->db_content->number;
}else{
showmessage('标签不存在!');
}
$CATEGORYS = getcache('category_content_'.$siteid,'commons');
include template('tags', 'tag');
}else{
$tagdata = $this->db->listinfo('','tagid desc', $page, 100);
$pages = $this->db->pages;
$total = $this->db->number;
include template('tags', 'index');
}
}
}
|
108wo
|
phpcms/modules/tags/index.php
|
PHP
|
asf20
| 1,609
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
pc_base::load_app_class('admin', 'admin', 0);
class tags extends admin {
private $db;
public function __construct() {
$this->db = pc_base::load_model('tags_model');
parent::__construct();
}
public function init() {
$page = isset($_GET['page']) && intval($_GET['page']) ? intval($_GET['page']) : 1;
$data = $this->db->listinfo('','tagid desc', $page, 20);
$pages = $this->db->pages;
include $this->admin_tpl('tags_list');
}
public function create(){
if(isset($_POST['dosubmit'])){
//$siteid = get_siteid();
$this->db_content = pc_base::load_model('tags_content_model');
$modelid = intval($_POST['modelid']);
$siteid = intval($_POST['siteid']);
if($siteid){
$this->db_content->delete(array('siteid'=>$siteid));
}else{
$this->db_content->query("TRUNCATE TABLE `phpcms_tags_content`");
$this->db->query("TRUNCATE TABLE `phpcms_tags`");
}
$models = getcache('model', 'commons');
foreach($models as $models_v){
if($siteid && $models_v['siteid']!=$siteid)continue;
if($modelid && $models_v['modelid']!=$modelid)continue;
$keywords = $this->db->query("SELECT `keywords`,`url`,`id`,`title`,`catid`,`updatetime` FROM `phpcms_".$models_v[tablename]."`");
$keywords = $this->db->fetch_array();
foreach($keywords as $keyword){
$key = explode(' ', $keyword['keywords']);
foreach($key as $key_v){
if($this->db->get_one("`tag`='$key_v'", 'tagid')){
$this->db->query("UPDATE `phpcms_tags` SET `usetimes`=usetimes+1 WHERE tag='$key_v'");
}else{
$this->db->query("INSERT INTO `phpcms_tags`(`tag`,`usetimes`,`lastusetime`,`lasthittime`)VALUES('$key_v',1,".SYS_TIME.",".SYS_TIME.")");
}
$sql .= ",('$key_v','$keyword[url]','$keyword[title]',$models_v[siteid],$models_v[modelid],$keyword[id],$keyword[catid],$keyword[updatetime])\n";
}
}
}
if(!$sql)showmessage('没有需要导入的数据', '?m=tags&c=tags&a=init');
$sql = "INSERT INTO `phpcms_tags_content` (`tag`,`url`,`title`,`siteid`,`modelid`,`contentid`,`catid`,`updatetime`) VALUES ".substr($sql, 1);
$this->db->query($sql);
showmessage('重建成功!', '?m=tags&c=tags&a=init');
}else{
include $this->admin_tpl('tags_create');
}
}
public function edit(){
if(isset($_POST['dosubmit'])){
$_POST['info']['lastusetime'] = strtotime($_POST['info']['lastusetime']);
$_POST['info']['lasthittime'] = strtotime($_POST['info']['lasthittime']);
$this->db->update($_POST['info'], array('tagid'=>$_GET['tagid']));
showmessage('更新成功!');
}else{
$data = $this->db->get_one("`tagid` = '$_GET[tagid]'");
if(!$data)showmessage('信息不存在或者已被删除!!', '?m=tags&c=tags&a=init');
pc_base::load_sys_class('form','',0);
include $this->admin_tpl('tags_edit');
}
}
public function delete(){
if($_GET['tagid']){
if(is_array($_GET['tagid'])){
$_GET['tagid'] = implode(',', $_GET['tagid']);
$this->db->query("DELETE FROM `phpcms_tags` WHERE `tagid` in ($_GET[tagid])");
}else{
$this->db->query("DELETE FROM `phpcms_tags` WHERE `tagid` in ($_GET[tagid])");
}
showmessage('操作成功', '?m=tags&c=tags&a=init');
}else{
showmessage('参数不正确', '?m=tags&c=tags&a=init');
}
}
public function listorder(){
$tagid = $_GET['tagid'];
if($tagid){
foreach($tagid as $n=>$id){
if(!$id)continue;
$this->db->update('`listorder`='.intval($_GET['listorder'][$n]), array('tagid'=>$id));
}
showmessage('更新成功!', '?m=tags&c=tags&a=init');
}else{
showmessage('参数不正确', '?m=tags&c=tags&a=init');
}
}
}
?>
|
108wo
|
phpcms/modules/tags/tags.php
|
PHP
|
asf20
| 3,774
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
return array('tags', 'tags_content');
?>
|
108wo
|
phpcms/modules/tags/install/model.php
|
PHP
|
asf20
| 145
|
{template "content","header"}
<style>
<!--
.search-list {font-size:14px;}
.search-list a{display:inline-block;padding:10px;font-size:14px; height:20px;line-height:20px;}
.font_16{font-size:16px;font-weight:bold;}
.font_18{font-size:18px;font-weight:bold;}
.color_16{color:red;}
.color_18{color:blue;}
-->
</style>
<!--main-->
<div class="main cat-search">
<div class="col-auto">
<div class="crumbs"><a href="{APP_PATH}">首页</a><span> > </span>热门标签</div>
<div class="search-point">共找到符合条件的标签 <strong class="red">{$total}</strong> 个</div>
<ul class="search-list">
<li style="margin:0">
{loop $tagdata $r}
<a href="?m=tags&tag={urlencode($r['tag'])}" class="font_1{rand(6, 8)} color_1{rand(6, 8)}" target="_blank">{$r['tag']}({$r['usetimes']})</a>
{/loop}
</li>
</ul>
<div id="pages" class="text-c">{$pages}</div>
</div>
</div>
{template "content","footer"}
|
108wo
|
phpcms/modules/tags/install/templates/index.html
|
HTML
|
asf20
| 985
|
{template "content","header"}
<!--main-->
<script type="text/javascript">
var model_arr = new Array();
<?php echo $model_arr ?>
function select_modelid(siteid, modelid){
var model_option = '<option value="0">所有模型</option>';
var select = '';
for(i=0; i< <?php echo $i?>; i++){
if(model_arr[i][2] == siteid){
select = model_arr[i][0] == modelid ? 'selected' :'';
model_option += '<option value="'+model_arr[i][0]+'" '+select+'>'+model_arr[i][1]+'</option>';
}
}
$('#modelid').html(model_option);
}
</script>
<div class="main cat-search">
<div class="col-auto">
<div class="crumbs"><a href="{APP_PATH}">首页</a><span> > </span><a href="index.php?m=tags">热门标签</a> > {$tag}</div>
<form name="myform" method="get" action="">
<ul class="search-form">
<li>
<label>选择站点:</label>
<select name="siteid" onchange="select_modelid($(this).val())">
<option value="0">所有站点</option>
{loop $sitelist $site_v}
<option value="{$site_v['siteid']}" {if $siteid == $site_v['siteid']}selected{/if}>{$site_v['name']}</option>
{/loop}
</select>
</li>
<li>
<label>选择模型:</label>
<select name="modelid" id="modelid" >
<option value="0">所有模型</option>
</select>
</li>
{if $siteid}
<script type="text/javascript">
select_modelid({$siteid}, {$_GET['modelid']});
</script>
{/if}
<li><label>排序方式</label><select name="orderby" id="orderby" size="1">
<option value="0" >更新时间 降序</option>
<option value="1" {if $orderby}selected{/if}>更新时间 升序</option>
</select></li>
<li><div class="btn"><input type="submit" name="dosubmit" value="搜索" /></div></li>
<input type="hidden" name="m" value="tags">
<input type="hidden" name="c" value="index">
<input type="hidden" name="a" value="init">
<input type="hidden" name="tag" value="<?php echo $_GET['tag']?>" />
</ul></form>
<div class="search-point">共找到符合条件的标签 <strong class="red">{$total}</strong> 个</div>
<ul class="search-list">
{loop $tagdata $r}
<li style="margin:0">
<h5><a href="{$r[url]}" target="_blank" class="blue fn">{$r[title]}</a> - <a href="{if strpos($CATEGORYS[$r[catid]][url],'http://')===false}{$siteurl}{$CATEGORYS[$r[catid]][url]}{else}{$CATEGORYS[$r[catid]][url]}{/if}" class="blue f12 fn">{$CATEGORYS[$r[catid]][catname]}</a> - <span class="green f12 fn">发布时间:{date('Y-m-d H:i',$r[updatetime])}</span></h5>
</li>
{/loop}
</li>
</ul>
<div id="pages" class="text-c">{$pages}</div>
</div>
</div>
{template "content","footer"}
|
108wo
|
phpcms/modules/tags/install/templates/tag.html
|
HTML
|
asf20
| 2,722
|
<?php
error_reporting(E_ALL);
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
$parentid = $menu_db->insert(array('name'=>'tags', 'parentid'=>29, 'm'=>'tags', 'c'=>'tags', 'a'=>'init', 'data'=>'', 'listorder'=>0, 'display'=>'1'), true);
$menu_db->insert(array('name'=>'tags_create', 'parentid'=>$parentid, 'm'=>'tags', 'c'=>'tags', 'a'=>'create', 'data'=>'', 'listorder'=>0, 'display'=>'1'));
$language = array('tags'=>'tags管理', 'tags_create'=>'tags重建');
?>
|
108wo
|
phpcms/modules/tags/install/extention.inc.php
|
PHP
|
asf20
| 517
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
$module = 'tags';
$modulename = 'tags 标签';
$introduce = 'tags 标签模块';
$author = '世界首富';
$authorsite = 'http://www.phpcms.cn';
$authoremail = '754157556@qq.com';
?>
|
108wo
|
phpcms/modules/tags/install/config.inc.php
|
PHP
|
asf20
| 292
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('UNINSTALL') or exit('Access Denied');
return '';
?>
|
108wo
|
phpcms/modules/upgrade/uninstall/model.php
|
PHP
|
asf20
| 118
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('UNINSTALL') or exit('Access Denied');
$type_db = pc_base::load_model('type_model');
$typeid = $type_db->delete(array('module'=>'upgrade'));
if(!$typeid) return FALSE;
?>
|
108wo
|
phpcms/modules/upgrade/uninstall/extention.inc.php
|
PHP
|
asf20
| 240
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<div class="pad-lr-10">
<div class="table-list">
<div class="explain-col">
<?php echo L('upgrade_notice');?>
</div>
<div class="bk15"></div>
<form name="myform" action="" method="get" id="myform">
<input type="hidden" name="s" value="1" />
<input type="hidden" name="cover" value="<?php echo $_GET['cover']?>" />
<input name="m" value="upgrade" type="hidden" />
<input name="c" value="index" type="hidden" />
<input name="a" value="init" type="hidden" />
<table width="100%" cellspacing="0">
<thead>
<tr>
<th align="left" width="300"><?php echo L('currentversion')?><?php if(empty($pathlist)) {?><?php echo L('lastversion')?><?php }?></th>
<th align="left"><?php echo L('updatetime')?></th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><?php echo $current_version['pc_version'];?></td>
<td align="left"><?php echo $current_version['pc_release'];?></td>
</tr>
</tbody>
</table>
<?php if(!empty($pathlist)) {?>
<div class="bk15"></div>
<table width="100%" cellspacing="0">
<thead>
<tr>
<th align="left" width="300"><?php echo L('updatelist')?></th>
<th align="left"><?php echo L('updatetime')?></th>
</tr>
</thead>
<tbody>
<?php foreach($pathlist as $v) { ?>
<tr>
<td><?php echo $v;?></td>
<td><?php echo substr($v, 15, 8);?></td>
</tr>
<?php }?>
</tbody>
</table>
<div class="bk15"></div>
<label for="cover"><font color="red"><?php echo L('covertemplate')?></font></label><input name="cover" id="cover" type="checkbox" value=1>
<input name="dosubmit" type="submit" id="dosubmit" value="<?php echo L('begin_upgrade')?>" class="button">
<?php }?>
</form>
</div>
</div>
</body>
</html>
|
108wo
|
phpcms/modules/upgrade/templates/upgrade_index.tpl.php
|
PHP
|
asf20
| 1,806
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<div class="pad-lr-10">
<div class="table-list">
<div class="explain-col">
<?php echo L('check_file_notice');?>
</div>
<div class="bk15"></div>
<table width="100%" cellspacing="0">
<thead>
<tr>
<th align="left"><?php echo L('modifyedfile')?></th>
<th align="left"><?php echo L('lostfile')?></th>
<th align="left"><?php echo L('unknowfile')?></th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><?php echo count($diff);?></td>
<td align="left"><?php echo count($lostfile);?></td>
<td align="left"><?php echo count($unknowfile);?></td>
</tr>
</tbody>
</table>
<div class="bk15"></div>
<?php if(!empty($diff)) {?>
<table width="100%" cellspacing="0">
<thead>
<tr>
<th align="left"><?php echo L('modifyedfile')?></th>
<th align="left"><?php echo L('lastmodifytime')?></th>
<th align="left"><?php echo L('filesize')?></th>
<th align="left"><?php echo L('operation')?></th>
</tr>
</thead>
<tbody>
<?php
foreach($diff as $k=>$v) {
?>
<tr>
<td align="left"><?php echo base64_decode($k)?></td>
<td align="left"><?php echo date("Y-m-d H:i:s", filemtime(base64_decode($k)))?></td>
<td align="left"><?php echo sizecount(filesize(base64_decode($k)))?></td>
<td align="left"><a href="javascript:void(0)" onclick="view('<?php echo base64_decode($k)?>')"><?php echo L('view')?></a> <a href="<?php echo APP_PATH,base64_decode($k);?>" target="_blank"><?php echo L('access')?></a></td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="bk15"></div>
<?php }?>
<?php if(!empty($unknowfile)) {?>
<table width="100%" cellspacing="0">
<thead>
<tr>
<th align="left"><?php echo L('unknowfile')?></th>
<th align="left"><?php echo L('lastmodifytime')?></th>
<th align="left"><?php echo L('filesize')?></th>
<th align="left"><?php echo L('operation')?></th>
</tr>
</thead>
<tbody>
<?php
foreach($unknowfile as $k=>$v) {
?>
<tr>
<td align="left"><?php echo base64_decode($v)?></td>
<td align="left"><?php echo date("Y-m-d H:i:s", filectime(base64_decode($v)))?></td>
<td align="left"><?php echo sizecount(filesize(base64_decode($v)))?></td>
<td align="left"><a href="javascript:void(0)" onclick="view('<?php echo base64_decode($v)?>')"><?php echo L('view')?></a> <a href="<?php echo APP_PATH,base64_decode($v);?>" target="_blank"><?php echo L('access')?></a></td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="bk15"></div>
<?php }?>
<?php if(!empty($lostfile)) {?>
<table width="100%" cellspacing="0">
<thead>
<tr>
<th align="left"><?php echo L('lostfile')?></th>
</tr>
</thead>
<tbody>
<?php
foreach($lostfile as $k) {
?>
<tr>
<td align="left"><?php echo base64_decode($k)?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php }?>
</div>
</div>
<script type="text/javascript">
<!--
function view(url) {
window.top.art.dialog({id:'edit'}).close();
window.top.art.dialog({title:'<?php echo L('view_code')?>',id:'edit',iframe:'?m=scan&c=index&a=public_view&url='+url,width:'700',height:'500'});
}
//-->
</script>
</body>
</html>
|
108wo
|
phpcms/modules/upgrade/templates/check_file.tpl.php
|
PHP
|
asf20
| 3,250
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
pc_base::load_app_class('admin', 'admin', 0);
class index extends admin {
private $_filearr = array('api', 'phpcms', 'statics', '');
//md5验证地址
private $_upgrademd5 = 'http://www.phpcms.cn/upgrademd5/';
//补丁地址
private $_patchurl = 'http://download.phpcms.cn/v9/9.0/patch/';
public function __construct() {
parent::__construct();
}
public function init() {
$patch_charset = str_replace('-', '', CHARSET);
$upgrade_path_base = $this->_patchurl.$patch_charset.'/';
//获取当前版本
$current_version = pc_base::load_config('version');
$pathlist_str = @file_get_contents($upgrade_path_base);
$pathlist = $allpathlist = array();
$key = -1;
//获取压缩包列表
preg_match_all("/\"(patch_[\w_]+\.zip)\"/", $pathlist_str, $allpathlist);
$allpathlist = $allpathlist[1];
//获取可供当前版本升级的压缩包
foreach($allpathlist as $k=>$v) {
if(strstr($v, 'patch_'.$current_version['pc_release'])) {
$key = $k;
break;
}
}
$key = $key < 0 ? 9999 : $key;
foreach($allpathlist as $k=>$v) {
if($k >= $key) {
$pathlist[$k] = $v;
}
}
//开始升级
if(!empty($_GET['s'])) {
if(empty($_GET['do'])) {
showmessage(L('upgradeing'), '?m=upgrade&c=index&a=init&s=1&do=1&cover='.$_GET['cover']);
}
//检查服务器是否支持zip
if(empty($pathlist)) {
showmessage(L('upgrade_success'), '?m=upgrade&c=index&a=checkfile');
}
//创建缓存文件夹
if(!file_exists(CACHE_PATH.'caches_upgrade')) {
@mkdir(CACHE_PATH.'caches_upgrade');
}
//根据版本下载zip升级包,解压覆盖
pc_base::load_app_class('pclzip', 'upgrade', 0);
foreach($pathlist as $k=>$v) {
//远程压缩包地址
$upgradezip_url = $upgrade_path_base.$v;
//保存到本地地址
$upgradezip_path = CACHE_PATH.'caches_upgrade'.DIRECTORY_SEPARATOR.$v;
//解压路径
$upgradezip_source_path = CACHE_PATH.'caches_upgrade'.DIRECTORY_SEPARATOR.basename($v,".zip");
//下载压缩包
@file_put_contents($upgradezip_path, @file_get_contents($upgradezip_url));
//解压缩
$archive = new PclZip($upgradezip_path);
if($archive->extract(PCLZIP_OPT_PATH, $upgradezip_source_path, PCLZIP_OPT_REPLACE_NEWER) == 0) {
die("Error : ".$archive->errorInfo(true));
}
//拷贝gbk/upload文件夹到根目录
$copy_from = $upgradezip_source_path.DIRECTORY_SEPARATOR.$patch_charset.DIRECTORY_SEPARATOR.'upload'.DIRECTORY_SEPARATOR;
$copy_to = PHPCMS_PATH;
$this->copyfailnum = 0;
$this->copydir($copy_from, $copy_to, $_GET['cover']);
//检查文件操作权限,是否复制成功
if($this->copyfailnum > 0) {
//如果失败,恢复当前版本
@file_put_contents(CACHE_PATH.'configs'.DIRECTORY_SEPARATOR.'version.php', '<?php return '.var_export($current_version, true).';?>');
showmessage(L('please_check_filepri'));
}
//执行sql
//sql目录地址
$sql_path = CACHE_PATH.'caches_upgrade'.DIRECTORY_SEPARATOR.basename($v,".zip").DIRECTORY_SEPARATOR.$patch_charset.DIRECTORY_SEPARATOR.'upgrade'.DIRECTORY_SEPARATOR.'ext'.DIRECTORY_SEPARATOR;
$file_list = glob($sql_path.'*');
if(!empty($file_list)) {
foreach ($file_list as $fk=>$fv) {
if(in_array(strtolower(substr($fv, -3, 3)), array('php', 'sql'))) {
if (strtolower(substr($file_list[$fk], -3, 3)) == 'sql' && $data = file_get_contents($file_list[$fk])) {
$model_name = substr(basename($fv), 0, -4);
if (!$db = pc_base::load_model($model_name.'_model')) {
showmessage($model_name.L('lost'), '?m=upgrade&c=index&a=init&s=1');
}
$mysql_server_version = $db->version();
$dbcharset = pc_base::load_config('database','default');
$dbcharset = $dbcharset['charset'];
$sqls = explode(';', $data);
foreach ($sqls as $sql) {
if (empty($sql)) continue;
if(mysql_get_server_info > '4.1' && $dbcharset) {
$sql = preg_replace("/TYPE=(InnoDB|MyISAM|MEMORY)( DEFAULT CHARSET=[^; ]+)?/", "TYPE=\\1 DEFAULT CHARSET=".$dbcharset,$sql);
}
$db->query($sql);
}
} elseif (strtolower(substr($file_list[$fk], -3, 3)) == 'php' && file_exists($file_list[$fk])) {
include $file_list[$fk];
//同步菜单语言包
if (strtolower(basename($file_list[$fk])) == 'system_menu.lang.php' && file_exists($file_list[$fk])) {
include $file_list[$fk];
$new_lan = $LANG;
unset($LANG);
$lang = pc_base::load_config('system','lang');
$menu_lan_file = PC_PATH.'languages'.DIRECTORY_SEPARATOR.$lang.DIRECTORY_SEPARATOR.'system_menu.lang.php';
include $menu_lan_file;
$original_lan = $LANG;
unset($LANG);
$diff_lan = array_diff($new_lan, $original_lan);
$content = file_get_contents($menu_lan_file);
$content = substr($content,0,-2);
$data = '';
foreach ($diff_lan as $lk => $l) {
$data .= "\$LANG['".$lk."'] = '".$l."';\n\r";
}
$data = $content.$data."?>";
file_put_contents($menu_lan_file, $data);
}
}
}
}
}
//读取版本号写入version.php文件
//配置文件地址
$configpath = CACHE_PATH.'caches_upgrade'.DIRECTORY_SEPARATOR.basename($v,".zip").DIRECTORY_SEPARATOR.$patch_charset.DIRECTORY_SEPARATOR.'upgrade'.DIRECTORY_SEPARATOR.'config.php';
if(file_exists($configpath)) {
$config_arr = include $configpath;
$version_arr = array('pc_version'=>$config_arr['to_version'], 'pc_release'=>$config_arr['to_release']);
//版本文件地址
$version_filepath = CACHE_PATH.'configs'.DIRECTORY_SEPARATOR.'version.php';
@file_put_contents($version_filepath, '<?php return '.var_export($version_arr, true).';?>');
}
//删除文件
@unlink($upgradezip_path);
//删除文件夹
$this->deletedir($upgradezip_source_path);
//提示语
$tmp_k = $k + 1;
if(!empty($pathlist[$tmp_k])) {
$next_update = '<br />'.L('upgradeing').basename($pathlist[$tmp_k],".zip");
} else {
$next_update;
}
//文件校验是否升级成功
showmessage(basename($v,".zip").L('upgrade_success').$next_update, '?m=upgrade&c=index&a=init&s=1&do=1&cover='.$_GET['cover']);
}
} else {
include $this->admin_tpl('upgrade_index');
}
}
//检查文件md5值
public function checkfile() {
if(!empty($_GET['do'])) {
$this->md5_arr = array();
$this->_pc_readdir(".");
//读取phpcms接口
$current_version = pc_base::load_config('version');
$phpcms_md5 = @file_get_contents($this->_upgrademd5.$current_version['pc_release'].'_'.CHARSET.".php");
$phpcms_md5_arr = json_decode($phpcms_md5, 1);
//计算数组差集
$diff = array_diff($phpcms_md5_arr, $this->md5_arr);
//丢失文件列表
$lostfile = array();
foreach($phpcms_md5_arr as $k=>$v) {
if(!in_array($k, array_keys($this->md5_arr))) {
$lostfile[] = $k;
unset($diff[$k]);
}
}
//未知文件列表
$unknowfile = array_diff(array_keys($this->md5_arr), array_keys($phpcms_md5_arr));
include $this->admin_tpl('check_file');
} else {
showmessage(L('begin_checkfile'), '?m=upgrade&c=index&a=checkfile&do=1&menuid='.$_GET['menuid']);
}
}
private function _pc_readdir($path='') {
$dir_arr = explode('/', dirname($path));
if(is_dir($path)) {
$handler = opendir($path);
while(($filename = @readdir($handler)) !== false) {
if(substr($filename, 0, 1) != ".") {
$this->_pc_readdir($path.'/'.$filename);
}
}
closedir($handler);
} else {
if (dirname($path) == '.' || (isset($dir_arr[1]) && in_array($dir_arr[1], $this->_filearr))) {
$this->md5_arr[base64_encode($path)] = md5_file($path);
}
}
}
public function copydir($dirfrom, $dirto, $cover='') {
//如果遇到同名文件无法复制,则直接退出
if(is_file($dirto)){
die(L('have_no_pri').$dirto);
}
//如果目录不存在,则建立之
if(!file_exists($dirto)){
mkdir($dirto);
}
$handle = opendir($dirfrom); //打开当前目录
//循环读取文件
while(false !== ($file = readdir($handle))) {
if($file != '.' && $file != '..'){ //排除"."和"."
//生成源文件名
$filefrom = $dirfrom.DIRECTORY_SEPARATOR.$file;
//生成目标文件名
$fileto = $dirto.DIRECTORY_SEPARATOR.$file;
if(is_dir($filefrom)){ //如果是子目录,则进行递归操作
$this->copydir($filefrom, $fileto, $cover);
} else { //如果是文件,则直接用copy函数复制
if(!empty($cover)) {
if(!copy($filefrom, $fileto)) {
$this->copyfailnum++;
echo L('copy').$filefrom.L('to').$fileto.L('failed')."<br />";
}
} else {
if(fileext($fileto) == 'html' && file_exists($fileto)) {
} else {
if(!copy($filefrom, $fileto)) {
$this->copyfailnum++;
echo L('copy').$filefrom.L('to').$fileto.L('failed')."<br />";
}
}
}
}
}
}
}
function deletedir($dirname){
$result = false;
if(! is_dir($dirname)){
echo " $dirname is not a dir!";
exit(0);
}
$handle = opendir($dirname); //打开目录
while(($file = readdir($handle)) !== false) {
if($file != '.' && $file != '..'){ //排除"."和"."
$dir = $dirname.DIRECTORY_SEPARATOR.$file;
//$dir是目录时递归调用deletedir,是文件则直接删除
is_dir($dir) ? $this->deletedir($dir) : unlink($dir);
}
}
closedir($handle);
$result = rmdir($dirname) ? true : false;
return $result;
}
}
|
108wo
|
phpcms/modules/upgrade/index.php
|
PHP
|
asf20
| 10,275
|
<?php
// --------------------------------------------------------------------------------
// PhpConcept Library - Zip Module 2.8.2
// --------------------------------------------------------------------------------
// License GNU/LGPL - Vincent Blavet - August 2009
// http://www.phpconcept.net
// --------------------------------------------------------------------------------
//
// Presentation :
// PclZip is a PHP library that manage ZIP archives.
// So far tests show that archives generated by PclZip are readable by
// WinZip application and other tools.
//
// Description :
// See readme.txt and http://www.phpconcept.net
//
// Warning :
// This library and the associated files are non commercial, non professional
// work.
// It should not have unexpected results. However if any damage is caused by
// this software the author can not be responsible.
// The use of this software is at the risk of the user.
//
// --------------------------------------------------------------------------------
// $Id: pclzip.lib.php,v 1.60 2009/09/30 21:01:04 vblavet Exp $
// --------------------------------------------------------------------------------
// ----- Constants
if (!defined('PCLZIP_READ_BLOCK_SIZE')) {
define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
}
// ----- File list separator
// In version 1.x of PclZip, the separator for file list is a space
// (which is not a very smart choice, specifically for windows paths !).
// A better separator should be a comma (,). This constant gives you the
// abilty to change that.
// However notice that changing this value, may have impact on existing
// scripts, using space separated filenames.
// Recommanded values for compatibility with older versions :
//define( 'PCLZIP_SEPARATOR', ' ' );
// Recommanded values for smart separation of filenames.
if (!defined('PCLZIP_SEPARATOR')) {
define( 'PCLZIP_SEPARATOR', ',' );
}
// ----- Error configuration
// 0 : PclZip Class integrated error handling
// 1 : PclError external library error handling. By enabling this
// you must ensure that you have included PclError library.
// [2,...] : reserved for futur use
if (!defined('PCLZIP_ERROR_EXTERNAL')) {
define( 'PCLZIP_ERROR_EXTERNAL', 0 );
}
// ----- Optional static temporary directory
// By default temporary files are generated in the script current
// path.
// If defined :
// - MUST BE terminated by a '/'.
// - MUST be a valid, already created directory
// Samples :
// define( 'PCLZIP_TEMPORARY_DIR', '/temp/' );
// define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' );
if (!defined('PCLZIP_TEMPORARY_DIR')) {
define( 'PCLZIP_TEMPORARY_DIR', '' );
}
// ----- Optional threshold ratio for use of temporary files
// Pclzip sense the size of the file to add/extract and decide to
// use or not temporary file. The algorythm is looking for
// memory_limit of PHP and apply a ratio.
// threshold = memory_limit * ratio.
// Recommended values are under 0.5. Default 0.47.
// Samples :
// define( 'PCLZIP_TEMPORARY_FILE_RATIO', 0.5 );
if (!defined('PCLZIP_TEMPORARY_FILE_RATIO')) {
define( 'PCLZIP_TEMPORARY_FILE_RATIO', 0.47 );
}
// --------------------------------------------------------------------------------
// ***** UNDER THIS LINE NOTHING NEEDS TO BE MODIFIED *****
// --------------------------------------------------------------------------------
// ----- Global variables
$g_pclzip_version = "2.8.2";
// ----- Error codes
// -1 : Unable to open file in binary write mode
// -2 : Unable to open file in binary read mode
// -3 : Invalid parameters
// -4 : File does not exist
// -5 : Filename is too long (max. 255)
// -6 : Not a valid zip file
// -7 : Invalid extracted file size
// -8 : Unable to create directory
// -9 : Invalid archive extension
// -10 : Invalid archive format
// -11 : Unable to delete file (unlink)
// -12 : Unable to rename file (rename)
// -13 : Invalid header checksum
// -14 : Invalid archive size
define( 'PCLZIP_ERR_USER_ABORTED', 2 );
define( 'PCLZIP_ERR_NO_ERROR', 0 );
define( 'PCLZIP_ERR_WRITE_OPEN_FAIL', -1 );
define( 'PCLZIP_ERR_READ_OPEN_FAIL', -2 );
define( 'PCLZIP_ERR_INVALID_PARAMETER', -3 );
define( 'PCLZIP_ERR_MISSING_FILE', -4 );
define( 'PCLZIP_ERR_FILENAME_TOO_LONG', -5 );
define( 'PCLZIP_ERR_INVALID_ZIP', -6 );
define( 'PCLZIP_ERR_BAD_EXTRACTED_FILE', -7 );
define( 'PCLZIP_ERR_DIR_CREATE_FAIL', -8 );
define( 'PCLZIP_ERR_BAD_EXTENSION', -9 );
define( 'PCLZIP_ERR_BAD_FORMAT', -10 );
define( 'PCLZIP_ERR_DELETE_FILE_FAIL', -11 );
define( 'PCLZIP_ERR_RENAME_FILE_FAIL', -12 );
define( 'PCLZIP_ERR_BAD_CHECKSUM', -13 );
define( 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', -14 );
define( 'PCLZIP_ERR_MISSING_OPTION_VALUE', -15 );
define( 'PCLZIP_ERR_INVALID_OPTION_VALUE', -16 );
define( 'PCLZIP_ERR_ALREADY_A_DIRECTORY', -17 );
define( 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION', -18 );
define( 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION', -19 );
define( 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE', -20 );
define( 'PCLZIP_ERR_DIRECTORY_RESTRICTION', -21 );
// ----- Options values
define( 'PCLZIP_OPT_PATH', 77001 );
define( 'PCLZIP_OPT_ADD_PATH', 77002 );
define( 'PCLZIP_OPT_REMOVE_PATH', 77003 );
define( 'PCLZIP_OPT_REMOVE_ALL_PATH', 77004 );
define( 'PCLZIP_OPT_SET_CHMOD', 77005 );
define( 'PCLZIP_OPT_EXTRACT_AS_STRING', 77006 );
define( 'PCLZIP_OPT_NO_COMPRESSION', 77007 );
define( 'PCLZIP_OPT_BY_NAME', 77008 );
define( 'PCLZIP_OPT_BY_INDEX', 77009 );
define( 'PCLZIP_OPT_BY_EREG', 77010 );
define( 'PCLZIP_OPT_BY_PREG', 77011 );
define( 'PCLZIP_OPT_COMMENT', 77012 );
define( 'PCLZIP_OPT_ADD_COMMENT', 77013 );
define( 'PCLZIP_OPT_PREPEND_COMMENT', 77014 );
define( 'PCLZIP_OPT_EXTRACT_IN_OUTPUT', 77015 );
define( 'PCLZIP_OPT_REPLACE_NEWER', 77016 );
define( 'PCLZIP_OPT_STOP_ON_ERROR', 77017 );
// Having big trouble with crypt. Need to multiply 2 long int
// which is not correctly supported by PHP ...
//define( 'PCLZIP_OPT_CRYPT', 77018 );
define( 'PCLZIP_OPT_EXTRACT_DIR_RESTRICTION', 77019 );
define( 'PCLZIP_OPT_TEMP_FILE_THRESHOLD', 77020 );
define( 'PCLZIP_OPT_ADD_TEMP_FILE_THRESHOLD', 77020 ); // alias
define( 'PCLZIP_OPT_TEMP_FILE_ON', 77021 );
define( 'PCLZIP_OPT_ADD_TEMP_FILE_ON', 77021 ); // alias
define( 'PCLZIP_OPT_TEMP_FILE_OFF', 77022 );
define( 'PCLZIP_OPT_ADD_TEMP_FILE_OFF', 77022 ); // alias
// ----- File description attributes
define( 'PCLZIP_ATT_FILE_NAME', 79001 );
define( 'PCLZIP_ATT_FILE_NEW_SHORT_NAME', 79002 );
define( 'PCLZIP_ATT_FILE_NEW_FULL_NAME', 79003 );
define( 'PCLZIP_ATT_FILE_MTIME', 79004 );
define( 'PCLZIP_ATT_FILE_CONTENT', 79005 );
define( 'PCLZIP_ATT_FILE_COMMENT', 79006 );
// ----- Call backs values
define( 'PCLZIP_CB_PRE_EXTRACT', 78001 );
define( 'PCLZIP_CB_POST_EXTRACT', 78002 );
define( 'PCLZIP_CB_PRE_ADD', 78003 );
define( 'PCLZIP_CB_POST_ADD', 78004 );
/* For futur use
define( 'PCLZIP_CB_PRE_LIST', 78005 );
define( 'PCLZIP_CB_POST_LIST', 78006 );
define( 'PCLZIP_CB_PRE_DELETE', 78007 );
define( 'PCLZIP_CB_POST_DELETE', 78008 );
*/
// --------------------------------------------------------------------------------
// Class : PclZip
// Description :
// PclZip is the class that represent a Zip archive.
// The public methods allow the manipulation of the archive.
// Attributes :
// Attributes must not be accessed directly.
// Methods :
// PclZip() : Object creator
// create() : Creates the Zip archive
// listContent() : List the content of the Zip archive
// extract() : Extract the content of the archive
// properties() : List the properties of the archive
// --------------------------------------------------------------------------------
class PclZip
{
// ----- Filename of the zip file
var $zipname = '';
// ----- File descriptor of the zip file
var $zip_fd = 0;
// ----- Internal error handling
var $error_code = 1;
var $error_string = '';
// ----- Current status of the magic_quotes_runtime
// This value store the php configuration for magic_quotes
// The class can then disable the magic_quotes and reset it after
var $magic_quotes_status;
// --------------------------------------------------------------------------------
// Function : PclZip()
// Description :
// Creates a PclZip object and set the name of the associated Zip archive
// filename.
// Note that no real action is taken, if the archive does not exist it is not
// created. Use create() for that.
// --------------------------------------------------------------------------------
function PclZip($p_zipname)
{
// ----- Tests the zlib
if (!function_exists('gzopen'))
{
die('Abort '.basename(__FILE__).' : Missing zlib extensions');
}
// ----- Set the attributes
$this->zipname = $p_zipname;
$this->zip_fd = 0;
$this->magic_quotes_status = -1;
// ----- Return
return;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function :
// create($p_filelist, $p_add_dir="", $p_remove_dir="")
// create($p_filelist, $p_option, $p_option_value, ...)
// Description :
// This method supports two different synopsis. The first one is historical.
// This method creates a Zip Archive. The Zip file is created in the
// filesystem. The files and directories indicated in $p_filelist
// are added in the archive. See the parameters description for the
// supported format of $p_filelist.
// When a directory is in the list, the directory and its content is added
// in the archive.
// In this synopsis, the function takes an optional variable list of
// options. See bellow the supported options.
// Parameters :
// $p_filelist : An array containing file or directory names, or
// a string containing one filename or one directory name, or
// a string containing a list of filenames and/or directory
// names separated by spaces.
// $p_add_dir : A path to add before the real path of the archived file,
// in order to have it memorized in the archive.
// $p_remove_dir : A path to remove from the real path of the file to archive,
// in order to have a shorter path memorized in the archive.
// When $p_add_dir and $p_remove_dir are set, $p_remove_dir
// is removed first, before $p_add_dir is added.
// Options :
// PCLZIP_OPT_ADD_PATH :
// PCLZIP_OPT_REMOVE_PATH :
// PCLZIP_OPT_REMOVE_ALL_PATH :
// PCLZIP_OPT_COMMENT :
// PCLZIP_CB_PRE_ADD :
// PCLZIP_CB_POST_ADD :
// Return Values :
// 0 on failure,
// The list of the added files, with a status of the add action.
// (see PclZip::listContent() for list entry format)
// --------------------------------------------------------------------------------
function create($p_filelist)
{
$v_result=1;
// ----- Reset the error handler
$this->privErrorReset();
// ----- Set default values
$v_options = array();
$v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
// ----- Look for variable options arguments
$v_size = func_num_args();
// ----- Look for arguments
if ($v_size > 1) {
// ----- Get the arguments
$v_arg_list = func_get_args();
// ----- Remove from the options list the first argument
array_shift($v_arg_list);
$v_size--;
// ----- Look for first arg
if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
// ----- Parse the options
$v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
array (PCLZIP_OPT_REMOVE_PATH => 'optional',
PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
PCLZIP_OPT_ADD_PATH => 'optional',
PCLZIP_CB_PRE_ADD => 'optional',
PCLZIP_CB_POST_ADD => 'optional',
PCLZIP_OPT_NO_COMPRESSION => 'optional',
PCLZIP_OPT_COMMENT => 'optional',
PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',
PCLZIP_OPT_TEMP_FILE_ON => 'optional',
PCLZIP_OPT_TEMP_FILE_OFF => 'optional'
//, PCLZIP_OPT_CRYPT => 'optional'
));
if ($v_result != 1) {
return 0;
}
}
// ----- Look for 2 args
// Here we need to support the first historic synopsis of the
// method.
else {
// ----- Get the first argument
$v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0];
// ----- Look for the optional second argument
if ($v_size == 2) {
$v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1];
}
else if ($v_size > 2) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
"Invalid number / type of arguments");
return 0;
}
}
}
// ----- Look for default option values
$this->privOptionDefaultThreshold($v_options);
// ----- Init
$v_string_list = array();
$v_att_list = array();
$v_filedescr_list = array();
$p_result_list = array();
// ----- Look if the $p_filelist is really an array
if (is_array($p_filelist)) {
// ----- Look if the first element is also an array
// This will mean that this is a file description entry
if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
$v_att_list = $p_filelist;
}
// ----- The list is a list of string names
else {
$v_string_list = $p_filelist;
}
}
// ----- Look if the $p_filelist is a string
else if (is_string($p_filelist)) {
// ----- Create a list from the string
$v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist);
}
// ----- Invalid variable type for $p_filelist
else {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
return 0;
}
// ----- Reformat the string list
if (sizeof($v_string_list) != 0) {
foreach ($v_string_list as $v_string) {
if ($v_string != '') {
$v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string;
}
else {
}
}
}
// ----- For each file in the list check the attributes
$v_supported_attributes
= array ( PCLZIP_ATT_FILE_NAME => 'mandatory'
,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional'
,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional'
,PCLZIP_ATT_FILE_MTIME => 'optional'
,PCLZIP_ATT_FILE_CONTENT => 'optional'
,PCLZIP_ATT_FILE_COMMENT => 'optional'
);
foreach ($v_att_list as $v_entry) {
$v_result = $this->privFileDescrParseAtt($v_entry,
$v_filedescr_list[],
$v_options,
$v_supported_attributes);
if ($v_result != 1) {
return 0;
}
}
// ----- Expand the filelist (expand directories)
$v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options);
if ($v_result != 1) {
return 0;
}
// ----- Call the create fct
$v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options);
if ($v_result != 1) {
return 0;
}
// ----- Return
return $p_result_list;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function :
// add($p_filelist, $p_add_dir="", $p_remove_dir="")
// add($p_filelist, $p_option, $p_option_value, ...)
// Description :
// This method supports two synopsis. The first one is historical.
// This methods add the list of files in an existing archive.
// If a file with the same name already exists, it is added at the end of the
// archive, the first one is still present.
// If the archive does not exist, it is created.
// Parameters :
// $p_filelist : An array containing file or directory names, or
// a string containing one filename or one directory name, or
// a string containing a list of filenames and/or directory
// names separated by spaces.
// $p_add_dir : A path to add before the real path of the archived file,
// in order to have it memorized in the archive.
// $p_remove_dir : A path to remove from the real path of the file to archive,
// in order to have a shorter path memorized in the archive.
// When $p_add_dir and $p_remove_dir are set, $p_remove_dir
// is removed first, before $p_add_dir is added.
// Options :
// PCLZIP_OPT_ADD_PATH :
// PCLZIP_OPT_REMOVE_PATH :
// PCLZIP_OPT_REMOVE_ALL_PATH :
// PCLZIP_OPT_COMMENT :
// PCLZIP_OPT_ADD_COMMENT :
// PCLZIP_OPT_PREPEND_COMMENT :
// PCLZIP_CB_PRE_ADD :
// PCLZIP_CB_POST_ADD :
// Return Values :
// 0 on failure,
// The list of the added files, with a status of the add action.
// (see PclZip::listContent() for list entry format)
// --------------------------------------------------------------------------------
function add($p_filelist)
{
$v_result=1;
// ----- Reset the error handler
$this->privErrorReset();
// ----- Set default values
$v_options = array();
$v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
// ----- Look for variable options arguments
$v_size = func_num_args();
// ----- Look for arguments
if ($v_size > 1) {
// ----- Get the arguments
$v_arg_list = func_get_args();
// ----- Remove form the options list the first argument
array_shift($v_arg_list);
$v_size--;
// ----- Look for first arg
if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
// ----- Parse the options
$v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
array (PCLZIP_OPT_REMOVE_PATH => 'optional',
PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
PCLZIP_OPT_ADD_PATH => 'optional',
PCLZIP_CB_PRE_ADD => 'optional',
PCLZIP_CB_POST_ADD => 'optional',
PCLZIP_OPT_NO_COMPRESSION => 'optional',
PCLZIP_OPT_COMMENT => 'optional',
PCLZIP_OPT_ADD_COMMENT => 'optional',
PCLZIP_OPT_PREPEND_COMMENT => 'optional',
PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',
PCLZIP_OPT_TEMP_FILE_ON => 'optional',
PCLZIP_OPT_TEMP_FILE_OFF => 'optional'
//, PCLZIP_OPT_CRYPT => 'optional'
));
if ($v_result != 1) {
return 0;
}
}
// ----- Look for 2 args
// Here we need to support the first historic synopsis of the
// method.
else {
// ----- Get the first argument
$v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0];
// ----- Look for the optional second argument
if ($v_size == 2) {
$v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1];
}
else if ($v_size > 2) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
// ----- Return
return 0;
}
}
}
// ----- Look for default option values
$this->privOptionDefaultThreshold($v_options);
// ----- Init
$v_string_list = array();
$v_att_list = array();
$v_filedescr_list = array();
$p_result_list = array();
// ----- Look if the $p_filelist is really an array
if (is_array($p_filelist)) {
// ----- Look if the first element is also an array
// This will mean that this is a file description entry
if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
$v_att_list = $p_filelist;
}
// ----- The list is a list of string names
else {
$v_string_list = $p_filelist;
}
}
// ----- Look if the $p_filelist is a string
else if (is_string($p_filelist)) {
// ----- Create a list from the string
$v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist);
}
// ----- Invalid variable type for $p_filelist
else {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist");
return 0;
}
// ----- Reformat the string list
if (sizeof($v_string_list) != 0) {
foreach ($v_string_list as $v_string) {
$v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string;
}
}
// ----- For each file in the list check the attributes
$v_supported_attributes
= array ( PCLZIP_ATT_FILE_NAME => 'mandatory'
,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional'
,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional'
,PCLZIP_ATT_FILE_MTIME => 'optional'
,PCLZIP_ATT_FILE_CONTENT => 'optional'
,PCLZIP_ATT_FILE_COMMENT => 'optional'
);
foreach ($v_att_list as $v_entry) {
$v_result = $this->privFileDescrParseAtt($v_entry,
$v_filedescr_list[],
$v_options,
$v_supported_attributes);
if ($v_result != 1) {
return 0;
}
}
// ----- Expand the filelist (expand directories)
$v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options);
if ($v_result != 1) {
return 0;
}
// ----- Call the create fct
$v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options);
if ($v_result != 1) {
return 0;
}
// ----- Return
return $p_result_list;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : listContent()
// Description :
// This public method, gives the list of the files and directories, with their
// properties.
// The properties of each entries in the list are (used also in other functions) :
// filename : Name of the file. For a create or add action it is the filename
// given by the user. For an extract function it is the filename
// of the extracted file.
// stored_filename : Name of the file / directory stored in the archive.
// size : Size of the stored file.
// compressed_size : Size of the file's data compressed in the archive
// (without the headers overhead)
// mtime : Last known modification date of the file (UNIX timestamp)
// comment : Comment associated with the file
// folder : true | false
// index : index of the file in the archive
// status : status of the action (depending of the action) :
// Values are :
// ok : OK !
// filtered : the file / dir is not extracted (filtered by user)
// already_a_directory : the file can not be extracted because a
// directory with the same name already exists
// write_protected : the file can not be extracted because a file
// with the same name already exists and is
// write protected
// newer_exist : the file was not extracted because a newer file exists
// path_creation_fail : the file is not extracted because the folder
// does not exist and can not be created
// write_error : the file was not extracted because there was a
// error while writing the file
// read_error : the file was not extracted because there was a error
// while reading the file
// invalid_header : the file was not extracted because of an archive
// format error (bad file header)
// Note that each time a method can continue operating when there
// is an action error on a file, the error is only logged in the file status.
// Return Values :
// 0 on an unrecoverable failure,
// The list of the files in the archive.
// --------------------------------------------------------------------------------
function listContent()
{
$v_result=1;
// ----- Reset the error handler
$this->privErrorReset();
// ----- Check archive
if (!$this->privCheckFormat()) {
return(0);
}
// ----- Call the extracting fct
$p_list = array();
if (($v_result = $this->privList($p_list)) != 1)
{
unset($p_list);
return(0);
}
// ----- Return
return $p_list;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function :
// extract($p_path="./", $p_remove_path="")
// extract([$p_option, $p_option_value, ...])
// Description :
// This method supports two synopsis. The first one is historical.
// This method extract all the files / directories from the archive to the
// folder indicated in $p_path.
// If you want to ignore the 'root' part of path of the memorized files
// you can indicate this in the optional $p_remove_path parameter.
// By default, if a newer file with the same name already exists, the
// file is not extracted.
//
// If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions
// are used, the path indicated in PCLZIP_OPT_ADD_PATH is append
// at the end of the path value of PCLZIP_OPT_PATH.
// Parameters :
// $p_path : Path where the files and directories are to be extracted
// $p_remove_path : First part ('root' part) of the memorized path
// (if any similar) to remove while extracting.
// Options :
// PCLZIP_OPT_PATH :
// PCLZIP_OPT_ADD_PATH :
// PCLZIP_OPT_REMOVE_PATH :
// PCLZIP_OPT_REMOVE_ALL_PATH :
// PCLZIP_CB_PRE_EXTRACT :
// PCLZIP_CB_POST_EXTRACT :
// Return Values :
// 0 or a negative value on failure,
// The list of the extracted files, with a status of the action.
// (see PclZip::listContent() for list entry format)
// --------------------------------------------------------------------------------
function extract()
{
$v_result=1;
// ----- Reset the error handler
$this->privErrorReset();
// ----- Check archive
if (!$this->privCheckFormat()) {
return(0);
}
// ----- Set default values
$v_options = array();
// $v_path = "./";
$v_path = '';
$v_remove_path = "";
$v_remove_all_path = false;
// ----- Look for variable options arguments
$v_size = func_num_args();
// ----- Default values for option
$v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
// ----- Look for arguments
if ($v_size > 0) {
// ----- Get the arguments
$v_arg_list = func_get_args();
// ----- Look for first arg
if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
// ----- Parse the options
$v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
array (PCLZIP_OPT_PATH => 'optional',
PCLZIP_OPT_REMOVE_PATH => 'optional',
PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
PCLZIP_OPT_ADD_PATH => 'optional',
PCLZIP_CB_PRE_EXTRACT => 'optional',
PCLZIP_CB_POST_EXTRACT => 'optional',
PCLZIP_OPT_SET_CHMOD => 'optional',
PCLZIP_OPT_BY_NAME => 'optional',
PCLZIP_OPT_BY_EREG => 'optional',
PCLZIP_OPT_BY_PREG => 'optional',
PCLZIP_OPT_BY_INDEX => 'optional',
PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional',
PCLZIP_OPT_REPLACE_NEWER => 'optional'
,PCLZIP_OPT_STOP_ON_ERROR => 'optional'
,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional',
PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',
PCLZIP_OPT_TEMP_FILE_ON => 'optional',
PCLZIP_OPT_TEMP_FILE_OFF => 'optional'
));
if ($v_result != 1) {
return 0;
}
// ----- Set the arguments
if (isset($v_options[PCLZIP_OPT_PATH])) {
$v_path = $v_options[PCLZIP_OPT_PATH];
}
if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
$v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
}
if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
$v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
}
if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
// ----- Check for '/' in last path char
if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
$v_path .= '/';
}
$v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
}
}
// ----- Look for 2 args
// Here we need to support the first historic synopsis of the
// method.
else {
// ----- Get the first argument
$v_path = $v_arg_list[0];
// ----- Look for the optional second argument
if ($v_size == 2) {
$v_remove_path = $v_arg_list[1];
}
else if ($v_size > 2) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
// ----- Return
return 0;
}
}
}
// ----- Look for default option values
$this->privOptionDefaultThreshold($v_options);
// ----- Trace
// ----- Call the extracting fct
$p_list = array();
$v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path,
$v_remove_all_path, $v_options);
if ($v_result < 1) {
unset($p_list);
return(0);
}
// ----- Return
return $p_list;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function :
// extractByIndex($p_index, $p_path="./", $p_remove_path="")
// extractByIndex($p_index, [$p_option, $p_option_value, ...])
// Description :
// This method supports two synopsis. The first one is historical.
// This method is doing a partial extract of the archive.
// The extracted files or folders are identified by their index in the
// archive (from 0 to n).
// Note that if the index identify a folder, only the folder entry is
// extracted, not all the files included in the archive.
// Parameters :
// $p_index : A single index (integer) or a string of indexes of files to
// extract. The form of the string is "0,4-6,8-12" with only numbers
// and '-' for range or ',' to separate ranges. No spaces or ';'
// are allowed.
// $p_path : Path where the files and directories are to be extracted
// $p_remove_path : First part ('root' part) of the memorized path
// (if any similar) to remove while extracting.
// Options :
// PCLZIP_OPT_PATH :
// PCLZIP_OPT_ADD_PATH :
// PCLZIP_OPT_REMOVE_PATH :
// PCLZIP_OPT_REMOVE_ALL_PATH :
// PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and
// not as files.
// The resulting content is in a new field 'content' in the file
// structure.
// This option must be used alone (any other options are ignored).
// PCLZIP_CB_PRE_EXTRACT :
// PCLZIP_CB_POST_EXTRACT :
// Return Values :
// 0 on failure,
// The list of the extracted files, with a status of the action.
// (see PclZip::listContent() for list entry format)
// --------------------------------------------------------------------------------
//function extractByIndex($p_index, options...)
function extractByIndex($p_index)
{
$v_result=1;
// ----- Reset the error handler
$this->privErrorReset();
// ----- Check archive
if (!$this->privCheckFormat()) {
return(0);
}
// ----- Set default values
$v_options = array();
// $v_path = "./";
$v_path = '';
$v_remove_path = "";
$v_remove_all_path = false;
// ----- Look for variable options arguments
$v_size = func_num_args();
// ----- Default values for option
$v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
// ----- Look for arguments
if ($v_size > 1) {
// ----- Get the arguments
$v_arg_list = func_get_args();
// ----- Remove form the options list the first argument
array_shift($v_arg_list);
$v_size--;
// ----- Look for first arg
if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
// ----- Parse the options
$v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
array (PCLZIP_OPT_PATH => 'optional',
PCLZIP_OPT_REMOVE_PATH => 'optional',
PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
PCLZIP_OPT_ADD_PATH => 'optional',
PCLZIP_CB_PRE_EXTRACT => 'optional',
PCLZIP_CB_POST_EXTRACT => 'optional',
PCLZIP_OPT_SET_CHMOD => 'optional',
PCLZIP_OPT_REPLACE_NEWER => 'optional'
,PCLZIP_OPT_STOP_ON_ERROR => 'optional'
,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional',
PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional',
PCLZIP_OPT_TEMP_FILE_ON => 'optional',
PCLZIP_OPT_TEMP_FILE_OFF => 'optional'
));
if ($v_result != 1) {
return 0;
}
// ----- Set the arguments
if (isset($v_options[PCLZIP_OPT_PATH])) {
$v_path = $v_options[PCLZIP_OPT_PATH];
}
if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
$v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
}
if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
$v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
}
if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
// ----- Check for '/' in last path char
if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
$v_path .= '/';
}
$v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
}
if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) {
$v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
}
else {
}
}
// ----- Look for 2 args
// Here we need to support the first historic synopsis of the
// method.
else {
// ----- Get the first argument
$v_path = $v_arg_list[0];
// ----- Look for the optional second argument
if ($v_size == 2) {
$v_remove_path = $v_arg_list[1];
}
else if ($v_size > 2) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
// ----- Return
return 0;
}
}
}
// ----- Trace
// ----- Trick
// Here I want to reuse extractByRule(), so I need to parse the $p_index
// with privParseOptions()
$v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index);
$v_options_trick = array();
$v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick,
array (PCLZIP_OPT_BY_INDEX => 'optional' ));
if ($v_result != 1) {
return 0;
}
$v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX];
// ----- Look for default option values
$this->privOptionDefaultThreshold($v_options);
// ----- Call the extracting fct
if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) {
return(0);
}
// ----- Return
return $p_list;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function :
// delete([$p_option, $p_option_value, ...])
// Description :
// This method removes files from the archive.
// If no parameters are given, then all the archive is emptied.
// Parameters :
// None or optional arguments.
// Options :
// PCLZIP_OPT_BY_INDEX :
// PCLZIP_OPT_BY_NAME :
// PCLZIP_OPT_BY_EREG :
// PCLZIP_OPT_BY_PREG :
// Return Values :
// 0 on failure,
// The list of the files which are still present in the archive.
// (see PclZip::listContent() for list entry format)
// --------------------------------------------------------------------------------
function delete()
{
$v_result=1;
// ----- Reset the error handler
$this->privErrorReset();
// ----- Check archive
if (!$this->privCheckFormat()) {
return(0);
}
// ----- Set default values
$v_options = array();
// ----- Look for variable options arguments
$v_size = func_num_args();
// ----- Look for arguments
if ($v_size > 0) {
// ----- Get the arguments
$v_arg_list = func_get_args();
// ----- Parse the options
$v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
array (PCLZIP_OPT_BY_NAME => 'optional',
PCLZIP_OPT_BY_EREG => 'optional',
PCLZIP_OPT_BY_PREG => 'optional',
PCLZIP_OPT_BY_INDEX => 'optional' ));
if ($v_result != 1) {
return 0;
}
}
// ----- Magic quotes trick
$this->privDisableMagicQuotes();
// ----- Call the delete fct
$v_list = array();
if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1) {
$this->privSwapBackMagicQuotes();
unset($v_list);
return(0);
}
// ----- Magic quotes trick
$this->privSwapBackMagicQuotes();
// ----- Return
return $v_list;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : deleteByIndex()
// Description :
// ***** Deprecated *****
// delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered.
// --------------------------------------------------------------------------------
function deleteByIndex($p_index)
{
$p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
// ----- Return
return $p_list;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : properties()
// Description :
// This method gives the properties of the archive.
// The properties are :
// nb : Number of files in the archive
// comment : Comment associated with the archive file
// status : not_exist, ok
// Parameters :
// None
// Return Values :
// 0 on failure,
// An array with the archive properties.
// --------------------------------------------------------------------------------
function properties()
{
// ----- Reset the error handler
$this->privErrorReset();
// ----- Magic quotes trick
$this->privDisableMagicQuotes();
// ----- Check archive
if (!$this->privCheckFormat()) {
$this->privSwapBackMagicQuotes();
return(0);
}
// ----- Default properties
$v_prop = array();
$v_prop['comment'] = '';
$v_prop['nb'] = 0;
$v_prop['status'] = 'not_exist';
// ----- Look if file exists
if (@is_file($this->zipname))
{
// ----- Open the zip file
if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
{
$this->privSwapBackMagicQuotes();
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
// ----- Return
return 0;
}
// ----- Read the central directory informations
$v_central_dir = array();
if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
{
$this->privSwapBackMagicQuotes();
return 0;
}
// ----- Close the zip file
$this->privCloseFd();
// ----- Set the user attributes
$v_prop['comment'] = $v_central_dir['comment'];
$v_prop['nb'] = $v_central_dir['entries'];
$v_prop['status'] = 'ok';
}
// ----- Magic quotes trick
$this->privSwapBackMagicQuotes();
// ----- Return
return $v_prop;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : duplicate()
// Description :
// This method creates an archive by copying the content of an other one. If
// the archive already exist, it is replaced by the new one without any warning.
// Parameters :
// $p_archive : The filename of a valid archive, or
// a valid PclZip object.
// Return Values :
// 1 on success.
// 0 or a negative value on error (error code).
// --------------------------------------------------------------------------------
function duplicate($p_archive)
{
$v_result = 1;
// ----- Reset the error handler
$this->privErrorReset();
// ----- Look if the $p_archive is a PclZip object
if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip'))
{
// ----- Duplicate the archive
$v_result = $this->privDuplicate($p_archive->zipname);
}
// ----- Look if the $p_archive is a string (so a filename)
else if (is_string($p_archive))
{
// ----- Check that $p_archive is a valid zip file
// TBC : Should also check the archive format
if (!is_file($p_archive)) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'");
$v_result = PCLZIP_ERR_MISSING_FILE;
}
else {
// ----- Duplicate the archive
$v_result = $this->privDuplicate($p_archive);
}
}
// ----- Invalid variable
else
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
$v_result = PCLZIP_ERR_INVALID_PARAMETER;
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : merge()
// Description :
// This method merge the $p_archive_to_add archive at the end of the current
// one ($this).
// If the archive ($this) does not exist, the merge becomes a duplicate.
// If the $p_archive_to_add archive does not exist, the merge is a success.
// Parameters :
// $p_archive_to_add : It can be directly the filename of a valid zip archive,
// or a PclZip object archive.
// Return Values :
// 1 on success,
// 0 or negative values on error (see below).
// --------------------------------------------------------------------------------
function merge($p_archive_to_add)
{
$v_result = 1;
// ----- Reset the error handler
$this->privErrorReset();
// ----- Check archive
if (!$this->privCheckFormat()) {
return(0);
}
// ----- Look if the $p_archive_to_add is a PclZip object
if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip'))
{
// ----- Merge the archive
$v_result = $this->privMerge($p_archive_to_add);
}
// ----- Look if the $p_archive_to_add is a string (so a filename)
else if (is_string($p_archive_to_add))
{
// ----- Create a temporary archive
$v_object_archive = new PclZip($p_archive_to_add);
// ----- Merge the archive
$v_result = $this->privMerge($v_object_archive);
}
// ----- Invalid variable
else
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
$v_result = PCLZIP_ERR_INVALID_PARAMETER;
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : errorCode()
// Description :
// Parameters :
// --------------------------------------------------------------------------------
function errorCode()
{
if (PCLZIP_ERROR_EXTERNAL == 1) {
return(PclErrorCode());
}
else {
return($this->error_code);
}
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : errorName()
// Description :
// Parameters :
// --------------------------------------------------------------------------------
function errorName($p_with_code=false)
{
$v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR',
PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL',
PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL',
PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER',
PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE',
PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG',
PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP',
PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE',
PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL',
PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION',
PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT',
PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL',
PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL',
PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM',
PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP',
PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE',
PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE',
PCLZIP_ERR_UNSUPPORTED_COMPRESSION => 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION',
PCLZIP_ERR_UNSUPPORTED_ENCRYPTION => 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION'
,PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE => 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE'
,PCLZIP_ERR_DIRECTORY_RESTRICTION => 'PCLZIP_ERR_DIRECTORY_RESTRICTION'
);
if (isset($v_name[$this->error_code])) {
$v_value = $v_name[$this->error_code];
}
else {
$v_value = 'NoName';
}
if ($p_with_code) {
return($v_value.' ('.$this->error_code.')');
}
else {
return($v_value);
}
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : errorInfo()
// Description :
// Parameters :
// --------------------------------------------------------------------------------
function errorInfo($p_full=false)
{
if (PCLZIP_ERROR_EXTERNAL == 1) {
return(PclErrorString());
}
else {
if ($p_full) {
return($this->errorName(true)." : ".$this->error_string);
}
else {
return($this->error_string." [code ".$this->error_code."]");
}
}
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS *****
// ***** *****
// ***** THESES FUNCTIONS MUST NOT BE USED DIRECTLY *****
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privCheckFormat()
// Description :
// This method check that the archive exists and is a valid zip archive.
// Several level of check exists. (futur)
// Parameters :
// $p_level : Level of check. Default 0.
// 0 : Check the first bytes (magic codes) (default value))
// 1 : 0 + Check the central directory (futur)
// 2 : 1 + Check each file header (futur)
// Return Values :
// true on success,
// false on error, the error code is set.
// --------------------------------------------------------------------------------
function privCheckFormat($p_level=0)
{
$v_result = true;
// ----- Reset the file system cache
clearstatcache();
// ----- Reset the error handler
$this->privErrorReset();
// ----- Look if the file exits
if (!is_file($this->zipname)) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'");
return(false);
}
// ----- Check that the file is readeable
if (!is_readable($this->zipname)) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'");
return(false);
}
// ----- Check the magic code
// TBC
// ----- Check the central header
// TBC
// ----- Check each file header
// TBC
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privParseOptions()
// Description :
// This internal methods reads the variable list of arguments ($p_options_list,
// $p_size) and generate an array with the options and values ($v_result_list).
// $v_requested_options contains the options that can be present and those that
// must be present.
// $v_requested_options is an array, with the option value as key, and 'optional',
// or 'mandatory' as value.
// Parameters :
// See above.
// Return Values :
// 1 on success.
// 0 on failure.
// --------------------------------------------------------------------------------
function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
{
$v_result=1;
// ----- Read the options
$i=0;
while ($i<$p_size) {
// ----- Check if the option is supported
if (!isset($v_requested_options[$p_options_list[$i]])) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method");
// ----- Return
return PclZip::errorCode();
}
// ----- Look for next option
switch ($p_options_list[$i]) {
// ----- Look for options that request a path value
case PCLZIP_OPT_PATH :
case PCLZIP_OPT_REMOVE_PATH :
case PCLZIP_OPT_ADD_PATH :
// ----- Check the number of parameters
if (($i+1) >= $p_size) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Get the value
$v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE);
$i++;
break;
case PCLZIP_OPT_TEMP_FILE_THRESHOLD :
// ----- Check the number of parameters
if (($i+1) >= $p_size) {
PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
return PclZip::errorCode();
}
// ----- Check for incompatible options
if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'");
return PclZip::errorCode();
}
// ----- Check the value
$v_value = $p_options_list[$i+1];
if ((!is_integer($v_value)) || ($v_value<0)) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'");
return PclZip::errorCode();
}
// ----- Get the value (and convert it in bytes)
$v_result_list[$p_options_list[$i]] = $v_value*1048576;
$i++;
break;
case PCLZIP_OPT_TEMP_FILE_ON :
// ----- Check for incompatible options
if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'");
return PclZip::errorCode();
}
$v_result_list[$p_options_list[$i]] = true;
break;
case PCLZIP_OPT_TEMP_FILE_OFF :
// ----- Check for incompatible options
if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'");
return PclZip::errorCode();
}
// ----- Check for incompatible options
if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'");
return PclZip::errorCode();
}
$v_result_list[$p_options_list[$i]] = true;
break;
case PCLZIP_OPT_EXTRACT_DIR_RESTRICTION :
// ----- Check the number of parameters
if (($i+1) >= $p_size) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Get the value
if ( is_string($p_options_list[$i+1])
&& ($p_options_list[$i+1] != '')) {
$v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE);
$i++;
}
else {
}
break;
// ----- Look for options that request an array of string for value
case PCLZIP_OPT_BY_NAME :
// ----- Check the number of parameters
if (($i+1) >= $p_size) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Get the value
if (is_string($p_options_list[$i+1])) {
$v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1];
}
else if (is_array($p_options_list[$i+1])) {
$v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
}
else {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
$i++;
break;
// ----- Look for options that request an EREG or PREG expression
case PCLZIP_OPT_BY_EREG :
// ereg() is deprecated starting with PHP 5.3. Move PCLZIP_OPT_BY_EREG
// to PCLZIP_OPT_BY_PREG
$p_options_list[$i] = PCLZIP_OPT_BY_PREG;
case PCLZIP_OPT_BY_PREG :
//case PCLZIP_OPT_CRYPT :
// ----- Check the number of parameters
if (($i+1) >= $p_size) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Get the value
if (is_string($p_options_list[$i+1])) {
$v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
}
else {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
$i++;
break;
// ----- Look for options that takes a string
case PCLZIP_OPT_COMMENT :
case PCLZIP_OPT_ADD_COMMENT :
case PCLZIP_OPT_PREPEND_COMMENT :
// ----- Check the number of parameters
if (($i+1) >= $p_size) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE,
"Missing parameter value for option '"
.PclZipUtilOptionText($p_options_list[$i])
."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Get the value
if (is_string($p_options_list[$i+1])) {
$v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
}
else {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE,
"Wrong parameter value for option '"
.PclZipUtilOptionText($p_options_list[$i])
."'");
// ----- Return
return PclZip::errorCode();
}
$i++;
break;
// ----- Look for options that request an array of index
case PCLZIP_OPT_BY_INDEX :
// ----- Check the number of parameters
if (($i+1) >= $p_size) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Get the value
$v_work_list = array();
if (is_string($p_options_list[$i+1])) {
// ----- Remove spaces
$p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', '');
// ----- Parse items
$v_work_list = explode(",", $p_options_list[$i+1]);
}
else if (is_integer($p_options_list[$i+1])) {
$v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1];
}
else if (is_array($p_options_list[$i+1])) {
$v_work_list = $p_options_list[$i+1];
}
else {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Reduce the index list
// each index item in the list must be a couple with a start and
// an end value : [0,3], [5-5], [8-10], ...
// ----- Check the format of each item
$v_sort_flag=false;
$v_sort_value=0;
for ($j=0; $j<sizeof($v_work_list); $j++) {
// ----- Explode the item
$v_item_list = explode("-", $v_work_list[$j]);
$v_size_item_list = sizeof($v_item_list);
// ----- TBC : Here we might check that each item is a
// real integer ...
// ----- Look for single value
if ($v_size_item_list == 1) {
// ----- Set the option value
$v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
$v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[0];
}
elseif ($v_size_item_list == 2) {
// ----- Set the option value
$v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
$v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[1];
}
else {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Look for list sort
if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) {
$v_sort_flag=true;
// ----- TBC : An automatic sort should be writen ...
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
$v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
}
// ----- Sort the items
if ($v_sort_flag) {
// TBC : To Be Completed
}
// ----- Next option
$i++;
break;
// ----- Look for options that request no value
case PCLZIP_OPT_REMOVE_ALL_PATH :
case PCLZIP_OPT_EXTRACT_AS_STRING :
case PCLZIP_OPT_NO_COMPRESSION :
case PCLZIP_OPT_EXTRACT_IN_OUTPUT :
case PCLZIP_OPT_REPLACE_NEWER :
case PCLZIP_OPT_STOP_ON_ERROR :
$v_result_list[$p_options_list[$i]] = true;
break;
// ----- Look for options that request an octal value
case PCLZIP_OPT_SET_CHMOD :
// ----- Check the number of parameters
if (($i+1) >= $p_size) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Get the value
$v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
$i++;
break;
// ----- Look for options that request a call-back
case PCLZIP_CB_PRE_EXTRACT :
case PCLZIP_CB_POST_EXTRACT :
case PCLZIP_CB_PRE_ADD :
case PCLZIP_CB_POST_ADD :
/* for futur use
case PCLZIP_CB_PRE_DELETE :
case PCLZIP_CB_POST_DELETE :
case PCLZIP_CB_PRE_LIST :
case PCLZIP_CB_POST_LIST :
*/
// ----- Check the number of parameters
if (($i+1) >= $p_size) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Get the value
$v_function_name = $p_options_list[$i+1];
// ----- Check that the value is a valid existing function
if (!function_exists($v_function_name)) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Set the attribute
$v_result_list[$p_options_list[$i]] = $v_function_name;
$i++;
break;
default :
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
"Unknown parameter '"
.$p_options_list[$i]."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Next options
$i++;
}
// ----- Look for mandatory options
if ($v_requested_options !== false) {
for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
// ----- Look for mandatory option
if ($v_requested_options[$key] == 'mandatory') {
// ----- Look if present
if (!isset($v_result_list[$key])) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")");
// ----- Return
return PclZip::errorCode();
}
}
}
}
// ----- Look for default values
if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) {
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privOptionDefaultThreshold()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privOptionDefaultThreshold(&$p_options)
{
$v_result=1;
if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
|| isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) {
return $v_result;
}
// ----- Get 'memory_limit' configuration value
$v_memory_limit = ini_get('memory_limit');
$v_memory_limit = trim($v_memory_limit);
$last = strtolower(substr($v_memory_limit, -1));
if($last == 'g')
//$v_memory_limit = $v_memory_limit*1024*1024*1024;
$v_memory_limit = $v_memory_limit*1073741824;
if($last == 'm')
//$v_memory_limit = $v_memory_limit*1024*1024;
$v_memory_limit = $v_memory_limit*1048576;
if($last == 'k')
$v_memory_limit = $v_memory_limit*1024;
$p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit*PCLZIP_TEMPORARY_FILE_RATIO);
// ----- Sanity check : No threshold if value lower than 1M
if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) {
unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]);
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privFileDescrParseAtt()
// Description :
// Parameters :
// Return Values :
// 1 on success.
// 0 on failure.
// --------------------------------------------------------------------------------
function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false)
{
$v_result=1;
// ----- For each file in the list check the attributes
foreach ($p_file_list as $v_key => $v_value) {
// ----- Check if the option is supported
if (!isset($v_requested_options[$v_key])) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file");
// ----- Return
return PclZip::errorCode();
}
// ----- Look for attribute
switch ($v_key) {
case PCLZIP_ATT_FILE_NAME :
if (!is_string($v_value)) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
return PclZip::errorCode();
}
$p_filedescr['filename'] = PclZipUtilPathReduction($v_value);
if ($p_filedescr['filename'] == '') {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'");
return PclZip::errorCode();
}
break;
case PCLZIP_ATT_FILE_NEW_SHORT_NAME :
if (!is_string($v_value)) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
return PclZip::errorCode();
}
$p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value);
if ($p_filedescr['new_short_name'] == '') {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'");
return PclZip::errorCode();
}
break;
case PCLZIP_ATT_FILE_NEW_FULL_NAME :
if (!is_string($v_value)) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
return PclZip::errorCode();
}
$p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value);
if ($p_filedescr['new_full_name'] == '') {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'");
return PclZip::errorCode();
}
break;
// ----- Look for options that takes a string
case PCLZIP_ATT_FILE_COMMENT :
if (!is_string($v_value)) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
return PclZip::errorCode();
}
$p_filedescr['comment'] = $v_value;
break;
case PCLZIP_ATT_FILE_MTIME :
if (!is_integer($v_value)) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'");
return PclZip::errorCode();
}
$p_filedescr['mtime'] = $v_value;
break;
case PCLZIP_ATT_FILE_CONTENT :
$p_filedescr['content'] = $v_value;
break;
default :
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
"Unknown parameter '".$v_key."'");
// ----- Return
return PclZip::errorCode();
}
// ----- Look for mandatory options
if ($v_requested_options !== false) {
for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
// ----- Look for mandatory option
if ($v_requested_options[$key] == 'mandatory') {
// ----- Look if present
if (!isset($p_file_list[$key])) {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")");
return PclZip::errorCode();
}
}
}
}
// end foreach
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privFileDescrExpand()
// Description :
// This method look for each item of the list to see if its a file, a folder
// or a string to be added as file. For any other type of files (link, other)
// just ignore the item.
// Then prepare the information that will be stored for that file.
// When its a folder, expand the folder with all the files that are in that
// folder (recursively).
// Parameters :
// Return Values :
// 1 on success.
// 0 on failure.
// --------------------------------------------------------------------------------
function privFileDescrExpand(&$p_filedescr_list, &$p_options)
{
$v_result=1;
// ----- Create a result list
$v_result_list = array();
// ----- Look each entry
for ($i=0; $i<sizeof($p_filedescr_list); $i++) {
// ----- Get filedescr
$v_descr = $p_filedescr_list[$i];
// ----- Reduce the filename
$v_descr['filename'] = PclZipUtilTranslateWinPath($v_descr['filename'], false);
$v_descr['filename'] = PclZipUtilPathReduction($v_descr['filename']);
// ----- Look for real file or folder
if (file_exists($v_descr['filename'])) {
if (@is_file($v_descr['filename'])) {
$v_descr['type'] = 'file';
}
else if (@is_dir($v_descr['filename'])) {
$v_descr['type'] = 'folder';
}
else if (@is_link($v_descr['filename'])) {
// skip
continue;
}
else {
// skip
continue;
}
}
// ----- Look for string added as file
else if (isset($v_descr['content'])) {
$v_descr['type'] = 'virtual_file';
}
// ----- Missing file
else {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$v_descr['filename']."' does not exist");
// ----- Return
return PclZip::errorCode();
}
// ----- Calculate the stored filename
$this->privCalculateStoredFilename($v_descr, $p_options);
// ----- Add the descriptor in result list
$v_result_list[sizeof($v_result_list)] = $v_descr;
// ----- Look for folder
if ($v_descr['type'] == 'folder') {
// ----- List of items in folder
$v_dirlist_descr = array();
$v_dirlist_nb = 0;
if ($v_folder_handler = @opendir($v_descr['filename'])) {
while (($v_item_handler = @readdir($v_folder_handler)) !== false) {
// ----- Skip '.' and '..'
if (($v_item_handler == '.') || ($v_item_handler == '..')) {
continue;
}
// ----- Compose the full filename
$v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler;
// ----- Look for different stored filename
// Because the name of the folder was changed, the name of the
// files/sub-folders also change
if (($v_descr['stored_filename'] != $v_descr['filename'])
&& (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) {
if ($v_descr['stored_filename'] != '') {
$v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler;
}
else {
$v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler;
}
}
$v_dirlist_nb++;
}
@closedir($v_folder_handler);
}
else {
// TBC : unable to open folder in read mode
}
// ----- Expand each element of the list
if ($v_dirlist_nb != 0) {
// ----- Expand
if (($v_result = $this->privFileDescrExpand($v_dirlist_descr, $p_options)) != 1) {
return $v_result;
}
// ----- Concat the resulting list
$v_result_list = array_merge($v_result_list, $v_dirlist_descr);
}
else {
}
// ----- Free local array
unset($v_dirlist_descr);
}
}
// ----- Get the result list
$p_filedescr_list = $v_result_list;
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privCreate()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privCreate($p_filedescr_list, &$p_result_list, &$p_options)
{
$v_result=1;
$v_list_detail = array();
// ----- Magic quotes trick
$this->privDisableMagicQuotes();
// ----- Open the file in write mode
if (($v_result = $this->privOpenFd('wb')) != 1)
{
// ----- Return
return $v_result;
}
// ----- Add the list of files
$v_result = $this->privAddList($p_filedescr_list, $p_result_list, $p_options);
// ----- Close
$this->privCloseFd();
// ----- Magic quotes trick
$this->privSwapBackMagicQuotes();
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privAdd()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privAdd($p_filedescr_list, &$p_result_list, &$p_options)
{
$v_result=1;
$v_list_detail = array();
// ----- Look if the archive exists or is empty
if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0))
{
// ----- Do a create
$v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options);
// ----- Return
return $v_result;
}
// ----- Magic quotes trick
$this->privDisableMagicQuotes();
// ----- Open the zip file
if (($v_result=$this->privOpenFd('rb')) != 1)
{
// ----- Magic quotes trick
$this->privSwapBackMagicQuotes();
// ----- Return
return $v_result;
}
// ----- Read the central directory informations
$v_central_dir = array();
if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
{
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
return $v_result;
}
// ----- Go to beginning of File
@rewind($this->zip_fd);
// ----- Creates a temporay file
$v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
// ----- Open the temporary file in write mode
if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
{
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
// ----- Return
return PclZip::errorCode();
}
// ----- Copy the files from the archive to the temporary file
// TBC : Here I should better append the file and go back to erase the central dir
$v_size = $v_central_dir['offset'];
while ($v_size != 0)
{
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = fread($this->zip_fd, $v_read_size);
@fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Swap the file descriptor
// Here is a trick : I swap the temporary fd with the zip fd, in order to use
// the following methods on the temporary fil and not the real archive
$v_swap = $this->zip_fd;
$this->zip_fd = $v_zip_temp_fd;
$v_zip_temp_fd = $v_swap;
// ----- Add the files
$v_header_list = array();
if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1)
{
fclose($v_zip_temp_fd);
$this->privCloseFd();
@unlink($v_zip_temp_name);
$this->privSwapBackMagicQuotes();
// ----- Return
return $v_result;
}
// ----- Store the offset of the central dir
$v_offset = @ftell($this->zip_fd);
// ----- Copy the block of file headers from the old archive
$v_size = $v_central_dir['size'];
while ($v_size != 0)
{
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @fread($v_zip_temp_fd, $v_read_size);
@fwrite($this->zip_fd, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Create the Central Dir files header
for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++)
{
// ----- Create the file header
if ($v_header_list[$i]['status'] == 'ok') {
if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
fclose($v_zip_temp_fd);
$this->privCloseFd();
@unlink($v_zip_temp_name);
$this->privSwapBackMagicQuotes();
// ----- Return
return $v_result;
}
$v_count++;
}
// ----- Transform the header to a 'usable' info
$this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
}
// ----- Zip file comment
$v_comment = $v_central_dir['comment'];
if (isset($p_options[PCLZIP_OPT_COMMENT])) {
$v_comment = $p_options[PCLZIP_OPT_COMMENT];
}
if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) {
$v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT];
}
if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) {
$v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment;
}
// ----- Calculate the size of the central header
$v_size = @ftell($this->zip_fd)-$v_offset;
// ----- Create the central dir footer
if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1)
{
// ----- Reset the file list
unset($v_header_list);
$this->privSwapBackMagicQuotes();
// ----- Return
return $v_result;
}
// ----- Swap back the file descriptor
$v_swap = $this->zip_fd;
$this->zip_fd = $v_zip_temp_fd;
$v_zip_temp_fd = $v_swap;
// ----- Close
$this->privCloseFd();
// ----- Close the temporary file
@fclose($v_zip_temp_fd);
// ----- Magic quotes trick
$this->privSwapBackMagicQuotes();
// ----- Delete the zip file
// TBC : I should test the result ...
@unlink($this->zipname);
// ----- Rename the temporary file
// TBC : I should test the result ...
//@rename($v_zip_temp_name, $this->zipname);
PclZipUtilRename($v_zip_temp_name, $this->zipname);
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privOpenFd()
// Description :
// Parameters :
// --------------------------------------------------------------------------------
function privOpenFd($p_mode)
{
$v_result=1;
// ----- Look if already open
if ($this->zip_fd != 0)
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open');
// ----- Return
return PclZip::errorCode();
}
// ----- Open the zip file
if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0)
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode');
// ----- Return
return PclZip::errorCode();
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privCloseFd()
// Description :
// Parameters :
// --------------------------------------------------------------------------------
function privCloseFd()
{
$v_result=1;
if ($this->zip_fd != 0)
@fclose($this->zip_fd);
$this->zip_fd = 0;
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privAddList()
// Description :
// $p_add_dir and $p_remove_dir will give the ability to memorize a path which is
// different from the real path of the file. This is usefull if you want to have PclTar
// running in any directory, and memorize relative path from an other directory.
// Parameters :
// $p_list : An array containing the file or directory names to add in the tar
// $p_result_list : list of added files with their properties (specially the status field)
// $p_add_dir : Path to add in the filename path archived
// $p_remove_dir : Path to remove in the filename path archived
// Return Values :
// --------------------------------------------------------------------------------
// function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
function privAddList($p_filedescr_list, &$p_result_list, &$p_options)
{
$v_result=1;
// ----- Add the files
$v_header_list = array();
if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1)
{
// ----- Return
return $v_result;
}
// ----- Store the offset of the central dir
$v_offset = @ftell($this->zip_fd);
// ----- Create the Central Dir files header
for ($i=0,$v_count=0; $i<sizeof($v_header_list); $i++)
{
// ----- Create the file header
if ($v_header_list[$i]['status'] == 'ok') {
if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
// ----- Return
return $v_result;
}
$v_count++;
}
// ----- Transform the header to a 'usable' info
$this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
}
// ----- Zip file comment
$v_comment = '';
if (isset($p_options[PCLZIP_OPT_COMMENT])) {
$v_comment = $p_options[PCLZIP_OPT_COMMENT];
}
// ----- Calculate the size of the central header
$v_size = @ftell($this->zip_fd)-$v_offset;
// ----- Create the central dir footer
if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1)
{
// ----- Reset the file list
unset($v_header_list);
// ----- Return
return $v_result;
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privAddFileList()
// Description :
// Parameters :
// $p_filedescr_list : An array containing the file description
// or directory names to add in the zip
// $p_result_list : list of added files with their properties (specially the status field)
// Return Values :
// --------------------------------------------------------------------------------
function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options)
{
$v_result=1;
$v_header = array();
// ----- Recuperate the current number of elt in list
$v_nb = sizeof($p_result_list);
// ----- Loop on the files
for ($j=0; ($j<sizeof($p_filedescr_list)) && ($v_result==1); $j++) {
// ----- Format the filename
$p_filedescr_list[$j]['filename']
= PclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
// ----- Skip empty file names
// TBC : Can this be possible ? not checked in DescrParseAtt ?
if ($p_filedescr_list[$j]['filename'] == "") {
continue;
}
// ----- Check the filename
if ( ($p_filedescr_list[$j]['type'] != 'virtual_file')
&& (!file_exists($p_filedescr_list[$j]['filename']))) {
PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$p_filedescr_list[$j]['filename']."' does not exist");
return PclZip::errorCode();
}
// ----- Look if it is a file or a dir with no all path remove option
// or a dir with all its path removed
// if ( (is_file($p_filedescr_list[$j]['filename']))
// || ( is_dir($p_filedescr_list[$j]['filename'])
if ( ($p_filedescr_list[$j]['type'] == 'file')
|| ($p_filedescr_list[$j]['type'] == 'virtual_file')
|| ( ($p_filedescr_list[$j]['type'] == 'folder')
&& ( !isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])
|| !$p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))
) {
// ----- Add the file
$v_result = $this->privAddFile($p_filedescr_list[$j], $v_header,
$p_options);
if ($v_result != 1) {
return $v_result;
}
// ----- Store the file infos
$p_result_list[$v_nb++] = $v_header;
}
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privAddFile()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privAddFile($p_filedescr, &$p_header, &$p_options)
{
$v_result=1;
// ----- Working variable
$p_filename = $p_filedescr['filename'];
// TBC : Already done in the fileAtt check ... ?
if ($p_filename == "") {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)");
// ----- Return
return PclZip::errorCode();
}
// ----- Look for a stored different filename
/* TBC : Removed
if (isset($p_filedescr['stored_filename'])) {
$v_stored_filename = $p_filedescr['stored_filename'];
}
else {
$v_stored_filename = $p_filedescr['stored_filename'];
}
*/
// ----- Set the file properties
clearstatcache();
$p_header['version'] = 20;
$p_header['version_extracted'] = 10;
$p_header['flag'] = 0;
$p_header['compression'] = 0;
$p_header['crc'] = 0;
$p_header['compressed_size'] = 0;
$p_header['filename_len'] = strlen($p_filename);
$p_header['extra_len'] = 0;
$p_header['disk'] = 0;
$p_header['internal'] = 0;
$p_header['offset'] = 0;
$p_header['filename'] = $p_filename;
// TBC : Removed $p_header['stored_filename'] = $v_stored_filename;
$p_header['stored_filename'] = $p_filedescr['stored_filename'];
$p_header['extra'] = '';
$p_header['status'] = 'ok';
$p_header['index'] = -1;
// ----- Look for regular file
if ($p_filedescr['type']=='file') {
$p_header['external'] = 0x00000000;
$p_header['size'] = filesize($p_filename);
}
// ----- Look for regular folder
else if ($p_filedescr['type']=='folder') {
$p_header['external'] = 0x00000010;
$p_header['mtime'] = filemtime($p_filename);
$p_header['size'] = filesize($p_filename);
}
// ----- Look for virtual file
else if ($p_filedescr['type'] == 'virtual_file') {
$p_header['external'] = 0x00000000;
$p_header['size'] = strlen($p_filedescr['content']);
}
// ----- Look for filetime
if (isset($p_filedescr['mtime'])) {
$p_header['mtime'] = $p_filedescr['mtime'];
}
else if ($p_filedescr['type'] == 'virtual_file') {
$p_header['mtime'] = time();
}
else {
$p_header['mtime'] = filemtime($p_filename);
}
// ------ Look for file comment
if (isset($p_filedescr['comment'])) {
$p_header['comment_len'] = strlen($p_filedescr['comment']);
$p_header['comment'] = $p_filedescr['comment'];
}
else {
$p_header['comment_len'] = 0;
$p_header['comment'] = '';
}
// ----- Look for pre-add callback
if (isset($p_options[PCLZIP_CB_PRE_ADD])) {
// ----- Generate a local information
$v_local_header = array();
$this->privConvertHeader2FileInfo($p_header, $v_local_header);
// ----- Call the callback
// Here I do not use call_user_func() because I need to send a reference to the
// header.
// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_ADD].'(PCLZIP_CB_PRE_ADD, $v_local_header);');
$v_result = $p_options[PCLZIP_CB_PRE_ADD](PCLZIP_CB_PRE_ADD, $v_local_header);
if ($v_result == 0) {
// ----- Change the file status
$p_header['status'] = "skipped";
$v_result = 1;
}
// ----- Update the informations
// Only some fields can be modified
if ($p_header['stored_filename'] != $v_local_header['stored_filename']) {
$p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']);
}
}
// ----- Look for empty stored filename
if ($p_header['stored_filename'] == "") {
$p_header['status'] = "filtered";
}
// ----- Check the path length
if (strlen($p_header['stored_filename']) > 0xFF) {
$p_header['status'] = 'filename_too_long';
}
// ----- Look if no error, or file not skipped
if ($p_header['status'] == 'ok') {
// ----- Look for a file
if ($p_filedescr['type'] == 'file') {
// ----- Look for using temporary file to zip
if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))
&& (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])
|| (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
&& ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])) ) ) {
$v_result = $this->privAddFileUsingTempFile($p_filedescr, $p_header, $p_options);
if ($v_result < PCLZIP_ERR_NO_ERROR) {
return $v_result;
}
}
// ----- Use "in memory" zip algo
else {
// ----- Open the source file
if (($v_file = @fopen($p_filename, "rb")) == 0) {
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode");
return PclZip::errorCode();
}
// ----- Read the file content
$v_content = @fread($v_file, $p_header['size']);
// ----- Close the file
@fclose($v_file);
// ----- Calculate the CRC
$p_header['crc'] = @crc32($v_content);
// ----- Look for no compression
if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
// ----- Set header parameters
$p_header['compressed_size'] = $p_header['size'];
$p_header['compression'] = 0;
}
// ----- Look for normal compression
else {
// ----- Compress the content
$v_content = @gzdeflate($v_content);
// ----- Set header parameters
$p_header['compressed_size'] = strlen($v_content);
$p_header['compression'] = 8;
}
// ----- Call the header generation
if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
@fclose($v_file);
return $v_result;
}
// ----- Write the compressed (or not) content
@fwrite($this->zip_fd, $v_content, $p_header['compressed_size']);
}
}
// ----- Look for a virtual file (a file from string)
else if ($p_filedescr['type'] == 'virtual_file') {
$v_content = $p_filedescr['content'];
// ----- Calculate the CRC
$p_header['crc'] = @crc32($v_content);
// ----- Look for no compression
if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
// ----- Set header parameters
$p_header['compressed_size'] = $p_header['size'];
$p_header['compression'] = 0;
}
// ----- Look for normal compression
else {
// ----- Compress the content
$v_content = @gzdeflate($v_content);
// ----- Set header parameters
$p_header['compressed_size'] = strlen($v_content);
$p_header['compression'] = 8;
}
// ----- Call the header generation
if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
@fclose($v_file);
return $v_result;
}
// ----- Write the compressed (or not) content
@fwrite($this->zip_fd, $v_content, $p_header['compressed_size']);
}
// ----- Look for a directory
else if ($p_filedescr['type'] == 'folder') {
// ----- Look for directory last '/'
if (@substr($p_header['stored_filename'], -1) != '/') {
$p_header['stored_filename'] .= '/';
}
// ----- Set the file properties
$p_header['size'] = 0;
//$p_header['external'] = 0x41FF0010; // Value for a folder : to be checked
$p_header['external'] = 0x00000010; // Value for a folder : to be checked
// ----- Call the header generation
if (($v_result = $this->privWriteFileHeader($p_header)) != 1)
{
return $v_result;
}
}
}
// ----- Look for post-add callback
if (isset($p_options[PCLZIP_CB_POST_ADD])) {
// ----- Generate a local information
$v_local_header = array();
$this->privConvertHeader2FileInfo($p_header, $v_local_header);
// ----- Call the callback
// Here I do not use call_user_func() because I need to send a reference to the
// header.
// eval('$v_result = '.$p_options[PCLZIP_CB_POST_ADD].'(PCLZIP_CB_POST_ADD, $v_local_header);');
$v_result = $p_options[PCLZIP_CB_POST_ADD](PCLZIP_CB_POST_ADD, $v_local_header);
if ($v_result == 0) {
// ----- Ignored
$v_result = 1;
}
// ----- Update the informations
// Nothing can be modified
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privAddFileUsingTempFile()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options)
{
$v_result=PCLZIP_ERR_NO_ERROR;
// ----- Working variable
$p_filename = $p_filedescr['filename'];
// ----- Open the source file
if (($v_file = @fopen($p_filename, "rb")) == 0) {
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode");
return PclZip::errorCode();
}
// ----- Creates a compressed temporary file
$v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz';
if (($v_file_compressed = @gzopen($v_gzip_temp_name, "wb")) == 0) {
fclose($v_file);
PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode');
return PclZip::errorCode();
}
// ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
$v_size = filesize($p_filename);
while ($v_size != 0) {
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @fread($v_file, $v_read_size);
//$v_binary_data = pack('a'.$v_read_size, $v_buffer);
@gzputs($v_file_compressed, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Close the file
@fclose($v_file);
@gzclose($v_file_compressed);
// ----- Check the minimum file size
if (filesize($v_gzip_temp_name) < 18) {
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \''.$v_gzip_temp_name.'\' has invalid filesize - should be minimum 18 bytes');
return PclZip::errorCode();
}
// ----- Extract the compressed attributes
if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) {
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode');
return PclZip::errorCode();
}
// ----- Read the gzip file header
$v_binary_data = @fread($v_file_compressed, 10);
$v_data_header = unpack('a1id1/a1id2/a1cm/a1flag/Vmtime/a1xfl/a1os', $v_binary_data);
// ----- Check some parameters
$v_data_header['os'] = bin2hex($v_data_header['os']);
// ----- Read the gzip file footer
@fseek($v_file_compressed, filesize($v_gzip_temp_name)-8);
$v_binary_data = @fread($v_file_compressed, 8);
$v_data_footer = unpack('Vcrc/Vcompressed_size', $v_binary_data);
// ----- Set the attributes
$p_header['compression'] = ord($v_data_header['cm']);
//$p_header['mtime'] = $v_data_header['mtime'];
$p_header['crc'] = $v_data_footer['crc'];
$p_header['compressed_size'] = filesize($v_gzip_temp_name)-18;
// ----- Close the file
@fclose($v_file_compressed);
// ----- Call the header generation
if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
return $v_result;
}
// ----- Add the compressed data
if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0)
{
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode');
return PclZip::errorCode();
}
// ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
fseek($v_file_compressed, 10);
$v_size = $p_header['compressed_size'];
while ($v_size != 0)
{
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @fread($v_file_compressed, $v_read_size);
//$v_binary_data = pack('a'.$v_read_size, $v_buffer);
@fwrite($this->zip_fd, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Close the file
@fclose($v_file_compressed);
// ----- Unlink the temporary file
@unlink($v_gzip_temp_name);
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privCalculateStoredFilename()
// Description :
// Based on file descriptor properties and global options, this method
// calculate the filename that will be stored in the archive.
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privCalculateStoredFilename(&$p_filedescr, &$p_options)
{
$v_result=1;
// ----- Working variables
$p_filename = $p_filedescr['filename'];
if (isset($p_options[PCLZIP_OPT_ADD_PATH])) {
$p_add_dir = $p_options[PCLZIP_OPT_ADD_PATH];
}
else {
$p_add_dir = '';
}
if (isset($p_options[PCLZIP_OPT_REMOVE_PATH])) {
$p_remove_dir = $p_options[PCLZIP_OPT_REMOVE_PATH];
}
else {
$p_remove_dir = '';
}
if (isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
$p_remove_all_dir = $p_options[PCLZIP_OPT_REMOVE_ALL_PATH];
}
else {
$p_remove_all_dir = 0;
}
// ----- Look for full name change
if (isset($p_filedescr['new_full_name'])) {
// ----- Remove drive letter if any
$v_stored_filename = PclZipUtilTranslateWinPath($p_filedescr['new_full_name']);
}
// ----- Look for path and/or short name change
else {
// ----- Look for short name change
// Its when we cahnge just the filename but not the path
if (isset($p_filedescr['new_short_name'])) {
$v_path_info = pathinfo($p_filename);
$v_dir = '';
if ($v_path_info['dirname'] != '') {
$v_dir = $v_path_info['dirname'].'/';
}
$v_stored_filename = $v_dir.$p_filedescr['new_short_name'];
}
else {
// ----- Calculate the stored filename
$v_stored_filename = $p_filename;
}
// ----- Look for all path to remove
if ($p_remove_all_dir) {
$v_stored_filename = basename($p_filename);
}
// ----- Look for partial path remove
else if ($p_remove_dir != "") {
if (substr($p_remove_dir, -1) != '/')
$p_remove_dir .= "/";
if ( (substr($p_filename, 0, 2) == "./")
|| (substr($p_remove_dir, 0, 2) == "./")) {
if ( (substr($p_filename, 0, 2) == "./")
&& (substr($p_remove_dir, 0, 2) != "./")) {
$p_remove_dir = "./".$p_remove_dir;
}
if ( (substr($p_filename, 0, 2) != "./")
&& (substr($p_remove_dir, 0, 2) == "./")) {
$p_remove_dir = substr($p_remove_dir, 2);
}
}
$v_compare = PclZipUtilPathInclusion($p_remove_dir,
$v_stored_filename);
if ($v_compare > 0) {
if ($v_compare == 2) {
$v_stored_filename = "";
}
else {
$v_stored_filename = substr($v_stored_filename,
strlen($p_remove_dir));
}
}
}
// ----- Remove drive letter if any
$v_stored_filename = PclZipUtilTranslateWinPath($v_stored_filename);
// ----- Look for path to add
if ($p_add_dir != "") {
if (substr($p_add_dir, -1) == "/")
$v_stored_filename = $p_add_dir.$v_stored_filename;
else
$v_stored_filename = $p_add_dir."/".$v_stored_filename;
}
}
// ----- Filename (reduce the path of stored name)
$v_stored_filename = PclZipUtilPathReduction($v_stored_filename);
$p_filedescr['stored_filename'] = $v_stored_filename;
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privWriteFileHeader()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privWriteFileHeader(&$p_header)
{
$v_result=1;
// ----- Store the offset position of the file
$p_header['offset'] = ftell($this->zip_fd);
// ----- Transform UNIX mtime to DOS format mdate/mtime
$v_date = getdate($p_header['mtime']);
$v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
$v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
// ----- Packed data
$v_binary_data = pack("VvvvvvVVVvv", 0x04034b50,
$p_header['version_extracted'], $p_header['flag'],
$p_header['compression'], $v_mtime, $v_mdate,
$p_header['crc'], $p_header['compressed_size'],
$p_header['size'],
strlen($p_header['stored_filename']),
$p_header['extra_len']);
// ----- Write the first 148 bytes of the header in the archive
fputs($this->zip_fd, $v_binary_data, 30);
// ----- Write the variable fields
if (strlen($p_header['stored_filename']) != 0)
{
fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
}
if ($p_header['extra_len'] != 0)
{
fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privWriteCentralFileHeader()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privWriteCentralFileHeader(&$p_header)
{
$v_result=1;
// TBC
//for(reset($p_header); $key = key($p_header); next($p_header)) {
//}
// ----- Transform UNIX mtime to DOS format mdate/mtime
$v_date = getdate($p_header['mtime']);
$v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
$v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
// ----- Packed data
$v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50,
$p_header['version'], $p_header['version_extracted'],
$p_header['flag'], $p_header['compression'],
$v_mtime, $v_mdate, $p_header['crc'],
$p_header['compressed_size'], $p_header['size'],
strlen($p_header['stored_filename']),
$p_header['extra_len'], $p_header['comment_len'],
$p_header['disk'], $p_header['internal'],
$p_header['external'], $p_header['offset']);
// ----- Write the 42 bytes of the header in the zip file
fputs($this->zip_fd, $v_binary_data, 46);
// ----- Write the variable fields
if (strlen($p_header['stored_filename']) != 0)
{
fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
}
if ($p_header['extra_len'] != 0)
{
fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
}
if ($p_header['comment_len'] != 0)
{
fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']);
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privWriteCentralHeader()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment)
{
$v_result=1;
// ----- Packed data
$v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries,
$p_nb_entries, $p_size,
$p_offset, strlen($p_comment));
// ----- Write the 22 bytes of the header in the zip file
fputs($this->zip_fd, $v_binary_data, 22);
// ----- Write the variable fields
if (strlen($p_comment) != 0)
{
fputs($this->zip_fd, $p_comment, strlen($p_comment));
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privList()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privList(&$p_list)
{
$v_result=1;
// ----- Magic quotes trick
$this->privDisableMagicQuotes();
// ----- Open the zip file
if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
{
// ----- Magic quotes trick
$this->privSwapBackMagicQuotes();
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
// ----- Return
return PclZip::errorCode();
}
// ----- Read the central directory informations
$v_central_dir = array();
if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
{
$this->privSwapBackMagicQuotes();
return $v_result;
}
// ----- Go to beginning of Central Dir
@rewind($this->zip_fd);
if (@fseek($this->zip_fd, $v_central_dir['offset']))
{
$this->privSwapBackMagicQuotes();
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
// ----- Return
return PclZip::errorCode();
}
// ----- Read each entry
for ($i=0; $i<$v_central_dir['entries']; $i++)
{
// ----- Read the file header
if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
{
$this->privSwapBackMagicQuotes();
return $v_result;
}
$v_header['index'] = $i;
// ----- Get the only interesting attributes
$this->privConvertHeader2FileInfo($v_header, $p_list[$i]);
unset($v_header);
}
// ----- Close the zip file
$this->privCloseFd();
// ----- Magic quotes trick
$this->privSwapBackMagicQuotes();
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privConvertHeader2FileInfo()
// Description :
// This function takes the file informations from the central directory
// entries and extract the interesting parameters that will be given back.
// The resulting file infos are set in the array $p_info
// $p_info['filename'] : Filename with full path. Given by user (add),
// extracted in the filesystem (extract).
// $p_info['stored_filename'] : Stored filename in the archive.
// $p_info['size'] = Size of the file.
// $p_info['compressed_size'] = Compressed size of the file.
// $p_info['mtime'] = Last modification date of the file.
// $p_info['comment'] = Comment associated with the file.
// $p_info['folder'] = true/false : indicates if the entry is a folder or not.
// $p_info['status'] = status of the action on the file.
// $p_info['crc'] = CRC of the file content.
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privConvertHeader2FileInfo($p_header, &$p_info)
{
$v_result=1;
// ----- Get the interesting attributes
$v_temp_path = PclZipUtilPathReduction($p_header['filename']);
$p_info['filename'] = $v_temp_path;
$v_temp_path = PclZipUtilPathReduction($p_header['stored_filename']);
$p_info['stored_filename'] = $v_temp_path;
$p_info['size'] = $p_header['size'];
$p_info['compressed_size'] = $p_header['compressed_size'];
$p_info['mtime'] = $p_header['mtime'];
$p_info['comment'] = $p_header['comment'];
$p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010);
$p_info['index'] = $p_header['index'];
$p_info['status'] = $p_header['status'];
$p_info['crc'] = $p_header['crc'];
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privExtractByRule()
// Description :
// Extract a file or directory depending of rules (by index, by name, ...)
// Parameters :
// $p_file_list : An array where will be placed the properties of each
// extracted file
// $p_path : Path to add while writing the extracted files
// $p_remove_path : Path to remove (from the file memorized path) while writing the
// extracted files. If the path does not match the file path,
// the file is extracted with its memorized path.
// $p_remove_path does not apply to 'list' mode.
// $p_path and $p_remove_path are commulative.
// Return Values :
// 1 on success,0 or less on error (see error code list)
// --------------------------------------------------------------------------------
function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
{
$v_result=1;
// ----- Magic quotes trick
$this->privDisableMagicQuotes();
// ----- Check the path
if ( ($p_path == "")
|| ( (substr($p_path, 0, 1) != "/")
&& (substr($p_path, 0, 3) != "../")
&& (substr($p_path,1,2)!=":/")))
$p_path = "./".$p_path;
// ----- Reduce the path last (and duplicated) '/'
if (($p_path != "./") && ($p_path != "/"))
{
// ----- Look for the path end '/'
while (substr($p_path, -1) == "/")
{
$p_path = substr($p_path, 0, strlen($p_path)-1);
}
}
// ----- Look for path to remove format (should end by /)
if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/'))
{
$p_remove_path .= '/';
}
$p_remove_path_size = strlen($p_remove_path);
// ----- Open the zip file
if (($v_result = $this->privOpenFd('rb')) != 1)
{
$this->privSwapBackMagicQuotes();
return $v_result;
}
// ----- Read the central directory informations
$v_central_dir = array();
if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
{
// ----- Close the zip file
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
return $v_result;
}
// ----- Start at beginning of Central Dir
$v_pos_entry = $v_central_dir['offset'];
// ----- Read each entry
$j_start = 0;
for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
{
// ----- Read next Central dir entry
@rewind($this->zip_fd);
if (@fseek($this->zip_fd, $v_pos_entry))
{
// ----- Close the zip file
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
// ----- Return
return PclZip::errorCode();
}
// ----- Read the file header
$v_header = array();
if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
{
// ----- Close the zip file
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
return $v_result;
}
// ----- Store the index
$v_header['index'] = $i;
// ----- Store the file position
$v_pos_entry = ftell($this->zip_fd);
// ----- Look for the specific extract rules
$v_extract = false;
// ----- Look for extract by name rule
if ( (isset($p_options[PCLZIP_OPT_BY_NAME]))
&& ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
// ----- Look if the filename is in the list
for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_extract); $j++) {
// ----- Look for a directory
if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
// ----- Look if the directory is in the filename path
if ( (strlen($v_header['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
&& (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
$v_extract = true;
}
}
// ----- Look for a filename
elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
$v_extract = true;
}
}
}
// ----- Look for extract by ereg rule
// ereg() is deprecated with PHP 5.3
/*
else if ( (isset($p_options[PCLZIP_OPT_BY_EREG]))
&& ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) {
$v_extract = true;
}
}
*/
// ----- Look for extract by preg rule
else if ( (isset($p_options[PCLZIP_OPT_BY_PREG]))
&& ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) {
$v_extract = true;
}
}
// ----- Look for extract by index rule
else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX]))
&& ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
// ----- Look if the index is in the list
for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
$v_extract = true;
}
if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
$j_start = $j+1;
}
if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
break;
}
}
}
// ----- Look for no rule, which means extract all the archive
else {
$v_extract = true;
}
// ----- Check compression method
if ( ($v_extract)
&& ( ($v_header['compression'] != 8)
&& ($v_header['compression'] != 0))) {
$v_header['status'] = 'unsupported_compression';
// ----- Look for PCLZIP_OPT_STOP_ON_ERROR
if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
&& ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
$this->privSwapBackMagicQuotes();
PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION,
"Filename '".$v_header['stored_filename']."' is "
."compressed by an unsupported compression "
."method (".$v_header['compression'].") ");
return PclZip::errorCode();
}
}
// ----- Check encrypted files
if (($v_extract) && (($v_header['flag'] & 1) == 1)) {
$v_header['status'] = 'unsupported_encryption';
// ----- Look for PCLZIP_OPT_STOP_ON_ERROR
if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
&& ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
$this->privSwapBackMagicQuotes();
PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION,
"Unsupported encryption for "
." filename '".$v_header['stored_filename']
."'");
return PclZip::errorCode();
}
}
// ----- Look for real extraction
if (($v_extract) && ($v_header['status'] != 'ok')) {
$v_result = $this->privConvertHeader2FileInfo($v_header,
$p_file_list[$v_nb_extracted++]);
if ($v_result != 1) {
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
return $v_result;
}
$v_extract = false;
}
// ----- Look for real extraction
if ($v_extract)
{
// ----- Go to the file position
@rewind($this->zip_fd);
if (@fseek($this->zip_fd, $v_header['offset']))
{
// ----- Close the zip file
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
// ----- Return
return PclZip::errorCode();
}
// ----- Look for extraction as string
if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) {
$v_string = '';
// ----- Extracting the file
$v_result1 = $this->privExtractFileAsString($v_header, $v_string, $p_options);
if ($v_result1 < 1) {
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
return $v_result1;
}
// ----- Get the only interesting attributes
if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1)
{
// ----- Close the zip file
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
return $v_result;
}
// ----- Set the file content
$p_file_list[$v_nb_extracted]['content'] = $v_string;
// ----- Next extracted file
$v_nb_extracted++;
// ----- Look for user callback abort
if ($v_result1 == 2) {
break;
}
}
// ----- Look for extraction in standard output
elseif ( (isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT]))
&& ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) {
// ----- Extracting the file in standard output
$v_result1 = $this->privExtractFileInOutput($v_header, $p_options);
if ($v_result1 < 1) {
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
return $v_result1;
}
// ----- Get the only interesting attributes
if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) {
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
return $v_result;
}
// ----- Look for user callback abort
if ($v_result1 == 2) {
break;
}
}
// ----- Look for normal extraction
else {
// ----- Extracting the file
$v_result1 = $this->privExtractFile($v_header,
$p_path, $p_remove_path,
$p_remove_all_path,
$p_options);
if ($v_result1 < 1) {
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
return $v_result1;
}
// ----- Get the only interesting attributes
if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1)
{
// ----- Close the zip file
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
return $v_result;
}
// ----- Look for user callback abort
if ($v_result1 == 2) {
break;
}
}
}
}
// ----- Close the zip file
$this->privCloseFd();
$this->privSwapBackMagicQuotes();
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privExtractFile()
// Description :
// Parameters :
// Return Values :
//
// 1 : ... ?
// PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback
// --------------------------------------------------------------------------------
function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
{
$v_result=1;
// ----- Read the file header
if (($v_result = $this->privReadFileHeader($v_header)) != 1)
{
// ----- Return
return $v_result;
}
// ----- Check that the file header is coherent with $p_entry info
if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
// TBC
}
// ----- Look for all path to remove
if ($p_remove_all_path == true) {
// ----- Look for folder entry that not need to be extracted
if (($p_entry['external']&0x00000010)==0x00000010) {
$p_entry['status'] = "filtered";
return $v_result;
}
// ----- Get the basename of the path
$p_entry['filename'] = basename($p_entry['filename']);
}
// ----- Look for path to remove
else if ($p_remove_path != "")
{
if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2)
{
// ----- Change the file status
$p_entry['status'] = "filtered";
// ----- Return
return $v_result;
}
$p_remove_path_size = strlen($p_remove_path);
if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path)
{
// ----- Remove the path
$p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size);
}
}
// ----- Add the path
if ($p_path != '') {
$p_entry['filename'] = $p_path."/".$p_entry['filename'];
}
// ----- Check a base_dir_restriction
if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) {
$v_inclusion
= PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION],
$p_entry['filename']);
if ($v_inclusion == 0) {
PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION,
"Filename '".$p_entry['filename']."' is "
."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION");
return PclZip::errorCode();
}
}
// ----- Look for pre-extract callback
if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
// ----- Generate a local information
$v_local_header = array();
$this->privConvertHeader2FileInfo($p_entry, $v_local_header);
// ----- Call the callback
// Here I do not use call_user_func() because I need to send a reference to the
// header.
// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
$v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header);
if ($v_result == 0) {
// ----- Change the file status
$p_entry['status'] = "skipped";
$v_result = 1;
}
// ----- Look for abort result
if ($v_result == 2) {
// ----- This status is internal and will be changed in 'skipped'
$p_entry['status'] = "aborted";
$v_result = PCLZIP_ERR_USER_ABORTED;
}
// ----- Update the informations
// Only some fields can be modified
$p_entry['filename'] = $v_local_header['filename'];
}
// ----- Look if extraction should be done
if ($p_entry['status'] == 'ok') {
// ----- Look for specific actions while the file exist
if (file_exists($p_entry['filename']))
{
// ----- Look if file is a directory
if (is_dir($p_entry['filename']))
{
// ----- Change the file status
$p_entry['status'] = "already_a_directory";
// ----- Look for PCLZIP_OPT_STOP_ON_ERROR
// For historical reason first PclZip implementation does not stop
// when this kind of error occurs.
if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
&& ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY,
"Filename '".$p_entry['filename']."' is "
."already used by an existing directory");
return PclZip::errorCode();
}
}
// ----- Look if file is write protected
else if (!is_writeable($p_entry['filename']))
{
// ----- Change the file status
$p_entry['status'] = "write_protected";
// ----- Look for PCLZIP_OPT_STOP_ON_ERROR
// For historical reason first PclZip implementation does not stop
// when this kind of error occurs.
if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
&& ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,
"Filename '".$p_entry['filename']."' exists "
."and is write protected");
return PclZip::errorCode();
}
}
// ----- Look if the extracted file is older
else if (filemtime($p_entry['filename']) > $p_entry['mtime'])
{
// ----- Change the file status
if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER]))
&& ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) {
}
else {
$p_entry['status'] = "newer_exist";
// ----- Look for PCLZIP_OPT_STOP_ON_ERROR
// For historical reason first PclZip implementation does not stop
// when this kind of error occurs.
if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
&& ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,
"Newer version of '".$p_entry['filename']."' exists "
."and option PCLZIP_OPT_REPLACE_NEWER is not selected");
return PclZip::errorCode();
}
}
}
else {
}
}
// ----- Check the directory availability and create it if necessary
else {
if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/'))
$v_dir_to_check = $p_entry['filename'];
else if (!strstr($p_entry['filename'], "/"))
$v_dir_to_check = "";
else
$v_dir_to_check = dirname($p_entry['filename']);
if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
// ----- Change the file status
$p_entry['status'] = "path_creation_fail";
// ----- Return
//return $v_result;
$v_result = 1;
}
}
}
// ----- Look if extraction should be done
if ($p_entry['status'] == 'ok') {
// ----- Do the extraction (if not a folder)
if (!(($p_entry['external']&0x00000010)==0x00000010))
{
// ----- Look for not compressed file
if ($p_entry['compression'] == 0) {
// ----- Opening destination file
if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0)
{
// ----- Change the file status
$p_entry['status'] = "write_error";
// ----- Return
return $v_result;
}
// ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
$v_size = $p_entry['compressed_size'];
while ($v_size != 0)
{
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @fread($this->zip_fd, $v_read_size);
/* Try to speed up the code
$v_binary_data = pack('a'.$v_read_size, $v_buffer);
@fwrite($v_dest_file, $v_binary_data, $v_read_size);
*/
@fwrite($v_dest_file, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Closing the destination file
fclose($v_dest_file);
// ----- Change the file mtime
touch($p_entry['filename'], $p_entry['mtime']);
}
else {
// ----- TBC
// Need to be finished
if (($p_entry['flag'] & 1) == 1) {
PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.');
return PclZip::errorCode();
}
// ----- Look for using temporary file to unzip
if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF]))
&& (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON])
|| (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD])
&& ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_entry['size'])) ) ) {
$v_result = $this->privExtractFileUsingTempFile($p_entry, $p_options);
if ($v_result < PCLZIP_ERR_NO_ERROR) {
return $v_result;
}
}
// ----- Look for extract in memory
else {
// ----- Read the compressed file in a buffer (one shot)
$v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
// ----- Decompress the file
$v_file_content = @gzinflate($v_buffer);
unset($v_buffer);
if ($v_file_content === FALSE) {
// ----- Change the file status
// TBC
$p_entry['status'] = "error";
return $v_result;
}
// ----- Opening destination file
if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
// ----- Change the file status
$p_entry['status'] = "write_error";
return $v_result;
}
// ----- Write the uncompressed data
@fwrite($v_dest_file, $v_file_content, $p_entry['size']);
unset($v_file_content);
// ----- Closing the destination file
@fclose($v_dest_file);
}
// ----- Change the file mtime
@touch($p_entry['filename'], $p_entry['mtime']);
}
// ----- Look for chmod option
if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) {
// ----- Change the mode of the file
@chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]);
}
}
}
// ----- Change abort status
if ($p_entry['status'] == "aborted") {
$p_entry['status'] = "skipped";
}
// ----- Look for post-extract callback
elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
// ----- Generate a local information
$v_local_header = array();
$this->privConvertHeader2FileInfo($p_entry, $v_local_header);
// ----- Call the callback
// Here I do not use call_user_func() because I need to send a reference to the
// header.
// eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
$v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);
// ----- Look for abort result
if ($v_result == 2) {
$v_result = PCLZIP_ERR_USER_ABORTED;
}
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privExtractFileUsingTempFile()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privExtractFileUsingTempFile(&$p_entry, &$p_options)
{
$v_result=1;
// ----- Creates a temporary file
$v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz';
if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) {
fclose($v_file);
PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode');
return PclZip::errorCode();
}
// ----- Write gz file format header
$v_binary_data = pack('va1a1Va1a1', 0x8b1f, Chr($p_entry['compression']), Chr(0x00), time(), Chr(0x00), Chr(3));
@fwrite($v_dest_file, $v_binary_data, 10);
// ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
$v_size = $p_entry['compressed_size'];
while ($v_size != 0)
{
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @fread($this->zip_fd, $v_read_size);
//$v_binary_data = pack('a'.$v_read_size, $v_buffer);
@fwrite($v_dest_file, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Write gz file format footer
$v_binary_data = pack('VV', $p_entry['crc'], $p_entry['size']);
@fwrite($v_dest_file, $v_binary_data, 8);
// ----- Close the temporary file
@fclose($v_dest_file);
// ----- Opening destination file
if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
$p_entry['status'] = "write_error";
return $v_result;
}
// ----- Open the temporary gz file
if (($v_src_file = @gzopen($v_gzip_temp_name, 'rb')) == 0) {
@fclose($v_dest_file);
$p_entry['status'] = "read_error";
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode');
return PclZip::errorCode();
}
// ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
$v_size = $p_entry['size'];
while ($v_size != 0) {
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @gzread($v_src_file, $v_read_size);
//$v_binary_data = pack('a'.$v_read_size, $v_buffer);
@fwrite($v_dest_file, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
@fclose($v_dest_file);
@gzclose($v_src_file);
// ----- Delete the temporary file
@unlink($v_gzip_temp_name);
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privExtractFileInOutput()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privExtractFileInOutput(&$p_entry, &$p_options)
{
$v_result=1;
// ----- Read the file header
if (($v_result = $this->privReadFileHeader($v_header)) != 1) {
return $v_result;
}
// ----- Check that the file header is coherent with $p_entry info
if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
// TBC
}
// ----- Look for pre-extract callback
if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
// ----- Generate a local information
$v_local_header = array();
$this->privConvertHeader2FileInfo($p_entry, $v_local_header);
// ----- Call the callback
// Here I do not use call_user_func() because I need to send a reference to the
// header.
// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
$v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header);
if ($v_result == 0) {
// ----- Change the file status
$p_entry['status'] = "skipped";
$v_result = 1;
}
// ----- Look for abort result
if ($v_result == 2) {
// ----- This status is internal and will be changed in 'skipped'
$p_entry['status'] = "aborted";
$v_result = PCLZIP_ERR_USER_ABORTED;
}
// ----- Update the informations
// Only some fields can be modified
$p_entry['filename'] = $v_local_header['filename'];
}
// ----- Trace
// ----- Look if extraction should be done
if ($p_entry['status'] == 'ok') {
// ----- Do the extraction (if not a folder)
if (!(($p_entry['external']&0x00000010)==0x00000010)) {
// ----- Look for not compressed file
if ($p_entry['compressed_size'] == $p_entry['size']) {
// ----- Read the file in a buffer (one shot)
$v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
// ----- Send the file to the output
echo $v_buffer;
unset($v_buffer);
}
else {
// ----- Read the compressed file in a buffer (one shot)
$v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
// ----- Decompress the file
$v_file_content = gzinflate($v_buffer);
unset($v_buffer);
// ----- Send the file to the output
echo $v_file_content;
unset($v_file_content);
}
}
}
// ----- Change abort status
if ($p_entry['status'] == "aborted") {
$p_entry['status'] = "skipped";
}
// ----- Look for post-extract callback
elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
// ----- Generate a local information
$v_local_header = array();
$this->privConvertHeader2FileInfo($p_entry, $v_local_header);
// ----- Call the callback
// Here I do not use call_user_func() because I need to send a reference to the
// header.
// eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
$v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);
// ----- Look for abort result
if ($v_result == 2) {
$v_result = PCLZIP_ERR_USER_ABORTED;
}
}
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privExtractFileAsString()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)
{
$v_result=1;
// ----- Read the file header
$v_header = array();
if (($v_result = $this->privReadFileHeader($v_header)) != 1)
{
// ----- Return
return $v_result;
}
// ----- Check that the file header is coherent with $p_entry info
if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
// TBC
}
// ----- Look for pre-extract callback
if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
// ----- Generate a local information
$v_local_header = array();
$this->privConvertHeader2FileInfo($p_entry, $v_local_header);
// ----- Call the callback
// Here I do not use call_user_func() because I need to send a reference to the
// header.
// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
$v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header);
if ($v_result == 0) {
// ----- Change the file status
$p_entry['status'] = "skipped";
$v_result = 1;
}
// ----- Look for abort result
if ($v_result == 2) {
// ----- This status is internal and will be changed in 'skipped'
$p_entry['status'] = "aborted";
$v_result = PCLZIP_ERR_USER_ABORTED;
}
// ----- Update the informations
// Only some fields can be modified
$p_entry['filename'] = $v_local_header['filename'];
}
// ----- Look if extraction should be done
if ($p_entry['status'] == 'ok') {
// ----- Do the extraction (if not a folder)
if (!(($p_entry['external']&0x00000010)==0x00000010)) {
// ----- Look for not compressed file
// if ($p_entry['compressed_size'] == $p_entry['size'])
if ($p_entry['compression'] == 0) {
// ----- Reading the file
$p_string = @fread($this->zip_fd, $p_entry['compressed_size']);
}
else {
// ----- Reading the file
$v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
// ----- Decompress the file
if (($p_string = @gzinflate($v_data)) === FALSE) {
// TBC
}
}
// ----- Trace
}
else {
// TBC : error : can not extract a folder in a string
}
}
// ----- Change abort status
if ($p_entry['status'] == "aborted") {
$p_entry['status'] = "skipped";
}
// ----- Look for post-extract callback
elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
// ----- Generate a local information
$v_local_header = array();
$this->privConvertHeader2FileInfo($p_entry, $v_local_header);
// ----- Swap the content to header
$v_local_header['content'] = $p_string;
$p_string = '';
// ----- Call the callback
// Here I do not use call_user_func() because I need to send a reference to the
// header.
// eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
$v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);
// ----- Swap back the content to header
$p_string = $v_local_header['content'];
unset($v_local_header['content']);
// ----- Look for abort result
if ($v_result == 2) {
$v_result = PCLZIP_ERR_USER_ABORTED;
}
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privReadFileHeader()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privReadFileHeader(&$p_header)
{
$v_result=1;
// ----- Read the 4 bytes signature
$v_binary_data = @fread($this->zip_fd, 4);
$v_data = unpack('Vid', $v_binary_data);
// ----- Check signature
if ($v_data['id'] != 0x04034b50)
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
// ----- Return
return PclZip::errorCode();
}
// ----- Read the first 42 bytes of the header
$v_binary_data = fread($this->zip_fd, 26);
// ----- Look for invalid block size
if (strlen($v_binary_data) != 26)
{
$p_header['filename'] = "";
$p_header['status'] = "invalid_header";
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
// ----- Return
return PclZip::errorCode();
}
// ----- Extract the values
$v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data);
// ----- Get filename
$p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']);
// ----- Get extra_fields
if ($v_data['extra_len'] != 0) {
$p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']);
}
else {
$p_header['extra'] = '';
}
// ----- Extract properties
$p_header['version_extracted'] = $v_data['version'];
$p_header['compression'] = $v_data['compression'];
$p_header['size'] = $v_data['size'];
$p_header['compressed_size'] = $v_data['compressed_size'];
$p_header['crc'] = $v_data['crc'];
$p_header['flag'] = $v_data['flag'];
$p_header['filename_len'] = $v_data['filename_len'];
// ----- Recuperate date in UNIX format
$p_header['mdate'] = $v_data['mdate'];
$p_header['mtime'] = $v_data['mtime'];
if ($p_header['mdate'] && $p_header['mtime'])
{
// ----- Extract time
$v_hour = ($p_header['mtime'] & 0xF800) >> 11;
$v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
$v_seconde = ($p_header['mtime'] & 0x001F)*2;
// ----- Extract date
$v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
$v_month = ($p_header['mdate'] & 0x01E0) >> 5;
$v_day = $p_header['mdate'] & 0x001F;
// ----- Get UNIX date format
$p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
}
else
{
$p_header['mtime'] = time();
}
// TBC
//for(reset($v_data); $key = key($v_data); next($v_data)) {
//}
// ----- Set the stored filename
$p_header['stored_filename'] = $p_header['filename'];
// ----- Set the status field
$p_header['status'] = "ok";
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privReadCentralFileHeader()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privReadCentralFileHeader(&$p_header)
{
$v_result=1;
// ----- Read the 4 bytes signature
$v_binary_data = @fread($this->zip_fd, 4);
$v_data = unpack('Vid', $v_binary_data);
// ----- Check signature
if ($v_data['id'] != 0x02014b50)
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
// ----- Return
return PclZip::errorCode();
}
// ----- Read the first 42 bytes of the header
$v_binary_data = fread($this->zip_fd, 42);
// ----- Look for invalid block size
if (strlen($v_binary_data) != 42)
{
$p_header['filename'] = "";
$p_header['status'] = "invalid_header";
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
// ----- Return
return PclZip::errorCode();
}
// ----- Extract the values
$p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data);
// ----- Get filename
if ($p_header['filename_len'] != 0)
$p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']);
else
$p_header['filename'] = '';
// ----- Get extra
if ($p_header['extra_len'] != 0)
$p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']);
else
$p_header['extra'] = '';
// ----- Get comment
if ($p_header['comment_len'] != 0)
$p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']);
else
$p_header['comment'] = '';
// ----- Extract properties
// ----- Recuperate date in UNIX format
//if ($p_header['mdate'] && $p_header['mtime'])
// TBC : bug : this was ignoring time with 0/0/0
if (1)
{
// ----- Extract time
$v_hour = ($p_header['mtime'] & 0xF800) >> 11;
$v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
$v_seconde = ($p_header['mtime'] & 0x001F)*2;
// ----- Extract date
$v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
$v_month = ($p_header['mdate'] & 0x01E0) >> 5;
$v_day = $p_header['mdate'] & 0x001F;
// ----- Get UNIX date format
$p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
}
else
{
$p_header['mtime'] = time();
}
// ----- Set the stored filename
$p_header['stored_filename'] = $p_header['filename'];
// ----- Set default status to ok
$p_header['status'] = 'ok';
// ----- Look if it is a directory
if (substr($p_header['filename'], -1) == '/') {
//$p_header['external'] = 0x41FF0010;
$p_header['external'] = 0x00000010;
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privCheckFileHeaders()
// Description :
// Parameters :
// Return Values :
// 1 on success,
// 0 on error;
// --------------------------------------------------------------------------------
function privCheckFileHeaders(&$p_local_header, &$p_central_header)
{
$v_result=1;
// ----- Check the static values
// TBC
if ($p_local_header['filename'] != $p_central_header['filename']) {
}
if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) {
}
if ($p_local_header['flag'] != $p_central_header['flag']) {
}
if ($p_local_header['compression'] != $p_central_header['compression']) {
}
if ($p_local_header['mtime'] != $p_central_header['mtime']) {
}
if ($p_local_header['filename_len'] != $p_central_header['filename_len']) {
}
// ----- Look for flag bit 3
if (($p_local_header['flag'] & 8) == 8) {
$p_local_header['size'] = $p_central_header['size'];
$p_local_header['compressed_size'] = $p_central_header['compressed_size'];
$p_local_header['crc'] = $p_central_header['crc'];
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privReadEndCentralDir()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privReadEndCentralDir(&$p_central_dir)
{
$v_result=1;
// ----- Go to the end of the zip file
$v_size = filesize($this->zipname);
@fseek($this->zip_fd, $v_size);
if (@ftell($this->zip_fd) != $v_size)
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\'');
// ----- Return
return PclZip::errorCode();
}
// ----- First try : look if this is an archive with no commentaries (most of the time)
// in this case the end of central dir is at 22 bytes of the file end
$v_found = 0;
if ($v_size > 26) {
@fseek($this->zip_fd, $v_size-22);
if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22))
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
// ----- Return
return PclZip::errorCode();
}
// ----- Read for bytes
$v_binary_data = @fread($this->zip_fd, 4);
$v_data = @unpack('Vid', $v_binary_data);
// ----- Check signature
if ($v_data['id'] == 0x06054b50) {
$v_found = 1;
}
$v_pos = ftell($this->zip_fd);
}
// ----- Go back to the maximum possible size of the Central Dir End Record
if (!$v_found) {
$v_maximum_size = 65557; // 0xFFFF + 22;
if ($v_maximum_size > $v_size)
$v_maximum_size = $v_size;
@fseek($this->zip_fd, $v_size-$v_maximum_size);
if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size))
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
// ----- Return
return PclZip::errorCode();
}
// ----- Read byte per byte in order to find the signature
$v_pos = ftell($this->zip_fd);
$v_bytes = 0x00000000;
while ($v_pos < $v_size)
{
// ----- Read a byte
$v_byte = @fread($this->zip_fd, 1);
// ----- Add the byte
//$v_bytes = ($v_bytes << 8) | Ord($v_byte);
// Note we mask the old value down such that once shifted we can never end up with more than a 32bit number
// Otherwise on systems where we have 64bit integers the check below for the magic number will fail.
$v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte);
// ----- Compare the bytes
if ($v_bytes == 0x504b0506)
{
$v_pos++;
break;
}
$v_pos++;
}
// ----- Look if not found end of central dir
if ($v_pos == $v_size)
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature");
// ----- Return
return PclZip::errorCode();
}
}
// ----- Read the first 18 bytes of the header
$v_binary_data = fread($this->zip_fd, 18);
// ----- Look for invalid block size
if (strlen($v_binary_data) != 18)
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
// ----- Return
return PclZip::errorCode();
}
// ----- Extract the values
$v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data);
// ----- Check the global size
if (($v_pos + $v_data['comment_size'] + 18) != $v_size) {
// ----- Removed in release 2.2 see readme file
// The check of the file size is a little too strict.
// Some bugs where found when a zip is encrypted/decrypted with 'crypt'.
// While decrypted, zip has training 0 bytes
if (0) {
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT,
'The central dir is not at the end of the archive.'
.' Some trailing bytes exists after the archive.');
// ----- Return
return PclZip::errorCode();
}
}
// ----- Get comment
if ($v_data['comment_size'] != 0) {
$p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']);
}
else
$p_central_dir['comment'] = '';
$p_central_dir['entries'] = $v_data['entries'];
$p_central_dir['disk_entries'] = $v_data['disk_entries'];
$p_central_dir['offset'] = $v_data['offset'];
$p_central_dir['size'] = $v_data['size'];
$p_central_dir['disk'] = $v_data['disk'];
$p_central_dir['disk_start'] = $v_data['disk_start'];
// TBC
//for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) {
//}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privDeleteByRule()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privDeleteByRule(&$p_result_list, &$p_options)
{
$v_result=1;
$v_list_detail = array();
// ----- Open the zip file
if (($v_result=$this->privOpenFd('rb')) != 1)
{
// ----- Return
return $v_result;
}
// ----- Read the central directory informations
$v_central_dir = array();
if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
{
$this->privCloseFd();
return $v_result;
}
// ----- Go to beginning of File
@rewind($this->zip_fd);
// ----- Scan all the files
// ----- Start at beginning of Central Dir
$v_pos_entry = $v_central_dir['offset'];
@rewind($this->zip_fd);
if (@fseek($this->zip_fd, $v_pos_entry))
{
// ----- Close the zip file
$this->privCloseFd();
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
// ----- Return
return PclZip::errorCode();
}
// ----- Read each entry
$v_header_list = array();
$j_start = 0;
for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
{
// ----- Read the file header
$v_header_list[$v_nb_extracted] = array();
if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1)
{
// ----- Close the zip file
$this->privCloseFd();
return $v_result;
}
// ----- Store the index
$v_header_list[$v_nb_extracted]['index'] = $i;
// ----- Look for the specific extract rules
$v_found = false;
// ----- Look for extract by name rule
if ( (isset($p_options[PCLZIP_OPT_BY_NAME]))
&& ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
// ----- Look if the filename is in the list
for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_found); $j++) {
// ----- Look for a directory
if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
// ----- Look if the directory is in the filename path
if ( (strlen($v_header_list[$v_nb_extracted]['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
&& (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
$v_found = true;
}
elseif ( (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */
&& ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
$v_found = true;
}
}
// ----- Look for a filename
elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
$v_found = true;
}
}
}
// ----- Look for extract by ereg rule
// ereg() is deprecated with PHP 5.3
/*
else if ( (isset($p_options[PCLZIP_OPT_BY_EREG]))
&& ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
$v_found = true;
}
}
*/
// ----- Look for extract by preg rule
else if ( (isset($p_options[PCLZIP_OPT_BY_PREG]))
&& ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
$v_found = true;
}
}
// ----- Look for extract by index rule
else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX]))
&& ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
// ----- Look if the index is in the list
for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_found); $j++) {
if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
$v_found = true;
}
if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
$j_start = $j+1;
}
if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
break;
}
}
}
else {
$v_found = true;
}
// ----- Look for deletion
if ($v_found)
{
unset($v_header_list[$v_nb_extracted]);
}
else
{
$v_nb_extracted++;
}
}
// ----- Look if something need to be deleted
if ($v_nb_extracted > 0) {
// ----- Creates a temporay file
$v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
// ----- Creates a temporary zip archive
$v_temp_zip = new PclZip($v_zip_temp_name);
// ----- Open the temporary zip file in write mode
if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) {
$this->privCloseFd();
// ----- Return
return $v_result;
}
// ----- Look which file need to be kept
for ($i=0; $i<sizeof($v_header_list); $i++) {
// ----- Calculate the position of the header
@rewind($this->zip_fd);
if (@fseek($this->zip_fd, $v_header_list[$i]['offset'])) {
// ----- Close the zip file
$this->privCloseFd();
$v_temp_zip->privCloseFd();
@unlink($v_zip_temp_name);
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
// ----- Return
return PclZip::errorCode();
}
// ----- Read the file header
$v_local_header = array();
if (($v_result = $this->privReadFileHeader($v_local_header)) != 1) {
// ----- Close the zip file
$this->privCloseFd();
$v_temp_zip->privCloseFd();
@unlink($v_zip_temp_name);
// ----- Return
return $v_result;
}
// ----- Check that local file header is same as central file header
if ($this->privCheckFileHeaders($v_local_header,
$v_header_list[$i]) != 1) {
// TBC
}
unset($v_local_header);
// ----- Write the file header
if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) {
// ----- Close the zip file
$this->privCloseFd();
$v_temp_zip->privCloseFd();
@unlink($v_zip_temp_name);
// ----- Return
return $v_result;
}
// ----- Read/write the data block
if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) {
// ----- Close the zip file
$this->privCloseFd();
$v_temp_zip->privCloseFd();
@unlink($v_zip_temp_name);
// ----- Return
return $v_result;
}
}
// ----- Store the offset of the central dir
$v_offset = @ftell($v_temp_zip->zip_fd);
// ----- Re-Create the Central Dir files header
for ($i=0; $i<sizeof($v_header_list); $i++) {
// ----- Create the file header
if (($v_result = $v_temp_zip->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
$v_temp_zip->privCloseFd();
$this->privCloseFd();
@unlink($v_zip_temp_name);
// ----- Return
return $v_result;
}
// ----- Transform the header to a 'usable' info
$v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
}
// ----- Zip file comment
$v_comment = '';
if (isset($p_options[PCLZIP_OPT_COMMENT])) {
$v_comment = $p_options[PCLZIP_OPT_COMMENT];
}
// ----- Calculate the size of the central header
$v_size = @ftell($v_temp_zip->zip_fd)-$v_offset;
// ----- Create the central dir footer
if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) {
// ----- Reset the file list
unset($v_header_list);
$v_temp_zip->privCloseFd();
$this->privCloseFd();
@unlink($v_zip_temp_name);
// ----- Return
return $v_result;
}
// ----- Close
$v_temp_zip->privCloseFd();
$this->privCloseFd();
// ----- Delete the zip file
// TBC : I should test the result ...
@unlink($this->zipname);
// ----- Rename the temporary file
// TBC : I should test the result ...
//@rename($v_zip_temp_name, $this->zipname);
PclZipUtilRename($v_zip_temp_name, $this->zipname);
// ----- Destroy the temporary archive
unset($v_temp_zip);
}
// ----- Remove every files : reset the file
else if ($v_central_dir['entries'] != 0) {
$this->privCloseFd();
if (($v_result = $this->privOpenFd('wb')) != 1) {
return $v_result;
}
if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) {
return $v_result;
}
$this->privCloseFd();
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privDirCheck()
// Description :
// Check if a directory exists, if not it creates it and all the parents directory
// which may be useful.
// Parameters :
// $p_dir : Directory path to check.
// Return Values :
// 1 : OK
// -1 : Unable to create directory
// --------------------------------------------------------------------------------
function privDirCheck($p_dir, $p_is_dir=false)
{
$v_result = 1;
// ----- Remove the final '/'
if (($p_is_dir) && (substr($p_dir, -1)=='/'))
{
$p_dir = substr($p_dir, 0, strlen($p_dir)-1);
}
// ----- Check the directory availability
if ((is_dir($p_dir)) || ($p_dir == ""))
{
return 1;
}
// ----- Extract parent directory
$p_parent_dir = dirname($p_dir);
// ----- Just a check
if ($p_parent_dir != $p_dir)
{
// ----- Look for parent directory
if ($p_parent_dir != "")
{
if (($v_result = $this->privDirCheck($p_parent_dir)) != 1)
{
return $v_result;
}
}
}
// ----- Create the directory
if (!@mkdir($p_dir, 0777))
{
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'");
// ----- Return
return PclZip::errorCode();
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privMerge()
// Description :
// If $p_archive_to_add does not exist, the function exit with a success result.
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privMerge(&$p_archive_to_add)
{
$v_result=1;
// ----- Look if the archive_to_add exists
if (!is_file($p_archive_to_add->zipname))
{
// ----- Nothing to merge, so merge is a success
$v_result = 1;
// ----- Return
return $v_result;
}
// ----- Look if the archive exists
if (!is_file($this->zipname))
{
// ----- Do a duplicate
$v_result = $this->privDuplicate($p_archive_to_add->zipname);
// ----- Return
return $v_result;
}
// ----- Open the zip file
if (($v_result=$this->privOpenFd('rb')) != 1)
{
// ----- Return
return $v_result;
}
// ----- Read the central directory informations
$v_central_dir = array();
if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
{
$this->privCloseFd();
return $v_result;
}
// ----- Go to beginning of File
@rewind($this->zip_fd);
// ----- Open the archive_to_add file
if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1)
{
$this->privCloseFd();
// ----- Return
return $v_result;
}
// ----- Read the central directory informations
$v_central_dir_to_add = array();
if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1)
{
$this->privCloseFd();
$p_archive_to_add->privCloseFd();
return $v_result;
}
// ----- Go to beginning of File
@rewind($p_archive_to_add->zip_fd);
// ----- Creates a temporay file
$v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
// ----- Open the temporary file in write mode
if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
{
$this->privCloseFd();
$p_archive_to_add->privCloseFd();
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
// ----- Return
return PclZip::errorCode();
}
// ----- Copy the files from the archive to the temporary file
// TBC : Here I should better append the file and go back to erase the central dir
$v_size = $v_central_dir['offset'];
while ($v_size != 0)
{
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = fread($this->zip_fd, $v_read_size);
@fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Copy the files from the archive_to_add into the temporary file
$v_size = $v_central_dir_to_add['offset'];
while ($v_size != 0)
{
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size);
@fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Store the offset of the central dir
$v_offset = @ftell($v_zip_temp_fd);
// ----- Copy the block of file headers from the old archive
$v_size = $v_central_dir['size'];
while ($v_size != 0)
{
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @fread($this->zip_fd, $v_read_size);
@fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Copy the block of file headers from the archive_to_add
$v_size = $v_central_dir_to_add['size'];
while ($v_size != 0)
{
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size);
@fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Merge the file comments
$v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment'];
// ----- Calculate the size of the (new) central header
$v_size = @ftell($v_zip_temp_fd)-$v_offset;
// ----- Swap the file descriptor
// Here is a trick : I swap the temporary fd with the zip fd, in order to use
// the following methods on the temporary fil and not the real archive fd
$v_swap = $this->zip_fd;
$this->zip_fd = $v_zip_temp_fd;
$v_zip_temp_fd = $v_swap;
// ----- Create the central dir footer
if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1)
{
$this->privCloseFd();
$p_archive_to_add->privCloseFd();
@fclose($v_zip_temp_fd);
$this->zip_fd = null;
// ----- Reset the file list
unset($v_header_list);
// ----- Return
return $v_result;
}
// ----- Swap back the file descriptor
$v_swap = $this->zip_fd;
$this->zip_fd = $v_zip_temp_fd;
$v_zip_temp_fd = $v_swap;
// ----- Close
$this->privCloseFd();
$p_archive_to_add->privCloseFd();
// ----- Close the temporary file
@fclose($v_zip_temp_fd);
// ----- Delete the zip file
// TBC : I should test the result ...
@unlink($this->zipname);
// ----- Rename the temporary file
// TBC : I should test the result ...
//@rename($v_zip_temp_name, $this->zipname);
PclZipUtilRename($v_zip_temp_name, $this->zipname);
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privDuplicate()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privDuplicate($p_archive_filename)
{
$v_result=1;
// ----- Look if the $p_archive_filename exists
if (!is_file($p_archive_filename))
{
// ----- Nothing to duplicate, so duplicate is a success.
$v_result = 1;
// ----- Return
return $v_result;
}
// ----- Open the zip file
if (($v_result=$this->privOpenFd('wb')) != 1)
{
// ----- Return
return $v_result;
}
// ----- Open the temporary file in write mode
if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0)
{
$this->privCloseFd();
PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode');
// ----- Return
return PclZip::errorCode();
}
// ----- Copy the files from the archive to the temporary file
// TBC : Here I should better append the file and go back to erase the central dir
$v_size = filesize($p_archive_filename);
while ($v_size != 0)
{
$v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = fread($v_zip_temp_fd, $v_read_size);
@fwrite($this->zip_fd, $v_buffer, $v_read_size);
$v_size -= $v_read_size;
}
// ----- Close
$this->privCloseFd();
// ----- Close the temporary file
@fclose($v_zip_temp_fd);
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privErrorLog()
// Description :
// Parameters :
// --------------------------------------------------------------------------------
function privErrorLog($p_error_code=0, $p_error_string='')
{
if (PCLZIP_ERROR_EXTERNAL == 1) {
PclError($p_error_code, $p_error_string);
}
else {
$this->error_code = $p_error_code;
$this->error_string = $p_error_string;
}
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privErrorReset()
// Description :
// Parameters :
// --------------------------------------------------------------------------------
function privErrorReset()
{
if (PCLZIP_ERROR_EXTERNAL == 1) {
PclErrorReset();
}
else {
$this->error_code = 0;
$this->error_string = '';
}
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privDisableMagicQuotes()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privDisableMagicQuotes()
{
$v_result=1;
// ----- Look if function exists
if ( (!function_exists("get_magic_quotes_runtime"))
|| (!function_exists("set_magic_quotes_runtime"))) {
return $v_result;
}
// ----- Look if already done
if ($this->magic_quotes_status != -1) {
return $v_result;
}
// ----- Get and memorize the magic_quote value
$this->magic_quotes_status = @get_magic_quotes_runtime();
// ----- Disable magic_quotes
if ($this->magic_quotes_status == 1) {
@set_magic_quotes_runtime(0);
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : privSwapBackMagicQuotes()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function privSwapBackMagicQuotes()
{
$v_result=1;
// ----- Look if function exists
if ( (!function_exists("get_magic_quotes_runtime"))
|| (!function_exists("set_magic_quotes_runtime"))) {
return $v_result;
}
// ----- Look if something to do
if ($this->magic_quotes_status != -1) {
return $v_result;
}
// ----- Swap back magic_quotes
if ($this->magic_quotes_status == 1) {
@set_magic_quotes_runtime($this->magic_quotes_status);
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
}
// End of class
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : PclZipUtilPathReduction()
// Description :
// Parameters :
// Return Values :
// --------------------------------------------------------------------------------
function PclZipUtilPathReduction($p_dir)
{
$v_result = "";
// ----- Look for not empty path
if ($p_dir != "") {
// ----- Explode path by directory names
$v_list = explode("/", $p_dir);
// ----- Study directories from last to first
$v_skip = 0;
for ($i=sizeof($v_list)-1; $i>=0; $i--) {
// ----- Look for current path
if ($v_list[$i] == ".") {
// ----- Ignore this directory
// Should be the first $i=0, but no check is done
}
else if ($v_list[$i] == "..") {
$v_skip++;
}
else if ($v_list[$i] == "") {
// ----- First '/' i.e. root slash
if ($i == 0) {
$v_result = "/".$v_result;
if ($v_skip > 0) {
// ----- It is an invalid path, so the path is not modified
// TBC
$v_result = $p_dir;
$v_skip = 0;
}
}
// ----- Last '/' i.e. indicates a directory
else if ($i == (sizeof($v_list)-1)) {
$v_result = $v_list[$i];
}
// ----- Double '/' inside the path
else {
// ----- Ignore only the double '//' in path,
// but not the first and last '/'
}
}
else {
// ----- Look for item to skip
if ($v_skip > 0) {
$v_skip--;
}
else {
$v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:"");
}
}
}
// ----- Look for skip
if ($v_skip > 0) {
while ($v_skip > 0) {
$v_result = '../'.$v_result;
$v_skip--;
}
}
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : PclZipUtilPathInclusion()
// Description :
// This function indicates if the path $p_path is under the $p_dir tree. Or,
// said in an other way, if the file or sub-dir $p_path is inside the dir
// $p_dir.
// The function indicates also if the path is exactly the same as the dir.
// This function supports path with duplicated '/' like '//', but does not
// support '.' or '..' statements.
// Parameters :
// Return Values :
// 0 if $p_path is not inside directory $p_dir
// 1 if $p_path is inside directory $p_dir
// 2 if $p_path is exactly the same as $p_dir
// --------------------------------------------------------------------------------
function PclZipUtilPathInclusion($p_dir, $p_path)
{
$v_result = 1;
// ----- Look for path beginning by ./
if ( ($p_dir == '.')
|| ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) {
$p_dir = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_dir, 1);
}
if ( ($p_path == '.')
|| ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) {
$p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1);
}
// ----- Explode dir and path by directory separator
$v_list_dir = explode("/", $p_dir);
$v_list_dir_size = sizeof($v_list_dir);
$v_list_path = explode("/", $p_path);
$v_list_path_size = sizeof($v_list_path);
// ----- Study directories paths
$i = 0;
$j = 0;
while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) {
// ----- Look for empty dir (path reduction)
if ($v_list_dir[$i] == '') {
$i++;
continue;
}
if ($v_list_path[$j] == '') {
$j++;
continue;
}
// ----- Compare the items
if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != '')) {
$v_result = 0;
}
// ----- Next items
$i++;
$j++;
}
// ----- Look if everything seems to be the same
if ($v_result) {
// ----- Skip all the empty items
while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++;
while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++;
if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) {
// ----- There are exactly the same
$v_result = 2;
}
else if ($i < $v_list_dir_size) {
// ----- The path is shorter than the dir
$v_result = 0;
}
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : PclZipUtilCopyBlock()
// Description :
// Parameters :
// $p_mode : read/write compression mode
// 0 : src & dest normal
// 1 : src gzip, dest normal
// 2 : src normal, dest gzip
// 3 : src & dest gzip
// Return Values :
// --------------------------------------------------------------------------------
function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0)
{
$v_result = 1;
if ($p_mode==0)
{
while ($p_size != 0)
{
$v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @fread($p_src, $v_read_size);
@fwrite($p_dest, $v_buffer, $v_read_size);
$p_size -= $v_read_size;
}
}
else if ($p_mode==1)
{
while ($p_size != 0)
{
$v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @gzread($p_src, $v_read_size);
@fwrite($p_dest, $v_buffer, $v_read_size);
$p_size -= $v_read_size;
}
}
else if ($p_mode==2)
{
while ($p_size != 0)
{
$v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @fread($p_src, $v_read_size);
@gzwrite($p_dest, $v_buffer, $v_read_size);
$p_size -= $v_read_size;
}
}
else if ($p_mode==3)
{
while ($p_size != 0)
{
$v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
$v_buffer = @gzread($p_src, $v_read_size);
@gzwrite($p_dest, $v_buffer, $v_read_size);
$p_size -= $v_read_size;
}
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : PclZipUtilRename()
// Description :
// This function tries to do a simple rename() function. If it fails, it
// tries to copy the $p_src file in a new $p_dest file and then unlink the
// first one.
// Parameters :
// $p_src : Old filename
// $p_dest : New filename
// Return Values :
// 1 on success, 0 on failure.
// --------------------------------------------------------------------------------
function PclZipUtilRename($p_src, $p_dest)
{
$v_result = 1;
// ----- Try to rename the files
if (!@rename($p_src, $p_dest)) {
// ----- Try to copy & unlink the src
if (!@copy($p_src, $p_dest)) {
$v_result = 0;
}
else if (!@unlink($p_src)) {
$v_result = 0;
}
}
// ----- Return
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : PclZipUtilOptionText()
// Description :
// Translate option value in text. Mainly for debug purpose.
// Parameters :
// $p_option : the option value.
// Return Values :
// The option text value.
// --------------------------------------------------------------------------------
function PclZipUtilOptionText($p_option)
{
$v_list = get_defined_constants();
for (reset($v_list); $v_key = key($v_list); next($v_list)) {
$v_prefix = substr($v_key, 0, 10);
if (( ($v_prefix == 'PCLZIP_OPT')
|| ($v_prefix == 'PCLZIP_CB_')
|| ($v_prefix == 'PCLZIP_ATT'))
&& ($v_list[$v_key] == $p_option)) {
return $v_key;
}
}
$v_result = 'Unknown';
return $v_result;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function : PclZipUtilTranslateWinPath()
// Description :
// Translate windows path by replacing '\' by '/' and optionally removing
// drive letter.
// Parameters :
// $p_path : path to translate.
// $p_remove_disk_letter : true | false
// Return Values :
// The path translated.
// --------------------------------------------------------------------------------
function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true)
{
if (stristr(php_uname(), 'windows')) {
// ----- Look for potential disk letter
if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) {
$p_path = substr($p_path, $v_position+1);
}
// ----- Change potential windows directory separator
if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) {
$p_path = strtr($p_path, '\\', '/');
}
}
return $p_path;
}
// --------------------------------------------------------------------------------
?>
|
108wo
|
phpcms/modules/upgrade/classes/pclzip.class.php
|
PHP
|
asf20
| 202,844
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
return '';
?>
|
108wo
|
phpcms/modules/upgrade/install/model.php
|
PHP
|
asf20
| 117
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
$parentid = $menu_db->insert(array('name'=>'upgrade', 'parentid'=>977, 'm'=>'upgrade', 'c'=>'index', 'a'=>'init', 'data'=>'', 'listorder'=>0, 'display'=>'1'), true);
$menu_db->insert(array('name'=>'checkfile', 'parentid'=>$parentid, 'm'=>'upgrade', 'c'=>'index', 'a'=>'checkfile', 'data'=>'', 'listorder'=>0, 'display'=>'1'));
$language = array('upgrade'=>'在线升级', 'checkfile'=>'文件校验');
?>
|
108wo
|
phpcms/modules/upgrade/install/extention.inc.php
|
PHP
|
asf20
| 510
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
$module = 'upgrade';
$modulename = '在线升级';
$introduce = '在线升级';
$author = 'phpcms Team';
$authorsite = 'http://www.phpcms.cn';
$authoremail = 'admin@phpcms.cn';
?>
|
108wo
|
phpcms/modules/upgrade/install/config.inc.php
|
PHP
|
asf20
| 287
|
<?php
$LANG['operation'] = '操作';
$LANG['view'] = '查看';
$LANG['access'] = '访问';
$LANG['upgrade'] = '在线升级';
$LANG['checkfile'] = '文件校验';
$LANG['updatetime'] = '更新日期';
$LANG['updatelist'] = '可升级版本列表';
$LANG['currentversion'] = '当前版本';
$LANG['lastversion'] = '为最新版';
$LANG['covertemplate'] = '覆盖模版?';
$LANG['view_code'] = '查看代码';
$LANG['modifyfile'] = '修改过的文件';
$LANG['lastmodifytime'] = '最后修改时间';
$LANG['modifyedfile'] = '被修改文件';
$LANG['lostfile'] = '丢失文件';
$LANG['unknowfile'] = '未知文件';
$LANG['filesize'] = '文件大小';
$LANG['begin_checkfile'] = '开始校验文件,请稍候';
$LANG['begin_upgrade'] = '开始升级';
$LANG['upgradeing'] = '正在升级';
$LANG['upgrade_success'] = '升级成功!';
$LANG['lost'] = '丢失';
$LANG['file_address'] = '文件地址';
$LANG['please_check_filepri'] = '复制文件失败,请检查目录权限';
$LANG['check_file_notice'] = '注意:文件校验为根目录下所有文件以及phpcms、api、statics三个文件夹下所有目录和文件与默认程序同名文件md5值对比的结果,如果异常请用木马扫描工具扫描该文件是否包含木马';
$LANG['upgrade_notice'] = '注意:升级程序有可能覆盖模版文件,请注意备份!linux服务器需检查文件所有者权限和组权限,确保WEB SERVER用户有文件写入权限';
|
108wo
|
phpcms/modules/upgrade/install/languages/zh-cn/upgrade.lang.php
|
PHP
|
asf20
| 1,483
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
//模型缓存路径
define('CACHE_MODEL_PATH',PHPCMS_PATH.'caches'.DIRECTORY_SEPARATOR.'caches_model'.DIRECTORY_SEPARATOR.'caches_data'.DIRECTORY_SEPARATOR);
pc_base::load_app_class('admin', 'admin', 0);
pc_base::load_sys_class('form', '', 0);
class node extends admin {
private $db,$siteid;
//HTML标签
private static $html_tag = array("<p([^>]*)>(.*)</p>[|]"=>'<p>', "<a([^>]*)>(.*)</a>[|]"=>'<a>',"<script([^>]*)>(.*)</script>[|]"=>'<script>', "<iframe([^>]*)>(.*)</iframe>[|]"=>'<iframe>', "<table([^>]*)>(.*)</table>[|]"=>'<table>', "<span([^>]*)>(.*)</span>[|]"=>'<span>', "<b([^>]*)>(.*)</b>[|]"=>'<b>', "<img([^>]*)>[|]"=>'<img>', "<object([^>]*)>(.*)</object>[|]"=>'<object>', "<embed([^>]*)>(.*)</embed>[|]"=>'<embed>', "<param([^>]*)>(.*)</param>[|]"=>'<param>', '<div([^>]*)>[|]'=>'<div>', '</div>[|]'=>'</div>', '<!--([^>]*)-->[|]'=>'<!-- -->');
//网址类型
private $url_list_type = array();
function __construct() {
parent::__construct();
$this->db = pc_base::load_model('collection_node_model');
$this->siteid = get_siteid();
$this->url_list_type = array('1'=>L('sequence'), '2'=>L('multiple_pages'), '3'=>L('single_page'), '4'=>'RSS');
}
/**
* node list
*/
public function manage() {
$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
$nodelist = $this->db->listinfo(array('siteid'=>$this->get_siteid()), 'nodeid DESC', $page, 15);
$pages = $this->db->pages;
pc_base::load_sys_class('format', '', 0);
include $this->admin_tpl('node_list');
}
/**
* add node
*/
public function add() {
header("Cache-control: private");
if(isset($_POST['dosubmit'])) {
$data = isset($_POST['data']) ? $_POST['data'] : showmessage(L('illegal_parameters'), HTTP_REFERER);
$customize_config = isset($_POST['customize_config']) ? $_POST['customize_config'] : '';
if (!$data['name'] = trim($data['name'])) {
showmessage(L('nodename').L('empty'), HTTP_REFERER);
}
if ($this->db->get_one(array('name'=>$data['name']))) {
showmessage(L('nodename').L('exists'), HTTP_REFERER);
}
$data['urlpage'] = isset($_POST['urlpage'.$data['sourcetype']]) ? $_POST['urlpage'.$data['sourcetype']] : showmessage(L('illegal_parameters'), HTTP_REFERER);
$data['siteid']= $this->get_siteid();
$data['customize_config'] = array();
if (is_array($customize_config)) foreach ($customize_config['en_name'] as $k => $v) {
if (empty($v) || empty($customize_config['name'][$k])) continue;
$data['customize_config'][] = array('name'=>$customize_config['name'][$k], 'en_name'=>$v, 'rule'=>$customize_config['rule'][$k], 'html_rule'=>$customize_config['html_rule'][$k]);
}
$data['customize_config'] = array2string($data['customize_config']);
if ($this->db->insert($data)) {
showmessage(L('operation_success'), '?m=collection&c=node&a=manage');
} else {
showmessage(L('operation_failure'), HTTP_REFERER);
}
} else {
$show_dialog = $show_validator = true;
include $this->admin_tpl('node_form');
}
}
//修改采集配置
public function edit() {
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
$data = $this->db->get_one(array('nodeid'=>$nodeid));
if(isset($_POST['dosubmit'])) {
$datas = $data;
unset($data);
$data = isset($_POST['data']) ? $_POST['data'] : showmessage(L('illegal_parameters'), HTTP_REFERER);
$customize_config = isset($_POST['customize_config']) ? $_POST['customize_config'] : '';
if (!$data['name'] = trim($data['name'])) {
showmessage(L('nodename').L('empty'), HTTP_REFERER);
}
if ($datas['name'] != $data['name']) {
if ($this->db->get_one(array('name'=>$data['name']))) {
showmessage(L('nodename').L('exists'), HTTP_REFERER);
}
}
$data['urlpage'] = isset($_POST['urlpage'.$data['sourcetype']]) ? $_POST['urlpage'.$data['sourcetype']] : showmessage(L('illegal_parameters'), HTTP_REFERER);
$data['customize_config'] = array();
if (is_array($customize_config)) foreach ($customize_config['en_name'] as $k => $v) {
if (empty($v) || empty($customize_config['name'][$k])) continue;
$data['customize_config'][] = array('name'=>$customize_config['name'][$k], 'en_name'=>$v, 'rule'=>$customize_config['rule'][$k], 'html_rule'=>$customize_config['html_rule'][$k]);
}
$data['customize_config'] = array2string($data['customize_config']);
if ($this->db->update($data, array('nodeid'=>$nodeid))) {
showmessage(L('operation_success'), '?m=collection&c=node&a=manage');
} else {
showmessage(L('operation_failure'), HTTP_REFERER);
}
} else {
$model_cache = getcache('model', 'commons');
$siteid = get_siteid();
foreach($model_cache as $k=>$v) {
$modellist[0] = L('select_model');
if($v['siteid'] == $siteid) {
$modellist[$k] = $v['name'];
}
}
if (isset($data['customize_config'])) {
$data['customize_config'] = string2array($data['customize_config']);
}
$show_dialog = $show_validator = true;
//print_r($nodeinfo);exit;
include $this->admin_tpl('node_form');
}
}
//复制采集
public function copy() {
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
if ($data = $this->db->get_one(array('nodeid'=>$nodeid))) {
if (isset($_POST['dosubmit'])) {
unset($data['nodeid']);
$name = isset($_POST['name']) && trim($_POST['name']) ? trim($_POST['name']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
if ($this->db->get_one(array('name'=>$name), 'nodeid')) {
showmessage(L('nodename').L('exists'), HTTP_REFERER);
}
$data['name'] = $name;
$data = new_addslashes($data);
if ($this->db->insert($data)) {
showmessage(L('operation_success'), '', '', 'test');
} else {
showmessage(L('operation_failure'));
}
} else {
$show_validator = $show_header = true;
include $this->admin_tpl('node_copy');
}
} else {
showmessage(L('notfound'));
}
}
//导入采集点
public function node_import() {
if (isset($_POST['dosubmit'])) {
$filename = $_FILES['file']['tmp_name'];
if (strtolower(substr($_FILES['file']['name'], -3, 3)) != 'txt') {
showmessage(L('only_allowed_to_upload_txt_files'), HTTP_REFERER);
}
$data = json_decode(base64_decode(file_get_contents($filename)), true);
if (pc_base::load_config('system', 'charset') == 'gbk') {
$data = array_iconv($data, 'utf-8', 'gbk');
}
@unlink($filename);
$name = isset($_POST['name']) && trim($_POST['name']) ? trim($_POST['name']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
if ($this->db->get_one(array('name'=>$name), 'nodeid')) {
showmessage(L('nodename').L('exists'), HTTP_REFERER);
}
$data['name'] = $name;
$data['siteid'] = $this->get_siteid();
$data = new_addslashes($data);
if ($this->db->insert($data)) {
showmessage(L('operation_success'), '', '', 'test');
} else {
showmessage(L('operation_failure'));
}
} else {
$show_header = $show_validator = true;
include $this->admin_tpl('node_import');
}
}
//导出采集配置
public function export() {
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
if ($data = $this->db->get_one(array('nodeid'=>$nodeid))) {
unset($data['nodeid'], $data['name'], $data['siteid']);
if (pc_base::load_config('system', 'charset') == 'gbk') {
$data = array_iconv($data);
}
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=pc_collection_".$nodeid.'.txt');
echo base64_encode(json_encode($data));
} else {
showmessage(L('notfound'));
}
}
//URL配置显示结果
public function public_url() {
$sourcetype = isset($_GET['sourcetype']) && intval($_GET['sourcetype']) ? intval($_GET['sourcetype']) : showmessage(L('illegal_parameters'));
$pagesize_start = isset($_GET['pagesize_start']) && intval($_GET['pagesize_start']) ? intval($_GET['pagesize_start']) : 1;
$pagesize_end = isset($_GET['pagesize_end']) && intval($_GET['pagesize_end']) ? intval($_GET['pagesize_end']) : 10;
$par_num = isset($_GET['par_num']) && intval($_GET['par_num']) ? intval($_GET['par_num']) : 1;
$urlpage = isset($_GET['urlpage']) && trim($_GET['urlpage']) ? trim($_GET['urlpage']) : showmessage(L('illegal_parameters'));
$show_header = true;
include $this->admin_tpl('node_public_url');
}
//删除采集节点
public function del() {
if (isset($_POST['dosubmit'])) {
$nodeid = isset($_POST['nodeid']) ? $_POST['nodeid'] : showmessage(L('illegal_parameters'), HTTP_REFERER);
foreach ($nodeid as $k=>$v) {
if(intval($v)) {
$nodeid[$k] = intval($v);
} else {
unset($nodeid[$k]);
}
}
$nodeid = implode('\',\'', $nodeid);
$this->db->delete("nodeid in ('$nodeid')");
$content_db = pc_base::load_model('collection_content_model');
$content_db->delete("nodeid in ('$nodeid')");
showmessage(L('operation_success'), '?m=collection&c=node&a=manage');
} else {
showmessage(L('illegal_parameters'), HTTP_REFERER);
}
}
//测试文章URL采集
public function public_test() {
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
pc_base::load_app_class('collection', '', 0);
if ($data = $this->db->get_one(array('nodeid'=>$nodeid))) {
$urls = collection::url_list($data, 1);
if (!empty($urls)) foreach ($urls as $v) {
$url = collection::get_url_lists($v, $data);
}
$show_header = $show_dialog = true;
include $this->admin_tpl('public_test');
} else {
showmessage(L('notfound'));
}
}
//测试文章内容采集
public function public_test_content() {
$url = isset($_GET['url']) ? urldecode($_GET['url']) : exit('0');
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
pc_base::load_app_class('collection', '', 0);
if ($data = $this->db->get_one(array('nodeid'=>$nodeid))) {
print_r(collection::get_content($url, $data));
} else {
showmessage(L('notfound'));
}
}
//采集节点名验证
public function public_name() {
$name = isset($_GET['name']) && trim($_GET['name']) ? (pc_base::load_config('system', 'charset') == 'gbk' ? iconv('utf-8', 'gbk', trim($_GET['name'])) : trim($_GET['name'])) : exit('0');
$nodeid = isset($_GET['nodeid']) && intval($_GET['nodeid']) ? intval($_GET['nodeid']) : '';
$data = array();
if ($nodeid) {
$data = $this->db->get_one(array('nodeid'=>$nodeid), 'name');
if (!empty($data) && $data['name'] == $name) {
exit('1');
}
}
if ($this->db->get_one(array('name'=>$name), 'nodeid')) {
exit('0');
} else {
exit('1');
}
}
//采集网址
public function col_url_list() {
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
if ($data = $this->db->get_one(array('nodeid'=>$nodeid))) {
pc_base::load_app_class('collection', '', 0);
$urls = collection::url_list($data);
$total_page = count($urls);
if ($total_page > 0) {
$page = isset($_GET['page']) ? intval($_GET['page']) : 0;
$url_list = $urls[$page];
$url = collection::get_url_lists($url_list, $data);
$history_db = pc_base::load_model('collection_history_model');
$content_db = pc_base::load_model('collection_content_model');
$total = count($url);
$re = 0;
if (is_array($url) && !empty($url)) foreach ($url as $v) {
if (empty($v['url']) || empty($v['title'])) continue;
$v = new_addslashes($v);
$v['title'] = strip_tags($v['title']);
$md5 = md5($v['url']);
if (!$history_db->get_one(array('md5'=>$md5, 'siteid'=>$this->get_siteid()))) {
$history_db->insert(array('md5'=>$md5, 'siteid'=>$this->get_siteid()));
$content_db->insert(array('nodeid'=>$nodeid, 'status'=>0, 'url'=>$v['url'], 'title'=>$v['title'], 'siteid'=>$this->get_siteid()));
} else {
$re++;
}
}
$show_header = $show_dialog = true;
if ($total_page <= $page) {
$this->db->update(array('lastdate'=>SYS_TIME), array('nodeid'=>$nodeid));
}
include $this->admin_tpl('col_url_list');
} else {
showmessage(L('not_to_collect'));
}
} else {
showmessage(L('notfound'));
}
}
//采集文章
public function col_content() {
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
if ($data = $this->db->get_one(array('nodeid'=>$nodeid))) {
$content_db = pc_base::load_model('collection_content_model');
//更新附件状态
$attach_status = false;
if(pc_base::load_config('system','attachment_stat')) {
$this->attachment_db = pc_base::load_model('attachment_model');
$attach_status = true;
}
pc_base::load_app_class('collection', '', 0);
$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
$total = isset($_GET['total']) ? intval($_GET['total']) : 0;
if (empty($total)) $total = $content_db->count(array('nodeid'=>$nodeid, 'siteid'=>$this->get_siteid(), 'status'=>0));
$total_page = ceil($total/2);
$list = $content_db->select(array('nodeid'=>$nodeid, 'siteid'=>$this->get_siteid(), 'status'=>0), 'id,url', '2', 'id desc');
$i = 0;
if (!empty($list) && is_array($list)) {
foreach ($list as $v) {
$GLOBALS['downloadfiles'] = array();
$html = collection::get_content($v['url'], $data);
//更新附件状态
if($attach_status) {
$this->attachment_db->api_update($GLOBALS['downloadfiles'],'cj-'.$v['id'],1);
}
$content_db->update(array('status'=>1, 'data'=>array2string($html)), array('id'=>$v['id']));
$i++;
}
} else {
showmessage(L('url_collect_msg'), '?m=collection&c=node&a=manage');
}
if ($total_page > $page) {
showmessage(L('collectioning').($i+($page-1)*2).'/'.$total.'<script type="text/javascript">location.href="?m=collection&c=node&a=col_content&page='.($page+1).'&nodeid='.$nodeid.'&total='.$total.'&pc_hash='.$_SESSION['pc_hash'].'"</script>', '?m=collection&c=node&a=col_content&page='.($page+1).'&nodeid='.$nodeid.'&total='.$total);
} else {
$this->db->update(array('lastdate'=>SYS_TIME), array('nodeid'=>$nodeid));
showmessage(L('collection_success'), '?m=collection&c=node&a=manage');
}
}
}
//文章列表
public function publist() {
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
$node = $this->db->get_one(array('nodeid'=>$nodeid), 'name');
$content_db = pc_base::load_model('collection_content_model');
$status = isset($_GET['status']) ? intval($_GET['status']) : '';
$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
$sql = array('nodeid'=>$nodeid, 'siteid'=>$this->get_siteid());
if ($status) {
$sql['status'] = $status - 1;
}
$data = $content_db->listinfo($sql, 'id desc', $page);
$pages = $content_db->pages;
$show_header = true;
include $this->admin_tpl('publist');
}
//导入文章
public function import() {
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
$id = isset($_GET['id']) ? $_GET['id'] : '';
$type = isset($_GET['type']) ? trim($_GET['type']) : '';
if ($type == 'all') {
} else {
$ids = implode(',', $id);
}
$program_db = pc_base::load_model('collection_program_model');
$program_list = $program_db->select(array('nodeid'=>$nodeid, 'siteid'=>$this->get_siteid()), 'id, catid');
$cat = getcache('category_content_'.$this->siteid, 'commons');
include $this->admin_tpl('import_program');
}
//删除文章
public function content_del() {
$id = isset($_GET['id']) ? $_GET['id'] : '';
$history = isset($_GET['history']) ? $_GET['history'] : '';
if (is_array($id)) {
$collection_content_db = pc_base::load_model('collection_content_model');
$history_db = pc_base::load_model('collection_history_model');
$del_array = $id;
$ids = implode('\',\'', $id);
if ($history) {
$data = $collection_content_db->select("id in ('$ids')", 'url');
foreach ($data as $v) {
$list[] = md5($v['url']);
}
$md5 = implode('\',\'', $list);
$history_db->delete("md5 in ('$md5')");
}
$collection_content_db->delete("id in ('$ids')");
//同时删除关联附件
if(!empty($del_array)) {
$attachment = pc_base::load_model('attachment_model');
foreach ($del_array as $id) {
$attachment->api_delete('cj-'.$id);
}
}
showmessage(L('operation_success'), HTTP_REFERER);
}
}
//添加导入方案
public function import_program_add() {
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
$ids = isset($_GET['ids']) ? $_GET['ids'] : '';
$catid = isset($_GET['catid']) && intval($_GET['catid']) ? intval($_GET['catid']) : showmessage(L('please_select_cat'), HTTP_REFERER);
$type = isset($_GET['type']) ? trim($_GET['type']) : '';
include dirname(__FILE__).DIRECTORY_SEPARATOR.'spider_funs'.DIRECTORY_SEPARATOR.'config.php';
//读取栏目缓存
$catlist = getcache('category_content_'.$this->siteid, 'commons');
$cat = $catlist[$catid];
$cat['setting'] = string2array($cat['setting']);
if ($cat['siteid'] != $this->get_siteid() || $cat['type'] != 0) showmessage(L('illegal_section_parameter'), HTTP_REFERER);
if (isset($_POST['dosubmit'])) {
$config = array();
$model_field = isset($_POST['model_field']) ? $_POST['model_field'] : showmessage(L('illegal_parameters'), HTTP_REFERER);
$node_field = isset($_POST['node_field']) ? $_POST['node_field'] : showmessage(L('illegal_parameters'), HTTP_REFERER);
$funcs = isset($_POST['funcs']) ? $_POST['funcs'] : array();
$config['add_introduce'] = isset($_POST['add_introduce']) && intval($_POST['add_introduce']) ? intval($_POST['add_introduce']) : 0;
$config['auto_thumb'] = isset($_POST['auto_thumb']) && intval($_POST['auto_thumb']) ? intval($_POST['auto_thumb']) : 0;
$config['introcude_length'] = isset($_POST['introcude_length']) && intval($_POST['introcude_length']) ? intval($_POST['introcude_length']) : 0;
$config['auto_thumb_no'] = isset($_POST['auto_thumb_no']) && intval($_POST['auto_thumb_no']) ? intval($_POST['auto_thumb_no']) : 0;
$config['content_status'] = isset($_POST['content_status']) && intval($_POST['content_status']) ? intval($_POST['content_status']) : 1;
foreach ($node_field as $k => $v) {
if (empty($v)) continue;
$config['map'][$model_field[$k]] = $v;
}
foreach ($funcs as $k=>$v) {
if (empty($v)) continue;
$config['funcs'][$model_field[$k]] = $v;
}
$data = array('config'=>array2string($config), 'siteid'=>$this->get_siteid(), 'nodeid'=>$nodeid, 'modelid'=>$cat['modelid'], 'catid'=>$catid);
$program_db = pc_base::load_model('collection_program_model');
if ($id = $program_db->insert($data, true)) {
showmessage(L('program_add_operation_success'), '?m=collection&c=node&a=import_content&programid='.$id.'&nodeid='.$nodeid.'&ids='.$ids.'&type='.$type);
} else {
showmessage(L('illegal_parameters'));
}
}
//读取数据模型缓存
$model = getcache('model_field_'.$cat['modelid'], 'model');
if (empty($model)) showmessage(L('model_does_not_exist_please_update_the_cache_model'));
$node_data = $this->db->get_one(array('nodeid'=>$nodeid), "customize_config");
$node_data['customize_config'] = string2array($node_data['customize_config']);
$node_field = array(''=>L('please_choose'),'title'=>L('title'), 'author'=>L('author'), 'comeform'=>L('comeform'), 'time'=>L('time'), 'content'=>L('content'));
if (is_array($node_data['customize_config'])) foreach ($node_data['customize_config'] as $k=>$v) {
if (empty($v['en_name']) || empty($v['name'])) continue;
$node_field[$v['en_name']] = $v['name'];
}
$show_header = true;
include $this->admin_tpl('import_program_add');
}
public function import_program_del() {
$id = isset($_GET['id']) ? intval($_GET['id']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
$program_db = pc_base::load_model('collection_program_model');
if ($program_db->delete(array('id'=>$id))) {
showmessage(L('operation_success'), HTTP_REFERER);
} else {
showmessage(L('illegal_parameters'));
}
}
//导入文章到模型
public function import_content() {
$nodeid = isset($_GET['nodeid']) ? intval($_GET['nodeid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
$programid = isset($_GET['programid']) ? intval($_GET['programid']) : showmessage(L('illegal_parameters'), HTTP_REFERER);
$ids = isset($_GET['ids']) ? $_GET['ids'] : '';
$type = isset($_GET['type']) ? trim($_GET['type']) : '';
if (!$node = $this->db->get_one(array('nodeid'=>$nodeid), 'coll_order,content_page')) {
showmessage(L('node_not_found'), '?m=collection&c=node&a=manage');
}
$program_db = pc_base::load_model('collection_program_model');
$collection_content_db = pc_base::load_model('collection_content_model');
$content_db = pc_base::load_model('content_model');
//更新附件状态
$attach_status = false;
if(pc_base::load_config('system','attachment_stat')) {
$attachment_db = pc_base::load_model('attachment_model');
$att_index_db = pc_base::load_model('attachment_index_model');
$attach_status = true;
}
$order = $node['coll_order'] == 1 ? 'id desc' : '';
$str = L('operation_success');
$url = '?m=collection&c=node&a=publist&nodeid='.$nodeid.'&status=2&pc_hash='.$_SESSION['pc_hash'];
if ($type == 'all') {
$total = isset($_GET['total']) && intval($_GET['total']) ? intval($_GET['total']) : '';
if (empty($total)) $total = $collection_content_db->count(array('siteid'=>$this->get_siteid(), 'nodeid'=>$nodeid, 'status'=>1));
$total_page = ceil($total/20);
$page = isset($_GET['page']) && intval($_GET['page']) ? intval($_GET['page']) : 1;
$total_page = ceil($total/20);
$data = $collection_content_db->select(array('siteid'=>$this->get_siteid(), 'nodeid'=>$nodeid, 'status'=>1), 'id, data', '20', $order);
} else {
$ids = explode(',', $ids);
$ids = implode('\',\'', $ids);
$data = $collection_content_db->select("siteid='".$this->get_siteid()."' AND id in ('$ids') AND nodeid = '$nodeid' AND status = '1'", 'id, data', '', $order);
$total = count($data);
$str = L('operation_success').$total.L('article_was_imported');
}
$program = $program_db->get_one(array('id'=>$programid));
$program['config'] = string2array($program['config']);
$_POST['add_introduce'] = $program['config']['add_introduce'];
$_POST['introcude_length'] = $program['config']['introcude_length'];
$_POST['auto_thumb'] = $program['config']['auto_thumb'];
$_POST['auto_thumb_no'] = $program['config']['auto_thumb_no'];
$_POST['spider_img'] = 0;
$i = 0;
$content_db->set_model($program['modelid']);
$coll_contentid = array();
//加载所有的处理函数
$funcs_file_list = glob(dirname(__FILE__).DIRECTORY_SEPARATOR.'spider_funs'.DIRECTORY_SEPARATOR.'*.php');
foreach ($funcs_file_list as $v) {
include $v;
}
foreach ($data as $k=>$v) {
$sql = array('catid'=>$program['catid'], 'status'=>$program['config']['content_status']);
$v['data'] = string2array($v['data']);
foreach ($program['config']['map'] as $a=>$b) {
if (isset($program['config']['funcs'][$a]) && function_exists($program['config']['funcs'][$a])) {
$GLOBALS['field'] = $a;
$sql[$a] = $program['config']['funcs'][$a]($v['data'][$b]);
} else {
$sql[$a] = $v['data'][$b];
}
}
if ($node['content_page'] == 1) $sql['paginationtype'] = 2;
$contentid = $content_db->add_content($sql, 1);
if ($contentid) {
$coll_contentid[] = $v['id'];
$i++;
//更新附件状态,将采集关联重置到内容关联
if($attach_status) {
$datas = $att_index_db->select(array('keyid'=>'cj-'.$v['id']),'*',100,'','','aid');
if(!empty($datas)) {
$datas = array_keys($datas);
$datas = implode(',',$datas);
$att_index_db->update(array('keyid'=>'c-'.$program['catid'].'-'.$contentid),array('keyid'=>'cj-'.$v['id']));
$attachment_db->update(array('module'=>'content')," aid IN ($datas)");
}
}
} else {
$collection_content_db->delete(array('id'=>$v['id']));
}
}
$sql_id = implode('\',\'', $coll_contentid);
$collection_content_db->update(array('status'=>2), " id IN ('$sql_id')");
if ($type == 'all' && $total_page > $page) {
$str = L('are_imported_the_import_process').(($page-1)*20+$i).'/'.$total.'<script type="text/javascript">location.href="?m=collection&c=node&a=import_content&nodeid='.$nodeid.'&programid='.$programid.'&type=all&page='.($page+1).'&total='.$total.'&pc_hash='.$_SESSION['pc_hash'].'"</script>';
$url = '';
}
showmessage($str, $url);
}
}
?>
|
108wo
|
phpcms/modules/collection/node.php
|
PHP
|
asf20
| 25,582
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script type="text/javascript">
$(document).ready(function() {
$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'})}});
$("#name").formValidator({onshow:"<?php echo L('input').L('nodename')?>",onfocus:"<?php echo L('input').L('nodename')?>"}).inputValidator({min:1,onerror:"<?php echo L('input').L('nodename')?>"}).ajaxValidator({type : "get",url : "",data :"m=collection&c=node&a=public_name<?php if(ROUTE_A=='edit')echo "&nodeid=$data[nodeid]"?>",datatype : "html",async:'false',success : function(data){ if( data == "1" ){return true;}else{return false;}},buttons: $("#dosubmit"),onerror : "<?php echo L('nodename').L('exists')?>",onwait : "<?php echo L('connecting')?>"})<?php if(ROUTE_A=='edit')echo ".defaultPassed()"?>;
});
</script>
<div class="pad-10">
<div class="col-tab">
<ul class="tabBut cu-li">
<li class="on" id="tab_1"><a href="javascript:show_div('1')"><?php echo L('url_rewrites')?></a></li>
<li id="tab_2"><a href="javascript:show_div('2')"><?php echo L('content_rules')?></a></li>
<li id="tab_3"><a href="javascript:show_div('3')"><?php echo L('custom_rule')?></a></li>
<li id="tab_4"><a href="javascript:show_div('4')"><?php echo L('eigrp')?></a></li>
</ul>
<form name="myform" action="?m=collection&c=node&a=<?php echo ROUTE_A?>&nodeid=<?php if(isset($nodeid)) echo $nodeid?>" method="post" id="myform">
<div class="content pad-10" id="show_div_1" style="height:auto">
<div class="common-form">
<fieldset>
<legend><?php echo L('basic_configuration')?></legend>
<table width="100%" class="table_form">
<tr>
<td width="120"><?php echo L('collection_items_of')?>:</td>
<td>
<input type="text" name="data[name]" id="name" class="input-text" value="<?php if(isset($data['name'])) echo $data['name']?>"></input>
</td>
</tr>
<tr>
<td width="120"><?php echo L('encode_varchar')?>:</td>
<td>
<?php echo form::radio(array('gbk'=>'GBK', 'utf-8'=>'UTF-8', 'big5'=>'BIG5'), (isset($data['sourcecharset']) ? $data['sourcecharset'] : 'gbk'), 'name="data[sourcecharset]"')?>
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo L('web_sites_to_collect')?></legend>
<table width="100%" class="table_form">
<tr>
<td width="120"><?php echo L('url_type')?>:</td>
<td>
<?php echo form::radio($this->url_list_type, (isset($data['sourcetype']) ? $data['sourcetype'] : '1'), 'name="data[sourcetype]" onclick="show_url_type(this.value)"')?>
</td>
</tr>
<tbody id="url_type_1" <?php if (isset($data['sourcetype']) && $data['sourcetype'] != 1){echo ' style="display:none"';}?>>
<tr>
<td width="120"><?php echo L('url_configuration')?>:</td>
<td>
<input type="text" name="urlpage1" id="urlpage_1" size="100" value="<?php if(isset($data['sourcetype']) && $data['sourcetype'] == 1 && isset($data['urlpage'])) echo $data['urlpage'];?>"> <input type="button" class="button" onclick="show_url()" value="<?php echo L('test')?>"><br />
<?php echo L('url_msg')?><br />
<?php echo L('page_from')?>: <input type="text" name="data[pagesize_start]" value="<?php if(isset($data['sourcetype']) && $data['sourcetype'] == 1 && isset($data['pagesize_start'])) { echo $data['pagesize_start'];} else { echo '1';}?>" size="4"> <?php echo L('to')?> <input type="text" name="data[pagesize_end]" value="<?php if(isset($data['sourcetype']) && $data['sourcetype'] == 1 && isset($data['pagesize_end'])) { echo $data['pagesize_end'];} else { echo '10';}?>" size="4"> <?php echo L('increment_by')?><input type="text" name="data[par_num]" size="4" value="<?php if(isset($data['sourcetype']) && $data['sourcetype'] == 1 && isset($data['par_num'])) { echo $data['par_num'];} else { echo '1';}?>">
</td>
</tr>
</tbody>
<tbody id="url_type_2" <?php if (!isset($data['sourcetype']) || $data['sourcetype'] != 2){echo ' style="display:none"';}?>>
<tr>
<td width="120"><?php echo L('url_configuration')?>:</td>
<td>
<textarea rows="10" cols="80" name="urlpage2" id="urlpage_2" ><?php if(isset($data['sourcetype']) && $data['sourcetype'] == 2 && isset($data['urlpage'])) { echo $data['urlpage'];}?></textarea> <br><?php echo L('one_per_line')?>
</td>
</tr>
</tbody>
<tbody id="url_type_3" <?php if (!isset($data['sourcetype']) || $data['sourcetype'] != 3){echo ' style="display:none"';}?>>
<tr>
<td width="120"><?php echo L('url_configuration')?>:</td>
<td>
<input type="text" name="urlpage3" id="urlpage_3" size="100" value="<?php if(isset($data['sourcetype']) && $data['sourcetype'] == 3 && isset($data['urlpage'])) { echo $data['urlpage'];}?>">
</td>
</tr>
</tbody>
<tbody id="url_type_4" <?php if (!isset($data['sourcetype']) || $data['sourcetype'] != 4){echo ' style="display:none"';}?>>
<tr>
<td width="120"><?php echo L('url_configuration')?>:</td>
<td>
<input type="text" name="urlpage4" id="urlpage_4" size="100" value="<?php if(isset($data['sourcetype']) && $data['sourcetype'] == 4 && isset($data['urlpage'])) { echo $data['urlpage'];}?>">
</td>
</tr>
</tbody>
<tr>
<td width="120"><?php echo L('url_configuration')?>:</td>
<td>
<?php echo L('site_must_contain')?><input type="text" name="data[url_contain]" value="<?php if(isset($data['url_contain'])) echo $data['url_contain']?>"> <?php echo L('the_web_site_does_not_contain')?><input type="text" name="data[url_except]" value="<?php if(isset($data['url_except'])) echo $data['url_except']?>">
</td>
</tr>
<tr>
<td width="120"><?php echo L('base_configuration')?>:</td>
<td>
<input type="text" name="data[page_base]" value="<?php if(isset($data['page_base'])) echo $data['page_base']?>" size="100" ><br>
<?php echo L('base_msg')?>
</td>
</tr>
<tr>
<td width="120"><?php echo L('get_url')?>:</td>
<td>
<?php echo L('from')?> <textarea rows="10" cols="40" name="data[url_start]"><?php if(isset($data['url_start'])) echo $data['url_start']?></textarea> <?php echo L('to')?> <textarea rows="10" name="data[url_end]" cols="40"><?php if(isset($data['url_end'])) echo $data['url_end']?></textarea> <?php echo L('finish')?>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="content pad-10" id="show_div_2" style="height:auto;display:none">
<div class="explain-col">
<?php echo L('rule_msg')?>
</div>
<div class="bk15"></div>
<input type="button" class="button" value="<?php echo L('expand_all')?>" onclick="$('#show_div_2').children('fieldset').children('.table_form').show()"> <input type="button" class="button" value="<?php echo L('all_the')?>" onclick="$('#show_div_2').children('fieldset').children('.table_form').hide()">
<fieldset>
<legend><a href="javascript:void(0)" onclick="$(this).parent().parent().children('table').toggle()"><?php echo L('title').L('rule')?></a></legend>
<table width="100%" class="table_form">
<tr>
<td width="120"><?php echo L('matching_rule')?>:</td>
<td>
<textarea rows="5" cols="40" name="data[title_rule]" id="title_rule"><?php if(isset($data['title_rule'])) {echo $data['title_rule'];}else{echo '<title>'.L('[content]').'</title>';}?></textarea> <br><?php echo L('use')?>"<a href="javascript:insertText('title_rule', '<?php echo L('[content]')?>')"><?php echo L('[content]')?></a>"<?php echo L('w_wildmenu')?>
</td>
<td width="120"><?php echo L('filtering')?>:</td>
<td>
<textarea rows="5" cols="50" name="data[title_html_rule]" id="title_html_rule"><?php if(isset($data['title_html_rule'])) echo $data['title_html_rule']?></textarea>
<input type="button" value="<?php echo L('select')?>" class="button" onclick="html_role('data[title_html_rule]')">
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><a href="javascript:void(0)" onclick="$(this).parent().parent().children('table').toggle()"><?php echo L('author').L('rule')?></a></legend>
<table width="100%" class="table_form" style="display:none">
<tr>
<td width="120"><?php echo L('matching_rule')?>:</td>
<td>
<textarea rows="5" cols="40" name="data[author_rule]" id="author_rule"><?php if(isset($data['author_rule'])) echo $data['author_rule']?></textarea> <br><?php echo L('use')?>"<a href="javascript:insertText('author_rule', '<?php echo L('[content]')?>')"><?php echo L('[content]')?></a>"<?php echo L('w_wildmenu')?>
</td>
<td width="120"><?php echo L('filtering')?>:</td>
<td>
<textarea rows="5" cols="50" name="data[author_html_rule]" id="author_html_rule"><?php if(isset($data['author_html_rule'])) echo $data['author_html_rule']?></textarea>
<input type="button" value="<?php echo L('select')?>" class="button" onclick="html_role('data[author_html_rule]')">
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><a href="javascript:void(0)" onclick="$(this).parent().parent().children('table').toggle()"><?php echo L('comeform').L('rule')?></a></legend>
<table width="100%" class="table_form" style="display:none">
<tr>
<td width="120"><?php echo L('matching_rule')?>:</td>
<td>
<textarea rows="5" cols="40" name="data[comeform_rule]" id="comeform_rule"><?php if(isset($data['comeform_rule'])) echo $data['comeform_rule']?></textarea> <br><?php echo L('use')?>"<a href="javascript:insertText('comeform_rule', '<?php echo L('[content]')?>')"><?php echo L('[content]')?></a>"<?php echo L('w_wildmenu')?>
</td>
<td width="120"><?php echo L('filtering')?>:</td>
<td>
<textarea rows="5" cols="50" name="data[comeform_html_rule]" id="comeform_html_rule"><?php if(isset($data['comeform_html_rule'])) echo $data['comeform_html_rule']?></textarea>
<input type="button" value="<?php echo L('select')?>" class="button" onclick="html_role('data[comeform_html_rule]')">
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><a href="javascript:void(0)" onclick="$(this).parent().parent().children('table').toggle()"><?php echo L('time').L('rule')?></a></legend>
<table width="100%" class="table_form" style="display:none">
<tr>
<td width="120"><?php echo L('matching_rule')?>:</td>
<td>
<textarea rows="5" cols="40" name="data[time_rule]" id="time_rule"><?php if(isset($data['time_rule'])) echo $data['time_rule']?></textarea> <br><?php echo L('use')?>"<a href="javascript:insertText('time_rule', '<?php echo L('[content]')?>')"><?php echo L('[content]')?></a>"<?php echo L('w_wildmenu')?>
</td>
<td width="120"><?php echo L('filtering')?>:</td>
<td>
<textarea rows="5" cols="50" name="data[time_html_rule]" id="time_html_rule"><?php if(isset($data['time_html_rule'])) echo $data['time_html_rule']?></textarea>
<input type="button" value="<?php echo L('select')?>" class="button" onclick="html_role('data[time_html_rule]')">
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><a href="javascript:void(0)" onclick="$(this).parent().parent().children('table').toggle()"><?php echo L('content').L('rule')?></a></legend>
<table width="100%" class="table_form" style="display:none">
<tr>
<td width="120"><?php echo L('matching_rule')?>:</td>
<td>
<textarea rows="5" cols="40" name="data[content_rule]" id="content_rule"><?php if(isset($data['content_rule'])) echo $data['content_rule']?></textarea> <br><?php echo L('use')?>"<a href="javascript:insertText('content_rule', '<?php echo L('[content]')?>')"><?php echo L('[content]')?></a>"<?php echo L('w_wildmenu')?>
</td>
<td width="120"><?php echo L('filtering')?>:</td>
<td>
<textarea rows="5" cols="50" name="data[content_html_rule]" id="content_html_rule"><?php if(isset($data['content_html_rule'])) echo $data['content_html_rule']?></textarea>
<input type="button" value="<?php echo L('select')?>" class="button" onclick="html_role('data[content_html_rule]')">
</td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><a href="javascript:void(0)" onclick="$(this).parent().parent().children('table').toggle()"><?php echo L('content_page').L('rule')?></a></legend>
<table width="100%" class="table_form" style="display:none">
<tr>
<td width="120"><?php echo L('page_mode')?>:</td>
<td>
<?php echo form::radio(array('1'=>L('all_are_models'), '2'=>L('down_the_pages_mode')), (isset($data['content_page_rule']) ? $data['content_page_rule'] : 1), 'name="data[content_page_rule]" onclick="show_nextpage(this.value)"')?>
</td>
</tr>
<tbody id="nextpage" <?php if(!isset($data['content_page_rule']) || $data['content_page_rule']!=2) echo 'style="display:none"'?>>
<tr>
<td width="120"><?php echo L('nextpage_rule')?>:</td>
<td>
<input type="text" name="data[content_nextpage]" size="100" value="<?php if(isset($data['content_nextpage'])) echo $data['content_nextpage']?>"><br>
<?php echo L('nextpage_rule_msg')?>
</td>
</tr>
</tbody>
<tr>
<td width="120"><?php echo L('matching_rule')?>:</td>
<td>
<?php echo L('from')?> <textarea rows="5" cols="40" name="data[content_page_start]" id="content_page_start"><?php if(isset($data['content_page_start'])) echo $data['content_page_start']?></textarea> <?php echo L('to')?> <textarea rows="5" cols="40" name="data[content_page_end]" id="content_page_end"><?php if(isset($data['content_page_end'])) echo $data['content_page_end']?></textarea>
</td>
</tr>
</table>
</fieldset>
</div>
<div class="content pad-10" id="show_div_3" style="height:auto;display:none">
<input type="button" class="button" value="<?php echo L('add_item')?>" onclick="add_caiji()">
<div class="bk10"></div>
<table width="100%" class="table_form" id="customize_config">
<?php if(isset($data['customize_config']) && is_array($data['customize_config'])) foreach ($data['customize_config'] as $k=>$v):?>
<tbody id="customize_config_<?php echo $k?>"><tr style="background-color:#FBFFE4"><td><?php echo L('rulename')?>:</td><td><input type="text" name="customize_config[name][<?php echo $k?>]" value="<?php echo $v['name']?>" class="input-text" /></td><td><?php echo L('rules_in_english')?>:</td><td><input type="text" name="customize_config[en_name][<?php echo $k?>]" value="<?php echo $v['en_name']?>" class="input-text" /></td></tr><tr><td width="120"><?php echo L('matching_rule')?>:</td><td><textarea rows="5" cols="40" name="customize_config[rule][<?php echo $k?>]" id="rule_<?php echo $k?>"><?php echo $v['rule']?></textarea> <br><?php echo L('use')?>"<a href="javascript:insertText('rule_<?php echo $k?>', '<?php echo L('[content]')?>')"><?php echo L('[content]')?></a>"<?php echo L('w_wildmenu')?></td><td width="120"><?php echo L('filtering')?>:</td><td><textarea rows="5" cols="50" name="customize_config[html_rule][<?php echo $k?>]"><?php echo $v['html_rule']?></textarea><input type="button" value="<?php echo L('select')?>" class="button" onclick="html_role('customize_config[html_rule][<?php echo $k?>]')"></td></tr></tbody>
<?php endforeach;?>
</table>
</div>
<div class="content pad-10" id="show_div_4" style="height:auto;display:none">
<table width="100%" class="table_form" >
<tr>
<td width="120"><?php echo L('download_pic')?>:</td>
<td>
<?php echo form::radio(array('1'=>L('download_pic'), '0'=>L('no_download')), (isset($data['down_attachment']) ? $data['down_attachment'] : '0'), 'name="data[down_attachment]"')?>
</td>
</tr>
<tr>
<td width="120"><?php echo L('watermark')?>:</td>
<td>
<?php echo form::radio(array('1'=>L('gfl_sdk'), '0'=>L('no_gfl_sdk')), (isset($data['watermark']) ? $data['watermark'] : '0'), 'name="data[watermark]"')?>
</td>
</tr>
<tr>
<td width="120"><?php echo L('content_page_models')?>:</td>
<td>
<?php echo form::radio(array('0'=>L('no_page'), '1'=>L('by_the_paging')), (isset($data['content_page']) ? $data['content_page'] : '1'), 'name="data[content_page]"')?>
</td>
</tr>
<tr>
<td width="120"><?php echo L('sort_order')?>:</td>
<td>
<?php echo form::radio(array('1'=>L('with_goals_from_the_same'), '2'=>L('and_objectives_of_the_standing_opposite')), (isset($data['coll_order']) ? $data['coll_order'] : '1'), 'name="data[coll_order]"')?>
</td>
</tr>
</table>
</div>
</div>
<div class="bk15"></div>
<input name="dosubmit" type="submit" id="dosubmit" value="<?php echo L('submit')?>" class="button">
</div>
</form>
<script type="text/javascript">
<!--
function insertText(id, text)
{
$('#'+id).focus();
var str = document.selection.createRange();
str.text = text;
}
function show_url_type(obj) {
var num = <?php echo count($this->url_list_type);?>;
for (var i=1; i<=num; i++){
if (obj==i){
$('#url_type_'+i).show();
} else {
$('#url_type_'+i).hide();
}
}
}
function show_div(id) {
for (var i=1;i<=4;i++) {
if (id==i) {
$('#tab_'+i).addClass('on');
$('#show_div_'+i).show();
} else {
$('#tab_'+i).removeClass('on');
$('#show_div_'+i).hide();
}
}
}
function show_url() {
var type = $("input[type='radio'][name='data[sourcetype]']:checked").val();
window.top.art.dialog({id:'test_url',iframe:'?m=collection&c=node&a=public_url&sourcetype='+type+'&urlpage='+$('#urlpage_'+type).val()+'&pagesize_start='+$("input[name='data[pagesize_start]']").val()+'&pagesize_end='+$("input[name='data[pagesize_end]']").val()+'&par_num='+$("input[name='data[par_num]']").val(), title:'<?php echo L('testpageurl')?>', width:'700', height:'450'}, '', function(){window.top.art.dialog({id:'test_url'}).close()});
}
function anti_selectall(obj) {
$("input[name='"+obj+"']").each(function(i,n){
if (this.checked) {
this.checked = false;
} else {
this.checked = true;
}});
}
function show_nextpage(value) {
if (value == 2) {
$('#nextpage').show();
} else {
$('#nextpage').hide();
}
}
var i =<?php echo isset($data['customize_config']) ? count($data['customize_config']) : 0?>;
function add_caiji() {
var html = '<tbody id="customize_config_'+i+'"><tr style="background-color:#FBFFE4"><td><?php echo L('rulename')?>:</td><td><input type="text" name="customize_config[name][]" class="input-text" /></td><td><?php echo L('rules_in_english')?>:</td><td><input type="text" name="customize_config[en_name][]" class="input-text" /></td></tr><tr><td width="120"><?php echo L('matching_rule')?>:</td><td><textarea rows="5" cols="40" name="customize_config[rule][]" id="rule_'+i+'"></textarea> <br><?php echo L('use')?>"<a href="javascript:insertText(\'rule_'+i+'\', \'<?php echo L('[content]')?>\')"><?php echo L('[content]')?></a>"<?php echo L('w_wildmenu')?></td><td width="120"><?php echo L('filtering')?>:</td><td><textarea rows="5" cols="50" name="customize_config[html_rule][]" id="content_html_rule_'+i+'"></textarea><input type="button" value="<?php echo L('select')?>" class="button" onclick="html_role(\'content_html_rule_'+i+'\', 1)"></td></tr></tbody>';
$('#customize_config').append(html);
i++;
}
function html_role(id, type) {
art.dialog({id:'test_url',content:'<?php echo form::checkbox(self::$html_tag, '', 'name="html_rule"', '', '120')?><br><div class="bk15"></div><center><input type="button" value="<?php echo L('select_all')?>" class="button" onclick="selectall(\'html_rule\')"> <input type="button" class="button" value="<?php echo L('invert')?>" onclick="anti_selectall(\'html_rule\')"></center>', width:'500', height:'150', lock: false}, function(){var old = $("textarea[name='"+id+"']").val();var str = '';$("input[name='html_rule']:checked").each(function(){str+=$(this).val()+"\n";});$((type == 1 ? "#"+id :"textarea[name='"+id+"']")).val((old ? old+"\n" : '')+str);}, function(){art.dialog({id:'test_url'}).close()});
}
<?php if (ROUTE_A == 'edit') echo '$(\'#show_div_2\').children(\'fieldset\').children(\'.table_form\').show();';?>
//-->
</script>
</body>
</html>
|
108wo
|
phpcms/modules/collection/templates/node_form.tpl.php
|
PHP
|
asf20
| 20,136
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<div class="pad-10">
<div class="col-tab">
<ul class="tabBut cu-li">
<li class="on" id="tab_1"><?php echo L('url_list')?></li>
</ul>
<div class="content pad-10" id="show_div_1" style="height:auto">
<?php foreach ($url as $key=>$val):?>
<?php echo $val['title']?><br>
<div style="float:right"><a href="javascript:void(0)" onclick="show_content('<?php echo urlencode($val['url'])?>')"><span><?php echo L('view')?></span></a></div><?php echo $val['url']?>
<hr size="1" />
<?php endforeach;?>
</div>
</div>
</div>
<script type="text/javascript">
<!--
function show_content(url) {
art.dialog({id:'test',content:'<?php echo L('loading')?>',width:'100',height:'30', lock:true});
$.get("?m=collection&c=node&a=public_test_content&nodeid=<?php echo $nodeid?>&url="+url+'&pc_hash=<?php echo $_SESSION['pc_hash']?>', function(data){art.dialog({id:'test'}).close();
art.dialog({title:'<?php echo L('content_view')?>',id:'test',content:'<textarea rows="26" cols="90">'+data+'</textarea>',width:'500',height:'400', lock:false});});
}
window.top.$('#display_center_id').css('display','none');
//-->
</script>
</body>
</html>
|
108wo
|
phpcms/modules/collection/templates/public_test.tpl.php
|
PHP
|
asf20
| 1,263
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<div class="pad-lr-10">
<form name="myform" action="?m=collection&c=node&a=del" method="post" onsubmit="return confirm('<?php echo L('sure_delete')?>')">
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th align="left" width="20"><input type="checkbox" value="" id="check_box" onclick="selectall('nodeid[]');"></th>
<th align="left">ID</th>
<th align="left"><?php echo L('nodename')?></th>
<th align="left"><?php echo L('lastdate')?></th>
<th align="left"><?php echo L('content').L('operation')?></th>
<th align="left"><?php echo L('operation')?></th>
</tr>
</thead>
<tbody>
<?php
foreach($nodelist as $k=>$v) {
?>
<tr>
<td align="left"><input type="checkbox" value="<?php echo $v['nodeid']?>" name="nodeid[]"></td>
<td align="left"><?php echo $v['nodeid']?></td>
<td align="left"><?php echo $v['name']?></td>
<td align="left"><?php echo format::date($v['lastdate'], 1)?></td>
<td align="left"><a href="?m=collection&c=node&a=col_url_list&nodeid=<?php echo $v['nodeid']?>">[<?php echo L('collection_web_site')?>]</a>
<a href="?m=collection&c=node&a=col_content&nodeid=<?php echo $v['nodeid']?>">[<?php echo L('collection_content')?>]</a>
<a href="?m=collection&c=node&a=publist&nodeid=<?php echo $v['nodeid']?>&status=2" style="color:red">[<?php echo L('public_content')?>]</a>
</td>
<td align="left">
<a href="javascript:void(0)" onclick="test_spider(<?php echo $v['nodeid']?>)">[<?php echo L('test')?>]</a>
<a href="?m=collection&c=node&a=edit&nodeid=<?php echo $v['nodeid']?>&menuid=957">[<?php echo L('edit')?>]</a>
<a href="javascript:void(0)" onclick="copy_spider(<?php echo $v['nodeid']?>)">[<?php echo L('copy')?>]</a>
<a href="?m=collection&c=node&a=export&nodeid=<?php echo $v['nodeid']?>">[<?php echo L('export')?>]</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="btn">
<label for="check_box"><?php echo L('select_all')?>/<?php echo L('cancel')?></label> <input type="submit" class="button" name="dosubmit" value="<?php echo L('delete')?>"/>
<input type="button" class="button" value="<?php echo L('import_collection_points')?>" onclick="import_spider()" />
</div>
<div id="pages"><?php echo $pages?></div>
</div>
</form>
</div>
<script type="text/javascript">
<!--
function test_spider(id) {
window.top.art.dialog({id:'test'}).close();
window.top.art.dialog({title:'<?php echo L('data_acquisition_testdat')?>',id:'test',iframe:'?m=collection&c=node&a=public_test&nodeid='+id,width:'700',height:'500'}, '', function(){window.top.art.dialog({id:'test'}).close()});
}
function copy_spider(id) {
window.top.art.dialog({id:'test'}).close();
window.top.art.dialog({title:'<?php echo L('copy_node')?>',id:'test',iframe:'?m=collection&c=node&a=copy&nodeid='+id,width:'420',height:'120'}, function(){var d = window.top.art.dialog({id:'test'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'test'}).close()});
}
function import_spider() {
window.top.art.dialog({id:'test'}).close();
window.top.art.dialog({title:'<?php echo L('import_collection_points')?>',id:'test',iframe:'?m=collection&c=node&a=node_import',width:'420',height:'200'}, function(){var d = window.top.art.dialog({id:'test'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'test'}).close()});
}
window.top.$('#display_center_id').css('display','none');
//-->
</script>
</body>
</html>
|
108wo
|
phpcms/modules/collection/templates/node_list.tpl.php
|
PHP
|
asf20
| 3,732
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<div class="pad-10">
<div class="col-tab">
<ul class="tabBut cu-li">
<li class="on" id="tab_1"><?php echo L('url_list')?></li>
</ul>
<div class="content pad-10" id="show_div_1" style="height:auto">
<b><?php echo L('url_list')?></b>:<?php echo $url_list;?><br><br>
<?php echo L('in_all')?>: <?php echo $total?> <?php echo L('all_count_msg')?>:<?php echo $re;?><?php echo L('import_num_msg')?><?php echo $total-$re;?>
<br><br>
<?php if (is_array($url))foreach ($url as $v):?>
<?php echo $v['title'].'<br>'.$v['url'];?>
<hr size="1" />
<?php endforeach;?>
<?php if ($total_page > $page) {
echo "<script type='text/javascript'>location.href='?m=collection&c=node&a=col_url_list&page=".($page+1)."&nodeid=$nodeid&pc_hash=".$_SESSION['pc_hash']."'</script>";
} else {?>
<script type="text/javascript">
window.top.art.dialog({id:'test'}).close();
window.top.art.dialog({id:'test',content:'<h2><?php echo L('collection_success')?></h2><span style="fotn-size:16px;"><?php echo L('following_operation')?></span><br /><ul style="fotn-size:14px;"><li><a href="?m=collection&c=node&a=col_content&nodeid=<?php echo $nodeid?>&pc_hash=<?php echo $_SESSION['pc_hash']?>" target="right" onclick="window.top.art.dialog({id:\'test\'}).close()"><?php echo L('following_operation_1')?></a></li><li><a href="?m=collection&c=node&a=manage&menuid=957&pc_hash=<?php echo $_SESSION['pc_hash']?>" target="right" onclick="window.top.art.dialog({id:\'test\'}).close()"><?php echo L('following_operation_2')?></a></li></ul>',width:'400',height:'200'});
</script>
<?php }?>
</div>
</div>
</div>
</body>
</html>
|
108wo
|
phpcms/modules/collection/templates/col_url_list.tpl.php
|
PHP
|
asf20
| 1,741
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<div class="pad-10">
<div class="col-tab">
<ul class="tabBut cu-li">
<li class="on" id="tab_1"><?php echo L('url_list')?></li>
</ul>
<div class="content pad-10" id="show_div_1" style="height:auto">
<?php while ($pagesize_start <= $pagesize_end):?>
<?php echo str_replace('(*)', $pagesize_start, $urlpage);$pagesize_start=$pagesize_start+$par_num;?>
<hr size="1" />
<?php endwhile;?>
</div>
</div>
</div>
</body>
</html>
|
108wo
|
phpcms/modules/collection/templates/node_public_url.tpl.php
|
PHP
|
asf20
| 553
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script type="text/javascript">
$(document).ready(function() {
$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'})}});
$("#name").formValidator({onshow:"<?php echo L('input').L('nodename')?>",onfocus:"<?php echo L('input').L('nodename')?>"}).inputValidator({min:1,onerror:"<?php echo L('input').L('nodename')?>"}).ajaxValidator({type : "get",url : "",data :"m=collection&c=node&a=public_name",datatype : "html",async:'false',success : function(data){ if( data == "1" ){return true;}else{return false;}},buttons: $("#dosubmit"),onerror : "<?php echo L('nodename').L('exists')?>",onwait : "<?php echo L('connecting')?>"});
});
</script>
<div class="pad-10">
<form name="myform" action="?m=collection&c=node&a=copy&nodeid=<?php if(isset($nodeid)) echo $nodeid?>" method="post" id="myform">
<div class="common-form">
<table width="100%" class="table_form">
<tr>
<td width="120"><?php echo L('had_collected_from_the_roll')?>:</td>
<td>
<?php if(isset($data['name'])) echo $data['name']?>
</td>
</tr>
<tr>
<td width="120"><?php echo L('the_new_gathering')?>:</td>
<td>
<input type="text" name="name" id="name" class="input-text" value="" />
</td>
</tr>
</table>
<input name="dosubmit" type="submit" id="dosubmit" value="<?php echo L('submit')?>" class="dialog">
</div>
</div>
</form>
</body>
</html>
|
108wo
|
phpcms/modules/collection/templates/node_copy.tpl.php
|
PHP
|
asf20
| 1,594
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<style>
<!--
#show_funcs_div{position:absolute ;background-color:#fff;border:#D0D0D0 solid 1px; border-top-style:none;display:none}
.show_funcs_div{height:200px;overflow-y:scroll;}
#show_funcs_div ul li{padding:3px 0 3px 5px;}
#show_funcs_div ul li:hover{background-color:#EEEEEE;cursor:hand;}
.funcs_div{background:#fff; width:160px; border:solid #D0D0D0 1px;}
.funcs{border:none;background:none}
-->
</style>
<div id="show_funcs_div" onmouseover="clearh()" onmouseout="hidden_funcs_div_1()">
<ul>
<?php if (isset($spider_funs) && is_array($spider_funs)) foreach ($spider_funs as $k=>$v):?>
<li onclick="insert_txt('<?php echo $k;?>')"><?php echo $v?>(<?php echo $k;?>)</li>
<?php endforeach;?>
</ul>
</div>
<div class="pad-lr-10">
<form name="myform" action="?m=collection&c=node&a=import_program_add&nodeid=<?php if(isset($nodeid)) echo $nodeid?>&type=<?php echo $type?>&ids=<?php echo $ids?>&catid=<?php echo $catid?>" method="post" id="myform">
<fieldset>
<legend><?php echo L('the_new_publication_solutions')?></legend>
<table width="100%" class="table_form">
<tr>
<td width="120"><?php echo L('category')?>:</td>
<td>
<?php echo $cat['catname'];?>
</td>
</tr>
<tr>
<td width="120"><?php echo L('the_withdrawal_of_the_summary')?>:</td>
<td>
<label><input name="add_introduce" type="checkbox" value="1"><?php echo L('if_the_contents_of_intercepted')?></label><input type="text" name="introcude_length" value="200" size="3"><?php echo L('characters_to_a_summary_of_contents')?>
</td>
</tr>
<tr>
<td width="120"><?php echo L('the_withdrawal_of_thumbnails')?>:</td>
<td>
<label><input type='checkbox' name='auto_thumb' value="1"><?php echo L('whether_access_to_the_content_of')?></label><input type="text" name="auto_thumb_no" value="1" size="2" class=""><?php echo L('picture_a_caption_pictures')?>
</td>
</tr>
<tr>
<td width="120"><?php echo L('import_article_state')?>:</td>
<td>
<?php if(!empty($cat['setting']['workflowid'])) {echo form::radio(array('1'=>L('pendingtrial'), '99'=>L('fantaoboys')), '1', 'name="content_status"');} else {echo form::radio(array('99'=>L('fantaoboys')), '99', 'name="content_status"');}?>
</td>
</tr>
</table>
</fieldset>
<div class="bk10"></div>
<fieldset>
<legend><?php echo L('corresponding_labels_and_a_database_ties') ?></legend>
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th align="left"><?php echo L('the_original_database_field')?></th>
<th align="left"><?php echo L('explain')?></th>
<th align="left"><?php echo L('label_field__collected_with_the_result_')?></th>
<th align="left"><?php echo L('handler_functions')?></th>
</tr>
</thead>
<tbody>
<?php
foreach($model as $k=>$v) {
if (in_array($v['formtype'], array('catid', 'typeid', 'posids', 'groupid', 'readpoint','template'))) continue;
?>
<tr>
<td align="left"><?php echo $v['field']?></td>
<td align="left"><?php echo $v['name']?></td>
<td align="left"><input type="hidden" name="model_field[]" value="<?php echo $v['field']?>"><?php echo form::select($node_field, (in_array($v['field'], array('inputtime', 'updatetime')) ? 'time' : $v['field']), 'name="node_field[]"')?></td>
<td align="left"><div class="funcs_div"><input type="text" name="funcs[]" class="funcs"><a href="javascript:void(0)" onclick="clearh();show_funcs(this);" onmouseout="hidden_funcs_div_1()"><img src="<?php echo IMG_PATH?>admin_img/toggle-collapse-dark.png"></a></div></td>
</tr>
<?php
}
?>
</tbody>
</table>
</fieldset>
<div class="btn">
<input type="submit" class="button" name="dosubmit" value="<?php echo L('submit')?>"/>
</div>
<div id="pages"><?php echo $pages?></div>
</div>
</form>
</div>
<script type="text/javascript">
<!--
var div_obj;
function show_funcs(obj) {
div_obj = $(obj).parent('div');
var pos = $(obj).parent('div').offset();
$('#show_funcs_div').css('left',pos.left+'px').css('top',(pos.top+24)+'px').width($(obj).parent().width()).show();
}
var s = 0;
var h;
function hidden_funcs_div_2() {
s++;
if(s>=5) {
$('#show_funcs_div').hide().css('left','0px').css('top','0px');
clearInterval(h);
s = 0;
}
}
function clearh(){
if(h)clearInterval(h);
}
function hidden_funcs_div_1() {
h = setInterval("hidden_funcs_div_2()", 1);
}
function insert_txt(obj) {
$(div_obj).children('input').val(obj);
}
//-->
</script>
</body>
</html>
|
108wo
|
phpcms/modules/collection/templates/import_program_add.tpl.php
|
PHP
|
asf20
| 4,645
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<div class="pad-lr-10">
<fieldset>
<legend><?php echo L('the_new_publication_solutions')?></legend>
<form name="myform" action="?" method="get" id="myform">
<table width="100%" class="table_form">
<tr>
<td width="120"><?php echo L('category')?>:</td>
<td>
<?php echo form::select_category('', '', 'name="catid"', L('please_choose'), 0, 0, 1)?>
</td>
</tr>
</table>
<input type="hidden" name="m" value="collection">
<input type="hidden" name="c" value="node">
<input type="hidden" name="a" value="import_program_add">
<input type="hidden" name="nodeid" value="<?php if(isset($nodeid)) echo $nodeid?>">
<input type="hidden" name="type" value="<?php echo $type?>">
<input type="hidden" name="ids" value="<?php echo $ids?>">
<input type="submit" id="dosubmit" class="button" value="<?php echo L('submit')?>">
</form>
</fieldset>
<div class="bk15"></div>
<fieldset>
<legend><?php echo L('publish_the_list')?></legend>
<form name="myform" action="?" method="get" >
<div class="bk15"></div>
<?php
foreach($program_list as $k=>$v) {
echo form::radio(array($v['id']=>$cat[$v['catid']]['catname']), '', 'name="programid"', 150);
?>
<span style="margin-right:10px;"><a href="?m=collection&c=node&a=import_program_del&id=<?php echo $v['id']?>" style="color:#ccc"><?php echo L('delete')?></a></span>
<?php
}
?>
</fieldset>
<input type="hidden" name="m" value="collection">
<input type="hidden" name="c" value="node">
<input type="hidden" name="a" value="import_content">
<input type="hidden" name="nodeid" value="<?php if(isset($nodeid)) echo $nodeid?>">
<input type="hidden" name="type" value="<?php echo $type?>">
<input type="hidden" name="ids" value="<?php echo $ids?>">
<div class="btn">
<label for="check_box"><input type="submit" class="button" name="dosubmit" value="<?php echo L('submit')?>"/>
</div>
</div>
</form>
</div>
<script type="text/javascript">
<!--
window.top.$('#display_center_id').css('display','none');
//-->
</script>
</body>
</html>
|
108wo
|
phpcms/modules/collection/templates/import_program.tpl.php
|
PHP
|
asf20
| 2,170
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script type="text/javascript">
$(document).ready(function() {
$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'})}});
$("#name").formValidator({onshow:"<?php echo L('input').L('nodename')?>",onfocus:"<?php echo L('input').L('nodename')?>"}).inputValidator({min:1,onerror:"<?php echo L('input').L('nodename')?>"}).ajaxValidator({type : "get",url : "",data :"m=collection&c=node&a=public_name",datatype : "html",async:'false',success : function(data){ if( data == "1" ){return true;}else{return false;}},buttons: $("#dosubmit"),onerror : "<?php echo L('nodename').L('exists')?>",onwait : "<?php echo L('connecting')?>"});
});
</script>
<div class="pad-10">
<form name="myform" action="?m=collection&c=node&a=node_import" method="post" id="myform" enctype="multipart/form-data">
<div class="common-form">
<table width="100%" class="table_form">
<tr>
<td width="120"><?php echo L('collect_call')?>:</td>
<td>
<input type="text" name="name" id="name" class="input-text" value="" />
</td>
</tr>
<tr>
<td width="120"><?php echo L('cfg')?>:</td>
<td>
<input type="file" name="file" class="input-text" value="" /> <br /><?php echo L('only_support_txt_file_upload')?>
</td>
</tr>
</table>
<input name="dosubmit" type="submit" id="dosubmit" value="<?php echo L('submit')?>" class="dialog">
</div>
</div>
</form>
</body>
</html>
|
108wo
|
phpcms/modules/collection/templates/node_import.tpl.php
|
PHP
|
asf20
| 1,620
|
<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<div class="subnav">
<h1 class="title-2 line-x"><?php echo $node['name']?> - <?php echo L('content_list')?></h1>
</div>
<div class="pad-lr-10">
<div class="col-tab">
<ul class="tabBut cu-li">
<li <?php if(empty($status)) echo 'class="on" '?>id="tab_1"><a href="?m=collection&c=node&a=publist&nodeid=<?php echo $nodeid?>"><?php echo L('all')?></a></li>
<li <?php if($status==1) echo 'class="on" '?>id="tab_1"><a href="?m=collection&c=node&a=publist&nodeid=<?php echo $nodeid?>&status=1"><?php echo L('if_bsnap_then')?></a></li>
<li <?php if($status==2) echo 'class="on" '?> id="tab_2"><a href="?m=collection&c=node&a=publist&nodeid=<?php echo $nodeid?>&status=2"><?php echo L('spidered')?></a></li>
<li <?php if($status==3) echo 'class="on" '?> id="tab_3"><a href="?m=collection&c=node&a=publist&nodeid=<?php echo $nodeid?>&status=3"><?php echo L('imported')?></a></li>
</ul>
<div class="content pad-10" id="show_div_1" style="height:auto">
<form name="myform" id="myform" action="" method="get">
<div id="form_">
<input type="hidden" name="m" value="collection" />
<input type="hidden" name="c" value="node" />
<input type="hidden" name="a" value="content_del" />
</div>
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th align="left" width="20"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
<th align="left"><?php echo L('status')?></th>
<th align="left"><?php echo L('title')?></th>
<th align="left"><?php echo L('url')?></th>
<th align="left"><?php echo L('operation')?></th>
</tr>
</thead>
<tbody>
<?php
if(is_array($data) && !empty($data))foreach($data as $k=>$v) {
?>
<tr>
<td align="left"><input type="checkbox" value="<?php echo $v['id']?>" name="id[]"></td>
<td align="left"><?php if ($v['status'] == '0') {echo L('if_bsnap_then');} elseif ($v['status'] == 1) {echo L('spidered');} elseif ($v['status'] == 2) {echo L('imported');} ?></td>
<td align="left"><?php echo $v['title']?></td>
<td align="left"><?php echo $v['url']?></td>
<td align="left"><a href="javascript:void(0)" onclick="$('#tab_<?php echo $v['id']?>').toggle()"><?php echo L('view')?></a></td>
</tr>
<tr id="tab_<?php echo $v['id']?>" style="display:none">
<td align="left" colspan="5"><textarea style="width:98%;height:300px;"><?php echo htmlspecialchars($v['data'])?></textarea></td>
</tr>
<?php
}
?>
</tbody>
</table>
<div class="btn">
<label for="check_box"><?php echo L('select_all')?>/<?php echo L('cancel')?></label> <input type="submit" class="button" name="dosubmit" value="<?php echo L('delete')?>" onclick="re_url('m=collection&c=node&a=content_del&nodeid=<?php echo $nodeid?>');return check_checkbox(1);"/>
<input type="submit" class="button" name="dosubmit" onclick="re_url('m=collection&c=node&a=content_del&nodeid=<?php echo $nodeid?>&history=1');return check_checkbox(1);" value="<?php echo L('also_delete_the_historical')?>"/>
<input type="submit" class="button" name="dosubmit" onclick="re_url('m=collection&c=node&a=import&nodeid=<?php echo $nodeid?>');return check_checkbox();" value="<?php echo L('import_selected')?>"/>
<input type="submit" class="button" name="dosubmit" onclick="re_url('m=collection&c=node&a=import&type=all&nodeid=<?php echo $nodeid?>')" value="<?php echo L('import_all')?>"/>
</div>
<div id="pages"><?php echo $pages?></div>
</div>
</form>
</div>
</div>
<script type="text/javascript">
<!--
function re_url(url) {
var urls = url.split('&');
var num = urls.length;
var str = '';
for (var i=0;i<num;i++){
var a = urls[i].split('=');
str +='<input type="hidden" name="'+a[0]+'" value="'+a[1]+'" />';
}
$('#form_').html(str);
}
function check_checkbox(obj) {
var checked = 0;
$("input[type='checkbox'][name='id[]']").each(function (i,n){if (this.checked) {
checked = 1;
}});
if (checked != 0) {
if (obj) {
if (confirm('<?php echo L('sure_delete')?>')) {
return true;
} else {
return false;
}
}
return true;
} else {
alert('<?php echo L('select_article')?>');
return false;
}
}
window.top.$('#display_center_id').css('display','none');
//-->
</script>
</body>
</html>
|
108wo
|
phpcms/modules/collection/templates/publist.tpl.php
|
PHP
|
asf20
| 4,373
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
$spider_funs = array(
'trim'=>'过滤空格',
'spider_photos'=>'处理为组图',
'spider_downurls'=>'处理为下载列表',
'spider_keywords'=>'获取关键字',
);
|
108wo
|
phpcms/modules/collection/spider_funs/config.php
|
PHP
|
asf20
| 237
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
function spider_photos($str) {
$field = $GLOBALS['field'];
$_POST[$field.'_url'] = array();
preg_match_all('/<img[^>]*src=[\'"]?([^>\'"\s]*)[\'"]?[^>]*>/i', $str, $out);
$array = array();
if (isset($out[1]))foreach ($out[1] as $v) {
$_POST[$field.'_url'][] = $v;
}
return '1';
}
function spider_downurls($str) {
$field = $GLOBALS['field'];
$_POST[$field.'_fileurl'] = array();
preg_match_all('/<a[^>]*href=[\'"]?([^>\'"\s]*)[\'"]?[^>]*>/i', $str, $out);
$array = array();
if (isset($out[1]))foreach ($out[1] as $v) {
$_POST[$field.'_fileurl'][] = $v;
}
return '1';
}
|
108wo
|
phpcms/modules/collection/spider_funs/spider_photos.php
|
PHP
|
asf20
| 669
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
function spider_keywords($data) {
$http = pc_base::load_sys_class('http');
if(CHARSET == 'utf-8') {
$data = iconv('utf-8', 'gbk', $data);
}
$http->post('http://tool.phpcms.cn/api/get_keywords.php', array('siteurl'=>APP_PATH, 'charset'=>CHARSET, 'data'=>$data, 'number'=>3));
if($http->is_ok()) {
if(CHARSET != 'utf-8') {
return $http->get_data();
} else {
return iconv('gbk', 'utf-8', $http->get_data());
}
} else {
return $data;
}
}
|
108wo
|
phpcms/modules/collection/spider_funs/spider_keywords.php
|
PHP
|
asf20
| 537
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
class collection {
protected static $url,$config;
/**
* 采集内容
* @param string $url 采集地址
* @param array $config 配置参数
* @param integer $page 分页采集模式
*/
public static function get_content($url, $config, $page = 0) {
set_time_limit(300);
static $oldurl = array();
$page = intval($page) ? intval($page) : 0;
if ($html = self::get_html($url, $config)) {
if (empty($page)) {
//获取标题
if ($config['title_rule']) {
$title_rule = self::replace_sg($config['title_rule']);
$data['title'] = self::replace_item(self::cut_html($html, $title_rule[0], $title_rule[1]), $config['title_html_rule']);
}
//获取作者
if ($config['author_rule']) {
$author_rule = self::replace_sg($config['author_rule']);
$data['author'] = self::replace_item(self::cut_html($html, $author_rule[0], $author_rule[1]), $config['author_html_rule']);
}
//获取来源
if ($config['comeform_rule']) {
$comeform_rule = self::replace_sg($config['comeform_rule']);
$data['comeform'] = self::replace_item(self::cut_html($html, $comeform_rule[0], $comeform_rule[1]), $config['comeform_html_rule']);
}
//获取时间
if ($config['time_rule']) {
$time_rule = self::replace_sg($config['time_rule']);
$data['time'] = strtotime(self::replace_item(self::cut_html($html, $time_rule[0], $time_rule[1]), $config['time_html_rule']));
}
if (empty($data['time'])) $data['time'] = SYS_TIME;
//对自定义数据进行采集
if ($config['customize_config'] = string2array($config['customize_config'])) {
foreach ($config['customize_config'] as $k=>$v) {
if (empty($v['rule'])) continue;
$rule = self::replace_sg($v['rule']);
$data[$v['en_name']] = self::replace_item(self::cut_html($html, $rule[0], $rule[1]), $v['html_rule']);
}
}
}
//获取内容
if ($config['content_rule']) {
$content_rule = self::replace_sg($config['content_rule']);
$data['content'] = self::replace_item(self::cut_html($html, $content_rule[0], $content_rule[1]), $config['content_html_rule']);
}
//处理分页
if (in_array($page, array(0,2)) && !empty($config['content_page_start']) && !empty($config['content_page_end'])) {
$oldurl[] = $url;
$tmp[] = $data['content'];
$page_html = self::cut_html($html, $config['content_page_start'], $config['content_page_end']);
//上下页模式
if ($config['content_page_rule'] == 2 && in_array($page, array(0,2)) && $page_html) {
preg_match_all('/<a[^>]*href=[\'"]?([^>\'" ]*)[\'"]?[^>]*>([^<\/]*)<\/a>/i', $page_html, $out);
if (!empty($out[1]) && !empty($out[2])) {
foreach ($out[2] as $k=>$v) {
if (strpos($v, $config['content_nextpage']) === false) continue;
if ($out[1][$k] == '#') continue;
$out[1][$k] = self::url_check($out[1][$k], $url, $config);
if (in_array($out[1][$k], $oldurl)) continue;
$oldurl[] = $out[1][$k];
$results = self::get_content($out[1][$k], $config, 2);
if (!in_array($results['content'], $tmp)) $tmp[] = $results['content'];
}
}
}
//全部罗列模式
if ($config['content_page_rule'] == 1 && $page == 0 && $page_html) {
preg_match_all('/<a[^>]*href=[\'"]?([^>\'" ]*)[\'"]?/i', $page_html, $out);
if (is_array($out[1]) && !empty($out[1])) {
$out = array_unique($out[1]);
foreach ($out as $k=>$v) {
if ($out[1][$k] == '#') continue;
$v = self::url_check($v, $url, $config);
$results = self::get_content($v, $config, 1);
if (!in_array($results['content'], $tmp)) $tmp[] = $results['content'];
}
}
}
$data['content'] = $config['content_page'] == 1 ? implode('[page]', $tmp) : implode('', $tmp);
}
if ($page == 0) {
self::$url = $url;
self::$config = $config;
$data['content'] = preg_replace('/<img[^>]*src=[\'"]?([^>\'"\s]*)[\'"]?[^>]*>/ie', "self::download_img('$0', '$1')", $data['content']);
//下载内容中的图片到本地
if (empty($page) && !empty($data['content']) && $config['down_attachment'] == 1) {
pc_base::load_sys_class('attachment','',0);
$attachment = new attachment('collection','0',get_siteid());
$data['content'] = $attachment->download('content', $data['content'],$config['watermark']);
}
}
return $data;
}
}
/**
* 转换图片地址为绝对路径,为下载做准备。
* @param array $out 图片地址
*/
protected static function download_img($old, $out) {
if (!empty($old) && !empty($out) && strpos($out, '://') === false) {
return str_replace($out, self::url_check($out, self::$url, self::$config), $old);
} else {
return $old;
}
}
/**
* 得到需要采集的网页列表页
* @param array $config 配置参数
* @param integer $num 返回数
*/
public static function url_list(&$config, $num = '') {
$url = array();
switch ($config['sourcetype']) {
case '1'://序列化
$num = empty($num) ? $config['pagesize_end'] : $num;
for ($i = $config['pagesize_start']; $i <= $num; $i = $i + $config['par_num']) {
$url[$i] = str_replace('(*)', $i, $config['urlpage']);
}
break;
case '2'://多网址
$url = explode("\r\n", $config['urlpage']);
break;
case '3'://单一网址
case '4'://RSS
$url[] = $config['urlpage'];
break;
}
return $url;
}
/**
* 获取文章网址
* @param string $url 采集地址
* @param array $config 配置
*/
public static function get_url_lists($url, &$config) {
if ($html = self::get_html($url, $config)) {
if ($config['sourcetype'] == 4) { //RSS
$xml = pc_base::load_sys_class('xml');
$html = $xml->xml_unserialize($html);
if (pc_base::load_config('system', 'charset') == 'gbk') {
$html = array_iconv($html, 'utf-8', 'gbk');
}
$data = array();
if (is_array($html['rss']['channel']['item']))foreach ($html['rss']['channel']['item'] as $k=>$v) {
$data[$k]['url'] = $v['link'];
$data[$k]['title'] = $v['title'];
}
} else {
$html = self::cut_html($html, $config['url_start'], $config['url_end']);
$html = str_replace(array("\r", "\n"), '', $html);
$html = str_replace(array("</a>", "</A>"), "</a>\n", $html);
preg_match_all('/<a([^>]*)>([^\/a>].*)<\/a>/i', $html, $out);
$out[1] = array_unique($out[1]);
$out[2] = array_unique($out[2]);
$data = array();
foreach ($out[1] as $k=>$v) {
if (preg_match('/href=[\'"]?([^\'" ]*)[\'"]?/i', $v, $match_out)) {
if ($config['url_contain']) {
if (strpos($match_out[1], $config['url_contain']) === false) {
continue;
}
}
if ($config['url_except']) {
if (strpos($match_out[1], $config['url_except']) !== false) {
continue;
}
}
$url2 = $match_out[1];
$url2 = self::url_check($url2, $url, $config);
$data[$k]['url'] = $url2;
$data[$k]['title'] = strip_tags($out[2][$k]);
} else {
continue;
}
}
}
return $data;
} else {
return false;
}
}
/**
* 获取远程HTML
* @param string $url 获取地址
* @param array $config 配置
*/
protected static function get_html($url, &$config) {
if (!empty($url) && $html = @file_get_contents($url)) {
if ($syscharset != $config['sourcecharset'] && $config['sourcetype'] != 4) {
$html = iconv($config['sourcecharset'], CHARSET.'//IGNORE', $html);
}
return $html;
} else {
return false;
}
}
/**
*
* HTML切取
* @param string $html 要进入切取的HTML代码
* @param string $start 开始
* @param string $end 结束
*/
protected static function cut_html($html, $start, $end) {
if (empty($html)) return false;
$html = str_replace(array("\r", "\n"), "", $html);
$start = str_replace(array("\r", "\n"), "", $start);
$end = str_replace(array("\r", "\n"), "", $end);
$html = explode(trim($start), $html);
if(is_array($html)) $html = explode(trim($end), $html[1]);
return $html[0];
}
/**
* 过滤代码
* @param string $html HTML代码
* @param array $config 过滤配置
*/
protected static function replace_item($html, $config) {
if (empty($config)) return $html;
$config = explode("\n", $config);
$patterns = $replace = array();
$p = 0;
foreach ($config as $k=>$v) {
if (empty($v)) continue;
$c = explode('[|]', $v);
$patterns[$k] = '/'.str_replace('/', '\/', $c[0]).'/i';
$replace[$k] = $c[1];
$p = 1;
}
return $p ? @preg_replace($patterns, $replace, $html) : false;
}
/**
* 替换采集内容
* @param $html 采集规则
*/
protected static function replace_sg($html) {
$list = explode(L('[content]'), $html);
if (is_array($list)) foreach ($list as $k=>$v) {
$list[$k] = str_replace(array("\r", "\n"), '', trim($v));
}
return $list;
}
/**
* URL地址检查
* @param string $url 需要检查的URL
* @param string $baseurl 基本URL
* @param array $config 配置信息
*/
protected static function url_check($url, $baseurl, $config) {
$urlinfo = parse_url($baseurl);
$baseurl = $urlinfo['scheme'].'://'.$urlinfo['host'].(substr($urlinfo['path'], -1, 1) === '/' ? substr($urlinfo['path'], 0, -1) : str_replace('\\', '/', dirname($urlinfo['path']))).'/';
if (strpos($url, '://') === false) {
if ($url[0] == '/') {
$url = $urlinfo['scheme'].'://'.$urlinfo['host'].$url;
} else {
if ($config['page_base']) {
$url = $config['page_base'].$url;
} else {
$url = $baseurl.$url;
}
}
}
return $url;
}
}
|
108wo
|
phpcms/modules/collection/classes/collection.class.php
|
PHP
|
asf20
| 10,055
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_dialog = 1;
include $this->admin_tpl('header', 'admin');
?>
<div class="pad-lr-10">
<form name="myform" action="?m=vote&c=vote&a=delete" method="post" onsubmit="checkuid();return false;">
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('subjectid[]');"></th>
<th><?php echo L('title')?></th>
<th width="40" align="center"><?php echo L('vote_num')?></th>
<th width="68" align="center"><?php echo L('startdate')?></th>
<th width="68" align="center"><?php echo L('enddate')?></th>
<th width='68' align="center"><?php echo L('inputtime')?></th>
<th width="180" align="center"><?php echo L('operations_manage')?></th>
</tr>
</thead>
<tbody>
<?php
if(is_array($infos)){
foreach($infos as $info){
?>
<tr>
<td align="center"><input type="checkbox"
name="subjectid[]" value="<?php echo $info['subjectid']?>"></td>
<td><a href="?m=vote&c=index&a=show&show_type=1&subjectid=<?php echo $info['subjectid']?>&siteid=<?php echo $info['siteid'];?>" title="<?php echo L('check_vote')?>" target="_blank"><?php echo $info['subject'];?></a> <font color=red><?php if($info['enabled']==0)echo L('lock'); ?></font></td>
<td align="center"><font color=blue><?php echo $info['votenumber']?></font> </td>
<td align="center"><?php echo $info['fromdate'];?></td>
<td align="center"><?php echo $info['todate'];?></td>
<td align="center"><?php echo date("Y-m-d",$info['addtime']);?></td>
<td align="center"><a href='###'
onclick="statistics(<?php echo $info['subjectid']?>, '<?php echo new_addslashes($info['subject'])?>')"> <?php echo L('statistics')?></a>
| <a href="###"
onclick="edit(<?php echo $info['subjectid']?>, '<?php echo new_addslashes($info['subject'])?>')"
title="<?php echo L('edit')?>"><?php echo L('edit')?></a> | <a href="javascript:call(<?php echo new_addslashes($info['subjectid'])?>);void(0);"><?php echo L('call_js_code')?></a> | <a
href='?m=vote&c=vote&a=delete&subjectid=<?php echo new_addslashes($info['subjectid'])?>'
onClick="return confirm('<?php echo L('vote_confirm_del')?>')"><?php echo L('delete')?></a>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div class="btn"><a href="#"
onClick="javascript:$('input[type=checkbox]').attr('checked', true)"><?php echo L('selected_all')?></a>/<a
href="#"
onClick="javascript:$('input[type=checkbox]').attr('checked', false)"><?php echo L('cancel')?></a>
<input name="submit" type="submit" class="button"
value="<?php echo L('remove_all_selected')?>"
onClick="return confirm('<?php echo L('vote_confirm_del')?>')"> </div>
<div id="pages"><?php echo $pages?></div>
</form>
</div>
<script type="text/javascript">
function edit(id, name) {
window.top.art.dialog({id:'edit'}).close();
window.top.art.dialog({title:'<?php echo L('edit')?> '+name+' ',id:'edit',iframe:'?m=vote&c=vote&a=edit&subjectid='+id,width:'700',height:'450'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
function statistics(id, name) {
window.top.art.dialog({id:'statistics'}).close();
window.top.art.dialog({title:'<?php echo L('statistics')?> '+name+' ',id:'edit',iframe:'?m=vote&c=vote&a=statistics&subjectid='+id,width:'700',height:'350'}, function(){var d = window.top.art.dialog({id:'statistics'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'statistics'}).close()});
}
function call(id) {
window.top.art.dialog({id:'call'}).close();
window.top.art.dialog({title:'<?php echo L('vote')?><?php echo L('linkage_calling_code','','admin');?>', id:'call', iframe:'?m=vote&c=vote&a=public_call&subjectid='+id, width:'600px', height:'470px'}, function(){window.top.art.dialog({id:'call'}).close();}, function(){window.top.art.dialog({id:'call'}).close();})
}
function checkuid() {
var ids='';
$("input[name='subjectid[]']:checked").each(function(i, n){
ids += $(n).val() + ',';
});
if(ids=='') {
window.top.art.dialog({content:'<?php echo L('before_select_operation')?>',lock:true,width:'200',height:'50',time:1.5},function(){});
return false;
} else {
myform.submit();
}
}
</script>
</body>
</html>
|
108wo
|
phpcms/modules/vote/templates/vote_list.tpl.php
|
PHP
|
asf20
| 4,538
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
?>
<form style="border: medium none;" id="voteform<?php echo $subjectid;?>" method="post" action="{APP_PATH}index.php?m=vote&c=index&a=post&subjectid=<?php echo $subjectid;?>">
<dl>
<dt><?php echo $subject;?></dt>
</dl>
<dl>
<?php
if(is_array($options))
{
$i=0;
foreach($options as $optionid=>$option){
$i++;
?>
<dd>
<input type="radio" value="<?php echo $option['optionid']?>" name="radio[]" id="radio">
<?php echo $option['option'];?>
</dd>
<?php }}?>
<input type="hidden" name="voteid" value="<?php echo $subjectid;?>">
</dl>
<p> <input type="submit" value="<?php echo L('submit')?>" name="dosubmit" /> <a href="<?php echo SITE_PROTOCOL.SITE_URL?>/index.php?m=vote&c=index&a=result&id=<?php echo $subjectid;?>"><?php echo L('vote_showresult')?></a> </p>
</form>
|
108wo
|
phpcms/modules/vote/templates/vote_submit.tpl.php
|
PHP
|
asf20
| 907
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');
?>
<script type="text/javascript">
<!--
$(function(){
$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, function(){this.close();$(obj).focus();})}});
$("#subject_title").formValidator({onshow:"<?php echo L("input").L('vote_title')?>",onfocus:"<?php echo L("input").L('vote_title')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('vote_title')?>"}).regexValidator({regexp:"notempty",datatype:"enum",param:'i',onerror:"<?php echo L('input_not_space')?>"}).ajaxValidator({type : "get",url : "",data :"m=vote&c=vote&a=public_name",datatype : "html",async:'false',success : function(data){ if( data == "1" ){return true;}else{return false;}},buttons: $("#dosubmit"),onerror : "<?php echo L('vote_title').L('exists')?>",onwait : "<?php echo L('connecting')?>"});
$("#option1").formValidator({onshow:"<?php echo L("input").L('vote_option')?>",onfocus:"<?php echo L("input").L('vote_option')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('vote_option')?>"}).regexValidator({regexp:"notempty",datatype:"enum",param:'i',onerror:"<?php echo L('input_not_space')?>"});
$("#option2").formValidator({onshow:"<?php echo L("input").L('vote_option')?>",onfocus:"<?php echo L("input").L('vote_option')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('vote_option')?>"}).regexValidator({regexp:"notempty",datatype:"enum",param:'i',onerror:"<?php echo L('input_not_space')?>"});
$("#fromdate").formValidator({onshow:"<?php echo L('select').L('fromdate')?>",onfocus:"<?php echo L('select').L('fromdate')?>",oncorrect:"<?php echo L('time_is_ok');
?>"}).inputValidator();
$("#todate").formValidator({onshow:"<?php echo L('select').L('todate')?>",onfocus:"<?php echo L('select').L('todate')?>",oncorrect:"<?php echo L('time_is_ok');?>"}).inputValidator();
$('#style').formValidator({onshow:"<?php echo L('select_style')?>",onfocus:"<?php echo L('select_style')?>",oncorrect:"<?php echo L('right_all')?>"}).inputValidator({min:1,onerror:"<?php echo L('select_style')?>"});
});
//-->
</script>
<div class="pad_10">
<form action="?m=vote&c=vote&a=add" method="post" name="myform" id="myform">
<table cellpadding="2" cellspacing="1" class="table_form" width="100%">
<tr>
<th width="100"><?php echo L('vote_title')?> :</th>
<td><input type="text" name="subject[subject]" id="subject_title"
size="30" class="input-text"></td>
</tr>
<tr>
<th width="20%"><?php echo L('select_type')?> :</th>
<td><select name="subject[ischeckbox]" id=""
onchange="AdsType(this.value)">
<option value="0"><?php echo L('radio');?></option>
<option value="1"><?php echo L('checkbox');?></option>
</select></td>
</tr>
<tr id="SizeFormat" style="display: none;">
<th></th>
<td><label><?php echo L('minval')?></label> <input name="subject[minval]"
class="input-text" type="text" size="5"> <?php echo L('item')?> <label><?php echo L('maxval')?></label> <input
name="subject[maxval]" type="text" class="input-text" size="5"> <?php echo L('item')?></td>
</tr>
<tr>
<th width="20%"><?php echo L('vote_option')?> :</th>
<td>
<input type="button" id="addItem" value="<?php echo L('add_option')?>" class="button" onclick="add_option()">
<div id="option_list_1">
<div><br> <input type="text"
name="option[]" id="option1" size="40" require="true"
id="opt1"/></div>
<div><br>
<input type="text"
name="option[]" id="option2" size="40"
id="opt2" /></div>
</div>
<div id="new_option"></div>
</td>
</tr>
<tr>
<th><?php echo L('fromdate')?> :</th>
<td><?php echo form::date('subject[fromdate]', '', '')?></td>
</tr>
<tr>
<th><?php echo L('todate')?> :</th>
<td><?php echo form::date('subject[todate]', '', '')?></td>
</tr>
<tr>
<th><?php echo L('vote_description')?></th>
<td><textarea name="subject[description]" id="description" cols="60"
rows="6"></textarea></td>
</tr>
<tr>
<th><?php echo L('allowview')?>:</th>
<td><input name="subject[allowview]" type="radio" value="1" checked> <?php echo L('allow')?> <input
name="subject[allowview]" type="radio" value="0"> <?php echo L('not_allow')?></td>
</tr>
<tr>
<th><?php echo L('allowguest')?>:</th>
<td><input name="subject[allowguest]" type="radio" value="1" <?php if($allowguest == 1) {?>checked<?php }?>> <?php echo L('yes')?> <input
name="subject[allowguest]" type="radio" value="0" <?php if($allowguest == 0) {?>checked<?php }?>> <?php echo L('no')?></td>
</tr>
<tr>
<th><?php echo L('credit')?>:</th>
<td><input name="subject[credit]" type="text" value="<?php echo $credit;?>" size='5'></td>
</tr>
<tr>
<th><?php echo L('interval')?>: </th>
<td> <input type="text" name="subject[interval]" value="<?php echo $interval;?>" size='5' /> <?php echo L('more_ip')?>,<font color=red>0</font> <?php echo L('one_ip')?></td>
</tr>
<tr>
<th><?php echo L('vote_style')?>:</th>
<td>
<?php echo form::select($template_list, $default_style, 'name="vote_subject[style]" id="style" onchange="load_file_list(this.value)"', L('please_select'))?>
</td>
</tr>
<tr>
<th><?php echo L('template')?>:</th>
<td id="show_template">
<?php echo form::select_template($default_style, 'vote', $vote_tp_template, 'name="vote_subject[vote_tp_template]"', 'vote_tp');?>
</td>
</tr>
<tr>
<th><?php echo L('enabled')?>:</th>
<td><input name="subject[enabled]" type="radio" value="1" <?php if($enabled == 1) {?>checked<?php }?>> <?php echo L('yes')?> <input
name="subject[enabled]" type="radio" value="0" <?php if($enabled == 0) {?>checked<?php }?>> <?php echo L('no')?></td>
</tr>
<tr>
<th></th>
<td>
<input type="hidden"name="from_api" value="<?php echo $_GET['from_api'];?>">
<input type="submit" name="dosubmit" id="dosubmit" class="dialog"
value=" <?php echo L('submit')?> "></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<script language="javascript" type="text/javascript">
function AdsType(adstype) {
$('#SizeFormat').css('display', 'none');
if(adstype=='0') {
} else if(adstype=='1') {
$('#SizeFormat').css('display', '');
}
}
$('#AlignBox').click( function (){
if($('#AlignBox').attr('checked')) {
$('#PaddingLeft').attr('disabled', true);
$('#PaddingTop').attr('disabled', true);
} else {
$('#PaddingLeft').attr('disabled', false);
$('#PaddingTop').attr('disabled', false);
}
});
</script>
<script language="javascript">
var i = 1;
function add_option() {
//var i = 1;
var htmloptions = '';
htmloptions += '<div id='+i+'><span><br><input type="text" name="option[]" size="40" msg="<?php echo L('must_input')?>" value="" class="input-text"/><input type="button" value="<?php echo L('del')?>" onclick="del('+i+')" class="button"/><br></span></div>';
$(htmloptions).appendTo('#new_option');
var htmloptions = '';
i = i+1;
}
function del(o){
$("div [id=\'"+o+"\']").remove();
}
function load_file_list(id) {
$.getJSON('?m=admin&c=category&a=public_tpl_file_list&style='+id+'&module=vote&templates=vote_tp&name=vote_subject&pc_hash='+pc_hash, function(data){$('#show_template').html(data.vote_tp_template);});
}
</script>
|
108wo
|
phpcms/modules/vote/templates/vote_add.tpl.php
|
PHP
|
asf20
| 7,560
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_dialog = 1;
include $this->admin_tpl('header', 'admin');
?>
<div class="pad-10">
<div class="col-tab">
<ul class="tabBut cu-li">
<li class="on"><a href="?m=vote&c=vote&a=statistics_userlist&subjectid=<?php echo $subjectid;?>"><?php echo L('user_list')?></a></li>
<li><a href="?m=vote&c=vote&a=statistics&subjectid=<?php echo $subjectid;?>"><?php echo L('vote_result')?></a></li>
</ul>
<div class="content pad-10" style="height:auto">
<form name="myform" action="?m=vote&c=vote&a=delete_statistics" method="post">
<div class="table-list">
<br>
<table width="100%" cellspacing="0">
<thead>
<tr>
<th><?php echo L('username')?></th>
<th width="155" align="center"><?php echo L('up_vote_time')?></th>
<th width="14%" align="center"><?php echo L('ip')?></th>
</tr>
</thead>
<tbody>
<?php
if(is_array($infos)){
foreach($infos as $info){
?>
<tr>
<td><?php if($info['username']=="")echo L('guest');else echo $info['username']?></td>
<td align="center" width="155"><?php echo date("Y-m-d h-i",$info['time']);?></td>
<td align="center" width="14%"><?php echo $info['ip'];?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div id="pages"><?php echo $pages?></div>
</form>
</div>
</div>
</div>
</body>
</html>
<script type="text/javascript">
function edit(id, name) {
window.top.art.dialog({id:'edit'}).close();
window.top.art.dialog({title:'<?php echo L('edit')?> '+name+' ',id:'edit',iframe:'?m=vote&c=vote&a=edit&subjectid='+id,width:'700',height:'450'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
</script>
|
108wo
|
phpcms/modules/vote/templates/vote_statistics_userlist.tpl.php
|
PHP
|
asf20
| 1,864
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_header = $show_validator = $show_scroll = 1;
include $this->admin_tpl('header', 'admin');
?>
<div class="pad-10">
<h2 class="title-1 f14 lh28">(<?php echo $r['subject'];?>)<?php echo L('vote_call')?></h2>
<div class="bk10"></div>
<div class="explain-col">
<strong><?php echo L('vote_call_info')?>:</strong><br />
<?php echo L('vote_call_infos')?>
</div>
<div class="bk10"></div>
<fieldset>
<legend><?php echo L('vote_call_1')?></legend>
<?php echo L('vote_phpcall')?><br />
<input name="jscode1" id="jscode1" value='<script language="javascript" src="<?php echo APP_PATH;?>index.php?m=vote&c=index&a=show&action=js&subjectid=<?php echo $r['subjectid']?>&type=3"></script>' style="width:410px"> <input type="button" onclick="$('#jscode1').select();document.execCommand('Copy');" value="<?php echo L('copy_code')?>" class="button" style="width:114px">
</fieldset>
<div class="bk10"></div>
<fieldset>
<legend><?php echo L('vote_call_2')?></legend>
<?php echo L('vote_phpcall')?><br />
<input name="jscode2" id="jscode2" value='<script language="javascript" src="<?php echo APP_PATH;?>index.php?m=vote&c=index&a=show&action=js&subjectid=<?php echo $r['subjectid']?>&type=2"></script>' style="width:410px">
<input type="button" onclick="$('#jscode2').select();document.execCommand('Copy');" value="<?php echo L('copy_code')?>" class="button" style="width:114px">
</fieldset>
<div class="bk10"></div>
<fieldset>
<legend><?php echo L('vote_jscall')?></legend>
<?php echo L('vote_jscall_info')?><br />
<input name="jscode2" id="jscode3" value='<script language="javascript" src="<?php echo APP_PATH;?>caches/vote_js/vote_<?php echo $r['subjectid']?>.js"></script>' style="width:410px">
<input type="button" onclick="$('#jscode3').select();document.execCommand('Copy');" value="<?php echo L('copy_code')?>" class="button" style="width:114px">
</fieldset>
</div>
</body>
</html>
|
108wo
|
phpcms/modules/vote/templates/vote_call.tpl.php
|
PHP
|
asf20
| 2,003
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header','admin');
?>
<script type="text/javascript">
<!--
$(function(){
$.formValidator.initConfig({formid:"myform",autotip:true,onerror:function(msg,obj){window.top.art.dialog({content:msg,lock:true,width:'200',height:'50'}, function(){this.close();$(obj).focus();})}});
$("#subject_title").formValidator({onshow:"<?php echo L("input").L('vote_title')?>",onfocus:"<?php echo L("input").L('vote_title')?>"}).inputValidator({min:1,onerror:"<?php echo L("input").L('vote_title')?>"}).regexValidator({regexp:"notempty",datatype:"enum",param:'i',onerror:"<?php echo L('input_not_space')?>"}).ajaxValidator({type : "get",url : "",data :"m=vote&c=vote&a=public_name&subjectid=<?php echo $subjectid;?>",datatype : "html",async:'false',success : function(data){ if( data == "1" ){return true;}else{return false;}},buttons: $("#dosubmit"),onerror : "<?php echo L('vote_title').L('exists')?>",onwait : "<?php echo L('connecting')?>"}).defaultPassed();
$('#fromdate').formValidator({onshow:"<?php echo L('select').L('fromdate')?>",onfocus:"<?php echo L('select').L('fromdate')?>",oncorrect:"<?php echo L('time_is_ok');
?>"}).inputValidator();
$("#todate").formValidator({onshow:"<?php echo L('select').L('todate')?>",onfocus:"<?php echo L('select').L('todate')?>",oncorrect:"<?php echo L('time_is_ok');?>"}).inputValidator();
});
//-->
</script>
<div class="pad_10">
<form action="?m=vote&c=vote&a=edit&subjectid=<?php echo $subjectid?>" method="post" name="myform" id="myform">
<table cellpadding="2" cellspacing="1" class="table_form" width="100%">
<tr>
<th width="100"> <?php echo L('vote_title')?></th>
<td>
<input type="text" name="subject[subject]" id="subject_title" size="30" value="<?php echo $subject;?>">
</td>
</tr>
<tr>
<th width="100"> <?php echo L('select_type')?> </th>
<td>
<select name="subject[ischeckbox]" id="" onchange="AdsType(this.value)">
<option value="0" <?php if($ischeckbox == '0') {?> selected<?}?>><?php echo L('radio');?></option>
<option value="1" <?php if($ischeckbox == '1') {?> selected<?}?>><?php echo L('checkbox');?></option>
</select>
</td>
</tr>
<tr id="SizeFormat" <?php if($ischeckbox == '0'){ ?>style="display:none"<?php }else{?>style="display:"<?php }?>>
<th> </th>
<td><label><?php echo L('minval');?></label> <input name="subject[minval]" class="input-text" type="text" size="5" value="<?php echo $minval;?>"> <?php echo L('item')?> <label><?php echo L('maxval');?></label> <input name="subject[maxval]" type="text" class="input-text" size="5" value="<?php echo $maxval?>"> <?php echo L('item')?></td>
</tr>
<tr>
<th width="100"> <?php echo L('vote_option')?>:</th>
<td>
<input type="button" id="addItem" value="<?php echo L('add_option')?>" class="button" onclick="add_option()">
<div id="option_list_1">
<?php
$i=0;
foreach($options as $optionid=>$option){
$i++;
?>
<div id="option<?php echo $option['optionid'];?>"><br>
<input type="text" name="option[<?php echo $option['optionid']?>]" size="40" require="true" value="<?php echo $option['option'];?>"/>
<?php if($i>2){?>
<input type="button" value="<?php echo L('del')?>" onclick="del_old(<?php echo $option['optionid'];?>)" class="button"/>
<?php }?>
<font color="#FF0000"> *</font>
</div>
<?php }?>
</div>
<div id="new_option"></div>
</td>
</tr>
<tr>
<th><?php echo L('fromdate')?>:</th>
<td><?php echo form::date('subject[fromdate]',$fromdate)?></td>
</tr>
<tr>
<th><?php echo L('todate')?> :</th>
<td><?php echo form::date('subject[todate]',$todate)?></td>
</tr>
<tr>
<th> <?php echo L('vote_description')?> </th>
<td><textarea name="subject[description]" id="description" cols="60" rows="6"><?php echo $description;?></textarea></td>
</tr>
<tr>
<th><?php echo L('allowview')?>:</th>
<td><input name="subject[allowview]" type="radio" value="1" <?php echo $allowview?'checked':''?>> <?php echo L('allow')?> <input name="subject[allowview]" type="radio" value="0" <?php echo $allowview?'':'checked'?>> <?php echo L('not_allow')?></td>
</tr>
<tr>
<th><?php echo L('allowguest')?>:</th>
<td><input name="subject[allowguest]" type="radio" value="1" <?php echo $allowguest?'checked':''?>> <?php echo L('yes')?> <input name="subject[allowguest]" type="radio" value="0" <?php echo $allowguest?'':'checked'?>> <?php echo L('no')?></td>
</tr>
<tr>
<th><?php echo L('credit')?>:</th>
<td><input type="text" name="subject[credit]" value="<?php echo $credit;?>" size='5' /></td>
</tr>
<tr>
<th><?php echo L('interval')?>:</th>
<td><input type="text" name="subject[interval]" value="<?php echo $interval;?>" size='5' /> <?php echo L('more_ip')?>,<font color=red>0</font> <?php echo L('one_ip')?></td>
</tr>
<tr>
<th><?php echo L('vote_style')?>:</th>
<td>
<?php echo form::select($template_list, $info['default_style'], 'name="vote_subject[style]" id="style" onchange="load_file_list(this.value)"', L('please_select'))?>
<script type="text/javascript">$.getJSON('?m=admin&c=category&a=public_tpl_file_list&style=<?php echo $info['default_style']?>&module=vote&templates=vote_tp&id=<?php echo $template?>&name=vote_subject&pc_hash='+pc_hash, function(data){$('#show_template').html(data.vote_tp_template);});</script>
</td>
</tr>
<tr>
<th><?php echo L('template')?>:</th>
<td id="show_template">
<?php echo form::select_template('default', 'vote', $template, 'name="vote_subject[show_template]"', 'vote_tp');?>
</td>
</tr>
<tr>
<th><?php echo L('enabled')?>:</th>
<td><input name="subject[enabled]" type="radio" value="1" <?php echo $enabled?'checked':''?>> <?php echo L('yes')?> <input name="subject[enabled]" type="radio" value="0" <?php echo $enabled?'':'checked'?>> <?php echo L('no')?></td>
</tr>
<tr>
<th></th>
<td>
<input type="submit" name="dosubmit" id="dosubmit" class="dialog" value=" <?php echo L('submit')?> ">
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
<script language="javascript" type="text/javascript">
function AdsType(adstype) {
$('#SizeFormat').css('display', 'none');
if(adstype=='0') {
} else if(adstype=='1') {
$('#SizeFormat').css('display', '');
}
}
$('#AlignBox').click( function (){
if($('#AlignBox').attr('checked')) {
$('#PaddingLeft').attr('disabled', true);
$('#PaddingTop').attr('disabled', true);
} else {
$('#PaddingLeft').attr('disabled', false);
$('#PaddingTop').attr('disabled', false);
}
});
</script>
<script language="javascript">
var i = 1;
function add_option() {
//var i = 1;
var htmloptions = '';
htmloptions += '<div id='+i+'><span ><br><input type="text" name="newoption[]" size="40" msg="<?php echo L('must_input')?>" value="" class="input-text"/><input type="button" value="<?php echo L('del')?>" onclick="del('+i+')" class="button"/></span><font color="#FF0000"> *</font><br> </div>';
$(htmloptions).appendTo('#new_option');
var htmloptions = '';
i = i+1;
}
function del(o){
$("div [id=\'"+o+"\']").remove();
}
function del_old2(o){
$("div [id=\'"+o+"\']").remove();
}
function del_old(id) {
$.get('?m=vote&c=vote&a=del_option&optionid='+id,null,function (msg) {
if (msg==1) {
$("div [id=\'option"+id+"\']").remove();
} else {
alert(msg);
}
});
}
function load_file_list(id) {
$.getJSON('?m=admin&c=category&a=public_tpl_file_list&style='+id+'&module=vote&templates=vote_tp&name=subject&pc_hash='+pc_hash, function(data){$('#show_template').html(data.vote_tp_template);});
}
</script>
|
108wo
|
phpcms/modules/vote/templates/vote_edit.tpl.php
|
PHP
|
asf20
| 8,078
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header', 'admin');?>
<form method="post" action="?m=vote&c=vote&a=setting">
<table width="100%" cellpadding="0" cellspacing="1" class="table_form">
<tr>
<th width="200"><?php echo L('vote_style')?>:</th>
<td>
<?php echo form::select($template_list, $default_style, 'name="setting[default_style]" id="style" onchange="load_file_list(this.value)"', L('please_select'))?>
</td>
</tr>
<tr>
<th><?php echo L('template')?>:</th>
<td id="show_template">
<?php echo form::select_template($default_style, 'vote', $vote_tp_template, 'name="setting[vote_tp_template]"', 'vote_tp');?>
</td>
</tr>
<tr>
<th><?php echo L('default_guest')?>:</th>
<td><input type='radio' name='setting[allowguest]' value='1' <?php if($allowguest == 1) {?>checked<?php }?>> <?php echo L('yes')?>
<input type='radio' name='setting[allowguest]' value='0' <?php if($allowguest == 0) {?>checked<?php }?>> <?php echo L('no')?></td>
</tr>
<tr>
<th><?php echo L('default_enabled')?>:</th>
<td><input type='radio' name='setting[enabled]' value='1' <?php if($enabled == 1) {?>checked<?php }?>> <?php echo L('yes')?>
<input type='radio' name='setting[enabled]' value='0' <?php if($enabled == 0) {?>checked<?php }?>> <?php echo L('no')?></td>
</tr>
<tr>
<th><?php echo L('interval')?>:</th>
<td>
<input type="text" name="setting[interval]" value="<?php echo $interval;?>" size='5' /> <?php echo L('more_ip')?>,<font color=red>0</font> <?php echo L('one_ip')?>
</td>
</tr>
<tr>
<th><?php echo L('credit')?>:</th>
<td>
<input type="text" name="setting[credit]" value="<?php echo $credit?>" size='5' />
</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="dosubmit" id="dosubmit" value=" <?php echo L('confirm')?>" class="button"> <input type="reset" value=" <?php echo L('reset')?> " class="button"></td>
</tr>
</table>
</form>
</body>
</html>
<script language="javascript">
function load_file_list(id) {
$.getJSON('?m=admin&c=category&a=public_tpl_file_list&style='+id+'&module=vote&templates=vote_tp&name=setting&pc_hash='+pc_hash, function(data){$('#show_template').html(data.vote_tp_template);});
}
</script>
|
108wo
|
phpcms/modules/vote/templates/setting.tpl.php
|
PHP
|
asf20
| 2,360
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_dialog = 1;
include $this->admin_tpl('header', 'admin');
?>
<div class="pad-lr-10">
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th><?php echo L('title')?></th>
<th width="14%" align="center"><?php echo L('startdate')?></th>
<th width="14%" align="center"><?php echo L('enddate')?></th>
<th width='20%' align="center"><?php echo L('inputtime')?></th>
</tr>
</thead>
<tbody>
<?php
if(is_array($infos)){
foreach($infos as $info){
?>
<tr onclick="return_id(<?php echo $info['subjectid'];?>, '<?php echo addslashes($info['subject'])?>')" style="cursor:hand" title="<?php echo L('check_select')?>">
<td><?php if($target=='dialog') {?><input type='radio' id="voteid_<?php echo $info['subjectid']?>" name="subjectid"><?php } echo $info['subject']?></td>
<td ><?php echo $info['fromdate'];?></td>
<td ><?php echo $info['todate'];?></td>
<td ><?php echo date("Y-m-d h-i",$info['addtime']);?></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<input type="hidden" name="msg_id" id="msg_id">
<div id="pages"><?php echo $this->pages?></div>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
function return_id(voteid, title) {
<?php if ($target=='dialog') {?>
$('#voteid_'+voteid).attr('checked', 'true');
$('#msg_id').val('vote|'+voteid+'|'+title);
<?php }?>
window.top.$('#voteid').val(voteid);<?php if(!$target) {?>window.top.art.dialog({id:'selectid'}).close(); <?php }?>
}
//-->
</SCRIPT>
</body>
</html>
|
108wo
|
phpcms/modules/vote/templates/get_votelist.tpl.php
|
PHP
|
asf20
| 1,571
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
$show_dialog = 1;
include $this->admin_tpl('header', 'admin');
?>
<div class="pad-10">
<div class="col-tab">
<ul class="tabBut cu-li">
<li><a href="?m=vote&c=vote&a=statistics_userlist&subjectid=<?php echo $subjectid;?>"><?php echo L('user_list')?></a></li>
<li class="on"><a href="?m=vote&c=vote&a=statistics&subjectid=<?php echo $subjectid;?>"><?php echo L('vote_result')?></a></li>
</ul>
<div class="content pad-10" style="height:auto">
<form name="myform" action="?m=vote&c=vote&a=delete_statistics" method="post">
<table width="100%" cellspacing="0" class="table-list">
<thead>
<tr>
<th><?php echo L('vote_option')?></th>
<th width="10%" align="center"><?php echo L('vote_num')?></th>
<th width='30%' align="center"><?php echo L('pic_view')?></th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
if(is_array($options)){
foreach($options as $info){
//没有人投票则 百分比都为 0%
if($vote_data['total']==0){
$per=0;
}else{
$per=intval($vote_data[$info['optionid']]/$vote_data['total']*100);
}
?>
<tr>
<td> <?php echo $i.' , '.$info['option']?> </td>
<td align="center"><?php echo $vote_data[$info['optionid']];?></td>
<td align="center">
<div class="vote_bar">
<div style="width:<?php echo $per?>%"><span><?php echo $per;?> %</span> </div>
</div>
</td>
</tr>
<?php
$i++;
}
}
?>
</tbody>
</table>
<div id="pages">
<?php echo L('vote_all_num')?> <?php echo $vote_data['total'];?><br>
</div>
</form>
</div>
</div>
</div>
</body>
</html>
<script type="text/javascript">
function edit(id, name) {
window.top.art.dialog({id:'edit'}).close();
window.top.art.dialog({title:'<?php echo L('edit')?> '+name+' ',id:'edit',iframe:'?m=vote&c=vote&a=edit&subjectid='+id,width:'700',height:'450'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
</script>
|
108wo
|
phpcms/modules/vote/templates/vote_statistics.tpl.php
|
PHP
|
asf20
| 2,094
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
pc_base::load_app_class('admin','admin',0);
class vote extends admin {
private $db2, $db;
function __construct() {
parent::__construct();
$this->M = new_html_special_chars(getcache('vote', 'commons'));
$this->db = pc_base::load_model('vote_subject_model');
$this->db2 = pc_base::load_model('vote_option_model');
}
public function init() {
$page = isset($_GET['page']) && intval($_GET['page']) ? intval($_GET['page']) : 1;
$infos = $this->db->listinfo(array('siteid'=>$this->get_siteid()),'subjectid DESC',$page, '14');
$pages = $this->db->pages;
$big_menu = array('javascript:window.top.art.dialog({id:\'add\',iframe:\'?m=vote&c=vote&a=add\', title:\''.L('vote_add').'\', width:\'700\', height:\'450\'}, function(){var d = window.top.art.dialog({id:\'add\'}).data.iframe;var form = d.document.getElementById(\'dosubmit\');form.click();return false;}, function(){window.top.art.dialog({id:\'add\'}).close()});void(0);', L('vote_add'));
include $this->admin_tpl('vote_list');
}
/*
*判断标题重复和验证
*/
public function public_name() {
$subject_title = isset($_GET['subject_title']) && trim($_GET['subject_title']) ? (pc_base::load_config('system', 'charset') == 'gbk' ? iconv('utf-8', 'gbk', trim($_GET['subject_title'])) : trim($_GET['subject_title'])) : exit('0');
$subjectid = isset($_GET['subjectid']) && intval($_GET['subjectid']) ? intval($_GET['subjectid']) : '';
$data = array();
if ($subjectid) {
$data = $this->db->get_one(array('subjectid'=>$subjectid), 'subject');
if (!empty($data) && $data['subject'] == $subject_title) {
exit('1');
}
}
if ($this->db->get_one(array('subject'=>$subject_title), 'subjectid')) {
exit('0');
} else {
exit('1');
}
}
/*
*判断结束时间是否比当前时间小
*/
public function checkdate() {
$nowdate = date('Y-m-d',SYS_TIME);
$todate = $_GET['todate'];
if($todate > $nowdate){
exit('1');
}else {
exit('0');
}
}
/**
* 添加投票
*/
public function add() {
//读取配置文件
$data = array();
$data = $this->M;
$siteid = $this->get_siteid();//当前站点
if(isset($_POST['dosubmit'])) {
$_POST['subject']['addtime'] = SYS_TIME;
$_POST['subject']['siteid'] = $this->get_siteid();
if(empty($_POST['subject']['subject'])) {
showmessage(L('vote_title_noempty'),'?m=vote&c=vote&a=add');
}
//记录选项条数 optionnumber
$_POST['subject']['optionnumber'] = count($_POST['option']);
$_POST['subject']['template'] = $_POST['vote_subject']['vote_tp_template'];
$subjectid = $this->db->insert($_POST['subject'],true);
if(!$subjectid) return FALSE; //返回投票ID值, 以备下面添加对应选项用,不存在返回错误
//添加选项操作
$this->db2->add_options($_POST['option'],$subjectid,$this->get_siteid());
//生成JS文件
$this->update_votejs($subjectid);
if(isset($_POST['from_api'])&& $_POST['from_api']) {
showmessage(L('operation_success'),'?m=vote&c=vote&a=add','100', '',"window.top.$('#voteid').val('".$subjectid."');window.top.art.dialog({id:'addvote'}).close();");
} else {
showmessage(L('operation_success'),'?m=vote&c=vote','','add');
}
} else {
$show_validator = $show_scroll = $show_header = true;
pc_base::load_sys_class('form', '', 0);
@extract($data[$siteid]);
//模版
pc_base::load_app_func('global', 'admin');
$siteid = $this->get_siteid();
$template_list = template_list($siteid, 0);
$site = pc_base::load_app_class('sites','admin');
$info = $site->get_by_id($siteid);
foreach ($template_list as $k=>$v) {
$template_list[$v['dirname']] = $v['name'] ? $v['name'] : $v['dirname'];
unset($template_list[$k]);
}
include $this->admin_tpl('vote_add');
}
}
/**
* 编辑投票
*/
public function edit() {
if(isset($_POST['dosubmit'])){
//验证数据正确性
$subjectid = intval($_GET['subjectid']);
if($subjectid < 1) return false;
if(!is_array($_POST['subject']) || empty($_POST['subject'])) return false;
if((!$_POST['subject']['subject']) || empty($_POST['subject']['subject'])) return false;
$this->db2->update_options($_POST['option']);//先更新已有 投票选项,再添加新增加投票选项
if(is_array($_POST['newoption'])&&!empty($_POST['newoption'])){
$siteid = $this->get_siteid();//新加选项站点ID
$this->db2->add_options($_POST['newoption'],$subjectid,$siteid);
}
//模版
$_POST['subject']['template'] = $_POST['vote_subject']['vote_tp_template'];
$_POST['subject']['optionnumber'] = count($_POST['option'])+count($_POST['newoption']);
$this->db->update($_POST['subject'],array('subjectid'=>$subjectid));//更新投票选项总数
$this->update_votejs($subjectid);//生成JS文件
showmessage(L('operation_success'),'?m=vote&c=vote&a=edit','', 'edit');
}else{
$show_validator = $show_scroll = $show_header = true;
pc_base::load_sys_class('form', '', 0);
//解出投票内容
$info = $this->db->get_one(array('subjectid'=>$_GET['subjectid']));
if(!$info) showmessage(L('operation_success'));
extract($info);
//解出投票选项
$this->db2 = pc_base::load_model('vote_option_model');
$options = $this->db2->get_options($_GET['subjectid']);
//模版
pc_base::load_app_func('global', 'admin');
$siteid = $this->get_siteid();
$template_list = template_list($siteid, 0);
$site = pc_base::load_app_class('sites','admin');
$info = $site->get_by_id($siteid);
foreach ($template_list as $k=>$v) {
$template_list[$v['dirname']] = $v['name'] ? $v['name'] : $v['dirname'];
unset($template_list[$k]);
}
include $this->admin_tpl('vote_edit');
}
}
/**
* 删除投票
* @param intval $sid 投票的ID,递归删除
*/
public function delete() {
if((!isset($_GET['subjectid']) || empty($_GET['subjectid'])) && (!isset($_POST['subjectid']) || empty($_POST['subjectid']))) {
showmessage(L('illegal_parameters'), HTTP_REFERER);
} else {
if(is_array($_POST['subjectid'])){
foreach($_POST['subjectid'] as $subjectid_arr) {
//删除对应投票的选项
$this->db2 = pc_base::load_model('vote_option_model');
$this->db2->del_options($subjectid_arr);
$this->db->delete(array('subjectid'=>$subjectid_arr));
}
showmessage(L('operation_success'),'?m=vote&c=vote');
}else{
$subjectid = intval($_GET['subjectid']);
if($subjectid < 1) return false;
//删除对应投票的选项
$this->db2 = pc_base::load_model('vote_option_model');
$this->db2->del_options($subjectid);
//删除投票
$this->db->delete(array('subjectid'=>$subjectid));
$result = $this->db->delete(array('subjectid'=>$subjectid));
if($result)
{
showmessage(L('operation_success'),'?m=vote&c=vote');
}else {
showmessage(L("operation_failure"),'?m=vote&c=vote');
}
}
showmessage(L('operation_success'), HTTP_REFERER);
}
}
/**
* 说明:删除对应投票选项
* @param $optionid
*/
public function del_option() {
$result = $this->db2->del_option($_GET['optionid']);
if($result) {
echo 1;
} else {
echo 0;
}
}
/**
* 投票模块配置
*/
public function setting() {
//读取配置文件
$data = array();
$siteid = $this->get_siteid();//当前站点
//更新模型数据库,重设setting 数据.
$m_db = pc_base::load_model('module_model');
$data = $m_db->select(array('module'=>'vote'));
$setting = string2array($data[0]['setting']);
$now_seting = $setting[$siteid];
if(isset($_POST['dosubmit'])) {
//多站点存储配置文件
$siteid = $this->get_siteid();//当前站点
$setting[$siteid] = $_POST['setting'];
setcache('vote', $setting, 'commons');
//更新模型数据库,重设setting 数据.
$set = array2string($setting);
$m_db->update(array('setting'=>$set), array('module'=>ROUTE_M));
showmessage(L('setting_updates_successful'), '?m=vote&c=vote&a=init');
} else {
@extract($now_seting);
pc_base::load_sys_class('form', '', 0);
//模版
pc_base::load_app_func('global', 'admin');
$siteid = $this->get_siteid();
$template_list = template_list($siteid, 0);
$site = pc_base::load_app_class('sites','admin');
$info = $site->get_by_id($siteid);
foreach ($template_list as $k=>$v) {
$template_list[$v['dirname']] = $v['name'] ? $v['name'] : $v['dirname'];
unset($template_list[$k]);
}
include $this->admin_tpl('setting');
}
}
/**
* 检查表单数据
* @param Array $data 表单传递过来的数组
* @return Array 检查后的数组
*/
private function check($data = array()) {
if($data['name'] == '') showmessage(L('name_plates_not_empty'));
if(!isset($data['width']) || $data['width']==0) {
showmessage(L('plate_width_not_empty'), HTTP_REFERER);
} else {
$data['width'] = intval($data['width']);
}
if(!isset($data['height']) || $data['height']==0) {
showmessage(L('plate_height_not_empty'), HTTP_REFERER);
} else {
$data['height'] = intval($data['height']);
}
return $data;
}
/**
* 投票结果统计
*/
public function statistics() {
$subjectid = $_GET['subjectid'];
$show_validator = $show_scroll = $show_header = true;
//获取投票信息
$sdb = pc_base::load_model('vote_data_model'); //加载投票统计的数据模型
$infos = $sdb->select("subjectid = $subjectid",'data');
//新建一数组用来存新组合数据
$total = 0;
$vote_data =array();
$vote_data['total'] = 0 ;//所有投票选项总数
$vote_data['votes'] = 0 ;//投票人数
//循环每个会员的投票记录
foreach($infos as $subjectid_arr) {
extract($subjectid_arr);
$arr = string2array($data);
foreach($arr as $key => $values){
$vote_data[$key]+=1;
}
$total += array_sum($arr);
$vote_data['votes']++ ;
}
$vote_data['total'] = $total ;
//取投票选项
$options = $this->db2->get_options($subjectid);
include $this->admin_tpl('vote_statistics');
}
/**
* 投票会员统计
*/
public function statistics_userlist() {
$subjectid = $_GET['subjectid'];
if(empty($subjectid)) return false;
$show_validator = $show_scroll = $show_header = true;
$where = array ("subjectid" => $subjectid);
$sdb = pc_base::load_model('vote_data_model'); //调用统计的数据模型
$page = isset($_GET['page']) && intval($_GET['page']) ? intval($_GET['page']) : 1;
$infos = $sdb->listinfo($where,'time DESC',$page,'7');
$pages = $sdb->pages;
include $this->admin_tpl('vote_statistics_userlist');
}
/**
* 说明:生成JS投票代码
* @param $subjectid 投票ID
*/
function update_votejs($subjectid){
if(!isset($subjectid)||intval($subjectid) < 1) return false;
//解出投票内容
$info = $this->db->get_subject($subjectid);
if(!$info) showmessage(L('not_vote'));
extract($info);
//解出投票选项
$options = $this->db2->get_options($subjectid);
ob_start();
include template('vote', $template);
$voteform = ob_get_contents();
ob_clean() ;
@file_put_contents(CACHE_PATH.'vote_js/vote_'.$subjectid.'.js', $this->format_js($voteform));
}
/**
* 更新js
*/
public function create_js() {
$infos = $this->db->select(array('siteid'=>$this->get_siteid()), '*');
if(is_array($infos)){
foreach($infos as $subjectid_arr) {
$this->update_votejs($subjectid_arr['subjectid']);
}
}
showmessage(L('operation_success'),'?m=vote&c=vote');
}
/**
* 说明:对字符串进行处理
* @param $string 待处理的字符串
* @param $isjs 是否生成JS代码
*/
function format_js($string, $isjs = 1){
$string = addslashes(str_replace(array("\r", "\n"), array('', ''), $string));
return $isjs ? 'document.write("'.$string.'");' : $string;
}
/**
* 投票调用代码
*
*/
public function public_call() {
$_GET['subjectid'] = intval($_GET['subjectid']);
if(!$_GET['subjectid']) showmessage(L('illegal_action'), HTTP_REFERER, '', 'call');
$r = $this->db->get_one(array('subjectid'=>$_GET['subjectid']));
include $this->admin_tpl('vote_call');
}
/**
* 信息选择投票接口
*/
public function public_get_votelist() {
$infos = $this->db->listinfo(array('siteid'=>$this->get_siteid()),'subjectid DESC',$page,'10');
$target = isset($_GET['target']) ? $_GET['target'] : '';
include $this->admin_tpl('get_votelist');
}
}
?>
|
108wo
|
phpcms/modules/vote/vote.php
|
PHP
|
asf20
| 12,997
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
class index {
function __construct() {
pc_base::load_app_func('global');
$this->vote = pc_base::load_model('vote_subject_model');//投票标题
$this->vote_option = pc_base::load_model('vote_option_model');//投票选项
$this->vote_data = pc_base::load_model('vote_data_model'); //投票统计的数据模型
$this->username = param::get_cookie('_username');
$this->userid = param::get_cookie('_userid');
$this->ip = ip();
$siteid = isset($_GET['siteid']) ? intval($_GET['siteid']) : get_siteid();
define("SITEID",$siteid);
}
public function init() {
$siteid = SITEID;
$page = intval($_GET['page']);
if($page<=0){
$page = 1;
}
include template('vote', 'list_new');
}
/**
* 投票列表页
*/
public function lists() {
$siteid = SITEID;
$page = intval($_GET['page']);
if($page<=0){
$page = 1;
}
include template('vote', 'list_new');
}
/**
* 投票显示页
*/
public function show(){
$type = intval($_GET['type']);//调用方式ID
$subjectid = abs(intval($_GET['subjectid']));
if(!$subjectid) showmessage(L('vote_novote'),'blank');
//取出投票标题
$subject_arr = $this->vote->get_subject($subjectid);
$siteid = $subject_arr['siteid'];
//增加判断,防止模板调用不存在投票时js报错 wangtiecheng
if(!is_array($subject_arr)) {
if(isset($_GET['action']) && $_GET['action'] == 'js') {
exit;
} else {
showmessage(L('vote_novote'),'blank');
}
}
extract($subject_arr);
//显示模版
$template = $template ? $template: 'vote_tp';
//获取投票选项
$options = $this->vote_option->get_options($subjectid);
//新建一数组用来存新组合数据
$total = 0;
$vote_data =array();
$vote_data['total'] = 0 ;//所有投票选项总数
$vote_data['votes'] = 0 ;//投票人数
//获取投票结果信息
$infos = $this->vote_data->select(array('subjectid'=>$subjectid),'data');
//循环每个会员的投票记录
foreach($infos as $subjectid_arr) {
extract($subjectid_arr);
$arr = string2array($data);
foreach($arr as $key => $values){
$vote_data[$key]+=1;
}
$total += array_sum($arr);
$vote_data['votes']++ ;
}
$vote_data['total'] = $total ;
//取出投票结束时间,如果小于当前时间,则选项变灰不可选
if(date("Y-m-d",SYS_TIME)>$todate){
$check_status = 'disabled';
$display = 'display:none;';
}else {
$check_status = '';
}
//JS调用
if($_GET['action']=='js'){
if(!function_exists('ob_gzhandler')) ob_clean();
ob_start();
//$template = 'submit';
$template = $subject_arr['template'];
//根据TYPE值,判断调用模版
switch ($type){
case 3://首页、栏目页调用
$true_template = 'vote_tp_3';
break;
case 2://内容页调用
$true_template = 'vote_tp_2';
break;
default:
$true_template = $template;
}
include template('vote',$true_template);
$data=ob_get_contents();
ob_clean();
exit(format_js($data));
}
//SEO设置
$SEO = seo(SITEID, '', $subject, $description, $subject);
//前台投票列表调用默认页面,以免页面样式错乱.
if($_GET['show_type']==1){
include template('vote', 'vote_tp');
}else {
include template('vote', $template);
}
}
/**
* 处理投票
*/
public function post(){
$subjectid = intval($_POST['subjectid']);
if(!$subjectid) showmessage(L('vote_novote'),'blank');
//当前站点
$siteid = SITEID;
//判断是否已投过票,或者尚未到第二次投票期
$return = $this->check($subjectid);
switch ($return) {
case 0:
showmessage(L('vote_voteyes'),"?m=vote&c=index&a=result&subjectid=$subjectid&siteid=$siteid");
break;
case -1:
showmessage(L('vote_voteyes'),"?m=vote&c=index&a=result&subjectid=$subjectid&siteid=$siteid");
break;
}
if(!is_array($_POST['radio'])) showmessage(L('vote_nooption'),'blank');
$time = SYS_TIME;
$data_arr = array();
foreach($_POST['radio'] as $radio){
$data_arr[$radio]='1';
}
$new_data = array2string($data_arr);//转成字符串存入数据库中
//添加到数据库
$this->vote_data->insert(array('userid'=>$this->userid,'username'=>$this->username,'subjectid'=>$subjectid,'time'=>$time,'ip'=>$this->ip,'data'=>$new_data));
//查询投票奖励点数,并更新会员点数
$vote_arr = $this->vote->get_one(array('subjectid'=>$subjectid));
pc_base::load_app_class('receipts','pay',0);
receipts::point($vote_arr['credit'],$this->userid, $this->username, '','selfincome',L('vote_post_point'));
//更新投票人数
$this->vote->update(array('votenumber'=>'+=1'),array('subjectid'=>$subjectid));
showmessage(L('vote_votesucceed'), "?m=vote&c=index&a=result&subjectid=$subjectid&siteid=$siteid");
}
/**
*
* 投票结果显示
*/
public function result(){
$siteid = SITEID;
$subjectid = abs(intval($_GET['subjectid']));
if(!$subjectid) showmessage(L('vote_novote'),'blank');
//取出投票标题
$subject_arr = $this->vote->get_subject($subjectid);
if(!is_array($subject_arr)) showmessage(L('vote_novote'),'blank');
extract($subject_arr);
//获取投票选项
$options = $this->vote_option->get_options($subjectid);
//新建一数组用来存新组合数据
$total = 0;
$vote_data =array();
$vote_data['total'] = 0 ;//所有投票选项总数
$vote_data['votes'] = 0 ;//投票人数
//获取投票结果信息
$infos = $this->vote_data->select(array('subjectid'=>$subjectid),'data');
//循环每个会员的投票记录
foreach($infos as $subjectid_arr) {
extract($subjectid_arr);
$arr = string2array($data);
foreach($arr as $key => $values){
$vote_data[$key]+=1;
}
$total += array_sum($arr);
$vote_data['votes']++ ;
}
$vote_data['total'] = $total ;
//SEO设置
$SEO = seo(SITEID, '', $subject, $description, $subject);
include template('vote','vote_result');
}
/**
*
* 投票前检测
* @param $subjectid 投票ID
* @return 返回值 (1:可投票 0: 多投,时间段内不可投票 -1:单投,已投票,不可重复投票)
*/
public function check($subjectid){
//查询本投票配置
$siteid = SITEID;
$subject_arr = $this->vote->get_subject($subjectid);
if($subject_arr['enabled']==0){
showmessage(L('vote_votelocked'),"?m=vote&c=index&a=result&subjectid=$subjectid&siteid=$siteid");
}
if(date("Y-m-d",SYS_TIME)>$subject_arr['todate']){
showmessage(L('vote_votepassed'),"?m=vote&c=index&a=result&subjectid=$subjectid&siteid=$siteid");
}
//游客是否可以投票
if($subject_arr['allowguest']==0 && !$this->username){
showmessage(L('vote_votenoguest'),"?m=vote&c=index&a=result&subjectid=$subjectid&siteid=$siteid");
}
//是否有投票记录
$user_info = $this->vote_data->select(array('subjectid'=>$subjectid,'ip'=>$this->ip,'username'=>$this->username),'*','1',' time DESC');
if(!$user_info){
return 1;
} else {
if($subject_arr['interval']==0){
return -1;
}
if($subject_arr['interval']>0){
$condition = (SYS_TIME - $user_info[0]['time'])/(24*3600)> $subject_arr['interval'] ? 1 : 0;
return $condition;
}
}
}
}
?>
|
108wo
|
phpcms/modules/vote/index.php
|
PHP
|
asf20
| 7,641
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
class vote_tag {
public function __construct() {
$this->subject_db = pc_base::load_model('vote_subject_model');
$this->option_db = pc_base::load_model('vote_option_model');
}
/**
* 显示
* @param $data
*/
public function show($data) {
$subjectid = $data['subjectid'];//投票ID
if($subjectid){
if(is_int($subjectid)) return false;
$sql = array('subjectid'=>$subjectid);
}else {
$sql = '';
}
return $this->subject_db->select($sql, '*', $data['limit']);
}
/**
* 其它投票
* @param $data
*/
public function other_vote($data) {
$siteid = $_GET['siteid'];
$sql = array('siteid'=>$siteid);
return $this->subject_db->select($sql, '*', $data['limit'], $data['order']);
}
/**
* 投票热度排行
* @param $data 传入的数组参数
*/
public function hits($data) {
$siteid = intval($data['siteid']);
$enabled = $data['enabled']?$data['enabled'] : 1;//状态:是否启用
if (empty($siteid)){
$siteid = get_siteid();
}
switch ($enabled) {
case all://不限
$sql = array('siteid'=>$siteid);
break;
default://默认按选择项
$sql = array('siteid'=>$siteid,'enabled'=>$enabled);
}
return $this->subject_db->select($sql, '*', $data['limit'], 'votenumber '.$data['order']);
}
/**
*
* 投票列表
* @param $data 数组参数
*/
public function lists($data) {
$siteid = intval($data['siteid']);
$enabled = $data['enabled']?$data['enabled'] : 1;//状态:是否启用
$order = $data['order']?$data['order'] : 'subjectid desc';//状态:是否启用
if (empty($siteid)){
$siteid = get_siteid();
}
switch ($enabled) {
case all://不限
$sql = array('siteid'=>$siteid);
break;
default://默认按选择项
$sql = array('siteid'=>$siteid,'enabled'=>$enabled);
}
return $this->subject_db->select($sql, '*', $data['limit'], $order);
}
/**
* 投票概况
*/
public function get_vote($data) {
$subjectid = intval($data['subjectid']);
if (empty($subjectid)) return false;
return $this->subject_db->get_one(array('subjectid'=>$subjectid));
}
/**
* 计数
*/
public function count($data) {
if(isset($data['where'])) {
$sql = $data['where'];
} else {
$siteid = intval($data['siteid']);
$enabled = $data['enabled']?$data['enabled'] : 1;//状态:是否启用
if (empty($siteid)){
$siteid = get_siteid();
}
switch ($enabled) {
case all://不限
$sql = array('siteid'=>$siteid);
break;
default://默认按选择项
$sql = array('siteid'=>$siteid,'enabled'=>$enabled);
}
return $this->subject_db->count($sql);
}
}
/**
* pc 标签调用
*/
public function pc_tag() {
$sites = pc_base::load_app_class('sites','admin');
$sitelist = $sites->pc_tag_list();
return array(
'action'=>array('lists'=>L('list','', 'comment'),'get_vote'=>L('vote_overview','','vote')),
'lists'=>array(
'siteid'=>array('name'=>L('site_id', '', 'comment'),'htmltype'=>'input_select', 'data'=>$sitelist,'validator'=>array('min'=>1)),
'enabled'=>array('name'=>L('vote_status','','vote'), 'htmltype'=>'select', 'data'=>array('all'=>L('vote_Lockets','','vote'),'1'=>L('vote_use','','vote'), '0'=>L('vote_lock','','vote'))),
'order'=>array('name'=>L('sort', '', 'comment'), 'htmltype'=>'select','data'=>array('subjectid desc'=>L('subjectid_desc', '', 'vote'), 'subjectid asc'=>L('subjectid_asc', '', 'vote'))),
),
'get_vote'=>array(
'subjectid'=>array('name'=>L('vote_voteid','','vote'),'htmltype'=>'input', 'validator'=>array('min'=>1)),
),
);
}
}
|
108wo
|
phpcms/modules/vote/classes/vote_tag.class.php
|
PHP
|
asf20
| 3,815
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
return array('vote_subject', 'vote_option', 'vote_data');
?>
|
108wo
|
phpcms/modules/vote/install/model.php
|
PHP
|
asf20
| 164
|
{template "content","header"}
<link href="{CSS_PATH}vote.css" rel="stylesheet" type="text/css" />
<!--main-->
<div class="main tps">
<div class="crumbs"><a href="{siteurl($siteid)}">首页</a><span> > </span> <a href="{APP_PATH}index.php?m=vote&c=index&a=lists&siteid={$siteid}">投票</a> </div>
<form name="myform" id="myform" action="{APP_PATH}index.php?m=vote&c=index&a=post&subjectid={$subjectid}&siteid={$siteid}" method="post">
<div class="vote_result">
<div class="tit"><span class="r">总票数:<strong>{$vote_data['total']}</strong></span><h5>标题: {$subject}</h5></div>
<div class="c_box wrap">
<input type="hidden" name="subjectid" value="{$subjectid}">
<table width="100%" border="1" cellspacing="0" cellpadding="0" class="tp">
{loop $options $r}
{$i++}
<tr>
<th>{$i}</th>
<td class="tp_tit"><input type={if $ischeckbox=='0'}"radio"{else}"checkbox"{/if} name="radio[]" id="radio" value="{$r['optionid']}" {$check_status} /></td>
<td class="ls">{$r['option']}</td>
<td class="tdcol3"><font color=red>{php echo $vote_data[$r['optionid']]==''? 0:$vote_data[$r['optionid']]}</font> 票</td>
</tr>
{/loop}
</table>
</div>
</div>
<div class="shuru_btn"><button class="tp_btn" type="submit" style="{$display}"></button><a href="{APP_PATH}index.php?m=vote&c=index&a=result&subjectid={$subjectid}&siteid={$siteid}">[查看投票结果] </a></div>
</form>
<div class="vote_listt">
<div class="tit"><span class="r"><a href="{APP_PATH}index.php?m=vote&c=index&a=lists&siteid={$siteid}">查看更多>></a></span><h5>其他投票</h5></div>
<ul class="wrap licol2 icon3j">
{pc:vote action="other_vote" num="8" order="subjectid DESC"}
{loop $data $r}
<li><a title="{$r['subject']}" href="{APP_PATH}index.php?m=vote&c=index&a=show&show_type=1&subjectid={$r['subjectid']}">{$r['subject']}</a><span ><font color="#1E50A0">(得票数: {$r['votenumber']})</font></span></li>
{/loop}
{/pc}
</ul>
</div>
</div>
{template "content","footer"}
|
108wo
|
phpcms/modules/vote/install/templates/vote_tp.html
|
HTML
|
asf20
| 2,224
|
{pc:vote action="show" subjectid="$subjectid" order="$order"}
{loop $data $v}
<form action="?m=vote&c=index&a=post&subjectid={$subjectid}" method="post">
<h5>{$v[subject]}</h5>
{pc:vote action="option_lists" subjectid="$subjectid" return="dat"}
{loop $dat $option_v}
<a href="{$option_v[url]}" target="_blank">{$option_v[option]}</a> <br>
{/loop}
{$pages}
{/pc}
<input type="submit" value="提交" />
</form>
{/loop}
{/pc}
|
108wo
|
phpcms/modules/vote/install/templates/show.html
|
HTML
|
asf20
| 471
|
{template "content","header"}
<link href="{CSS_PATH}vote.css" rel="stylesheet" type="text/css" />
<!--main-->
<div class="main tps">
<div class="crumbs"><a href="{siteurl($siteid)}">首页</a><span> > </span> <a href="{APP_PATH}index.php?m=vote&c=index&a=lists&siteid={$siteid}">投票</a> </div>
<div class="vote_result">
<div class="tit"><span class="r">总票数:<strong>{$vote_data['total']}</strong></span><h5>{$subject}</h5></div>
<div class="c_box wrap">
<table width="100%" border="1" cellspacing="0" cellpadding="0">
{loop $options $r}
{$i++}
{if $vote_data['total']==0 }
{php $per=0;}
{else}
{php $per=intval($vote_data[$r['optionid']]/$vote_data['total']*100);}
{/if}
<tr>
<th>{$i}</th>
<td class="tp_tit">{$r['option']}</td>
<td class="tdcol3">{$per} %</td>
<td><div><img src="statics/images/vote/tit_cs.jpg" width="{$per}%" /></div></td>
<td class="tdcol3">{php echo $vote_data[$r['optionid']]==''? 0:$vote_data[$r['optionid']]} 票</td>
</tr>
{/loop}
</table>
</div>
</div>
<div class="vote_listt">
<div class="tit"><span class="r"><a href="{APP_PATH}index.php?m=vote&c=index&a=lists&siteid={$siteid}">查看更多>></a></span><h5>其他投票</h5></div>
<ul class="wrap licol2 icon3j">
{pc:vote action="other_vote" catid="$catid" num="8" order="subjectid DESC"}
{loop $data $r}
<li><a title="{$r['subject']}" href="{APP_PATH}index.php?m=vote&c=index&a=show&show_type=1&subjectid={$r['subjectid']}&siteid={$siteid}">{$r['subject']}</a><span><font color="#1E50A0">(得票数: {$r['votenumber']})</font></span></li>
{/loop}
{/pc}
</ul>
</div>
</div>
{template "content","footer"}
|
108wo
|
phpcms/modules/vote/install/templates/vote_result.html
|
HTML
|
asf20
| 1,971
|
<form style="border: medium none;" id="voteform{$id}" method="post" action="{APP_PATH}index.php?m=vote&c=index&a=post&subjectid={$id}">
<dl>
<dt>{$subject}</dt>
</dl>
<dl>
{loop $options $r}
{$i++}
<dd>
<input type={if $ischeckbox=='0'}"radio"{else}"checkbox"{/if} name="radio[]" id="radio" value="{$r['optionid']}" {$check_status}/>
{$r['option']}
</dd>
{/loop}
<input type="hidden" name="voteid" value="{$id}">
</dl>
<p> <input type="submit" value="提交" name="dosubmit" style="{$display}" /> <a href="{APP_PATH}/index.php?m=vote&c=index&a=result&id={$id}" target="_blank">查看结果</a> </p>
</form>
|
108wo
|
phpcms/modules/vote/install/templates/submit.html
|
HTML
|
asf20
| 676
|
{template "content","header"}
<link href="{CSS_PATH}vote.css" rel="stylesheet" type="text/css" />
<div class="main votesss">
<div class="vote_listt col-left">
<div class="crumbs"><a href="{siteurl($siteid)}">首页</a><span> > </span><a href="{APP_PATH}index.php?m=vote&c=index&a=lists&siteid={$siteid}">投票</a> </div>
<div class="tit"> <h5>投票列表</h5></div>
{pc:vote action="lists" order="subjectid desc" siteid="$siteid" num="12" page="$page"}
<ul class="wrap icon3j">
{loop $data $r}
<li><a title="{$r[subject]}" target="_blank" href="{APP_PATH}index.php?m=vote&c=index&a=show&show_type=1&subjectid={$r['subjectid']}&siteid={$siteid}">{$r[subject]}</a><span><font color="#1E50A0">(投票数: {$r[votenumber]})</font></span></li>
{/loop}
</ul>
<div id="pages" class="text-c">{$pages}</div>
{/pc}
</div>
<div class="col-auto">
<!--广告228x90-->
<div class="box">
<h5 class="title-2">热门投票</h5>
<div class="tag_a">
{pc:vote action="hits" siteid="$siteid" num="10" order="DESC"}
<ul class="wrap icon3j mg_t10">
{loop $data $r}
<li><a href="{APP_PATH}index.php?m=vote&c=index&a=show&catid=53&show_type=1&subjectid={$r['subjectid']}&siteid={$siteid}" title="{$r[subject]}" target="_blank">{str_cut($r[subject],34,false)}</a></li>
{/loop}
</ul>
{/pc}
</div>
</div>
<div class="bk10"></div>
</div>
</div>
{template "content","footer"}
|
108wo
|
phpcms/modules/vote/install/templates/list_new.html
|
HTML
|
asf20
| 1,527
|
<div class="content vote">
<form name="myform" id="myform" action="{APP_PATH}index.php?m=vote&c=index&a=post&subjectid={$subjectid}" method="post" target="_blank">
<h4>{$subject}</h4>
<div class="hr bk6"><hr></div>
<input type="hidden" name="subjectid" value="{$subjectid}">
{loop $options $r}
{$i++}
{if $vote_data['total']==0 }
{php $per=0;}
{else}
{php $per=intval($vote_data[$r['optionid']]/$vote_data['total']*100);}
{/if}
<label><input type={if $ischeckbox=='0'}"radio"{else}"checkbox"{/if} name="radio[]" id="radio" value="{$r['optionid']}" {$check_status}/>{$r['option']}</label>
{/loop}
<div class="btn" style="{$display}"><input type="submit" value="提交"></div><a href="{APP_PATH}index.php?m=vote&c=index&a=result&subjectid={$subjectid}&siteid={$siteid}">[查看结果]</a>
</form>
</div>
|
108wo
|
phpcms/modules/vote/install/templates/vote_tp_3.html
|
HTML
|
asf20
| 818
|
<style type="text/css">
#vote-show{ border:1px solid #e5e5e5; padding:0 1px; color:#535353}
#vote-show h2{background:url("{IMG_PATH}vote/show_bg.png") repeat-x 0 0;height:26px; line-height:26px; padding-left:10px}
#vote-show h2 span{font-size:14px;background:url("{IMG_PATH}vote/vote_bg.gif") no-repeat scroll 0 1px transparent;padding-left:18px; color:#145aa3; }
#vote-show h3{ font-size:12px; font-weight:normal; line-height:26px; height:26px}
#vote-show .content{ padding:8px 10px 15px}
.vote_bar{width:100%; height:13px; border:1px solid #999; position:relative; overflow:hidden; margin-bottom:8px; background-color:#f6f6f7}
.vote_bar div{background: url({IMG_PATH}admin_img/x_bg.png) repeat-x left -194px; float: left; position:relative; height:16px;_height:13px}
.vote_bar span{display:block; position:absolute; left:0; top:0; width:100%; text-align:center; height:16px; font-size:10px; line-height:12px; vertical-align:middle; z-index:200}
</style>
<div id="vote-show">
<form name="myform" id="myform" action="{APP_PATH}index.php?m=vote&c=index&a=post&subjectid={$subjectid}" method="post" target="_blank">
<h2><span>{$subject}</span></h2>
<div class="content">
<input type="hidden" name="subjectid" value="{$subjectid}">
{loop $options $r}
{$i++}
{if $vote_data['total']==0 }
{php $per=0;}
{else}
{php $per=intval($vote_data[$r['optionid']]/$vote_data['total']*100);}
{/if}
<h3><input type={if $ischeckbox=='0'}"radio"{else}"checkbox"{/if} name="radio[]" id="radio" value="{$r['optionid']}" {$check_status} /> <label for="option_0">{$i}.{$r['option']}</label></h3>
<div class="vote_bar"><span>{$per}%</span><div style="width: {$per}%;"></div></div>
{/loop}
<div class="bk10"></div>
<div class="btn" style="{$display}"><input type="submit" value="提交"></div> <span class="f12">共有<font color="#0066FF">{$vote_data['total']}</font>人参与投票 </span>
</div>
</form>
</div>
|
108wo
|
phpcms/modules/vote/install/templates/vote_tp_2.html
|
HTML
|
asf20
| 1,940
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
$parentid = $menu_db->insert(array('name'=>'vote', 'parentid'=>'29', 'm'=>'vote', 'c'=>'vote', 'a'=>'init', 'data'=>'', 'listorder'=>0, 'display'=>'1'), true);
$menu_db->insert(array('name'=>'add_vote', 'parentid'=>$parentid, 'm'=>'vote', 'c'=>'vote', 'a'=>'add', 'data'=>'', 'listorder'=>0, 'display'=>'0'));
$menu_db->insert(array('name'=>'edit_vote', 'parentid'=>$parentid, 'm'=>'vote', 'c'=>'vote', 'a'=>'edit', 'data'=>'', 'listorder'=>0, 'display'=>'0'));
$menu_db->insert(array('name'=>'delete_vote', 'parentid'=>$parentid, 'm'=>'vote', 'c'=>'vote', 'a'=>'delete', 'data'=>'', 'listorder'=>0, 'display'=>'0'));
$menu_db->insert(array('name'=>'vote_setting', 'parentid'=>$parentid, 'm'=>'vote', 'c'=>'vote', 'a'=>'setting', 'data'=>'', 'listorder'=>0, 'display'=>'1'));
$menu_db->insert(array('name'=>'statistics_vote', 'parentid'=>$parentid, 'm'=>'vote', 'c'=>'vote', 'a'=>'statistics', 'data'=>'', 'listorder'=>0, 'display'=>'0'));
$menu_db->insert(array('name'=>'statistics_userlist', 'parentid'=>$parentid, 'm'=>'vote', 'c'=>'vote', 'a'=>'statistics_userlist', 'data'=>'', 'listorder'=>0, 'display'=>'0'));
$menu_db->insert(array('name'=>'create_js', 'parentid'=>$parentid, 'm'=>'vote', 'c'=>'vote', 'a'=>'create_js', 'data'=>'', 'listorder'=>0, 'display'=>'1'));
$language = array('vote'=>'投票', 'add_vote'=>'添加投票', 'edit_vote'=>'编辑投票','delete_vote'=>'删除投票', 'vote_setting'=>'投票配置', 'statistics_vote'=>'查看统计', 'statistics_userlist'=>'会员统计','create_js'=>'更新JS');
?>
|
108wo
|
phpcms/modules/vote/install/extention.inc.php
|
PHP
|
asf20
| 1,644
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('INSTALL') or exit('Access Denied');
$module = 'vote';
$modulename = '投票';
$introduce = '投票模块';
$author = 'phpcms team';
$authorsite = 'http://www.phpcms.cn';
$authoremail = 'phpcms@snda.com';
?>
|
108wo
|
phpcms/modules/vote/install/config.inc.php
|
PHP
|
asf20
| 278
|
<?php
$LANG['vote'] = '投票';
$LANG['vote_add'] = '添加投票';
$LANG['vote_title'] = '投票标题';
$LANG['select_type'] = '选项类型';
$LANG['vote_option'] = '投票选项';
$LANG['vote_description'] = '投票介绍:';
$LANG['statistics'] = '统计:';
$LANG['vote_confirm_del'] = '确认要删除吗?';
$LANG['vote_mustinput'] = '必填';
$LANG['vote_votepassed'] = '投票已过期!';
$LANG['setting_updates_successful'] = '配置更新完成!';
$LANG['truename'] = '真实姓名';
$LANG['addr'] = '地址:';
$LANG['fromdate'] = '上线时间';
$LANG['todate'] = '下线时间';
$LANG['enablecheckcode'] = '启用验证码';
$LANG['allowguest'] = '允许游客投票';
$LANG['credit'] = '奖励积分';
$LANG['interval'] = '投票时间间隔';
$LANG['template'] = '模版';
$LANG['enabled'] = '是否启用';
$LANG['allowview'] = '查看投票结果';
$LANG['yes'] = '是';
$LANG['no'] = '否';
$LANG['input_not_space'] = '输入内容请勿带空格';
$LANG['remove_all_selected'] = '删除选中的投票';
$LANG['description'] = '描述';
$LANG['call_js_code'] = '调用JS代码';
$LANG['startdate'] = '开始时间';
$LANG['enddate'] = '结束时间';
$LANG['vote_title_noempty'] = '投票标题不能为空';
$LANG['not_vote'] = '没有此投票';
$LANG['vote_num'] = '投票数';
$LANG['statistics'] = '统计';
$LANG['lock'] = '锁定';
$LANG['check_vote'] = '查看投票';
$LANG['call_code'] = '调用代码';
$LANG['before_select_operation'] = '请选择再执行操作';
$LANG['select'] = '请选择';
$LANG['time_is_ok'] = '日期合法';
$LANG['time_is_must'] = '日期必选';
$LANG['radio'] = '单选';
$LANG['checkbox'] = '多选';
$LANG['maxval'] = '最多选项';
$LANG['minval'] = '最少选项';
$LANG['add_option'] = '增加选项';
$LANG['del'] = '删除';
$LANG['must_input'] = '必填';
$LANG['allow'] = '允许';
$LANG['not_allow'] = '不允许';
$LANG['one_ip'] = '表示此IP地址只能投一次';
$LANG['more_ip'] = 'N天后可再次投票';
$LANG['user_list'] = '会员列表';
$LANG['vote_result'] = '投票结果';
$LANG['pic_view'] = '图示';
$LANG['vote_all_num'] = '投票总数';
$LANG['vote_style'] = '可用风格';
$LANG['vote_showresult'] = '查看结果';
$LANG['up_vote_time'] = '投票时间';
$LANG['ip'] = 'IP';
$LANG['user_info'] = '投票人资料';
$LANG['guest'] = '游客';
$LANG['default_template'] = '投票页默认模板';
$LANG['default_guest'] = '默认是否允许游客投票';
$LANG['default_enabled'] = '默认是否启用投票';
$LANG['default_vote_time'] = '默认投票时间间隔';
$LANG['vote_post_point'] = '投票奖励';
$LANG['subjectid_desc'] = 'ID 降序';
$LANG['subjectid_asc'] = 'ID 升序';
$LANG['vote_call'] = '投票调用方式';
$LANG['vote_call_info'] = '调用说明';
$LANG['vote_call_infos'] = '1、根据自身情况选择一种调用方式,然后把调用代码复制粘贴到需要显示的模板再更新相关网页即可。';
$LANG['vote_call_infos2'] = '2、PHP动态调用方式可以统计展示次数。';
$LANG['vote_call_1'] = '首页/栏目页调用';
$LANG['vote_call_2'] = '内容页调用';
$LANG['vote_phpcall'] = 'JS调用代码(PHP动态调用)<font color=\'red\'>此方式可以统计展示次数。</font>';
$LANG['vote_jscall'] = 'JS调用';
$LANG['vote_jscall_info'] = 'JS调用代码(JS静态调用)';
$LANG['vote_overview'] = '投票概述';
$LANG['vote_status'] = '状态';
$LANG['vote_Lockets'] = '不限';
$LANG['vote_use'] = '启用中';
$LANG['vote_lock'] = '锁定';
$LANG['vote_voteid'] = '投票ID';
$LANG['vote_novote'] = '投票不存在';
$LANG['vote_voteyes'] = '你已经投过票';
$LANG['vote_nooption'] = '没有选择投票选项!';
$LANG['vote_votesucceed'] = '投票成功,正在返回 !';
$LANG['vote_votelocked'] = '投票锁定中!暂不能投票';
$LANG['vote_votenoguest'] = '对不起,不允许游客投票!';
$LANG['confirm'] = '确定';
$LANG['reset'] = '清除';
$LANG['check_select'] = '单击选择';
$LANG['item'] = '项';
$LANG['copy_code'] = '复制代码至剪贴板';
$LANG['submit'] = '提交';
$LANG['select_style'] = '选择风格';
$LANG['right_all'] = '选择正确';
?>
|
108wo
|
phpcms/modules/vote/install/languages/zh-cn/vote.lang.php
|
PHP
|
asf20
| 4,777
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('UNINSTALL') or exit('Access Denied');
return array('announce');
?>
|
108wo
|
phpcms/modules/announce/uninstall/model.php
|
PHP
|
asf20
| 135
|
<?php
defined('IN_PHPCMS') or exit('Access Denied');
defined('UNINSTALL') or exit('Access Denied');
?>
|
108wo
|
phpcms/modules/announce/uninstall/extention.inc.php
|
PHP
|
asf20
| 108
|
<?php
defined('IN_PHPCMS') or exit('No permission resources.');
pc_base::load_app_class('admin','admin',0);
class admin_announce extends admin {
private $db; public $username;
public function __construct() {
parent::__construct();
//if (!module_exists(ROUTE_M)) showmessage(L('module_not_exists'));
$this->username = param::get_cookie('admin_username');
$this->db = pc_base::load_model('announce_model');
}
public function init() {
//公告列表
$sql = '';
$_GET['status'] = $_GET['status'] ? intval($_GET['status']) : 1;
$sql = '`siteid`=\''.$this->get_siteid().'\'';
switch($_GET['s']) {
case '1': $sql .= ' AND `passed`=\'1\' AND (`endtime` > \''.date('Y-m-d').'\' or `endtime`=\'0000-00-00\')'; break;
case '2': $sql .= ' AND `passed`=\'0\''; break;
case '3': $sql .= ' AND `passed`=\'1\' AND `endtime`!=\'0000-00-00\' AND `endtime` <\''.date('Y-m-d').'\' '; break;
}
$page = max(intval($_GET['page']), 1);
$data = $this->db->listinfo($sql, '`aid` DESC', $page);
$big_menu = array('javascript:window.top.art.dialog({id:\'add\',iframe:\'?m=announce&c=admin_announce&a=add\', title:\''.L('announce_add').'\', width:\'700\', height:\'500\', lock:true}, function(){var d = window.top.art.dialog({id:\'add\'}).data.iframe;var form = d.document.getElementById(\'dosubmit\');form.click();return false;}, function(){window.top.art.dialog({id:\'add\'}).close()});void(0);', L('announce_add'));
include $this->admin_tpl('announce_list');
}
/**
* 添加公告
*/
public function add() {
if(isset($_POST['dosubmit'])) {
$_POST['announce'] = $this->check($_POST['announce']);
if($this->db->insert($_POST['announce'])) showmessage(L('announcement_successful_added'), HTTP_REFERER, '', 'add');
} else {
//获取站点模板信息
pc_base::load_app_func('global', 'admin');
$siteid = $this->get_siteid();
$template_list = template_list($siteid, 0);
$site = pc_base::load_app_class('sites','admin');
$info = $site->get_by_id($siteid);
foreach ($template_list as $k=>$v) {
$template_list[$v['dirname']] = $v['name'] ? $v['name'] : $v['dirname'];
unset($template_list[$k]);
}
$show_header = $show_validator = $show_scroll = 1;
pc_base::load_sys_class('form', '', 0);
include $this->admin_tpl('announce_add');
}
}
/**
* 修改公告
*/
public function edit() {
$_GET['aid'] = intval($_GET['aid']);
if(!$_GET['aid']) showmessage(L('illegal_operation'));
if(isset($_POST['dosubmit'])) {
$_POST['announce'] = $this->check($_POST['announce'], 'edit');
if($this->db->update($_POST['announce'], array('aid' => $_GET['aid']))) showmessage(L('announced_a'), HTTP_REFERER, '', 'edit');
} else {
$where = array('aid' => $_GET['aid']);
$an_info = $this->db->get_one($where);
pc_base::load_sys_class('form', '', 0);
//获取站点模板信息
pc_base::load_app_func('global', 'admin');
$template_list = template_list($this->siteid, 0);
foreach ($template_list as $k=>$v) {
$template_list[$v['dirname']] = $v['name'] ? $v['name'] : $v['dirname'];
unset($template_list[$k]);
}
$show_header = $show_validator = $show_scroll = 1;
include $this->admin_tpl('announce_edit');
}
}
/**
* ajax检测公告标题是否重复
*/
public function public_check_title() {
if (!$_GET['title']) exit(0);
if (CHARSET=='gbk') {
$_GET['title'] = iconv('UTF-8', 'GBK', $_GET['title']);
}
$title = $_GET['title'];
if ($_GET['aid']) {
$r = $this->db->get_one(array('aid' => $_GET['aid']));
if ($r['title'] == $title) {
exit('1');
}
}
$r = $this->db->get_one(array('siteid' => $this->get_siteid(), 'title' => $title), 'aid');
if($r['aid']) {
exit('0');
} else {
exit('1');
}
}
/**
* 批量修改公告状态 使其成为审核、未审核状态
*/
public function public_approval($aid = 0) {
if((!isset($_POST['aid']) || empty($_POST['aid'])) && !$aid) {
showmessage(L('illegal_operation'));
} else {
if(is_array($_POST['aid']) && !$aid) {
array_map(array($this, 'public_approval'), $_POST['aid']);
showmessage(L('announce_passed'), HTTP_REFERER);
} elseif($aid) {
$aid = intval($aid);
$this->db->update(array('passed' => $_GET['passed']), array('aid' => $aid));
return true;
}
}
}
/**
* 批量删除公告
*/
public function delete($aid = 0) {
if((!isset($_POST['aid']) || empty($_POST['aid'])) && !$aid) {
showmessage(L('illegal_operation'));
} else {
if(is_array($_POST['aid']) && !$aid) {
array_map(array($this, 'delete'), $_POST['aid']);
showmessage(L('announce_deleted'), HTTP_REFERER);
} elseif($aid) {
$aid = intval($aid);
$this->db->delete(array('aid' => $aid));
}
}
}
/**
* 验证表单数据
* @param array $data 表单数组数据
* @param string $a 当表单为添加数据时,自动补上缺失的数据。
* @return array 验证后的数据
*/
private function check($data = array(), $a = 'add') {
if($data['title']=='') showmessage(L('title_cannot_empty'));
if($data['content']=='') showmessage(L('announcements_cannot_be_empty'));
$r = $this->db->get_one(array('title' => $data['title']));
if (strtotime($data['endtime'])<strtotime($data['starttime'])) {
$data['endtime'] = '';
}
if ($a=='add') {
if (is_array($r) && !empty($r)) {
showmessage(L('announce_exist'), HTTP_REFERER);
}
$data['siteid'] = $this->get_siteid();
$data['addtime'] = SYS_TIME;
$data['username'] = $this->username;
if ($data['starttime'] == '') $announce['starttime'] = date('Y-m-d');
} else {
if ($r['aid'] && ($r['aid']!=$_GET['aid'])) {
showmessage(L('announce_exist'), HTTP_REFERER);
}
}
return $data;
}
}
?>
|
108wo
|
phpcms/modules/announce/admin_announce.php
|
PHP
|
asf20
| 5,911
|
<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header', 'admin');
?>
<div class="pad-lr-10">
<form name="myform" action="?m=announce&c=admin_announce&a=listorder" method="post">
<div class="table-list">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="35" align="center"><input type="checkbox" value="" id="check_box" onclick="selectall('aid[]');"></th>
<th align="center"><?php echo L('title')?></th>
<th width="68" align="center"><?php echo L('startdate')?></th>
<th width='68' align="center"><?php echo L('enddate')?></th>
<th width='68' align="center"><?php echo L('inputer')?></th>
<th width="50" align="center"><?php echo L('hits')?></th>
<th width="120" align="center"><?php echo L('inputtime')?></th>
<th width="69" align="center"><?php echo L('operations_manage')?></th>
</tr>
</thead>
<tbody>
<?php
if(is_array($data)){
foreach($data as $announce){
?>
<tr>
<td align="center">
<input type="checkbox" name="aid[]" value="<?php echo $announce['aid']?>">
</td>
<td><?php echo $announce['title']?></td>
<td align="center"><?php echo $announce['starttime']?></td>
<td align="center"><?php echo $announce['endtime']?></td>
<td align="center"><?php echo $announce['username']?></td>
<td align="center"><?php echo $announce['hits']?></td>
<td align="center"><?php echo date('Y-m-d H:i:s', $announce['addtime'])?></td>
<td align="center">
<?php if ($_GET['s']==1) {?><a href="?m=announce&c=index&a=show&aid=<?php echo $announce['aid']?>" title="<?php echo L('preview')?>" target="_blank"><?php }?><?php echo L('index')?><?php if ($_GET['s']==1) {?></a><?php }?> |
<a href="javascript:edit('<?php echo $announce['aid']?>', '<?php echo safe_replace($announce['title'])?>');void(0);"><?php echo L('edit')?></a>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div class="btn"><label for="check_box"><?php echo L('selected_all')?>/<?php echo L('cancel')?></label>
<?php if($_GET['s']==1) {?><input name='submit' type='submit' class="button" value='<?php echo L('cancel_all_selected')?>' onClick="document.myform.action='?m=announce&c=admin_announce&a=public_approval&passed=0'"><?php } elseif($_GET['s']==2) {?><input name='submit' type='submit' class="button" value='<?php echo L('pass_all_selected')?>' onClick="document.myform.action='?m=announce&c=admin_announce&a=public_approval&passed=1'"><?php }?>
<input name="submit" type="submit" class="button" value="<?php echo L('remove_all_selected')?>" onClick="document.myform.action='?m=announce&c=admin_announce&a=delete';return confirm('<?php echo L('affirm_delete')?>')"> </div> </div>
<div id="pages"><?php echo $this->db->pages;?></div>
</form>
</div>
</body>
</html>
<script type="text/javascript">
function edit(id, title) {
window.top.art.dialog({id:'edit'}).close();
window.top.art.dialog({title:'<?php echo L('edit_announce')?>--'+title, id:'edit', iframe:'?m=announce&c=admin_announce&a=edit&aid='+id ,width:'700px',height:'500px'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;
var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
</script>
|
108wo
|
phpcms/modules/announce/templates/announce_list.tpl.php
|
PHP
|
asf20
| 3,371
|