import.php 0100644 0000060 0000060 00000032624 07557254426 012337 0 ustar apache apache ]))*",$fulltext,$reg);
// this gets what is between and
preg_match("/([^\]]+)<\/a>/",stripslashes($reg[0]),$url_text);
if (empty($url_text[1])) {
preg_match("/([^\]]+)<\/A>/",stripslashes($reg[0]),$url_text);
}
$orig = $reg[0];
//if links is too long, shorten it and add ... at the end
if (strlen($url_text[2]) > 26) {
$new_text = substr($url_text[2],0,26) . '...';
// NOTE, this assumes there is no space between > and url_text[1]
$reg[0] = str_replace(">".$url_text[2],">".$new_text,$reg[0]);
}
if(stristr($fulltext,"{$LANG24[37]} $author\n";
}
$related .= "
{$LANG24[38]} $topic\n";
$related = addslashes(COM_checkHTML(COM_checkWords($related)));
// Clean up the text
$introtext = addslashes($introtext);
$bodytext = addslashes($bodytext);
$title = addslashes(htmlspecialchars(strip_tags(COM_checkWords($title))));
$comments = DB_count($_TABLES['comments'],'sid',$sid);
DB_save($_TABLES['stories'],'sid,uid,tid,title,introtext,bodytext,hits,date,comments,related,featured,commentcode,statuscode,postmode,frontpage,draft_flag,numemails,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon,show_topic_icon',"$sid,$uid,'$tid','$title','$introtext','$bodytext',$hits,'$date','$comments','$related',$featured,'$commentcode','$statuscode','$postmode','$frontpage',$draft_flag,$numemails,$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon,$show_topic_icon", $_CONF['site_admin_url'] . '/story.php?msg=9');
} else {
$display .= COM_siteHeader('menu');
$display .= COM_errorLog($LANG24[31],2);
$display .= COM_siteFooter();
echo $display;
exit;
}
}
/*
* Main Function
*/
if ($import == 'Import File') {
$buffer='';
$fd = fopen($impfile,'r');
com_errorlog("filesize of $impfile is " . filesize($impfile),1);
$buffer = fread ($fd, filesize ($impfile));
fclose($fd);
if ($body == 'on') {
$buffer = substr($buffer,strpos(strtolower($buffer),'')+1);
$buflen = strpos(strtolower($buffer),' 0) {
$buffer = substr($buffer,0,$buflen);
}
}
if ($filter == 'on') {
$buffer=COM_checkHTML(COM_checkWords($buffer));
}
if ($postmode == 'plaintext') {
$buffer=htmlspecialchars(COM_checkWords($buffer));
}
submitstory('',COM_makesid(),$owner_id,$topic_id,$title,$introtext,$buffer,0,time(),0,$featured,$commentcode,$statuscode,$postmode,$frontpage,$draft,0,$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,$perm_anon,'',$topic_icon);
}
$display = COM_siteHeader();
$display .= COM_startBlock("Import -- Import files into Geeklog Database As Articles");
$display .= "This Page imports a standard html page into Geeklog as a Story. If the 'Body' option is checked, it looks first ";
$display .= "for the <body> tag. It includes everything after the <body> tag until it";
$display .= " finds the </body> tag. If there is script in the <head> tag it is ignored.";
$display .= " If the 'Filter HTML' option is checked it filters the file according to Geeklogs default ";
$display .= "filter, otherwise all html is allowed.
";
$display .= "";
$display .= COM_endBlock();
$display .= COM_siteFooter(false);
echo $display;
?>