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= " ";¢Ò
91 : formdump();¢Ò
92 : formclose();¢Ò
93 : return;¢Ò
|