<% Here_Url = request.servervariables("URL") comp_code = Right(Left(Here_Url,7),6) comp_code = "253450" SQL =" SELECT idx, comp_code , comp_name, comp_name_eng, comp_name_e,comp_emp,service_start,bigo,rd_num,cc_cn_rd,dart_auth,k_gubun FROM Comp_Control where comp_code ="& comp_code Set rs = Server.CreateObject("ADODB.Recordset") rs.Open SQL,db,1 If rs.eof Or rs.bof Then response.Redirect "/stockcontrol/stmg.asp" '추후url변경 Else comp_name = rs("comp_name") comp_name_e = rs("comp_name_e") comp_name_eng = rs("comp_name_eng") dart_auth = rs("dart_auth") k_gubun = rs("k_gubun") cc_cn_rd = rs("cc_cn_rd") End If TBL_NAME_S = "TB_S_"&comp_code TBL_NAME_DAILY = "TB_DAILY_"&comp_code TBL_NAME_DAILY_KOSPI = "TB_DAILY_KOSPI" 'TBL_NAME_DAILY_KOSPI = "TB_DAILY_KOSPI_"&comp_code If comp_code = "005380" Then TBL_NAME_S = "hmc_TB_S_000270_P" TBL_NAME_DAILY = "hmc_TB_DAILY_000270_P" elseIf comp_code = "005385" Then TBL_NAME_S = "hmc_TB_S_000270_U1" TBL_NAME_DAILY = "hmc_TB_DAILY_000270_U1" elseIf comp_code = "005387" Then TBL_NAME_S = "hmc_TB_S_000270_U2" TBL_NAME_DAILY = "hmc_TB_DAILY_000270_U2" elseIf comp_code = "005389" Then TBL_NAME_S = "hmc_TB_S_000270_U3" TBL_NAME_DAILY = "hmc_TB_DAILY_000270_U3" End If rs.close set rs=nothing db.close set db=nothing %> <% Set maruDB = Server.CreateObject("ADODB.Connection") maruDB.open("Provider=SQLOLEDB;Data Source=221.143.49.46; Initial Catalog=Stock_DB; User id=stock_user; Password=stock_service_sql;") %> Stock Information | 스튜디오 드래곤
본문 바로가기

실시간 주가


