#pragma once
#include "explorer1.h"

#define	URL_MAN_FOLDER		"https://kpm.ktspeedway.co.kr/cp_manage/main_cp_folder_auth.php"
#define	URL_MAN_USER		"https://kpm.ktspeedway.co.kr/cp_manage/cp_member_list.php"
#define	URL_MAN_TRAFFIC		"https://kpm.ktspeedway.co.kr/traffic_manage/traffic_main.php?info_type=day"
#define	URL_MAN_TOP10		"https://kpm.ktspeedway.co.kr/traffic_manage/chart_top10.php?info_type=r1"
#define URL_MAN_FILE_STAT   "https://kpm.ktspeedway.co.kr/traffic_manage/file_detail.php?p=%s"
#define URL_MAN_FILE_PRO    "http://kpm.ktspeedway.co.kr/traffic_manage/file_property.php?p=%s"
#define URL_MAN_NOTICE      "https://kpm.ktspeedway.co.kr/notice/view_content.php?p=%s"
#define URL_MAN_COUPON      "https://kpm.ktspeedway.co.kr/traffic_manage/coupon_history.php?p=%s"
#define URL_MAN_TRAFIC_STAT "http://kpm.ktspeedway.co.kr/traffic_manage/traffic_stats.php?p=%s"
#define URL_MAN_FINDID		"http://kpm.ktspeedway.co.kr/cp_manage/find_info.php"

#define URL_MAN_DISTINFO	"http://www.ktsystemhosting.com:8080/sp/manage/manage_server_list.html"

// CWebDlg 대화 상자입니다.
enum WEBDLG_TYPE {
	MAN_TRAFFIC = 0,
	MAN_FOLDER,
	MAN_USER,		
	MAN_TOP10,		
	MAN_FILE_STAT,
	MAN_FILE_PRO,  
	MAN_NOTICE,   
	MAN_COUPON,     
	MAN_TRAFIC_STAT,
	MAN_FINDID,
	MAN_DISTINFO
};

class CWebDlg : public CDialog
{
	DECLARE_DYNAMIC(CWebDlg)

public:
	CWebDlg(CWnd* pParent = NULL);   // 표준 생성자입니다.
	virtual ~CWebDlg();

	// 대화 상자 데이터입니다.
	enum { IDD = IDD_WEB_DLG };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 지원입니다.

	DECLARE_MESSAGE_MAP()
public:
	CExplorer1	m_web;
	CWebDlg*	m_pWebDlg;
	int			m_nType;
	DECLARE_EVENTSINK_MAP()
	void DocumentCompleteExplorer1(LPDISPATCH pDisp, VARIANT* URL);
	void NewWindow2Explorer1(LPDISPATCH* ppDisp, BOOL* Cancel);
	virtual BOOL OnInitDialog();
public:
	int GetPage(WEBDLG_TYPE nFlag,CString sCP,CString sUser,CString strPath=_T(""));
protected:
	virtual void PostNcDestroy();
public:
	afx_msg void OnClose();
protected:
	virtual void OnCancel();
public:
	void WindowClosingExplorer1(BOOL IsChildWindow, BOOL* Cancel);
	void NavigateComplete2Explorer1(LPDISPATCH pDisp, VARIANT* URL);
};
