getSupportLogListData(50); $aSupportTraderListHtml = createSupportTraderListHtml($aSupportTraderListData, count($aSupportTraderListData)); include './tpl/main.tpl'; } catch (Throwable $e) { error_log($e->getMessage()); } function getHomeMainBannerFile() { global $nMainBannerTraderId; global $nMainUrlLink; global $nMainImgUrlLink; /*2018-10-18 coby*/ $dir = STOCK_STATIC . '/upload/textFile'; $fileUrl = $dir . '/banner1.txt'; if (function_exists('curl_init')) { //curl $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $fileUrl); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0'); $nMainBannerTraderId = curl_exec($ch); curl_close($ch); } if(strpos($nMainBannerTraderId, "/%/") !== false){ $stringSplit = explode('/%/', $nMainBannerTraderId); $nMainBannerTraderId = $stringSplit[0]; $radioCheck = $stringSplit[1]; if($radioCheck==checkURL){ $nMainUrlLink = ''; }else{ $nMainUrlLink = ''; } }else{ $nMainUrlLink = ''; } $nMainImgUrlLink = '
'; } function createSupportTraderListHtml($aListData, $aLength) { global $oStsUtil; $nBalloonImg = array(1, 4, 8, 10, 30, 40, 44, 46, 47, 77, 88, 90, 93, 97, 100, 200, 300, 555, 906, 4989); $aMaxLength = ($aLength > count($aListData)) ? count($aListData) : $aLength; $szHtml = ''; for($i = 0; $i < $aMaxLength; $i++) { $szHtml .= sprintf('
', $aListData[$i]['take_trader_id'], setStationImage($aListData[$i]['take_trader_id'], 65, 65, 'item-pic img-circle','','')); $szHtml .= sprintf('
', $aListData[$i]['take_trader_id'], $aListData[$i]['take_trader_nick']); $szHtml .= sprintf('
'); $szHtml .= sprintf('%s님이 별풍선 %s개를 후원 하셨습니다.
', $aListData[$i]['give_trader_id'], $aListData[$i]['give_trader_nick'], number_format($aListData[$i]['item_qty'])); $szHtml .= sprintf('
'); $nComment = (isset($aListData[$i]['comment']) && $aListData[$i]['comment'] != '') ? $aListData[$i]['comment'] : '별풍선 ' . number_format($aListData[$i]['item_qty']) . '개 후원합니다.'; $szHtml .= sprintf('  %s   %s
', $nComment, date("Y.m.d", strtotime($aListData[$i]['ymd_web']))); $nItemQty = isset($aListData[$i]['item_qty']) ? $aListData[$i]['item_qty'] : ''; if(in_array($nItemQty, $nBalloonImg)) { $nImg = STOCK_STATIC . '/img/sts/balloon/' . $nItemQty . '.jpg'; } else { if(intval($nItemQty) < 50) { $nImg = STOCK_STATIC . '/img/sts/balloon/sm.png'; } else if(intval($nItemQty) < 100) { $nImg = STOCK_STATIC . '/img/sts/balloon/md.png'; } else if(intval($nItemQty) < 500) { $nImg = STOCK_STATIC . '/img/sts/balloon/lg.png'; } else if(intval($nItemQty) < 1000) { $nImg = STOCK_STATIC . '/img/sts/balloon/xl.png'; } else if(intval($nItemQty) >= 1000) { $nImg = STOCK_STATIC . '/img/sts/balloon/xxl.png'; } } $szHtml .= sprintf('
', $nImg); } return $szHtml; } function eventPopupHtml(){ $szListHtml = ""; $szListPopHtml = ""; $szImgGubun = 0; $szImgCount = 0; $stringArray = ipCheckFileUpload(); if(!empty($stringArray)) { foreach ($stringArray as $string){ if (strpos($string, "/%/") !== false) { $stringSplit = explode('/%/', $string); if($stringSplit[3] == 'true'){ $imgUrl = STOCK_STATIC . '/upload/imgFile/main_sm_'.$stringSplit[0].'.jpg'; //$szListHtml .= '' . $stringSplit[1] . ''; $szListPopHtml .= '
'; $szListPopHtml .= ''; $szListPopHtml .= ''; $szListPopHtml .= ''; $szListPopHtml .= '
'; $szImgCount++; } $szImgGubun++; } } if($szImgCount == 1){ $szListHtml .= '