<% If InStr(Here_Url,"/kr/") >0 Then title_txt = "일자별 주가정보" High_txt = "최고" Low_txt = "최저" Week_1_txt = "1 주" Month_1_txt = "1 개월" Month_3_txt = "3 개월" Month_6_txt = "6 개월" Year_1_txt = "1 년" Year_3_txt = "3 년" comp_name = comp_name Caption_txt = "주가정보" Date_txt = "일자" Close_txt = "종가 (원)" Change_txt = "전일비 (원)" P_Change_txt = "등락률 (%)" Open_txt = "시가 (원)" High_data_txt = "고가 (원)" Low_data_txt = "저가 (원)" Volume_txt = "거래량 (주)" Not_Open_txt = "입력된 데이터가 없습니다." Optimized_for_transverse_screen_txt = "* 표는 가로 화면에 최적화 되어 있습니다." Todays_Open_txt = "시가 (원)" Intraday_High_txt = "고가 (원)" Intraday_Low_txt = "저가 (원)" Previous_Close_txt = "전일종가 (원)" Unit_Shares_txt = "(단위:주)" Unit_Krw_txt = "(단위:원)" ElseIf InStr(Here_Url,"/en/") >0 Then title_txt = "Daily Quotes" High_txt = "HIGH" Low_txt = "LOW" Week_1_txt = "1 Week" Month_1_txt = "1 Month" Month_3_txt = "3 Months" Month_6_txt = "6 Months" Year_1_txt = "1 Year" Year_3_txt = "3 Years" comp_name = comp_name_eng 'Table_Summary_txt = "This is a table consisting of "&comp_name&" ("&comp_code&"), date, close, Change, %Change, Open, High, Low, Volume." Caption_txt = "Stock Information" Date_txt = "Date" Close_txt = "Close (KRW)" Change_txt = "Change (KRW)" P_Change_txt = "% Change" Open_txt = "Open (KRW)" High_data_txt = "High (KRW)" Low_data_txt = "Low (KRW)" Volume_txt = "Volume (shares)" Not_Open_txt = "No data." Optimized_for_transverse_screen_txt = "* Optimized for transverse screen" Todays_Open_txt = "Today's Open (KRW)" Intraday_High_txt = "Intraday High (KRW)" Intraday_Low_txt = "Intraday Low (KRW)" Previous_Close_txt = "Previous Close (KRW)" Unit_Shares_txt = "(Unit:shares)" Unit_Krw_txt = "(Unit:KRW)" End If Response.write Unit_Shares_txt %> <% gragh_selecter = request("gragh_selecter") If gragh_selecter = "" Then gragh_selecter = "1" End If %> <%If gragh_selecter = "1" Then%> <%ElseIf gragh_selecter = "2" then%> <%End If%> <% 'SQLString = "select top 1 s_date,kospi,PrevKospi,kospi200,kosdaq,PrevKosdaq,hhmm from TB_KOSPI_KOSDAQ_"&comp_code&" order by s_date desc , hhmm desc" SQLString = "select top 1 s_date,kospi,PrevKospi,kospi200,kosdaq,PrevKosdaq,hhmm from TB_KOSPI_KOSDAQ order by uid desc" set rstemp=maruDB.execute(SQLString) if not(rstemp.eof) then s_date = rstemp("s_date") kospi = rstemp("kospi") PrevKospi = rstemp("PrevKospi") kospi200 = rstemp("kospi200") kosdaq = rstemp("kosdaq") PrevKosdaq = rstemp("PrevKosdaq") end If if PrevKospi = "" or PrevKospi = "0" then KospiR = "0" Else KospiR = Round((kospi - PrevKospi)/PrevKospi*100,2) KospiR = replace(KospiR,"-","") end if if PrevKosdaq = "" or PrevKosdaq = "0" then KosdaqR = "0" Else KosdaqR = Round((kosdaq - PrevKosdaq)/PrevKosdaq*100,2) KosdaqR = replace(KosdaqR,"-","") end if txt1_1 = s12 txt1_2 = s10 txt1_4 = s5 txt1_3 = txt1_4 - txt1_1 txt1_15 = s16 kosdaqJisu = kosdaq kospiJisu = kospi kospiJisu = CDbl(left(kospiJisu,len(kospiJisu)-2) & "." & right(kospiJisu,2)) PrevKospi = CDbl(left(PrevKospi,len(PrevKospi)-2) & "." & right(PrevKospi,2)) kosdaqJisu = CDbl(left(kosdaqJisu,len(kosdaqJisu)-2) & "." & right(kosdaqJisu,2)) PrevKosdaq = CDbl(left(PrevKosdaq,len(PrevKosdaq)-2) & "." & right(PrevKosdaq,2)) if (kospiJisu-PrevKospi) < 0 then kospiDungRak = "down" elseif (kospiJisu-PrevKospi) > 0 then kospiDungRak = "up" else kospiDungRak = "hold" end if kospiDebi = formatnumber(abs(kospiJisu-PrevKospi),2) if (kosdaqJisu-PrevKosdaq) < 0 then kosdaqDungRak = "down" elseif (kosdaqJisu-PrevKosdaq) > 0 then kosdaqDungRak = "up" else kosdaqDungRak = "hold" end if kosdaqJisuDebi = formatnumber(abs(kosdaqJisu-PrevKosdaq),2) CurJuka = replace(txt1_1,",","") PrevJuka = replace(txt1_4,",","") if PrevJuka = "" or PrevJuka = "0" then DungRakR = "0" else DungRakR = Round((CurJuka - PrevJuka)/PrevJuka*100,2) DungRakR = replace(DungRakR,"-","") end if if txt1_2 = "2" then DungRak = "up" elseif txt1_2 = "5" then DungRak = "down" elseif txt1_2 = "1" then DungRak = "up" elseif txt1_2 = "4" then DungRak = "down" else DungRak = "hold" end If Set Nodes = Nothing Set oDOM = Nothing rstemp.close set rstemp=Nothing %> <% If instr(Here_Url,"/kr/") > 0 Then SRT_Last_Update_txt = "최종체결시간" SRT_Current_Price_txt = "현재가" SRT_Change_txt = "전일대비 (원)" SRT_Volume_txt = "거래량 (주)" SRT_comp_name = comp_name ElseIf instr(Here_Url,"/en/") > 0 Then SRT_Last_Update_txt = "Last Update" SRT_Current_Price_txt = "Current Price" SRT_Change_txt = "Change (KRW)" SRT_Volume_txt = "Volume (shares)" SRT_comp_name = comp_name_eng End If if s5 = "" or s5 = "0" then DungRakR = "0" else DungRakR = Round((s12 - s5)/s5*100,2) DungRakR = replace(DungRakR,"-","") end if %>

