Code Type : C
include("../inc_global.php");
include("../inc_function.php");
check_authority();
if ($cutstr == "" or $cutstr == 0){
$cutstr = 300;
}
if ($mode == "delete") {
put_query("delete from t3_".$dbid."_tblog where no = '$exenum'");
header("Location: article_trackback_pop.php?no=$no");
exit;
}
$sql = "
select
category1, category2, title, body, user_id,
image_file_path1, image_file_path2, regdate, is_public
from
t3_".$dbid."
where
no = '$no'
";
list (
$category1, $category2, $title, $body, $user_id,
$image_file_path1, $image_file_path2, $regdate, $is_public
) = mysql_fetch_array(mysql_query($sql));
if ($mode == "send") {
$plink = $s_root_path."index.php?pl=$no";
$body = str_trans_rev($body);
$body = str_tag_truncate(attach_image(0, $body, $s_root_path, $r_root_path, $attach_path.$image_file_path1.$image_file_path2));
unset($n1, $n2);
while ($n1 = strpos($body, "[#M _")) {
$n2 = strpos($body, "_ M#]");
if (!$n2 || $n1 > $n2) break;
$body = substr($body, 0, $n1).substr($body, $n2+4);
}
for ($i=0;$i<$cutstr;$i++) {
if (ord(substr($body,$i,1)) < 128) {
$lbody .= substr($body,$i,1);
} else {
$lbody .= substr($body,$i,3);
$i++;$i++;
}
}
if (!$is_utf8) {
$title = iconv("utf-8","euc-kr",$title);
$p_title = iconv("utf-8","euc-kr",$p_title);
$lbody = iconv("utf-8","euc-kr",$lbody);
header("Content-Type: text/html; charset=euc-kr");
}
$data ="url=".rawurlencode($plink)."&title=".rawurlencode($title)."&blog_name=".rawurlencode($p_title)."&excerpt=".rawurlencode($lbody);
$result = send_packet($url, $data);
header("Content-Type: text/html; charset=utf-8");
if (strpos($result, "error>1
exit;
}
admin_pop_header("");
?>
print_content_line(); ?>
미리보기 :: |
$xbody = $body;
$xbody = str_trans_rev($xbody);
$xbody = str_tag_truncate(attach_image(0, $xbody, $s_root_path, $r_root_path, $attach_path.$image_file_path1.$image_file_path2));
unset($n1, $n2);
while ($n1 = strpos($xbody, "[#M _")) {
$n2 = strpos($xbody, "_ M#]");
if (!$n2 || $n1 > $n2) break;
$xbody = substr($xbody, 0, $n1).substr($xbody, $n2+4);
}
for ($i=0;$i<$cutstr;$i++) {
if (ord(substr($xbody,$i,1)) < 128) {
$tbody .= substr($xbody,$i,1);
} else {
$tbody .= substr($xbody,$i,3);
$i++;$i++;
}
}
echo $tbody;?> |
|
print_content_line(); ?>
admin_pop_footer(""); ?>