<?php
include("../../includes/db.inc.php");
include("../../includes/config.php");
$msql=new SHARP_SQL;
$fsql=new SHARP_SQL;
$msql->query("select * from auto_user where userid='$userid'");
if($msql->next_record()){
$urlname=$msql->f('urlname');
$sitename=$msql->f('sitename');
$ensitename=$msql->f('ensitename');
$name=$msql->f('name');
$email=$msql->f('email');
$tel=$msql->f('tel');
$fax=$msql->f('fax');
$addr=$msql->f('addr');
$zip=$msql->f('zip');
$size1=$msql->f('size1');
$size2=$msql->f('size2');
$intro=$msql->f('intro');
$code=$msql->f('code');
$bannerurl=$msql->f('bannerurl');
$intro=str_replace("\n","<br>",$intro);
}
?>
<HTML>
<HEAD><title><?php echo "$sitename"; ?></title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">
<STYLE>HTML {TEXT-DECORATION: none}
A:link {COLOR: #000000; TEXT-DECORATION: none}
A:hover {COLOR: rgb(0,147,43); TEXT-DECORATION: none}
A:active {COLOR: #000000; TEXT-DECORATION: none}
A:visited {COLOR: #000000; TEXT-DECORATION: none}
EM {FONT-FAMILY: CourierNew; FONT-SIZE: 16pt; FONT-STYLE: normal}
A {FONT-SIZE: 9pt}
TD {FONT-SIZE: 9pt}
P {
FONT-SIZE: 9pt
}
<base href="../../mod/1/"></STYLE>
</HEAD>
<BODY LEFTMARGIN="0" MARGINWIDTH="0" TOPMARGIN="0" MARGINHEIGHT="0" bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="220" height="178" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="220" height="178">
              <param name=movie value="images/photo.swf">
              <param name=quality value=high>
              <embed src="images/photo.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="220" height="178">
              </embed> 
            </object></td>
          <td valign="top"> 
            <table width="558" border="0" cellspacing="3" cellpadding="0">
              <tr> 
                <td align="right" height="88" colspan="2"> 
                  <div align="center"> 
                    <table width="100%" border="0" cellspacing="2" cellpadding="0">
                      <tr> 
                        <td width="84%" height="52"> 
                          <table width="100%" border="0" cellspacing="1" cellpadding="0" align="center">
                            <tr> 
                              <td> <?php
$msql->query("select * from auto_name where userid='$userid'");
if($msql->next_record()){
$cnsize=$msql->f('cnsize');
$ensize=$msql->f('ensize');
$cncolor=$msql->f('cncolor');
$encolor=$msql->f('encolor');
$cnface=$msql->f('cnface');
$enface=$msql->f('enface');

echo "<div style='width: 100%; font-size: ".$cnsize."pt; font-family: ".$cnface."; color:".$cncolor."; filter:shadow(color=#000000,direction=240)'><b>".$sitename."</b></div>";
echo "<div style='width: 100%; font-size: ".$ensize."pt; font-family: ".$enface." ; color:".$encolor."'><img src=../../images/dot.gif width=3>".$ensitename."</div>";


}else{

echo "<div style='width: 100%; font-size:20pt; font-family: 細明體; color:#ffffff; filter:shadow(color=#000000,direction=240)'><b>".$sitename."</b></div>";
echo "<div style='width: 100%; font-size:12pt; font-family: Arial; color:#ffffff'><img src=../../images/dot.gif width=3>".$ensitename."</div>";
}
?> </td>
                            </tr>
                          </table>
                        </td>
                        <td width="16%" align="center" height="52"><img src="<?php







$logofile="../../logo/".$userid.".jpg";







if(file_exists($logofile)){







echo "$logofile";







}else{







echo "images/mylogo.gif";







}







?>" width="32" height="32"></td>
                      </tr>
                    </table>
                  </div>
                </td>
              </tr>
              <tr bgcolor="#99bd84"> 
                <td colspan="2" height="25" bgcolor="#99bd84"> 
                  <table width="100%" border="0" cellspacing="1" cellpadding="1">
                    <tr bgcolor="#FFFFFF"> 
                      <td height="15" colspan="2"><marquee behavior=alternate scrolldelay=200><img src="images/sun.gif" width="24" height="24" align="absmiddle" hspace="10">歡 
                        迎 光 臨</marquee></td>
                    </tr>
                    <tr> 
                      <td> 
                        <table border="0" cellspacing="1" cellpadding="1" bgcolor="#CCCC99" align="right" width="340">
                          <tr> 
                            <td bgcolor="#FFFFFF" width="10">&nbsp;</td>
                            <td bgcolor="#669933" style="font-size:10pt;color:#ffffff">　 
                              <script language=JavaScript>
 today=new Date();
 function initArray(){
   this.length=initArray.arguments.length
   for(var i=0;i<this.length;i++)
   this[i+1]=initArray.arguments[i]  }
   var d=new initArray(
     "星期日",
     "星期一",
     "星期二",
     "星期三",
     "星期四",
     "星期五",
     "星期六");
document.write(
     "<font color=##000000 style='font-size:9pt;font-family: 細明體'> ",
     today.getYear(),"年",
     today.getMonth()+1,"月",
     today.getDate(),"日",
     d[today.getDay()+1],
     "</font>" ); 
</script>
                              ......</td>
                          </tr>
                        </table>
                      </td>
                      <td align="right" width="200"><img src="images/bar.jpg" width="200" height="24"></td>
                    </tr>
                    <tr bgcolor="#CCCC99"> 
                      <td height="12" colspan="2"></td>
                    </tr>
                    <tr bgcolor="#CCCC99"> 
                      <td bgcolor="#CCFFCC" height="9" colspan="2"></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td valign="top"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="200" valign="top"> 
            <script language="JavaScript">
NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;
if (ver4) {
    with (document) {
        write("<STYLE TYPE='text/css'>");
        if (NS4) {
            write(".parent {position:absolute; visibility:visible}");
            write(".child {position:absolute; visibility:visible}");
            write(".regular {position:absolute; visibility:visible}")
        }
        else {
            write(".child {display:none}")
        }
        write("</STYLE>");
    }
}
function getIndex(el) {
    ind = null;
    for (i=0; i<document.layers.length; i++) {
        whichEl = document.layers[i];
        if (whichEl.id == el) {
            ind = i;
            break;
        }
    }
    return ind;
}
function arrange() {
    nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height;
    for (i=firstInd+1; i<document.layers.length; i++) {
        whichEl = document.layers[i];
        if (whichEl.visibility != "hide") {
            whichEl.pageY = nextY;
            nextY += whichEl.document.height;
        }
    }
}
function initIt(){
    if (!ver4) return;
    if (NS4) {
        for (i=0; i<document.layers.length; i++) {
            whichEl = document.layers[i];
            if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
       }
        arrange();
    }
    else {
        divColl = document.all.tags("DIV");
        for (i=0; i<divColl.length; i++) {
            whichEl = divColl(i);
            if (whichEl.className == "child") whichEl.style.display = "none";
        }
    }
}
function expandIt(el) {
    if (!ver4) return;
    if (IE4) {
        whichEl = eval(el + "Child");
        if (whichEl.style.display == "none") {
            whichEl.style.display = "block";
        }
        else {
            whichEl.style.display = "none";
        }
    }
    else {
        whichEl = eval("document." + el + "Child");
        if (whichEl.visibility == "hide") {
            whichEl.visibility = "show";
        }
        else {
            whichEl.visibility = "hide";
        }
        arrange();
    }
}
onload = initIt;
</script>
            <?php
$msql->query("select * from auto_dir where userid='$userid' and parentid=0 order by xuhao");
$mainnum=1;
while($msql->next_record()){
$dirid=$msql->f('dirid');
$ifson=$msql->f('ifson');
$dirname=$msql->f('dirname');
$mod=$msql->f('mod');
?> 
            <table  id=<?php echo "ta_".$mainnum; ?> width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#99bd84">
              <tr> 
                <td height="17" align="center" width="10" bgcolor="#CCFFCC">&nbsp; </td>
                <td height="17" align="center" width="10" bgcolor="#CCCC99">&nbsp;</td>
                <td height="17" align="center" width="10" bgcolor="#99CC99">&nbsp;</td>
                <td height="17" align="center" width="162" background="images/navbar.gif"><?php
if($ifson=='0'){
include("../../includes/dir11.php3");
}elseif($ifson=='1'){
		echo "<div id='KB".$mainnum."Parent' class='parent'><a onMouseOver=\"ta_".$mainnum.".background='images/mod_6.gif';\" onMouseOut=\"ta_".$mainnum.".background='images/mod_5.gif';\" href=# onClick=\"expandIt('KB".$mainnum."'); return false\" >$dirname</a></div>";
}
?> </td>
              </tr>
            </table>
            <?php
echo "<div id='KB".$mainnum."Child' class='child'>";
$fsql->query("select * from auto_dir where parentid='$dirid' order by xuhao");
while($fsql->next_record()){
$dirid=$fsql->f('dirid');
$dirname=$fsql->f('dirname');
$mod=$fsql->f('mod');
?> 
            <table  id=<?php echo "ta_".$mainnum; ?> width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#99bd84">
              <tr> 
                <td height="17" align="center" width="10" bgcolor="#CCFFCC">&nbsp; </td>
                <td height="17" align="center" width="10" bgcolor="#CCFFCC">&nbsp;</td>
                <td height="17" align="center" width="10" bgcolor="#CCFFCC">&nbsp;</td>
                <td height="17" align="center" width="162" background="images/navbar.gif"><?php
include("../../includes/dir.php3");
?> </td>
              </tr>
            </table>
            <?php
}
echo "</div>";
$mainnum++;
}
?> <br>
            <script language="JavaScript">
if (NS4) {
        firstEl = "KB1Parent";
        firstInd = getIndex(firstEl);
        arrange();
}
</script>
            <br>
            <table width="179" border="0" cellspacing="1" cellpadding="0" align="center">
              <tr> 
                <td width="169"> 
                  <div align="center"></div>
                </td>
              </tr>
              <tr> 
                <td width="169"> 
                  <table width="134" border="0" cellspacing="2" cellpadding="0" align="center" bordercolor="#669933">
                    <tr> 
                      <td> 
                        <div align="center"><font color="#FF6666"><font face="Courier New, Courier, mono"><font color="#FFFFFF"><font face="Arial Black" color="#FFCC66"><font color="#CCCCCC"><font color="#FFFFFF"> 
                          <font color="#FFCC33"> <font color="#FF6600"> <font color="#3399FF"> 
                          <font color="#669933">您是第 
                          <script src="../../includes/count.php3?userid=<?php echo "$userid"; ?>"></script>
                          位訪客 </font> </font> </font> </font> </font></font></font></font></font></font></div>
                      </td>
                    </tr>
                  </table>
                  <br>
                </td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td>&nbsp; </td>
              </tr>
              <tr> 
                <td>&nbsp;</td>
              </tr>
            </table>
          </td>
          <td valign="top"> 
            <table width="100%" border="0" cellspacing="20" cellpadding="0">
              <tr valign="top"> 
                <td height="295"> 
                  <table width="100%" border="0" cellspacing="1" cellpadding="0">
                    <tr valign="top"> 
                      <td height="295"> 
                        <table  border="0" cellspacing="10" cellpadding="2" width="140" align="center">
                          <tr valign="bottom"> <?php
$msql->query("select id,title,ms1,ms2 from auto_con where userid='$userid' and dirid='$kdir'");
$kk=1;
$tt=0;
while($msql->next_record()){
$id=$msql->f('id');
$title=$msql->f('title');
$ms1=$msql->f('ms1');
$ms2=$msql->f('ms2');
?> 
                            <td width="160"> 
                              <table width="100%" border="0" cellspacing="2" cellpadding="4">
                                <tr valign="TOP" bgcolor="#FFFFFF"> 
                                  <td height="60"><font color="#000000"><?php
$imgfile="../../comimg/$id.jpg";
if(!file_exists($imgfile)){
$imgfile="images/noimg.jpg";
}
echo "<a href=index.php3?file=detail.php3&nowdir=$nowdir&id=$id&detail=2><img src=$imgfile  border=0 width=120 ></a>"; 
?> </font></td>
                                </tr>
                                <tr valign="TOP" bgcolor="#FFFFFF" align="center"> 
                                  <td height="25"><font color="#000000"><b><font color="#003366"><?php echo " <a href=index.php3?file=detail.php3&nowdir=$nowdir&id=$id&detail=2>$title</a>"; ?> 
                                    </font> </b> </font></td>
                                </tr>
                              </table>
                            </td>
                            <?php
if($kk==3){
echo "</tr><tr valign=bottom>";
$kk=0;
}
$kk++;
$tt++;
}
if($tt==1){
?> 
                            <script>
window.location='index.php3?file=detail.php3&nowdir=<?php echo "$nowdir"; ?>&id=<?php echo "$id"; ?>&detail=2'
</script>
                            <?php
}
?> </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="15" cellpadding="0">
              <tr> 
                <td height="57"> 
                  <div align="center"><?php
$bannerfile="../../banner/".$userid.".jpg";
if(file_exists($bannerfile)){
echo "<a href=$bannerurl target=_blank><img border=0 src=$bannerfile width=468 height=60></a>";
}else{
echo "<img border=0 src='images/banner.gif' width=468 height=60>";
}
?> <font color="#333333"> <br>
                    <?php echo "$code"; ?> </font></div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr bgcolor="#669933"> 
    <td height="16">&nbsp;</td>
  </tr>
</table>
<p>&nbsp;</p>
</BODY>
</HTML>
