www.gusucode.com > Tatter Tools 0.961 SE GB2312 简体中文版 > upload/index.php
<? include("inc_global.php"); include("inc_function.php"); include("inc_presswork.php"); error_reporting(0); chk_subscription(); if ($md == "guest_db") { check_ip_block(); $host1 = parse_url($HTTP_REFERER); $host2 = parse_url($s_root_path); if ($host1[host] != $host2[host]) error_process("01B1"); if ($guest_input_homepage == "http://") $guest_input_homepage = ""; if ($act != "edit") { setcookie ("c_guest_name", $guest_input_name, time()+60*60*24*30); setcookie ("c_guest_homepage", $guest_input_homepage, time()+60*60*24*30); setcookie ("c_guest_icon", $guest_select_icon, time()+60*60*24*30); } $guest_select_icon = get_private_icon($guest_select_icon, $guest_input_name, $guest_input_password, $guest_input_homepage); list($width, $height) = get_icon_size($guest_select_icon); if (!$guest_input_password) $guest_input_password = get_timestamp3(); if (!return_authority()) { $guest_input_name = str_tag_off($guest_input_name); $guest_input_homepage = str_tag_off($guest_input_homepage); $guest_select_icon = str_tag_off($guest_select_icon); $guest_textarea_body = str_tag_off($guest_textarea_body); } if (!$sort) $sort = 1; switch ($act) { case "insert" : if (!return_authority() && ($p_gue_perm == 0 || $p_gue_perm == 2)) error_process("01B4"); put_query (" insert into t3_".$dbid."_guest ( sortno , name, homepage, icon, icon_width, icon_height, body, password , regdate, ip ) values ( '".(get_maxval("t3_".$dbid."_guest", "sortno", null)+1)."' , '$guest_input_name', '$guest_input_homepage', '$guest_select_icon', '$width', '$height', '$guest_textarea_body', password('$guest_input_password') , '".time()."', '$REMOTE_ADDR' ) "); header("Location: $r_root_path"."index.php?md=guest"); break; case "reply" : if (!return_authority() && ($p_gue_perm == 0 || $p_gue_perm == 1)) error_process("01B5"); put_query(" insert into t3_".$dbid."_guest_reply ( pno , name, homepage, icon, icon_width, icon_height, body, password , regdate, ip ) values ( '$num' , '$guest_input_name', '$guest_input_homepage', '$guest_select_icon', '$width', '$height', '$guest_textarea_body', password('$guest_input_password') , '".time()."', '$REMOTE_ADDR' ) "); put_query(" update t3_".$dbid."_guest set sortno = '".(get_maxval("t3_".$dbid."_guest", "sortno", null)+1)."' where no = '$num' "); ?> <script type="text/javascript" language="JavaScript"> window.location.href='<?=$r_root_path?>index.php?md=guest&page=<?=$page?>&sort=<?=$sort?>#gue<?=$num?>_<?=get_maxval("t3_".$dbid."_guest_reply", "no", null)?>'; </script> <? break; case "edit" : $tab = "t3_".$dbid."_guest"; $set = "gue$num"; if ($pnum) { $tab .= "_reply"; $set = "gue$pnum"."_"."$num"; } $sql = "select password('$guest_input_password')"; list ($del_pass) = mysql_fetch_array(mysql_query($sql)); $sql = "select password from $tab where no = '$num'"; list ($db_pass) = mysql_fetch_array(mysql_query($sql)); if ($del_pass == $db_pass || return_authority()) { put_query (" update $tab set name = '$guest_input_name' , homepage = '$guest_input_homepage' , icon = '$guest_select_icon' , icon_width = '$width' , icon_height = '$height' , body = '$guest_textarea_body' where no = '$num' "); } else error_process("02B1"); ?> <script type="text/javascript" language="JavaScript"> window.location.href='<?=$r_root_path?>index.php?md=guest&page=<?=$page?>&sort=<?=$sort?>#<?=$set?>'; </script> <? break; } exit; } unset($add_query, $add_val); if (!$page) $page = 1; if ($md == "guest") $pagelog = $p_gue_page_cnt; else $pagelog = $p_page_cnt; $start = ($page - 1) * $pagelog; $end = $pagelog; if (return_authority()) $is_public = "1"; else $is_public = "is_public = '1'"; if ($ct1) { if ($ct1 != -1) $add_query .= " and category1 = '$ct1' "; $add_val .= "&ct1=$ct1"; } if ($ct2) { $add_query .= " and category2 = '$ct2' "; $add_val .= "&ct2=$ct2"; } if ($setdate) { $add_query .= " and from_unixtime(regdate, '%Y%m') = '$setdate' "; $add_val .= "&setdate=".$setdate;} if ($setday) { $add_query .= " and from_unixtime(regdate, '%e') = '$setday' "; $add_val .= "&setday=".$setday; } if ($stext) { $stext = str_replace("%", "", $stext); $add_query .= " and (title like ('%$stext%') or body like ('%$stext%')) "; $add_val .= "&stext=".urlencode($stext); } if ($md == "pl") { $sql = "select no from t3_".$dbid." where $is_public $add_query order by regdate desc limit ".($page-1).", 1"; // print $sql; list ($pl) = mysql_fetch_array(mysql_query($sql)); header("Location: index.php?pl=$pl".str_replace("&", "&", $add_val)); exit; } $time_skin = chk_time($time_skin); $skin = new set_skin(); $time_skin = chk_time($time_skin); if (!$HTTP_COOKIE_VARS["c_count"]) set_count(); setcookie ("c_count", "1", time()+60*60); ob_start(); ?> <!-- <?=$p_version?> developer: JH (Jaehun Jung) URL (http://interlude.pe.kr) Tatter Center: URL(http://www.tattertools.com) Copyright 2005 JH - project tatter toolkit, All rights reserved 內核版本:0.961 感謝所有夢游華人中文網的中文開發人員對TT所做的改進與風格設計 中文支持: 梦游华人中文网 URL(http://www.meyu.net) --> <script type="text/javascript" src="lib.js"></script> <form method="post" name="weblog" action="<?=$PHP_SELF?>"> <input type="hidden" name="md"> <input type="hidden" name="act"> <input type="hidden" name="page"> <input type="hidden" name="sort"> <input type="hidden" name="pl"> <input type="hidden" name="stext" value="<?=$stext?>"> <input type="hidden" name="setdate" value="<?=$setdate?>"> <input type="hidden" name="setday" value="<?=$setday?>"> <input type="hidden" name="ct1" value="<?=$ct1?>"> <input type="hidden" name="ct2" value="<?=$ct2?>"> <input type="hidden" name="pnum"> <input type="hidden" name="num"> <input type="hidden" name="c_name"> <input type="hidden" name="c_password"> <input type="hidden" name="c_homepage"> <input type="hidden" name="c_is_secret"> <input type="hidden" name="c_body"> <input type="hidden" name="d_target"> <? $pre_d1 = ob_get_contents(); ob_end_clean(); unset($rss_no); if ($p_read_cycle) { $term = 60 * $p_read_cycle; $sql = "select no, xml_url from t3_".$dbid."_rss where unix_timestamp() - regdate > $term order by no desc limit 0,1"; // print $sql; $result = @mysql_query($sql); while(list($no, $xml_url) = @mysql_fetch_array($result)) { if ($xml_url) { put_query("update t3_".$dbid."_rss set regdate = ".time()." where no = '$no'"); $rss_no = $no; } } } ob_start(); ?> <script type="text/javascript" language="JavaScript"> var img_set = ''; <? if ($ct1) { if ($ct1 == -1) { ?> act = 1; onclick_all_process(window, '<?=$s_tree_path.$p_tree."/"?>', act, d_ary); onclick_setimp(window, document.getElementById('imp'), c_ary, t_ary); <? } else { ?> if (has_leaves(d_ary, '<?=$ct1?>')) img_set = 1; else img_set = 0; onclick_folder(document.getElementById('hidden_category<?=$ct1?>'), document.getElementById('folder<?=$ct1?>'), '<?=$s_tree_path.$p_tree."/"?>', img_set); onclick_setimp(window, document.getElementById('imp<?=$ct1?>'), c_ary, t_ary); <? } } if ($ct2) { ?> onclick_setimp(window, document.getElementById('imp<?=$ct1?>_<?=$ct2?>'), c_ary, t_ary); <? } ?> </script> <iframe name="exe_frame" <? if ($rss_no) print "src=\"admin/reader_read.php?num=$rss_no\""; ?> style="width:0; height:0;" frameborder="0" scrolling="no"></iframe> </form> <? $post_d1 = ob_get_contents(); ob_end_clean(); $d0 = $skin->s_s; $d1 = str_replace("[##_s_t3_##]", $pre_d1.$skin->s_t3."[##_shortcut_script_##]".$post_d1, $d0); $image = $s_attach_path."image/".$p_imagefile; if (!$p_imagefile) $image = "images/spacer.gif"; $d1 = str_replace("[##_url_##]", "", $d1); $d1 = str_replace("[##_title_##]", "$p_title", $d1); $d1 = str_replace("[##_image_##]", $image, $d1); $d1 = str_replace("[##_onclick_image_##]", "window.open('image_pop.php?imagefile=$s_attach_path"."image/"."$p_imagefile&width=$p_width&height=$p_height','s_im','width=$p_width,height=$p_height,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0')", $d1); $d1 = str_replace("[##_desc_##]", $p_description, $d1); $d1 = str_replace("[##_search_text_##]", $stext, $d1); $d1 = str_replace("[##_search_name_##]", "search", $d1); $d1 = str_replace("[##_search_onclick_submit_##]", "window.location.href='index.php?stext='+document.weblog.search.value; return false;", $d1); if (strpos($d1, "[##_count_total_##]")) { $sql = "select sum(count) from t3_".$dbid."_count"; list ($sum) = mysql_fetch_array(mysql_query($sql)); $d1 = str_replace("[##_count_total_##]", $sum+$p_icount, $d1); } if (strpos($d1, "[##_count_today_##]") || strpos($d1, "[##_count_yesterday_##]")) { $day_count1 = 0; $day_count2 = 0; $sql = "select set_date, count from t3_".$dbid."_count where set_date between '".date("Ymd", mktime(0, 0, 0, date(m), date(d)-1, date(Y)))."' and '".date("Ymd")."' order by set_date asc"; $result = @mysql_query($sql); while(list($date, $count) = @mysql_fetch_array($result)) { if (date("Ymd") == $date) $day_count1 = $count; else $day_count2 = $count; } $d1 = str_replace("[##_count_today_##]", $day_count1, $d1); $d1 = str_replace("[##_count_yesterday_##]", $day_count2, $d1); } if ($pl) { $sql = "select regdate from t3_".$dbid." where no = '$pl'"; list ($rd) = mysql_fetch_array(mysql_query($sql)); $sql = "select count(*) from t3_".$dbid." where $is_public $add_query and regdate > '$rd'"; list ($r_cnt) = mysql_fetch_array(mysql_query($sql)); $start = $r_cnt; $end = 1; $page = $start+1; $pagelog = 1; $md = "pl"; } unset($p, $p2, $add_str); while(1) { if ($md == "rss" || $md == "guest" || $md == "keyword" || $md == "local" || ($ct1 && ($p_select_cat_view == 2)) || (($setdate || $setday) && ($p_select_arc_view == 2)) || ($stext && $pl) || $page != 1 || $pl || !($setdate || $setday || $stext || $ct1 || $ct2)) break; $p = $skin->s_list; $sql = "select no, category1, category2, title, user_id, image_file_path1, image_file_path2, regdate, rp_cnt from t3_".$dbid." where $is_public $add_query order by regdate desc"; // print $sql; $result = @mysql_query($sql); $list_count = mysql_num_rows($result); while(list($no, $category1, $category2, $title, $user_id, $image_file_path1, $image_file_path2, $regdate, $rp_cnt) = @mysql_fetch_array($result)) { if ($rp_cnt) $rp_cnt = "($rp_cnt)"; else $rp_cnt = ""; $p2_rp = $skin->s_list_rep; $p2_rp = str_replace("[##_list_rep_title_##]", $title, $p2_rp); $p2_rp = str_replace("[##_list_rep_link_##]", "index.php?pl=$no".$add_val, $p2_rp); $p2_rp = str_replace("[##_list_rep_regdate_##]", get_timevalue1($regdate), $p2_rp); $p2_rp = str_replace("[##_list_rep_rp_cnt_##]", $rp_cnt, $p2_rp); $p2 .= $p2_rp; } if ($ct2) $add_str = " - '".get_category2_label($ct2)."'"; if ($ct1) $p = str_replace("[##_list_conform_##]", "分类 '".get_category1_label($ct1)."' $add_str", $p); unset($add_str); if ($setday) $add_str = " ".$setday."日"; if ($setdate) $p = str_replace("[##_list_conform_##]", substr($setdate,0,4)."年 ".intval(substr($setdate,4))."月".$add_str, $p); if ($stext) $p = str_replace("[##_list_conform_##]", "搜索 '$stext'", $p); $p = str_replace("[##_list_count_##]", $list_count, $p); $p = str_replace("[##_s_list_rep_##]", $p2, $p); break; } if (strpos($d1, "[##_s_list_##]")) $d1 = str_replace("[##_s_list_##]", $p, $d1); unset($p, $p2); if (!$pl && $stext) { $p = $skin->s_rplist; $sql = "select no, pno, name, body, regdate from t3_".$dbid."_reply where ".(return_authority()?(""):("is_secret = '0' and"))." (name like ('%$stext%') or body like ('%$stext%')) order by no desc"; // print $sql; $result = @mysql_query($sql); $rp_cnt = mysql_num_rows($result); while(list($no, $pno, $name, $body, $regdate) = @mysql_fetch_array($result)) { $p2_rp = $skin->s_rplist_rep; $p2_rp = str_replace("[##_rplist_rep_link_##]", $PHP_SELF."?pl=$pno#r$no", $p2_rp); $p2_rp = str_replace("[##_rplist_rep_regdate_##]", get_timevalue1($regdate), $p2_rp); $p2_rp = str_replace("[##_rplist_rep_name_##]", $name, $p2_rp); $p2_rp = str_replace("[##_rplist_rep_body_##]", str_cut($body, 50, 0), $p2_rp); $p2 .= $p2_rp; } if ($stext) $p = str_replace("[##_rplist_conform_##]", "搜索 '$stext'", $p); $p = str_replace("[##_rplist_count_##]", $rp_cnt, $p); } $p = str_replace("[##_s_rplist_rep_##]", $p2, $p); $d1 = str_replace("[##_s_rplist_##]", $p, $d1); while(1) { if ($md == "rss" || $md == "guest" || $md == "keyword" ||$md == "local" || ($ct1 && $p_select_cat_view == 1 && !$pl) || (($setdate || $setday) && $p_select_arc_view == 1 && !$pl) || ($stext && !$pl)) break; // 标记这里修改 // 作 者:Sea Otter // 代码说明:固顶相关 // 变动类型:添加 // 修改时间:2005.05.11 // 原 代 码:无 // Email :seaotter@163.com // 变更开始------------------- // 这下面一大段重复的代码本来想跟原有的代码结合,但又怕降低原有代码效率,因为每次都要去keep_top表验证,作罢。 if (!$md) { $result = mysql_query("select no from t3_".$dbid."_keep_top"); if (mysql_num_rows($result) > 0) { while (list($no) = mysql_fetch_array($result)) $keep_top_array[] = $no; $keep_top_query = " no = $keep_top_array[0]"; $keep_top_count = count($keep_top_array); for ($i = 1; $i < $keep_top_count; $i++) $keep_top_query .= " or no = $keep_top_array[$i]"; list($keep_top_prefix) = mysql_fetch_array(mysql_query("select keep_top_prefix from t3_".$dbid."_setting")); $keep_top_sql = " select no, category1, category2, title, body , user_id, image_file_path1, image_file_path2, regdate , rp_cnt, tb_cnt, is_sync, is_public , perm_rp, perm_tb from t3_".$dbid." where $keep_top_query "; $result = mysql_query($keep_top_sql); while(list( $no, $category1, $category2, $title, $body , $user_id, $image_file_path1, $image_file_path2, $regdate , $rp_cnt, $tb_cnt, $is_sync, $is_public_set , $perm_rp, $perm_tb ) = mysql_fetch_array($result)) { unset($plbuffer); $set_tb = 0; $set_rp = 0; if (return_authority()) { $perm_tb = 1; $perm_rp = 1; } if ($pl || $p_show_preview) { if ($perm_tb && ($pl || $p_show_preview != 1)) { $plbuffer = get_tb_content($skin, $no); $set_tb = 1; } if ($perm_rp && ($pl || $p_show_preview != 2)) { $plbuffer .= get_rp_content($skin, $no); $set_rp = 1; } } unset ($perm_rp_link, $perm_tb_link); $category = get_category1_label($category1); if ($category2) $category .= " - ".get_category2_label($category2); if ($rp_cnt) $rp_cnt = "($rp_cnt)"; else $rp_cnt = ""; if ($tb_cnt) $tb_cnt = "($tb_cnt)"; else $tb_cnt = ""; $d2_rp = $skin->s_article_rep; $d2_rp = str_replace("[##_s_tb_##]", "", $d2_rp); $d2_rp = str_replace("[##_s_rp_##]", "", $d2_rp); $d2_rp = str_replace("[##_article_rep_title_##]", $keep_top_prefix.$title, $d2_rp); $d2_rp = str_replace("[##_article_rep_desc_##]", set_moreless( nl2brc( set_keyword( attach_image( 1, $body, $s_root_path, $r_root_path, $attach_path.$image_file_path1.$image_file_path2 ), $is_sync ) ), $no ), $d2_rp ); if ($perm_rp) $perm_rp_link = "onclick_addexe('$no', 'post_$no', weblog.post_$no"."_div_rp, weblog.post_$no"."_div_tb, 'rp'); return false;"; else $perm_rp_link = "alert('对不起,此文章日志不允许游客回复.\\t'); return false;"; if ($perm_tb) $perm_tb_link = "onclick_addexe('$no', 'post_$no', weblog.post_$no"."_div_tb, weblog.post_$no"."_div_rp, 'tb'); return false;"; else $perm_tb_link = "alert('对不起,此文章日志不接受文章引用传送.\\t'); return false;"; $d2_rp = str_replace("[##_article_rep_name_##]", $user_id, $d2_rp); $d2_rp = str_replace("[##_article_rep_date_##]", get_timevalue1($regdate)." ".get_timevalue3($regdate), $d2_rp); $d2_rp = str_replace("[##_article_rep_link_##]", $PHP_SELF."?pl=$no".$add_val, $d2_rp); $d2_rp = str_replace("[##_article_rep_category_##]", $category, $d2_rp); $d2_rp = str_replace("[##_article_rep_category_link_##]", "index.php?ct1=$category1&ct2=$category2", $d2_rp); $d2_rp = str_replace("[##_article_div_area_##]", "<input type=hidden name=post_$no"."_div_rp value=$set_rp><input type=hidden name=post_$no"."_div_tb value=$set_tb><div id=post_$no> $plbuffer </div>", $d2_rp); $d2_rp = str_replace("[##_article_rep_rp_link_##]", $perm_rp_link, $d2_rp); $d2_rp = str_replace("[##_article_rep_tb_link_##]", $perm_tb_link, $d2_rp); $d2_rp = str_replace("[##_article_rep_rp_cnt_##]", $rp_cnt, $d2_rp); $d2_rp = str_replace("[##_article_rep_tb_cnt_##]", $tb_cnt, $d2_rp); if (strpos($d2_rp, "[##_s_ad_div_##]") && return_authority()) { $d3 = $skin->s_ad_div; if ($is_public_set) { $label1 = "公开"; $label2 = "不公开"; } else { $label1 = "不公开"; $label2 = "公开"; } $d3 = str_replace("[##_s_ad_m_link_##]", "admin/article_edit.php?num=$no&am=1", $d3); $d3 = str_replace("[##_s_ad_s1_label_##]", $label1, $d3); $d3 = str_replace("[##_s_ad_s2_label_##]", $label2, $d3); $d3 = str_replace("[##_s_ad_s2_link_##]", "admin/article.php?mode=set_public&exenum=".$no."_".$is_public_set."_".$is_sync."&am=1", $d3); $d3 = str_replace("[##_s_ad_t_onclick_##]", "window.open('admin/article_trackback_pop.php?no=$no','tb','width=550,height=200,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0'); return false;", $d3); $d3 = str_replace("[##_s_ad_d_onclick_##]", "window.location.href='admin/article.php?mode=set_delete&exenum=".$no."_".$is_public_set."&am=1'; return false;", $d3); } $d2_rp = str_replace("[##_s_ad_div_##]", $d3, $d2_rp); $keep_top_str[$no]=$d2_rp; } for ($i = 0; $i < $keep_top_count; $i++) $d2 .= $keep_top_str[$keep_top_array[$i]]; } $add_query .= " and keep_top = 0"; } // 变更结束------------------- $sql = "select count(*) from t3_".$dbid." where $is_public $add_query"; list ($t_cnt) = mysql_fetch_array(mysql_query($sql)); $sql = " select no, category1, category2, title, body , user_id, image_file_path1, image_file_path2, regdate , rp_cnt, tb_cnt, is_sync, is_public , perm_rp, perm_tb from t3_".$dbid." where $is_public $add_query order by regdate desc limit $start, $end "; // print $sql; $result = @mysql_query($sql); while(list( $no, $category1, $category2, $title, $body , $user_id, $image_file_path1, $image_file_path2, $regdate , $rp_cnt, $tb_cnt, $is_sync, $is_public_set , $perm_rp, $perm_tb ) = @mysql_fetch_array($result)) { unset($plbuffer); $set_tb = 0; $set_rp = 0; if (return_authority()) { $perm_tb = 1; $perm_rp = 1; } if ($pl || $p_show_preview) { if ($perm_tb && ($pl || $p_show_preview != 1)) { $plbuffer = get_tb_content($skin, $no); $set_tb = 1; } if ($perm_rp && ($pl || $p_show_preview != 2)) { $plbuffer .= get_rp_content($skin, $no); $set_rp = 1; } } unset ($perm_rp_link, $perm_tb_link); $category = get_category1_label($category1); if ($category2) $category .= " - ".get_category2_label($category2); if ($rp_cnt) $rp_cnt = "($rp_cnt)"; else $rp_cnt = ""; if ($tb_cnt) $tb_cnt = "($tb_cnt)"; else $tb_cnt = ""; $d2_rp = $skin->s_article_rep; $d2_rp = str_replace("[##_s_tb_##]", "", $d2_rp); $d2_rp = str_replace("[##_s_rp_##]", "", $d2_rp); $d2_rp = str_replace("[##_article_rep_title_##]", $title, $d2_rp); $d2_rp = str_replace("[##_article_rep_desc_##]", set_moreless( nl2brc( set_keyword( attach_image( 1, $body, $s_root_path, $r_root_path, $attach_path.$image_file_path1.$image_file_path2 ), $is_sync ) ), $no ), $d2_rp ); if ($perm_rp) $perm_rp_link = "onclick_addexe('$no', 'post_$no', weblog.post_$no"."_div_rp, weblog.post_$no"."_div_tb, 'rp'); return false;"; else $perm_rp_link = "alert('对不起,此文章日志不允许游客回复.\\t'); return false;"; if ($perm_tb) $perm_tb_link = "onclick_addexe('$no', 'post_$no', weblog.post_$no"."_div_tb, weblog.post_$no"."_div_rp, 'tb'); return false;"; else $perm_tb_link = "alert('对不起,此文章日志不接受文章引用传送.\\t'); return false;"; $d2_rp = str_replace("[##_article_rep_name_##]", $user_id, $d2_rp); $d2_rp = str_replace("[##_article_rep_date_##]", get_timevalue1($regdate)." ".get_timevalue3($regdate), $d2_rp); $d2_rp = str_replace("[##_article_rep_link_##]", $PHP_SELF."?pl=$no".$add_val, $d2_rp); $d2_rp = str_replace("[##_article_rep_category_##]", $category, $d2_rp); $d2_rp = str_replace("[##_article_rep_category_link_##]", "index.php?ct1=$category1&ct2=$category2", $d2_rp); $d2_rp = str_replace("[##_article_div_area_##]", "<input type=hidden name=post_$no"."_div_rp value=$set_rp><input type=hidden name=post_$no"."_div_tb value=$set_tb><div id=post_$no> $plbuffer </div>", $d2_rp); $d2_rp = str_replace("[##_article_rep_rp_link_##]", $perm_rp_link, $d2_rp); $d2_rp = str_replace("[##_article_rep_tb_link_##]", $perm_tb_link, $d2_rp); $d2_rp = str_replace("[##_article_rep_rp_cnt_##]", $rp_cnt, $d2_rp); $d2_rp = str_replace("[##_article_rep_tb_cnt_##]", $tb_cnt, $d2_rp); if (strpos($d2_rp, "[##_s_ad_div_##]") && return_authority()) { $d3 = $skin->s_ad_div; if ($is_public_set) { $label1 = "公开"; $label2 = "不公开"; } else { $label1 = "不公开"; $label2 = "公开"; } $d3 = str_replace("[##_s_ad_m_link_##]", "admin/article_edit.php?num=$no&am=1", $d3); $d3 = str_replace("[##_s_ad_s1_label_##]", $label1, $d3); $d3 = str_replace("[##_s_ad_s2_label_##]", $label2, $d3); $d3 = str_replace("[##_s_ad_s2_link_##]", "admin/article.php?mode=set_public&exenum=".$no."_".$is_public_set."_".$is_sync."&am=1", $d3); $d3 = str_replace("[##_s_ad_t_onclick_##]", "window.open('admin/article_trackback_pop.php?no=$no','tb','width=550,height=200,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0'); return false;", $d3); $d3 = str_replace("[##_s_ad_d_onclick_##]", "window.location.href='admin/article.php?mode=set_delete&exenum=".$no."_".$is_public_set."&am=1'; return false;", $d3); } $d2_rp = str_replace("[##_s_ad_div_##]", $d3, $d2_rp); $d2 .= $d2_rp; } break; } if (strpos($d1, "[##_s_guest_##]")) $d1 = str_replace("[##_s_guest_##]", get_guest(), $d1); unset($buf, $prev_page, $next_page); $i = $page - 5; $cnt = 0; $final = sprintf("%d", ($t_cnt+$pagelog-1) / $pagelog); if ($md) $add_val = "&md=$md".$add_val; if ($sort) $add_val = "&sort=$sort".$add_val; if ($i > 0 && $i > ($final - 9)) { $i = $final - 9; if ($i < 1) $i = 1; } if ($page > 5) { $buf .= set_paging_link(1); $buf .= " ... "; } while(1) { $i++; if ($i < 1) continue; $buf .= set_paging_link($i); $cnt++; if ($cnt == 9 || $i == $final || !$final) break; } if ($final > $i) { $buf .= " ... "; $buf .= set_paging_link($final); } $prev = $page; $next = $final; if ($page > 1) { $prev = $page-1; $prev_page = "href=\"index.php?page=".($page-1)."$add_val\""; } if ($page != $final && $final) { $next = $page+1; $next_page = "href=\"index.php?page=".($page+1)."$add_val\""; } $d1 = str_replace("[##_s_paging_rep_##]", $buf, $d1); $d1 = str_replace("[##_prev_page_##]", $prev_page, $d1); $d1 = str_replace("[##_next_page_##]", $next_page, $d1); ob_start(); ?> <script type="text/javascript"> function shortcut_onkeydown(evt) { evt = get_event(evt); if ((set_key = evt.keyCode) && chk_event_tag_name(evt) && !(evt.altKey || evt.ctrlKey)) { if (set_key == '83') window.location.href='index.php?page=<?=$next.$add_val?>'; else if (set_key == '65') window.location.href='index.php?page=<?=$prev.$add_val?>'; else if (set_key == '70') window.location.href='admin/reader.php?nr=1'; else if (set_key == '71') window.location.href='admin/reader.php?sc=1'; else if (set_key == '82') window.location.href='admin/reader.php'; else if (set_key == '84') window.location.href='admin/reader.php?rc=1'; else if (set_key == '81') window.location.href='admin/article.php'; else if (set_key == '90') window.location.href='#p_ps'; else if (set_key == '88') window.location.href='#p_rp'; else if (set_key == '67') window.location.href='#p_tb'; } } document.onkeydown = shortcut_onkeydown; </script> <? $sc_d1 = ob_get_contents(); ob_end_clean(); $d1 = str_replace("[##_shortcut_script_##]", $sc_d1, $d1); if (strpos($d1, "[##_s_rss_##]")) $d1 = str_replace("[##_s_rss_##]", get_rss(), $d1); if (strpos($d1, "[##_s_keyword_##]")) $d1 = str_replace("[##_s_keyword_##]", get_keyword(), $d1); if (strpos($d1, "[##_s_local_##]")) $d1 = str_replace("[##_s_local_##]", get_local(), $d1); if (strpos($d1, "[##_category_##]")) $d1 = str_replace("[##_category_##]", get_category(), $d1); if (strpos($d1, "[##_calendar_##]")) $d1 = str_replace("[##_calendar_##]", get_calendar(), $d1); if (strpos($d1, "[##_s_archive_rep_##]")) $d1 = str_replace("[##_s_archive_rep_##]", get_archive(), $d1); if (strpos($d1, "[##_s_rctps_rep_##]")) $d1 = str_replace("[##_s_rctps_rep_##]", "<a name=\"p_ps\"></a>".get_rctps_rep(), $d1); if (strpos($d1, "[##_s_rctrp_rep_##]")) $d1 = str_replace("[##_s_rctrp_rep_##]", "<a name=\"p_rp\"></a>".get_rctrp_rep(), $d1); if (strpos($d1, "[##_s_rcttb_rep_##]")) $d1 = str_replace("[##_s_rcttb_rep_##]", "<a name=\"p_tb\"></a>".get_rcttb_rep(), $d1); if (strpos($d1, "[##_s_link_rep_##]")) $d1 = str_replace("[##_s_link_rep_##]", get_link_rep(), $d1); $d1 = str_replace("[##_s_article_rep_##]", $d2, $d1); $time_total = chk_time($time_total); print $d1; print " <!-- 程序执行时间 : $time_session 风格载入时间 : $time_skin 程序载入时间 : $time_total -->"; ?>