function parseFileNew($path, $baseUrl, $docID) { echo "parse file<br>"; $content = file_get_contents($path, true); $title = getTitle($content); deleteFacts($title); logSubject($title); $GLOBALS["paragraphs"] = array(); $contentParse = $content; while ($contentParse != null) { $contentParse = parseText($contentParse); } echo "got paragraphs<br>"; $paragraphs = $GLOBALS["paragraphs"]; foreach ($paragraphs as $text) { logFact($text, $title, $docID); } $GLOBALS["urls"] = array(); $contentParse = $content; while ($contentParse != null) { $contentParse = parseURL($contentParse, $baseUrl); } //logURLs($GLOBALS["urls"]); //echo "<pre>"; print_r($GLOBALS["urls"]); echo "</pre>"; }
function pretty_dress($view) { global $blogid, $blog, $database, $service, $stats, $skinSetting; $context = Model_Context::getInstance(); /* local static */ global $pd_category, $pd_categoryXhtml, $pd_archive, $pd_calendar, $pd_tags, $pd_notices, $pd_recentEntry; global $pd_recentComment, $pd_recentTrackback, $pd_link, $pd_authorList; if (isset($_REQUEST['safe'])) { // safe mode return '<div class="coverpage-element-safebox">…</div>'; } if (isset($_REQUEST['tag'])) { // safe mode return '<div class="coverpage-element-safebox"><p>' . nl2br(htmlspecialchars($view, ENT_QUOTES)) . '</p></div>'; } $writer = User::getBlogOwnerName($blogid); $pageTitle = _t('페이지 제목'); dress('page_title', htmlspecialchars($pageTitle), $view); dress('blogger', htmlspecialchars($writer), $view); dress('title', htmlspecialchars($context->getProperty('blog.title')), $view); dress('desc', htmlspecialchars($context->getProperty('blog.description')), $view); if ($context->getProperty('blog.logo') != null) { dress('image', $context->getProperty('service.path') . "/attach/{$blogid}/" . $context->getProperty('blog.logo'), $view); } else { dress('image', $context->getProperty('service.path') . "/resources/image/spacer.gif", $view); } dress('blog_link', $context->getProperty('uri.blog') . "/", $view); dress('keylog_link', $context->getProperty('uri.blog') . "/keylog", $view); dress('localog_link', $context->getProperty('uri.blog') . "/location", $view); dress('taglog_link', $context->getProperty('uri.blog') . "/tag", $view); dress('guestbook_link', $context->getProperty('uri.blog') . "/guestbook", $view); list($view, $searchView) = Skin::cutSkinTag($view, 'search'); dress('search_name', 'search', $searchView); dress('search_text', isset($search) ? htmlspecialchars($search) : '', $searchView); dress('search_onclick_submit', 'searchBlog()', $searchView); dress('search', '<form id="TTSearchForm" action="' . parseURL($context->getProperty('uri.blog') . '/search/') . '" method="get" onsubmit="return searchBlog()">' . $searchView . '</form>', $view); dress('category', $pd_category, $view); dress('category_list', $pd_categoryXhtml, $view); dress('count_total', $stats['total'], $view); dress('count_today', $stats['today'], $view); dress('count_yesterday', $stats['yesterday'], $view); list($view, $archiveView) = Skin::cutSkinTag($view, 'archive_rep'); dress('archive_rep', getArchivesView($pd_archive, $archiveView), $view); dress('calendar', $pd_calendar, $view); list($view, $randomView) = Skin::cutSkinTag($view, 'random_tags'); dress('random_tags', getRandomTagsView($pd_tags, $randomView), $view); list($view, $recentNoticeItem) = Skin::cutSkinTag($view, 'rct_notice_rep'); list($view, $noticeView) = Skin::cutSkinTag($view, 'rct_notice'); $notices = $pd_notices; if (sizeof($notices) == 0) { $notices = array(array('title' => _t('공지 제목'), 'id' => -1)); } if (sizeof($notices) > 0) { $itemsView = ''; foreach ($notices as $notice) { $itemView = $recentNoticeItem; dress('notice_rep_title', htmlspecialchars(fireEvent('ViewNoticeTitle', Utils_Unicode::lessenAsEm($notice['title'], $skinSetting['recentNoticeLength']), $notice['id'])), $itemView); dress('notice_rep_link', "{$context->getProperty}('uri.blog')/notice/{$notice['id']}", $itemView); $itemsView .= $itemView; } dress('rct_notice_rep', $itemsView, $noticeView); dress('rct_notice', $noticeView, $view); } list($view, $authorList) = Skin::cutSkinTag($view, 'author_rep'); dress('author_rep', getAuthorListView($pd_authorList, $authorList), $view); list($view, $recentEntry) = Skin::cutSkinTag($view, 'rctps_rep'); dress('rctps_rep', getRecentEntriesView($pd_recentEntry, null, $recentEntry), $view); list($view, $recentComments) = Skin::cutSkinTag($view, 'rctrp_rep'); dress('rctrp_rep', getRecentCommentsView($pd_recentComment, null, $recentComments), $view); list($view, $recentTrackback) = Skin::cutSkinTag($view, 'rcttb_rep'); dress('rcttb_rep', getRecentTrackbacksView($pd_recentTrackback, null, $recentTrackback), $view); list($view, $s_link_rep) = Skin::cutSkinTag($view, 'link_rep'); dress('link_rep', getLinksView($pd_link, $s_link_rep), $view); dress('rss_url', "{$context->getProperty}('uri.blog')/rss", $view); dress('owner_url', "{$context->getProperty}('uri.blog')/owner", $view); dress('textcube_name', TEXTCUBE_NAME, $view); dress('textcube_version', TEXTCUBE_VERSION, $view); $tagSearches = array('@<a @i', '@</a *>@i', '@ id *= *".*"@isU', '@ onkey(down|up|press) *="@i', '@ on(click|load|unload) *="@i', '@<input +@i', '@<script.*</script *>@siU', '@<form @siU', '@</form>@siU'); $tagReplaces = array('<span ', '</span>', '', ' onnothing="', ' onnothing="', '<input disabled="disabled" ', '', '<div ', '</div>'); $view = preg_replace($tagSearches, $tagReplaces, $view); return correctCoverpageImage($view); }
if ($GLOBALS["DEBUG_LEVEL"] > 1) { WLOG("Starting SPLASH engine , include class.mysql.squid.builder.php "); } include_once dirname(__FILE__) . "/ressources/class.mysql.squid.builder.php"; $GLOBALS["Q"] = new mysql_squid_builder(); if ($GLOBALS["DEBUG_LEVEL"] > 1) { WLOG("[Q] initialised..."); } } while (!feof(STDIN)) { $url = trim(fgets(STDIN)); if ($url != null) { if ($GLOBALS["DEBUG_LEVEL"] > 1) { WLOG($url); } $array = parseURL($url); $SplashScreenURI = $GLOBALS["SplashScreenURI"]; if (!isset($GLOBALS["SPLASH_DEBUG"])) { $GLOBALS["SPLASH_DEBUG"] = false; } if ($GLOBALS["DEBUG_LEVEL"] > 1) { WLOG($url . " str:" . strlen($url) . " LOGIN:{$array["LOGIN"]},IPADDR:{$array["IPADDR"]} MAC:{$array["MAC"]} HOST:{$array["HOST"]} URI:{$array["URI"]}"); } if ($GLOBALS["SPLASH_DEBUG"]) { if (!$GLOBALS["SPLASH"]) { WLOG("Splash screen is not enabled..."); } } if ($GLOBALS["SPLASH"]) { if (trim($array["LOGIN"]) != null) { fwrite(STDOUT, "OK\n");
static function FinalizeEmail($_text, $_html, $_remove = false) { if ($_remove) { $_text = str_replace("<!--lz_ref_link-->", "", $_text); } else { if ($_html) { $_text = str_replace("<!--lz_ref_link-->", "<br><br>" . parseURL(@Server::$Configuration->File["gl_cpae"]), $_text); } else { $_text = str_replace("<!--lz_ref_link-->", "\r\n\r\n" . @Server::$Configuration->File["gl_cpae"], $_text); } } return $_text; }
echo _t('저장하기'); ?> " onclick="setPolicy(); return false;" /> </div> </form> </div> <hr class="hidden" /> <div id="part-setting-language" class="part"> <h2 class="caption"><span class="main-text"><?php echo setDetailPanel('language-setting', 'link', _t('언어, 시간대를 설정합니다')); ?> </span></h2> <form id="language-form" class="data-inbox" method="post" action="<?php echo parseURL($context->getProperty('uri.blog') . '/owner/setting/blog/language'); ?> "> <div id="language-setting" class="section folding"> <fieldset class="container"> <legend><?php echo _t('언어 및 시간대'); ?> </legend> <dl id="admin-language-line" class="line"> <dt><span class="label"><?php echo _t('관리자 화면 언어'); ?> </span></dt> <dd>
document.getElementById("optimizingIndicator").style.width = "0%"; document.getElementById("optimizingDataDialogTitle").innerHTML = '<?php echo _t('데이터베이스를 최적화하고 있습니다. 잠시만 기다려 주십시오.'); ?> '; PM.showPanel("optimizingDataDialog"); document.getElementById("dataOptimizer").submit(); } <?php } } ?> //]]> </script> <form id="form-quilt" method="post" action="<?php echo parseURL($ctx->getProperty('uri.blog') . '/owner/center/dashboard'); ?> "> <div id="part-center-quilt<?php echo $editClass; ?> " class="part"> <h2 class="caption"><span class="main-text"><?php echo _t('조각보를 봅니다'); ?> </span></h2> <?php if (!isset($_REQUEST['edit']) && Acl::check('group.owners')) { ?> <dl id="independent-notice-line" class="line">
function check_post_rules($ressource = '', $returnVal = false) { global $tpl; if (isset($ressource) && is_array($ressource) && !empty($ressource)) { //Check if submitter is using an user-agent if ($ALLOW_EMPTY_USERAGENT != 1) { //Determine user-agent $userAgent = isset($_SERVER['HTTP_USER_AGENT']) && !empty($_SERVER['HTTP_USER_AGENT']) ? filter_white_space($_SERVER['HTTP_USER_AGENT']) : ''; if (empty($userAgent)) { //No user-agent available, //further access blocked unset($_POST, $_GET, $_REQUEST); //Provide a reason why access was unautorised $reason = _L('You have no or an invalid useragent') . '!'; if ($returnVal) { return gotoUnauthorized($reason, TEMPLATE_DIR . '/unauthorized.tpl', true); } else { gotoUnauthorized($reason, TEMPLATE_DIR . '/unauthorized.tpl', false); exit; } } } //Check if submission is comming from //the current server or somewhere else if ($ALLOW_FOREIGN_REFERER != 1) { //Determine server hostname $serverHostTemp = isset($_SERVER['SERVER_NAME']) && !empty($_SERVER['SERVER_NAME']) ? trim($_SERVER['SERVER_NAME']) : (isset($_SERVER['HTTP_HOST']) && !empty($_SERVER['HTTP_HOST']) ? trim($_SERVER['HTTP_HOST']) : ''); //Get only domain //(usually not needed but server configs are not always correct) $serverHost = trim(parseDomain($serverHostTemp)); if (empty($serverHost)) { //Could not determine server hostname, //usually if it's an IP address $serverPath = parseURL($serverHostTemp); $serverHost = !empty($serverPath['path']) ? $serverPath['path'] : $serverHostTemp; unset($serverPath); } //Determine page where post came from $refererHostTemp = isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) ? trim($_SERVER['HTTP_REFERER']) : ''; $refererHost = parseDomain($refererHostTemp); $pattern = array('`^http[s]?:`', '`^ftp:`', '`^mailto:`', '`^www\\.`', '`^\\.`', '`\\.$`', '`[^\\w\\d-\\.]`'); $serverHost = preg_replace($pattern, '', $serverHost); $refererHost = preg_replace($pattern, '', $refererHost); //Check if hostnames are identical if (!empty($serverHost) && !empty($refererHost) && $serverHost != $refererHost) { //Hostnames do not match, //Submission is not allowed! //Provide a reason why access was unautorised $reason = _L('You are now allowed to submit using foreign pages or scripts') . '!'; if ($returnVal) { return gotoUnauthorized($reason, TEMPLATE_DIR . '/unauthorized.tpl', true); } else { gotoUnauthorized($reason, TEMPLATE_DIR . '/unauthorized.tpl', false); exit; } } unset($serverHost, $serverHostTemp, $refererHost, $refererHostTemp); } } unset($ressource, $returnVal); return false; }
function _pluginCreateStationItems($url) { $retMediaItems = array(); $proxy = 0; if (preg_match("/^proxy:(.*)/", $url, $res)) { $use_proxy = 1; $url = $res[1]; } else { $use_proxy = 0; } $radios = parseURL($url); $n = 0; foreach ($radios as $radio) { $n++; if ($use_proxy) { $res = "http://localhost/umsp/plugins/mp3-proxy.php?itemURL=" . $radio; } else { $res = $radio; } $retMediaItems[] = array("id" => 'umsp://plugins/spanishradio?' . urlencode($res), "dc:title" => $res, "res" => $res, 'upnp:class' => 'object.item.audioItem', 'protocolInfo' => 'http-get:*:audio/mpeg:*'); } return $retMediaItems; }
echo _t('알림판 위젯'); ?> </a></li> <li<?php echo isset($tabsClass['coverpage']) ? ' class="selected"' : NULL; ?> ><a href="<?php echo $context->getProperty('uri.blog'); ?> /owner/plugin?visibility=coverpage"><?php echo _t('블로그 표지 위젯'); ?> </a></li> </ul> <form id="part-plugin-list" class="part" method="post" action="<?php echo parseURL($context->getProperty('uri.blog') . "/owner/plugin"); ?> "> <input type="hidden" name="search" value="<?php echo $search; ?> " /> <h2 class="caption"><span class="main-text"><?php echo _t('설치된 플러그인 목록입니다'); ?> </span></h2> <div class="main-explain-box"> <p class="explain"><?php echo _t('블로그에 다양한 기능을 더해보세요. 원하는 기능이 든 아이콘을 눌러주면 바로 블로그의 기능이 업그레이드 됩니다.') . '<br /> ' . _t('알림판 위젯 플러그인은 로그인후 보이는 알림판에 위젯을 추가해 줍니다.') . ' ' . _t('블로그 표지 위젯 플러그인은 블로그의 첫 화면이나 표지 화면에 출력되는 위젯을 추가해 줍니다.') . ' ' . _t('알림판 위젯 플러그인이나 블로그 표지 플러그인은 사이드바와 같이 자유롭게 끌어서 위치를 바꿀 수 있습니다.'); ?>
"><img src="<?php echo $context->getProperty('service.path') . $context->getProperty('panel.skin'); ?> /image/img_delete_module.gif" border="0" alt="<?php echo _t('삭제'); ?> " /></a> <!-- TODO : sidebar plugin settting --> </div> <?php $pluginparameters = $sidebarPluginArray[$sidbarPluginIndex]['parameters']; if (count($pluginparameters) > 0) { ?> <div class="edit-button-box"> <a href="<?php echo parseURL($context->getProperty('uri.blog') . '/owner/skin/sidebar/edit?sidebarNumber=' . $i . '&modulePos=' . $j . $viewMode); ?> "><?php echo _t('편집'); ?> </a> </div> <?php } ?> <div class="module-content"> <?php if ($invalidPlugin == false && function_exists($handler)) { $pluginURL = "{$context->getProperty('service.path')}/plugins/{$orderConfig[$j]['id']['plugin']}"; echo pretty_dress(call_user_func($handler, $orderConfig[$j]['parameters'])); }
<?php session_name('pubTool'); // header('P3P: CP="CAO PSA OUR"'); session_start(); require_once __DIR__ . '/../vendor/autoload.php'; include '../inc/functions.php'; $site = $_POST['website']; $comment = $_POST['comment']; parseURL($site, $comment); ?> <meta http-equiv="refresh" content="0;url=./index.php">