<%=SRT_comp_name%> (<%=comp_code%>) <%=SRT_Last_Update_txt%> : <%=Replace(s_date_h,"-","/")%> <%if len(s9) < 4 then response.write left(s9,1) else response.write left(s9,2) end if%>:<%=right(s9,2)%>

<%=SRT_Current_Price_txt%><%=formatnumber(s12,0)%>

  • <%=SRT_Change_txt%><%=arrow%> <%=formatnumber(ABS(s12-s5),0)%> (<%=arrow2%> <%=Abs(DungRakR)%>%)
  • <%=SRT_Volume_txt%><%=formatnumber(s16,0)%>

KOSPI

  • <%=formatnumber(kospiJisu,2)%>
  • <%If kospiDungRak = "up" Then %> ▲ <%ElseIf kospiDungRak = "down" Then%> ▼ <%else%><%End If%> <%=kospiDebi%> (<%If kospiDungRak = "up" Then %>+ <%ElseIf kospiDungRak = "down" Then%>- <%else%><%End If%> <%=KospiR%>%)

KOSDAQ

  • <%=formatnumber(kosdaqJisu,2)%>
  • <%If kosdaqDungRak = "up" Then %> ▲ <%ElseIf kosdaqDungRak = "down" Then%> ▼ <%else%><%End If%> <%=kosdaqJisuDebi%> (<%If kosdaqDungRak = "up" Then %>+ <%ElseIf kosdaqDungRak = "down" Then%>- <%else%><%End If%> <%=KosdaqR%>%)
Table of Summary
<%=Todays_Open_txt%> <%=Intraday_High_txt%> <%=Intraday_Low_txt%> <%=Previous_Close_txt%>
<%=formatnumber(s13,0)%> <%=formatnumber(s14,0)%> <%=formatnumber(s15,0)%> <%=formatnumber(s5,0)%>

<%=Optimized_for_transverse_screen_txt%>

<% if rs.BOF or rs.EOF then %> <% else %> <% i = 1 Do until rs.EOF or i > rs.PageSize s_date = rs("s_date") s13= rs("s13") s14= rs("s14") s15= rs("s15") s12 = rs("s12") s16 = rs("s16") prerice = rs("prerice") '내일지움??? If comp_code = "200230" and s_date = "2016-09-07"Then prerice = prerice / 5 End if if prerice = "" or isnull(prerice) then prerice = s12 end if diffrice = s12 - prerice if diffrice > 0 then s_symbol = "up" elseif diffrice = 0 then s_symbol = "" else s_symbol = "down" end if dif_frice = diffrice/prerice*100 diffrice2 = round(abs(dif_frice),2) if left(dif_frice,1) = "-" then minus = "down" altname = "하강" elseif dif_frice = 0 then minus = "0" else minus = "up" altname = "상승" end if if len(diffrice2) = 1 then diffrice2 = diffrice2 & ".00" %> <% rs.MoveNext i = i + 1 Loop end if %>
<%=COMP_NAME%> (<%=COMP_CODE%>) <%=Caption_txt%>
<%=Date_txt%> <%=Close_txt%> <%=Change_txt%> <%=P_Change_txt%> <%=Volume_txt%>
<%=Not_Open_txt%>
<%=s_date%> <%=formatnumber(s12,0)%> <%if s_symbol = "up" then%>▲<%ElseIf s_symbol = "down" then%>▼<%else%><%end if%><%=FormatNumber(abs(diffrice),0)%> <%if minus = "up" then%>+<%ElseIf minus = "down" then%>-<%else%><%end if%><%=diffrice2%> <%=formatnumber(s16,0)%>
<% rs.close set rs=Nothing 'rstemp.close 'set rstemp=Nothing rsdata.close set rsdata=Nothing maruDB.close set maruDB=nothing %>