array('string'),'REQUEST_URI'=>array('string'),'REDIRECT_URL'=>array('string','mandatory'=>false)); Validator::validateArray($_SERVER,$basicIV); include_once '../../config.php'; function nl2brWithHTML($str){ $str=str_replace('[CODE]','[CODE][HTML]',$str); $str=str_replace('[/CODE]','[/HTML][/CODE]',$str); $inHTML=false; $out=''; while(true){ if($inHTML){ $end=strpos($str,'[/HTML]'); if($end===false) break; else{ $out.=substr($str,0,$end); $str=substr($str,$end+7); $inHTML=false; } }else{ $offset=strpos($str,'[HTML]'); if($offset===false){ $out.=nl2br($str); break; }else{ $out.=nl2br(substr($str,0,$offset)); $str=substr($str,$offset+6); $inHTML=true; } } } return $out; } function fetchQueryColumn($query){ $column=array(); if($result=mysql_query($query)){ while($row=mysql_fetch_row($result)) array_push($column,$row[0]); mysql_free_result($result); } return $column; } function fetchQueryCell($query){ if($result=mysql_query($query)){ list($cell)=mysql_fetch_row($result); mysql_free_result($result); return $cell; } return ; } function doesExistTable($tablename){ $likeEscape=array('/_/','/%/'); $likeReplace=array('\\_','\\%'); $escapename=preg_replace($likeEscape,$likeReplace,$tablename); $result=mysql_query("SHOW TABLES LIKE '$escapename' "); if($result==false) return false; if(mysql_num_rows($result)>0) return true; return false; } function getWaterMarkPosition(){ $waterMarkPosition=getUserSetting("waterMarkPosition","left=10|bottom=10"); list($horizontalPos,$verticalPos)=explode("|",$waterMarkPosition); $horizontalPos=explode("=",$horizontalPos); $verticalPos=explode("=",$verticalPos); if($horizontalPos[0]=="left"){ if($horizontalPos[1]>0){ $horizontalValue=$horizontalPos[1]; }else{ $horizontalValue="left"; } }elseif($horizontalPos[0]=="center"){ $horizontalValue="center"; }elseif($horizontalPos[0]=="right"){ if($horizontalPos[1]>0){ $horizontalValue=$horizontalPos[1]-$horizontalPos[1]*2; }else{ $horizontalValue="right"; } } if($verticalPos[0]=="top"){ if($verticalPos[1]>0){ $verticalValue=$verticalPos[1]; }else{ $verticalValue="top"; } }elseif($verticalPos[0]=="middle"){ $verticalValue="middle"; }elseif($verticalPos[0]=="bottom"){ if($verticalPos[1]>0){ $verticalValue=$verticalPos[1]-$verticalPos[1]*2; }else{ $verticalValue="bottom"; } } return "$horizontalValue $verticalValue"; } function getWaterMarkGamma(){ return 100; } function getThumbnailPadding(){ $thumbnailPadding=getUserSetting("thumbnailPadding",false); if($thumbnailPadding==false){ return array("top"=>0,"right"=>0,"bottom"=>0,"left"=>0); }else{ $tempArray=explode("|",$thumbnailPadding); return array("top"=>intval($tempArray[0]),"right"=>intval($tempArray[1]),"bottom"=>intval($tempArray[2]),"left"=>intval($tempArray[3])); } } function getThumbnailPaddingColor(){ return getUserSetting("thumbnailPaddingColor","FFFFFF"); } mysql_connect($database['server'],$database['username'],$database['password']); mysql_select_db($database['database']); # MySQL 4.0->4.1 로 변경하면서 생긴 인코딩 문제 해결 # if(mysql_query('SET CHARACTER SET utf8')){ # $database['utf8']=true; # function mysql_lessen($str,$length=255,$tail='..'){ # return UTF8::lessen($str,$length,$tail); # } # }else{ # $database['utf8']=false; # function mysql_lessen($str,$length=255,$tail='..'){ # return UTF8::lessenAsByte($str,$length,$tail); # } # } @mysql_query('SET SESSION collation_connection = \'utf8_general_ci\''); if(function_exists('mysql_real_escape_string')&&(mysql_real_escape_string('ㅋ')=='ㅋ')){ function mysql_tt_escape_string($string,$link=null){ return is_null($link)?mysql_real_escape_string($string):mysql_real_escape_string($string,$link); } }else{ function mysql_tt_escape_string($string,$link=null){ return mysql_escape_string($string); } } function getOwner($name){ global $database; return fetchQueryCell("select owner from {$database['prefix']}BlogSettings where name = '$name'"); } function getOwnerBySecondaryDomain($domain){ global $database; return DBQuery::queryCell("SELECT owner FROM {$database['prefix']}BlogSettings WHERE secondaryDomain = '$domain' OR secondaryDomain = '".(substr($domain,0,4)=='www.'?substr($domain,4):'www.'.$domain)."'"); } function getBlogSetting($owner){ global $database; if($result=mysql_query("select * from {$database['prefix']}BlogSettings where owner = $owner")){ return mysql_fetch_array($result); } return false; } function getSkinSetting($owner){ global $database,$service; if($result=mysql_query("SELECT * FROM {$database['prefix']}SkinSettings WHERE owner = $owner")){ $retval=mysql_fetch_array($result); if($retval!=FALSE){ if(!Validator::directory($retval['skin'])&&($retval['skin']!="customize/$owner")){ $retval['skin']=$service['skin']; } return $retval; } } $retval=array('owner'=>$owner,'skin'=>$service['skin'],'entriesOnRecent'=>5,'commentsOnRecent'=>5,'commentsOnGuestbook'=>5,'tagsOnTagbox'=>30,'tagboxAlign'=>3,'trackbacksOnRecent'=>5,'expandComment'=>1,'expandTrackback'=>1,'recentNoticeLength'=>25,'recentEntryLength'=>30,'recentCommentLength'=>30,'recentTrackbackLength'=>30,'linkLength'=>30,'showListOnCategory'=>1,'showListOnArchive'=>1,'tree'=>'base','colorOnTree'=>'000000','bgColorOnTree'=>'','activeColorOnTree'=>'FFFFFF','activeBgColorOnTree'=>'00ADEF','labelLengthOnTree'=>27,'showValueOnTree'=>1); return $retval; } function getDefaultURL($uid){ global $database,$service; $blog=DBQuery::queryRow("SELECT name, secondaryDomain, defaultDomain FROM {$database['prefix']}BlogSettings WHERE owner = $uid"); switch($service['type']){ case 'domain': if($blog['defaultDomain']&&$blog['secondaryDomain']) return ('http://'.$blog['secondaryDomain'].(isset($service['port'])?':'.$service['port']:'').$service['path']); else return ('http://'.$blog['name'].'.'.$service['domain'].(isset($service['port'])?':'.$service['port']:'').$service['path']); case 'path': return ('http://'.$service['domain'].(isset($service['port'])?':'.$service['port']:'').$service['path'].'/'.$blog['name']); case 'single': default: return ('http://'.$service['domain'].(isset($service['port'])?':'.$service['port']:'').$service['path']); } } function getCurrentSetting($name){ global $database,$owner,$activePlugins; if(!in_array($name,$activePlugins)) return false; $name=mysql_tt_escape_string($name); $result=mysql_query("SELECT settings FROM {$database['prefix']}Plugins WHERE owner = $owner AND name = '$name'"); if(false===$result) return false; $out=mysql_fetch_array($result); return $out['settings']; } function treatPluginTable($plugin,$name,$fields,$keys,$version){ global $database; if(doesExistTable($database['prefix'].$name)){ $keyname='Database_'.$name; $value=$plugin; $query="SELECT value FROM {$database['prefix']}ServiceSettings WHERE name='{$keyname}'"; $result=DBQuery::queryCell($query); if(is_null($result)){ $keyname=mysql_tt_escape_string(mysql_lessen($keyname,32)); $value=mysql_tt_escape_string(mysql_lessen($plugin.'/'.$version,255)); DBQuery::execute("INSERT INTO {$database['prefix']}ServiceSettings SET name='$keyname', value ='$value'"); }else{ $keyname=mysql_tt_escape_string(mysql_lessen($keyname,32)); $value=mysql_tt_escape_string(mysql_lessen($plugin.'/'.$version,255)); $values=explode('/',$result,2); if(strcmp($plugin,$values[0])!=0){ return false; }elseif(strcmp($version,$values[1])!=0){ DBQuery::execute("UPDATE {$database['prefix']}ServiceSettings SET value ='$value' WHERE name='$keyname'"); $eventName='UpdateDB_'.$name; fireEvent($eventName,$values[1]); } } return true; }else{ $query="CREATE TABLE {$database['prefix']}{$name} (owner int(11) NOT NULL default '0',"; foreach($fields as $field){ $isNull=($field['isnull']==0)?' NOT NULL ':' NULL '; $defaultValue=is_null($field['default'])?'':" DEFAULT '".mysql_tt_escape_string($field['default'])."' "; $fieldLength=($field['length']>=0)?"(".$field['length'].")":''; $sentence=$field['name']." ".$field['attribute'].$fieldLength.$isNull.$defaultValue.","; $query.=$sentence; } array_unshift($keys,'owner'); $query.=" PRIMARY KEY (".implode(',',$keys).")"; $query.=") TYPE=MyISAM DEFAULT CHARSET=utf8"; if(DBQuery::execute($query)){ $keyname=mysql_tt_escape_string(mysql_lessen('Database_'.$name,32)); $value=mysql_tt_escape_string(mysql_lessen($plugin.'/'.$version,255)); DBQuery::execute("INSERT INTO {$database['prefix']}ServiceSettings SET name='$keyname', value ='$value'"); return true; }else return false; } return true; } function setServiceSetting($name,$value){ global $database; $name=mysql_tt_escape_string(mysql_lessen($name,32)); $value=mysql_tt_escape_string(mysql_lessen($value,255)); return DBQuery::execute("REPLACE INTO {$database['prefix']}ServiceSettings VALUES('$name', '$value')"); } function getUserSetting($name,$default=null){ global $database,$owner; $value=DBQuery::queryCell("SELECT value FROM {$database['prefix']}UserSettings WHERE user = $owner AND name = '".mysql_tt_escape_string($name)."'"); return ($value===null)?$default:$value; } function setUserSetting($name,$value){ global $database,$owner; $name=mysql_tt_escape_string($name); $value=mysql_tt_escape_string($value); return DBQuery::execute("REPLACE INTO {$database['prefix']}UserSettings VALUES($owner, '$name', '$value')"); } $url=isset($_SERVER['REDIRECT_URL'])?$_SERVER['REDIRECT_URL']:$_SERVER['SCRIPT_NAME']; $suri=array('url'=>$url,'value'=>''); $owner=null; $depth=substr_count($service['path'],'/'); if($depth>0){ if(ereg("^((/+[^/]+){{$depth}})(.*)$",$url,$matches)) $url=$matches[3]; else respondNotFoundPage(); } if($service['type']=='single'){ $owner=1; }else{ if($service['type']=='domain'){ if($_SERVER['HTTP_HOST']==$service['domain']){ $owner=1; }else{ $domain=explode('.',$_SERVER['HTTP_HOST'],2); if($domain[1]==$service['domain']){ $owner=getOwner($domain[0]); if($owner===null) $owner=getOwnerBySecondaryDomain($_SERVER['HTTP_HOST']); }else{ $owner=getOwnerBySecondaryDomain($_SERVER['HTTP_HOST']); } } }else{ if($url=='/'){ $owner=1; }elseif(ereg('^/+([^/]+)(.*)$',$url,$matches)){ $owner=getOwner($matches[1]); if($owner===null) $owner=1; $url=$matches[2]; }else{ respondNotFoundPage(); } } if($owner===null) respondNotFoundPage(); } $blog=getBlogSetting($owner); $skinSetting=getSkinSetting($owner); $depth=substr_count(ROOT,'/'); if($depth>0){ if(ereg("^((/+[^/]+){{$depth}})/*(.*)$",$url,$matches)){ $suri['directive']=$matches[1]; if($matches[3]!==false) $suri['value']=$matches[3]; }else respondNotFoundPage(); }else{ $suri['directive']='/'; $suri['value']=ltrim($url,'/'); } if(is_numeric($suri['value'])) $suri['id']=$suri['value']; $suri['page']=empty($_POST['page'])?(empty($_GET['page'])?true:$_GET['page']):$_POST['page']; if(!isset($serviceURL)) $serviceURL='http://'.$service['domain'].(isset($service['port'])?':'.$service['port']:'').$service['path']; switch($service['type']){ case 'domain': $pathURL=$service['path']; if($blog['defaultDomain']&&$blog['secondaryDomain']){ $defaultURL='http://'.$blog['secondaryDomain'].(isset($service['port'])?':'.$service['port']:'').$pathURL; if($_SERVER['HTTP_HOST']==$blog['secondaryDomain']) $baseURL=$service['path']; else $baseURL=$defaultURL; }else{ $defaultURL='http://'.$blog['name'].'.'.$service['domain'].(isset($service['port'])?':'.$service['port']:'').$pathURL; if($_SERVER['HTTP_HOST']==($blog['name'].'.'.$service['domain'])) $baseURL=$service['path']; else $baseURL=$defaultURL; } break; case 'path': $pathURL=$service['path'].'/'.$blog['name']; $defaultURL='http://'.$service['domain'].(isset($service['port'])?':'.$service['port']:'').$pathURL; if($_SERVER['HTTP_HOST']==$service['domain']) $baseURL=$service['path'].'/'.$blog['name']; else $baseURL=$defaultURL; break; case 'single': default: $pathURL=$service['path']; $defaultURL='http://'.$service['domain'].(isset($service['port'])?':'.$service['port']:'').$pathURL; if($_SERVER['HTTP_HOST']==$service['domain']) $baseURL=$service['path']; else $baseURL=$defaultURL; break; } $hostURL='http://'.$_SERVER['HTTP_HOST'].(isset($service['port'])?':'.$service['port']:''); $blogURL=$pathURL; $folderURL=rtrim($blogURL.$suri['directive'],'/'); unset($url,$domain); $adminSkinSetting=array(); $adminSkinSetting['skin']="/style/admin/".getUserSetting("adminSkin","default"); if(file_exists("../../skin/{$skinSetting['skin']}/wysiwyg.css")) $adminSkinSetting['editorTemplate']="/skin/{$skinSetting['skin']}/wysiwyg.css"; else $adminSkinSetting['editorTemplate']="/style/default-wysiwyg.css"; if(file_exists("../../attach/$owner/watermark.gif")){ $waterMarkPath="../../attach/$owner/watermark.gif"; }else{ $waterMarkPath=NULL; } $waterMarkArray=array(); $waterMarkArray['path']=$waterMarkPath; $waterMarkArray['position']=getWaterMarkPosition(); $waterMarkArray['gamma']=getWaterMarkGamma(); $paddingArray=array(); $padding=getThumbnailPadding(); $paddingArray['top']=$padding['top']; $paddingArray['right']=$padding['right']; $paddingArray['bottom']=$padding['bottom']; $paddingArray['left']=$padding['left']; $paddingArray['bgColor']=getThumbnailPaddingColor(); unset($padding); unset($waterMarkPath); if(!file_exists('../../config.php')){ header('Location: '.'../../setup.php'); exit; } function respondNotFoundPage(){ header('HTTP/1.1 404 Not Found'); header("Connection: close"); exit; } function getMicrotimeAsFloat(){ list($usec,$sec)=explode(" ",microtime()); return ($usec+$sec); } $sessionMicrotime=getMicrotimeAsFloat(); function openSession($savePath,$sessionName){ return true; } function closeSession(){ return true; } function readSession($id){ global $database,$service; if($result=sessionQuery("SELECT data FROM {$database['prefix']}Sessions WHERE id = '$id' AND address = '{$_SERVER['REMOTE_ADDR']}' AND updated >= (UNIX_TIMESTAMP() - {$service['timeout']})")){ if($session=mysql_fetch_array($result)) return $session['data']; } return ''; } function writeSession($id,$data){ global $database; global $sessionMicrotime; if(strlen($id)<32) return false; $userid=isset($_SESSION['userid'])?$_SESSION['userid']:'null'; $data=mysql_tt_escape_string($data); $server=mysql_tt_escape_string($_SERVER['HTTP_HOST']); $request=mysql_tt_escape_string($_SERVER['REQUEST_URI']); $referer=isset($_SERVER['HTTP_REFERER'])?mysql_tt_escape_string($_SERVER['HTTP_REFERER']):''; $timer=getMicrotimeAsFloat()-$sessionMicrotime; $result=mysql_query("UPDATE {$database['prefix']}Sessions SET userid = $userid, data = '$data', server = '$server', request = '$request', referer = '$referer', timer = $timer, updated = UNIX_TIMESTAMP() WHERE id = '$id' AND address = '{$_SERVER['REMOTE_ADDR']}'"); if($result&&(mysql_affected_rows()==1)) return true; return false; } function destroySession($id,$setCookie=false){ global $database; if(!isset($_SESSION['userid'])) return ; @mysql_query("DELETE FROM {$database['prefix']}Sessions WHERE id = '$id' AND address = '{$_SERVER['REMOTE_ADDR']}'"); gcSession(); } function gcSession($maxLifeTime=false){ global $database,$service; @mysql_query("DELETE FROM {$database['prefix']}Sessions WHERE updated < (UNIX_TIMESTAMP() - {$service['timeout']})"); $result=@sessionQuery("SELECT DISTINCT v.id, v.address FROM {$database['prefix']}SessionVisits v LEFT JOIN {$database['prefix']}Sessions s ON v.id = s.id AND v.address = s.address WHERE s.id IS NULL AND s.address IS NULL"); if($result){ $gc=array(); while($g=mysql_fetch_row($result)) array_push($gc,$g); foreach($gc as $g) @mysql_query("DELETE FROM {$database['prefix']}SessionVisits WHERE id = '{$g[0]}' AND address = '{$g[1]}'"); } return true; } function getAnonymousSession(){ global $database; $result=sessionQuery("SELECT id FROM {$database['prefix']}Sessions WHERE address = '{$_SERVER['REMOTE_ADDR']}' AND userid IS NULL AND preexistence IS NULL"); if($result&&(list($id)=mysql_fetch_array($result))) return $id; return false; } function newAnonymousSession(){ global $database; for($i=0;$i<100;$i++){ if(($id=getAnonymousSession())!==false) return $id; $id=dechex(rand(0x10000000,0x7FFFFFFF)).dechex(rand(0x10000000,0x7FFFFFFF)).dechex(rand(0x10000000,0x7FFFFFFF)).dechex(rand(0x10000000,0x7FFFFFFF)); mysql_query("INSERT INTO {$database['prefix']}Sessions(id, address, created, updated) VALUES('$id', '{$_SERVER['REMOTE_ADDR']}', UNIX_TIMESTAMP(), UNIX_TIMESTAMP())"); if(mysql_affected_rows()>0) return $id; } return false; } function setSessionAnonymous($currentId){ $id=getAnonymousSession(); if($id!==false){ if($id!=$currentId) session_id($id); return true; } $id=newAnonymousSession(); if($id!==false){ session_id($id); return true; } return false; } function isSessionAuthorized($id){ global $database; $result=mysql_query("select id from {$database['prefix']}Sessions where id = '$id' and address = '{$_SERVER['REMOTE_ADDR']}' and (userid is not null or preexistence is not null)"); if($result&&(mysql_num_rows($result)==1)) return true; return false; } function setSession(){ $id=empty($_COOKIE[session_name()])?'':$_COOKIE[session_name()]; if((strlen($id)<32)||!isSessionAuthorized($id)) setSessionAnonymous($id); } function sessionQuery($sql){ global $database,$sessionDBRepair; $result=mysql_query($sql); if($result===false){ if(!isset($sessionDBRepair)){ mysql_query("REPAIR TABLE {$database['prefix']}Sessions"); $result=mysql_query($sql); $sessionDBRepair=true; } } return $result; } session_name('TSSESSION'); setSession(); session_set_save_handler('openSession','closeSession','readSession','writeSession','destroySession','gcSession'); session_cache_expire(1); session_set_cookie_params(0,'/',$service['domain']); if(session_start()!==true){ header('HTTP/1.1 503 Service Unavailable'); } function doesHaveMembership(){ return empty($_SESSION['userid'])?false:true; } function getUserId(){ return empty($_SESSION['userid'])?false:$_SESSION['userid']; } if(doesHaveMembership()){ $user=array('id'=>getUserId()); $user['name']=DBQuery::queryCell("SELECT name FROM {$database['prefix']}Users WHERE userid = {$user['id']}"); $user['homepage']=getDefaultURL($user['id']); }else{ $user=null; } Timezone::set(isset($blog['timezone'])?$blog['timezone']:$service['timezone']); mysql_query('SET time_zone = \''.Timezone::getCanonical().'\''); Locale::setDirectory('../../language'); Locale::set(isset($blog['language'])?$blog['language']:$service['language']); if(!isset($blog['blogLanguage'])){ $blog['blogLanguage']=$service['language']; } if(is_file($__locale['directory'].'/'.$blog['blogLanguage'].".php")){ $__outText=getOutLanguage($__locale['directory'].'/'.$blog['blogLanguage'].".php"); } function getOutLanguage($languageFile){ include ($languageFile); return $__text; } function _text($t){ global $__outText; if(isset($__outText)&&isset($__outText[$t])){ return $__outText[$t]; }else{ return $t; } } $activePlugins=array(); $eventMappings=array(); $tagMappings=array(); $sidebarMappings=array(); $centerMappings=array(); $storageMappings=array(); $storageKeymappings=array(); $adminMenuMappings=array(); $adminHandlerMappings=array(); $configMappings=array(); $baseConfigPost=$service['path'].'/owner/setting/plugins/currentSetting'; $configPost=''; $configVal=''; $typeSchema=null; if(!empty($owner)){ $activePlugins=fetchQueryColumn("SELECT name FROM {$database['prefix']}Plugins WHERE owner = $owner"); $xmls=new XMLStruct(); foreach($activePlugins as $plugin){ $manifest=@file_get_contents("../../plugins/$plugin/index.xml"); if($manifest&&$xmls->open($manifest)){ $version=''; if($xmls->doesExist('/plugin/version')){ $version=$xmls->getValue('/plugin/version'); } if($xmls->doesExist('/plugin/storage')){ foreach($xmls->selectNodes('/plugin/storage/table') as $table){ $storageMappings=array(); $storageKeymappings=array(); if(empty($table['name'][0]['.value'])) continue; $tableName=htmlspecialchars($table['name'][0]['.value']); if(!empty($table['fields'][0]['field'])){ foreach($table['fields'][0]['field'] as $field){ if(!isset($field['name'])) continue; $fieldName=$field['name'][0]['.value']; if(!isset($field['attribute'])) continue; $fieldAttribute=$field['attribute'][0]['.value']; $fieldLength=isset($field['length'])?$field['length'][0]['.value']:-1; $fieldIsNull=isset($field['isnull'])?$field['isnull'][0]['.value']:1; $fieldDefault=isset($field['default'])?$field['default'][0]['.value']:null; array_push($storageMappings,array('name'=>$fieldName,'attribute'=>$fieldAttribute,'length'=>$fieldLength,'isnull'=>$fieldIsNull,'default'=>$fieldDefault)); } } if(!empty($table['key'][0]['.value'])){ foreach($table['key'] as $key){ array_push($storageKeymappings,$key['.value']); } } treatPluginTable($plugin,$tableName,$storageMappings,$storageKeymappings,$version); unset($tableName); unset($storageMappings); unset($storageKeymappings); } } if($xmls->doesExist('/plugin/binding/listener')){ foreach($xmls->selectNodes('/plugin/binding/listener') as $listener){ if(!empty($listener['.attributes']['event'])&&!empty($listener['.value'])){ if(!isset($eventMappings[$listener['.attributes']['event']])) $eventMappings[$listener['.attributes']['event']]=array(); array_push($eventMappings[$listener['.attributes']['event']],array('plugin'=>$plugin,'listener'=>$listener['.value'])); } } unset($listener); } if($xmls->doesExist('/plugin/binding/tag')){ foreach($xmls->selectNodes('/plugin/binding/tag') as $tag){ if(!empty($tag['.attributes']['name'])&&!empty($tag['.attributes']['handler'])){ if(!isset($tagMappings[$tag['.attributes']['name']])) $tagMappings[$tag['.attributes']['name']]=array(); array_push($tagMappings[$tag['.attributes']['name']],array('plugin'=>$plugin,'handler'=>$tag['.attributes']['handler'])); } } unset($tag); } if($xmls->doesExist('/plugin/binding/center')){ $title=htmlspecialchars($xmls->getValue('/plugin/title[lang()]')); foreach($xmls->selectNodes('/plugin/binding/center') as $center){ if(!empty($center['.attributes']['handler'])){ array_push($centerMappings,array('plugin'=>$plugin,'handler'=>$center['.attributes']['handler'],'title'=>$title)); } } unset($title); unset($center); } if($xmls->doesExist('/plugin/binding/sidebar')){ $title=htmlspecialchars($xmls->getValue('/plugin/title[lang()]')); foreach($xmls->selectNodes('/plugin/binding/sidebar') as $sidebar){ if(!empty($sidebar['.attributes']['handler'])){ $parameters=array(); if(isset($sidebar['params'])&&isset($sidebar['params'][0])&&isset($sidebar['params'][0]['param'])){ foreach($sidebar['params'][0]['param'] as $param){ $parameter=array('name'=>$param['name'][0]['.value'],'type'=>$param['type'][0]['.value'],'title'=>XMLStruct::getValueByLocale($param['title'])); array_push($parameters,$parameter); } } array_push($sidebarMappings,array('plugin'=>$plugin,'title'=>$sidebar['.attributes']['title'],'display'=>$title,'handler'=>$sidebar['.attributes']['handler'],'parameters'=>$parameters)); } } unset($sidebar); } if($xmls->doesExist('/plugin/binding/config')){ $config=$xmls->selectNode('/plugin/binding/config'); if(!empty($config['.attributes']['dataValHandler'])) $configMappings[$plugin]=array('config'=>'ok','dataValHandler'=>$config['.attributes']['dataValHandler']); else $configMappings[$plugin]=array('config'=>'ok'); } if($xmls->doesExist('/plugin/binding/adminMenu')){ $title=htmlspecialchars($xmls->getValue('/plugin/title[lang()]')); if($xmls->doesExist('/plugin/binding/adminMenu/viewMethods')){ foreach($xmls->selectNodes('/plugin/binding/adminMenu/viewMethods/method') as $adminViewMenu){ $menutitle=htmlspecialchars(XMLStruct::getValueByLocale($adminViewMenu['title'])); if(empty($menutitle)) continue; $menuposition=empty($adminViewMenu['position'][0]['.value'])?'menu-plugin':$adminViewMenu['position'][0]['.value']; $menuhelpurl=empty($adminViewMenu['helpurl'][0]['.value'])?'':$adminViewMenu['helpurl'][0]['.value']; if(!isset($adminViewMenu['handler'][0]['.value'])) continue; $viewhandler=htmlspecialchars($adminViewMenu['handler'][0]['.value']); if(empty($viewhandler)) continue; $params=array(); if(isset($adminViewMenu['params'][0]['param'])){ foreach($adminViewMenu['params'][0]['param'] as $methodParam){ if(!isset($methodParam['name'][0]['.value'])||!isset($methodParam['type'][0]['.value'])) continue; array_push($params,array('name'=>$methodParam['name'][0]['.value'],'type'=>$methodParam['type'][0]['.value'],'mandatory'=>@$methodParam['mandatory'][0]['.value'],'default'=>@$methodParam['default'][0]['.value'])); } } $adminMenuMappings[$plugin.'/'.$viewhandler]=array('plugin'=>$plugin,'title'=>$menutitle,'position'=>$menuposition,'handler'=>$viewhandler,'params'=>$params,'helpurl'=>$menuhelpurl); } } unset($menutitle); unset($viewhandler); unset($adminViewMenu); unset($params); if($xmls->doesExist('/plugin/binding/adminMenu/methods')){ foreach($xmls->selectNodes('/plugin/binding/adminMenu/methods/method') as $adminMethods){ $method=array(); $method['plugin']=$plugin; if(!isset($adminMethods['handler'][0]['.value'])) continue; $method['handler']=$adminMethods['handler'][0]['.value']; $method['params']=array(); if(isset($adminMethods['params'][0]['param'])){ foreach($adminMethods['params'][0]['param'] as $methodParam){ if(!isset($methodParam['name'][0]['.value'])||!isset($methodParam['type'][0]['.value'])) continue; array_push($method['params'],array('name'=>$methodParam['name'][0]['.value'],'type'=>$methodParam['type'][0]['.value'],'mandatory'=>@$methodParam['mandatory'][0]['.value'],'default'=>@$methodParam['default'][0]['.value'])); } } $adminHandlerMappings[$plugin.'/'.$method['handler']]=$method; } } unset($method); unset($methodParam); unset($adminMethods); } }else{ $plugin=mysql_tt_escape_string($plugin); mysql_query("DELETE FROM {$database['prefix']}Plugins WHERE owner = $owner AND name = '$plugin'"); } } unset($xmls); unset($plugin); } function fireEvent($event,$target=null,$mother=null,$condition=true){ global $service,$eventMappings,$pluginURL,$pluginPath,$configMappings,$configVal; if(!$condition) return $target; if(!isset($eventMappings[$event])) return $target; foreach($eventMappings[$event] as $mapping){ include_once ("../../plugins/{$mapping['plugin']}/index.php"); if(function_exists($mapping['listener'])){ if(!empty($configMappings[$mapping['plugin']]['config'])) $configVal=getCurrentSetting($mapping['plugin']); else $configVal=null; $pluginURL="{$service['path']}/plugins/{$mapping['plugin']}"; $pluginPath="../../plugins/{$mapping['plugin']}"; $target=call_user_func($mapping['listener'],$target,$mother); } } return $target; } header('Content-Type: text/html; charset=utf-8'); function reloadSkin($owner){ global $database,$service; $skinSetting=getSkinSetting($owner); $skinName=$skinSetting['skin']; if(file_exists("../../skin/$skinName/index.xml")){ $xml=file_get_contents("../../skin/$skinName/index.xml"); $xmls=new XMLStruct(); if(!$xmls->open($xml,$service['encoding'])) return ; $value=$xmls->getValue('/skin/default/commentMessage/none'); if(is_null($value)) setUserSetting('noneCommentMessage',NULL); else setUserSetting('noneCommentMessage',$value); $value=$xmls->getValue('/skin/default/commentMessage/single'); if(is_null($value)) setUserSetting('singleCommentMessage',NULL); else setUserSetting('singleCommentMessage',$value); $value=$xmls->getValue('/skin/default/trackbackMessage/none'); if(is_null($value)) setUserSetting('noneTrackbackMessage',NULL); else setUserSetting('noneTrackbackMessage',$value); $value=$xmls->getValue('/skin/default/trackbackMessage/single'); if(is_null($value)) setUserSetting('singleTrackbackMessage',NULL); else setUserSetting('singleTrackbackMessage',$value); } } if(!file_exists('../../cache/CHECKUP')||(file_get_contents('../../cache/CHECKUP')!=TATTERTOOLS_VERSION)){ if($fp=fopen('../../cache/CHECKUP','w')){ fwrite($fp,TATTERTOOLS_VERSION); fclose($fp); @chmod('../../cache/CHECKUP',0666); } }?> <?php echo _text('태터툴즈를 점검합니다.');?>

