Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6 System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64 User : User ( 0) PHP Version : 7.4.6 Disable Function : NONE Directory : C:/Program Files/CyberLink/PowerDirector/web/ |
<html> <SCRIPT language="javascript" src="MD5.js" type="text/javascript"></SCRIPT> <SCRIPT language="javascript" src="PicasaAction.js" type="text/javascript"></SCRIPT> <SCRIPT language="javascript" src="hashtable.js" type="text/javascript"></SCRIPT> <script type="text/javascript"> var nStartIndex = 0; var nEndIndex = 0; //////////////////////UI var strPhotoUrl; var strFrob; var strToken; var nPhotoNum = 0; var nContract_id; var m_strCurrent_person_id; var m_StrPhotoset_id = ""; var m_htPhotoID = new Hashtable; var m_htPhotoTitle = new Hashtable; var m_htPhotoUser = new Hashtable; var m_htPhotoURL = new Hashtable; var m_nWindowWidth = 480; var m_nWindowHeight = 290; var m_nPhotosInWidth = 7; var m_nPhotosInHeight = 3; var m_bIsShowPhoto = false; //for InfoArea use var m_CurrentPhotoSetInfo_ImageURL; var m_CurrentPhotoSetInfo_PhotosetID; var m_CurrentPhotoSetInfo_Description; var m_CurrentPhotoSetInfo_Title; var m_CurrentPhotoSetInfo_PhotosCount; var m_CurrentUserInfo_Name = ""; function UpdateUpLevelButtonStatus(bEnable) { var strEnableUpLevelButton; if (bEnable == true) strEnableUpLevelButton = "EnableUpLevelButton:1"; else strEnableUpLevelButton = "EnableUpLevelButton:0"; location = strEnableUpLevelButton; } function UpdateSetInfoArea() { var infoArea = document.getElementById("Info_Area2"); infoArea.innerHTML = ""; var tbl = document.createElement("table"); var tblBody = document.createElement("tbody"); var row1 = document.createElement("tr"); var cell1 = document.createElement("td"); var strTextPhotos = "Set photos:"+m_CurrentPhotoSetInfo_PhotosCount; var textNode = document.createTextNode(strTextPhotos); cell1.appendChild(textNode); row1.appendChild(cell1); var row2 = document.createElement("tr"); var cell2 = document.createElement("td"); cell2.setAttribute('align', "center"); var tbl_new = document.createElement("table"); tbl_new.setAttribute('cellspacing','0'); tbl_new.setAttribute('cellpadding','0'); var tblBody_new = document.createElement("tbody"); tbl_new.setAttribute('border','0'); var rowIcon = document.createElement("tr"); var cellIcon = document.createElement("td"); cellIcon.setAttribute('align', "center"); cellIcon.setAttribute('width', "84"); cellIcon.setAttribute('height', "90"); cellIcon.setAttribute('vAlign', "top"); var strBKImageFile; strBKImageFile = m_strSkinPath+"thumb_bg_set.png"; cellIcon.setAttribute('background',strBKImageFile); var link = document.createElement('a'); link.setAttribute('target', "_top"); link.setAttribute('photoset_id', m_CurrentPhotoSetInfo_PhotosetID); link.setAttribute('description', m_CurrentPhotoSetInfo_Description); var Descript = m_CurrentPhotoSetInfo_Description; link.setAttribute('title', Descript); link.onclick = function() { //m_CurrentPhotoSetInfo_ImageURL = this.image_src; //m_CurrentPhotoSetInfo_PhotosetID = this.photoset_id; //GetPhotosBySetID(m_strUserID,m_StrPhotosetId); } var div = document.createElement('img'); div.setAttribute('src', m_CurrentPhotoSetInfo_ImageURL); div.setAttribute('border', 0); div.setAttribute('description', m_CurrentPhotoSetInfo_Description); div.setAttribute('vspace', 6); div.setAttribute('align', "center"); div.setAttribute('border', 0); div.setAttribute('height', "72"); div.setAttribute('width', "72"); link.appendChild(div); cellIcon.appendChild(link); rowIcon.appendChild(cellIcon); tblBody_new.appendChild(rowIcon); tbl_new.appendChild(tblBody_new); cell2.appendChild(tbl_new); row2.appendChild(cell2); var row3 = document.createElement("tr"); var cell3 = document.createElement("td"); cell3.setAttribute('align', "center"); var textNodeNobr = document.createTextNode(m_CurrentPhotoSetInfo_Title); cell3.appendChild(textNodeNobr); row3.appendChild(cell3); tblBody.appendChild(row1); tblBody.appendChild(row2); tblBody.appendChild(row3); tbl.appendChild(tblBody); infoArea.appendChild(tbl); tbl.setAttribute("border", "0"); } function GoToPage(nPageIndex) { m_nCurrentPageIndex = nPageIndex; if(m_nCurrentPageIndex >m_nTotalPageNum) { m_nCurrentPageIndex = m_nTotalPageNum; } if(m_nCurrentPageIndex < 1) { m_nCurrentPageIndex = 1; } TRACE(m_nCurrentPageIndex); if(m_bIsShowPhoto) GetAlbum(m_strUserID); else GetPhotosBySetID(m_strUserID,m_StrPhotosetId); UpdateCurPageInfo(); } function SearchHotTag(tag_name) { var ref = "SearchTag:"+tag_name; location = ref; } function GetPhotoUrl(photo_id) { var strURL = m_htPhotoURL.items(photo_id); var strPhoto_URL = "GetPhotoURL:"+decodeURI(strURL); location = strPhoto_URL; } function GetPhotoTitle(photo_td) { var strTitle = m_htPhotoTitle.items(photo_td); var strPhoto_Title = "GetTitle:"+decodeURI(strTitle); location = strPhoto_Title; } function GetPhotoUser(photo_td) { var strUser = m_htPhotoUser.items(photo_td); var strPhoto_Title = "GetPhotoUser:"; location = strPhoto_Title; } function updateBKImage() { var body = document.getElementById("bkArea"); body.background = m_strSkinPath+"flickr_user_bg.png"; } function updateTableWH() { m_nWindowHeight = document.body.clientHeight; m_nWindowWidth = document.body.clientWidth*0.65; for(var i = 0;i<200;i++) { if(i>m_nWindowWidth/85) { m_nPhotosInWidth = i; break; } } for(var i = 0;i<200;i++) { if(i>(m_nWindowHeight-60)/130) { m_nPhotosInHeight = i; break; } } m_nPhotosPrePage = m_nPhotosInWidth*m_nPhotosInHeight; for(var i = 0;i<200;i++) { if(i>m_nWindowWidth/120) { m_nPhotoSetsInWidth = i; break; } } for(var i = 0;i<200;i++) { if(i>(m_nWindowHeight-60)/130) { m_nPhotoSetsInHeight = i; break; } } m_nPhotoSetsPrePage = m_nPhotoSetsInWidth*m_nPhotoSetsInHeight; } function DownloadSelectedPhoto() { for(var k in m_htPhotoID._hash) { //var strGetID = "add:"+m_htPhotoID.items(k); var strGetID = "add:"+k; location = strGetID; } m_htPhotoID.clear(); //m_htPhotoTitle.clear(); //start download var ref = "download:test"; location = ref; return; } function UpdateTotalPageInfo() { TRACE("UpdateTotalPageInfo"); TRACE(m_nTotalPageNum); var ref = "UpdateTotalPageInfo:"+m_nTotalPageNum; location = ref; return; } function UpdateCurPageInfo() { var ref = "UpdateCurPageInfo:"+m_nCurrentPageIndex; location = ref; return; } function SelectedAllPhoto() { for (var i=nStartIndex; i<nEndIndex; i++) { var strID = "image"+ i; if(document.getElementById(strID).disabled==false) { document.getElementById(strID).checked = true; OnCheckBox(document.getElementById(strID).photo_id,document.getElementById(strID).photo_title,document.getElementById(strID).checked,document.getElementById(strID).photo_user,document.getElementById(strID).photo_URL); } } } function UnSelectedAllPhoto() { for (var i=nStartIndex; i<nEndIndex; i++) { var strID = "image"+ i; document.getElementById(strID).checked = false; OnCheckBox(document.getElementById(strID).photo_id,document.getElementById(strID).photo_title,false,document.getElementById(strID).photo_user,document.getElementById(strID).photo_URL); } } function OnButtonPrev() { TRACE("OnButtonPrev"); m_nCurrentPageIndex--; if(m_nCurrentPageIndex<=0) { m_nCurrentPageIndex = 1; UpdateCurPageInfo(); return; } TRACE(m_nCurrentPageIndex); GoToPage(m_nCurrentPageIndex); } function OnButtonNext() { TRACE("OnButtonNext"); m_nCurrentPageIndex++; if(m_nCurrentPageIndex >m_nTotalPageNum) { m_nCurrentPageIndex = m_nTotalPageNum; UpdateCurPageInfo(); return; } TRACE(m_nCurrentPageIndex); GoToPage(m_nCurrentPageIndex); } function ShowPhotoSets(json) { m_nCurrentPageIndex = 1; TRACE("ShowPhotoSets"); if(json) { } else { TRACE("error -- json is NULL"); return; } var infoArea = document.getElementById("Info_Area2"); infoArea.innerHTML = ""; m_bIsNotInSet = false; m_bShowPhotoSet = true; nPhotoNum = 0; UpdateSelectAllButtonStatus(); if (json.feed.entry == null) return; var nPhotosetCount = json.feed.entry.length; if(m_bHaveNotInSetPhotos) nPhotosetCount = nPhotosetCount + 1; var body = document.getElementById("resultArea"); body.innerHTML = ""; var tbl = document.createElement("table"); var tblBody = document.createElement("tbody"); var nCount = 0; var row = document.createElement("tr"); m_nTotalPageNum = nPhotosetCount / m_nPhotoSetsPrePage + 1; m_nTotalPageNum = parseInt(m_nTotalPageNum); nStartIndex = (m_nCurrentPhotoSetPage-1)*m_nPhotoSetsPrePage; nEndIndex = nStartIndex+m_nPhotoSetsPrePage; if (nEndIndex > nPhotosetCount) nEndIndex = nPhotosetCount; var strUserName = json.feed.gphoto$nickname.$t; var strUserThumbnailURL = json.feed.gphoto$thumbnail.$t; ShowPersonsInfoArea(strUserName,strUserThumbnailURL); for(var i = nStartIndex;i<nEndIndex;i++) { var item = json.feed.entry[i]; TRACE("item="); TRACE(item); var title = item.title.$t; TRACE("title="); TRACE(title); var strName = item.gphoto$name.$t; TRACE("strName="); TRACE(strName); var strid = item.id.$t; TRACE("strid="); TRACE(strid); var summary = item.summary.$t; TRACE("summary="); TRACE(summary); var strIconURL = item.media$group.media$thumbnail[0].url; TRACE("strIconURL = "); TRACE(strIconURL); var nPhotoCount = item.gphoto$numphotos.$t; if(nCount>m_nPhotoSetsInWidth-1) { nCount = 0; row = document.createElement("tr"); } nCount++; var cell = document.createElement("td"); var nCellWidth = 450/4; cell.setAttribute('width', nCellWidth); cell.setAttribute('height', 95); cell.setAttribute('align', "center"); var tbl_new = document.createElement("table"); var tblBody_new = document.createElement("tbody"); var row1 = document.createElement("tr"); row1.setAttribute('align', "center"); var cell1 = document.createElement("td"); cell1.setAttribute('width', "84"); cell1.setAttribute('height', "90"); cell1.setAttribute('align', "center"); cell1.setAttribute('vAlign', "top"); var strBKImageFile; strBKImageFile = m_strSkinPath+"thumb_bg_set.png"; cell1.setAttribute('background',strBKImageFile); var link = document.createElement('a'); var url = strIconURL; var bIsNotInSet = false; if (m_bHaveNotInSetPhotos && i == nEndIndex - 1) bIsNotInSet = true; if (!bIsNotInSet) { url = strIconURL; link.setAttribute('target', "_top"); link.setAttribute('photoset_id', strName); link.setAttribute('image_src', url); link.setAttribute('description', summary); link.setAttribute('photos', nPhotoCount); link.setAttribute('title', title); link.onclick = function() { m_CurrentPhotoSetInfo_ImageURL = this.image_src; m_CurrentPhotoSetInfo_PhotosetID = this.photoset_id; m_CurrentPhotoSetInfo_Description = this.description; m_CurrentPhotoSetInfo_PhotosCount = this.photos; m_CurrentPhotoSetInfo_Title = this.title; GetPhotosBySetID(m_strUserID,this.photoset_id); UpdateSetInfoArea(); } } var div = document.createElement('img'); div.setAttribute('src', url); div.setAttribute('vspace', 6); div.setAttribute('align', "center"); div.setAttribute('border', 0); div.setAttribute('height', "72"); div.setAttribute('width', "72"); div.setAttribute('border', 0); div.setAttribute('align', "center"); if (!bIsNotInSet) { div.setAttribute('description', summary); } else { div.setAttribute('description', m_strNotInSetText); } div.onmouseover = function() { this.style.cursor= 'hand'; } div.onmouseout=function() { this.style.cursor= 'default'; } link.appendChild(div); cell1.appendChild(link); cell1.setAttribute('align', "center"); row1.appendChild(cell1); if (!bIsNotInSet) { var link2 = document.createElement('a'); link2.setAttribute('target', "_top"); link2.setAttribute('photoset_id', strName); link2.setAttribute('image_src', url); link2.setAttribute('description', summary); link2.setAttribute('photos',nPhotoCount); link2.setAttribute('title', title); link2.onclick = function() { m_CurrentPhotoSetInfo_ImageURL = this.image_src; m_CurrentPhotoSetInfo_PhotosetID = this.photoset_id; m_CurrentPhotoSetInfo_Description = this.description; m_CurrentPhotoSetInfo_PhotosCount = this.photos; m_CurrentPhotoSetInfo_Title = this.title; GetPhotosBySetID(m_strUserID,this.photoset_id); UpdateSetInfoArea(); } link2.onmouseover = function() { this.style.cursor = 'hand'; } link2.onmouseout = function() { this.style.cursor = 'default'; } } var row2 = document.createElement("tr"); row2.setAttribute('align', "center"); var cell2 = document.createElement("td"); cell2.setAttribute('align', "center"); var divCell = document.createElement('div'); if (!bIsNotInSet) { var textNodeNobr = "<div style='width: 84px; text-overflow: ellipsis; overflow: hidden'><font size = 2><nobr>" + title + "</nobr></font></div>"; } divCell.innerHTML=textNodeNobr; link2.appendChild(divCell); cell2.appendChild(link2); row2.appendChild(cell2); tblBody_new.appendChild(row1); tblBody_new.appendChild(row2); tbl_new.appendChild(tblBody_new); cell.appendChild(tbl_new); row.appendChild(cell); tblBody.appendChild(row); } tbl.appendChild(tblBody); body.appendChild(tbl); tbl.setAttribute("border", "0"); TRACE("ShowPhotoSets_end"); UpdateTotalPageInfo(); UpdateCurPageInfo(); UpdateUpLevelButtonStatus(false); } function ClearInfoArea1() { var picList = document.getElementById("Info_Area1"); picList.innerHTML = ""; } function ClearInfoArea2() { var Info_Area2 = document.getElementById("Info_Area2"); Info_Area2.innerHTML = ""; } function ShowContracts(json) { TRACE("ShowContracts"); if(json.feed.entry == null) { TRACE("Contracts=0"); return; } var nUserCount = json.feed.entry.length; TRACE(nUserCount); m_nTotalPageNums = 1; UpdateUpLevelButtonStatus(false); nPhotoNum = 0; UpdateSelectAllButtonStatus(); ClearInfoArea1(); ClearInfoArea2(); m_bShowPhotoSet = false; var picList = document.getElementById("resultArea"); picList.innerHTML = "" m_nContractGetCount = 0; //Create Cell for user icons var tbl = document.createElement("table"); var tblBody = document.createElement("tbody"); var nCount = 0; var row = document.createElement("tr"); for (var i=0; i<nUserCount; i++) { var item = json.feed.entry[i]; var strTitle = item.title.$t; TRACE(strTitle); if(nCount>m_nPhotosInWidth-1) { nCount = 0; row = document.createElement("tr"); } var strCellID = strTitle; nCount++; var cell = document.createElement("td"); cell.setAttribute('width', "90"); cell.setAttribute('height', "100"); cell.setAttribute('id', strCellID); cell.setAttribute('align', "center"); ShowPersons(item,cell); var link = document.createElement('a'); cell.onmouseover = function() { //domTT_activate(this, event, 'content',this.title , 'grid', 20, 'fade', 'out', 'trail', false); this.style.cursor= 'hand'; } cell.onmouseout=function() { //domTT_closeAll();domTT_deactivate(this, event); this.style.cursor= 'default'; } row.appendChild(cell); tblBody.appendChild(row); } // put the <tbody> in the <table> tbl.appendChild(tblBody); // appends <table> into <body> picList.appendChild(tbl); m_bShowContract = true; UpdateTotalPageInfo(); UpdateCurPageInfo(); TRACE("ShowContracts_end"); } function ShowPersonsInfoArea(strUserName,strThumbnailURL) { var infoArea = document.getElementById("Info_Area1"); infoArea.innerHTML = ""; var Info_Area2 = document.getElementById("Info_Area2"); Info_Area2.innerHTML = ""; var tbl = document.createElement("table"); var tblBody = document.createElement("tbody"); var row1 = document.createElement("tr"); var cell1 = document.createElement("td"); cell1.setAttribute('align', "center"); var tbl_new = document.createElement("table"); tbl_new.setAttribute('cellspacing','0'); tbl_new.setAttribute('cellpadding','0'); var tblBody_new = document.createElement("tbody"); tbl_new.setAttribute('border','0'); var rowIcon = document.createElement("tr"); var cellIcon = document.createElement("td"); var strBKImageFile; strBKImageFile = m_strSkinPath+"thumb_bg_user.png"; cellIcon.setAttribute('background',strBKImageFile); cellIcon.setAttribute('width', "62"); cellIcon.setAttribute('height', "58"); cellIcon.setAttribute('align', "center"); cellIcon.setAttribute('vAlign', "top"); cellIcon.setAttribute('align', "center"); var link = document.createElement('a'); link.setAttribute('target', "_top"); link.onclick = function() { m_nCurrentPhotoSetPage = 1; GoUpLevel(); var infoArea = document.getElementById("Info_Area2"); infoArea.innerHTML = ""; } link.onmouseover = function() { this.style.cursor= 'hand'; } link.onmouseout=function() { this.style.cursor= 'default'; } var div = document.createElement('img'); var url = strThumbnailURL; div.setAttribute('src', url); div.setAttribute('width', "49"); div.setAttribute('height', "48"); div.setAttribute('vspace', 7); var textNode = document.createTextNode(strUserName); var textChangeLine = document.createElement("p"); link.appendChild(div); cellIcon.appendChild(link); rowIcon.appendChild(cellIcon); tblBody_new.appendChild(rowIcon); tbl_new.appendChild(tblBody_new); cell1.appendChild(tbl_new); row1.appendChild(cell1); var row2 = document.createElement("tr"); var cell2 = document.createElement("td"); cell2.setAttribute('align', "center"); cell2.appendChild(textNode); row2.appendChild(cell2); tblBody.appendChild(row1); tblBody.appendChild(row2); tbl.appendChild(tblBody); infoArea.appendChild(tbl); tbl.setAttribute("border", "0"); } function ShowPersons(person,UserCell) { var strTitle = person.title.$t; var strNickName = person.gphoto$nickname.$t; var strThumbnail = person.gphoto$thumbnail.$t; var strCellID = person.nsid; var picList = document.getElementById("resultArea"); //var UserCell = document.getElementById(strCellID); //if(!UserCell) // return; var tbl_new = document.createElement("table"); tbl_new.setAttribute('cellspacing','0'); tbl_new.setAttribute('cellpadding','0'); var tblBody_new = document.createElement("tbody"); tbl_new.setAttribute('border','0'); var row1 = document.createElement("tr"); var cell1 = document.createElement("td"); cell1.setAttribute('width', "62"); cell1.setAttribute('height', "58"); cell1.setAttribute('align', "center"); cell1.setAttribute('vAlign', "top"); cell1.setAttribute('align', "center"); var strBKImageFile; strBKImageFile = m_strSkinPath+"thumb_bg_user.png"; cell1.setAttribute('background',strBKImageFile); var link = document.createElement('a'); link.setAttribute('target', "_top"); link.setAttribute('person_id', strTitle); var url; url = strThumbnail; link.setAttribute('person_image', url); link.setAttribute('person_name', strNickName); link.setAttribute('title', strTitle); //var strHref = "GetPhotoSets:"+person.nsid; //link.setAttribute('href', strHref); link.onclick = function() { m_nCurrentPhotoSetPage = 1; m_strCurrent_person_id = this.person_id; GetAlbum(this.person_id); m_nConstractID = this.person_id; m_CurrentContractInfo_ImageURL = this.person_image; m_CurrentContractInfo_Name = this.person_name; } link.onmouseover = function() { this.style.cursor= 'hand'; } link.onmouseout=function() { this.style.cursor= 'default'; } var div = document.createElement('img'); div.setAttribute('src', url); div.setAttribute('border', 0); div.setAttribute('width', "49"); div.setAttribute('height', "48"); div.setAttribute('vspace', 7); link.appendChild(div); cell1.appendChild(link); row1.appendChild(cell1); tblBody_new.appendChild(row1); tbl_new.appendChild(tblBody_new); var cell2 = document.createElement("td"); cell2.setAttribute('align', "center"); var link2 = document.createElement('a'); link2.setAttribute('target', "_top"); link2.setAttribute('person_id', strTitle); var url; url = strThumbnail; link2.setAttribute('person_image', url); link2.setAttribute('person_name', strNickName); link2.setAttribute('title', strTitle); link2.onclick = function() { m_nCurrentPhotoSetPage = 1; m_strCurrent_person_id = this.person_id; GetAlbum(this.person_id); m_nConstractID = this.person_id; m_CurrentContractInfo_ImageURL = this.person_image; m_CurrentContractInfo_Name = this.person_name; } link2.onmouseover = function() { this.style.cursor= 'hand'; } link2.onmouseout=function() { this.style.cursor= 'default'; } var divCell = document.createElement('div'); var textNodeNobr = "<div style='width: 80px; text-overflow: ellipsis; overflow: hidden'><font size = 2><nobr>"+strNickName+"</nobr></font></div>"; divCell.innerHTML=textNodeNobr; link2.appendChild(divCell); cell2.appendChild(link2); UserCell.appendChild(tbl_new); UserCell.appendChild(cell2); m_nContractGetCount = m_nContractGetCount+1; } function GoUpLevel() { GetAlbum(m_strUserID); } function UpdateSelectAllButtonStatus() { var bEnable = true; if(nPhotoNum == 0) bEnable = false; var strEnableSelectAllButton; if(bEnable == true) strEnableSelectAllButton = "EnableSelectAllButton:1"; else strEnableSelectAllButton = "EnableSelectAllButton:0"; location = strEnableSelectAllButton; } function ShowHotTags(tagList) { // insert newly found pictures var body = document.getElementById("resultArea"); body.innerHTML = ""; var arr = new Hashtable; for(var i = 0;i<tagList.length;i++) { arr.add(tagList[i]._content,(tagList[i].score/10)); } var TagList = new Array(tagList.length); for(var i = 0;i<tagList.length;i++) { TagList[i]= tagList[i]._content; } TagList.sort(); var tbl = document.createElement("table"); var tblBody = document.createElement("tbody"); var nCount = 0; var row = document.createElement("tr"); var cell = document.createElement("td"); //cell.setAttribute('width', "80"); //cell.setAttribute('height', "100"); for(var i = 0;i<tagList.length;i++) { sizeTag = arr.items(TagList[i]); var fontTag = document.createElement('font'); fontTag.setAttribute('size',sizeTag); fontTag.setAttribute('color',"#0000FF"); var link = document.createElement('a'); link.setAttribute('TagName',TagList[i]); link.onmouseover = function() { //this.style.background = "#0000FF"; //this.style.color = "#FFFFFF"; this.style.cursor= 'hand'; } link.onmouseout = function() { //this.style.background = "#FFFFFF"; //this.style.color = "#0000FF"; this.style.cursor= 'default'; } link.onclick = function() { SearchHotTag(this.TagName); } link.innerHTML = TagList[i]; link.innerHTML += " "; fontTag.appendChild(link); cell.appendChild(fontTag); } row.appendChild(cell); tblBody.appendChild(row); tbl.appendChild(tblBody); // appends <table> into <body> body.appendChild(tbl); // sets the border attribute of tbl to 2; tbl.setAttribute("border", "0"); } function jsonFlickrApi(rsp) { if (rsp.stat != "ok") { return; } if(rsp.photosets) { ShowPhotoSets(rsp.photosets); return; } if(rsp.sizes) { var strURL = ""; var bFind = false; for(var i = 0;i<rsp.sizes.size.length;i++) { strURL = rsp.sizes.size[i].source; bFind = true; if(rsp.sizes.size[i].label == m_nDownloadSizeName) { break; } } if(bFind) { var strPhotoURL = "GetPhotoURL:"+strURL; location = strPhotoURL; } return; } if(rsp.person) { ShowPersons(rsp.person); return; } if(rsp.frob) { var strReturn = "frob:"+rsp.frob._content; strFrob = rsp.frob._content; var strSrc = m_strSecret+"api_key"+m_strApiKey+"frob"+strFrob+"permsread"; var strMd5 = MD5(strSrc); var strRequest = "http://www.flickr.com/services/auth/?api_key="+m_strApiKey+"&perms=read&frob="+strFrob+"&api_sig="+strMd5; window.open( strRequest); return; } if(rsp.auth) { if(rsp.auth.token) { strToken = rsp.auth.token._content; return; } } if(rsp.contacts) { if(!rsp.contacts.contact) { return; } ShowContracts(rsp.contacts); return; } if(rsp.photos) { ShowPhotos(rsp.photos); return; } if(rsp.photo) { ShowPhotoInfo(rsp.photo); return; } if(rsp.licenses) { for(var j = 0;i<10;j++) { m_nLicenseID[j] = -1; } for(var i = 0;i<rsp.licenses.license.length;i++) { strURL = rsp.licenses.license[i].url; m_nLicenseName[i] = rsp.licenses.license[i].name; m_nLicenseURL[i] = rsp.licenses.license[i].url; m_nLicenseID[i] = rsp.licenses.license[i].id; } return; } if(rsp.photoset!=null) { m_nTotalPageNum = rsp.photoset.pages; ShowPhotos(rsp.photoset); return; } if(rsp.hottags) { if(rsp.hottags.count>0) ShowHotTags(rsp.hottags.tag); return; } } </script> <style type="text/css"> <!-- body { margin: 0px; padding: 0px; } --> </style> <body scroll="no" id="bkArea"> <font face ="Segoe UI"> <form name="myForm"> <table width="480" height="100%" align="left" VALIGN="top" ID="Table2" border="0"> <tr> <td VALIGN="top"> <div id="resultArea" style="OVERFLOW-Y: scroll; SCROLLBAR-FACE-COLOR: #e7e7e7; SCROLLBAR-3DLIGHT-COLOR: #e7e7e7"> </div> </td> </tr> </table> <table width="161" height="100%" align="right" ID="Table1" border="0"> <tr> <td VALIGN="middle" height="100" align="center"> <div id="Info_Area1" style="OVERFLOW-Y: scroll; SCROLLBAR-FACE-COLOR: #e7e7e7; SCROLLBAR-3DLIGHT-COLOR: #e7e7e7"> </div> </td> </tr> <tr> <td VALIGN="middle" height="100" align="center"> <div id="Info_Area2" style="OVERFLOW-Y: scroll; SCROLLBAR-FACE-COLOR: #e7e7e7; SCROLLBAR-3DLIGHT-COLOR: #e7e7e7"> </div> </td> </tr> </table> </form> </font> </body> </html>