[Linpha-cvs] SF.net SVN: linpha: [4603] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-10-27 21:11:34
|
Revision: 4603 http://svn.sourceforge.net/linpha/?rev=4603&view=rev Author: fangehrn Date: 2006-10-27 14:10:23 -0700 (Fri, 27 Oct 2006) Log Message: ----------- 2006-10-27 flo * working on admin settings need to reset database * finished setting colors through admin settings Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/admin/index.php trunk/linpha2/admin/permissions_readwrite.php trunk/linpha2/admin/settings_layout.php trunk/linpha2/install/sql/sql.data.php trunk/linpha2/lib/classes/linpha.admin.class.php trunk/linpha2/lib/classes/linpha.template.class.php trunk/linpha2/lib/modules/module.filemanager.php trunk/linpha2/lib/plugins/watermark/func.watermark.php trunk/linpha2/templates/default/basket.html.php trunk/linpha2/templates/default/search.html.php trunk/linpha2/templates/default/settings.html.php trunk/linpha2/templates/default/themes/default/css/admin.css trunk/linpha2/templates/default/view_albcomment.html.php trunk/linpha2/templates/default/view_basket.html.php trunk/linpha2/templates/default/view_img.html.php trunk/linpha2/templates/default/view_img_static.html.php trunk/linpha2/templates/default/view_thumb.head.php trunk/linpha2/templates/default/view_thumb.html.php trunk/linpha2/templates/default/view_thumb_static.html.php trunk/linpha2/templates/default/view_thumbdetail.html.php trunk/linpha2/templates/roundcorners.php Removed Paths: ------------- trunk/linpha2/admin/admin.css Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/ChangeLog 2006-10-27 21:10:23 UTC (rev 4603) @@ -1,6 +1,8 @@ 2006-10-27 flo * working on admin settings need to reset database + + * finished setting colors through admin settings 2006-10-26 flo * playing around with different style colors, currently a blue one... Deleted: trunk/linpha2/admin/admin.css =================================================================== --- trunk/linpha2/admin/admin.css 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/admin/admin.css 2006-10-27 21:10:23 UTC (rev 4603) @@ -1,52 +0,0 @@ -form -{ - margin: 0; - padding: 0; -} - -.navlist -{ -padding: 3px 0; -margin-left: 0; -border-bottom: 1px solid #778; -font: bold 12px Verdana, sans-serif; -} - -.navlist li -{ -list-style: none; -margin: 0; -display: inline; -} - -.navlist li a -{ -padding: 3px 0.5em; -margin-left: 3px; -border: 1px solid #778; -border-bottom: none; -background: #DDE; -text-decoration: none; -} - -.navlist li a:link { color: #448; } -.navlist li a:visited { color: #667; } - -.navlist li a:hover -{ -color: #000; -background: #AAE; -border-color: #227; -} - -.navlist li a.current -{ -background: white; -border-bottom: 1px solid white; -} - - -.option_title -{ - font-weight: bold; -} \ No newline at end of file Modified: trunk/linpha2/admin/index.php =================================================================== --- trunk/linpha2/admin/index.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/admin/index.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -9,6 +9,7 @@ $linpha = new linpha(); $linpha->sql->startSession(); + $linpha->template = new linTemplate(); if(!$linpha->sql->isAdmin()) { @@ -21,13 +22,15 @@ include_once(LINPHA_DIR.'/lib/classes/linpha.admin.class.php'); $LinAdmin = new LinAdmin(); - /** - * @todo admin permission check + * output buffering, to use in template */ +ob_start(); + if( ! isset( $_GET['cat'] ) ) { + $_GET['cat'] = 'settings'; $cat1 = 'settings'; } else @@ -51,18 +54,20 @@ $cat4 = $array[3]; } } -?> -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + + +/*<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel='stylesheet' href='<?php echo LINPHA_DIR.'/admin/admin.css'; ?>' type='text/css'> <link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/css/syslog.css'; ?>' type='text/css'> </head> -<body> +<body>*/ +?> <?php $array_menu = Array( - 'linpha_home' => Array('name' => 'Linpha Home', 'link' => 'linpha_home'), + //'linpha_home' => Array('name' => 'Linpha Home', 'link' => 'linpha_home'), 'settings' => Array('name' => 'Settings', 'link' => 'settings'), 'permissions' => Array('name' => 'Permissions', 'link' => 'permissions'), 'import' => Array('name' => 'Import', 'link' => 'import'), @@ -89,7 +94,7 @@ ?> -<?php if( isset($GLOBALS['linpha']->template->output['sys_log']) ) { ?> +<?php /*if( isset($GLOBALS['linpha']->template->output['sys_log']) ) { ?> <!-- syslog --> <div id="sys_log"> <div id="sys_log_close"><a href="javascript:toggleWindow()">X</a></div> @@ -99,7 +104,17 @@ </div> </div> <script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/classes/syslog.js"> </script> -<?php } ?> +<?php } </body> -</html> \ No newline at end of file +</html> +*/ + +$linpha->template->output['default'] = ob_get_clean(); + +$linpha->template->setModuleName('default'); +$linpha->template->overrideModule('css','admin'); +$linpha->template->URL_full = LINPHA_DIR.'/admin/?cat='.$_GET['cat']; +$linpha->template->output['title'] = i18n("Admin"); +include_once(LINPHA_DIR.'/templates/'.$linpha->template->template_name.'/global.html.php'); +?> \ No newline at end of file Modified: trunk/linpha2/admin/permissions_readwrite.php =================================================================== --- trunk/linpha2/admin/permissions_readwrite.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/admin/permissions_readwrite.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -31,210 +31,211 @@ </form> <br /><hr /><br /> <?php - - if(! $GLOBALS['linpha']->sql->config->value['plugins_filemanager_enable']) - { - exit(); - } } -/** - * save POST data - */ -if(isset($_POST['cmd']) && $_POST['cmd'] == 'save_permissions') +if($GLOBALS['linpha']->sql->config->value['plugins_filemanager_enable']) { + /** - * insert or update + * save POST data */ - $query = $linpha->db->Execute("SELECT id FROM ".PREFIX."permissions " . - "WHERE photos_id = '".LinSql::linAddslashes($_POST['photo_id'])."' AND perm_type = '".$sql_perm_type."'"); - - /** - * if inherit is selected, delete if an entry exists - * and only if the photo_id != 0, because we can't delete - * the top permission entry!! - */ - if(isset($_POST['inherit'])) - { - if( ! $query->EOF && $_POST['photo_id'] != 0) + if(isset($_POST['cmd']) && $_POST['cmd'] == 'save_permissions') + { + /** + * insert or update + */ + $query = $linpha->db->Execute("SELECT id FROM ".PREFIX."permissions " . + "WHERE photos_id = '".LinSql::linAddslashes($_POST['photo_id'])."' AND perm_type = '".$sql_perm_type."'"); + + /** + * if inherit is selected, delete if an entry exists + * and only if the photo_id != 0, because we can't delete + * the top permission entry!! + */ + if(isset($_POST['inherit'])) { - $linpha->db->Execute("DELETE FROM ".PREFIX."permissions " . - "WHERE photos_id = '".LinSql::linAddslashes($_POST['photo_id'])."' " . - "AND perm_type = '".$sql_perm_type."'"); + if( ! $query->EOF && $_POST['photo_id'] != 0) + { + $linpha->db->Execute("DELETE FROM ".PREFIX."permissions " . + "WHERE photos_id = '".LinSql::linAddslashes($_POST['photo_id'])."' " . + "AND perm_type = '".$sql_perm_type."'"); + } } - } - else - { - if(isset($_POST['group'])) + else { - if(in_array('public',$_POST['group'])) + if(isset($_POST['group'])) { - $str_groups = 'public'; + if(in_array('public',$_POST['group'])) + { + $str_groups = 'public'; + } + else + { + $str_groups = implode(';',$_POST['group']); + } } else { - $str_groups = implode(';',$_POST['group']); + /** + * no group selected + * -> only admin has permissions + */ + $str_groups = ''; } + + if( ! $query->EOF ) + { + $linpha->db->Execute("UPDATE ".PREFIX."permissions SET permission = ';".LinSql::linAddslashes($str_groups).";' " . + "WHERE photos_id = '".LinSql::linAddslashes($_POST['photo_id'])."' AND perm_type = '".$sql_perm_type."'"); + } + else + { + $linpha->db->Execute("INSERT into ".PREFIX."permissions (photos_id, perm_type, permission) VALUES (" . + "'".LinSql::linAddslashes($_POST['photo_id'])."', '".$sql_perm_type."'," . + "';".LinSql::linAddslashes($str_groups).";' )"); + } } - else + } + + /** + * set parameters + */ + if(isset($_GET['parent_id']) && $_GET['parent_id'] != 0) + { + $parent_id = $_GET['parent_id']; + $view_mode = 'files'; + + $array = $GLOBALS['linpha']->sql->getFullFilenameFromId( LinSql::linAddslashes($parent_id) ); + + $parent_name = '<b>'.implode('/',$array).'</b>'; + $recursive = false; + } + else + { + $parent_id = 0; + $view_mode = 'folders'; + $parent_name = 'Top directory (default permission)'; + $recursive = true; + } + + /** + * get groups + */ + $array_groups = Array(); + $query = $GLOBALS['linpha']->db->Execute("SELECT id, group_name FROM ".PREFIX."groups WHERE group_name <> 'admin'"); + while($data = $query->FetchRow(ADODB_FETCH_NUM)) + { + $array_groups[$data[0]] = $data[1]; + } + + /** + * show edit/add permission dialog + */ + if(isset($_GET['cmd']) AND isset($_GET['id'])) + { + $checked = ''; + $array_perms = array(); + + /** + * check wether add or edit (insert or update) + */ + $query = $linpha->db->Execute("SELECT id FROM ".PREFIX."permissions " . + "WHERE photos_id = '".LinSql::linAddslashes($_GET['id'])."' AND perm_type = '".$sql_perm_type."'"); + + if( ! $query->EOF ) + { + list($stage, $perm) = $GLOBALS['linpha']->sql->getPerm( $_GET['id'], $sql_perm_type ); + $array_perms = explode(';',$perm); + + if(in_array('public',$array_perms)) { - /** - * no group selected - * -> only admin has permissions - */ - $str_groups = ''; + $checked = ' checked="checked"'; } + } - if( ! $query->EOF ) + $query = $GLOBALS['linpha']->db->Execute("SELECT name FROM ".PREFIX."photos " . + "WHERE id = '".LinSql::linAddslashes($_GET['id'])."'"); + $data = $query->FetchRow(ADODB_FETCH_NUM); + ?> + <form name="permission" method="POST" action="<?php echo LINPHA_DIR.'/admin/?cat=permissions_'.$cat2.'&parent_id='.$parent_id; ?>"> + <h3><?php echo i18n("Change/Add permissions of folder/file"); ?> "<?php echo $data[0]; ?>"</h3> + + <?php + /** + * top folder can't be inherit + * -> make sure we cannot delete this entry! + */ + if($_GET['id'] != 0) + { + ?> + <input type="checkbox" id="group_inherit" name="inherit" value="1" /><label for="group_inherit"> <?php echo i18n("Inherit From Parent"); ?></label><br /> + <?php + } + ?> + + <input type="checkbox" id="group_admin" name="admin" value="1" checked="checked" disabled="disabled"/><label for="group_admin"> admin</label><br /> + <input type="checkbox" id="group_public" name="group[]" value="public"<?php echo $checked; ?> /><label for="group_public"> public</label><br /> + + <?php + foreach($array_groups AS $key=>$value) + { + if(in_array($key,$array_perms)) { - $linpha->db->Execute("UPDATE ".PREFIX."permissions SET permission = ';".LinSql::linAddslashes($str_groups).";' " . - "WHERE photos_id = '".LinSql::linAddslashes($_POST['photo_id'])."' AND perm_type = '".$sql_perm_type."'"); + $checked = ' checked="checked"'; } else { - $linpha->db->Execute("INSERT into ".PREFIX."permissions (photos_id, perm_type, permission) VALUES (" . - "'".LinSql::linAddslashes($_POST['photo_id'])."', '".$sql_perm_type."'," . - "';".LinSql::linAddslashes($str_groups).";' )"); + $checked = ''; } - } -} - -/** - * set parameters - */ - if(isset($_GET['parent_id']) && $_GET['parent_id'] != 0) - { - $parent_id = $_GET['parent_id']; - $view_mode = 'files'; - $array = $GLOBALS['linpha']->sql->getFullFilenameFromId( LinSql::linAddslashes($parent_id) ); - - $parent_name = '<b>'.implode('/',$array).'</b>'; - $recursive = false; - } - else - { - $parent_id = 0; - $view_mode = 'folders'; - $parent_name = 'Top directory (default permission)'; - $recursive = true; - } - -/** - * get groups - */ - $array_groups = Array(); - $query = $GLOBALS['linpha']->db->Execute("SELECT id, group_name FROM ".PREFIX."groups WHERE group_name <> 'admin'"); - while($data = $query->FetchRow(ADODB_FETCH_NUM)) - { - $array_groups[$data[0]] = $data[1]; - } - -/** - * show edit/add permission dialog - */ -if(isset($_GET['cmd']) AND isset($_GET['id'])) -{ - $checked = ''; - $array_perms = array(); - - /** - * check wether add or edit (insert or update) - */ - $query = $linpha->db->Execute("SELECT id FROM ".PREFIX."permissions " . - "WHERE photos_id = '".LinSql::linAddslashes($_GET['id'])."' AND perm_type = '".$sql_perm_type."'"); - - if( ! $query->EOF ) - { - list($stage, $perm) = $GLOBALS['linpha']->sql->getPerm( $_GET['id'], $sql_perm_type ); - $array_perms = explode(';',$perm); - - if(in_array('public',$array_perms)) - { - $checked = ' checked="checked"'; + echo '<input type="checkbox" id="group_'.$key.'" name="group[]" value="'.$key.'"'.$checked.' /><label for="group_'.$key.'"> '.$value.'</a><br />'; } + ?> + <input type="hidden" name="photo_id" value="<?php echo $_GET['id']; ?>" /> + <input type="hidden" name="parent_id" value="<?php echo $parent_id; ?>" /> + <input type="hidden" name="cmd" value="save_permissions" /> + <input type="submit" name="submit" value="save" /> + <a href="<?php echo LINPHA_DIR.'/admin/?cat=permissions_'.$cat2.'&parent_id='.$parent_id; ?>">cancel</a> + </form> + <br /><br /> + <?php } - $query = $GLOBALS['linpha']->db->Execute("SELECT name FROM ".PREFIX."photos " . - "WHERE id = '".LinSql::linAddslashes($_GET['id'])."'"); - $data = $query->FetchRow(ADODB_FETCH_NUM); - ?> - <form name="permission" method="POST" action="<?php echo LINPHA_DIR.'/admin/?cat=permissions_'.$cat2.'&parent_id='.$parent_id; ?>"> - <h3><?php echo i18n("Change/Add permissions of folder/file"); ?> "<?php echo $data[0]; ?>"</h3> - <?php /** - * top folder can't be inherit - * -> make sure we cannot delete this entry! + * print permissions */ - if($_GET['id'] != 0) - { + list($stage, $perm) = $GLOBALS['linpha']->sql->getPerm( $parent_id, $sql_perm_type ); ?> - <input type="checkbox" id="group_inherit" name="inherit" value="1" /><label for="group_inherit"> <?php echo i18n("Inherit From Parent"); ?></label><br /> + Current directoy: <?php echo $parent_name; ?> <?php - } - ?> - - <input type="checkbox" id="group_admin" name="admin" value="1" checked="checked" disabled="disabled"/><label for="group_admin"> admin</label><br /> - <input type="checkbox" id="group_public" name="group[]" value="public"<?php echo $checked; ?> /><label for="group_public"> public</label><br /> - - <?php - foreach($array_groups AS $key=>$value) - { - if(in_array($key,$array_perms)) + if(isset($_GET['parent_id']) && $_GET['parent_id'] != 0) { - $checked = ' checked="checked"'; + echo ' (<a href="'.LINPHA_DIR.'/admin/?cat=permissions_'.$cat2.'&parent_id=0">Show all folders</a>)'; } - else - { - $checked = ''; - } - - echo '<input type="checkbox" id="group_'.$key.'" name="group[]" value="'.$key.'"'.$checked.' /><label for="group_'.$key.'"> '.$value.'</a><br />'; - } - ?> - <input type="hidden" name="photo_id" value="<?php echo $_GET['id']; ?>" /> - <input type="hidden" name="parent_id" value="<?php echo $parent_id; ?>" /> - <input type="hidden" name="cmd" value="save_permissions" /> - <input type="submit" name="submit" value="save" /> - <a href="<?php echo LINPHA_DIR.'/admin/?cat=permissions_'.$cat2.'&parent_id='.$parent_id; ?>">cancel</a> - </form> - <br /><br /> - <?php -} + ?> + <br /> + <?php echo i18n("Permission Set"); ?>: <b><?php echo getReadablePerms($perm); ?></b> + (<a href="<?php echo LINPHA_DIR.'/admin/?cat=permissions_'.$cat2.'&parent_id='.$parent_id.'&cmd=edit&id='.$parent_id; ?>">change</a>) + <br /><br /> + <table border='1'> + <tr> + <td width='200'><?php echo i18n("Name"); ?></td> + <td width='200'><?php echo i18n("Permission Set"); ?></td> + <td width='200'><?php echo i18n("Permission Inherited"); ?></td> + <td width='200'><?php echo i18n("Modifications"); ?></td> + </tr> + <?php + printDirPermsEntry( $parent_id , $recursive , $stage=0); + ?> + </table> + </form> + + <?php +} // end if plugin_filemanager_enable /** - * print permissions - */ - list($stage, $perm) = $GLOBALS['linpha']->sql->getPerm( $parent_id, $sql_perm_type ); - ?> - Current directoy: <?php echo $parent_name; ?> - <?php - if(isset($_GET['parent_id']) && $_GET['parent_id'] != 0) - { - echo ' (<a href="'.LINPHA_DIR.'/admin/?cat=permissions_'.$cat2.'&parent_id=0">Show all folders</a>)'; - } - ?> - <br /> - <?php echo i18n("Permission Set"); ?>: <b><?php echo getReadablePerms($perm); ?></b> - (<a href="<?php echo LINPHA_DIR.'/admin/?cat=permissions_'.$cat2.'&parent_id='.$parent_id.'&cmd=edit&id='.$parent_id; ?>">change</a>) - <br /><br /> - <table border='1'> - <tr> - <td width='200'><?php echo i18n("Name"); ?></td> - <td width='200'><?php echo i18n("Permission Set"); ?></td> - <td width='200'><?php echo i18n("Permission Inherited"); ?></td> - <td width='200'><?php echo i18n("Modifications"); ?></td> - </tr> - <?php - printDirPermsEntry( $parent_id , $recursive , $stage=0); - ?> - </table> - </form> - - <?php -/** * print the permission entries */ function printDirPermsEntry( $parent_id , $recursive , $stage) Modified: trunk/linpha2/admin/settings_layout.php =================================================================== --- trunk/linpha2/admin/settings_layout.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/admin/settings_layout.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -3,11 +3,11 @@ if(!isset($cat3)) { - $cat3 = 'home'; + $cat3 = 'layout'; } $array_menu = Array( - 'layout' => Array('name' => 'Layout', 'link' => 'settings_layout_layout'), + 'general' => Array('name' => 'General', 'link' => 'settings_layout_general'), 'home' => Array('name' => 'Home Site', 'link' => 'settings_layout_home'), 'thumb' => Array('name' => 'Thumb View', 'link' => 'settings_layout_thumb'), 'image' => Array('name' => 'Image View', 'link' => 'settings_layout_image'), @@ -22,10 +22,15 @@ switch($cat3) { -case 'layout': +case 'general': if(isset($_POST['cmd']) && $_POST['cmd']=='saveconfig') { + include_once(LINPHA_DIR.'/lib/plugins/watermark/func.watermark.php'); + $_POST['sys_style_layout_bodybgcolor'] = get_html_from_all($_POST['sys_style_layout_bodybgcolor']); + $_POST['sys_style_layout_elembgcolor'] = get_html_from_all($_POST['sys_style_layout_elembgcolor']); + $_POST['sys_style_layout_fontcolor'] = get_html_from_all($_POST['sys_style_layout_fontcolor']); + $LinAdmin->saveConfig(Array( 'sys_style_layout_title', 'sys_style_layout_template', @@ -36,11 +41,9 @@ )); } - print_r(LinAdmin::getTemplates()); - $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_title'),'sys_style_layout_title',$LinAdmin->option_value_system['sys_style_layout_title']); $LinAdmin->printAdminConfig('select',$LinAdmin->getDescriptionByOptionName('sys_style_layout_template'),'sys_style_layout_template',$LinAdmin->option_value_system['sys_style_layout_template'],LinAdmin::getTemplates()); - $LinAdmin->printAdminConfig('select',$LinAdmin->getDescriptionByOptionName('sys_style_layout_layout'),'sys_style_layout_layout',$LinAdmin->option_value_system['sys_style_layout_layout'],LinAdmin::getThemes($LinAdmin->option_value_system['sys_style_layout_template'])); + $LinAdmin->printAdminConfig('select',$LinAdmin->getDescriptionByOptionName('sys_style_layout_theme'),'sys_style_layout_theme',$LinAdmin->option_value_system['sys_style_layout_theme'],LinAdmin::getThemes($LinAdmin->option_value_system['sys_style_layout_template'])); $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_bodybgcolor'),'sys_style_layout_bodybgcolor',$LinAdmin->option_value_system['sys_style_layout_bodybgcolor']); $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_elembgcolor'),'sys_style_layout_elembgcolor',$LinAdmin->option_value_system['sys_style_layout_elembgcolor']); $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_fontcolor'),'sys_style_layout_fontcolor',$LinAdmin->option_value_system['sys_style_layout_fontcolor']); Modified: trunk/linpha2/install/sql/sql.data.php =================================================================== --- trunk/linpha2/install/sql/sql.data.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/install/sql/sql.data.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -76,7 +76,7 @@ 'sys_style_layout_bodybgcolor' => 'dddddd', 'sys_style_layout_elembgcolor' => '87cefa', 'sys_style_layout_fontcolor' => '000000', - 'sys_style_layout_layout' => 'default', + 'sys_style_layout_theme' => 'default', 'sys_style_layout_template' => 'default', 'sys_style_layout_title' => 'Linpha 2.0', Modified: trunk/linpha2/lib/classes/linpha.admin.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.admin.class.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/lib/classes/linpha.admin.class.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -316,14 +316,18 @@ function getTemplates() { - $templatesdir = LINPHA_DIR."/templates/"; + $templatesdir = LINPHA_DIR."/templates"; $file_handle = opendir($templatesdir); $all_themes = array(); while( ($file = readdir($file_handle)) !== false ) { - if($file != "." && $file != ".." && $file != ".svn" && is_dir($templatesdir.$file)) + if($file != "." && $file != ".." && $file != ".svn" && + is_dir($templatesdir.'/'.$file) && + file_exists($templatesdir.'/'.$file.'/global.html.php') && // do at least this check + file_exists($templatesdir.'/'.$file.'/themes') // do at least this check + ) { $all_themes[$file] = $file; } @@ -339,14 +343,14 @@ function getThemes($template) { - $templatesdir = LINPHA_DIR."/templates/".$template."/"; + $templatesdir = LINPHA_DIR."/templates/".$template."/themes"; $file_handle = opendir($templatesdir); $all_themes = array(); while( ($file = readdir($file_handle)) !== false ) { - if($file != "." && $file != ".." && $file != ".svn" && is_dir($templatesdir.$file)) + if($file != "." && $file != ".." && $file != ".svn" && is_dir($templatesdir.'/'.$file)) { $all_themes[$file] = $file; } Modified: trunk/linpha2/lib/classes/linpha.template.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.template.class.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/lib/classes/linpha.template.class.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -44,7 +44,7 @@ $this->linpha_title = $GLOBALS['linpha']->sql->config->value['sys_style_layout_title']; - $this->layoutsimagespath = LINPHA_DIR.'/templates/'.$this->template_name.'/layouts/'.$this->layout_name.'/images'; + $this->layoutsimagespath = LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/images'; } @@ -65,7 +65,7 @@ ?> <!-- css includes --> <link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/colorsettings.php?bgcolor='.$this->bgcolor.'&bodybgcolor='.$this->bodybgcolor.'&fontcolor='.$this->fontcolor; ?>' type='text/css'> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/layouts/'.$this->layout_name.'/css/global.css'; ?>' type='text/css'> +<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/global.css'; ?>' type='text/css'> <link rel='stylesheet' href='<?php $this->includeFile('css'); ?>' type='text/css'> <!-- IE hack for the menu--> <!--[if IE]> @@ -104,7 +104,7 @@ $filename = LINPHA_DIR.'/templates/'.$this->template_name.'/'.$this->head_name.'.head.php'; break; case 'css': - echo LINPHA_DIR.'/templates/'.$this->template_name.'/layouts/'.$this->layout_name.'/css/'.$this->css_name.'.css'; + echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/'.$this->css_name.'.css'; break; } @@ -207,15 +207,35 @@ } } - function divRoundCorners($top_bottom) + function divRoundCorners($top_bottom,$alpha='') { - if($top_bottom == 'top') + if(empty($alpha)) { - $str = '<div class="roundtop"><img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$this->bgcolor.'&bgcolor='.$this->bodybgcolor.'&size=15&align=tl" alt="" width="15" height="15" class="corner" style="display: none" /></div>'; + if($top_bottom == 'top') + { + $str = '<div class="roundtop">'; + $str .= '<img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$this->bgcolor.'&bgcolor='.$this->bodybgcolor.'&size=15&align=tl" alt="" width="15" height="15" class="corner" style="display: none" />'; + $str .= '</div>'; + } + elseif($top_bottom == 'bottom') + { + $str = '<div class="roundbottom">'; + $str .= '<img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$this->bgcolor.'&bgcolor='.$this->bodybgcolor.'&size=15&align=bl" alt="" width="15" height="15" class="corner" style="display: none" />'; + $str .= '</div>'; + } } - elseif($top_bottom == 'bottom') + else // currently only used in slideshow, does not work well in internet explorer { - $str = '<div class="roundbottom"><img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$this->bgcolor.'&bgcolor='.$this->bodybgcolor.'&size=15&align=bl" alt="" width="15" height="15" class="corner" style="display: none" /></div>'; + if($top_bottom == 'top') + { + } + elseif($top_bottom == 'bottom') + { + $str = '<div class="roundAlphabottom">'; + $str .= '<div class="roundAlphabottomInner"> </div>'; + $str .= '<img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$this->bgcolor.'&bgcolor='.$this->bodybgcolor.'&size=15&align=bl&alpha" alt="" width="15" height="15" class="AlphaCorner" style="display: none" />'; + $str .= '</div>'; + } } return $str; Modified: trunk/linpha2/lib/modules/module.filemanager.php =================================================================== --- trunk/linpha2/lib/modules/module.filemanager.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/lib/modules/module.filemanager.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -930,11 +930,12 @@ <?php -$linpha->template->output['filemanager'] = ob_get_clean(); +$linpha->template->output['default'] = ob_get_clean(); ?> <?php -$linpha->template->setModuleName('filemanager'); +$linpha->template->setModuleName('default'); +$linpha->template->overrideModule('css','filemanager'); $linpha->template->URL_full = LINPHA_DIR.'/?cat=filemanager&id='.$parent_id; $linpha->template->output['title'] = i18n("Filemanager"); include_once(LINPHA_DIR.'/templates/'.$linpha->template->template_name.'/global.html.php'); Modified: trunk/linpha2/lib/plugins/watermark/func.watermark.php =================================================================== --- trunk/linpha2/lib/plugins/watermark/func.watermark.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/lib/plugins/watermark/func.watermark.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -751,6 +751,39 @@ return $array_rgb; } +/** + * return html color without '#' + * + * used in linpha2 - admin - settings_layout + */ +function get_html_from_all($string) +{ + if(is_html_color($string)) + { + if(substr($string,0,1)=="#") + { + return substr($string,1,6); + } + else + { + return $string; + } + } + else + { + $str_col = get_html_from_color($string); + if(substr($str_col,0,1)=="#") + { + return substr($str_col,1,6); + } + + else + { + return '#000000'; + } + } +} + function calc_align($align, $src_w, $src_h, $dst_w, $dst_h, $pos_x, $pos_y) { /*########################################################## Modified: trunk/linpha2/templates/default/basket.html.php =================================================================== --- trunk/linpha2/templates/default/basket.html.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/basket.html.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -1,8 +1,6 @@ <div id="divnavigation"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="navigation"> <a style="float: left; margin-right: 2px;" class="button" href="<?php echo $_SESSION['basket_ref_url']; ?>"><?php echo i18n("Go Back"); ?></a> @@ -165,16 +163,12 @@ ?> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="main"> <form name="basket_remove" action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>&cmd=remove_selected" method="POST"> @@ -210,9 +204,7 @@ <input class="button" type="submit" name="submit" value="<?php echo i18n("Remove selected"); ?>" /> </form> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> </form> \ No newline at end of file Modified: trunk/linpha2/templates/default/search.html.php =================================================================== --- trunk/linpha2/templates/default/search.html.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/search.html.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -26,9 +26,8 @@ } ?> <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> + <div id="main"> <div class="divcolumn"> @@ -229,9 +228,7 @@ </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> <script language="JavaScript" type="text/javascript"> Modified: trunk/linpha2/templates/default/settings.html.php =================================================================== --- trunk/linpha2/templates/default/settings.html.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/settings.html.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -1,7 +1,5 @@ <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="main"> @@ -13,7 +11,5 @@ </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/themes/default/css/admin.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/admin.css 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/themes/default/css/admin.css 2006-10-27 21:10:23 UTC (rev 4603) @@ -6,31 +6,31 @@ .navlist { -padding: 3px 0; -margin-left: 0; -border-bottom: 1px solid #778; -font: bold 12px Verdana, sans-serif; + padding: 3px 0; + margin-left: 0; + border-bottom: 1px solid #778; + font: bold 12px Verdana, sans-serif; } .navlist li { -list-style: none; -margin: 0; -display: inline; + list-style: none; + margin: 0; + display: inline; } .navlist li a { -padding: 3px 0.5em; -margin-left: 3px; -border: 1px solid #778; -border-bottom: none; -background: #DDE; -text-decoration: none; + padding: 3px 0.5em; + margin-left: 3px; + border: 1px solid #778; + border-bottom: none; + background: #DDE; + text-decoration: none; } .navlist li a:link { color: #448; } -.navlist li a:visited { color: #667; } +.navlist li a:visited { color: #448; } .navlist li a:hover { @@ -41,7 +41,8 @@ .navlist li a.current { -background: white; +background: #01298f; +color: #ffffff; border-bottom: 1px solid white; } Modified: trunk/linpha2/templates/default/view_albcomment.html.php =================================================================== --- trunk/linpha2/templates/default/view_albcomment.html.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/view_albcomment.html.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -1,7 +1,5 @@ <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="main"> <form action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>" method="POST"> @@ -17,7 +15,5 @@ </form> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/view_basket.html.php =================================================================== --- trunk/linpha2/templates/default/view_basket.html.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/view_basket.html.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -1,7 +1,5 @@ <div id="divnavigation"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="navigation"> <?php @@ -18,15 +16,11 @@ </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="divpage_nr"> <div id="page_nr"> @@ -120,7 +114,5 @@ </script> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/view_img.html.php =================================================================== --- trunk/linpha2/templates/default/view_img.html.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/view_img.html.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -5,9 +5,7 @@ <?php } ?> <div id="divthumbnavi"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="thumbnavi"> <div class="thumbnavi_prevthumb" id="thumbnavi_prevthumb"></div> @@ -15,15 +13,11 @@ <div class="thumbnavi_nextthumb" id="thumbnavi_nextthumb"></div> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="main"> <div id="divloading"> <img src="<?php echo LINPHA_DIR; ?>/lib/graphics/loading.gif"> @@ -71,9 +65,7 @@ <div id="divcomments" class="comments"></div> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> @@ -117,10 +109,8 @@ <div style="clear: both;"></div> </div> - <div class="roundAlphabottom"> - <div class="roundAlphabottomInner"> </div> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl_alpha.gif'; ?>" alt="" width="15" height="15" class="AlphaCorner" style="display: none" /> - </div> + + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom','alpha'); ?> </div> <div id="divSlideshowImage" style="display: none;"></div> Modified: trunk/linpha2/templates/default/view_img_static.html.php =================================================================== --- trunk/linpha2/templates/default/view_img_static.html.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/view_img_static.html.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -6,9 +6,7 @@ <?php } ?> <div id="divthumbnavi"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="thumbnavi"> <div class="thumbnavi_prevthumb"> @@ -20,15 +18,11 @@ </div> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="main"> <?php if($_SESSION['mode_imageview']=='meta') { ?> <!-- edit meta data - include view_meta.html --> @@ -87,15 +81,11 @@ <?php } /* end if view!=meta */ ?> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> <div id="divright"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="right"> <?php foreach($GLOBALS['linpha']->template->output['image_infos'] AS $value) @@ -104,7 +94,5 @@ } ?> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/view_thumb.head.php =================================================================== --- trunk/linpha2/templates/default/view_thumb.head.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/view_thumb.head.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -10,5 +10,5 @@ </script> <script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/js/scriptaculous.js?load=builder"></script> -<script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/layouts/'.$GLOBALS['linpha']->template->layout_name.'/DefsThumbView.js'; ?>"></script> +<script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/themes/'.$GLOBALS['linpha']->template->layout_name.'/DefsThumbView.js'; ?>"></script> <script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/js/LinThumbnails.js"></script> Modified: trunk/linpha2/templates/default/view_thumb.html.php =================================================================== --- trunk/linpha2/templates/default/view_thumb.html.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/view_thumb.html.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -8,15 +8,13 @@ <!-- navigation --> <?php if(isset($GLOBALS['linpha']->template->output['navigation']) && !empty($GLOBALS['linpha']->template->output['navigation'])) { ?> <div id="divnavigation"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> + <div id="navigation"> <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> <?php } ?> @@ -24,9 +22,7 @@ </div> <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="divpage_nr"> <div id="page_nr"> @@ -41,9 +37,7 @@ </div> <div style="clear: both;"></div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> <script language="JavaScript" type="text/javascript"> Modified: trunk/linpha2/templates/default/view_thumb_static.html.php =================================================================== --- trunk/linpha2/templates/default/view_thumb_static.html.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/view_thumb_static.html.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -2,15 +2,13 @@ <!-- navigation --> <?php if(isset($GLOBALS['linpha']->template->output['navigation']) && !empty($GLOBALS['linpha']->template->output['navigation'])) { ?> <div id="divnavigation"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> + <div id="navigation"> <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> <?php } ?> @@ -18,9 +16,7 @@ </div> <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="divpage_nr"> <div id="page_nr"> @@ -56,7 +52,6 @@ </div> <div style="clear: both;"></div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/view_thumbdetail.html.php =================================================================== --- trunk/linpha2/templates/default/view_thumbdetail.html.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/default/view_thumbdetail.html.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -9,24 +9,18 @@ <!-- navigation --> <?php if(isset($GLOBALS['linpha']->template->output['navigation']) && !empty($GLOBALS['linpha']->template->output['navigation'])) { ?> <div id="divnavigation"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="navigation"> <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> <?php } ?> <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="main"> @@ -64,7 +58,5 @@ ?> </div> - <div class="roundbottom"> - <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> \ No newline at end of file Modified: trunk/linpha2/templates/roundcorners.php =================================================================== --- trunk/linpha2/templates/roundcorners.php 2006-10-27 20:02:41 UTC (rev 4602) +++ trunk/linpha2/templates/roundcorners.php 2006-10-27 21:10:23 UTC (rev 4603) @@ -1,11 +1,6 @@ <?php if(!defined('LINPHA_DIR')) { define('LINPHA_DIR','..'); } -/** - * @todo force cache on - */ - - include_once( LINPHA_DIR.'/lib/plugins/watermark/func.watermark.php' ); if(!isset($_GET['color'])) @@ -72,48 +67,21 @@ imageline($image, 0, 0, $size-1, 0, $color ); } - // flush image -header('Content-type: image/png'); -imagepng($image); -imagedestroy($image); +Header('Content-type: image/png'); +/** + * force caching in browser + * works in firefox and internet explorer + */ +Header("Last-Modified: " . gmdate("D, d M Y H:i:s",mktime (0,0,0,1,1,2000)) . " GMT"); // Date in the past +Header("Expires: Mon, 26 Jul 2100 05:00:00 GMT"); // In other words... never expire the image +Header("Cache-Control: max-age=10000000, s-maxage=1000000, proxy-revalidate, must-revalidate"); -/* -$size = 300; -$image=imagecreatetruecolor($size, $size); -// something to get a white background with black border -$back = imagecolorallocate($image, 255, 255, 255); -$border = imagecolorallocate($image, 0, 0, 0); -imagefilledrectangle($image, 0, 0, $size - 1, $size - 1, $back); -imagerectangle($image, 0, 0, $size - 1, $size - 1, $border); - -$yellow_x = 100; -$yellow_y = 75; -$red_x = 120; -$red_y = 165; -$blue_x = 187; -$blue_y = 125; -$radius = 150; - -// allocate colors with alpha values -$yellow = imagecolorallocatealpha($image, 255, 255, 0, 75); -$red = imagecolorallocatealpha($image, 255, 0, 0, 75); -$blue = imagecolorallocatealpha($image, 0, 0, 255, 127); - -// drawing 3 overlapped circle -imagefilledellipse($image, $yellow_x, $yellow_y, $radius, $radius, $yellow); -imagefilledellipse($image, $red_x, $red_y, $radius, $radius, $red); -imagefilledellipse($image, $blue_x, $blue_y, $radius, $radius, $blue); - -// don't forget to output a correct header! -header('Content-type: image/png'); - -// and finally, output the result imagepng($image); imagedestroy($image); -*/ + ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |