File name: welboard2/include/notice.sub (2,914 bytes) Text file viewer v1.2
    1 : /* file: notice.sub
    2 : 
    3 :    공지사항 부 프로그램 (author: 서광현)
    4 : 
    5 :    Copyright (c) 2001/03/25 by Wesoft
    6 :    All Rights Reserved.
    7 : */
    8 : 
    9 : if(db=="") not_exist= 1;
   10 :  else
   11 :   {
   12 :      conf_file= "conf/" ~ db ~ ".conf";
   13 :      if(!fexist(conf_file)) not_exist= 2;
   14 :       else
   15 :        {
   16 :           not_exist= 0;
   17 :           include(conf_file, -1); // 환경파일 손상시 에러 처리 하지 않음
   18 :        }
   19 :   }
   20 : if(not_exist!=0)
   21 :  {
   22 :      MSG1= prg_title ~ " 명칭 오류";
   23 :      if(not_exist==1) MSG2= prg_title ~ " 이름이 없습니다!";
   24 :        else MSG2= "<font color=#0000c0>" ~ db ~ "</font> " ~ prg_title
   25 :                 ~ "이 만들어지지 않았거나 환경파일이 없습니다!";
   26 :      MSG2~= BACK_BUTTON;
   27 :      formdump(message_form);
   28 :      return;
   29 :  }
   30 : if(len(sk)>0) sk= val(sk); else sk= skin_code;
   31 : if(sk<0) sk= 0; else if(sk>=skin_cnt) sk= skin_cnt - 1;
   32 : skin= "skin/" ~ skin_dir[sk] ~ "/";
   33 : if(ignore_center==1) scenter= ecenter= "";
   34 :  else scenter= "<center>", ecenter= "</center>";
   35 : if(board_background=="") background= "bgcolor='" ~ board_bgcolor ~ "'";
   36 :  else background= "background='" ~ board_background ~ "'";
   37 : if(view_board==0) viewboard_flag= ""; else viewboard_flag= "1";
   38 : 
   39 : fm= formopen(skin~"notice.fom");
   40 : if(fm==FORM_OPENERR) return err_form("notice.fom");
   41 : 
   42 : tot_recnt= get_recount(mytable, "");
   43 : if(tot_recnt<0)
   44 :  {
   45 :      MSG1= prg_title ~ " 명칭 오류";
   46 :      MSG2= prg_title ~ " 이름이 없거나 만들어지지 않았습니다!"
   47 :          ~ BACK_BUTTON;
   48 :      formdump(message_form);
   49 :      return;
   50 :  }
   51 : qstr= "select selno,answer,subject,content,wdtime from " ~ mytable
   52 :     ~ " order by grpno desc, answer asc limit 0," ~ pagerec;
   53 : if( (rt=mysql_getrecord(qstr,"")) < 0 ) return;
   54 : vno= tot_recnt;
   55 : fcontent_fch= "<&|[HTML]|[/HTML]";
   56 : fcontent_rch= "<||";
   57 : while(rt>0)
   58 :  {
   59 :     wdate= left(wdtime, 10);
   60 :     wdtime= left(mid(wdtime, 6), 5);
   61 :     if(list_few_content==1)
   62 :      {
   63 :         temp= ltrim(left(content, 1024));
   64 :         if(accept_html==2) temp= strchange(temp, fcontent_fch, fcontent_rch);
   65 :         if(accept_html==0) fcontent= left(temp, 151) ~ " "; // 한글 깨짐 방지
   66 :           else fcontent= htmldeltag(temp, 151) ~ " "; // 한글 깨짐 방지
   67 :         if(len(fcontent)>150) fcontent= left(fcontent, 150, 1) ~ "...";
   68 :         fcontent= strchange(fcontent, "'", "`");
   69 :      }
   70 :     if(answer=="") IconFile= "posted.gif"; else IconFile= "answer.gif";
   71 :     IconRemark= vno ~ "번(등록번호: " ~ selno ~ ")";
   72 :     icon= "<img src='icon/"~IconFile~"' title='"~IconRemark~"'> ";
   73 :     dots= 0;
   74 :     if(trunc>0)
   75 :      {
   76 :         if(len(subject)>trunc) subject= left(subject, trunc, 1), dots= 1;
   77 :      }
   78 :     subject= strchange(subject, html_fch, html_rch);
   79 :     if(dots==1) subject~= "<font color=#f00000>...</font>";
   80 :     if(newcolor!="off")
   81 :      {
   82 :        if(wdate>=bf_date)
   83 :          subject= "<font color=" ~ newcolor ~ ">" ~ subject ~ "</font>";
   84 :      }
   85 :     formmerge(0);
   86 :     vno--;
   87 :     if( (rt=mysql_nextrecord())==MYSQL_ERR ) return;
   88 :  }
   89 : icon= subject= "";
   90 : wdtime= "&nbsp;";
   91 : formdump();
   92 : formclose();
   93 : return;
File name: welboard2/include/notice.sub (2,914 bytes) Wesoft Corp. ⓒ 2001 All rights reserved.