| 1 |
/*******************************************************/ |
/*******************************************************/ |
| 2 |
/* */ |
/* */ |
| 3 |
/* LeafOK Innd */ |
/* LeafOK Innbbsd */ |
|
/* Copyright (C) LeafOK.com, 2003-2004 */ |
|
| 4 |
/* */ |
/* */ |
| 5 |
/* Programmed by Leaf */ |
/* Copyright (C) LeafOK.com, 2003-2008 */ |
|
/* E-mail:leaf@leafok.com QQ:6049044 */ |
|
| 6 |
/* */ |
/* */ |
| 7 |
/* http://bbs.leafok.com */ |
/* http://www.leafok.com */ |
|
/* http://bbs.leafok.net */ |
|
|
/* http://bbs.fenglin.info */ |
|
| 8 |
/* */ |
/* */ |
| 9 |
/*******************************************************/ |
/*******************************************************/ |
| 10 |
|
|
| 81 |
{ |
{ |
| 82 |
tag_result="]"; |
tag_result="]"; |
| 83 |
} |
} |
| 84 |
|
if (tag_str == "image") |
| 85 |
|
{ |
| 86 |
|
tag_result=tag_arg; |
| 87 |
|
} |
| 88 |
if (tag_str == "bwf") |
if (tag_str == "bwf") |
| 89 |
{ |
{ |
| 90 |
tag_result="****"; |
tag_result="****"; |
| 100 |
} |
} |
| 101 |
} |
} |
| 102 |
if (p_start-p_current>0) |
if (p_start-p_current>0) |
| 103 |
result_str = result_str + source_str.Mid(p_current,p_start-p_current) + tag_result; |
result_str = result_str + source_str.Mid(p_current,p_start-p_current); |
| 104 |
else |
result_str += tag_result; |
|
result_str += tag_result; |
|
| 105 |
p_current=p_end+1; |
p_current=p_end+1; |
| 106 |
} |
} |
| 107 |
else |
else |
| 117 |
return result_str; |
return result_str; |
| 118 |
} |
} |
| 119 |
|
|
| 120 |
CString BBS_fun::ip_mask(const CString& ip) |
CString BBS_fun::ip_mask(const CString& ip, int level) |
| 121 |
{ |
{ |
| 122 |
int dot_pos; |
int dot_pos; |
| 123 |
|
|
| 124 |
dot_pos=ip.Find('.'); |
switch(level) |
| 125 |
if (dot_pos == -1) |
{ |
| 126 |
return CString(); |
case 0: |
| 127 |
|
return ip; |
| 128 |
dot_pos=ip.Find('.',dot_pos+1); |
case 1: |
| 129 |
if (dot_pos == -1) |
dot_pos=ip.Find('.'); |
| 130 |
return CString(); |
if (dot_pos == -1) |
| 131 |
|
return CString(); |
| 132 |
return (ip.Left(dot_pos+1) + "*.*"); |
return (ip.Left(dot_pos+1) + "*"); |
| 133 |
|
case 2: |
| 134 |
|
dot_pos=ip.Find('.'); |
| 135 |
|
if (dot_pos == -1) |
| 136 |
|
return CString(); |
| 137 |
|
dot_pos=ip.Find('.',dot_pos+1); |
| 138 |
|
if (dot_pos == -1) |
| 139 |
|
return CString(); |
| 140 |
|
return (ip.Left(dot_pos+1) + "*.*"); |
| 141 |
|
} |
| 142 |
|
return ip; |
| 143 |
} |
} |
| 144 |
|
|
| 145 |
CString BBS_fun::FB2TXT(CString source_str) |
CString BBS_fun::FB2TXT(CString source_str) |