home *** CD-ROM | disk | FTP | other *** search
- function GeneratePreview(cSourcePath, cDestPath, cID)
- {
- //MessageBox("cSourcePath = " + cSourcePath + "\ncDestPath = " + cDestPath + "\ncID = " + cID, "Preview", MB_OK);
- }
-
- function GetPageFN(iPage) {
- // generovani jmena souboru s obrazkem
- if (iPage == 1) {
- return "index.htm";
- }
- return "page" + IntToStr(iPage, 5) + ".htm";
- }
-
- function GetImgPageFN(iFile) {
- // generovani jmena indexove strany
- return "ipage" + IntToStr(iFile, 5) + ".htm";
- }
-
- function GetPagesNavigation(iPagesCount, iCurPage) {
- // generovani navigacniho textu mezi strankami s obrazky "1 2 3 4 5 ..."
- cNavigation = "";
- for (iPage=1; iPage <= iPagesCount; iPage++) {
- if (iPage == iCurPage) {
- cNavigation += "<B>"+IntToStr(iPage, 0)+"</B>\n";
- } else {
- cNavigation += "<A HREF=\""+GetPageFN(iPage)+"\">"+IntToStr(iPage, 0)+"</A>\n";
- }
- }
- return cNavigation;
- }
-
- function GetImgPagesNavigation(iFilesCount, iCurFile) {
- // generovani navigacniho textu pro navigaci mezi indexy "1 2 3 4 5 ..."
- cNavigation = "";
- for (iFile=1; iFile <= iFilesCount; iFile++) {
- if (iFile == iCurFile) {
- cNavigation += "<B>"+IntToStr(iFile, 0)+"</B>\n";
- } else {
- cNavigation += "<A HREF=\""+GetImgPageFN(iFile)+"\">"+IntToStr(iFile, 0)+"</A>\n";
- }
- }
- return cNavigation;
- }
-
- function GenerateAlbum(cSourcePath, cDestPath)
- {
- if (bGlobalTitle)
- {
- cTitle = cGlobalTitle;
- cHeader = cGlobalTitle;
- cImgHeader = cGlobalTitle;
- cImgTitle = cGlobalTitle;
- }
- // generovani cele html struktury
- var iFilesCount = lSelectedFiles.GetCount(); // celkovy pocet souboru
-
- var iPagesCount = Math.ceil(iFilesCount / (iCols*iRows)); // pocet indexovych stran
-
- // hardwired variables (can't be set through zme dialog, but can be modified here)
- var bImgMag=false; // obrazek lupy "-" do obrazku
- var bThnMag=false; // obrazek lupy "+" do obrazku
-
- // blabla
- var iNavStyle = parseInt(cNavStyle);
- var iNavPosition = parseInt(cNavPosition);
- var iImgNavStyleTop = parseInt(cImgNavStyleTop);
- var iImgNavStyleBottom = parseInt(cImgNavStyleBottom);
-
- var tPage = new CTemplate();
- tPage.Load(cSourcePath + "page.tpl", 0);
- tPage.SetReplace("${CSS_FILENAME}", "page.css");
-
- tPage.SetReplace("${TITLE}", cTitle);
- var txtHeader="";
- if (bHeader)
- {
- txtHeader=ReplaceExifStrings(cHeader, "", "");
- txtHeader="<span class=\"header\">"+txtHeader+"</span>";
- }
- tPage.SetReplace("${HEADER}", txtHeader);
-
- var txtBackRef="";
- if (bBackRef)
- {
- txtBackRef="<a href=\"" + cBackRefAdr + "\">" + cBackRefText + "</a>";
- var tBackNav = new CTemplate();
- tBackNav.Load(cSourcePath + "img_nav_b.tpl", 0);
- tBackNav.SetReplace("${NAVBACK}", txtBackRef);
- txtBackRef=tBackNav.Replace();
- }
- tPage.SetReplace("${BACKREF}", txtBackRef);
-
- var txtFooter="";
- if (bFooter)
- {
- txtFooter=ReplaceExifStrings(cFooter, "", "");
- txtFooter="<p><span class=\"footer\">"+txtFooter+"</span></p>";
- }
- tPage.SetReplace("${FOOTER}", txtFooter);
-
- var tPageCSS = new CTemplate();
- tPageCSS.Load(cSourcePath + "css.tpl", 0);
-
- var iDescTDWidth = iThnWidth+4;
- var iThnTDWidth = iThnWidth+iThnTDSpace;
- var iThnTDHeight = iThnHeight+iThnTDSpace;
- var iOrgTDWidth = iThnWidth+4;
-
- var iThnTableWidth = (iCols)*(iThnTDWidth) + (iCols+1)*(1); // (1) ... cellspacing="1"
-
- // nastaveni stylu pro indexovou stranku
- tPageCSS.SetReplace("${BGCOLOR}", HEXColor(iBgColor));
- tPageCSS.SetReplace("${HEAD_FONT_SIZE}", iHeaderFontSize);
- tPageCSS.SetReplace("${HEAD_FONT_COLOR}", HEXColor(iHeaderFontColor));
- tPageCSS.SetReplace("${THN_TABLE_WIDTH}", iThnTableWidth);
- tPageCSS.SetReplace("${DESC_FONT_SIZE}", iDescFontSize);
- tPageCSS.SetReplace("${DESC_FONT_COLOR}", HEXColor(iDescFontColor));
- tPageCSS.SetReplace("${DESC_BGCOLOR}", HEXColor(iDescBgColor));
- tPageCSS.SetReplace("${DESC_LINK_COLOR}", HEXColor(iDescLinkColor));
- tPageCSS.SetReplace("${DESC_TD_WIDTH}", iDescTDWidth);
- tPageCSS.SetReplace("${THN_TD_WIDTH}", iThnTDWidth);
- tPageCSS.SetReplace("${THN_TD_HEIGHT}", iThnTDHeight);
- tPageCSS.SetReplace("${ORG_TD_WIDTH}", iOrgTDWidth);
- tPageCSS.SetReplace("${THN_BGCOLOR}", HEXColor(iThnBgColor));
- tPageCSS.SetReplace("${ORG_FONT_SIZE}", iOrgFontSize);
- tPageCSS.SetReplace("${ORG_FONT_COLOR}", HEXColor(iOrgFontColor));
- tPageCSS.SetReplace("${ORG_BGCOLOR}", HEXColor(iOrgBgColor));
- tPageCSS.SetReplace("${ORG_LINK_COLOR}", HEXColor(iOrgLinkColor));
- tPageCSS.SetReplace("${FOOT_FONT_SIZE}", iFooterFontSize);
- tPageCSS.SetReplace("${FOOT_FONT_COLOR}", HEXColor(iFooterFontColor));
- tPageCSS.SetReplace("${NAV_FONT_SIZE}", iNavFontSize);
- tPageCSS.SetReplace("${NAV_FONT_COLOR}", HEXColor(iNavFontColor));
- tPageCSS.SetReplace("${NAV_BGCOLOR}", HEXColor(iNavBgColor));
- tPageCSS.SetReplace("${NAV_TEXT_BGCOLOR}", HEXColor(iNavTextBgColor));
- tPageCSS.SetReplace("${NAV_LINK_COLOR}", HEXColor(iNavLinkColor));
- tPageCSS.SetReplace("${FOOTER_LINK_COLOR}", HEXColor(iFooterLinkColor));
- tPageCSS.SetReplace("${BODYFONT}",cBodyFont);
- tPageCSS.SetReplace("${HEADERFONT}",cHeaderFont);
- tPageCSS.SetReplace("${NAV_BACK_BGCOLOR}", HEXColor(iNavBackColor));
-
- SaveString(cDestPath + "page.css", tPageCSS.Replace(), 0);
-
-
- // nastaveni stylu pro stranku s obrazkem
- var tImg = new CTemplate();
- tImg.Load(cSourcePath + "imgpage.tpl", 0);
- // nastavit referenci na style z html stranky
- tImg.SetReplace("${CSS_FILENAME}", "img.css");
-
- tImg.SetReplace("${TITLE}", cImgTitle); // nastaveni titulku stranky
-
- var tImgCSS = new CTemplate();
- tImgCSS.Load(cSourcePath + "css.tpl", 0);
-
- var iImgDescTDWidth = iImgWidth+4;
- var iImgTDWidth = iImgWidth+iImgTDSpace;
- var iImgTDHeight = iImgHeight+iImgTDSpace;
- var iImgOrgTDWidth = iImgWidth+4;
-
- var iImgTableWidth = iImgTDWidth + 2; // 2 ... 2 x cellspacing="1"
-
- tImgCSS.SetReplace("${BGCOLOR}", HEXColor(iImgBgColor));
- tImgCSS.SetReplace("${HEAD_FONT_SIZE}", iImgHeaderFontSize);
- tImgCSS.SetReplace("${HEAD_FONT_COLOR}", HEXColor(iImgHeaderFontColor));
- tImgCSS.SetReplace("${THN_TABLE_WIDTH}", iImgTableWidth);
- tImgCSS.SetReplace("${DESC_FONT_SIZE}", iImgDescFontSize);
- tImgCSS.SetReplace("${DESC_FONT_COLOR}", HEXColor(iImgDescFontColor));
- tImgCSS.SetReplace("${DESC_BGCOLOR}", HEXColor(iImgDescBgColor));
- tImgCSS.SetReplace("${DESC_LINK_COLOR}", HEXColor(iImgDescLinkColor));
- tImgCSS.SetReplace("${DESC_TD_WIDTH}", iImgDescTDWidth);
- tImgCSS.SetReplace("${THN_TD_WIDTH}", iImgTDWidth);
- tImgCSS.SetReplace("${THN_TD_HEIGHT}", iImgTDHeight);
- tImgCSS.SetReplace("${ORG_TD_WIDTH}", iImgOrgTDWidth);
- tImgCSS.SetReplace("${THN_BGCOLOR}", HEXColor(iImgImgBgColor));
- tImgCSS.SetReplace("${ORG_FONT_SIZE}", iImgOrgFontSize);
- tImgCSS.SetReplace("${ORG_FONT_COLOR}", HEXColor(iImgOrgFontColor));
- tImgCSS.SetReplace("${ORG_BGCOLOR}", HEXColor(iImgOrgBgColor));
- tImgCSS.SetReplace("${ORG_LINK_COLOR}", HEXColor(iImgOrgLinkColor));
- tImgCSS.SetReplace("${FOOT_FONT_SIZE}", iImgFooterFontSize);
- tImgCSS.SetReplace("${FOOT_FONT_COLOR}", HEXColor(iImgFooterFontColor));
- tImgCSS.SetReplace("${NAV_FONT_SIZE}", iImgNavFontSize);
- tImgCSS.SetReplace("${NAV_FONT_COLOR}", HEXColor(iImgNavFontColor));
- tImgCSS.SetReplace("${NAV_BGCOLOR}", HEXColor(iImgNavBgColor));
- tImgCSS.SetReplace("${NAV_TEXT_BGCOLOR}", HEXColor(iImgNavTextBgColor));
- tImgCSS.SetReplace("${NAV_LINK_COLOR}", HEXColor(iImgNavLinkColor));
- tImgCSS.SetReplace("${FOOTER_LINK_COLOR}", HEXColor(iImgFooterLinkColor));
- tImgCSS.SetReplace("${NAV_BACK_BGCOLOR}", HEXColor(iNavBackColor));
- tImgCSS.SetReplace("${BODYFONT}",cImgBodyFont);
- tImgCSS.SetReplace("${HEADERFONT}",cImgHeaderFont);
-
- SaveString(cDestPath + "img.css", tImgCSS.Replace(), 0);
-
- var tNav = new CTemplate();
- if (iNavStyle == 1) {
- tNav.Load(cSourcePath + "nav_1.tpl", 0);
- }
- if (iNavStyle == 2) {
- tNav.Load(cSourcePath + "nav_2.tpl", 0);
- }
-
- var tImgNavTop = new CTemplate();
- if (iImgNavStyleTop == 1) {
- tImgNavTop.Load(cSourcePath + "img_nav_1.tpl", 0);
- }
- if (iImgNavStyleTop == 2) {
- tImgNavTop.Load(cSourcePath + "img_nav_2.tpl", 0);
- }
- if (iImgNavStyleTop == 3) {
- tImgNavTop.Load(cSourcePath + "img_nav_3.tpl", 0);
- }
- var tImgNavBottom = new CTemplate();
- if (iImgNavStyleBottom == 1) {
- tImgNavBottom.Load(cSourcePath + "img_nav_1.tpl", 0);
- }
- if (iImgNavStyleBottom == 2) {
- tImgNavBottom.Load(cSourcePath + "img_nav_2.tpl", 0);
- }
- if (iImgNavStyleBottom == 3) {
- tImgNavBottom.Load(cSourcePath + "img_nav_3.tpl", 0);
- }
-
- var tRow = new CTemplate();
- tRow.Load(cSourcePath + "row.tpl", 0);
-
- var tImgRow = new CTemplate();
- tImgRow.Load(cSourcePath + "row.tpl", 0);
-
- var tDescCol = new CTemplate();
- if (bDesc)
- {
- tDescCol.Load(cSourcePath + "desc_col.tpl", 0);
- }
-
- var tImgDescCol = new CTemplate();
- if (bImgDesc)
- {
- tImgDescCol.Load(cSourcePath + "desc_col.tpl", 0);
- }
-
- var tThnCol = new CTemplate();
- tThnCol.Load(cSourcePath + "img_col.tpl", 0);
-
- var tImgCol = new CTemplate();
- tImgCol.Load(cSourcePath + "img_col.tpl", 0);
-
- var tOrgCol = new CTemplate();
- tOrgCol.Load(cSourcePath + "org_col.tpl", 0);
-
- var tImgOrgCol = new CTemplate();
- tImgOrgCol.Load(cSourcePath + "org_col.tpl", 0);
-
- var pMagImg0 = new CImage();
- pMagImg0.Load(cSourcePath + "magnify-.png", 0);
-
- var pMagImg1 = new CImage();
- pMagImg1.Load(cSourcePath + "magnify+.png", 0);
-
- var cRows = "";
- var cDescCols = "";
- var cImgCols = "";
- var cOrgCols = "";
-
- var iCol = 0;
- var iRow = 0;
- var iPage = 1;
-
- var iImgFrom = 1;
- var iImgTo = 1;
-
- // for (var iFile = 1; ((iFile <= iFilesCount) || (iCol != 0) || (iRow != 0)); iFile++) {
- for (var iFile = 1; ((iFile <= iFilesCount) || (iCol != 0)); iFile++) {
- if (iFile <= iFilesCount) {
-
- // FILE
- iImgTo = iFile;
- cFileName = lSelectedFiles.GetAt(iFile-1);
- cThnFileName = "thn" + IntToStr(iFile, 5) + ".jpg";
- cImgFileName = "img" + IntToStr(iFile, 5) + ".jpg";
- cOrgFileName = "org" + IntToStr(iFile, 5) + ".jpg";
-
- // LOAD FILE
- var pImg = new CImage();
- pImg.Load(cFileName, 0);
-
- // MAKE IMAGE
- if (bImgUseOriginal)
- {
- CopyFile(cFileName, cDestPath + cImgFileName, FIL_OM_OVERWRITE);
- }
- else
- {
- pImg.Resize(iImgWidth, iImgHeight, GFX_KEEP_ASPECT | GFX_INTERPOLATE);
- var rcMag = pMagImg0.GetRect();
- if (bImgMag) {
- pMagImg0.Draw(pImg, rcMag, pImg.GetWidth()-rcMag.Width()-1, pImg.GetHeight()-rcMag.Height()-1, 192, GFX_KEEP_ALPHA);
- }
- pImg.SaveAs(cDestPath + cImgFileName, JPGformat, iImgJPEG, 0);
- }
-
- // IMAGE HEADER
- var txtImgHeader="";
- if (bImgHeader)
- {
- txtImgHeader=ReplaceExifStrings(cImgHeader, cFileName, cDestPath + cImgFileName);
- txtImgHeader="<span class=\"header\">"+txtImgHeader+"</span>";
- }
- tImg.SetReplace("${HEADER}", txtImgHeader);
-
- // IMAGE NAVIGATION
- // navigation on top
- if (iFile > 1) {
- tImgNavTop.SetReplace("${NAV_FIRST}", "<a href=\""+GetImgPageFN(1)+"\">|<</a>");
- tImgNavTop.SetReplace("${NAV_PREV}", "<a href=\""+GetImgPageFN(iFile-1)+"\"><<</a>");
- } else {
- tImgNavTop.SetReplace("${NAV_FIRST}", "|<");
- tImgNavTop.SetReplace("${NAV_PREV}", "<<");
- }
- if (iFile < iFilesCount) {
- tImgNavTop.SetReplace("${NAV_NEXT}", "<a href=\""+GetImgPageFN(iFile+1)+"\">>></a>");
- tImgNavTop.SetReplace("${NAV_LAST}", "<a href=\""+GetImgPageFN(iFilesCount)+"\">>|</a>");
- } else {
- tImgNavTop.SetReplace("${NAV_NEXT}", ">>");
- tImgNavTop.SetReplace("${NAV_LAST}", ">|");
- }
- if (iImgNavStyleTop == 1) {
- tImgNavTop.SetReplace("${NAV_IMG}", iFile);
- tImgNavTop.SetReplace("${NAV_IMGS}", iFilesCount);
- } else {
- tImgNavTop.SetReplace("${NAV_NAV}", GetImgPagesNavigation(iFilesCount, iFile));
- }
- if (iImgNavStyleTop==3)
- {
- tImgNavTop.SetReplace("${NAV_TEXT}", ReplaceExifStrings(cImgNavUsrText, cFileName, cDestPath + cImgFileName));
- }
- // bottom navigation
- if (iFile > 1) {
- tImgNavBottom.SetReplace("${NAV_FIRST}", "<a href=\""+GetImgPageFN(1)+"\">|<</a>");
- tImgNavBottom.SetReplace("${NAV_PREV}", "<a href=\""+GetImgPageFN(iFile-1)+"\"><<</a>");
- } else {
- tImgNavBottom.SetReplace("${NAV_FIRST}", "|<");
- tImgNavBottom.SetReplace("${NAV_PREV}", "<<");
- }
- if (iFile < iFilesCount) {
- tImgNavBottom.SetReplace("${NAV_NEXT}", "<a href=\""+GetImgPageFN(iFile+1)+"\">>></a>");
- tImgNavBottom.SetReplace("${NAV_LAST}", "<a href=\""+GetImgPageFN(iFilesCount)+"\">>|</a>");
- } else {
- tImgNavBottom.SetReplace("${NAV_NEXT}", ">>");
- tImgNavBottom.SetReplace("${NAV_LAST}", ">|");
- }
- if (iImgNavStyleBottom == 1) {
- tImgNavBottom.SetReplace("${NAV_IMG}", iFile);
- tImgNavBottom.SetReplace("${NAV_IMGS}", iFilesCount);
- } else {
- tImgNavBottom.SetReplace("${NAV_NAV}", GetImgPagesNavigation(iFilesCount, iFile));
- }
- if (iImgNavStyleBottom==3)
- {
- tImgNavBottom.SetReplace("${NAV_TEXT}", ReplaceExifStrings(cImgNavUsrText, cFileName, cDestPath + cImgFileName));
- }
-
- tImg.SetReplace("${NAVTOP}", tImgNavTop.Replace());
- tImg.SetReplace("${NAVBOTTOM}", tImgNavBottom.Replace());
-
- // IMAGE TABLE
- tImgDescCol.SetReplace("${IMG_DESC}", ReplaceExifStrings(cImgDesc, cFileName, cDestPath + cImgFileName));
- tImgRow.SetReplace("${DESC_COLS}", tImgDescCol.Replace());
-
- tImgCol.SetReplace("${IMG_PAGE_FILENAME}", GetPageFN(iPage));
- tImgCol.SetReplace("${IMG_FILENAME}", cImgFileName);
- tImgCol.SetReplace("${IMG_WIDTH}", pImg.GetWidth());
- tImgCol.SetReplace("${IMG_HEIGHT}", pImg.GetHeight());
- tImgRow.SetReplace("${IMG_COLS}", tImgCol.Replace());
-
- if (bImgOriginal) {
- tImgOrgCol.SetReplace("${ORG_FILENAME}", cOrgFileName);
- tImgOrgCol.SetReplace("${ORG_DESC}", ReplaceExifStrings(cImgOrgDesc, cFileName, ""));
- CopyFile(cFileName, cDestPath + cOrgFileName, FIL_OM_OVERWRITE);
- tImgRow.SetReplace("${ORG_COLS}", tImgOrgCol.Replace());
- }
- else
- {
- tImgRow.SetReplace("${ORG_COLS}", "<td></td>");
- }
- tImg.SetReplace("${ROWS}", tImgRow.Replace());
-
- // IMAGE FOOTER
- var txtImgFooter="";
- if (bImgFooter)
- {
- txtImgFooter=ReplaceExifStrings(cImgFooter, cFileName, cDestPath + cImgFileName);
- txtImgFooter="<p><span class=\"footer\">"+txtImgFooter+"</span></p>";
- }
- tImg.SetReplace("${FOOTER}", txtImgFooter);
-
- // IMAGE SAVE
- SaveString(cDestPath + GetImgPageFN(iFile), tImg.Replace(), 0);
-
-
- // MAKE THUMB
- pImg.Resize(iThnWidth, iThnHeight, GFX_KEEP_ASPECT | GFX_INTERPOLATE);
- //BOOL CJSImage::Draw(CJSImage* pDstImage, CJSRect* pSrcRect, int iPosX, int iPosY, int iAlpha, int iFlags)
- var rcMag = pMagImg1.GetRect();
- if (bThnMag) {
- pMagImg1.Draw(pImg, rcMag, pImg.GetWidth()-rcMag.Width()-1, pImg.GetHeight()-rcMag.Height()-1, 192, GFX_KEEP_ALPHA);
- }
- pImg.SaveAs(cDestPath + cThnFileName, JPGformat, iTNJPEG, 0);
-
- // THUMB TABLE
- tDescCol.SetReplace("${IMG_DESC}", ReplaceExifStrings(cDesc, cFileName, cDestPath + cImgFileName));
- cDescCols += tDescCol.Replace();
-
- tThnCol.SetReplace("${IMG_PAGE_FILENAME}", GetImgPageFN(iFile));
- tThnCol.SetReplace("${IMG_FILENAME}", cThnFileName);
- tThnCol.SetReplace("${IMG_WIDTH}", pImg.GetWidth());
- tThnCol.SetReplace("${IMG_HEIGHT}", pImg.GetHeight());
- cImgCols += tThnCol.Replace();
-
-
- if (bOriginal) {
- tOrgCol.SetReplace("${ORG_FILENAME}", cOrgFileName);
- tOrgCol.SetReplace("${ORG_DESC}", ReplaceExifStrings(cOrgDesc, cFileName, cFileName));
- if (!bImgOriginal) { // if not copied in IMAGE processing
- CopyFile(cFileName, cDestPath + cOrgFileName, FIL_OM_OVERWRITE);
- }
- cOrgCols += tOrgCol.Replace();
- }
-
- pImg.Close();
-
- } else { // no other files to process, make table complete
- cDescCols += " <td class=\"img_desc_td_empty\"></td>\r\n";
- cImgCols += " <td class=\"img_td_empty\"></td>\r\n";
- if (bOriginal) {
- cOrgCols += " <td class=\"img_org_td_empty\"></td>\r\n";
- }
- }
-
- iCol++;
-
- if (iCol >= iCols) {
- if (cDescCols=="")
- cDescCols="<td></td>";
- if (cImgCols=="")
- cImgCols="<td></td>";
- if (cOrgCols=="")
- cOrgCols="<td></td>";
- tRow.SetReplace("${DESC_COLS}", cDescCols);
- tRow.SetReplace("${IMG_COLS}", cImgCols);
- tRow.SetReplace("${ORG_COLS}", cOrgCols);
- cRows += tRow.Replace();
-
- cDescCols = "";
- cImgCols = "";
- cOrgCols = "";
- iCol = 0;
-
- iRow++;
- }
- else
- { //bugfix?
- tRow.SetReplace("${DESC_COLS}", "<td></td>");
- tRow.SetReplace("${IMG_COLS}", "<td></td>");
- tRow.SetReplace("${ORG_COLS}", "<td></td>");
- }
-
- if ((iRow >= iRows) || ((iFile >= iFilesCount) && (iCol == 0))) {
-
- if (iPage > 1) {
- tNav.SetReplace("${NAV_FIRST}", "<a href=\""+GetPageFN(1)+"\">|<</a>");
- tNav.SetReplace("${NAV_PREV}", "<a href=\""+GetPageFN(iPage-1)+"\"><<</a>");
- } else {
- tNav.SetReplace("${NAV_FIRST}", "|<");
- tNav.SetReplace("${NAV_PREV}", "<<");
- }
- if (iPage < iPagesCount) {
- tNav.SetReplace("${NAV_NEXT}", "<a href=\""+GetPageFN(iPage+1)+"\">>></a>");
- tNav.SetReplace("${NAV_LAST}", "<a href=\""+GetPageFN(iPagesCount)+"\">>|</a>");
- } else {
- tNav.SetReplace("${NAV_NEXT}", ">>");
- tNav.SetReplace("${NAV_LAST}", ">|");
- }
- if (iNavStyle == 1) {
- tNav.SetReplace("${NAV_PAGE}", iPage);
- tNav.SetReplace("${NAV_PAGES}", iPagesCount);
- tNav.SetReplace("${NAV_IMGFROM}", iImgFrom);
- tNav.SetReplace("${NAV_IMGTO}", iImgTo);
- tNav.SetReplace("${NAV_IMGS}", iFilesCount);
- } else {
- tNav.SetReplace("${NAV_NAV}", GetPagesNavigation(iPagesCount, iPage));
- }
- if (iNavPosition==1)
- {
- tPage.SetReplace("${NAVTOP}", tNav.Replace());
- tPage.SetReplace("${NAVBOTTOM}", "");
- }
- if (iNavPosition==2)
- {
- tPage.SetReplace("${NAVTOP}", "");
- tPage.SetReplace("${NAVBOTTOM}", tNav.Replace());
- }
- if (iNavPosition==3)
- {
- tPage.SetReplace("${NAVTOP}", tNav.Replace());
- tPage.SetReplace("${NAVBOTTOM}", tNav.Replace());
- }
- tPage.SetReplace("${ROWS}", cRows);
-
- SaveString(cDestPath + GetPageFN(iPage), tPage.Replace(), 0);
-
- cRows = "";
- iRow = 0;
-
- iImgFrom = iFile + 1;
-
- iPage++;
- }
-
- }
-
- return cDestPath + GetPageFN(1);
-
- }
-
- INIT_OK;
-