1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
|
<?php include_once("./_common2.php"); ?> <?php include("./Page/common/header.php"); ?> <?php
// ¸î¸íÀÌ ÀÌ ÆäÀÌÁö¿¡ µé¾î¿Ô´ÂÁö Ä«¿îÆÃ if($_SERVER['REMOTE_ADDR']!='58.151.27.172' && $_SERVER['REMOTE_ADDR']!='115.138.35.2' && $_SESSION['realtime_cnt_flg'] != "1"){ // »ç³»ÀÇ ´ë±¸, ¼¿ï ¾ÆÀÌÇǰ¡ ¾Æ´Ò °æ¿ì¿¡¸¸
$today = date("Y-m-d"); // ¿À´Ã³¯Â¥ $time = date("H"); $page = basename($_SERVER['PHP_SELF']); if(end(explode('.', basename($_SERVER['PHP_SELF']))) == "php") { $sql = "SELECT * FROM mBoard_page_count WHERE inflow_date = '{$today}' AND page = '{$page}' ORDER BY inflow_time DESC"; $res = mysql_query($sql,$connect_web); $row = mysql_fetch_array($res);
if(!$row || $row['inflow_time'] != $time){ // µ¥ÀÌÅͰ¡ ¾øÀ» ¶§ $insertsql = "INSERT INTO mBoard_page_count(inflow_date, inflow_time, count, page, page_kr) VALUES ('{$today}', '{$time}', 1, '{$page}', '±¸¸Å»ó´ã/¼ºñ½º ÁøÇàÇöȲ')"; mysql_query($insertsql,$connect_web); } else { // µ¥ÀÌÅͰ¡ ÀÖÀ» ¶§ $updatesql = "UPDATE mBoard_page_count SET count = count+1 WHERE inflow_date = '{$today}' AND inflow_time = '{$time}' AND page = '{$page}'"; mysql_query($updatesql,$connect_web); } }
$_SESSION['realtime_cnt_flg'] = "1"; }
?>
<?php
$DB_HOST = "114.108.136.196"; $DB_USER = "mj_inhouse_web"; $DB_PWD = "m897461z"; $DB_NAME = "mj_inhouse";
include('../manage/category/class_db.php');
$connect_web = @mysql_connect($DB_HOST,$DB_USER,$DB_PWD); @mysql_select_db( $DB_NAME,$connect_web);
$today = date('Y-m-d'); $time = time(); $beforeyear = date("Y-m-d",strtotime("6month ago", $time));
$total_sql = "SELECT count(bb.sdate) as cnt FROM ( SELECT sdate FROM jangbu_tellist AS a LEFT JOIN jangbu_maechul AS b ON a.cname = b.name WHERE a.sdate BETWEEN '{$beforeyear}' AND '{$today}' AND a.stime > '09:00:00' AND a.stime < '18:00:00' AND a.stime NOT BETWEEN '12:00:00' AND '13:00:00' AND cname NOT LIKE '%¿À»ó¸ñ%' AND cname NOT LIKE '%¹ÌÁø¼ÒÇÁÆ®%' AND cname NOT LIKE '%¿¥Á¦À̼ÒÇÁÆ®%' /*GROUP BY cname*/ ) bb;";
$cm_nCount = 30; $cm_item_nCount = 30;
$total_res = mysql_query($total_sql,$connect_web); $total_count = mysql_fetch_array($total_res); $nPage = ceil((int)$total_count['cnt'] / $cm_nCount);
// ±Û¹øÈ£¿ë $idx = (int)$total_count['cnt']; if($pg != "" && $pg != 1) { $idx = $idx - (($pg - 1)*$cm_nCount); }
if ($pg == "") $pg = 1; $nFrom = ($pg - 1) * $cm_nCount;
$sql = "SELECT a.seq, /*a.sdate, min(a.stime) as stime, a.etime, a.cname, */ a.sdate, a.stime, a.etime, a.cname, IFNULL(b.`status`,'µµ¼Ò¸Å') AS status_r, IFNULL(b.item,'') AS item_r, a.sdam, a.bigo, a.complete FROM jangbu_tellist AS a LEFT JOIN jangbu_maechul AS b ON a.cname = b.name WHERE a.sdate BETWEEN '{$beforeyear}' AND '{$today}' AND a.stime > '09:00:00' AND a.stime < '18:00:00' AND a.stime NOT BETWEEN '12:00:00' AND '13:00:00' AND cname NOT LIKE '%¿À»ó¸ñ%' AND cname NOT LIKE '%¹ÌÁø¼ÒÇÁÆ®%' AND cname NOT LIKE '%¿¥Á¦À̼ÒÇÁÆ®%' /*GROUP BY cname, sdate*/ ORDER BY sdate DESC, stime DESC LIMIT $nFrom, $cm_nCount";
//echo $sql;
$res = mysql_query($sql,$connect_web);
if(!$res) { echo mysql_error(); }
while($info=mysql_fetch_array($res)){ $list_arr[] = $info; }
// ÇÑÆäÀÌÁö¿¡ º¸¿©ÁÙ Çà, ÇöÀçÆäÀÌÁö, ÃÑÆäÀÌÁö¼ö, URL function pageListing($cur_page, $total_page, $url , $cm_nCount ) { $retValue = "<div class='paging'>"; if ($cur_page > 1) {
$retValue .= "<a href='" . $url . ($cur_page-1) ."' class='page'><span class='next'>ÀÌÀü</span></a>"; } else { $retValue .= ""; $retValue .= ""; }
$retValue .= "";
$start_page = ( ( (int)( ($cur_page - 1 ) / 10 ) ) * 10 ) + 1;
$end_page = $start_page + 9; if ($end_page >= $total_page) $end_page = $total_page; if ($start_page > 1) $retValue .= "<a href='" . $url . ($start_page-1) . "' class='page'><span class='next10'>ÀÌÀü 10°³</span></a>";
if ($total_page > 1) for ($k=$start_page;$k<=$end_page;$k++) if ($cur_page != $k) $retValue .= "<a href='$url$k'>$k</a>"; else $retValue .= "<a href='$url$k' class='on'>$k</a>";
if ($total_page > $end_page) $retValue .= "<a href='" . $url . ($end_page+1) . "' class='page'><span class='pro10'>´ÙÀ½ 10°³</span></a>";
$retValue .= "";
if ($cur_page < $total_page) { $retValue .= "<a href='$url" . ($cur_page+1) ."' class='page'><span class='pro'>´ÙÀ½</span></a>";
} else { $retValue .= ""; $retValue .= ""; }
$retValue .= "</div>"; return $retValue; }
?>
<style> tr { height: 40px; } /* td { border: 1px solid #eee; } */ th, td { text-align: center; }
.review_detail_tit{height:263px;} .review_detail_tit{background:url('./img/customer/board_title/realtime_counsel_tit2-2.png') center no-repeat;}
#main_section{width: 1100px;margin: 0 auto;padding: 60px 0 40px;} #main_section > .paging{margin-top: 40px;} .counsel_tit{font-size: 32px;font-weight: 600;line-height: 32px;color: #424242;text-align: center;margin-bottom: 40px;}
#counsel_box thead tr th{font-size: 16px;font-weight: 600;color: #fff;background: #424242;padding: 30px 0px;} #counsel_box thead tr th:first-child{border-radius: 12px 0px 0px 12px;} #counsel_box thead tr th:last-child{border-radius: 0px 12px 12px 0px;} #counsel_list_box td{font-size:13px;padding: 30px 0px;} #counsel_list_box td em{font-weight: 600;} #counsel_list_box td:nth-child(2){font-weight: 600;} #counsel_list_box tr{border-bottom: 1px dashed #e9e3e2;} #counsel_list_box tr em{font-weight: 600;} </style>
<div class="review_detail_tit"></div> <div id="main_section" style="position: relative;"> <p class="counsel_tit">±¸¸Å»ó´ã/¼ºñ½º ÁøÇàÇöȲ</p> <span style="position: absolute;right: 30px;top: 105px;font-size: 16px;font-weight: 600;color: #424242;"> »ó´ã°Ç¼ö(ÃÖ±Ù6°³¿ù) : <?php echo number_format($total_count['cnt']); ?>°Ç </span> <input type='hidden' name='etime_val' value=''> <input type='hidden' name='stime_val' value=''> <input type='hidden' name='idx' value=''> <table id="counsel_box"> <thead> <tr> <th style="width:150px;">¼ø¹ø</th> <th style="width:200px;">»óÈ£</th> <th style="width:150px;">¾÷Á¾</th> <th style="width:150px;">»ó´ã³»¿ë</th> <th style="width:200px;">Á¢¼ö½Ã°£</th> <th style="width:200px;">¿Ï·á½Ã°£</th> <th style="width:100px;">´ã´çÀÚ</th> <th style="width:150px;">°á°ú</th> </tr> </thead> <tbody id="counsel_list_box" class="counsel_list counsel_list_box"> <tr id="100" style="height: 0px;border: 0px;"></tr><!--ÀÌ trű׿¡ css¸¦ ÀÔÈú¶§´Â id¸íÀ¸·Î css¸¦ ÁöÁ¤ÇØÁÖ¼¼¿ä.--> <?php for($i=0; $i<count($list_arr); $i++){ $list = $list_arr[$i];
$list['ori_cname'] = $list['cname']; if($list['cname'] == '¿¥Á¦À̼ÒÇÁÆ®') {$list['cname'] = "»ç¾÷ÀÚ°³¼³Àü";}
//»ó´ã³»¿ë ±ÛÀÚ ¼ö ÁÙÀ̱â $bigo = mb_strimwidth($list['bigo'],0,60,"...","euc-kr");
//»óÈ£¸í ±ÛÀÚ ¼ö ÁÙÀ̱â $sangho_leng = mb_strlen($list['cname'], 'euc-kr'); $sangho_leng = ceil($sangho_leng/2);
$star = ""; for($s=0; $s<$sangho_leng; $s++){ $star .= "*"; }
$sangho = mb_substr($list['cname'], '0', $sangho_leng, 'euc-kr').$star;
// »óÈ£¸íÀÌ ºñ¾îÀÖ´Â °æ¿ì if($sangho == "") { $sangho = "»ç¾÷ÀÚ°³¼³Àü"; } //´ã´çÀÚ->ÆÀÀ¸·Î ġȯ $team = ""; switch($list['sdam']) { case "¿À»ó¸ñ": $team = "»ó´ã1ÆÀ"; break; case "±Çâ±Ô": $team = "»ó´ã2ÆÀ"; break; case "È«Àç¿ø": $team = "»ó´ã3ÆÀ"; break; case "À̽Âȯ": $team = "»ó´ã4ÆÀ"; break; case "¿©¿íµ¿": $team = "»ó´ã5ÆÀ"; break; case "ȲÀçÇö": $team = "»ó´ã6ÆÀ"; break; case "À̼öÇö": $team = "»ó´ã7ÆÀ"; break; case "ȲÇýÀÎ": $team = "»ó´ã8ÆÀ"; break; case "¹ÚÁÖÇö": $team = "»ó´ã9ÆÀ"; break; case "±èÅÂÁ¤": $team = "»ó´ã10ÆÀ"; break; case "Çѵ¿Áø": $team = "»ó´ã11ÆÀ"; break; case "¾ÈÀçÀ±": $team = "»ó´ã12ÆÀ"; break; default: $team = "»ó´ãÆÀ"; } $class = ""; if($list['complete']=="1"){ $complete = "»ó´ã¿Ï·á"; } else if($list['complete']=="0"){ $complete = "»ó´ãÁß"; } if($list['etime']=="00:00:00"){ $etime = ""; } else { $etime = $list['sdate']."-".substr($list['etime'],0,5); }
//µÎ½Ã°£ÀÌ Áö³ªµµ »ó´ãÁßÀÏ °æ¿ì »ó´ã¿Ï·á¶ó°í Ç¥½ÃÇϱâ $str_date = strtotime($list['stime'].'+2 hours'); $twohours = $list['sdate']."-".date("H:i", $str_date); if(date("Y-m-d-H:i") > $twohours && $list['complete'] == "0"){ $class="test"; $complete = "»ó´ã¿Ï·á"; $etime = $twohours; }
if($complete == "»ó´ãÁß"){$etime = "";} ?> <tr id="<?php echo $list['seq'];?>" class="seqClass <?php echo $list['etime'];?> <?php echo $list['stime'];?>"> <td class="idx"><?php echo $idx;?></td> <td class="company_name <?php echo $list['ori_cname'];?>"><?php echo $sangho;?></td> <td><?php echo $list['status_r'];?></td> <td>±¸¸Å»ó´ã/¼ºñ½º</td> <td><?php echo $list['sdate']."-".substr($list['stime'],0,5);?></td> <td><?php echo $etime;?></td> <td><?php echo $team;?></td> <td class="<?php echo $class;?>"><?php echo $complete;?></td> </tr> <?php $idx--; } ?> </tbody> </table>
<?php echo pageListing($pg, $nPage, "realtime_counsel.php?&pg=", $cm_nCount);?>
</div>
<script> $(function(){ //Ãʱ⠹®±¸ »ö»ó º¯°æ $('.seqClass td:last-child:contains("»ó´ã¿Ï·á")').css("color","#ff2020"); $('.seqClass td:last-child:contains("»ó´ãÁß")').css("color","#204eff"); //var seq_fisrt_id = $('.counsel_list_box tr:first-of-type').attr('id'); //var seq_id = $('.counsel_list_box tr:first-of-type').attr('id'); //console.log(seq_fisrt_id + ':' + seq_id);
//0.5ÃÊ¿¡ Çѹø¾¿ realtimefunc() ÇÔ¼ö¸¦ ½ÇÇàÇÑ´Ù. setInterval(function(){ realtimefunc(); }, 100); // '»ó´ãÁß' ¹®±¸ ±ô¹ÚÀÌ´Â È¿°ú let blinkAnimation = setInterval(function(){ $('.seqClass > td:last-child:contains("»ó´ãÁß")').animate({opacity: 0}, 1000, function(){ $(this).animate({opacity: 1}, 1000); }); }, 2000); });
function realtimefunc(){ var time_class = "";
var today = new Date(); // Ãʱ⠸®½ºÆ®¿¡ ¾Æ¹«°Íµµ ¾øÀ»¶§¿¡´Â ÇöÀç½Ã°£À» ä¿ö³ÖÀ½
var hours = ('0' + today.getHours()).slice(-2); // ÇöÀç ½Ã var minutes = ('0' + today.getMinutes()).slice(-2); // ÇöÀç ºÐ var seconds = ('0' + today.getSeconds()).slice(-2); // ÇöÀç ÃÊ
var today_val = "<?php echo $today; ?>"; // ¿À´Ã ³¯Â¥
var cnt = "<?php echo $row['cnt']; ?>"; // ¸®½ºÆ® Ä«¿îÆ® var seq2 = $(".seqClass").eq(0).attr("id"); // ±Û¹øÈ£ if($(".seqClass").eq(0).attr("class")=="" || $(".seqClass").eq(0).attr("class") == undefined){ // Ŭ·¡½º°¡ ¾Æ¹«°Íµµ Á¤ÀǵǾî ÀÖÁö ¾ÊÀ» ¶§ time_class = hours + ':' + minutes + ':' + seconds; // À§¿¡¼ ÃëµæÇÑ ÇöÀç ½ÃºÐÃÊ·Î time_class¸¦ Á¤ÀÇ } else { time_class = $(".seqClass").eq(0).attr("class").split(' '); // ±×°Ô ¾Æ´Ï¸é Ŭ·¡½º¸íÀ¸·Î Á¤ÀÇ } var etime_val = $("input[name='etime_val']").val(); // Á¾·á½Ã°£Ãëµæ var page = "<?php echo $pg; ?>"; // ÇöÀç ÆäÀÌÁö Ãëµæ
if(etime_val == ""){etime_val = time_class[1];} // Á¾·á½Ã°£ÀÌ ºñ¾îÀÖ´Ù¸é À§¿¡¼ ÃëµæÇÑ ½Ã°£À» ³Ö¾îÁÜ(Ŭ·¡½º°¡ Á¤ÀǵǾîÀÖÀ»¶§)
var stime_val = $("input[name='stime_val']").val(); // ½ÃÀ۽ð£Ãëµæ if(stime_val == ""){stime_val = time_class[2];} // ½ÃÀ۽ð£ÀÌ ºñ¾îÀÖ´Ù¸é À§¿¡¼ ÃëµæÇÑ ½Ã°£À» ³Ö¾îÁÜ(Ŭ·¡½º°¡ Á¤ÀǵǾîÀÖÀ»¶§)
var idx = 0; if($("input[name='idx']").val() == "") { idx = parseInt($(".seqClass").eq(0).find(".idx").html()); idx = idx+1; } else { idx = parseInt($("input[name='idx']").val()); idx = idx+1; } var html = ""; var team = "";
$.ajax({ type:"post", url:"./ajax.realtime_counsel.php", data: { today: today_val, cnt: cnt, seq: seq2 }, cache : false, dataType: "json", success:function(result){
if(result!=""){ // ¹Ýȯ°ªÀÌ ºñ¾îÀÖÁö ¾ÊÀ»¶§ seq = result.seq; // ¹øÈ£ stime = result.stime; // ½ÃÀ۽ð£ etime = result.etime; // Á¾·á½Ã°£ cname = result.cname; // °í°´»ç¸í status_r = result.status_r; // ¾÷Á¾ sdam = result.sdam; // ´ã´çÀÚ bigo = result.bigo; // ³»¿ë complete = result.complete; // ¿Ï·á if(complete == '1'){ complete_val = "»ó´ã¿Ï·á"; $('.seqClass td:last-child:contains("»ó´ã¿Ï·á")').css("color","#ff2020");// '󸮿Ϸá' ¹®±¸ »ö»ó º¯°æ $('.seqClass td:last-child:contains("»ó´ãÁß")').css("color","#204eff");// 'ó¸®Áß' ¹®±¸ »ö»ó º¯°æ
} else if(complete == '0') { complete_val = "»ó´ãÁß"; $('.seqClass td:last-child:contains("»ó´ã¿Ï·á")').css("color","#ff2020");// '󸮿Ϸá' ¹®±¸ »ö»ó º¯°æ $('.seqClass td:last-child:contains("»ó´ãÁß")').css("color","#204eff");// 'ó¸®Áß' ¹®±¸ »ö»ó º¯°æ } else {complete_val = "";} if(etime == '00:00:00'){etime_txt = "";} else {etime_txt = today_val+"-"+etime.substr(0,5);}
// °í°´»ç¸í *ó¸® sangho_leng = cname.length; sangho_leng = Math.ceil(sangho_leng / 2);
star = ""; for(var s=0; s<sangho_leng; s++){ star += "*"; } sangho = cname.substr('0', sangho_leng, 'euc-kr')+star;
switch(sdam) { case "¿À»ó¸ñ": team = "»ó´ã1ÆÀ"; break; case "±Çâ±Ô": team = "»ó´ã2ÆÀ"; break; case "È«Àç¿ø": team = "»ó´ã3ÆÀ"; break; case "À̽Âȯ": team = "»ó´ã4ÆÀ"; break; case "¿©¿íµ¿": team = "»ó´ã5ÆÀ"; break; case "ȲÀçÇö": team = "»ó´ã6ÆÀ"; break; case "À̼öÇö": team = "»ó´ã7ÆÀ"; break; case "ȲÇýÀÎ": team = "»ó´ã8ÆÀ"; break; case "¹ÚÁÖÇö": team = "»ó´ã9ÆÀ"; break; case "±èÅÂÁ¤": team = "»ó´ã10ÆÀ"; break; case "Çѵ¿Áø": team = "»ó´ã11ÆÀ"; break; case "¾ÈÀçÀ±": team = "»ó´ã12ÆÀ"; break; default: team = "»ó´ãÆÀ";
}
if(status_r==false || status_r=='false'){status_r = "µµ¼Ò¸Å";}
if(stime_val != stime && page == "1") { // ÇöÀçÆäÀÌÁö°¡ 1Àϰæ¿ì¿Í etime_val ÀÇ °ª°ú °á°ú°ªÀ¸·Î ³Ñ¾î¿Â Á¾·á½Ã°£ÀÌ °°Áö ¾ÊÀ»¶§ ½ÇÇàÇÔ
html += "<tr id='"+seq+"' class='seqClass "+etime+" "+stime+"'>"; html += "<td>"+ idx +"</td>"; html += "<td>"+sangho+"</td>"; html += "<td>"+status_r+"</td>"; html += "<td>±¸¸Å»ó´ã/¼ºñ½º</td>"; html += "<td>"+today_val+"-"+stime.substr(0,5)+"</td>"; html += "<td>"+etime_txt+"</td>"; html += "<td>"+team+"</td>"; html += "<td>"+complete_val+"</td>"; html += "</tr>";
$(html).insertBefore(".counsel_list tr:eq(0)"); $("input[name='etime_val']").val(etime); $("input[name='stime_val']").val(stime); $("input[name='idx']").val(idx); } } }, error:function(rtn,status,error){ alert(error); } }); }
/* $(function(){ // ÇöÀç ȸé»ó tr ¸®½ºÆ® °¹¼ö var list_length = $(".counsel_list_box > tr").length; //¸ðÀÚÀÌũó¸® ¹Ýº¹ ó¸® for(var idx = 0; idx < list_length; idx++){ //°¢ À妽º¿¡ ¸Â´Â »óÈ£¸í ¼±Åà var $list = $(".counsel_list_box tr").eq(idx).children(".company_name"); //Àüü ¹®ÀÚ¿ °¹¼ö var txt_length = $list.text().length; //¸ðÀÚÀÌũó¸® ½ÃÀÛÇÒ ¹®ÀÚ¿ À§Ä¡ var masking_start = Math.round(txt_length / 2); //¸ðÀÚÀÌũó¸®ÇÒ ¹®ÀÚ¿ ÃßÃâ var txt = $list.text().slice(masking_start); //¸ðÀÚÀÌũó¸® ¾ÈÇÒ ¹®ÀÚ¿ ÃßÃâ var txt_front = $list.text().slice(0 , masking_start); //Àüü ¹®ÀÚ¿ ÃßÃâ var txt_2 = $list.text(); //¸ðÀÚÀÌũó¸®ÇÒ °¹¼ö¸¸Å *Ç¥½Ã var masking = "*".repeat(txt_length - masking_start); //¸ðÀÚÀÌÅ© ó¸® ¾ÈµÈ ºÎºÐ + ¸ðÀÚÀÌÅ© ó¸®ÇÒ ºÎºÐ $list.text(txt_front + masking); } //Á¦ÀÏ ÃÖ±Ù ¸®½ºÆ®ÀÇ »óÈ£¸í ³»¿ëÀÌ º¯°æµÇ¾úÀ» °æ¿ì ÇÔ¼ö ½ÇÇà setInterval(function(){ console.log("»óÈ£¸í º¯°æ") var $list = $(".counsel_list_box tr").eq(0).children(".company_name").children(".cell");//°¢ À妽º¿¡ ¸Â´Â »óÈ£¸í ¼±ÅÃ
var txt_length = $list.text().length;//Àüü ¹®ÀÚ¿ °¹¼ö var masking_start = Math.round(txt_length / 2);//¸ðÀÚÀÌũó¸® ½ÃÀÛÇÒ ¹®ÀÚ¿ À§Ä¡ var txt = $list.text().slice(masking_start);//¸ðÀÚÀÌũó¸®ÇÒ ¹®ÀÚ¿ ÃßÃâ var txt_front = $list.text().slice(0 , masking_start);//¸ðÀÚÀÌũó¸® ¾ÈÇÒ ¹®ÀÚ¿ ÃßÃâ var txt_2 = $list.text();//Àüü ¹®ÀÚ¿ ÃßÃâ var masking = "*".repeat(txt_length - masking_start);//¸ðÀÚÀÌũó¸®ÇÒ °¹¼ö¸¸Å *Ç¥½Ã $list.text(txt_front + masking);//¸ðÀÚÀÌÅ© ó¸® ¾ÈµÈ ºÎºÐ + ¸ðÀÚÀÌÅ© ó¸®ÇÒ ºÎºÐ
console.log(txt_2); }, 2000); }) */ </script> <? include("./Page/common/footer.php"); ?>
|