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 (x86)/Microsoft Office/Templates/1028/WEBS11/album.wiz/horizontal/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : C:/Program Files (x86)/Microsoft Office/Templates/1028/WEBS11/album.wiz/horizontal/HORIZ.XSL
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:script><![CDATA[
  var gMaxHeight = 0;
	var gnumPerRow = ""

  function breakRow(e) {
		if (gnumPerRow == "") {
			gnumPerRow = e.selectSingleNode("//options").getAttribute("numperrow");
		}
		return ((absoluteChildNumber(e) - 1)%gnumPerRow) == 0;
  } 

  function notPreviewOutput(e) {
		if (e.selectSingleNode("/xml[@output='preview']")) {
			return false;
		} else {
			return true;
		}
  }

  function NBSP()
  {
		return "document.write(\"<td bgcolor='#AAAAAA' width='1'>&nbsp;</td>\");";
  }
  	
  function rowEnd(e) {
		if (gnumPerRow == "") {
			gnumPerRow = e.selectSingleNode("//options").getAttribute("numperrow");
		}
		var childList = e.selectSingleNode("//pictures").childNodes;
		return ((absoluteChildNumber(e))%gnumPerRow) == 0 || childList.length == absoluteChildNumber(e);
  } 
    
	//generate a random int to identify the functions and objects in this gallery
	var rnd = Math.round(Math.random() * 10000);	

  function setMaxHeight(e) {
  var childList = e.selectSingleNode("//pictures").childNodes;
  var maxHeight = 0;
  for (i=0;i<childList.length;i++) {
    if (parseInt(childList[i].getAttribute("thumbheight")) > maxHeight) {
      maxHeight = parseInt(childList[i].getAttribute("thumbheight"));
    }
  }
  gMaxHeight = maxHeight;
  }
  
]]></xsl:script>

<!--
	the template block describes this template.
	this info is used by FP when building the photo gallery dialog
-->
<template>
	<title>
	橫式版面配置</title>
	<description>- 您的圖像的縮圖會自動建立。
- 縮圖圖像出現在多列之上。
- 說明文字位在每個圖像之下。		
	</description>
	<defaults imgPerRow="7" thumbWidth="100"/>
	<dependent-files/>
</template>

<xsl:template><xsl:copy><xsl:apply-templates select="@* | * | comment() | pi() | text()"/></xsl:copy></xsl:template>

<xsl:template match="/">
	<xsl:eval>
		setMaxHeight(this)
	</xsl:eval>
	<xsl:apply-templates select="xml"/>
</xsl:template>

<!-- this template has identical Preview and Real output -->
<xsl:template match="xml[@output != 'subpage']">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title><xsl:value-of select="//options/@pageName"/></title>
</head>
<body>
<xsl:if expr="notPreviewOutput(this)">
<picture file-href="real_p.htm"/> 
<picture file-href="real_x.htm"/>
</xsl:if>
<table border="0" cellspacing="0" cellpadding="0">
	<xsl:attribute name="id">fpGalleryTable_<xsl:eval>rnd</xsl:eval></xsl:attribute>
  <tr>
  <xsl:for-each select="//pictures">
    <xsl:apply-templates/>
  </xsl:for-each>
  </tr>
  <tr>
    <td>
			<xsl:attribute name="colspan"><xsl:eval>gnumPerRow</xsl:eval></xsl:attribute>
		</td>
  </tr>
</table>
</body>
</html>
</xsl:template>


<!-- this is the output we generate for each sub page of the gallery -->
<xsl:template match="xml[@output='subpage']">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title><xsl:value-of select="//picture/caption"/></title>
</head>
<body>
<div align="center">
	<table width="100%" align="center">
		<tr>
			<td width="100%" align="center" colspan="3">
			<img hspace="10" border="0">
			<xsl:attribute name="width"><xsl:value-of select="//picture/@filewidth"/></xsl:attribute>
			<xsl:attribute name="height"><xsl:value-of select="//picture/@fileheight"/></xsl:attribute>
			<xsl:attribute name="src"><xsl:value-of select="//picture/@file-href"/></xsl:attribute>
			<xsl:attribute name="title"><xsl:value-of select="//picture/caption"/></xsl:attribute>
			</img>
			</td>
		</tr>
		<tr><td colspan="3"><xsl:apply-templates select="//picture/caption"/></td></tr>
		<tr><td colspan="3"><xsl:apply-templates select="//picture/desc"/></td></tr>
		<tr>
			<td><a><xsl:attribute name="href"><xsl:value-of select="//picture/@prevImgPath"/></xsl:attribute>前一個圖像</a></td>
			<td><a><xsl:attribute name="href"><xsl:value-of select="//picture/@galleryPath"/></xsl:attribute>回到圖庫</a></td>
			<td><a><xsl:attribute name="href"><xsl:value-of select="//picture/@nextImgPath"/></xsl:attribute>下一個圖像</a></td>
		</tr>
	</table>
