Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <xar:set name="firstrow">1</xar:set>
- <xar:set name="dummy">xarTplSetPageTemplateName('excel')</xar:set>
- <xar:set name="dummy">xarModAPILoad('sitecontact', 'user')</xar:set>
- <xar:set name="responses">xarModAPIFunc('sitecontact', 'user', 'getall',
- array('startnum' => 1,
- 'numitems' => -1,
- 'scid' => 2));</xar:set>
- <xar:set name="dummy">xarSessionGetVar('test');</xar:set>
- xxx #$dummy#
- <xar:if condition="count($responses) gt 0">
- <xar:foreach in="$responses" value="$responseinfo">
- <xar:if condition="xarModIsHooked('dynamicdata')">
- <xar:data-getitem name="$properties" module="sitecontact" itemid="$responseinfo['scrid']" itemtype="2" />
- </xar:if>
- <xar:if condition="$firstrow eq 1">
- <xar:set name="columncount">count($properties) + 12</xar:set>
- <xar:set name="ttlresponses">count($responses) + 1</xar:set>
- <Worksheet ss:Name="Site Contact Export">
- <Table ss:ExpandedColumnCount="#$columncount#" ss:ExpandedRowCount="#$ttlresponses#" x:FullColumns="1" x:FullRows="1">
- <Row>
- <Cell><Data ss:Type="String">User name</Data></Cell>
- <Cell><Data ss:Type="String">Email</Data></Cell>
- <Cell><Data ss:Type="String">Subject</Data></Cell>
- <Cell><Data ss:Type="String">Organization</Data></Cell>
- <Cell><Data ss:Type="String">Message</Data></Cell>
- <Cell><Data ss:Type="String">User IP</Data></Cell>
- <Cell><Data ss:Type="String">Referer</Data></Cell>
- <Cell><Data ss:Type="String">Requested a copy</Data></Cell>
- <Cell><Data ss:Type="String">Permission given</Data></Cell>
- <Cell><Data ss:Type="String">Copy list</Data></Cell>
- <Cell><Data ss:Type="String">BB Copy list</Data></Cell>
- <Cell><Data ss:Type="String">Response Time</Data></Cell>
- <xar:if condition="xarModIsHooked('dynamicdata')">
- <xar:if condition="isset($properties) and count($properties) gt 0">
- <xar:foreach in="$properties" key="$name">
- <Cell><Data ss:Type="String"><xar:data-label property="$properties[$name]" /></Data></Cell>
- </xar:foreach>
- </xar:if>
- </xar:if>
- </Row>
- <xar:set name="firstrow">0</xar:set>
- </xar:if>
- <Row>
- <Cell><Data ss:Type="String">#xarVarPrepForDisplay($responseinfo.username)#</Data></Cell>
- <Cell><Data ss:Type="String">#$responseinfo.useremail#</Data></Cell>
- <Cell><Data ss:Type="String">#xarVarPrepForDisplay($responseinfo.requesttext)#</Data></Cell>
- <Cell><Data ss:Type="String">#xarVarPrepForDisplay($responseinfo.company)#</Data></Cell>
- <Cell><Data ss:Type="String">#$responseinfo.usermessage#</Data></Cell>
- <Cell><Data ss:Type="String">#$responseinfo.useripaddress#</Data></Cell>
- <Cell><Data ss:Type="String">#$responseinfo.userreferer#</Data></Cell>
- <Cell><Data ss:Type="String">
- <xar:if condition="$responseinfo.sendcopy">
- <xar:mlstring>Yes</xar:mlstring>
- <xar:else />
- <xar:mlstring>No</xar:mlstring>
- </xar:if>
- </Data></Cell>
- <Cell><Data ss:Type="String">
- <xar:if condition="$responseinfo.permission">
- <xar:mlstring>Yes</xar:mlstring>
- <xar:else />
- <xar:mlstring>No</xar:mlstring>
- </xar:if>
- <xar:if condition="isset($responseinfo['permissioncheck'])">
- <xar:mlstring> (Permission requested)</xar:mlstring>
- <xar:else />
- <xar:mlstring> (No permission requested)</xar:mlstring>
- </xar:if>
- </Data></Cell>
- <Cell><Data ss:Type="String">
- <xar:if condition="is_array($responseinfo.ccrecipients)">
- <xar:foreach in="$responseinfo.ccrecipients" key="$k" value="$v">
- #$k#,
- </xar:foreach>
- <xar:else/>
- <xar:mlstring>None</xar:mlstring>
- </xar:if>
- </Data></Cell>
- <Cell><Data ss:Type="String">
- <xar:if condition="is_array($responseinfo.bccrecipients)">
- <xar:foreach in="$responseinfo.bccrecipients" key="$k" value="$v">
- #$k#,
- </xar:foreach>
- <xar:else />
- <xar:mlstring>None</xar:mlstring>
- </xar:if>
- </Data></Cell>
- <Cell><Data ss:Type="String">#xarLocaleGetFormattedDate('medium', $responseinfo.responsetime)#
- #xarLocaleGetFormattedTime('medium', $responseinfo.responsetime)#
- </Data></Cell>
- <xar:if condition="xarModIsHooked('dynamicdata')">
- <xar:if condition="isset($properties) and count($properties) gt 0">
- <xar:foreach in="$properties" key="$name">
- <Cell><Data ss:Type="String"><xar:data-output property="$properties[$name]" /></Data></Cell>
- </xar:foreach>
- </xar:if>
- </xar:if>
- </Row>
- </xar:foreach>
- </Table>
- <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
- <Print>
- <ValidPrinterInfo/>
- <HorizontalResolution>600</HorizontalResolution>
- <VerticalResolution>600</VerticalResolution>
- </Print>
- <Selected/>
- <Panes>
- <Pane>
- <Number>3</Number>
- <ActiveRow>1</ActiveRow>
- <ActiveCol>1</ActiveCol>
- </Pane>
- </Panes>
- <ProtectObjects>False</ProtectObjects>
- <ProtectScenarios>False</ProtectScenarios>
- </WorksheetOptions>
- </Worksheet>
- <Worksheet ss:Name="Sheet2">
- <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
- <ProtectObjects>False</ProtectObjects>
- <ProtectScenarios>False</ProtectScenarios>
- </WorksheetOptions>
- </Worksheet>
- <Worksheet ss:Name="Sheet3">
- <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
- <ProtectObjects>False</ProtectObjects>
- <ProtectScenarios>False</ProtectScenarios>
- </WorksheetOptions>
- </Worksheet>
- </xar:if>
Add Comment
Please, Sign In to add comment