123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375 |
- function flashWrite(filename, width, height)
- {
- var strObj = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">';
- strObj += '<param name="movie" value="'+filename+'">';
- strObj += '<param name="wmode" value="transparent">';
- strObj += '<param name="quality" value="high">';
- strObj += '<embed src="'+filename+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'">';
- strObj += '</embed>';
- strObj += '</object>';
- document.write(strObj);
- }
- function writeMSXML4(id, codebase, width, height)
- {
- var obj="";
- obj=obj+ "<OBJECT id='"+id+"' CLASSID='CLSID:88D969C0-F192-11D4-A65F-0040963251E5' codebase='"+codebase+"' width='"+width+"' height='"+height+"'>";
- obj=obj+ "</OBJECT>";
- try {
- var obj = new ActiveXObject('Msxml2.DOMDocument.4.0');
- }
- catch(e) {
- document.write(obj);
- }
- }
- function TrustFormViewer(id, filename, controlName, domainName, width, height, docSave, logSave)
- {
- // Ku 시스템 보안 취약점 개선으로 로컬 개발에서만 로그 나오도록 하고 운영과 교육은 로그 안나오도록 함 (2016.11.10 - smkim)
- logSave = (filename.indexOf("999dev") > -1) ? "true" : "false";
-
- var obj="";
- obj=obj+ "<OBJECT id='"+id+"' classid='CLSID:4DA55DF4-4825-44CF-9790-4D29E8F02AC7' width='"+width+"' height='"+height+"'>";
- obj=obj+ "<PARAM name='src' value='"+filename+"'/>";
- obj=obj+ "<PARAM name='controlName' value='"+controlName+"'/>";
- obj=obj+ "<PARAM name='domainName' value='"+domainName+"'/>";
- obj=obj+ "<PARAM name='documentsave' value='"+docSave+"'/>";
- obj=obj+ "<PARAM name='log' value='"+logSave+"'/>";
- obj=obj+ "</OBJECT>";
-
- document.write(obj);
- }
- function TrustFormMenu(id, menuItem, debugLog, msgBox, keepSubMenu, width, height)
- {
- var obj="";
- obj=obj+ "<OBJECT id='"+id+"' CLASSID='CLSID:81FF07A5-9782-45D9-A516-17601D57397D' width='"+width+"' height='"+height+"'>";
- obj=obj+ "<PARAM name='MenuItem' value='"+menuItem+"'/>"; //XML 파일을 지정한다.
- obj=obj+ "<PARAM name='DebugLog' value='"+debugLog+"'/>"; //로그파일 생성여부를 지정한다.
- obj=obj+ "<PARAM name='MsgBox' value='"+msgBox+"'/>"; //메뉴 로딩시 에러 정보를 messageBox로 보여준다.
- obj=obj+ "<PARAM name='KeepSubMenu' value='"+keepSubMenu+"'/>"; //열려있던 서브메뉴를 닫는다
- obj=obj+ "</OBJECT>";
-
- document.write(obj);
- }
- function getTrustFormMenu(id, menuItem, debugLog, msgBox, keepSubMenu, width, height)
- {
- var obj="";
- obj=obj+ "<OBJECT id='"+id+"' CLASSID='CLSID:81FF07A5-9782-45D9-A516-17601D57397D' width='"+width+"' height='"+height+"'>";
- obj=obj+ "<PARAM name='MenuItem' value='"+menuItem+"'/>"; //XML 파일을 지정한다.
- obj=obj+ "<PARAM name='DebugLog' value='"+debugLog+"'/>"; //로그파일 생성여부를 지정한다.
- obj=obj+ "<PARAM name='MsgBox' value='"+msgBox+"'/>"; //메뉴 로딩시 에러 정보를 messageBox로 보여준다.
- obj=obj+ "<PARAM name='KeepSubMenu' value='"+keepSubMenu+"'/>"; //열려있던 서브메뉴를 닫는다
- obj=obj+ "</OBJECT>";
-
- return obj;
- }
- function TrustFormSmartUpdater(id, codebase, width, height)
- {
- var obj="";
- obj=obj+ "<OBJECT id='"+id+"' CLASSID='CLSID:ED5D862B-6A06-46de-A929-F2C588742CBD' codebase='"+codebase+"' width='"+width+"' height='"+height+"'>";
- obj=obj+ "<PARAM name='deleteZipFile' value='true'/>"; // zip 파일을 지운다
- obj=obj+ "<PARAM name='registry' value='false'/>"; // registry를 이용하지 않는다.
- obj=obj+ "<PARAM name='configDir' value='C:\\\Program Files\\himed'/>"; // config 파일이 저장될 local 경로를 설정
- obj=obj+ "<PARAM name='enableLog' value ='true' />"; // log를 남긴다.
- obj=obj+ "<PARAM name='selfUi' value ='true' />"; // 자체 UI를 이용한다.
- obj=obj+ "<PARAM name='dlgNotClose' value='true' />"; // UI를 하나의 dialog로 사용한다.
- obj=obj+ "<PARAM name='fileinuse_hidden' value='skip'/>"; // FileInUse Dialog에서 button을 hidden 할 지 여부
- obj=obj+ "<PARAM name='deleteLogLevel' value='1'/>"; // 로그를 value달 전까지 보관 (1은 한달동안의 로그만 보관) added by CBJ 2012.03.23
- obj=obj+ "</OBJECT>";
-
- document.write(obj);
- }
- function TrustFormBroker(id, codebase, width, height)
- {
- var obj="";
- obj=obj+ "<OBJECT id='"+id+"' CLASSID='CLSID:0DFA67D7-B78C-40A7-B583-E7090D5F38C6' codebase='"+codebase+"' width='"+width+"' height='"+height+"'>";
- obj=obj+ "</OBJECT>";
-
- document.write(obj);
- }
- //pageAcl : 소스보기/저장/편집/인쇄/인쇄마킹/화면캡쳐/상태바여부
- function SoftCampWebSecurer(id, width, height, pageAcl)
- {
- var obj="";
- obj=obj+ "<OBJECT id='"+id+"' CLASSID='CLSID:6687DEFA-B8AB-4895-B3BD-68DBEEF569DC' width='"+width+"' height='"+height+"'>";
- obj=obj+ "<PARAM NAME='PageAcl' VALUE='"+pageAcl+"'>";
- obj=obj+ "</OBJECT>";
- document.write(obj);
- }
- var oReport = null;
- // rex 30 오픈 관련 (이상준 수정)
- var rex_gsPreViewFeatures = "center=yes,scrollbars=no,status=no,toolbar=no,resizable=1,location=no,menu=no,width=855,height=800";
- function openReport(rptnames, params, options, prnopt, uniqueId, iveiwerObj) {
- // 필수 - 레포트 생성 객체
- if (uniqueId == null) {
- reportId = makeReportId();
- }
- else {
- reportId = uniqueId;
- }
-
- oReport = GetfnParamSet(reportId);
-
- oReport.datatype = "csv";
- oReport.event.finishprint = printFinished;
- //oReport.event.init = reportInit;
- oReport.rptnames = rptnames;
- oReport.callback = getCallbackName(options);
-
- var rptNameSplit = null;
- var param = null;
- var rebId = null;
- var subMemoUsed = false;
- if(rptnames.length == 1) {
- rptNameSplit = rptnames[0].split(":");
- oReport.rptname = rptNameSplit[0];
- oReport.title = rptNameSplit[1];
- param = params[0];
- for(key in param) {
- if (key.indexOf("user_data",0) == 0) {
- // check if dataset name exists.
- if(key == "user_data") {
- oReport.type = "memo";
- oReport.data = param[key];
- }
- else {
- var dataset = key.substring(10);
- oReport.sub(dataset).type = "memo";
- oReport.sub(dataset).data = param[key];
- subMemoUsed = true;
- }
- }
- else if (key.indexOf("xml_data",0) == 0) {
- // check if xml dataset name exists.
- if(key == "xml_data") {
- oReport.type = "memo";
- oReport.data = param[key]
- oReport.datatype = "xml";
- }
- else {
- var dataset = key.substring(9);
- oReport.sub(dataset).type = "memo";
- oReport.sub(dataset).data = param[key];
- oReport.sub(dataset).datatype = "xml";
- subMemoUsed = true;
- }
- }
- else if (key.indexOf("xpath",0) == 0) { // xml repeat data for xml datatype
- // check if xml dataset name exists.
- if(key == "xpath") {
- oReport.xpath = param[key];
- }
- else {
- var dataset = key.substring(6);
- oReport.sub(dataset).xpath = param[key];
- }
- }
- else if (key.indexOf("connect_name",0) == 0) { // connect name 처리
- // check if dataset name exists.
- if (key == "connect_name") {
- oReport.connectname = param[key];
- }
- else {
- var dataset = key.substring(13);
- oReport.sub(dataset).connectname = param[key];
- }
- }
- else {
- oReport.param(key).value = param[key];
- }
- }
- if (subMemoUsed) { // explicitly add "http" type as sub
- oReport.sub("*").type="http";
- oReport.sub("*").datatype="csv";
- }
- oReport.param("report_id").value = getReportId(rptNameSplit[0]);
- oReport.param("report_nm").value = rptNameSplit[1];
- }
- else {
- // multi-report
- var titleStr = "";
- for(var i = 0; i < rptnames.length; i++) {
- rebId = "reb"+i;
- rptNameSplit = rptnames[i].split(":");
- oReport.reb(rebId).rptname = rptNameSplit[0];
- if (i == 0) {
- titleStr = rptNameSplit[1];
- } else {
- titleStr = titleStr + "," + rptNameSplit[1];
- }
-
- oReport.reb(rebId).datatype = "csv";
- param = params[i];
- for(key in param) {
- if (key.indexOf("user_data",0) == 0) {
- // check if dataset name exists.
- if(key == "user_data") {
- oReport.reb(rebId).type = "memo";
- oReport.reb(rebId).data = param[key]
- }
- else {
- var dataset = key.substring(10);
- oReport.reb(rebId).sub(dataset).type = "memo";
- oReport.reb(rebId).sub(dataset).data = param[key];
- }
- }
- else if (key.indexOf("xml_data",0) == 0) {
- // check if dataset name exists.
- if(key == "xml_data") {
- oReport.reb(rebId).type = "memo";
- oReport.reb(rebId).data = param[key];
- oReport.reb(rebId).datatype = "xml";
- }
- else {
- var dataset = key.substring(9);
- oReport.reb(rebId).sub(dataset).type = "memo";
- oReport.reb(rebId).sub(dataset).data = param[key];
- oReport.reb(rebId).sub(dataset).datatype = "xml";
- }
- }
- else if (key.indexOf("xpath",0) == 0) { // xml repeat data for xml datatype
- // check if xml dataset name exists.
- if(key == "xpath") {
- oReport.reb(rebId).xpath = param[key];
- }
- else {
- var dataset = key.substring(6);
- oReport.reb(rebId).sub(dataset).xpath = param[key];
- }
- }
- else if (key.indexOf("connect_name",0) == 0) { // connect name 처리
- // check if dataset name exists.
- if (key == "connect_name") {
- oReport.reb(rebId).connectname = param[key];
- }
- else {
- var dataset = key.substring(13);
- oReport.reb(rebId).sub(dataset).connectname = param[key];
- }
- }
- else {
- oReport.reb(rebId).param(key).value = param[key];
- }
- }
-
- oReport.reb(rebId).param("report_id").value = getReportId(rptNameSplit[0]);
- oReport.reb(rebId).param("report_nm").value = rptNameSplit[1];
- }
- oReport.title = titleStr;
- }
-
- oReport.printoption = prnopt;
- var frompage = 1;
- var topage = -1;
- var copies = 1;
- // parsing prnopt for direct print
- if (prnopt != null && prnopt != "") {
- var prnopts = prnopt.split(";");
- for(var i =0; i< prnopts.length; i++)
- {
- if (prnopts[i].indexOf("copies=",0) == 0) {
- copies = prnopts[i].substring(7);
- }
- else if (prnopts[i].indexOf("frompage=",0) == 0) {
- frompage = prnopts[i].substring(9);
- }
- else if (prnopts[i].indexOf("topage=",0) == 0) {
- topage = prnopts[i].substring(7);
- }
- }
- }
-
- // rexpert30 오픈시 size 조절 2013.02.13 장재현
- var rexPreViewArr = rex_gsPreViewFeatures.split(",");
- var rexOptions = options.split(";");
- var rexWidth = "";
- var rexHeight = "";
-
- for(var i = 0; i < rexOptions.length; i++) {
- if(rexOptions[i].indexOf("width=",0) == 0) {
- rex_gsPreViewFeatures = ""
- rexWidth = rexOptions[i];
- }
- if(rexOptions[i].indexOf("height=",0) == 0) {
- rexHeight = rexOptions[i];
- }
- }
- for(var j = 0; j < rexPreViewArr.length; j++){
- if(rexPreViewArr[j].indexOf("width=",0) == 0) {
- rexPreViewArr[j] = rexWidth;
- }
- if(rexPreViewArr[j].indexOf("height=",0) == 0) {
- rexPreViewArr[j] = rexHeight;
- }
-
- if(j+1 == rexPreViewArr.length){
- rex_gsPreViewFeatures = rex_gsPreViewFeatures + rexPreViewArr[j]
- }else{
- rex_gsPreViewFeatures = rex_gsPreViewFeatures + rexPreViewArr[j] + ","
- }
-
- }
- if (rexWidth == "" && rexHeight == "")
- {
- rex_gsPreViewFeatures = "center=yes,scrollbars=no,status=no,toolbar=no,resizable=1,location=no,menu=no,width=855,height=800";
-
- }
- if(options.indexOf("directprint=1") >= 0) {
- var printDialog = true;
- if(options.indexOf("printdialog=0") >= 0) {
- printDialog = false;
- }
- oReport.print(printDialog, frompage, topage, copies, ""); // oReport.printoption 으로 함께 지정해야함.
- }
- else {
- oReport.toolbarbuttonoption = options.replace("directprint=0","");
- oReport.open(iveiwerObj);
- }
- }
- function getCallbackName(option) {
- if (option == null || option == "") {
- return null;
- }
-
- var opts = option.split(";");
- for(var i =0; i< opts.length; i++)
- {
- if (opts[i].indexOf("callback=",0) == 0) {
- return opts[i].substring(9);
- }
- }
-
- return null;
- }
- function getReportId(url) {
- var start = url.lastIndexOf("/");
- var reportId = url.substr(start+1,10);
-
- return reportId;
- }
- function reportInit(rexCtl, eventName, eventData) {
- //rexCtl.SetCss("print.copies=10");
- }
- function printFinished(rexCtl, eventName, eventData) {
- if (typeof ux_callflex == 'function') {
- if (eventData != null && eventData.callback != null) {
- //alert(eventData.id + "," + eventData.callback);
- ux_callflex("reportcallback_"+eventData.callback,eventData);
- }
- }
-
- }
|