// index ===========================================================================
<?php
if(!$menu) $menu='sitemap_1';
include $_SERVER[DOCUMENT_ROOT].'/html/sitemap_header.php3';
if(is_file($_SERVER[DOCUMENT_ROOT]."/title/${menu}.gif")) echo "<img src='/title/${menu}.gif'><br><br>";
if(is_file("./data/sitemap.php"))
{
include "./data/sitemap.php";
}
else
{
ob_start();
include "./sitemap.php";
$result = ob_get_contents();
$fp = fopen("./data/sitemap.php", w);
fwrite($fp, $result);
fclose($fp);
}
include $_SERVER[DOCUMENT_ROOT].'/html/default_footer.php3';
?>
// sitemap =========================================================================
<?php
require "../include/linksData.php";
function siteMap( $sPageName )
{
global $arrSubMenu,$sTblHeight,$sTblOutPadding,$sTblOverPadding;
$sExt = 'gif';
echo "<table cellspacing='0' cellpadding='0' border='0'>";
if(is_file($_SERVER[DOCUMENT_ROOT]."/subimg/${sPageName}_top.gif"))
{
echo "
<tr>
<td><img src='/subimg/${sPageName}_top.gif' border='0' onFocus='this.blur()' /></td>
</tr>";
}
echo "
<style type='text/css'>
.${sPageName}_d { height:$sTblHeight;padding:0 0 0 $sTblOutPadding;background-image:url('/subimg/leftmenu_bg_${sPageName}.gif');cursor:hand; }
.${sPageName}_o { height:$sTblHeight;color:$arrData[MouseOverColor]; padding:0 0 0 $sTblOverPadding;background-image:url('/subimg/leftmenu_obg_${sPageName}.gif');cursor:hand; }
.${sPageName}_o a:link {color:$arrData[MouseOverColor]; text-decoration:none; }
.${sPageName}_o a:visited {color:$arrData[MouseOverColor]; text-decoration:none; }
</style>";
$i=1;
foreach( $arrSubMenu[$sPageName] as $index => $value )
{
if($index != 'MouseOverColor')
{
$aSize = @getimagesize($_SERVER[DOCUMENT_ROOT]."/subimg/{$sPageName}{$i}.$sExt");
echo "
<tr>
<td><a href='$index' class='rollover' onFocus='this.blur()' $aSize[3]><img src='/subimg/{$sPageName}{$i}.$sExt' border='0' alt='$value' /><img src='/subimg/{$sPageName}{$i}_over.$sExt' border='0' alt='$value' class='over' $aSize[3] /></a></td>
</tr>";
++$i;
}
}
echo "
</table>";
}
?>
<table cellspacing='0' cellpadding='0' border='0' width='95%' align='center'><tr>
<?php
$i=1;
foreach($arrSubMenu as $index => $value)
{
echo "<td valign='top'>";
siteMap($index);
echo "</td>";
if(!$i%=3)
echo "</tr><tr><td colspan='3' height='20'></td></tr><tr><td colspan='3' height='1' bgcolor='#ececec'></td></tr><tr><td colspan='3' height='20'></td></tr><tr>";
++$i;
}
?>
</tr></table><br>
<?php
if(!$menu) $menu='sitemap_1';
include $_SERVER[DOCUMENT_ROOT].'/html/sitemap_header.php3';
if(is_file($_SERVER[DOCUMENT_ROOT]."/title/${menu}.gif")) echo "<img src='/title/${menu}.gif'><br><br>";
if(is_file("./data/sitemap.php"))
{
include "./data/sitemap.php";
}
else
{
ob_start();
include "./sitemap.php";
$result = ob_get_contents();
$fp = fopen("./data/sitemap.php", w);
fwrite($fp, $result);
fclose($fp);
}
include $_SERVER[DOCUMENT_ROOT].'/html/default_footer.php3';
?>
// sitemap =========================================================================
<?php
require "../include/linksData.php";
function siteMap( $sPageName )
{
global $arrSubMenu,$sTblHeight,$sTblOutPadding,$sTblOverPadding;
$sExt = 'gif';
echo "<table cellspacing='0' cellpadding='0' border='0'>";
if(is_file($_SERVER[DOCUMENT_ROOT]."/subimg/${sPageName}_top.gif"))
{
echo "
<tr>
<td><img src='/subimg/${sPageName}_top.gif' border='0' onFocus='this.blur()' /></td>
</tr>";
}
echo "
<style type='text/css'>
.${sPageName}_d { height:$sTblHeight;padding:0 0 0 $sTblOutPadding;background-image:url('/subimg/leftmenu_bg_${sPageName}.gif');cursor:hand; }
.${sPageName}_o { height:$sTblHeight;color:$arrData[MouseOverColor]; padding:0 0 0 $sTblOverPadding;background-image:url('/subimg/leftmenu_obg_${sPageName}.gif');cursor:hand; }
.${sPageName}_o a:link {color:$arrData[MouseOverColor]; text-decoration:none; }
.${sPageName}_o a:visited {color:$arrData[MouseOverColor]; text-decoration:none; }
</style>";
$i=1;
foreach( $arrSubMenu[$sPageName] as $index => $value )
{
if($index != 'MouseOverColor')
{
$aSize = @getimagesize($_SERVER[DOCUMENT_ROOT]."/subimg/{$sPageName}{$i}.$sExt");
echo "
<tr>
<td><a href='$index' class='rollover' onFocus='this.blur()' $aSize[3]><img src='/subimg/{$sPageName}{$i}.$sExt' border='0' alt='$value' /><img src='/subimg/{$sPageName}{$i}_over.$sExt' border='0' alt='$value' class='over' $aSize[3] /></a></td>
</tr>";
++$i;
}
}
echo "
</table>";
}
?>
<table cellspacing='0' cellpadding='0' border='0' width='95%' align='center'><tr>
<?php
$i=1;
foreach($arrSubMenu as $index => $value)
{
echo "<td valign='top'>";
siteMap($index);
echo "</td>";
if(!$i%=3)
echo "</tr><tr><td colspan='3' height='20'></td></tr><tr><td colspan='3' height='1' bgcolor='#ececec'></td></tr><tr><td colspan='3' height='20'></td></tr><tr>";
++$i;
}
?>
</tr></table><br>
'Web > PHP' 카테고리의 다른 글
엑셀 헤더 (0) | 2013.09.26 |
---|---|
킴스보드로 컨버팅 (0) | 2013.09.26 |
날자 자르기 (정규표현식) (0) | 2013.09.26 |
컨텐츠 xml로 변환 (0) | 2013.09.26 |
kimsplus 파일버전 게시판 합치기 (0) | 2013.09.26 |