´ÙÀ½ ÀÌÀü Â÷·Ê

16. Admin ¿µ¿ª ¸¸µé±â

admin ¿µ¿ªÀº ÀÚ·á½Ç , °æ¸Å , ¼îÇÎ ¸ô , µ¥ÀÌÅÍ º£À̽º¿Í °ü·ÃÇØ °ü¸®ÀÚ°¡ ¼öÁ¤ÇÏ´Â ºÎºÐÀÌ¸ç ·Î±×ÀÎÀ» °ÅÃÄ Á¢±ÙÀÌ °¡´É ÇÕ´Ï´Ù.    AdminÀÇ ·Î±×ÀÎÀº ÄíÅ°¸¦ ºÎ¿© Çؼ­ admin ¿©ºÎ¸¦ È®ÀÎ ÇÕ´Ï´Ù.    ¸¸¾à ´Ù¸¥ ¹æ¹ýÀ¸·Î µ¥ÀÌÅÍ º£À̽ºÀÇ Á¢±Ù ¼³Á¤À» ÇÏ·Á¸é inc ÆÄÀÏ·Î µû·Î ¼³Á¤Çؼ­ »ç¿ëÇÏ´Â ¹æ¹ýµµ ÀÖ½À´Ï´Ù.

16.1 Admin Å×ÀÌºí ¸¸µé±â

    Å×À̺íÀº ÀÚ·á½Ç°ú °æ¸Å °Ô½ÃÆÇÀÇ Á¤º¸¸¦ ÀúÀå Çϴµ¥ »ç¿ë Çϸç ÀÚ·á½Ç , °æ¸Å Å×À̺í°ú ´Þ¸® Á÷Á¢ ¿©±â¼­
    »ý¼º ÇØ¾ß ÇÕ´Ï´Ù. 

µ¥ÀÌÅÍ º£À̽º ¸¸µé±â

    mysql"create databases adminp ;

    ÀÚ·á½Ç°ú °æ¸Å °Ô½ÃÆÇÀÇ Á¤º¸¸¦ ÀúÀåÇÑ µÎ°³ÀÇ Å×À̺íÀ» »ý¼º Çϱâ À§ÇØ adminp µ¥ÀÌÅÍ º£À̽º¸¦ ¸¸µì´Ï´Ù.

Å×ÀÌºí ¸¸µé±â

    ./mysql -u root -p adminp < adminp.sql

    adminp µ¥ÀÌÅÍ º£À̽º¿¡ CDÀÇ adminp.sql ÆÄÀÏÀ» ÀÌ¿ëÇؼ­ admin(°æ¸Å °Ô½ÃÆÇ Á¤º¸) , file(ÀÚ·á½Ç °Ô½ÃÆÇ Á¤º¸)
    Å×À̺íÀ» »ý¼º ÇÕ´Ï´Ù. 

±×¸². 16-1 adminp.sql

Å×ÀÌºí ±¸¼º ÀÎÀÚµé

    admin ¿µ¿ª¿¡¼­ ÀÚ·á½Ç , °æ¸Å °Ô½ÃÆÇÀÇ Á¤º¸¸¦ º¸¿© ÁÖ±â À§ÇØ ÀúÀå ÇÏ´Â ºÎºÐÀÇ ÀÎÀÚµéÀÌ ÀÖÀ¸¸ç µ¥ÀÌÅÍ
    º£À̽º¿Í ȸ¿ø °ü¸® , ¼îÇÎ ¸ôÀÇ °æ¿ì admin ¿µ¿ª¿¡¼­ »ç¿ëÇÒ Å×À̺íÀº ¾ø½À´Ï´Ù.
    ÇÏÁö¸¸ ÀÌ ºÎºÐ ¿ª½Ã Å×À̺íÀ» »ç¿ëÇؼ­ º¸´Ù ü°èÀûÀÌ°í °ü¸®ÀÚ Ãø¸éÀÇ adminÀ» ±¸¼ºÇØ¾ß ÇÒ °Í ÀÔ´Ï´Ù. 
    ÀÌ°ÍÀº »çÀÌÆ®ÀÇ ´ëÇüÈ­¿¡¼­´Â ²À ÇÊ¿ä ÇÒ °ÍÀÔ´Ï´Ù.

°æ¸Å admin Å×À̺í(admin)

    °æ¸Å °Ô½ÃÆÇÀÇ ¹øÈ£¸¦ »ý¼ºÇÏ´Â Çʵå¿Í °Ô½ÃÆÇÀÇ ±Û¼ö µîÀ» º¸¿©ÁÖ°í ¾ÕÀ¸·Î °è¼ÓÀûÀÎ Ãß°¡¸¦ ¿øÇÒ °æ¿ì
    µ¥ÀÌÅͺ£À̽º adminÀ» ÀÌ¿ëÇØ Çʵ带 Ãß°¡ ÇÏ¸é µË´Ï´Ù.

 

    No - °æ¸Å °Ô½ÃÆÇÀÇ ¹øÈ£ ÀÔ´Ï´Ù.
    Title - °Ô½ÃÆÇÀÇ Á¦¸ñÀ» ÀúÀå ÇÕ´Ï´Ù.
    View - °æ¸Å °Ô½ÃÆÇÀ» ±¸¼ºÇÏ´Â ÀÔÂû Å×À̺íÀÇ À̸§À» ÀúÀå ÇÕ´Ï´Ù.
    Sum - ÇØ´ç °Ô½ÃÆÇÀÇ ±Û ¼ö¸¦ ÀúÀå ÇÕ´Ï´Ù.
    Wdate - °Ô½ÃÆÇÀÇ »ý¼º ³¯Â¥¸¦ ÀúÀå ÇÕ´Ï´Ù.
    Mview - °æ¸Å °Ô½ÃÆÇÀ» ±¸¼ºÇÏ´Â °æ¸Å °Ô½ÃÆÇ ¸ÞÀÎ Å×À̺í À̸§À» ÀúÀå ÇÕ´Ï´Ù.

