/var/ezwebin_site/cache/template/compiled/page_header_languages-c5dc1772a2d92b2df9825dbc4bcb4f84.php

https://bitbucket.org/ericsagnes/ezpublish-multisite · PHP · 412 lines · 372 code · 28 blank · 12 comment · 64 complexity · 237a2ccf109e4db6ef552d219f8cc0b4 MD5 · raw file

  1. <?php
  2. // URI: extension/ezwebin/design/ezwebin/templates/page_header_languages.tpl
  3. // Filename: extension/ezwebin/design/ezwebin/templates/page_header_languages.tpl
  4. // Timestamp: 1373438496 (Wed Jul 10 15:41:36 JST 2013)
  5. $oldSetArray_7be50258c98e334f48d328387dc0d102 = isset( $setArray ) ? $setArray : array();
  6. $setArray = array();
  7. $tpl->Level++;
  8. if ( $tpl->Level > 40 )
  9. {
  10. $text = $tpl->MaxLevelWarning;$tpl->Level--;
  11. return;
  12. }
  13. $eZTemplateCompilerCodeDate = 1074699607;
  14. if ( !defined( 'EZ_TEMPLATE_COMPILER_COMMON_CODE' ) )
  15. include_once( 'var/ezwebin_site/cache/template/compiled/common.php' );
  16. $text .= '<div id="languages">
  17. <ul>
  18. ';
  19. // if begins
  20. unset( $if_cond );
  21. unset( $if_cond1 );
  22. unset( $if_cond2 );
  23. $namespace = $rootNamespace;
  24. if ( $namespace == '' )
  25. $namespace = "DesignKeys";
  26. else
  27. $namespace .= ':DesignKeys';
  28. unset( $if_cond2 );
  29. $if_cond2 = ( array_key_exists( $namespace, $vars ) and array_key_exists( 'used', $vars[$namespace] ) ) ? $vars[$namespace]['used'] : null;
  30. $if_cond3 = compiledFetchAttribute( $if_cond2, 'url_alias' );
  31. unset( $if_cond2 );
  32. $if_cond2 = $if_cond3;
  33. if (! isset( $if_cond2 ) ) $if_cond2 = NULL;
  34. while ( is_object( $if_cond2 ) and method_exists( $if_cond2, 'templateValue' ) )
  35. $if_cond2 = $if_cond2->templateValue();
  36. $if_cond1 = isset( $if_cond2 );unset( $if_cond2 );
  37. if (! isset( $if_cond1 ) ) $if_cond1 = NULL;
  38. while ( is_object( $if_cond1 ) and method_exists( $if_cond1, 'templateValue' ) )
  39. $if_cond1 = $if_cond1->templateValue();
  40. unset( $if_cond2 );
  41. unset( $if_cond3 );
  42. $namespace = $rootNamespace;
  43. if ( $namespace == '' )
  44. $namespace = "DesignKeys";
  45. else
  46. $namespace .= ':DesignKeys';
  47. unset( $if_cond3 );
  48. $if_cond3 = ( array_key_exists( $namespace, $vars ) and array_key_exists( 'used', $vars[$namespace] ) ) ? $vars[$namespace]['used'] : null;
  49. $if_cond4 = compiledFetchAttribute( $if_cond3, 'url_alias' );
  50. unset( $if_cond3 );
  51. $if_cond3 = $if_cond4;
  52. if (! isset( $if_cond3 ) ) $if_cond3 = NULL;
  53. while ( is_object( $if_cond3 ) and method_exists( $if_cond3, 'templateValue' ) )
  54. $if_cond3 = $if_cond3->templateValue();
  55. $if_cond3Data = array( 'value' => $if_cond3 );
  56. $tpl->processOperator( 'count',
  57. array (
  58. ),
  59. $rootNamespace, $currentNamespace, $if_cond3Data, false, false );
  60. $if_cond3 = $if_cond3Data['value'];
  61. unset( $if_cond3Data );
  62. if (! isset( $if_cond3 ) ) $if_cond3 = NULL;
  63. while ( is_object( $if_cond3 ) and method_exists( $if_cond3, 'templateValue' ) )
  64. $if_cond3 = $if_cond3->templateValue();
  65. $if_cond2 = ( ( $if_cond3 ) >= ( 1 ) );
  66. unset( $if_cond3 );
  67. if (! isset( $if_cond2 ) ) $if_cond2 = NULL;
  68. while ( is_object( $if_cond2 ) and method_exists( $if_cond2, 'templateValue' ) )
  69. $if_cond2 = $if_cond2->templateValue();
  70. if ( !$if_cond1 )
  71. $if_cond = false;
  72. else if ( !$if_cond2 )
  73. $if_cond = false;
  74. else
  75. $if_cond = $if_cond2;
  76. unset( $if_cond1, $if_cond2 );
  77. if (! isset( $if_cond ) ) $if_cond = NULL;
  78. while ( is_object( $if_cond ) and method_exists( $if_cond, 'templateValue' ) )
  79. $if_cond = $if_cond->templateValue();
  80. if ( $if_cond )
  81. {
  82. $text .= ' ';
  83. // def $avail_translation
  84. unset( $var );
  85. if (! isset( $var ) ) $var = NULL;
  86. while ( is_object( $var ) and method_exists( $var, 'templateValue' ) )
  87. $var = $var->templateValue();
  88. $varData = array( 'value' => $var );
  89. $tpl->processOperator( 'language_switcher',
  90. array (
  91. 0 =>
  92. array (
  93. 0 =>
  94. array (
  95. 0 => 4,
  96. 1 =>
  97. array (
  98. 0 => 'DesignKeys',
  99. 1 => 2,
  100. 2 => 'used',
  101. ),
  102. 2 => false,
  103. ),
  104. 1 =>
  105. array (
  106. 0 => 5,
  107. 1 =>
  108. array (
  109. 0 =>
  110. array (
  111. 0 => 3,
  112. 1 => 'url_alias',
  113. 2 => false,
  114. ),
  115. ),
  116. 2 => false,
  117. ),
  118. ),
  119. ),
  120. $rootNamespace, $currentNamespace, $varData, false, false );
  121. $var = $varData['value'];
  122. unset( $varData );
  123. if (! isset( $var ) ) $var = NULL;
  124. while ( is_object( $var ) and method_exists( $var, 'templateValue' ) )
  125. $var = $var->templateValue();
  126. if ( $tpl->hasVariable( 'avail_translation', $rootNamespace ) )
  127. {
  128. $tpl->warning( 'def', "Variable 'avail_translation' is already defined.", array (
  129. 0 =>
  130. array (
  131. 0 => 4,
  132. 1 => 8,
  133. 2 => 132,
  134. ),
  135. 1 =>
  136. array (
  137. 0 => 4,
  138. 1 => 80,
  139. 2 => 204,
  140. ),
  141. 2 => 'extension/ezwebin/design/ezwebin/templates/page_header_languages.tpl',
  142. ) );
  143. $tpl->setVariable( 'avail_translation', $var, $rootNamespace );
  144. }
  145. else
  146. {
  147. $tpl->setLocalVariable( 'avail_translation', $var, $rootNamespace );
  148. }
  149. $text .= ' ';
  150. }
  151. else
  152. {
  153. $text .= ' ';
  154. // def $avail_translation
  155. unset( $var );
  156. if (! isset( $var ) ) $var = NULL;
  157. while ( is_object( $var ) and method_exists( $var, 'templateValue' ) )
  158. $var = $var->templateValue();
  159. $varData = array( 'value' => $var );
  160. $tpl->processOperator( 'language_switcher',
  161. array (
  162. 0 =>
  163. array (
  164. 0 =>
  165. array (
  166. 0 => 4,
  167. 1 =>
  168. array (
  169. 0 => '',
  170. 1 => 2,
  171. 2 => 'site',
  172. ),
  173. 2 => false,
  174. ),
  175. 1 =>
  176. array (
  177. 0 => 5,
  178. 1 =>
  179. array (
  180. 0 =>
  181. array (
  182. 0 => 3,
  183. 1 => 'uri',
  184. 2 => false,
  185. ),
  186. ),
  187. 2 => false,
  188. ),
  189. 2 =>
  190. array (
  191. 0 => 5,
  192. 1 =>
  193. array (
  194. 0 =>
  195. array (
  196. 0 => 3,
  197. 1 => 'original_uri',
  198. 2 => false,
  199. ),
  200. ),
  201. 2 => false,
  202. ),
  203. ),
  204. ),
  205. $rootNamespace, $currentNamespace, $varData, false, false );
  206. $var = $varData['value'];
  207. unset( $varData );
  208. if (! isset( $var ) ) $var = NULL;
  209. while ( is_object( $var ) and method_exists( $var, 'templateValue' ) )
  210. $var = $var->templateValue();
  211. if ( $tpl->hasVariable( 'avail_translation', $rootNamespace ) )
  212. {
  213. $tpl->warning( 'def', "Variable 'avail_translation' is already defined.", array (
  214. 0 =>
  215. array (
  216. 0 => 6,
  217. 1 => 8,
  218. 2 => 226,
  219. ),
  220. 1 =>
  221. array (
  222. 0 => 6,
  223. 1 => 75,
  224. 2 => 293,
  225. ),
  226. 2 => 'extension/ezwebin/design/ezwebin/templates/page_header_languages.tpl',
  227. ) );
  228. $tpl->setVariable( 'avail_translation', $var, $rootNamespace );
  229. }
  230. else
  231. {
  232. $tpl->setLocalVariable( 'avail_translation', $var, $rootNamespace );
  233. }
  234. $text .= ' ';
  235. }
  236. unset( $if_cond );
  237. // if ends
  238. $text .= ' ';
  239. // foreach begins
  240. $skipDelimiter = true;
  241. if ( !isset( $fe_variable_stack_65eab94fa08f961243669b6b2d7bf636_9 ) ) $fe_variable_stack_65eab94fa08f961243669b6b2d7bf636_9 = array();
  242. $fe_variable_stack_65eab94fa08f961243669b6b2d7bf636_9[] = compact( 'fe_array_65eab94fa08f961243669b6b2d7bf636_9', 'fe_array_keys_65eab94fa08f961243669b6b2d7bf636_9', 'fe_n_items_65eab94fa08f961243669b6b2d7bf636_9', 'fe_n_items_processed_65eab94fa08f961243669b6b2d7bf636_9', 'fe_i_65eab94fa08f961243669b6b2d7bf636_9', 'fe_key_65eab94fa08f961243669b6b2d7bf636_9', 'fe_val_65eab94fa08f961243669b6b2d7bf636_9', 'fe_offset_65eab94fa08f961243669b6b2d7bf636_9', 'fe_max_65eab94fa08f961243669b6b2d7bf636_9', 'fe_reverse_65eab94fa08f961243669b6b2d7bf636_9', 'fe_first_val_65eab94fa08f961243669b6b2d7bf636_9', 'fe_last_val_65eab94fa08f961243669b6b2d7bf636_9' );
  243. unset( $fe_array_65eab94fa08f961243669b6b2d7bf636_9 );
  244. unset( $fe_array_65eab94fa08f961243669b6b2d7bf636_9 );
  245. $fe_array_65eab94fa08f961243669b6b2d7bf636_9 = ( array_key_exists( $rootNamespace, $vars ) and array_key_exists( 'avail_translation', $vars[$rootNamespace] ) ) ? $vars[$rootNamespace]['avail_translation'] : null;
  246. if (! isset( $fe_array_65eab94fa08f961243669b6b2d7bf636_9 ) ) $fe_array_65eab94fa08f961243669b6b2d7bf636_9 = NULL;
  247. while ( is_object( $fe_array_65eab94fa08f961243669b6b2d7bf636_9 ) and method_exists( $fe_array_65eab94fa08f961243669b6b2d7bf636_9, 'templateValue' ) )
  248. $fe_array_65eab94fa08f961243669b6b2d7bf636_9 = $fe_array_65eab94fa08f961243669b6b2d7bf636_9->templateValue();
  249. $fe_array_keys_65eab94fa08f961243669b6b2d7bf636_9 = is_array( $fe_array_65eab94fa08f961243669b6b2d7bf636_9 ) ? array_keys( $fe_array_65eab94fa08f961243669b6b2d7bf636_9 ) : array();
  250. $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9 = count( $fe_array_keys_65eab94fa08f961243669b6b2d7bf636_9 );
  251. $fe_n_items_processed_65eab94fa08f961243669b6b2d7bf636_9 = 0;
  252. $fe_offset_65eab94fa08f961243669b6b2d7bf636_9 = 0;
  253. $fe_max_65eab94fa08f961243669b6b2d7bf636_9 = $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9 - $fe_offset_65eab94fa08f961243669b6b2d7bf636_9;
  254. $fe_reverse_65eab94fa08f961243669b6b2d7bf636_9 = false;
  255. if ( $fe_offset_65eab94fa08f961243669b6b2d7bf636_9 < 0 || $fe_offset_65eab94fa08f961243669b6b2d7bf636_9 >= $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9 )
  256. {
  257. $fe_offset_65eab94fa08f961243669b6b2d7bf636_9 = ( $fe_offset_65eab94fa08f961243669b6b2d7bf636_9 < 0 ) ? 0 : $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9;
  258. if ( $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9 || $fe_offset_65eab94fa08f961243669b6b2d7bf636_9 < 0 )
  259. {
  260. eZDebug::writeWarning("Invalid 'offset' parameter specified: '$fe_offset_65eab94fa08f961243669b6b2d7bf636_9'. Array count: $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9");
  261. }
  262. }
  263. if ( $fe_max_65eab94fa08f961243669b6b2d7bf636_9 < 0 || $fe_offset_65eab94fa08f961243669b6b2d7bf636_9 + $fe_max_65eab94fa08f961243669b6b2d7bf636_9 > $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9 )
  264. {
  265. if ( $fe_max_65eab94fa08f961243669b6b2d7bf636_9 < 0 )
  266. eZDebug::writeWarning("Invalid 'max' parameter specified: $fe_max_65eab94fa08f961243669b6b2d7bf636_9");
  267. $fe_max_65eab94fa08f961243669b6b2d7bf636_9 = $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9 - $fe_offset_65eab94fa08f961243669b6b2d7bf636_9;
  268. }
  269. if ( $fe_reverse_65eab94fa08f961243669b6b2d7bf636_9 )
  270. {
  271. $fe_first_val_65eab94fa08f961243669b6b2d7bf636_9 = $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9 - 1 - $fe_offset_65eab94fa08f961243669b6b2d7bf636_9;
  272. $fe_last_val_65eab94fa08f961243669b6b2d7bf636_9 = 0;
  273. }
  274. else
  275. {
  276. $fe_first_val_65eab94fa08f961243669b6b2d7bf636_9 = $fe_offset_65eab94fa08f961243669b6b2d7bf636_9;
  277. $fe_last_val_65eab94fa08f961243669b6b2d7bf636_9 = $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9 - 1;
  278. }
  279. // foreach
  280. for ( $fe_i_65eab94fa08f961243669b6b2d7bf636_9 = $fe_first_val_65eab94fa08f961243669b6b2d7bf636_9; $fe_n_items_processed_65eab94fa08f961243669b6b2d7bf636_9 < $fe_max_65eab94fa08f961243669b6b2d7bf636_9 && ( $fe_reverse_65eab94fa08f961243669b6b2d7bf636_9 ? $fe_i_65eab94fa08f961243669b6b2d7bf636_9 >= $fe_last_val_65eab94fa08f961243669b6b2d7bf636_9 : $fe_i_65eab94fa08f961243669b6b2d7bf636_9 <= $fe_last_val_65eab94fa08f961243669b6b2d7bf636_9 ); $fe_reverse_65eab94fa08f961243669b6b2d7bf636_9 ? $fe_i_65eab94fa08f961243669b6b2d7bf636_9-- : $fe_i_65eab94fa08f961243669b6b2d7bf636_9++ )
  281. {
  282. $fe_key_65eab94fa08f961243669b6b2d7bf636_9 = $fe_array_keys_65eab94fa08f961243669b6b2d7bf636_9[$fe_i_65eab94fa08f961243669b6b2d7bf636_9];
  283. $fe_val_65eab94fa08f961243669b6b2d7bf636_9 = $fe_array_65eab94fa08f961243669b6b2d7bf636_9[$fe_key_65eab94fa08f961243669b6b2d7bf636_9];
  284. $vars[$rootNamespace]['lang'] = $fe_val_65eab94fa08f961243669b6b2d7bf636_9;
  285. $vars[$rootNamespace]['siteaccess'] = $fe_key_65eab94fa08f961243669b6b2d7bf636_9;
  286. $text .= ' <li';
  287. // if begins
  288. unset( $if_cond );
  289. unset( $if_cond1 );
  290. unset( $if_cond1 );
  291. $if_cond1 = ( array_key_exists( $rootNamespace, $vars ) and array_key_exists( 'siteaccess', $vars[$rootNamespace] ) ) ? $vars[$rootNamespace]['siteaccess'] : null;
  292. if (! isset( $if_cond1 ) ) $if_cond1 = NULL;
  293. while ( is_object( $if_cond1 ) and method_exists( $if_cond1, 'templateValue' ) )
  294. $if_cond1 = $if_cond1->templateValue();
  295. unset( $if_cond2 );
  296. unset( $if_cond2 );
  297. $if_cond2 = ( array_key_exists( $rootNamespace, $vars ) and array_key_exists( 'access_type', $vars[$rootNamespace] ) ) ? $vars[$rootNamespace]['access_type'] : null;
  298. $if_cond3 = compiledFetchAttribute( $if_cond2, 'name' );
  299. unset( $if_cond2 );
  300. $if_cond2 = $if_cond3;
  301. if (! isset( $if_cond2 ) ) $if_cond2 = NULL;
  302. while ( is_object( $if_cond2 ) and method_exists( $if_cond2, 'templateValue' ) )
  303. $if_cond2 = $if_cond2->templateValue();
  304. $if_cond = ( ( $if_cond1 ) == ( $if_cond2 ) );
  305. unset( $if_cond1, $if_cond2 );
  306. if (! isset( $if_cond ) ) $if_cond = NULL;
  307. while ( is_object( $if_cond ) and method_exists( $if_cond, 'templateValue' ) )
  308. $if_cond = $if_cond->templateValue();
  309. if ( $if_cond )
  310. {
  311. $text .= ' class="current_siteaccess"';
  312. }
  313. unset( $if_cond );
  314. // if ends
  315. $text .= '><a href=';
  316. unset( $var );
  317. unset( $var1 );
  318. unset( $var1 );
  319. $var1 = ( array_key_exists( $rootNamespace, $vars ) and array_key_exists( 'lang', $vars[$rootNamespace] ) ) ? $vars[$rootNamespace]['lang'] : null;
  320. $var2 = compiledFetchAttribute( $var1, 'url' );
  321. unset( $var1 );
  322. $var1 = $var2;
  323. if (! isset( $var1 ) ) $var1 = NULL;
  324. while ( is_object( $var1 ) and method_exists( $var1, 'templateValue' ) )
  325. $var1 = $var1->templateValue();
  326. while ( is_object( $var1 ) and method_exists( $var1, 'templateValue' ) )
  327. $var1 = $var1->templateValue();
  328. eZURI::transformURI( $var1, false, eZURI::getTransformURIMode() );
  329. $var1 = '"' . $var1 . '"';
  330. $var = $var1;
  331. unset( $var1 );
  332. if (! isset( $var ) ) $var = NULL;
  333. while ( is_object( $var ) and method_exists( $var, 'templateValue' ) )
  334. $var = $var->templateValue();
  335. $text .= $var;
  336. unset( $var );
  337. $text .= '>';
  338. unset( $var );
  339. unset( $var1 );
  340. unset( $var1 );
  341. $var1 = ( array_key_exists( $rootNamespace, $vars ) and array_key_exists( 'lang', $vars[$rootNamespace] ) ) ? $vars[$rootNamespace]['lang'] : null;
  342. $var2 = compiledFetchAttribute( $var1, 'text' );
  343. unset( $var1 );
  344. $var1 = $var2;
  345. if (! isset( $var1 ) ) $var1 = NULL;
  346. while ( is_object( $var1 ) and method_exists( $var1, 'templateValue' ) )
  347. $var1 = $var1->templateValue();
  348. while ( is_object( $var1 ) and method_exists( $var1, 'templateValue' ) )
  349. $var1 = $var1->templateValue();
  350. $var = htmlspecialchars( $var1 );
  351. unset( $var1 );
  352. if (! isset( $var ) ) $var = NULL;
  353. while ( is_object( $var ) and method_exists( $var, 'templateValue' ) )
  354. $var = $var->templateValue();
  355. $text .= $var;
  356. unset( $var );
  357. $text .= '</a></li>
  358. ';
  359. $fe_n_items_processed_65eab94fa08f961243669b6b2d7bf636_9++;
  360. } // foreach
  361. $skipDelimiter = false;
  362. if ( count( $fe_variable_stack_65eab94fa08f961243669b6b2d7bf636_9 ) ) extract( array_pop( $fe_variable_stack_65eab94fa08f961243669b6b2d7bf636_9 ) );
  363. else
  364. {
  365. unset( $fe_array_65eab94fa08f961243669b6b2d7bf636_9 );
  366. unset( $fe_array_keys_65eab94fa08f961243669b6b2d7bf636_9 );
  367. unset( $fe_n_items_65eab94fa08f961243669b6b2d7bf636_9 );
  368. unset( $fe_n_items_processed_65eab94fa08f961243669b6b2d7bf636_9 );
  369. unset( $fe_i_65eab94fa08f961243669b6b2d7bf636_9 );
  370. unset( $fe_key_65eab94fa08f961243669b6b2d7bf636_9 );
  371. unset( $fe_val_65eab94fa08f961243669b6b2d7bf636_9 );
  372. unset( $fe_offset_65eab94fa08f961243669b6b2d7bf636_9 );
  373. unset( $fe_max_65eab94fa08f961243669b6b2d7bf636_9 );
  374. unset( $fe_reverse_65eab94fa08f961243669b6b2d7bf636_9 );
  375. unset( $fe_first_val_65eab94fa08f961243669b6b2d7bf636_9 );
  376. unset( $fe_last_val_65eab94fa08f961243669b6b2d7bf636_9 );
  377. unset( $fe_variable_stack_65eab94fa08f961243669b6b2d7bf636_9 );
  378. }
  379. // foreach ends
  380. $text .= ' </ul>
  381. </div>';
  382. $setArray = $oldSetArray_7be50258c98e334f48d328387dc0d102;
  383. $tpl->Level--;
  384. ?>