</div>
</body>
</html>
</xsl:template>

	
<xsl:template match="picture">
	<xsl:if expr="breakRow(this)">
	<tr><td height="10"></td>
	</tr>
	<tr/>
	</xsl:if>

	<xsl:choose>
	<xsl:when expr="rowEnd(this)">
	<xsl:if expr="notPreviewOutput(this)">
		<script language="JavaScript1.1">
		if (navigator.appName == "Netscape")
			<xsl:eval no-entities="t">NBSP()</xsl:eval>
		</script>
	</xsl:if>
    <td valign="top">
	<xsl:attribute name="style">border-left-style: solid; border-left-width: 1; border-left-color:black;
		border-right-style: solid; border-right-width: 1; border-right-color:black</xsl:attribute>
      <table border="0" cellpadding="2" cellspacing="0" align="center" width="120">
        <tr>
		    <td valign="top" align="center">
			<xsl:attribute name="height"><xsl:eval>gMaxHeight + 20</xsl:eval></xsl:attribute>
			<a>
            <xsl:attribute name="href"><xsl:value-of select="@file-href"/></xsl:attribute>
            <img border="0" vspace="5" hspace="12">
            <xsl:attribute name="src"><xsl:value-of select="@thumb-href"/></xsl:attribute>
						<xsl:attribute name="width"><xsl:value-of select="@thumbwidth"/></xsl:attribute>           
            <xsl:attribute name="height"><xsl:value-of select="@thumbheight"/></xsl:attribute>
            <xsl:attribute name="title"><xsl:value-of select="@caption"/></xsl:attribute>            
            </img></a>
			</td>
        </tr>
        <tr>
			<td valign="top">
			<xsl:apply-templates select="caption"/>
			<xsl:value-of select="@desc"/>
						<xsl:apply-templates select="desc"/>
			</td>
        </tr>
      </table>
    </td>
	<xsl:if expr="notPreviewOutput(this)">
		<script language="JavaScript1.1">
		if (navigator.appName == "Netscape")
			<xsl:eval no-entities="t">NBSP()</xsl:eval>
		</script>
	</xsl:if>
	</xsl:when>
	<xsl:otherwise>
	<xsl:if expr="notPreviewOutput(this)">
		<script language="JavaScript1.1">
		if (navigator.appName == "Netscape")
			<xsl:eval no-entities="t">NBSP()</xsl:eval>
		</script>
	</xsl:if>
    <td valign="top">
	<xsl:attribute name="style">border-left-style: solid; border-left-width: 1; border-left-color:black</xsl:attribute>
      <table border="0" cellpadding="2" cellspacing="0" align="center" width="120">
        <tr>
		    <td valign="top" align="center">
			<xsl:attribute name="height"><xsl:eval>gMaxHeight + 20</xsl:eval></xsl:attribute>
			<a>
            <xsl:attribute name="href"><xsl:value-of select="@file-href"/></xsl:attribute>
            <img border="0" vspace="5" hspace="12">
            <xsl:attribute name="src"><xsl:value-of select="@thumb-href"/></xsl:attribute>
						<xsl:attribute name="width"><xsl:value-of select="@thumbwidth"/></xsl:attribute>           
            <xsl:attribute name="height"><xsl:value-of select="@thumbheight"/></xsl:attribute>
            <xsl:attribute name="title"><xsl:value-of select="@caption"/></xsl:attribute>            
            </img></a>
			</td>
        </tr>
        <tr>
			<td valign="top">
			<xsl:apply-templates select="caption"/>
			<xsl:value-of select="@desc"/>
					<xsl:apply-templates select="desc"/>
			</td>
        </tr>
      </table>
    </td>		
	</xsl:otherwise>
	</xsl:choose>
</xsl:template>


<xsl:template match="caption | desc"><xsl:apply-templates/></xsl:template>

</xsl:stylesheet>