Guest User

Untitled

a guest
Feb 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.03 KB | None | 0 0
  1. <xar:set name="firstrow">1</xar:set>
  2. <xar:set name="dummy">xarTplSetPageTemplateName('excel')</xar:set>
  3. <xar:set name="dummy">xarModAPILoad('sitecontact', 'user')</xar:set>
  4. <xar:set name="responses">xarModAPIFunc('sitecontact', 'user', 'getall',
  5. array('startnum' => 1,
  6. 'numitems' => -1,
  7. 'scid' => 2));</xar:set>
  8. <xar:set name="dummy">xarSessionGetVar('test');</xar:set>
  9. xxx #$dummy#
  10.  
  11. <xar:if condition="count($responses) gt 0">
  12. <xar:foreach in="$responses" value="$responseinfo">
  13.  
  14. <xar:if condition="xarModIsHooked('dynamicdata')">
  15. <xar:data-getitem name="$properties" module="sitecontact" itemid="$responseinfo['scrid']" itemtype="2" />
  16. </xar:if>
  17.  
  18. <xar:if condition="$firstrow eq 1">
  19.  
  20. <xar:set name="columncount">count($properties) + 12</xar:set>
  21. <xar:set name="ttlresponses">count($responses) + 1</xar:set>
  22.  
  23. <Worksheet ss:Name="Site Contact Export">
  24. <Table ss:ExpandedColumnCount="#$columncount#" ss:ExpandedRowCount="#$ttlresponses#" x:FullColumns="1" x:FullRows="1">
  25.  
  26. <Row>
  27. <Cell><Data ss:Type="String">User name</Data></Cell>
  28. <Cell><Data ss:Type="String">Email</Data></Cell>
  29. <Cell><Data ss:Type="String">Subject</Data></Cell>
  30. <Cell><Data ss:Type="String">Organization</Data></Cell>
  31. <Cell><Data ss:Type="String">Message</Data></Cell>
  32. <Cell><Data ss:Type="String">User IP</Data></Cell>
  33. <Cell><Data ss:Type="String">Referer</Data></Cell>
  34. <Cell><Data ss:Type="String">Requested a copy</Data></Cell>
  35. <Cell><Data ss:Type="String">Permission given</Data></Cell>
  36. <Cell><Data ss:Type="String">Copy list</Data></Cell>
  37. <Cell><Data ss:Type="String">BB Copy list</Data></Cell>
  38. <Cell><Data ss:Type="String">Response Time</Data></Cell>
  39. <xar:if condition="xarModIsHooked('dynamicdata')">
  40. <xar:if condition="isset($properties) and count($properties) gt 0">
  41. <xar:foreach in="$properties" key="$name">
  42. <Cell><Data ss:Type="String"><xar:data-label property="$properties[$name]" /></Data></Cell>
  43. </xar:foreach>
  44. </xar:if>
  45. </xar:if>
  46. </Row>
  47.  
  48. <xar:set name="firstrow">0</xar:set>
  49.  
  50. </xar:if>
  51.  
  52.  
  53. <Row>
  54. <Cell><Data ss:Type="String">#xarVarPrepForDisplay($responseinfo.username)#</Data></Cell>
  55. <Cell><Data ss:Type="String">#$responseinfo.useremail#</Data></Cell>
  56. <Cell><Data ss:Type="String">#xarVarPrepForDisplay($responseinfo.requesttext)#</Data></Cell>
  57. <Cell><Data ss:Type="String">#xarVarPrepForDisplay($responseinfo.company)#</Data></Cell>
  58. <Cell><Data ss:Type="String">#$responseinfo.usermessage#</Data></Cell>
  59. <Cell><Data ss:Type="String">#$responseinfo.useripaddress#</Data></Cell>
  60. <Cell><Data ss:Type="String">#$responseinfo.userreferer#</Data></Cell>
  61. <Cell><Data ss:Type="String">
  62. <xar:if condition="$responseinfo.sendcopy">
  63. <xar:mlstring>Yes</xar:mlstring>
  64. <xar:else />
  65. <xar:mlstring>No</xar:mlstring>
  66. </xar:if>
  67. </Data></Cell>
  68. <Cell><Data ss:Type="String">
  69. <xar:if condition="$responseinfo.permission">
  70. <xar:mlstring>Yes</xar:mlstring>
  71. <xar:else />
  72. <xar:mlstring>No</xar:mlstring>
  73. </xar:if>
  74. <xar:if condition="isset($responseinfo['permissioncheck'])">
  75. <xar:mlstring> (Permission requested)</xar:mlstring>
  76. <xar:else />
  77. <xar:mlstring> (No permission requested)</xar:mlstring>
  78. </xar:if>
  79. </Data></Cell>
  80. <Cell><Data ss:Type="String">
  81. <xar:if condition="is_array($responseinfo.ccrecipients)">
  82. <xar:foreach in="$responseinfo.ccrecipients" key="$k" value="$v">
  83. #$k#,
  84. </xar:foreach>
  85. <xar:else/>
  86. <xar:mlstring>None</xar:mlstring>
  87. </xar:if>
  88. </Data></Cell>
  89. <Cell><Data ss:Type="String">
  90. <xar:if condition="is_array($responseinfo.bccrecipients)">
  91. <xar:foreach in="$responseinfo.bccrecipients" key="$k" value="$v">
  92. #$k#,
  93. </xar:foreach>
  94. <xar:else />
  95. <xar:mlstring>None</xar:mlstring>
  96. </xar:if>
  97. </Data></Cell>
  98. <Cell><Data ss:Type="String">#xarLocaleGetFormattedDate('medium', $responseinfo.responsetime)#
  99. #xarLocaleGetFormattedTime('medium', $responseinfo.responsetime)#
  100. </Data></Cell>
  101. <xar:if condition="xarModIsHooked('dynamicdata')">
  102. <xar:if condition="isset($properties) and count($properties) gt 0">
  103. <xar:foreach in="$properties" key="$name">
  104. <Cell><Data ss:Type="String"><xar:data-output property="$properties[$name]" /></Data></Cell>
  105. </xar:foreach>
  106. </xar:if>
  107. </xar:if>
  108. </Row>
  109.  
  110. </xar:foreach>
  111.  
  112. </Table>
  113. <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
  114. <Print>
  115. <ValidPrinterInfo/>
  116. <HorizontalResolution>600</HorizontalResolution>
  117. <VerticalResolution>600</VerticalResolution>
  118. </Print>
  119. <Selected/>
  120. <Panes>
  121. <Pane>
  122. <Number>3</Number>
  123. <ActiveRow>1</ActiveRow>
  124. <ActiveCol>1</ActiveCol>
  125. </Pane>
  126. </Panes>
  127. <ProtectObjects>False</ProtectObjects>
  128. <ProtectScenarios>False</ProtectScenarios>
  129. </WorksheetOptions>
  130. </Worksheet>
  131. <Worksheet ss:Name="Sheet2">
  132. <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
  133. <ProtectObjects>False</ProtectObjects>
  134. <ProtectScenarios>False</ProtectScenarios>
  135. </WorksheetOptions>
  136. </Worksheet>
  137. <Worksheet ss:Name="Sheet3">
  138. <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
  139. <ProtectObjects>False</ProtectObjects>
  140. <ProtectScenarios>False</ProtectScenarios>
  141. </WorksheetOptions>
  142. </Worksheet>
  143. </xar:if>
Add Comment
Please, Sign In to add comment