<?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');
$bannerurl=$msql->f('bannerurl');
$code=$msql->f('code');
$intro=$msql->f('intro');
$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="776" border="0" cellspacing="0" cellpadding="0" align="center" height="14">
  <tr> 
    <td><img src="images/mod_0.gif" width="776" height="14"></td>
  </tr>
</table>
<table width="776" border="0" cellspacing="0" cellpadding="0" align="center" height="92" background="images/mod_2.gif">
  <tr> 
    <td width="238"><img src="images/mod_1.gif" width="238" height="92"></td>
    <td> 
      <table width="100%" border="0" cellspacing="5" cellpadding="0" align="center">
        <tr> 
          <td height="39" width="46"><img src="<?php
$logofile="../../logo/".$userid.".jpg";
if(file_exists($logofile)){
echo "$logofile";
}else{
echo "images/mylogo.gif";
}
?>"></td>
          <td height="39" width="475"> 
            <table width="100%" border="0" cellspacing="3" 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."'><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:#000000'><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>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="776" border="0" cellspacing="0" cellpadding="0" align="center" height="21" background="images/mod_4.gif">
  <tr> 
    <td> 
      <table width="99%" border="0" cellspacing="1" cellpadding="0">
        <tr align="center"> 
          <td> <?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');
$dirname=$msql->f('dirname');
$mod=$msql->f('mod');
?><img src="images/dot.gif" width="8" height="10"><font color="#FFFFFF">|<img src="images/dot.gif" width="8" height="10"></font><?php
	if($mod=='1'){
		echo "<a href=index.php3?file=1.php3&kdir=$dirid&nowdir=$dirid><font color=white>$dirname</font></a>";
	}elseif($mod=='2'){
		echo "<a href=index.php3?file=2.php3&kdir=$dirid&nowdir=$dirid><font color=white>$dirname</font></a>";
	}elseif($mod=='3'){
		echo "<a href=index.php3?file=3.php3><font color=white>$dirname</font></a>";
	}elseif($mod=='101'){
		echo "<a href=".$baseurl."com/".$dirname."><font color=white>¤¤ ¤å ª©</font></a>";
	}elseif($mod=='102'){
		echo "<a href=".$baseurl."com/".$dirname."><font color=white>ENGLISH</font></a>";
	}elseif($mod=='0'){
		echo "<a href=index.php3?file=index.php3><font color=white>$dirname</font></a>";
	}

}
?><font color="#FFFFFF"><img src="images/dot.gif" width="8" height="10">|</font></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="776" border="0" cellspacing="0" cellpadding="0" align="center" height="20">
  <tr> 
    <td><img src="images/mod_6.gif" width="776" height="20"></td>
  </tr>
</table>
<table width="776" border="0" cellspacing="0" cellpadding="0" align="center" background="images/mod_7.gif">
  <tr> 
    <td height="217" width="178" valign="top"> 
      <table width="177" border="0" cellspacing="0" cellpadding="0">
        <?php
if($nowdir!=""){
$fsql->query("select * from auto_dir where parentid='$nowdir' order by xuhao");
$vv=0;
while($fsql->next_record()){
$dirid=$fsql->f('dirid');
$dirname=$fsql->f('dirname');
$mod=$fsql->f('mod');
$ifexson=1;
if($vv==0){
$nowd=$dirid;
}
$vv++;
?> 
        <tr> 
          <td height="25"><img src="images/dot.gif" width="10" height="10"><img src="images/d1.gif" width="9" height="9"><img src="images/dot.gif" width="10" height="10"><?php 
	if($mod=='1'){
		echo "<a href=index.php3?file=1.php3&kdir=$dirid&nowdir=$nowdir>$dirname</a>";
	}elseif($mod=='2'){
		echo "<a href=index.php3?file=2.php3&kdir=$dirid&nowdir=$nowdir>$dirname</a>";

	}
 ?> </td>
        </tr>
        <tr bgcolor="#000000"> 
          <td height="1"><img src="images/dot.gif" width="10" height="1"></td>
        </tr>
        <?php
}
if($ifexson==1 && $kdir==$nowdir){
$kdir=$nowd;
}
}
?> 
      </table>
      <p><br>
      </p><p>&nbsp;</p>
      <table width="84" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FE652F">
        <tr bgcolor="#CCCCCC"> 
          <td> 
            <div align="center"><font color="#CCCCCC"><font color="#FFFFFF"> <b> 
              <font face="Arial, Helvetica, sans-serif"> 
              <script src="../../includes/count.php3?userid=<?php echo "$userid"; ?>"></script>
              </font> </b> </font></font></div>
          </td>
        </tr>
      </table>
    </td>
    <td height="217" width="598" valign="top"> 
      <table width="100%" border="0" cellspacing="4" cellpadding="0">
        <tr valign="top"> 
          <td height="155"> 
            <table width="100%" border="0" cellspacing="12" cellpadding="0">
              <tr valign="middle"> 
                <td colspan="3" height="30"> 
                  <div align="center"><font color="#000000"><?php
$msql->query("select id,title,ms1,ms2,con from auto_con where userid='$userid' and id='$id'");
if($msql->next_record()){
$title=$msql->f('title');
$ms1=$msql->f('ms1');
$ms2=$msql->f('ms2');
$con=$msql->f('con');
$con=str_replace("\n","<br>",$con);
$body=$con;
}
?></font><?php echo "<font size=3> <b>$title</b></font><br><br>".$ms1."<br> ".$ms2; ?> 
                    <font color="#FFFFFF"></font><font color="#FFFFFF"></font><font color="#000000"> 
                    </font></div>
                </td>
              </tr>
              <tr valign="middle" bgcolor="#666666"> 
                <td colspan="3" height="1"><img src="images/dot.gif" width="20" height="1"></td>
              </tr>
              <tr> 
                <td  valign="top"  height="350"> <?php
$imgfile="../../comimg/$id.jpg";
if(file_exists($imgfile)){
echo "<img src=$imgfile  border=0 align=left hspace=6>"; 
}
?><font color="#000000"><?php echo "$body"; ?></font><font color="#000000"> </font></td>
              </tr>
              <tr valign="top"> </tr>
            </table>
          </td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="4" cellpadding="0" align="center">
        <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>
              </font></div>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="776" border="0" cellspacing="0" cellpadding="0" align="center" height="14">
  <tr> 
    <td><img src="images/mod_9.gif" width="776" height="14"></td>
  </tr>
</table>
<table width="776" border="0" cellspacing="12" cellpadding="0" align="center">
  <tr> 
    <td height="47"> 
      <div align="center"><font color="#333333"><?php echo "$code"; ?></font></div>
    </td>
  </tr>
</table>
<p>&nbsp;</p>
</BODY>
</HTML>