ÀÚ·á½Ç admin Å×À̺í(file)

    ÀÚ·á½Ç °Ô½ÃÆÇÀÇ ±âº»ÀûÀÎ Á¤º¸¸¦ º¸¿© ÁÖ¸ç ÀúÀåÇÕ´Ï´Ù.

    No - °Ô½ÃÆÇÀÇ °íÀ¯ ¹øÈ£¸¦ ÀúÀå ÇÕ´Ï´Ù.
    Title - °Ô½ÃÆÇÀÇ Á¦¸ñÀ» ÀúÀå ÇÕ´Ï´Ù.
    View - ÀÚ·á½Ç ÀÀ´ä±Û Å×À̺íÀÇ À̸§À» ÀúÀå ÇÕ´Ï´Ù.
    Sum - ÀÚ·á½Ç °Ô½ÃÆÇÀÇ µî·ÏµÈ ±Û ¼ö¸¦ ÀúÀå ÇÕ´Ï´Ù.
    Wdate - °Ô½ÃÆÇ »ý¼º ³¯Â¥¸¦ ÀúÀå ÇÕ´Ï´Ù.
    Mview - ÀÚ·á½Ç °Ô½ÃÆÇÀ» ±¸¼ºÇÏ´Â ÀÚ·á½Ç °Ô½ÃÆÇ ¸ÞÀÎ Å×À̺í À̸§À» ÀúÀå ÇÕ´Ï´Ù.

16.2 ¼Ò½º ¸¸µé±â

admin ¿µ¿ªÀÇ ¼Ò½º´Â ÃÑ 3°³ÀÇ ÆÄÀÏ·Î ±¸¼º µË´Ï´Ù.    ¸ÕÀú °¢ È­¸éÀ» ÇÔ¼ö Çü½ÄÀ¸·Î Ç¥ÇöÇÑ db_func_all.php ÆÄÀÏ°ú ÀÌ°ÍÀ» ÀÌ¿ëÇØ È­¸é Ãâ·ÂÀ» ÇÏ´Â db_view.php ÆÄÀÏ ±×¸®°í admin ¿µ¿ªÀÇ ·Î±×ÀÎ(ÄíÅ°¸¦ »ý¼º ÇÕ´Ï´Ù.)À» ±¸¼ºÇÏ´Â logon.php ÆÄÀÏ ÀÔ´Ï´Ù.

