1 | {* $Id: index.tpl 2352 2008-05-20 00:27:26Z patdenice $ *} |
---|
2 | {$MENUBAR} |
---|
3 | {php} |
---|
4 | if (is_admin()) |
---|
5 | { |
---|
6 | global $template, $user; |
---|
7 | include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |
---|
8 | //include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php'); |
---|
9 | include_once(PHPWG_ROOT_PATH.'template/floPure/tools/version.conf.php'); |
---|
10 | include_once(PHPWG_ROOT_PATH.'template/floPure/tools/floPure.class.php'); |
---|
11 | load_language('template.lang', PHPWG_ROOT_PATH.'template/floPure/tools/'); |
---|
12 | $floPure = new floPure(); |
---|
13 | |
---|
14 | // Retrieve PEM versions |
---|
15 | $version = PHPWG_VERSION; |
---|
16 | $versions_to_check = array(); |
---|
17 | $url = PEM_URL . '/api/get_version_list.php?category_id=12&format=php'; |
---|
18 | if (fetchRemote($url, $result) and $pem_versions = @unserialize($result)) |
---|
19 | { |
---|
20 | if (!preg_match('/^\d+\.\d+\.\d+/', $version)) |
---|
21 | { |
---|
22 | $version = $pem_versions[0]['name']; |
---|
23 | } |
---|
24 | $branch = substr($version, 0, strrpos($version, '.')); |
---|
25 | foreach ($pem_versions as $pem_version) |
---|
26 | { |
---|
27 | if (strpos($pem_version['name'], $branch) === 0) |
---|
28 | { |
---|
29 | $versions_to_check[] = $pem_version['id']; |
---|
30 | } |
---|
31 | } |
---|
32 | } |
---|
33 | |
---|
34 | // Retrieve PEM template infos |
---|
35 | $url = PEM_URL . '/api/get_revision_list.php?format=php&last_revision_only=true'; |
---|
36 | $url .= '&version=' . implode(',', $versions_to_check); |
---|
37 | //$url .= '&lang=' . substr($user['language'], 0, 2); |
---|
38 | $url .= '&extension_include=135'; |
---|
39 | fetchRemote($url, $result); |
---|
40 | $pem_res = @unserialize($result); |
---|
41 | foreach($pem_res as $pem_floPure) |
---|
42 | { |
---|
43 | if (!is_array($pem_floPure)) |
---|
44 | { |
---|
45 | $template->assign( |
---|
46 | array( |
---|
47 | 'erreur' => 'erreur url : '.$url, |
---|
48 | ) |
---|
49 | ); |
---|
50 | } |
---|
51 | |
---|
52 | |
---|
53 | if (!$floPure->floPure_version_compare($floPure_conf['version'], $pem_floPure['revision_name'])) |
---|
54 | { |
---|
55 | $template->assign( |
---|
56 | array( |
---|
57 | 'test' => '<br />non à jour<br />', |
---|
58 | ) |
---|
59 | ); |
---|
60 | } |
---|
61 | else |
---|
62 | { |
---|
63 | $template->assign( |
---|
64 | array( |
---|
65 | 'test' => '<br />à jour<br />', |
---|
66 | ) |
---|
67 | ); |
---|
68 | |
---|
69 | } |
---|
70 | } |
---|
71 | |
---|
72 | } |
---|
73 | |
---|
74 | {/php} |
---|
75 | {$erreur} |
---|
76 | {$test} |
---|
77 | {if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if} |
---|
78 | <div id="content" class="content"> |
---|
79 | <table id="table_content" border="0" cellspacing="0" cellpadding="0"> |
---|
80 | <tr> |
---|
81 | <td id="section_up_left"> </td> |
---|
82 | <td id="section_up"> </td> |
---|
83 | <td id="section_up_right"> </td> |
---|
84 | </tr> |
---|
85 | <tr> |
---|
86 | <td id="section_left"> </td> |
---|
87 | <td id="section_in"> |
---|
88 | <div class="titrePage"> |
---|
89 | <ul class="categoryActions"> |
---|
90 | {if !empty($image_orders) } |
---|
91 | <li> |
---|
92 | {'Sort order'|@translate}: |
---|
93 | <select onchange="document.location = this.options[this.selectedIndex].value;"> |
---|
94 | {foreach from=$image_orders item=image_order } |
---|
95 | <option value="{$image_order.URL}"{if $image_order.SELECTED} selected="selected"{/if}>{$image_order.DISPLAY}</option> |
---|
96 | {/foreach} |
---|
97 | </select> |
---|
98 | </li> |
---|
99 | {/if} |
---|
100 | |
---|
101 | {if isset($U_CADDIE) } |
---|
102 | <li><a href="{$U_CADDIE}" title="{'add to caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"/></a></li> |
---|
103 | {/if} |
---|
104 | |
---|
105 | {if isset($U_EDIT) } |
---|
106 | <li><a href="{$U_EDIT}" title="{'edit category informations'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"/></a></li> |
---|
107 | {/if} |
---|
108 | |
---|
109 | {if isset($U_SEARCH_RULES) } |
---|
110 | <li><a href="{$U_SEARCH_RULES}" onclick="popuphelp(this.href); return false;" title="{'Search rules'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/search_rules.png" class="button" alt="(?)" /></a></li> |
---|
111 | {/if} |
---|
112 | |
---|
113 | {if isset($U_SLIDESHOW) } |
---|
114 | <li><a href="{$U_SLIDESHOW}" title="{'slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_slideshow.png" class="button" alt="{'slideshow'|@translate}"/></a></li> |
---|
115 | {/if} |
---|
116 | |
---|
117 | {if isset($U_MODE_FLAT) } |
---|
118 | <li><a href="{$U_MODE_FLAT}" title="{'mode_flat_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/flat.png" class="button" alt="{'mode_flat_hint'|@translate}" /></a></li> |
---|
119 | {/if} |
---|
120 | |
---|
121 | {if isset($U_MODE_NORMAL) } |
---|
122 | <li><a href="{$U_MODE_NORMAL}" title="{'mode_normal_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/normal_mode.png" class="button" alt="{'mode_normal_hint'|@translate}" /></a></li> |
---|
123 | {/if} |
---|
124 | |
---|
125 | {if isset($U_MODE_POSTED) } |
---|
126 | <li><a href="{$U_MODE_POSTED}" title="{'mode_posted_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar.png" class="button" alt="{'mode_posted_hint'|@translate}" /></a></li> |
---|
127 | {/if} |
---|
128 | |
---|
129 | {if isset($U_MODE_CREATED) } |
---|
130 | <li><a href="{$U_MODE_CREATED}" title="{'mode_created_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar_created.png" class="button" alt="{'mode_created_hint'|@translate}" /></a></li> |
---|
131 | {/if} |
---|
132 | |
---|
133 | {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if} |
---|
134 | </ul> |
---|
135 | |
---|
136 | <h2>{$TITLE}</h2> |
---|
137 | |
---|
138 | {if isset($chronology_views) } |
---|
139 | <div class="calendarViews">{'calendar_view'|@translate}: |
---|
140 | <select onchange="document.location = this.options[this.selectedIndex].value;"> |
---|
141 | {foreach from=$chronology_views item=view} |
---|
142 | <option value="{$view.VALUE}"{if $view.SELECTED} selected="selected"{/if}>{$view.CONTENT}</option> |
---|
143 | {/foreach} |
---|
144 | </select> |
---|
145 | </div> |
---|
146 | {/if} |
---|
147 | |
---|
148 | {if isset($chronology.TITLE) } |
---|
149 | <h2>{$chronology.TITLE}</h2> |
---|
150 | {/if} |
---|
151 | |
---|
152 | </div> <!-- titrePage --> |
---|
153 | |
---|
154 | {if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if} |
---|
155 | |
---|
156 | {if !empty($category_search_results) } |
---|
157 | <div style="font-size:16px;margin:10px 16px">{'Category results for'|@translate} <strong>{$QUERY_SEARCH}</strong> : |
---|
158 | <em><strong> |
---|
159 | {foreach from=$category_search_results item=res name=res_loop} |
---|
160 | {if !$smarty.foreach.res_loop.first} — {/if} |
---|
161 | {$res} |
---|
162 | {/foreach} |
---|
163 | </strong></em> |
---|
164 | </div> |
---|
165 | {/if} |
---|
166 | |
---|
167 | {if !empty($tag_search_results) } |
---|
168 | <div style="font-size:16px;margin:10px 16px">{'Tag results for'|@translate} <strong>{$QUERY_SEARCH}</strong> : |
---|
169 | <em><strong> |
---|
170 | {foreach from=$tag_search_results item=res name=res_loop} |
---|
171 | {if !$smarty.foreach.res_loop.first} — {/if} |
---|
172 | {$res} |
---|
173 | {/foreach} |
---|
174 | </strong></em> |
---|
175 | </div> |
---|
176 | {/if} |
---|
177 | |
---|
178 | {if isset($FILE_CHRONOLOGY_VIEW) } |
---|
179 | {include file=$FILE_CHRONOLOGY_VIEW} |
---|
180 | {/if} |
---|
181 | |
---|
182 | {if !empty($CATEGORIES) }{$CATEGORIES}{/if} |
---|
183 | {if !empty($THUMBNAILS) }{$THUMBNAILS}{/if} |
---|
184 | |
---|
185 | |
---|
186 | {if !empty($NAV_BAR) } |
---|
187 | <div class="navigationBar"> |
---|
188 | {$NAV_BAR} |
---|
189 | </div> |
---|
190 | {/if} |
---|
191 | |
---|
192 | {if !empty($CONTENT_DESCRIPTION) } |
---|
193 | <div class="additional_info"> |
---|
194 | {$CONTENT_DESCRIPTION} |
---|
195 | </div> |
---|
196 | {/if} |
---|
197 | |
---|
198 | {if !empty($PLUGIN_INDEX_CONTENT_END) }{$PLUGIN_INDEX_CONTENT_END}{/if} |
---|
199 | </td> |
---|
200 | <td id="section_right"> </td> |
---|
201 | </tr> |
---|
202 | <tr> |
---|
203 | <td id="section_bottom_left"> </td> |
---|
204 | <td id="section_bottom" > </td> |
---|
205 | <td id="section_bottom_right" > </td> |
---|
206 | </tr> |
---|
207 | </table> |
---|
208 | </div> <!-- content --> |
---|
209 | |
---|
210 | {if !empty($PLUGIN_INDEX_CONTENT_AFTER)}{$PLUGIN_INDEX_CONTENT_AFTER}{/if} |
---|