Changeset 25 for trunk/template/default/htmlfunctions.inc.php
- Timestamp:
- Jul 21, 2003, 9:38:38 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/template/default/htmlfunctions.inc.php
r14 r25 1 1 <?php 2 2 /*************************************************************************** 3 * htmlfunctions.inc.php is a part of PhpWebGallery*3 * htmlfunctions.inc.php * 4 4 * ------------------- * 5 * last update : Wednesday, 25 December 2002*6 * email : pierrick@z0rglub.com*5 * application : PhpWebGallery 1.3 * 6 * author : Pierrick LE GALL <pierrick@z0rglub.com> * 7 7 * * 8 8 *************************************************************************** … … 16 16 ***************************************************************************/ 17 17 18 include( PREFIX_INCLUDE.'./template/'.$user['template'].'/theme/conf.php' ); 19 $user['lien_expanded']='./template/'.$user['template'].'/theme/expanded.gif'; 20 $user['lien_collapsed']='./template/'.$user['template'].'/theme/collapsed.gif'; 21 include_once( PREFIX_INCLUDE.'./template/'.$user['template'].'/style.inc.php'); 22 18 23 function get_icon( $date_comparaison ) 19 24 { … … 24 29 if ( $difference < $user['long_period'] * $jours ) 25 30 { 26 $icon_url = './t heme/'.$user['theme'].'/';31 $icon_url = './template/'.$user['template'].'/theme/'; 27 32 if ( $difference < $user['short_period'] * $jours ) 28 33 { … … 98 103 return '<table style="width:'; 99 104 } 100 105 /* 101 106 function get_frame_begin() 102 107 { … … 113 118 </table>'; 114 119 } 115 /* 120 */ 121 116 122 function get_frame_begin() 117 123 { 118 124 global $user; 119 $path = './t heme/'.$user['theme'].'/';125 $path = './template/'.$user['template'].'/theme/'; 120 126 $size_01 = getimagesize( $path.'01.gif' ); 121 127 $size_02 = getimagesize( $path.'02.gif' ); … … 135 141 { 136 142 global $user; 137 $path = './t heme/'.$user['theme'].'/';143 $path = './template/'.$user['template'].'/theme/'; 138 144 $size_08 = getimagesize( $path.'08.gif' ); 139 145 return ' … … 148 154 </table>'; 149 155 } 150 */ 156 151 157 function initialize_template() 152 158 { 153 global $vtp, $handle, $user; 154 159 global $vtp, $handle, $user, $lang; 160 161 $vtp->setGlobalVar( $handle, 'charset', $lang['charset'] ); 155 162 $vtp->setGlobalVar( $handle, 'style', $user['style'] ); 156 163 $vtp->setGlobalVar( $handle, 'frame_start', get_frame_start() ); … … 162 169 './template/'.$user['template'].'/footer.htm' ); 163 170 } 171 172 function display_category( $category, $indent, $handle ) 173 { 174 global $user,$lang,$vtp; 175 176 $vtp->addSession( $handle, 'category' ); 177 $vtp->setVar( $handle, 'category.indent', $indent ); 178 179 if ( $user['expand'] or count( $category['subcats'] ) == 0 ) 180 { 181 $vtp->addSession( $handle, 'bullet_wo_link' ); 182 $vtp->setVar( $handle, 'bullet_wo_link.bullet_url', 183 $user['lien_collapsed'] ); 184 $vtp->closeSession( $handle, 'bullet_wo_link' ); 185 } 186 else 187 { 188 $vtp->addSession( $handle, 'bullet_w_link' ); 189 $url = './category.php?cat='.$page['cat']; 190 $url.= '&expand='.$category['expand_string']; 191 if ( $page['cat'] == 'search' ) 192 { 193 $url.= '&search='.$_GET['search'].'&mode='.$_GET['mode']; 194 } 195 $vtp->setVar( $handle, 'bullet_w_link.bullet_link', add_session_id($url) ); 196 if ( $category['expanded'] ) 197 { 198 $vtp->setVar( $handle, 'bullet_w_link.bullet_url', 199 $user['lien_expanded'] ); 200 } 201 else 202 { 203 $vtp->setVar( $handle, 'bullet_w_link.bullet_url', 204 $user['lien_collapsed'] ); 205 } 206 $vtp->closeSession( $handle, 'bullet_w_link' ); 207 } 208 209 $url = './category.php?cat='.$category['id']; 210 $url.= '&expand='.$category['expand_string']; 211 $vtp->setVar( $handle, 'category.link_url', add_session_id( $url ) ); 212 213 $name = $category['name']; 214 if ( $name == '' ) $name = str_replace( '_', ' ', $category['dir'] ); 215 $vtp->setVar( $handle, 'category.link_name', $name ); 216 217 if ( $category['id_uppercat'] == '' ) 218 { 219 $vtp->setVar( $handle, 'category.name_style', 'font-weight:bold;' ); 220 } 221 if ( count( $category['subcats'] ) > 0 ) 222 { 223 $vtp->addSession( $handle, 'subcat' ); 224 $vtp->setVar( $handle, 'subcat.nb_subcats', count($category['subcats']) ); 225 $vtp->closeSession( $handle, 'subcat' ); 226 } 227 $vtp->setVar( $handle, 'category.total_cat', $category['nb_images'] ); 228 $vtp->setVar( $handle, 'category.cat_icon',get_icon($category['date_last'])); 229 $vtp->closeSession( $handle, 'category' ); 230 231 // recursive call 232 if ( $category['expanded'] ) 233 { 234 foreach ( $category['subcats'] as $subcat ) { 235 display_category( $subcat, $indent.str_repeat( ' ', 2 ), $handle ); 236 } 237 } 238 } 164 239 ?>
Note: See TracChangeset
for help on using the changeset viewer.