db_func_all.php Àüü ÄÚµå

    <?php

    $connect = mysql_connect('localhost','root','gksmf444');

    ?>


    <?php

    function main($page,$connect,$select,$dbs,$tableput,$root)
    {

      if($select == tables)
      {
        mysql_select_db($dbs,$connect);
        $ally = mysql_query("show tables ",$connect);
        $t = "Table($dbs Db) hong il mansei~!";
        $link = "<a href=db_view.php?chanl=create_table&dbs=$dbs>";
        $linkdel = "<a href=db_view.php?chanl=dbdel&dbs=$dbs>";
        }
      if(!$select)
      {
        $ally = mysql_query("show databases ",$connect);
        $t = "Database Names hong il mansei~!" ;
        $link = "<a href =db_view.php?chanl=create_db>";
      }
      if($select == field)
      {
        mysql_select_db($dbs,$connect);
        $ally = mysql_query("describe $tableput " , $connect);
        $link1 = "<b><a href =db_view.php?chanl=main&select=tables&dbs=$dbs>
        ($dbs Db)</b></a> ";
        $link2 = "<b>($tableput Table)</b>";  
      }


      $t_num=mysql_num_rows($ally);
      $p_dip = 4 ;


      $p_page =4  ;
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }
      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }


      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      if($select == field)
      {
        echo("
        <html>
        <title>
        main_view html
        </title>
        <body bgcolor=black>
        <center>
        <img src=skyt1.jpg border=0>
        <br>
        <table border=0 cellspacing=2 cellpadding=2 width=700 >
        <tr>
        <th bgcolor=white colspan=7 align=left>
        <font style='font-size:12px;font-style:italic;color:#blue'>
        <b>$t_page / $page </b></font></th>
        </tr>
        <tr>


        <td bgcolor=#808080 width=150>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Field</b></font></td>


        <td bgcolor=#808080 width=200 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Type</b></font></td>


        <td bgcolor=#808080 width=50 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Null</b></font></td>


        <td bgcolor=#808080 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Key</b></font></td>


        <td bgcolor=#808080 width=50 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Default</b></font></td>


        <td bgcolor=#808080 width=150 align=center>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>Extra</b></font></td>
        </tr>
        ");
      }
      else
      {
        echo("
        <html>
        <title>
        main_view html
        </title>
        <body bgcolor=black>
        <center>
        <img src=skyt1.jpg border=0>
        <br>
        <table border=0 cellspacing=2 cellpadding=2 width=500 >
        <tr>
        <th bgcolor=white align=left><font style='font-size:12px;font-style:italic;color:#blue'>
        <b>$t_page / $page </b></font></th>
        </tr>
        <tr>
        <td bgcolor=#808080 width=450>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>$t</b></font></td></tr>
        ");
      }


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ µ¥ÀÌŸ,Å×À̺íÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {

          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $db=mysql_fetch_array($ally);


            if(!$select)
            {
              echo("
              <tr>
              <td bgcolor=black>
              <a href ='db_view.php?chanl=main&dbs=$db[Database]&select=tables'>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Database]</b></font></a></td>
              ");
            }


            if($select == tables)
            {
              echo("
              <tr>
              <td bgcolor=black>
              <a href ='db_view.php?chanl=main&dbs=$dbs&select=field&tableput=$db[0]'>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[0]</b></font></a></td>
              ");
            }


            if($select == field)
            {
              echo("
              <tr>
              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Field]</b></font></a></td>


              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Type]</b></font></a></td>


              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Null]</b></font></a></td>


              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Key]</b></font></a></td>


              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Default]</b></font></a></td>


              <td bgcolor=black>
              <font style='font-size:13px;font-style:italic;color:#fffff0'>
              <b>$db[Extra]</b></font></a></td>
              ");
            }
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          if($select == tables)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$pre_p&dbs=$dbs&select=tables>
            <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
          }
          if(!$select)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$pre_p>
            <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>"); 
          }
          if($select == field)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$pre_p&dbs=$˱
            &select=field&tableput=$tableput>
            <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>"); 
          }
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {

          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>  ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              if(!$select)
              {
                echo("
                <a href =db_view.php?chanl=main&page=$pp>
                <font style='font-size:12px;font-style:italic;color:#808080'>
                [$pp]</font></a>");
              }
              if($select == tables)
              {
                echo("
                <a href =db_view.php?chanl=main
                &page=$pp&dbs=$dbs&select=tables>
                <font style='font-size:12px;font-style:italic;color:#808080'>
                [$pp]</font></a>");
              }


              if($select == field)
              {
                echo("
                <a href =db_view.php?chanl=main&page=
                $pp&dbs=$dbs&select=field&tableput=$tableput>
                <font style='font-size:12px;font-style:italic;color:#808080'>
                [$pp]</font></a>");
              }
            }
          }
        }


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          if($select == tables)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$next_p&dbs=$dbs&select=tables>
            <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
          }
          if(!$select)
          {
            echo ("
            <a href =db_view.php?chanl=main&page=$next_p>
            <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
          }
          if($select == field)
          {
            echo ("
            <a href =db_view.php?chanl=main
            &page=$next_p&dbs=$dbs&select=field&tableput=$tableput>
            <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
          }
        }
      }


      if($select != field)
      {

        $td = "<td bgcolor=black width=100>
        $link
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <b>New </b></font></a></td>";


        if($select == tables)
        {
          $td = "<td bgcolor=black width=100>
          $link
          <font style='font-size:13px;font-style:italic;color:#ffd700'>
          <b>New </b></font></a></td>
          <td bgcolor=black width=100>
          $linkdel
          <font style='font-size:13px;font-style:italic;color:#ffd700'>
          <b>Db Del </b></font></a></td>";
        }
      }
      else
      {
        $td =  "<td bgcolor=black width=300>
        <font style='font-size:13px;font-style:italic;color:red'>
        $link1 > $link2
        </font></td>
        <td bgcolor=black width=100>
        <a href =db_view.php?chanl=tabledel&dbs=$dbs&tableput=$tableput>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        Del Table
        </font></a></td>";
      }


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>
      $td


      <td bgcolor=black width=100>
      <a href = userin.php?chanl=main_view>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home re</b></font></a></td>


      <td bgcolor=black width=100>
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      <option value=user_edit>user edit
      <option value=shop_edit>shop edit
      </select>
      </td>
      <td>
      <input type=submit value=Go.!>
      </td>
      </form>
      ");


      if($tableput)
      {
        echo("
        </tr>
        </table>
        <br><br>
        <table border=0 cellspacing=2 cellpadding=2 width=500 >
        <tr>
        <th bgcolor=gray colspan=7 align=left>
        <font style='font-size:12px;font-style:italic;color:white'>
        <b>Attribute Add/Del insert Attribute Name</b></font></th>
        </tr>
        <tr>
        <td bgcolor=black width=200>
        <font style='font-size:13px;font-style:italic;color:blue'>
        <b>Alter Table $tableput</b></font></td>


        <td bgcolor=black width=50>
        <font style='font-size:13px;font-style:italic;color:#ffd700'>
        <form method=post action=db_view.php>
        <input type = hidden name=tn value=$tableput>
        <input type = hidden name=chanl value=e_field>
        <input type = hidden name=dbs value=$dbs>
        <select name=tct>
        <option value=add selected>Add
        <option value=drop >Del
        </select>
        </td>
        <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#ffd700'>
        <input type = text name='tablequ' size=14>
        </font></td>
        <td>
        <input type=submit value=Go.!>
        </td>
        </form>
        ");
      }


      echo("
      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function create_db1()
    {

      echo("
      <html>
      <title>
      creat_db html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=create_db2>


      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>
      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Db Name</b></font></td>


      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=dbname size=10></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=¸¸µé±â>
      </font></td>
      </table>
      </tr>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function create_title()
    {

      echo("
      <html>
      <title>
      creat_db html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=create_title2>


      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Table Name</b></font></td>


      <td bgcolor=black width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=ctitle size=10></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~°Ô½ÃÆÇ Name</b></font></td>


      <td bgcolor=black width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=title size=10></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=¸¸µé±â>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function create_file()
    {

      echo("
      <html>
      <title>
      creat_db html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=create_title3>


      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Table Name</b></font></td>


      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=ctitle size=10></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ÀÚ·á½Ç Name</b></font></td>


      <td bgcolor=black width=100><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=title size=10></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=¸¸µé±â>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function title_view($page,$connect)
    {

      mysql_select_db(adminp,$connect);


      $ally = mysql_query("select no,title,mview,view,sum,wdate from admin
      order by no ",$connect);


      $t_num=mysql_num_rows($ally);
      $p_dip = 4 ;//ÆäÀÌÁö´ç ±Û ¼ö


      $p_page =4  ;//ÆäÀÌÁö´ç ÆäÀÌÁö ¸µÅ©¼ö
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }
      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }


      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <th bgcolor=white colspan=7 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>No</b></font></td>
      <td bgcolor=#808080 width=350>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Title</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>MView</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>View</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>sum</b></font></td>


      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>date</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>check</b></font></td>
      </tr>
      ");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ ±ÛÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {

          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $put=mysql_fetch_array($ally);


            echo("
            <tr>


            <td bgcolor=black>
            <font style='font-size:13px;font-style:italic;color:blue'>
            $put[no]</font></td>


            <td bgcolor=black>
            <a href =main_view.php?chanl=main_view&f=$put[mview]&f2=$put[view]>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[title]</b></font></a></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[mview]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[view]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[sum]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <b>$put[wdate]</b></font></td>


            <td bgcolor=black align=center>
            <form method=post action=db_view.php>
            <input type=hidden name=chanl value=del_title>
            <input type=radio name=s value=$put[mview]>
            <input type=hidden name=x value=$put[view]>
            </td>
            </tr>
            ");
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=title_view&page=$pre_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {
          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>
            ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              echo("
              <a href =db_view.php?chanl=title_view&page=$pp>
              <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
            }
          }
        }


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=title_view&page=$next_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
        }
      }


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=create_title>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Creat °æ¸Å</b></font></a></td>


      <td bgcolor=black width=100>
      <a href = userin.php?chanl=main_view>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home re</b></font></a></td>

      <td bgcolor=black width=100>
      <input type=hidden name=put value=$start_num>
      <input type=submit value=Del>
      </td>
      </form>


      <td bgcolor=black width=100>
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      <option value=user_edit>user edit
      <option value=shop_edit>shop edit
      </select>
      </td>
      <td>
      <input type=submit value=Go.!>
      </td>
      </form>

      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function logon($file)
    {

      echo("
      <html>
      <title>
      passw view
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=logon.php>
      <input type=hidden name=chanl value=$file>
      <table border=0 cellspacing=2 cellpadding=2  width=700 >
      <tr>


      <td bgcolor=#808080 align=center width=74>
      <font style='font-size:13px;font-style:italic;color:#blue'>
      <b>admin login</b></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Host</b></font></td>


      <td bgcolor=black width=100>
      <input type=text name=host size=10></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>
      <td bgcolor=black width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=id size=10></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080 width=74>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~passw</b></font></td>


      <td bgcolor=black width=100>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=ÀÔ·Â>
      </font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function file_view($page,$connect)
    {
      mysql_select_db(adminp,$connect);
      $ally = mysql_query("select no,title,mview,view,sum,wdate from file
      order by no ",$connect);


      $t_num=mysql_num_rows($ally);
      $p_dip = 3 ;
      $p_page =4 ;
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }
      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }


      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>


      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <th bgcolor=white colspan=7 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>No</b></font></td>
      <td bgcolor=#808080 width=400>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Title</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>MView</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>View</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>sum</b></font></td>


      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>date</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>check</b></font></td>


      </tr>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=del_title>
      <input type=hidden name=table value=file>
      ");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ ±ÛÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {

          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $put=mysql_fetch_array($ally);


            echo("
            <tr>
            <td bgcolor=black>
            <font style='font-size:13px;font-style:italic;color:blue'>
            $put[no]</font></td>
            <td bgcolor=black>


            <a href =m.php?chanl=main_view&f=$put[mview]&f2=$put[view]>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[title]</b></font></a></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[mview]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[view]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[sum]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <b>$put[wdate]</b></font></td>


            <td bgcolor=black align=center>
            <input type=radio name=s value=$put[mview]>
            <input type=hidden name=x value=$put[view]>
            </td>
            </tr>
            ");
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=file_view&page=$pre_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {
          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>
            ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              echo("
              <a href =db_view.php?chanl=file_view&page=$pp>
              <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
            }
          }
        }


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=file_view&page=$next_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
        }
      }


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>


      <td bgcolor=black width=100>
      <a href =db_view.php?chanl=create_file>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Creat ÀÚ·á½Ç</b></font></a></td>


      <td bgcolor=black width=100>
      <a href = userin.php?chanl=main_view>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home re</b></font></a></td>


      <td bgcolor=black width=100>
      <input type=hidden name=put value=$start_num>
      <input type=submit value=Del>
      </td>
      </form>


      <td bgcolor=black width=100>
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      <option value=user_edit>user edit
      <option value=shop_edit>shop edit
      </select>
      </td>
      <td>
      <input type=submit value=Go.!>
      </td>
      </form>
      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function user_view($page,$connect)
    {

      mysql_select_db('selectuser',$connect);
      $ally = mysql_query("select name,id,resident,email,address,tel1,wdate
      from userin  order by wdate",$connect);


      $t_num=mysql_num_rows($ally);
      $p_dip = 10 ;//ÆäÀÌÁö´ç ±Û ¼ö


      $p_page =4  ;//ÆäÀÌÁö´ç ÆäÀÌÁö ¸µÅ©¼ö
      $p_pagex = ceil($p_page / 2) ;
      $t_page = ceil($t_num / $p_dip) ;


      if(!$page)
      {
        $page = 1;
      }
      if( $page <= $p_pagex )
      {
        $p_start = $p_pagex + 1 ;
      }
      else
      {
        $p_start = $page + 1;
      }

      $pt_page = ceil($p_start - $p_pagex) ;
      $next_p = $page + 1 ;
      $pre_p = $page - 1 ;
      $start_num = ($t_num - ($page * $p_dip))+($p_dip-1) ;


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>


      <table border=0 cellspacing=2 cellpadding=2 width=800 >
      <tr>
      <th bgcolor=white colspan=8 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page (ÃÑ È¸¿ø:$t_num)</b></font></th>
      </tr>
      <tr>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>No</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Name</b></font></td>


      <td bgcolor=#808080 width=75 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Id</b></font></td>


      <td bgcolor=#808080 width=400 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Address</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Email</b></font></td>


      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Tel</b></font></td>


      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Wdate</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Check</b></font></td>
      </tr>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=del_user>
      <input type=hidden name=table value=userin>
      ");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=6>
        <font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ ID°¡ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        $x= $t_num + 1 ;


        for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
        {
          $x-- ;


          if($pd >= 0 )
          {
            mysql_data_seek($ally,$pd);
            $put=mysql_fetch_array($ally);


            echo("
            <tr>
            <td bgcolor=black>
            <font style='font-size:13px;font-style:italic;color:blue'>
            $x</font></td>
            <td bgcolor=black>


            <a href =db_view.php?chanl=user_view&id=$put[id]>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[name]</b></font></a></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[id]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:red'>
            <b>$put[address]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:#fffff0'>
            <b>$put[email]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <b>$put[tel1]</b></font></td>


            <td bgcolor=black align=center>
            <font style='font-size:13px;font-style:italic;color:blue'>
            <b>$put[wdate]</b></font></td>


            <td bgcolor=black align=center>
            <input type=checkbox name=area[] value=$put[id]>
            </td>
            </tr>
            ");
          }
        }


        echo("
        <tr>
        <td bgcolor=black colspan=7>&nbsp;</td>
        </tr>
        <tr>
        <td bgcolor=black colspan=7 align=center>
        ");


        if($page == 1)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'>first </font> ");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=user_edit&page=$pre_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'><< </font></a>");
        }


        for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
        {
          if($pp == $page )
          {
            echo ("
            <font style='font-size:13px;font-style:italic;color:red'>
            $pp</font>  ");
          }
          else
          {
            if($pp > 0  && $pp <= $t_page)
            {
              echo("
              <a href =db_view.php?chanl=user_edit&page=$pp>
              <font style='font-size:12px;font-style:italic;color:#808080'>
              [$pp]</font></a>");
            }
          }
        }


        if($page == $t_page)
        {
          echo ("
          <font style='font-size:12px;font-style:italic;color:#fffff0'> last^^ </font>");
        }
        else
        {
          echo ("
          <a href =db_view.php?chanl=user_edit&page=$next_p>
          <font style='font-size:12px;font-style:italic;color:#fffff0'>pre>></font></a>");
        }
      }


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>


      <td bgcolor=black width=100>
      <a href =userin.php?chanl=main&sel=user_edit>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Creat user</b></font></a></td>


      <td bgcolor=black width=100>
      <a href = userin.php?chanl=main_view>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home re</b></font></a></td>


      <td bgcolor=black width=100>
      <input type=submit value=Del>
      </td>
      </form>


      <td bgcolor=black width=100>
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      <option value=user_edit>user edit
      <option value=shop_edit>shop edit
      </select>
      </td>


      <td>
      <input type=submit value=Go.!>
      </td>
      </form>
      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function user_edit($connect,$id)
    {

      mysql_select_db('selectuser',$connect);
      $ally = mysql_query("select name,id,resident,email,address,homepage,tel1,uno
      from userin where id='$id'",$connect);


      $put=mysql_fetch_array($ally);


      echo("
      <html>
      <title>
      userin_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <form method=post action=userin.php>
      <input type=hidden name=chanl value=checkid>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      (* ´Â Çʼö ÀÔ·Â ºÎºÐ ÀÔ´Ï´Ù.)</font>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=IDÁߺ¹È®ÀÎ></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=id size=9 maxlength=8>(* 4~8ÀÚÀÇ ¿µ¼ýÀÚ Á¶ÇÕ)</font></td>


      </tr>
      </form>
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=upuser>
      <input type=hidden name=idno value=$id>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~ID</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=id size=9 maxlength=8 value='$put[id]'>
      (* 4~8ÀÚÀÇ ¿µ¼ýÀÚ Á¶ÇÕ)</font></td>


      </tr>
      <tr>
      <td width=90 bgcolor=#808080>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Name</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=name size=9 value='$put[name]'>(* ÇÑ±Û À̸§)</font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Email</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=email size=21 value='$put[email]'>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~HomePG</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      HTTP://
      <input type=text name=home size=20 value='$put[homepage]'>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Resident</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=rsd size=15 value='$put[resident]'>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Tel1</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=tel1 size=15 value='$put[tel1]'>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~¿ìÆí¹øÈ£</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=uno size=8 value='$put[uno]'>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Address</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=address size=54 value='$put[address]'>* </font></td>
      </tr>
      <tr>


      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=ȸ¿ø¼öÁ¤>
      <input type=reset  value=´Ù½Ã></font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function input_shop($sel,$selx)
    {

      echo("
      <html>
      <title>
      input_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>


      <form method=post enctype=multipart/form-data action=db_view.php>
      <input type=hidden name=chanl value=shop_query>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Price</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=price size=10></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Select</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=radio name=selx value=1>ÀüÀÚÁ¦Ç°
      <input type=radio name=selx value=2>ÀÇ·ù
      <input type=radio name=selx value=3>À½¾Ç
      <input type=radio name=selx value=4>Ã¥
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Pdname</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=pdname size=24></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~up File</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=file name=upfile size=14></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Content</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <textarea name=cont rows=5 cols=20></textarea></font></td>
      </tr>
      <tr>


      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=shopup>
      <input type=reset  value=Re></font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }


    function shop_edit($connect,$sel)
    {
        
      mysql_select_db('shop',$connect);


      if(!$sel)
      {
        $sel = 1 ;
      }


      $ally = mysql_query("select pdname,price,cont,sel from pduct
      where sel='$sel'",$connect);


      $t_num=mysql_num_rows($ally);


      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=600 >
      <tr>
      <th bgcolor=gray colspan=4 align=center>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b> Shop Edit</b></font></th>
      </tr>
      ");


      if(!$t_num)
      {
        echo ("
        <tr>
        <th bgcolor=black colspan=4><font style='font-size:13px;font-style:italic;color:#fffff0'>
        <b>µî·ÏµÈ »óÇ°ÀÌ ¾ö½º¿ä...  ^^;</b></font></th>
        </tr>
        </center>
        </table>
        </html>
        ");
      }
      else
      {
        for($pd=$t_num ; $pd > 0 ; $pd--)
        {
          $put=mysql_fetch_array($ally);


          $cont = nl2br($put[cont]);


          echo("
          <tr>
          <td bgcolor=gray colspan=4>
          </tr>
          <tr>
          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:blue'>
          <img src=sajin.php?sel=$sel&pdname=$put[pdname] border=0></font></td>


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$cont</b></font></a></td>


          <td bgcolor=black>
          &nbsp
          </td>
          </tr>
          <tr>


          <td bgcolor=black>
          <a href =db_view.php?chanl=pdname_edit&sel=$sel&pn=$put[pdname]>
          <font style='font-size:13px;font-style:italic;color:blue'>
          $put[pdname]</font></a></td>


          <td bgcolor=black align=center>
          <font style='font-size:13px;font-style:italic;color:red'>
          <b>$put[price]¿ø</b></font></td>
          <td bgcolor=black width=50>
          <form method=post action=db_view.php>
          <input type=hidden name=chanl value=del_shop>
          <input type=hidden name=sel value=$sel>
          <td bgcolor=black align=center>
          <input type=checkbox name=area[] value=$put[pdname]>


          </tr>
          ");
        }
      }


      echo("
      <tr>
      <td bgcolor=black colspan=7>&nbsp;</td>
      </tr>
      <tr>
      <td bgcolor=black colspan=7 align=center>
      ");


      echo("
      </td>
      </tr>
      </center>
      </table>
      <br>
      <center>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>


      <td bgcolor=black >
      <a href =userin.php?chanl=main_view&username=$username>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Home</b></font></a><td>


      <td bgcolor=black >
      <a href =db_view.php?chanl=shop_in>
      <font style='font-size:13px;font-style:italic;color:#ffd700'>
      <b>Up shop</b></font></a><td>


      <td bgcolor=black >
      <input type=submit value=Del>
      </td>
      </form>


      <td bgcolor=black >
      <form method=post action=db_view.php>
      <select name=chanl>
      <option value=file_view selected>File edit
      <option value=title_view>Title edit
      <option value=main>Db edit
      <option value=user_edit>user edit
      <option value=shop_edit>shop edit
      </select>


      <input type=submit value=Go.!>
      </td>
      </form>


      <td bgcolor=black >
      <form method=post action=db_view.php>
      <input type=hidden name=chanl value=shop_edit>
      <select name=sel>
      <option value=1 selected>ÀüÀÚÁ¦Ç°
      <option value=2>ÀÇ·ù
      <option value=3>À½¾Ç
      <option value=4>Ã¥
      </select>


      <input type=submit value=Go.!>
      </td>
      </form>
      </tr>
      </table>
      </center>
      </html>
      ");
    }


    function pd_edit($connect,$sel,$pn,$selx,$contx)
    {

      mysql_select_db('shop',$connect);


      $ally = mysql_query("select pdname,price,cont,sel from pduct where sel='$sel'
      and pdname='$pn'",$connect);


      $put = mysql_fetch_array($ally);


      echo("
      <html>
      <title>
      pdname_edit html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>


      <form method=post enctype=multipart/form-data action=db_view.php>
      <input type=hidden name=chanl value=shop_query2>
      <input type=hidden name=pn value=$pn>
      <input type=hidden name=sel value=$sel>
      <input type=hidden name=selx value='$put[sel]'>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=checkbox name=contx value=cont>¼öÁ¤(ÇØ´ç Ç׸ñÀ» ¼öÁ¤ÇÒ °æ¿ì)</font>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Price</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=price size=10 value='$put[price]'></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Pdname</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=text name=pdname size=24 value='$put[pdname]'></font></td>
      </tr>
      <tr>


      <td bgcolor=black>
      <img src=sajin.php?sel=$sel&pdname=$put[pdname] border=0>
      </td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~¿øº» È­ÀÏ ÀÔ´Ï´Ù. ¾Æ·¡ ¼öÁ¤ÇÒ È­ÀÏÀ» ¿Ã¸®¼¼¿ä.</b></font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~File Change</b></font></td>


      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=file name=upfile size=14>
      <input type=checkbox name=poto value=edit_poto>±×¸² ¼öÁ¤
      </font></td>
      </tr>
      <tr>


      <td bgcolor=#808080><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>~Content</b></font></td>
      <td bgcolor=black><font style='font-size:13px;font-style:italic;color:#fffff0'>
      <textarea name=cont rows=5 cols=20 >$put[cont]</textarea>
      </font></td>
      </tr>
      <tr>


      <td bgcolor=black align=center colspan=4>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <input type=submit value=shopEdit>
      <input type=reset  value=Re></font></td>
      </tr>
      </table>
      </form>
      </center>
      </body>
      </html>
      ");
    }

    ?>

¼Ò½º ¼³¸í

    db_func_all.php ÆÄÀÏÀº ÇÔ¼öµé·Î ±¸¼ºµÇ¾î ÀÖÀ¸¸ç °¢ È­¸éÀ» Ç¥Çö ÇÕ´Ï´Ù.
    db_view.php ÆÄÀÏÀ» ÀÌ¿ëÇؼ­ ÇÔ¼ö¸¦ ´Ù¾çÇÑ ¹æ¹ýÀ¸·Î »ç¿ëÇÕ´Ï´Ù.

main($page,$connect,$select,$dbs,$tableput,$root) ÇÔ¼ö

    admin ¿µ¿ªÀÇ µ¥ÀÌÅÍ º£À̽º ¸ÞÀÎ ÇÔ¼ö ÀÔ´Ï´Ù.
    ¿©·¯ admin¿µ¿ª Áß µ¥ÀÌÅͺ£À̽ºÀÇ ¸ÞÀÎÈ­¸éÀ» º¸¿©ÁÖ¸ç ¿©·¯°¡Áö Å×À̺í ÀÎÀÚ¿¡ ÀÇÇØ È­¸éÀÌ ´Þ¶óÁý´Ï´Ù.
    Áï, µ¥ÀÌÅͺ£À̽º admin Áß µ¥ÀÌÅÍ º£À̽º ºÎºÐ°ú Å×ÀÌºí ºÎºÐ µîÀÇ È­¸éÀ» ÀÌ ÇÔ¼ö·Î ó¸® ÇÕ´Ï´Ù.

ÇÔ¼ö ÀÎÀÚ

    $connect = mysql_connect('localhost','root','gksmf444');
    /* mysql¿¡ Á¢¼ÓÇϱâ À§ÇÑ È£½ºÆ®¿Í °èÁ¤ , Æнº¿öµå¸¦ ÀÔ·Â ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù. */

 
    function main($page,$connect,$select,$dbs,$tableput,$root)
    {

    $page - µ¥ÀÌÅÍ º£À̽º adminÀÇ ÇØ´ç ÆäÀÌÁö¸¦ Àü´Þ ÇÕ´Ï´Ù. 
    $connect - µ¥ÀÌÅÍ º£À̽º Á¢¼Ó ÀÎÀÚµéÀ» Àü´Þ ÇÕ´Ï´Ù.
    $select - µ¥ÀÌÅÍ º£À̽º adminÀÇ °¢ È­¸éÀ» ¼³Á¤ ÇÏ´Â ºÎºÐÀ̸ç ÀÌ º¯¼ö¸¦ ÀÌ¿ëÇؼ­ Å×À̺í È­¸é ,
              Çʵå È­¸é , µ¥ÀÌÅÍ º£À̽º ¸®½ºÆ® È­¸é µîÀ» ±¸ºÐ ÇÕ´Ï´Ù.
    $dbs - µ¥ÀÌÅÍ º£À̽º À̸§À» Àü´Þ ÇÕ´Ï´Ù. ÀÌ º¯¼ö¸¦ »ç¿ëÇؼ­ È­¸é¿¡ ¼±ÅÃÇÑ µ¥ÀÌÅÍ º£À̽º¸¦ º¸¿© ÁÝ´Ï´Ù.
    $tableput - Å×À̺í À̸§À» Àü´Þ ÇÕ´Ï´Ù. 
    $root - admin ÀÇ ÄíÅ°¸¦ Àü´Þ ÇÕ´Ï´Ù. 

È­¸é Ãâ·Â ¼±Åà Çϱâ

    $select, $dbs, $tableput º¯¼ö¸¦ ÀÌ¿ëÇؼ­ µ¥ÀÌÅÍ º£À̽º admin ¸ÞÀÎ È­¸éÀÇ Ãâ·ÂÀ» °áÁ¤ ÇÕ´Ï´Ù.
    óÀ½ µ¥ÀÌÅÍ º£À̽ºÀÇ ¸®½ºÆ®¸¦ º¸¿©ÁÖ¸ç ƯÁ¤ µ¥ÀÌÅÍ º£À̽º¸¦ ¼±ÅÃÇÒ °æ¿ì Å×À̺íÀ» º¸¿© ÁÖ°í ƯÁ¤
    Å×À̺íÀ» ¼±ÅÃÇϸé Çʵå Á¤º¸¸¦ ³ª¿­ ÇÕ´Ï´Ù.
    ÀÌ ¸ðµç °ÍÀÌ ¸ÞÀÎ ÇÔ¼ö¿¡¼­ ÀÌ·ç¾î Áö±â À§ÇØ °¢ º¯¼öÀÇ Àü´Þ ÀÎÀÚ¿¡ µû¸¥ È­¸é ±¸¼ºÀ» ÇØ¾ß ÇÕ´Ï´Ù.


    if($select == tables)
    {
    /* $select °¡ tablesÀÏ °æ¿ì µ¥ÀÌÅÍ º£À̽º admin È­¸éÀº ÇØ´ç µ¥ÀÌÅÍ º£À̽º¿¡ Á¸ÀçÇÏ´Â Å×À̺íÀ» º¸¿© ÁÝ´Ï´Ù. */


      mysql_select_db($dbs,$connect);
      /* $dbsÀÇ µ¥ÀÌÅÍ º£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù. */


      $ally = mysql_query("show tables ",$connect);
      /* ÇØ´ç µ¥ÀÌÅÍ º£À̽º¿¡ Á¸ÀçÇÏ´Â Å×À̺íÀ» °Ë»ö ÇÕ´Ï´Ù. */


      $t = "Table($dbs Db) hong il mansei~!";
      /* $t º¯¼ö¿¡ ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ À̸§À» ÀúÀå ÇÕ´Ï´Ù. */


      $link = "<a href=db_view.php?chanl=create_table&dbs=$dbs>";
      /* $link º¯¼ö¿¡ ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ »õ·Î¿î Å×ÀÌºí »ý¼º Ç׸ñÀ» ¸µÅ© ÇÕ´Ï´Ù. */


      $linkdel = "<a href=db_view.php?chanl=dbdel&dbs=$dbs>";
      /* $linkdel º¯¼ö¿¡ ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ »èÁ¦ Ç׸ñÀ» ¸µÅ© ÇÕ´Ï´Ù. */
    }


    if(!$select)
    {
      $ally = mysql_query("show databases ",$connect);
      /* $select Ç׸ñÀÌ ¾øÀ» °æ¿ì $ally º¯¼ö¿¡ Á¸Àç ÇÏ´Â µ¥ÀÌÅÍ º£À̽º ¸®½ºÆ®¸¦ ÀúÀå ÇÕ´Ï´Ù.*/
      $t = "Database Names hong il mansei~!" ;
      /* $t º¯¼ö¿¡ admin ¿µ¿ª Ãâ·Â ºÎºÐ¿¡ º¸¿©ÁÙ ¹®±¸¸¦ ÀúÀå ÇÕ´Ï´Ù. ÀÌ ºÎºÐÀº ´Ù¸¥ ±â´ÉÀ» Ãß°¡ÇÒ ¼ÒÁö°¡ ÀÖ½À´Ï´Ù. */


      $link = "<a href =db_view.php?chanl=create_db>";
      /* $link º¯¼ö¿¡ »õ·Î¿î µ¥ÀÌÅÍ º£À̽º »ý¼º Ç׸ñÀ» ¸µÅ© ÇÕ´Ï´Ù. */
    }


    if($select == field)
    {
    /* $select º¯¼ö°¡ fieldÀ̸é ÇØ´ç Å×À̺íÀÇ Çʵå Á¤º¸¸¦ Ãâ·Â ÇÕ´Ï´Ù. */


      mysql_select_db($dbs,$connect);
      /* ÇØ´ç µ¥ÀÌÅÍ º£À̽º¸¦ ¼±Åà ÇÕ´Ï´Ù. */


      $ally = mysql_query("describe $tableput " , $connect);
      /* ¼±ÅÃÇÑ Å×À̺íÀÇ ÇÊµå ¼Ó¼ºÀ» °Ë»öÇÏ°í $ ally º¯¼ö¿¡ ÀúÀå ÇÕ´Ï´Ù. */


      $link1 = "<b><a href =db_view.php?chanl=main&select=tables&dbs=$dbs>
      /* $link1 º¯¼ö¿¡ ÇØ´ç Å×À̺í Ç׸ñÀ» ¸µÅ© ÇÕ´Ï´Ù. */


      ($dbs Db)</b></a> ";
      /* ÇØ´ç µ¥ÀÌÅÍ º£À̽º À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */


      $link2 = "<b>($tableput Table)</b>";
      /* $link2 º¯¼ö¿¡ ÇØ´ç Å×À̺í À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */
    }

µ¥ÀÌÅÍ º£À̽º admin È­¸é ¼±ÅÃ

    µ¥ÀÌÅÍ º£À̽º admin ¸ÞÀÎ È­¸é¿¡¼­ $select º¯¼ö¿¡ µû¶ó ¸ÞÀÎ È­¸éÀÌ ´Þ¶ó Áö´Âµ¥ $select º¯¼ö °ªÀÌ
    fieldÀÏ °æ¿ì ÇØ´ç Å×À̺íÀÇ Çʵå¼Ó¼ºÀ» º¸¿©ÁÖ´Â Ç׸ñÀ» ³ª¿­ ÇÕ´Ï´Ù.


    if($select == field)
    {
    /* $select º¯¼ö°¡ fieldÀÏ °æ¿ì ÇØ´ç Å×À̺íÀÇ ÇÊµå ¼Ó¼º Á¦¸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */

      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=700 >
      <tr>
      <th bgcolor=white colspan=7 align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      /* Å×À̺í Çʵå Ç׸ñ¿¡¼­ ÆäÀÌÁö ÇöȲÀ» Ãâ·Â ÇÕ´Ï´Ù. */
      </tr>
      <tr>


      <td bgcolor=#808080 width=150>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Field</b></font></td>


      <td bgcolor=#808080 width=200 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Type</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Null</b></font></td>


      <td bgcolor=#808080 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Key</b></font></td>


      <td bgcolor=#808080 width=50 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Default</b></font></td>


      <td bgcolor=#808080 width=150 align=center>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>Extra</b></font></td>
      </tr>
      /* ÇØ´ç Å×À̺íÀÇ ÇÊµå ¼Ó¼ºÀÇ À̸§À» Ãâ·Â ÇÕ´Ï´Ù. Â÷·Ê·Î Field , Type , Null , Key , Default , Extra  µîÀÌ ÀÖ½À´Ï´Ù. */
      ");
    }
    else
    {
    /* ±× ¹ÛÀÇ °æ¿ì µ¥ÀÌÅÍ º£À̽º ¸®½ºÆ®¿Í Å×ÀÌºí ¸®½ºÆ®¸¦ ³ª¿­ ÇÕ´Ï´Ù. */
      echo("
      <html>
      <title>
      main_view html
      </title>
      <body bgcolor=black>
      <center>
      <img src=skyt1.jpg border=0>
      <br>
      <table border=0 cellspacing=2 cellpadding=2 width=500 >
      <tr>
      <th bgcolor=white align=left>
      <font style='font-size:12px;font-style:italic;color:#blue'>
      <b>$t_page / $page </b></font></th>
      /* ÇØ´ç È­¸éÀÇ ÆäÀÌÁö ÇöȲÀ» Ãâ·Â ÇÕ´Ï´Ù. */
      </tr>
      <tr>
      <td bgcolor=#808080 width=450>
      <font style='font-size:13px;font-style:italic;color:#fffff0'>
      <b>$t</b></font></td></tr>
      ");
    }

µ¥ÀÌÅÍ º£À̽º admin °¢ ¸ÞÀÎ È­¸éÀÇ ¸®½ºÆ® ³ª¿­ ºÎºÐ

    µ¥ÀÌÅÍ º£À̽º admin °¢ ¸ÞÀÎ È­¸éÀº $select º¯¼ö °ª¿¡ µû¶ó Çʵå Á¤º¸¿Í µ¥ÀÌÅÍ º£À̽º ¸®½ºÆ® , Å×À̺í
    ¸®½ºÆ® µîÀ¸·Î º¯ÇÕ´Ï´Ù.
    °¢ Ç׸ñÀÇ ¸®½ºÆ®¸¦ Ãâ·ÂÇÏ´Â ºÎºÐÀ̸ç for¹®À» ÀÌ¿ë ÇÕ´Ï´Ù. ÀÌ°ÍÀº °¢ °Ô½ÃÆÇ¿¡ »ç¿ëÇÑ ¹æ¹ý°ú °°½À´Ï´Ù. */



    for($pd=$start_num ; $pd > $start_num-$p_dip ; $pd--)
    {
    /* µ¥ÀÌÅÍ º£À̽º °Ë»ö °á°ú¿¡¼­ ÆäÀÌÁö ÇÒ´ç ¸¸Å­ Ãâ·Â ÇÕ´Ï´Ù. */


      if($pd >= 0 )
      {
      /* $pd°¡ - Á¤¼ö°¡ ¾Æ´Ò °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */


        mysql_data_seek($ally,$pd);
        /* ·¹ÄÚµå À§Ä¡¸¦ ¿Å±é´Ï´Ù. */

        $db=mysql_fetch_array($ally);
        /* ÇØ´ç ·¹ÄÚµåÀÇ Á¤º¸¸¦ $db º¯¼ö¿¡ ¹è¿­·Î ÀúÀå ÇÕ´Ï´Ù. */


        if(!$select)
        {
        /* $select °ªÀÌ ¾øÀ» °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */
          echo("
          <tr>
          <td bgcolor=black>
          <a href ='db_view.php?chanl=main&dbs=$db[Database]&select=tables'>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Database]</b></font></a></td>
          /* Á¸Àç ÇÏ´Â µ¥ÀÌÅÍ º£À̽º À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */
          ");
        }


        if($select == tables)
        {
        /* $select º¯¼ö°¡ tablesÀÏ °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */

          echo("
          <tr>
          <td bgcolor=black>
          <a href ='db_view.php?chanl=main&dbs=$dbs&select=field&tableput=$db[0]'>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[0]</b></font></a></td>
          /* ÇØ´ç µ¥ÀÌÅÍ º£À̽ºÀÇ Å×À̺í À̸§À» Ãâ·Â ÇÕ´Ï´Ù. */
          ");
        }


        if($select == field)
        {
        /* $select °ªÀÌ fieldÀÏ ¶§ ½ÇÇà ÇÕ´Ï´Ù. */

          echo("
          <tr>
          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Field]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Çʵå Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Type]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Type Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Null]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Null Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Key]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Key Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */

          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Default]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Default Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */


          <td bgcolor=black>
          <font style='font-size:13px;font-style:italic;color:#fffff0'>
          <b>$db[Extra]</b></font></a></td>
          /* ÇØ´ç Å×À̺íÀÇ Extra Ç׸ñÀ» Ãâ·Â ÇÕ´Ï´Ù. */
          ");
        }
      }

µ¥ÀÌÅÍ º£À̽º admin ÆäÀÌÁö ¸µÅ©

    µ¥ÀÌÅÍ º£À̽º admin ¸ÞÀÎ È­¸é¿¡¼­ ÆäÀÌÁö·ÎÀÇ ¸µÅ©¸¦ ¼³Á¤ ÇÏ´Â ºÎºÐ ÀÔ´Ï´Ù.


    for($pp=$pt_page ; $pp < $p_page+$pt_page ; $pp++)
    {
    /* ÇÑ ÆäÀÌÁö´ç ¼³Á¤µÈ ÆäÀÌÁö ¸µÅ© ¼ö ¸¸Å­ »ý¼º ÇÕ´Ï´Ù. */


      if($pp == $page )
      {
      /* $pp º¯¼ö °ªÀÌ ÇöÀç ÆäÀÌÁö ¼ö¿Í °°À» °æ¿ì ½ÇÇà ÇÕ´Ï´Ù. */


        echo ("
        <font style='font-size:13px;font-style:italic;color:red'>
        $pp</font>
        /* ÇöÀçÀÇ ÆäÀÌÁö¸¦ Ãâ·Â ÇÕ´Ï´Ù. */
        ");
      }
      else
      {
        if($pp > 0  && $pp <= $t_page)
        {
        /* ÇöÀç ÆäÀÌÁö ¼ö°¡ 0 º¸´Ù Å©°í ÃÑ ÆäÀÌÁö ¼öº¸´Ù À۰ųª °°¾Æ¾ß ½ÇÇà ÇÕ´Ï´Ù. */
          if(!$select)
          {
            echo("
            <a href =db_view.php?chanl=main&page=$pp>
            <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
          } 
          /* $select °ªÀÌ ¾øÀ» °æ¿ì µ¥ÀÌÅÍ º£À̽º ¸®½ºÆ® Ç׸ñ ÆäÀÌÁö ¸µÅ©¸¦ ¸¸µì´Ï´Ù. */
          if($select == tables)
          {
            echo("
            <a href =db_view.php?chanl=main&page=$pp&dbs=$dbs&select=tables>
            <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
            /* $select °ªÀÌ tables ÀÏ ¶§ ÇØ´ç µ¥ÀÌÅÍ º£À̽º Å×ÀÌºí ¸®½ºÆ® ÆäÀÌÁö ¸µÅ©¸¦ ¸¸µì´Ï´Ù.*/
          }


          if($select == field)
          {
            echo("
            <a href =db_view.php?chanl=main&page=$pp
            &dbs=$dbs&select=field&tableput=$tableput>
            <font style='font-size:12px;font-style:italic;color:#808080'>[$pp]</font></a>");
            /* $select °ªÀÌ field ÀÏ ¶§ ÇØ´ç Å×À̺í Çʵå Ç׸ñÀ» ÆäÀÌÁö ¸µÅ© ÇÕ´Ï´Ù. */
          }
        }
      }
    }


    ´ÙÀ½ ÀåÀº  µ¥ÀÌÅÍ º£À̽º¸¦ À¥»ó¿¡¼­ ¼öÁ¤ ÀÛ¾÷ ÇÏ´Â ¹æ¹ýÀ» °£´ÜÈ÷ ¼Ò½º¿Í ÇÔ²² ¼³¸í ÇÕ´Ï´Ù.

´ÙÀ½ ÀÌÀü Â÷·Ê