function FlashCounterViewDataSet($DATA) { global $blog, $service; requireComponent('Textcube.Function.misc'); $cfg = misc::fetchConfigVal($DATA); if (!isset($blog['blogLanguage'])) { $blog['blogLanguage'] = $service['language']; } // Locale language file support. switch ($blog['blogLanguage']) { case "zh-TW": $retval = 'Flash 計數器尺寸 "205x85" 僅適用於黑色底色設定。'; break; case "zh-CN": $retval = 'Flash 计数器尺寸 "205x85" 仅适用于黑色底色设定。'; break; default: $retval = "플래쉬카운터 '205x85' 크기는 검정색만 설정가능합니다."; } if ($cfg['flashsize'] == '205') { if ($cfg['flashcolor'] == 'white') { return $retval; } } return true; }
function resetTotalVisits() { global $database, $db, $session; requireComponent('Bloglounge.Model.Users'); if (empty($session['id']) || User::get($session['id'], 'is_admin') != 'y') return false; return $db->execute('UPDATE '.$database['prefix'].'Settings SET value=0 WHERE name = "totalVisit"'); }
function CT_Start_Default($target) { requireModel("blog.attachment"); requireComponent("Eolin.PHP.Core"); requireComponent("Textcube.Function.misc"); global $blogid, $blogURL, $database, $service; $target .= '<ul>'; $target .= '<li><a href="' . $blogURL . '/owner/entry/post">' . _t('새 글을 씁니다') . '</a></li>' . CRLF; $latestEntryId = Setting::getBlogSettingGlobal('LatestEditedEntry_user' . getUserId(), 0); if ($latestEntryId !== 0) { $latestEntry = CT_Start_Default_getEntry($blogid, $latestEntryId); if ($latestEntry != false) { $target .= '<li><a href="' . $blogURL . '/owner/entry/edit/' . $latestEntry['id'] . '">' . _f('최근글(%1) 수정', htmlspecialchars(Utils_Unicode::lessenAsEm($latestEntry['title'], 10))) . '</a></li>'; } } if (Acl::check('group.administrators')) { $target .= '<li><a href="' . $blogURL . '/owner/skin">' . _t('스킨을 변경합니다') . '</a></li>' . CRLF; $target .= '<li><a href="' . $blogURL . '/owner/skin/sidebar">' . _t('사이드바 구성을 변경합니다') . '</a></li>' . CRLF; $target .= '<li><a href="' . $blogURL . '/owner/skin/setting">' . _t('블로그에 표시되는 값들을 변경합니다') . '</a></li>' . CRLF; $target .= '<li><a href="' . $blogURL . '/owner/entry/category">' . _t('카테고리를 변경합니다') . '</a></li>' . CRLF; $target .= '<li><a href="' . $blogURL . '/owner/plugin">' . _t('플러그인을 켜거나 끕니다') . '</a></li>' . CRLF; } if ($service['reader'] != false) { $target .= '<li><a href="' . $blogURL . '/owner/network/reader">' . _t('RSS 리더를 봅니다') . '</a></li>' . CRLF; } $target .= '</ul>'; return $target; }
function TextcubeBirthdayDataSet($DATA) { requireComponent('Textcube.Function.misc'); $cfg = Setting::fetchConfigVal($DATA); // if( $cfg['month'] != 날짜냐?) return "잘못된 날짜입니다."; // 등등등등 여기서 원하는 검증을 하시고 검증 실패시 사용자에게 보여줄 에러메세지를 보내주심 됩니다. // 성공하면 그냥 true return true; }
function EntriesWithTags_DataSet($data) { requireComponent('Textcube.Function.misc'); $cfg = misc::fetchConfigVal($data); if (!$cfg['entries'] || empty($cfg['entries']) || intval($cfg['entries'] <= 0)) { $cfg['entries'] = 5; } return true; }
function SB_Spacer($target) { global $configVal; requireComponent('Textcube.Function.misc'); $data = Setting::fetchConfigVal($configVal); if (!is_null($data) && array_key_exists('height', $data)) { $height = $data['height']; } else { $height = '20'; } $text = '<div class="SB_Spacer" style="height:' . $height . 'px;"></div>'; return $text; }
function addTagsWithEntryId($blogid, $entry, $taglist) { requireComponent('Needlworks.Cache.PageCache'); global $database; if ($taglist == null) { return; } $tmptaglist = array_filter($taglist, 'Tag_removeEmptyTagHelper'); if (count($tmptaglist) == 0) { return; } $taglist = array(); foreach ($tmptaglist as $tag) { $tag = POD::escapeString(Utils_Unicode::lessenAsEncoding(trim($tag), 255)); array_push($taglist, $tag); } // step 1. Insert Tags foreach ($taglist as $tg) { if (!Tag::doesExist($tg)) { @POD::execute("INSERT INTO {$database['prefix']}Tags (id, name) VALUES (" . (Tag::_getMaxId() + 1) . ",'" . $tg . "')"); } } // $tagliststr = '(\'' . implode('\') , (\'', $taglist) . '\')'; // POD::execute("INSERT IGNORE INTO {$database['prefix']}Tags (name) VALUES $tagliststr "); // the point of Race condition // if other entry is deleted, some missing tags can be exist so they are not related with this entry. // step 2. Insert Relations $tagliststr = '\'' . implode('\' , \'', $taglist) . '\''; /* POD::execute("INSERT INTO {$database['prefix']}TagRelations (SELECT $blogid, t.id, $entry FROM {$database['prefix']}Tags as t WHERE name in ( $tagliststr ) AND t.id NOT IN (tag = t.id) AND (entry = $entry) AND (blogid = $blogid) ) )"); */ // For MySQL 3, Simple Query Version $tagIDs = POD::queryColumn("SELECT id FROM {$database['prefix']}Tags WHERE name in ( {$tagliststr} )"); $tagrelations = array(); foreach ($tagIDs as $tagid) { array_push($tagrelations, " ({$blogid}, {$tagid}, {$entry}) "); CacheControl::flushTag($tagid); } foreach ($tagrelations as $tr) { @POD::execute("INSERT INTO {$database['prefix']}TagRelations VALUES {$tr}"); } //$tagRelationStr = implode(', ', $tagrelations); //POD::execute("INSERT IGNORE INTO {$database['prefix']}TagRelations VALUES $tagRelationStr"); }
function requireComponents($_path, $_local = true) { $path = getJFolder($_path, $_local, debug_backtrace()); if (file_exists($path)) { $files = subFolderFile($path); foreach ($files as $i) { if (isPhp($path . "/" . $i)) { requireComponent($path . "/" . $i, false, 0); } } } else { requireError($_path); } }
function URLkeeper($target) { global $hostURL, $blogURL; global $configVal; requireComponent('Tattertools.Function.misc'); $data = Setting::fetchConfigVal($configVal); $config = $data['viewForm']; $target .= ' <script type="text/javascript"> //<![CDATA[ window.onload = function(){ var type = navigator.appName var lang; var msg; var myurl = location.href; var config = "' . $config . '"; if (type=="Netscape") lang = navigator.language else lang = navigator.userLanguage // 국가코드에서 앞 2글자만 자름 var lang = lang.substr(0,2) // 한글인 경우 if (lang == "ko") msg = " 원래 주소인 "+myurl+" 로 접속해주세요."; // 다른 언어인 경우 else msg = "please, visit directly via "+myurl; try { if(top != self){ if (config == "1") { window.open(myurl,"_top"); }else{ if (confirm(msg)) window.open(myurl,"_top"); } } } catch (e) { } } //]]> </script> ' . CRLF; return $target; }
function refreshLocaleResource($locale) { global $__locale; // po파일과 php파일의 auto convert 지원을 위한 루틴. $lang_php = $__locale['directory'] . '/' . $locale . ".php"; $lang_po = $__locale['directory'] . '/po/' . $locale . ".po"; // 두 파일 중 최근에 갱신된 것을 찾는다. $time_po = filemtime( $lang_po ); $time_php = filemtime( $lang_php ); // po파일이 더 최근에 갱신되었으면 php파일을 갱신한다. if ($time_po && ($time_po > $time_php)) { requireComponent('Needlworks.Core.Locale'); $langConvert = new Po2php; $langConvert->open($lang_po); $langConvert->save($lang_php); } return false; }
function call() { requireComponent('LZ.PHP.HTTPRequest'); if (func_num_args() < 1) return false; $request = new HTTPRequest(); $request->method = 'POST'; $request->url = $this->url; $request->contentType = 'text/xml'; $request->async = $this->async; ob_start(); echo '<?xml version="1.0" encoding="utf-8"?><methodCall><methodName>' . func_get_arg(0) . '</methodName><params>'; for ($i = 1; $i < func_num_args(); $i++) { echo '<param>'; echo $this->_encodeValue(func_get_arg($i)); echo '</param>'; } echo '</params></methodCall>'; $request->content = ob_get_contents(); ob_end_clean(); if (!$request->send()) { return false; } if ($this->async) { return true; } if ((!is_null($request->getResponseHeader('Content-Type'))) && ($request->getResponseHeader('Content-Type') != 'text/xml')) { return false; } $xmls = new XMLStruct(); $request->responseText = preg_replace_callback('/&#([0-9a-fx]+);/mi', 'replace_num_entity', $request->responseText); $xmls->open($request->responseText); if ($xmls->error) { return false; } if (isset($xmls->struct['methodResponse'][0]['fault'][0]['value'])) $this->fault = $this->_decodeValue($xmls->struct['methodResponse'][0]['fault'][0]['value'][0]); else if (isset($xmls->struct['methodResponse'][0]['params'][0]['param'][0]['value'])) $this->result = $this->_decodeValue($xmls->struct['methodResponse'][0]['params'][0]['param'][0]['value'][0]); else return false; return true; }
function Sidebar_Show($parameters) { global $configVal; requireComponent('Textcube.Function.Setting'); $datas = setting::fetchConfigVal($configVal); $cityname = $datas['city1']; $weather = 'http://www.google.co.kr/ig/api?&weather=' . $cityname . '&hl=ko&oe=utf-8'; $img = "http://www.google.co.kr"; $xml = simplexml_load_file($weather)->weather->forecast_information; $xml1 = simplexml_load_file($weather)->weather->current_conditions; $xml2 = simplexml_load_file($weather)->weather->forecast_conditions; $city = $xml->city; $date = $xml->forecast_date; $condition = $xml1->condition; $temp_min = $xml2->low; $temp_max = $xml2->high; $humidity = $xml1->humidity; $imgdata = $xml1->icon; $wind = $xml1->wind_condition; //인터페이스 부분// $code = "<br>"; $code .= "<b>지역명 : </b>"; $code .= $cityname; $code .= "<br>"; $code .= "<b>날짜</b> : "; $code .= $date[data]; $code .= "<br><br><center>"; $code .= "<b>기상상태</b>"; $code .= "<br>"; $code .= "<img src=" . $img . $imgdata[data] . ">"; $code .= "<br>"; $code .= $condition[data]; $code .= "</center><br>"; $code .= "<b>최저 ~ 최고온도</b> : "; $code .= $temp_min[data] . "℃ ~ "; $code .= $temp_max[data] . "℃"; $code .= "<br>"; $code .= $humidity[data]; $code .= "<br>"; $code .= $wind[data]; return $code; }
function AddNewWindowLinks($target, $mother) { global $pluginURL, $configVal, $blogid; if (is_null($configVal)) { return $target; } requireComponent('Textcube.Function.misc'); $config = Misc::fetchConfigVal($configVal); switch ($config['type']) { case 'hack': $replacement = '<a href="$1"$2>$4</a><a href="$1" onclick="window.open(\'$1\');return false;" '; $replacement .= 'style="border:none; text-decoration:none; padding-left:15px; margin-right: -0.5em; background: transparent url(' . $pluginURL . '/newwindow.gif) no-repeat 0px 50%;" title="' . _t("다음 링크를 새 창으로 엽니다.") . ' : \'$4\'"> </a>'; break; case 'img': $replacement = '<a href="$1"$2>$4</a><a href="$1" onclick="window.open(\'$1\');return false;">'; $replacement .= '<img src="' . $pluginURL . '/newwindow.gif" style="margin-left:0.1em; margin-right:0.1em; vertical-align:middle;" alt="' . _t('(새 창으로 열기)') . '"></a>'; break; case 'text': default: $replacement = '<a href="$1"$2>$4</a> <a href="$1" onclick="window.open(\'$1\');return false;" title="Open \'$4\' link in a new window">' . _t('(새 창으로 열기)') . '</a>'; } $target = preg_replace('/<a href="(http:\\/\\/[^"]+)"(( \\w+="[^"]+")*)>([^<]+)<\\/a>/i', $replacement, $target); return $target; }
function updateCommentsOfEntry($blogid, $entryId) { global $database; requireComponent('Needlworks.Cache.PageCache'); $commentCount = POD::queryCell("SELECT COUNT(*)\n\t\tFROM {$database['prefix']}Comments\n\t\tWHERE blogid = {$blogid}\n\t\t\tAND entry = {$entryId}\n\t\t\tAND isfiltered = 0"); POD::query("UPDATE {$database['prefix']}Entries\n\t\tSET comments = {$commentCount}\n\t\tWHERE blogid = {$blogid}\n\t\t\tAND id = {$entryId}"); if ($entryId >= 0) { CacheControl::flushEntry($entryId); } return $commentCount; }
?> <div class="warning_messages_wrap"> <br /> <?php echo _t('이 블로그는 이미 등록되어 있어 재등록 하실 수 없습니다.');?> <br /><br /> <a href="#" class="normalbutton" onclick="history.back(); return false;"><span><?php echo _t('뒤로');?></span></a> </div> <?php } else { $result = $event->on('Add.getFeed', $xml); if(!is_array($result)) { $result = feed::getFeedItems($xml); } requireComponent('Bloglounge.Data.Groups'); $groups = Group::getGroupsAll(); $users = User::getMembers(); if(count($result)>0) { ?> <dl> <dt><?php echo _t('글');?></dt> <dd class="text"> <?php echo _f('가장 최신의 글 "%1"(을)를 포함한 %2개의 글이 존재합니다.','<span class="point">'.UTF8::lessen($result[0]['title'],40).'</span>', '<span class="cnt">'.count($result).'</span>');?> </dd> </dl> <?php } ?>
function printIphoneImageResizer($blogid, $filename, $cropSize) { global $serviceURL; requireComponent('Textcube.Function.misc'); if (!is_dir(ROOT . "/cache/thumbnail")) { @mkdir(ROOT . "/cache/thumbnail"); @chmod(ROOT . "/cache/thumbnail", 0777); } if (!is_dir(ROOT . "/cache/thumbnail/" . $blogid)) { @mkdir(ROOT . "/cache/thumbnail/" . $blogid); @chmod(ROOT . "/cache/thumbnail/" . $blogid, 0777); } if (!is_dir(ROOT . "/cache/thumbnail/" . $blogid . "/iphoneThumbnail/")) { @mkdir(ROOT . "/cache/thumbnail/" . $blogid . "/iphoneThumbnail/"); @chmod(ROOT . "/cache/thumbnail/" . $blogid . "/iphoneThumbnail/", 0777); } $thumbFilename = $filename; $imageURL = "{$serviceURL}/attach/{$blogid}/{$filename}"; if (extension_loaded('gd')) { if (stristr($filename, 'http://')) { $thumbFilename = printIphoneRemoteImageFilename($filename); } $thumbnailSrc = ROOT . "/cache/thumbnail/{$blogid}/iphoneThumbnail/th_{$thumbFilename}"; if (!file_exists($thumbnailSrc)) { $imageURL = printIphoneCropProcess($blogid, $filename, $cropSize); } else { $imageURL = "{$serviceURL}/thumbnail/{$blogid}/iphoneThumbnail/th_{$thumbFilename}"; } } else { if (stristr($filename, 'http://')) { $imageURL = $filename; } } return $imageURL; }
function getRDFfromURL($url) { requireComponent('Needlworks.PHP.HTTPRequest'); $request = new HTTPRequest($url); if (!$request->send() || !$request->responseText) { return false; } if (!preg_match('!<rdf:RDF\\s+([^>]+)>\\s*(<rdf:Description\\s+([^>]+)>)\\s*</rdf:RDF>!s', $request->responseText, $match)) { return false; } if (class_exists('DOMDocument')) { $doc = DOMDocument::loadXML($match[0]); if (!$doc) { return false; } $desc = $doc->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'Description'); $desc = $desc->item(0); if ($desc === null) { return false; } return array('title' => $desc->getAttributeNS('http://purl.org/dc/elements/1.1/', 'title'), 'url' => $desc->getAttributeNS('http://purl.org/dc/elements/1.1/', 'identifier'), 'trackbackURL' => $desc->getAttributeNS('http://madskills.com/public/xml/rss/module/trackback/', 'ping')); } else { preg_match_all('/(\\S+?)=(["\']?)(.*?)\\2/', $match[1], $attribs, PREG_SET_ORDER); $namespace = array('rdf' => 'rdf', 'dc' => 'dc', 'trackback' => 'trackback'); foreach ($attribs as $attrib) { if (substr(strtolower($attrib[1]), 0, 6) == 'xmlns:') { $name = substr($attrib[1], 6); switch (trim($attrib[3])) { case 'http://www.w3.org/1999/02/22-rdf-syntax-ns#': $namespace['rdf'] = $name; break; case 'http://purl.org/dc/elements/1.1/': $namespace['dc'] = $name; break; case 'http://madskills.com/public/xml/rss/module/trackback/': $namespace['trackback'] = $name; break; } } } preg_match_all('/(\\S+?)=(["\']?)(.*?)\\2/', $match[2], $attribs, PREG_SET_ORDER); $result = array('title' => null, 'url' => null, 'trackbackURL' => null); foreach ($attribs as $attrib) { switch ($attrib[1]) { case $namespace['dc'] . ':title': $result['title'] = $attrib[3]; break; case $namespace['dc'] . ':identifier': $result['url'] = $attrib[3]; break; case $namespace['trackback'] . ':ping': $result['trackbackURL'] = $attrib[3]; } } return isset($result['trackbackURL']) ? $result : false; } }
case 6: return _t("테이블 생성에 실패했습니다."); break; case 7: return _t("설정파일(config.php)을 찾을 수 없어 업그레이드를 진행할 수 없습니다."); break; case 8: return _t("데이터베이스 서버에 접속할 수 없습니다. 설정파일(config.php) 내용을 확인해주세요."); break; case 9: return _t("필수 테이블이 존재하지 않아 업그레이드를 진행할 수 없습니다. 새로 설치해 주세요."); break; case 10: return _t("관리자 정보를 입력해주세요."); break; case 11: return _t("관리자 정보를 확인할 수 없습니다."); break; case 12: return _t("관리자 비밀번호가 잘못되었습니다."); break; case 13: return _t("관리자가 아닙니다."); break; default: return false; } } function errorPrintForConfigMake($error) { switch($error) { case 1: return _t("잘못된 접근입니다."); break; case 2: return _t("입력항목 중 빠진 내용이 있습니다."); break; case 3: return _t("테이블 식별자에 사용할 수 없는 문자 혹은 숫자가 포함되어 있습니다."); break; case 4: return _t("데이터베이스 서버에 접속할 수 없습니다. 입력하신 내용을 확인해주세요."); break; case 5: return _t("설정파일(config.php)을 생성할 수 없습니다. 이미 존재하는 파일이라면 삭제하셔야 새로 설치를 진행하실 수 있습니다."); break; default: return false; } } requireComponent('Eolin.PHP.UnifiedEnvironment'); requireComponent('LZ.PHP.Core'); requireComponent('LZ.DB.Core'); requireComponent('LZ.PHP.Locale'); Locale::setDirectory(ROOT . '/language/locale'); Locale::set('auto'); // set locale by accept-language header ?>
function setEntryVisibility($id, $visibility) { global $database; requireModel("blog.feed"); requireModel("blog.category"); requireComponent('Needlworks.Cache.PageCache'); $blogid = getBlogId(); if ($visibility < 0 || $visibility > 3) { return false; } list($oldVisibility, $category) = POD::queryRow("SELECT visibility, category FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND id = {$id} AND draft = 0"); if ($category < 0) { if ($visibility == 1) { $visibility = 0; } if ($visibility == 3) { $visibility = 2; } } if ($oldVisibility === null) { return false; } if ($visibility == $oldVisibility) { return true; } if ($oldVisibility == 3) { syndicateEntry($id, 'delete'); } else { if ($visibility == 3) { if (!syndicateEntry($id, 'create')) { POD::query("UPDATE {$database['prefix']}Entries \n\t\t\t\tSET visibility = {$oldVisibility}, \n\t\t\t\t\tmodified = UNIX_TIMESTAMP() \n\t\t\t\tWHERE blogid = {$blogid} AND id = {$id}"); return false; } } } $result = POD::queryCount("UPDATE {$database['prefix']}Entries \n\t\tSET visibility = {$visibility}, \n\t\t\tmodified = UNIX_TIMESTAMP() \n\t\tWHERE blogid = {$blogid} AND id = {$id}"); if (!$result) { // Error. return false; } if ($result == 0) { // Not changed. return true; } if ($category >= 0) { if ($oldVisibility >= 2 && $visibility < 2 || $oldVisibility < 2 && $visibility >= 2) { clearFeed(); } if ($oldVisibility == 3 && $visibility <= 2 || $oldVisibility <= 2 && $visibility == 3) { clearFeed(); } if ($category > 0) { updateCategoryByEntryId($blogid, $id, 'update', $parameters = array('visibility' => array($oldVisibility, $visibility))); } // updateEntriesOfCategory($blogid, $category); } CacheControl::flushEntry($id); CacheControl::flushDBCache('entry'); CacheControl::flushDBCache('comment'); CacheControl::flushDBCache('trackback'); fireEvent('ChangeVisibility', $visibility, $id); return true; }
<?php requireComponent('Bloglounge.Data.Caches'); requireComponent('Bloglounge.Data.Tags'); requireComponent('Bloglounge.Data.FeedItems'); requireComponent('Bloglounge.Data.SkinSettings'); requireComponent('Bloglounge.Model.Skin'); requireComponent('Bloglounge.Model.SkinElements'); requireComponent('Bloglounge.Model.Users'); requireComponent('Bloglounge.Model.Boom'); ?>
<?php requireComponent('LZ.PHP.Session'); session_name('S20_BLOGLOUNGE_SESSION'); setSession(); session_set_save_handler('openSession', 'closeSession', 'readSession', 'writeSession', 'destroySession', 'gcSession'); session_cache_expire(1); session_set_cookie_params(0, '/', ((substr(strtolower($_SERVER['HTTP_HOST']), 0, 4) == 'www.') ? substr($_SERVER['HTTP_HOST'], 3) : $_SERVER['HTTP_HOST'])); register_shutdown_function('session_write_close'); if (session_start() !== true) { header('HTTP/1.1 503 Service Unavailable'); } $session = array(); $session['id'] = isset($_SESSION['_app_id_'])?$_SESSION['_app_id_']:0; $session['message'] = isset($_SESSION['_app_message_'])?$_SESSION['_app_message_']:''; ?>
<?php define('ROOT', '../..'); include ROOT . '/lib/include.php'; if(!empty($accessInfo['action'])) { // export domain requireComponent('Bloglounge.Model.Exports'); $domainName = $accessInfo['action']; $actionName = $accessInfo['value']; $export = new Export; if(isset($export->case[$domainName])) { $programName = $export->case[$domainName]['program']; if(!empty($programName)) { if(file_exists(ROOT . '/exports/' . $programName . '/index.php')) { include_once(ROOT . '/exports/' . $programName . '/index.php'); $functionName = ''; if(empty($actionName)) { $functionName = $export->case[$domainName]['events']['default']; } else { $functionName = $export->case[$domainName]['events'][$actionName]; } if (function_exists($functionName)) { if (!isset($_COOKIE['export_visited'])) { if ($config->countRobotVisit == 'n' && Stats::isKnownBot($_SERVER["HTTP_USER_AGENT"])) { } else { Export::updateCount($domainName);
requireStrictRoute(); $response = array(); $response['error'] = 0; $response['message'] = ''; $name = $_POST['name']; $filter = isset($_POST['filter'])?$_POST['filter']:''; if(empty($name)) { $response['error'] = -1; $response['message'] = _t('잘못된 접근입니다.'); } else { if (!isAdmin()) { $response['error'] = 1; $response['message'] = _t('관리자만이 이 기능을 사용할 수 있습니다.'); } else { requireComponent('Bloglounge.Data.Category'); if(!Category::add($name, $filter)) { $response['error'] = 2; $response['message'] = _t('분류추가를 실패하였습니다.'); } else { $response['message'] = $name; } } } func::printRespond($response); ?>
function showEmoticons_getEmoticons($target) { global $blogURL, $pluginURL, $__HCEMO; requireModel('reader.common'); requireComponent('Textcube.Model.Paging'); requireComponent('Textcube.Function.misc'); require_once 'emoticons.inc.php'; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" rel="stylesheet" href="<?php echo $pluginURL; ?> /styles/default.css" /> </head> <script type="text/javascript"> //<![CDDA[ function insertHCEMO(_emoticons, _imagessrc){ var emoTag = '<img src="'+_imagessrc+'" border="0" alt="'+_emoticons+'" longdesc="[##_HCEMO_'+_emoticons+'_##]" />'; var isWYSIWYG = false; try{ if(parent.editor.editMode == 'WYSIWYG') isWYSIWYG = true; } catch(e){ } if(isWYSIWYG) { parent.editor.command('Raw', emoTag); }else{ parent.insertTag(parent.editor.textarea, emoTag); } } //]]> </script> <body style="margin:0;padding:0;border:none;background-color:#ffffff;"> <div id="emoticonsBody" style="height:200px;width:100%;overflow-x:hidden;overflow-y:auto;background-color:#fff;"> <?php $page = isset($_GET['page']) ? $_GET['page'] : 1; $items = isset($__HCEMO) ? count($__HCEMO) : 0; $listLength = 33; $paging = HCEMO_getFetchWithPaging($items, $page, $listLength, "{$blogURL}/plugin/getEmoticons"); $pagingTemplate = '[##_paging_rep_##]'; $pagingItemTemplate = '<a [##_paging_rep_link_##] class="num">[##_paging_rep_link_num_##]</a>'; if ($items > 0) { $counter['start'] = ($page - 1) * $listLength; $counter['end'] = $page * $listLength - 1; $counter['step'] = 0; foreach ($__HCEMO as $key => $images) { if ($counter['step'] >= $counter['start'] && $counter['step'] <= $counter['end']) { echo "<img class=\"emoticons\" src=\"{$pluginURL}/emoticons/{$images}\" border=\"0\" alt=\"{$key}\" onclick=\"insertHCEMO('{$key}','{$pluginURL}/emoticons/{$images}'); return false\" />"; } $counter['step']++; } } else { echo '<p style="margin-top:30px; text-align:center; font-size:9pt;">No emoticons installed.</p>'; } $prev_page = isset($paging['prev']) ? " href='?page={$paging['prev']}' " : ''; $next_page = isset($paging['next']) ? " href='?page={$paging['next']}' " : ''; $no_more_prev = isset($paging['prev']) ? '' : 'no-more-prev'; $no_more_next = isset($paging['next']) ? '' : 'no-more-next'; $target = '<div class="paging-list"><a ' . $prev_page . ' class="prev ' . $no_more_prev . '">prev </a>'; $target .= '<span class="numbox">' . str_repeat("\t", 12) . Paging::getPagingView($paging, $pagingTemplate, $pagingItemTemplate) . '</span>'; $target .= '<a ' . $next_page . ' class="next ' . $no_more_next . '"> next</a>'; $target .= '<div class="totalResults">'; $target .= 'Total ' . $items . ' icons.'; $target .= '</div></div>'; echo $target; ?> </div> </body> </html> <?php }
<?php $config = new Settings(); $skinConfig = new SkinSettings(); // 카운터는 하루에 한번만 if (!isset($_COOKIE['visited'])) { requireComponent('Bloglounge.Data.Stats'); Stats::visit($config->countRobotVisit); setcookie("visited", "bloglounge", time() + 86400, "/", ((substr(strtolower($_SERVER['HTTP_HOST']), 0, 4) == 'www.') ? substr($_SERVER['HTTP_HOST'], 3) : $_SERVER['HTTP_HOST'])); } $event->on('Meta.begin'); include_once(ROOT.'/lib/skin.begin.php'); ?>
{$database['prefix']}FeedItems, {$database['prefix']}Feeds, {$database['prefix']}Groups, {$database['prefix']}Medias, {$database['prefix']}ServiceSettings, {$database['prefix']}Sessions, {$database['prefix']}SessionsData, {$database['prefix']}SessionVisits, {$database['prefix']}Settings, {$database['prefix']}SkinSettings, {$database['prefix']}Plugins, {$database['prefix']}Users, {$database['prefix']}Tags, {$database['prefix']}TagRelations"); requireComponent('LZ.PHP.Functions'); if (is_dir(ROOT.'/cache')) func::rmpath(ROOT.'/cache'); if (file_exists(ROOT.'/config.php')) unlink(ROOT.'/config.php'); if (file_exists(ROOT.'/remove.lock')) unlink(ROOT.'/remove.lock'); break; case 'complete': $step_text = _t('설치') . ' - ' . _t('완료'); break; case 'upgrade': $step_text = _t('업그레이드') . ' - ' . _t('완료'); break; default:
function PN_Blog_Statistics_DataSet($DATA) { requireComponent('Textcube.Function.misc'); $cfg = misc::fetchConfigVal($DATA); return true; }
$response['rank'] = Boom::getRank($itemId); list($boomUp,$boomDown,$boomCount) = Boom::getBoomCount($itemId); $response['boom_up_count'] = $boomUp; $response['boom_down_count'] = $boomDown; $response['boom_count'] = $boomCount; } else { if (!Boom::down($_POST['itemId'])) { $response['error'] = 1; $response['message'] = _t('이미 반대한 글입니다.'); } else { // 자동숨기기, 삭제기능.. $response['message'] = 'isBoomedDown'; list($reactor, $limit) = Settings::gets('boomDownReactor,boomDownReactorLimit'); if ($reactor == 'delete') { requireComponent('Bloglounge.Data.FeedItems'); list($myBoomDown) = FeedItem::get($_POST['itemId'], 'boomDown'); if ($limit < $myBoomDown) { FeedItem::delete($_POST['itemId']); } } $response['rank'] = Boom::getRank($itemId); list($boomUp,$boomDown,$boomCount) = Boom::getBoomCount($itemId); $response['boom_up_count'] = $boomUp; $response['boom_down_count'] = $boomDown; $response['boom_count'] = $boomCount; } } break;
function getPlurkDataSet($data) { requireComponent('Textcube.Function.misc'); $cfg = misc::fetchConfigVal($data); if (!$cfg['plurknickname'] || empty($cfg['plurknickname']) || !$cfg['plurkpassword'] || empty($cfg['plurkpassword'])) { return "::Input error::\n\n Plurk's nickname and password must input certainly."; } return true; }
function DEFENSIO() { global $blogid, $pluginMenuURL, $pluginURL, $pluginSelfParam, $blog, $user, $blogURL, $defaultURL, $hostURL, $service, $skinSetting, $configVal; requireComponent('Textcube.Function.misc'); $comment_TYPE = !empty($_GET['t']) ? $_GET['t'] : ''; $page = !empty($_GET['page']) ? $_GET['page'] : 1; $perPage = getBlogSetting('rowsPerPage', 10); if ($comment_TYPE != "T") { $comment_TYPE = "C"; } $data = misc::fetchConfigVal($configVal); $blogHome = preg_replace("'^http://'", "", $hostURL); print '<div><h2 class="caption"><span class="main-text">Defensio Anti Spam Filter</span></h2></div>'; if (!isset($data['apikey']) || $data['apikey'] == '') { print <<<ENDL \t\t<div> \t\t\t<p><a href="http://www.defensio.com">Defensio</a>'s blog spam web service aggressively and intelligently prevents comment and trackback spam from hitting your blog. You should quickly notice a dramatic reduction in the amount of spam you have to worry about.</p><br /> \t\t\t<p>When the filter does rarely make a mistake (say, the odd spam message gets through or a rare good comment is marked as spam) we've made it a joy to sort through your comments and set things straight. Not only will the filter learn and improve over time, but it will do so in a personalized way!</p><br /> \t\t\t<p>In order to use our service, you will need a free Defensio API key. Get yours now at <a href="http://www.defensio.com/signup">Defensio.com</a>.</p> \t\t</div> ENDL; return; } print "<div>"; // TODO: Cache? // get stats $stats = defensio_get_stats(); if ($stats !== false) { $accuracy = number_format($stats['accuracy'] * 100, 2, '.', ''); $spam = $stats['spam']; $ham = $stats['ham']; $fn = $stats['false-negatives']; $fp = $stats['false-positives']; $apikey = $data['apikey']; print <<<ENDL \t\t<div class="defensio_stats" style="margin:10px;padding:5px;"> \t\t<div style="float:right;"><a href="http://defensio.com/manage/stats/{$apikey}">Detail Stats</a></div> \t\t<ul> \t\t\t<li><strong>Recent accuracy: {$accuracy}%</strong><hr></li> \t\t\t<li><strong>{$spam}</strong> spams, <strong>{$ham}</strong> legitimate comments</li> \t\t\t<li><strong>{$fn}</strong> false negatives (undetected spam)</li> \t\t\t<li><strong>{$fp}</strong> false positives (legitimate comments identified as spam)</li> \t\t</ul> \t\t</div> ENDL; } // get quarntines list list($comments, $paging) = defensio_get_data($comment_TYPE, $page, $perPage); include 'template/' . ($comment_TYPE == 'C' ? 'comment' : 'trackback') . '.php'; print "</div>"; }