Download Mp3/Mp3 MusicTop Chartsdownload R.E.M. music lyricdownload Leona Lewis music lyricdownload Portishead music lyricdownload Iron Maiden music lyricdownload Led Zeppelin music lyricdownload Beth Rowley music lyricdownload Mariah Carey music lyricdownload Bruce Springsteen music lyricdownload AC/DC music lyricdownload Linkin Park music lyricdownload OneRepublic music lyricdownload Bob Dylan music lyricdownload Metallica music lyricdownload The Who music lyricdownload Rihanna music lyricdownload Al Green music lyricdownload The Kooks music lyricdownload U2 music lyricdownload David Bowie music lyricdownload Prince music lyricdownload Alanis Morissette music lyricdownload Putumayo music lyricdownload Elvis Presley music lyricdownload Willie Nelson music lyricdownload Jon Bon Jovi music lyricunited methodist counseling ohio united methodist counseling ohio part non nude young bbs non nude young bbs station tony kiss podcast tony kiss podcast direct homemade facial using eggwhite homemade facial using eggwhite land ayaka yukihiro hentai ayaka yukihiro hentai brother cook and love shoes cook and love shoes wood mature grannies amateur mature grannies amateur range reflective encoder strip reflective encoder strip your brigite nude brigite nude size sougia nude beach sougia nude beach quotient nude sexy little nude sexy little so sunny rodriguez nude sunny rodriguez nude kill torn between two loves torn between two loves wood mistress pregnant mistress pregnant power tie nylon favor bags tie nylon favor bags dress huge erect cocks teen huge erect cocks teen born naked hairy old ladies naked hairy old ladies possible john barter beaver john barter beaver track big booty grinding big booty grinding king monica lopez hardcore monica lopez hardcore experiment dick in blonde ass dick in blonde ass if sex and maria sex and maria music dick butkus steroid organization dick butkus steroid organization atom milf solo milf solo leg pretend porn pretend porn feed amber masturbates white stockings amber masturbates white stockings example niece strip niece strip got independent escort yorkshire independent escort yorkshire trip hot bitch free slut hot bitch free slut eight love hurts the song love hurts the song continue lactation bdsm lactation bdsm had lesbian pussy eating video lesbian pussy eating video table romance meeting friends ex romance meeting friends ex require secret amateur flix clips secret amateur flix clips drive milf emporium milf emporium shell homeade porn films homeade porn films let teen kelly video shower teen kelly video shower kind south park porn south park porn hunt black gay mania black gay mania town sash weather strip sash weather strip right doujinshi hentai manga doujinshi hentai manga doctor little red riding cock little red riding cock observe lennox sucks lennox sucks card public nudity cheap public nudity cheap street local moms to fuck local moms to fuck nation perros penetrando gays perros penetrando gays discuss lumps in your breast lumps in your breast wear gay sex slideshows gay sex slideshows natural vintage nude tgp vintage nude tgp end getting bitched getting bitched million gay firecrotch gay firecrotch first ballad of ben gay ballad of ben gay in hot nude couples hot nude couples during teen girls diet pills teen girls diet pills pose gay cum vids gay cum vids seat hammer smash dick hammer smash dick chord ab swing hunter tylo ab swing hunter tylo leave tied up pantyhose tied up pantyhose study nudist teens exploited nudist teens exploited fill abbra escort abbra escort sound hardcore voyeur hardcore voyeur follow mentor breast implants mentor breast implants machine all black pussy all black pussy chord indiana kentucky escorts indiana kentucky escorts stone cameltoe pants cameltoe pants piece non nude erotic model non nude erotic model up old granpa sex movies old granpa sex movies brown bikinis big boobs bikinis big boobs drink huge black cock dvd huge black cock dvd want bathroom signals for sex bathroom signals for sex wide artist fergie sex tapes artist fergie sex tapes coast lanolin breast cream lanolin breast cream middle red head vaginas pictures red head vaginas pictures city black teen amateurs black teen amateurs master laika sex star laika sex star past old gay porn thumbnails old gay porn thumbnails game cumonboys tgp cumonboys tgp power indian sex mpgs indian sex mpgs finish spanked cuties spanked cuties root marriage relationship marriage relationship continent non nude teenagers non nude teenagers wife simpson chubby 1 simpson chubby 1 good nude social group queensland nude social group queensland cow amateur party stories amateur party stories write porn star orgasms porn star orgasms exercise hiv and transexuals hiv and transexuals stick teen masters bowling teen masters bowling put hentai mothers hentai mothers said booty toning exercises booty toning exercises warm summer camp erotic summer camp erotic single transexual jamie carr transexual jamie carr nine 420 sex 420 sex farm anri suzuki nude anri suzuki nude push lesbian myspace tools lesbian myspace tools long nude beaches st barts nude beaches st barts element rachel aldana pinup glam rachel aldana pinup glam foot java swing oo client java swing oo client moment bio tall transsexual bio tall transsexual oil betty spark nude photos betty spark nude photos valley erotic female diaper stories erotic female diaper stories coast open air pleasures gallery open air pleasures gallery came bacteria infection in vagina bacteria infection in vagina produce nasty xxx rated nasty xxx rated person upskirts sex vids upskirts sex vids least littel nude girl littel nude girl duck 3gp japanese sex 3gp japanese sex past hard inverted nipple hard inverted nipple who beach bunny love jones beach bunny love jones baby colledge naked girls colledge naked girls sand huge pulsing cock huge pulsing cock sand screech sex scandal screech sex scandal steam erotic audio free stories erotic audio free stories engine raven riley upskirts raven riley upskirts object bigges dick in porn bigges dick in porn north hummer deisel mpg hummer deisel mpg day bravo nude bravo nude little mom porn website mom porn website phrase beauty supplier beauty supplier read nigga lips sucking dick nigga lips sucking dick phrase hollyoaks girls naked hollyoaks girls naked thank runescape tits runescape tits war story pissing fairy story pissing fairy opposite forbidden teen porn forbidden teen porn hill nude petite female nude petite female chance abuse whore face getto abuse whore face getto equate couples kissing on youtube couples kissing on youtube electric blonde sucks shemale cock blonde sucks shemale cock language busty shion busty shion decide lovely perfume lovely perfume sit 3d anime transvestite 3d anime transvestite grand black lambskin swing coat black lambskin swing coat and buying pussy buying pussy wait idian xxx idian xxx stood chick hicks chick hicks rain kamasutra sex demo kamasutra sex demo far gianna anal gianna anal lie kirk franklin porn addiction kirk franklin porn addiction ocean bi sex acts bi sex acts children mpg ogg digital jukebox mpg ogg digital jukebox complete thong free pics thong free pics engine gay free videos sex gay free videos sex spend big booty scarlet big booty scarlet square porn video stream porn video stream heavy christie escort nottingham christie escort nottingham party bbw matre bbw matre value eagle nest with chicks eagle nest with chicks provide mare vagina closed mare vagina closed thick temptations of masturbation temptations of masturbation shape aunt jenny s nude site aunt jenny s nude site big extra busty and buxom extra busty and buxom song extreme anal bondage extreme anal bondage before lesbian saphos lesbian saphos difficult aunt julia spreads pussy aunt julia spreads pussy invent dailey nude thumbnails dailey nude thumbnails planet dakota fanning nude dakota fanning nude distant elle edinburg escort elle edinburg escort huge sex in co ed bathrooms sex in co ed bathrooms metal kiss i blackjack strategy kiss i blackjack strategy dad big cocks and pussy big cocks and pussy ask germany gay male escort germany gay male escort provide nude boby builders nude boby builders consider anette dawn anal pix anette dawn anal pix length nude magician free nude magician free stand pornstar star f knight pornstar star f knight lead clothed sex movies free clothed sex movies free sight secret sorority sex vids clips secret sorority sex vids clips segment tatoo girls piecing tgp tatoo girls piecing tgp describe carol gracias topless carol gracias topless map female ejaculation men s opinions female ejaculation men s opinions chick mia tan milf mia tan milf mountain nude women in groups nude women in groups smell hentia vid hentia vid I telia tequlia porn telia tequlia porn syllable sluts gang bang sluts gang bang serve carrie preston nude carrie preston nude buy maria conchita alonso breasts maria conchita alonso breasts during huge showing boobs huge showing boobs star teens first fuck teens first fuck part gigi edgley sex gigi edgley sex pretty celebretes naked celebretes naked milk teen pact indiana teen pact indiana seem hermaphrodites movie hermaphrodites movie such nude female contortionist photo nude female contortionist photo sing x rated sex women x rated sex women group amateur couples video amateur couples video gold gay lumberjack gay lumberjack by erotic teen beach stories erotic teen beach stories print hydrochlorothiazide sex hydrochlorothiazide sex control topless jenifer lopez topless jenifer lopez meat flat head sex bolt flat head sex bolt him usf education counseling certification usf education counseling certification saw rusisan chicks rusisan chicks consonant mature amateur suck video mature amateur suck video place zach and ashley kiss zach and ashley kiss scale nude dudes solo nude dudes solo feed nude dyan canon nude dyan canon winter lesbian x rated movies lesbian x rated movies wave asian fucks sleeping asian fucks sleeping mind porn clips chinese girls porn clips chinese girls speed breast cancer cane breast cancer cane nothing foreign affairs escorts foreign affairs escorts pretty sex positions free vidio sex positions free vidio certain talk to singles onlinenow talk to singles onlinenow loud cute girl orgasm cute girl orgasm same sarah roemer riding cock sarah roemer riding cock climb andy adler redheads andy adler redheads head vagina cutting free gallerys vagina cutting free gallerys power kelowna sex tracker kelowna sex tracker pass couples sex sanata maria couples sex sanata maria also bizarre may holidays bizarre may holidays direct femdom women castrating men femdom women castrating men to nudity in bigfoot movies nudity in bigfoot movies rope tina hobley tits tina hobley tits particular this drunk chick this drunk chick room old spunkers picture galleries old spunkers picture galleries color hughie lewis cock showing hughie lewis cock showing party virgin superstore vancouver virgin superstore vancouver position girls peeing pants videos girls peeing pants videos but porn star ezkimo porn star ezkimo though female voyeur female voyeur soldier njoy sex toys njoy sex toys art garage sex garage sex such teen bbs models teen bbs models steel amateur shemale movie amateur shemale movie gas movies about interracial couples movies about interracial couples five laser breast enlargement laser breast enlargement particular mexican chicken breast recipes mexican chicken breast recipes roll bible teen sexuality ethic bible teen sexuality ethic region uk big boobs uk big boobs make lace top pantyhose lace top pantyhose exercise nude girls pussies nude girls pussies product horny pussy fuckers horny pussy fuckers dream imageevent porn photos imageevent porn photos vowel big natural breasts vedio big natural breasts vedio very killeen tx escort services killeen tx escort services laugh breast hook breast hook straight ebony praise singers lyrics ebony praise singers lyrics winter xxx abbey xxx abbey written 32dd fucked 32dd fucked slip sex polish poepole sex polish poepole big teen spirit deodorant teen spirit deodorant sent teen tots teen tots sent carpachio slut carpachio slut eight birthcontrol strips birthcontrol strips post vintage gey sex video vintage gey sex video record female demon fucked female demon fucked duck drink piss teen drink piss teen differ petite girl huge dick petite girl huge dick born sex shows tweed heads sex shows tweed heads also porn erica campbell porn erica campbell tell angelina jolie banderas sex angelina jolie banderas sex describe kernenergie porn star kernenergie porn star dictionary bethany big tits bethany big tits meet skirt femdom skirt femdom person big phat latina booty big phat latina booty foot nude house dining nude house dining minute v is for vagina v is for vagina equal nude models online nude models online group teen blowjobs and handjobs teen blowjobs and handjobs shoulder teens as fuck toys teens as fuck toys rise knowing when she orgasms knowing when she orgasms block chix with dix porn chix with dix porn gentle monaco webcam monaco webcam went slop on my knob slop on my knob grow archer spanking tucker fanfic archer spanking tucker fanfic thin teen boy masturbation teen boy masturbation mile atlanta supermodel escorts atlanta supermodel escorts land racheal rey nude racheal rey nude equate aisian women porn aisian women porn river gay pornstar filmography site gay pornstar filmography site south aatcc impact penetration tester aatcc impact penetration tester black wears life underwear wears life underwear hair mature trees australia mature trees australia tree nude orlando nude orlando we sex offenders in sarasota sex offenders in sarasota there milf fisting milf fisting occur pink pussy women spread pink pussy women spread begin erin summers passion phones erin summers passion phones may transexual dating long island transexual dating long island color nipple brochette nipple brochette sense porn star silena silver porn star silena silver study ebony aurora ebony aurora strong bodystocking fetish bodystocking fetish apple learn how to fuck learn how to fuck warm apology poems for lesbians apology poems for lesbians neighbor jack the ripper dysfunction jack the ripper dysfunction listen sex pistols tickets sex pistols tickets pattern zetta betta jones naked zetta betta jones naked find pregnant anal sex movie pregnant anal sex movie always blowjob movie trailer blowjob movie trailer line wow breasts finalists wow breasts finalists stand ara celi nude ara celi nude low giant horse cocks giant horse cocks name beauty girl wrestling beauty girl wrestling about brazilian slut animal brazilian slut animal iron illinois law counseling notes illinois law counseling notes happy all nude vegas shows all nude vegas shows start dick ahlberg kron dick ahlberg kron long sex and tne city sex and tne city ear naughty sex school stories naughty sex school stories ago nude celebrities paris hilton nude celebrities paris hilton mass definition of illegal porn definition of illegal porn safe busty ohura busty ohura area michael brandan gay movies michael brandan gay movies sleep harassment revenge harassment revenge sand naked dinner valencia naked dinner valencia tall dogging vidios dogging vidios pull outrageous nasty bad outrageous nasty bad nature pornstar mirella pornstar mirella pound gay lesbian inuit gay lesbian inuit soldier gay handjob mpg gay handjob mpg born roses and love roses and love east teen vandalism teen vandalism down lesbos 101 lesbos 101 kept twink young videos twink young videos short what is a jerk what is a jerk eight teenah nude teenah nude bad turkey breast receipes turkey breast receipes represent star trek sucks star trek sucks stood pikemen jesse hentai pikemen jesse hentai dad ciel hentai ciel hentai past pregnancy with condom use pregnancy with condom use complete edit nude photos osx edit nude photos osx list topless sun bathing topless sun bathing count muscletech hydroxycut hardcore review muscletech hydroxycut hardcore review single dating black lady dating black lady contain asian teen iso torrent asian teen iso torrent any erotic audio files erotic audio files cloud electro erotic prostrate stimulation electro erotic prostrate stimulation forward sailing nude belline 2 sailing nude belline 2 center hetero blowjob gallery hetero blowjob gallery stick mature masturbation huge tits mature masturbation huge tits picture national teen connection national teen connection center cytherea squirting porn cytherea squirting porn famous sexual spanking free videos sexual spanking free videos block liquidation sex toys liquidation sex toys tool php dating scripts php dating scripts white gilligan island naked gilligan island naked broad asian porn thumbs asian porn thumbs wife hot tara phone sex hot tara phone sex six jewish girls xxx porn jewish girls xxx porn end nude redhead lap dance nude redhead lap dance huge bizarre photos of acciden bizarre photos of acciden try teddys with love harts teddys with love harts kept soccer mom sex story soccer mom sex story wide sculpture of nudes sculpture of nudes an naughty pamela anderson naughty pamela anderson skill big boobs sex free big boobs sex free also chubby gagging chubby gagging sure interracial group sex interracial group sex fact bondage bdsm sex bondage bdsm sex die switch whipping switch whipping proper mobile al sex escort mobile al sex escort hit squirting lesbian squirting lesbian practice sailor chibi moon hentai sailor chibi moon hentai fell nude girls on webcams nude girls on webcams hear watch women get fucked watch women get fucked order teen roid abuse teen roid abuse insect juicy cunt close up juicy cunt close up smile white girl gangbang white girl gangbang bottom trust relationship lie trust relationship lie north lovely labia lovely labia edge is viewing porn illegal is viewing porn illegal shape busty fox busty fox continent hellfire gay hellfire gay bat lets fuck bitch lets fuck bitch meant tiny model teens tiny model teens crop big babe porn big babe porn warm cocktail time hentai cocktail time hentai out xxx naghty brides xxx naghty brides force love and sex quote love and sex quote any horney mom in action horney mom in action consonant secret amateur porn secret amateur porn flow orgasm for women ebook orgasm for women ebook hold nude traffic reporters nude traffic reporters shoulder charlotte amalie virgin is charlotte amalie virgin is single mage 29 twink gear mage 29 twink gear body brittany s topless pool romp brittany s topless pool romp letter flat nylon rope flat nylon rope sister asian sex wsites asian sex wsites fire nick vanessa nude pics nick vanessa nude pics industry xxx video parent directory xxx video parent directory company girls sexually torture sluts girls sexually torture sluts hot snowflake love poems snowflake love poems speak naughty doctor fetish naughty doctor fetish plane lee s boobies lee s boobies sure michelle katz nude michelle katz nude chord sex padme anakin sex padme anakin catch xxx doctor stories xxx doctor stories experiment horny milf women horny milf women girl buddhism love relationships buddhism love relationships hurry video domestic spanking video domestic spanking full legally blonde 2 monologues legally blonde 2 monologues separate wrestling girls sex wrestling girls sex produce jasmines webcams jasmines webcams represent sex studentenwohnheim sex studentenwohnheim son mature dvd movies mature dvd movies desert stella dauphine coed stella dauphine coed hard animal striped hoody animal striped hoody planet teens cleaning their room teens cleaning their room black ohio malel gay ohio malel gay catch michell tatoo porn michell tatoo porn machine forest nudes forest nudes time animated sex hentai free animated sex hentai free supply kirsten s room hardcore kirsten s room hardcore children blk cock pics blk cock pics these black beauty heuchera black beauty heuchera score external male condom external male condom enemy down sydrom sex down sydrom sex do teens as fuck toys teens as fuck toys have with big boobs with big boobs wall mature exhibitionists mature exhibitionists snow long distance relationship icon long distance relationship icon else heartbreak kid nude scenes heartbreak kid nude scenes evening teen bbs fourm teen bbs fourm any ray toro love story