[Linpha-cvs] SF.net SVN: linpha: [4620] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-11-03 18:59:40
|
Revision: 4620 http://svn.sourceforge.net/linpha/?rev=4620&view=rev Author: fangehrn Date: 2006-11-03 10:58:34 -0800 (Fri, 03 Nov 2006) Log Message: ----------- 2006-11-03 flo * startet making linpha includable by other web pages - introduced new constants: - LINPHA_DIR only in PHP context, include() etc. - LINPHA_LINK on the client side: clickable links - LINPHA_CLIENT on the client side: access ressources in the linpha folder include of css + js files, get_thumb/image.php if you have better, more intuitive names, please tell me - changed the linpha2/?cat to linpha2/?linCat i think we need to change also at least the id to linId for example to prevent interferences if the wegpage also uses an id in the url what about $_POST['cmd'] ...? ooooo * maybe there are broken things now... Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/index.php trunk/linpha2/lib/classes/linpha.class.php trunk/linpha2/lib/classes/linpha.filesys.class.php trunk/linpha2/lib/classes/linpha.functions.php trunk/linpha2/lib/classes/linpha.imgview.class.php trunk/linpha2/lib/classes/linpha.sql.class.php trunk/linpha2/lib/classes/linpha.template.class.php trunk/linpha2/lib/include/basket_build_print.php trunk/linpha2/lib/include/common.php trunk/linpha2/lib/js/LinGlobal.js trunk/linpha2/lib/js/LinImage.js trunk/linpha2/lib/modules/module.albums.php trunk/linpha2/lib/modules/module.basket.php trunk/linpha2/lib/modules/module.browse.php trunk/linpha2/lib/modules/module.empty.php trunk/linpha2/lib/modules/module.filemanager.php trunk/linpha2/lib/modules/module.newimg.php trunk/linpha2/lib/modules/module.search.php trunk/linpha2/lib/modules/module.settings.php trunk/linpha2/templates/default/basket.html.php trunk/linpha2/templates/default/fragments.php trunk/linpha2/templates/default/home.html.php trunk/linpha2/templates/default/search.html.php trunk/linpha2/templates/default/themes/vertical-nav/css/view_img.css trunk/linpha2/templates/default/view_basket.html.php trunk/linpha2/templates/default/view_img.head.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_static.html.php trunk/linpha2/templates/default_old/index.php Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/ChangeLog 2006-11-03 18:58:34 UTC (rev 4620) @@ -1,3 +1,19 @@ +2006-11-03 flo + * startet making linpha includable by other web pages + - introduced new constants: + - LINPHA_DIR only in PHP context, include() etc. + - LINPHA_LINK on the client side: clickable links + - LINPHA_CLIENT on the client side: access ressources in the linpha folder + include of css + js files, get_thumb/image.php + if you have better, more intuitive names, please tell me + - changed the linpha2/?cat to linpha2/?linCat + i think we need to change also at least the id to linId for example + to prevent interferences if the wegpage also uses an id in the url + what about $_POST['cmd'] ...? ooooo + + * maybe there are broken things now... + + 2006-11-02 flo * changed template system: - include all the default files Modified: trunk/linpha2/index.php =================================================================== --- trunk/linpha2/index.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/index.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -14,15 +14,15 @@ include_once(LINPHA_DIR.'/lib/include/integrity.php'); include_once(LINPHA_DIR.'/lib/include/upgrade.php'); - if(!isset($_GET['cat'])) + if(!isset($_GET['linCat'])) { - $_GET['cat'] = 'alb'; + $_GET['linCat'] = 'alb'; } /** * open modules */ -switch($_GET['cat']) +switch($_GET['linCat']) { case 'alb': include_once(LINPHA_DIR.'/lib/modules/module.albums.php'); Modified: trunk/linpha2/lib/classes/linpha.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.class.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/classes/linpha.class.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -31,7 +31,7 @@ { if(! file_exists( LINPHA_DIR.'/var/config.dir.php') ) { - header('Location: '.LINPHA_DIR.'/install/'); + header('Location: '.LINPHA_CLIENT.'/install/'); exit(); } @@ -57,7 +57,6 @@ */ include_once(LINPHA_DIR.'/lib/lang/lang.German.php'); - class Linpha { public $db, $sql, $template; @@ -65,6 +64,38 @@ function __construct() { $this->sql = new linSql(); + + /** + * some defines + * @todo if linpha not included, use only folder /linpha2/? as link url + */ + if(!defined('LINPHA_LINK')) + { + if( strpos($_SERVER['PHP_SELF'],'index.php') !== false ) + { + $new_phpself = substr($_SERVER['PHP_SELF'],0,strlen($_SERVER['PHP_SELF'])-strlen('index.php')); + } + else + { + $new_phpself = $_SERVER['PHP_SELF']; + } + + + // append '?' to easier append later variables + if( strpos($new_phpself,'?') === false ) + { + define('LINPHA_LINK',$new_phpself.'?'); + } + else + { + define('LINPHA_LINK',$new_phpself); + } + } + + if(!defined('LINPHA_CLIENT')) + { + define('LINPHA_CLIENT', LinFilesys::cleanPath( dirname($_SERVER['PHP_SELF']).'/'.LINPHA_DIR ) ); + } } } // end class Linpha Modified: trunk/linpha2/lib/classes/linpha.filesys.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.filesys.class.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/classes/linpha.filesys.class.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -260,6 +260,34 @@ return number_format($filesize, $precision).' '.$sizeunit; } +/** + * get a clean path + * input: ..//./../dir4//./dir5/dir6/..//dir7/ + * output: ../../dir4/dir5/dir7/ + * + * thanks to http://ch2.php.net/realpath + */ +function cleanPath($path) { + $result = array(); + // $pathA = preg_split('/[\/\\\]/', $path); + $pathA = explode('/', $path); + if (!$pathA[0]) + $result[] = ''; + foreach ($pathA AS $key => $dir) { + if ($dir == '..') { + if (end($result) == '..') { + $result[] = '..'; + } elseif (!array_pop($result)) { + $result[] = '..'; + } + } elseif ($dir && $dir != '.') { + $result[] = $dir; + } + } + if (!end($pathA)) + $result[] = ''; + return implode('/', $result); +} } // end class LinFile ?> Modified: trunk/linpha2/lib/classes/linpha.functions.php =================================================================== --- trunk/linpha2/lib/classes/linpha.functions.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/classes/linpha.functions.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -676,7 +676,7 @@ /** * filename */ - error_log("$time | $severity_msg | $type_msg | $ip | $user | $text".LIN_NL, 3, $GLOBALS['linpha']->sql->config->value['plugins_log_filename'] ); + error_log("$time | $severity_msg | $type_msg | $ip | $user | $text".LIN_NL, 3, LinFilesys::getFullPath($GLOBALS['linpha']->sql->config->value['plugins_log_filename']) ); /** * email Modified: trunk/linpha2/lib/classes/linpha.imgview.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -218,7 +218,7 @@ $this->setMenu(); /** - * at this point, there should be absolut no output + * at this point, there should be absolute no output */ include_once(LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/global.html.php'); } @@ -266,7 +266,7 @@ if( $GLOBALS['linpha']->sql->config->value['plugins_filemanager_enable'] OR $GLOBALS['linpha']->sql->isAdmin()) { $GLOBALS['linpha']->template->output['menu_My Settings']['filemanager'] = - array('name' => i18n("Filemanager"), 'value' => LINPHA_DIR.'/?cat=filemanager'); + array('name' => i18n("Filemanager"), 'value' => LINPHA_LINK.'&linCat=filemanager'); } } @@ -279,7 +279,7 @@ array( 'name' => i18n("Import"), 'value' => array( - array('name' => i18n("Start Import Of This Folder/File"), 'value' => LINPHA_DIR.'/admin/?cat=import&album_select[]='.$this->id_parent), + array('name' => i18n("Start Import Of This Folder/File"), 'value' => LINPHA_CLIENT.'/admin/?cat=import&album_select[]='.$this->id_parent), array('name' => i18n("Detect File Changes"), 'value' => $GLOBALS['linpha']->template->URL_full.'&force_update') ) ); @@ -288,7 +288,7 @@ array( 'name' => i18n("Permissions"), 'value' => array( - array('name' => i18n("Set Permissions"), 'value' => LINPHA_DIR.'/admin/?cat=permissions_view&cmd=edit&id='.$GLOBALS['linpha']->template->idCurrent) + array('name' => i18n("Set Permissions"), 'value' => LINPHA_CLIENT.'/admin/?cat=permissions_view&cmd=edit&id='.$GLOBALS['linpha']->template->idCurrent) ) ); @@ -319,7 +319,7 @@ $array_sort_orders_links[] = array('name' => i18n($value), 'value' => $GLOBALS['linpha']->template->URL_full.'&order_by='.$value); } - $open_basket_link = LINPHA_DIR.'/?cat=basket'; + $open_basket_link = LINPHA_LINK.'&linCat=basket'; switch($this->mode) { @@ -378,7 +378,7 @@ { $GLOBALS['linpha']->template->output['menu_More']['edit']['name'] = i18n("Edit"); $GLOBALS['linpha']->template->output['menu_More']['edit']['value'][2]['name'] = i18n("Open Filemanager"); - $GLOBALS['linpha']->template->output['menu_More']['edit']['value'][2]['value'] = LINPHA_DIR.'/?cat=filemanager&id='.$this->id_parent; + $GLOBALS['linpha']->template->output['menu_More']['edit']['value'][2]['value'] = LINPHA_LINK.'&linCat=filemanager&id='.$this->id_parent; } if($GLOBALS['linpha']->sql->checkPermission('metadata_edit')) @@ -410,15 +410,15 @@ array('name' => i18n("Sort"), 'value' => $array_sort_orders_links), array('name' => i18n("View at"), 'value' => array( - array('name' => '640x480', 'value' => LINPHA_DIR.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=640&height=480', 'target' => '_blank'), - array('name' => '800x600', 'value' => LINPHA_DIR.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=800&height=600', 'target' => '_blank'), - array('name' => '1024x768', 'value' => LINPHA_DIR.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1024&height=768', 'target' => '_blank'), - array('name' => '1280x800', 'value' => LINPHA_DIR.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1280&height=800', 'target' => '_blank'), - array('name' => '1280x960', 'value' => LINPHA_DIR.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1280&height=960', 'target' => '_blank'), - array('name' => '1280x1024', 'value' => LINPHA_DIR.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1280&height=1024', 'target' => '_blank'), - array('name' => '1600x1200', 'value' => LINPHA_DIR.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1600&height=1200', 'target' => '_blank'), - array('name' => '1920x1200', 'value' => LINPHA_DIR.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1920&height=1200', 'target' => '_blank'), - array('name' => $this->org_width.'x'.$this->org_height.' '.i18n("Fullscreen").')', 'value' => LINPHA_DIR.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width='.$this->org_width.'&height='.$this->org_height, 'target' => '_blank'), + array('name' => '640x480', 'value' => LINPHA_CLIENT.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=640&height=480', 'target' => '_blank'), + array('name' => '800x600', 'value' => LINPHA_CLIENT.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=800&height=600', 'target' => '_blank'), + array('name' => '1024x768', 'value' => LINPHA_CLIENT.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1024&height=768', 'target' => '_blank'), + array('name' => '1280x800', 'value' => LINPHA_CLIENT.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1280&height=800', 'target' => '_blank'), + array('name' => '1280x960', 'value' => LINPHA_CLIENT.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1280&height=960', 'target' => '_blank'), + array('name' => '1280x1024', 'value' => LINPHA_CLIENT.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1280&height=1024', 'target' => '_blank'), + array('name' => '1600x1200', 'value' => LINPHA_CLIENT.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1600&height=1200', 'target' => '_blank'), + array('name' => '1920x1200', 'value' => LINPHA_CLIENT.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width=1920&height=1200', 'target' => '_blank'), + array('name' => $this->org_width.'x'.$this->org_height.' '.i18n("Fullscreen").')', 'value' => LINPHA_CLIENT.'/get_image.php?id='.$GLOBALS['linpha']->template->idCurrent.'&width='.$this->org_width.'&height='.$this->org_height, 'target' => '_blank'), ) ) ) @@ -438,7 +438,7 @@ { $GLOBALS['linpha']->template->output['menu_More']['edit']['name'] = i18n("Edit"); $GLOBALS['linpha']->template->output['menu_More']['edit']['value'][2]['name'] = i18n("Open Filemanager"); - $GLOBALS['linpha']->template->output['menu_More']['edit']['value'][2]['value'] = LINPHA_DIR.'/?cat=filemanager&id='.$this->id_parent; + $GLOBALS['linpha']->template->output['menu_More']['edit']['value'][2]['value'] = LINPHA_LINK.'&linCat=filemanager&id='.$this->id_parent; } @@ -501,7 +501,7 @@ */ if( $GLOBALS['linpha']->sql->checkPermission('download')) { - $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="'.LINPHA_DIR.'/download_file.php?id='.$GLOBALS['linpha']->template->idCurrent.'">'. + $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="'.LINPHA_CLIENT.'/download_file.php?id='.$GLOBALS['linpha']->template->idCurrent.'">'. '<img src="'.$GLOBALS['linpha']->template->themeFile('images/download.png').'" border="0" title="'.i18n("Download Image").'" />' .'</a>'."\n"; } @@ -568,7 +568,7 @@ if($_GET['admin_cmd'] == 'basket_add_all_with_checkout') { - header("Location: ".LINPHA_DIR."/?cat=basket&checkout_as=".$_GET['checkout_as']); + header("Location: ".LINPHA_LINK."&linCat=basket&checkout_as=".$_GET['checkout_as']); exit(); } break; @@ -581,7 +581,7 @@ if($_GET['admin_cmd'] == 'basket_add_this_with_checkout') { - header("Location: ".LINPHA_DIR."/?cat=basket&checkout_as=".$_GET['checkout_as']); + header("Location: ".LINPHA_LINK."&linCat=basket&checkout_as=".$_GET['checkout_as']); exit(); } break; @@ -846,7 +846,7 @@ { if($value['img_type'] == 0) { - $GLOBALS['linpha']->template->output['navigation'] .= '<a href="'.LINPHA_DIR.'/?cat=alb&id='.$value['id'].'">'.$value['name'].'</a><br />'; + $GLOBALS['linpha']->template->output['navigation'] .= '<a href="'.LINPHA_LINK.'&linCat=alb&id='.$value['id'].'">'.$value['name'].'</a><br />'; $nr_folders++; } } @@ -942,7 +942,7 @@ $data = $GLOBALS['linpha']->db->GetRow("SELECT count(datetimeoriginal) FROM ".PREFIX."meta_exif WHERE datetimeoriginal LIKE '".$i."%'"); if($data[0]>0) { - $GLOBALS['linpha']->template->output['browse_by_date'] .= '<a href="'.LINPHA_DIR.'/?cat=browse&year='.$i.'">'.$i.'</a> ('.$data[0].'), '; + $GLOBALS['linpha']->template->output['browse_by_date'] .= '<a href="'.LINPHA_LINK.'&linCat=browse&year='.$i.'">'.$i.'</a> ('.$data[0].'), '; } } } @@ -1290,7 +1290,7 @@ $str = '<div class="thumbnavi_'.$class.'thumb">' . '<a href="'.$GLOBALS['linpha']->template->URL_base.'&id='.$id.'">' - . '<img class="img_'.$class.'thumb" src="'.LINPHA_DIR.'/get_thumb.php?id='.$id.'" /></a>' + . '<img class="img_'.$class.'thumb" src="'.LINPHA_CLIENT.'/get_thumb.php?id='.$id.'" /></a>' . '<br />'.$name.'</div>'."\n"; return $str; Modified: trunk/linpha2/lib/classes/linpha.sql.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.sql.class.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/classes/linpha.sql.class.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -736,6 +736,8 @@ * calculate correct path for cookie * needs always to be the linpha root folder * for example: http://localhost/linpha/index.php -> must be /linpha/ + * + * @todo what if linpha is included from another directory? */ /** * get directory and append needed ending slash Modified: trunk/linpha2/lib/classes/linpha.template.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.template.class.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/classes/linpha.template.class.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -80,31 +80,31 @@ <!-- css includes --> <!-- colorsettings.php --> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/default/colorsettings.php'. +<link rel='stylesheet' href='<?php echo LINPHA_CLIENT.'/templates/'.$this->template_name.'/themes/default/colorsettings.php'. '?bg='.$this->bgcolor.'&bodybg='.$this->bodybgcolor.'&font='.$this->fontcolor. '&albumsbg='.$this->albumsbgcolor.'&links='.$this->linkscolor.'&linkshover='.$this->linkshovercolor; ?>' type='text/css'> <?php if($this->layout_name != 'default' && file_exists(LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/colorsettings.php')) { ?> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name."/colorsettings.php?bg=". +<link rel='stylesheet' href='<?php echo LINPHA_CLIENT.'/templates/'.$this->template_name.'/themes/'.$this->layout_name."/colorsettings.php?bg=". $this->bgcolor."&bodybg=".$this->bodybgcolor."&font=".$this->fontcolor. "&albumsbg=".$this->albumsbgcolor."&links=".$this->linkscolor."&linkshover=".$this->linkshovercolor; ?>' type='text/css'> <?php } ?> <!-- global.css --> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/default/css/global.css'; ?>' type='text/css'> +<link rel='stylesheet' href='<?php echo LINPHA_CLIENT.'/templates/'.$this->template_name.'/themes/default/css/global.css'; ?>' type='text/css'> <?php if($this->layout_name != 'default' && file_exists(LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/global.css')) { ?> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/global.css'; ?>' type='text/css'>\n"; +<link rel='stylesheet' href='<?php echo LINPHA_CLIENT.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/global.css'; ?>' type='text/css'>\n"; <?php } ?> <!-- body css --> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/default/css/'.$this->css_name.'.css'; ?>' type='text/css'> +<link rel='stylesheet' href='<?php echo LINPHA_CLIENT.'/templates/'.$this->template_name.'/themes/default/css/'.$this->css_name.'.css'; ?>' type='text/css'> <?php if($this->layout_name != 'default' && file_exists(LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/'.$this->css_name.'.css')) { ?> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/'.$this->css_name.'.css'; ?>' type='text/css'> +<link rel='stylesheet' href='<?php echo LINPHA_CLIENT.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/'.$this->css_name.'.css'; ?>' type='text/css'> <?php } ?> <!--[if IE]> @@ -116,17 +116,19 @@ <![endif]--> <!--[if lt IE 7]> <style type="text/css" media="screen"> - body { behavior: url(<?php echo LINPHA_DIR; ?>/templates/misc/csshover.htc); font-size: 100%; } + body { behavior: url(<?php echo LINPHA_CLIENT; ?>/templates/misc/csshover.htc); font-size: 100%; } #menu ul li a { height: 1%; } #menu a, #menu span { font: bold 0.7em/1.4em arial, helvetica, sans-serif; } </style> <![endif]--> -<script type="text/javascript" language="JavaScript" src="<?php echo LINPHA_DIR; ?>/lib/js/prototype.js"></script> -<script type="text/javascript" language="JavaScript" src="<?php echo LINPHA_DIR; ?>/lib/js/LinGlobal.js"></script> +<script type="text/javascript" language="JavaScript" src="<?php echo LINPHA_CLIENT; ?>/lib/js/prototype.js"></script> +<script type="text/javascript" language="JavaScript" src="<?php echo LINPHA_CLIENT; ?>/lib/js/LinGlobal.js"></script> <script type="text/javascript" language="JavaScript"> -var LINPHA_DIR = '<?php echo LINPHA_DIR; ?>'; +var LINPHA_LINK = '<?php echo LINPHA_LINK; ?>'; +var LINPHA_CLIENT = '<?php echo LINPHA_CLIENT; ?>'; var startIdCurrent = <?php echo $this->idCurrent; ?>; +var IdCurrent = startIdCurrent; <?php if(! isset($_SESSION['use_js']) && ! isset($_SESSION['disable_ajax'])) { @@ -181,11 +183,10 @@ if($GLOBALS['linpha']->sql->isLoggedIn()) { echo '<!-- my settings and admin links -->'."\n"; - $this->printMenu("My Settings",LINPHA_DIR."/?cat=settings"); - $this->printMenu("Admin",LINPHA_DIR."/admin/"); + $this->printMenu("My Settings",LINPHA_LINK."&linCat=settings"); + $this->printMenu("Admin",LINPHA_CLIENT."/admin/"); } - if($comingfrom_ajax && isset($this->output['sys_log']) && !empty($this->output['sys_log'])) { echo '<script language="JavaScript" type="text/javascript">linSyslog("'.$this->output['sys_log'].'");</script>'; @@ -310,15 +311,15 @@ if(empty($alpha)) // default { - $str = '<div style="background: url('.LINPHA_DIR.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignright.') no-repeat top right;">'; - $str .= '<img src="'.LINPHA_DIR.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignleft.'" alt="" width="'.$size.'" height="'.$size.'" class="corner" />'; + $str = '<div style="background: url('.LINPHA_CLIENT.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignright.') no-repeat top right;">'; + $str .= '<img src="'.LINPHA_CLIENT.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignleft.'" alt="" width="'.$size.'" height="'.$size.'" class="corner" />'; $str .= '</div>'; } else // currently only used in slideshow, does not work well in internet explorer { - $str = '<div style="position: relative; background: url('.LINPHA_DIR.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&alpha&align='.$alignright.') no-repeat top right;">'; + $str = '<div style="position: relative; background: url('.LINPHA_CLIENT.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&alpha&align='.$alignright.') no-repeat top right;">'; $str .= '<div class="roundAlphabottomInner"> </div>'; - $str .= '<img src="'.LINPHA_DIR.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignleft.'&alpha" alt="" width="'.$size.'" height="'.$size.'" class="AlphaCorner" />'; + $str .= '<img src="'.LINPHA_CLIENT.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignleft.'&alpha" alt="" width="'.$size.'" height="'.$size.'" class="AlphaCorner" />'; $str .= '</div>'; } @@ -329,11 +330,11 @@ { if( file_exists( LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/'.$filename ) ) { - return LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/'.$filename; + return LINPHA_CLIENT.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/'.$filename; } else { - return LINPHA_DIR.'/templates/'.$this->template_name.'/themes/default/'.$filename; + return LINPHA_CLIENT.'/templates/'.$this->template_name.'/themes/default/'.$filename; } } } // end class linTemplate Modified: trunk/linpha2/lib/include/basket_build_print.php =================================================================== --- trunk/linpha2/lib/include/basket_build_print.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/include/basket_build_print.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -173,7 +173,7 @@ */ echo "\n\t\t".'<td width="'.$print_w.'" height="'.$print_h.'">'; echo '<img width="'.$img_w.'" height="'.$img_h.'" '. - 'src="'.LINPHA_DIR.'/get_image.php?'. + 'src="'.LINPHA_CLIENT.'/get_image.php?'. 'id='.$image_id.'&'. 'width='.$nw.'&'. 'height='.$nh.'&'. Modified: trunk/linpha2/lib/include/common.php =================================================================== --- trunk/linpha2/lib/include/common.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/include/common.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -12,67 +12,7 @@ * - install/index.php, install/step* */ -if(strtoupper(substr(PHP_OS,0,3)) == 'WIN') -{ - define('LIN_NL',"\r\n"); - define('LIN_OS',"win"); -} -else -{ - define('LIN_NL',"\n"); - define('LIN_OS',"unix"); -} - - - /** - * secure PHP_SELF - * - * added from linpha1 patch 1432469 - * - * short description: - * with the url http://example.com/tests/simple.php/%22%3E%3Cscript%3Ealert('xss')%3C/script%3E%3Cfoo - * PHP_SELF is: /tests/simple.php/"><script>alert('xss')</script><foo - * and thats dangerous - * - * further details about the PHP_SELF XSS problem: - * http://blog.phpdoc.info/archives/13-XSS-Woes.html - */ - /** - * Added by Roland Haeder <web...@mx...> - * - * This code came from my free mailexchange script called 'MXChange' - * Please refer the pages on http://www.mxchange.org for further details - * - */ - // Secure the PHP_SELF variable by first making all HTML code unuseable - $_SERVER['PHP_SELF'] = htmlentities($_SERVER['PHP_SELF']); - - // Split it up into path and filename - $SELF_DIR = dirname($_SERVER['PHP_SELF']); - $SELF_FILE = basename($_SERVER['PHP_SELF']); - - // Check for a .php inside the $SELF_DIR... - while (ereg(".php", $SELF_DIR)) - { - // Correct the dirname - $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, ".php") + 4)); - // Rewrite filename... - $SELF_FILE = basename($SELF_DIR); - // ... and dirname - $SELF_DIR = dirname($SELF_DIR); - } - - // Put both together again and let's pray it is secured now... - $_SERVER['PHP_SELF'] = $SELF_DIR."/".$SELF_FILE; - - // Remove uneccessary variables - unset($SELF_DIR); - unset($SELF_FILE); - - - -/** * Magic Quotes stuff */ /** @@ -134,4 +74,64 @@ $HTTP_POST_VARS = $_POST; $HTTP_COOKIE_VARS = $_COOKIE; } -?> + +/** + * secure PHP_SELF + * + * added from linpha1 patch 1432469 + * + * short description: + * with the url http://example.com/tests/simple.php/%22%3E%3Cscript%3Ealert('xss')%3C/script%3E%3Cfoo + * PHP_SELF is: /tests/simple.php/"><script>alert('xss')</script><foo + * and thats dangerous + * + * further details about the PHP_SELF XSS problem: + * http://blog.phpdoc.info/archives/13-XSS-Woes.html + */ + /** + * Added by Roland Haeder <web...@mx...> + * + * This code came from my free mailexchange script called 'MXChange' + * Please refer the pages on http://www.mxchange.org for further details + * + */ + // Secure the PHP_SELF variable by first making all HTML code unuseable + $_SERVER['PHP_SELF'] = htmlentities($_SERVER['PHP_SELF']); + + // Split it up into path and filename + $SELF_DIR = dirname($_SERVER['PHP_SELF']); + $SELF_FILE = basename($_SERVER['PHP_SELF']); + + // Check for a .php inside the $SELF_DIR... + while (ereg(".php", $SELF_DIR)) + { + // Correct the dirname + $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, ".php") + 4)); + // Rewrite filename... + $SELF_FILE = basename($SELF_DIR); + // ... and dirname + $SELF_DIR = dirname($SELF_DIR); + } + + // Put both together again and let's pray it is secured now... + $_SERVER['PHP_SELF'] = $SELF_DIR."/".$SELF_FILE; + + // Remove uneccessary variables + unset($SELF_DIR); + unset($SELF_FILE); + +/** + * some defines + */ +if(strtoupper(substr(PHP_OS,0,3)) == 'WIN') +{ + define('LIN_NL',"\r\n"); + define('LIN_OS',"win"); +} +else +{ + define('LIN_NL',"\n"); + define('LIN_OS',"unix"); +} + +?> \ No newline at end of file Modified: trunk/linpha2/lib/js/LinGlobal.js =================================================================== --- trunk/linpha2/lib/js/LinGlobal.js 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/js/LinGlobal.js 2006-11-03 18:58:34 UTC (rev 4620) @@ -29,14 +29,14 @@ * * use this on every page and not only on home page, because if user is linked directly to an image * - * ajax may be disabled with ./?cat=ajax&disable_ajax - * and may be re-enabled with ./?cat=ajax&enable_ajax + * ajax may be disabled with ./?linCat=ajax&disable_ajax + * and may be re-enabled with ./?linCat=ajax&enable_ajax * * http://wiki.script.aculo.us/scriptaculous/show/Ajax.Request */ function checkAjaxCompatibility() { - new Ajax.Request(LINPHA_DIR + '/?cat=ajax&use_js', {method:'get', asynchronous:true, onSuccess:checkAjaxCompatibilitySuccess} ); + new Ajax.Request(LINPHA_CLIENT + '/?linCat=ajax&use_js', {method:'get', asynchronous:true, onSuccess:checkAjaxCompatibilitySuccess} ); } /** @@ -81,7 +81,7 @@ { if( menuNeedsUpdating ) { - new Ajax.Updater('menu', LINPHA_DIR + '/?cat=ajax&reloadmenu&id='+IdCurrent, {method: 'get', asynchronous:true, evalScripts:true}); + new Ajax.Updater('menu', LINPHA_CLIENT + '/?linCat=ajax&reloadmenu&id='+IdCurrent, {method: 'get', asynchronous:true, evalScripts:true}); menuNeedsUpdating = false; } } Modified: trunk/linpha2/lib/js/LinImage.js =================================================================== --- trunk/linpha2/lib/js/LinImage.js 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/js/LinImage.js 2006-11-03 18:58:34 UTC (rev 4620) @@ -3,7 +3,6 @@ alert('Error ' + t.status + ' -- ' + t.statusText); } -var IdCurrent; var nextThumbs = new Array(); var prevThumbs = new Array(); @@ -797,10 +796,6 @@ { IdCurrent = document.location.hash.substr(11); } - else - { - IdCurrent = startIdCurrent; - } /** * and again something important Modified: trunk/linpha2/lib/modules/module.albums.php =================================================================== --- trunk/linpha2/lib/modules/module.albums.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/modules/module.albums.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -47,8 +47,8 @@ /** * set some infos */ - $linpha->template->URL_base = LINPHA_DIR.'/?cat=alb'; - $linpha->template->URL_full = LINPHA_DIR.'/?cat=alb&id='.$linpha->template->idCurrent; + $linpha->template->URL_base = LINPHA_LINK.'&linCat=alb'; + $linpha->template->URL_full = LINPHA_LINK.'&linCat=alb&id='.$linpha->template->idCurrent; $linpha->imgview->setCurrentView('albums'); @@ -63,7 +63,7 @@ /** * set navigation line */ - $GLOBALS['linpha']->template->output['title'] = setNavigationLine( $linpha->template->idCurrent, LINPHA_DIR.'/?cat=alb&id=' ); + $GLOBALS['linpha']->template->output['title'] = setNavigationLine( $linpha->template->idCurrent, LINPHA_LINK.'&linCat=alb&id=' ); /** Modified: trunk/linpha2/lib/modules/module.basket.php =================================================================== --- trunk/linpha2/lib/modules/module.basket.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/modules/module.basket.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -202,7 +202,7 @@ $linpha->template->setModuleName('basket'); -$linpha->template->URL_full = LINPHA_DIR.'/?cat=basket'; +$linpha->template->URL_full = LINPHA_LINK.'&linCat=basket'; $linpha->template->output['title'] = '<a href="'.$linpha->template->URL_full.'">'.i18n("Basket").'</a>'; include_once(LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/global.html.php'); ?> \ No newline at end of file Modified: trunk/linpha2/lib/modules/module.browse.php =================================================================== --- trunk/linpha2/lib/modules/module.browse.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/modules/module.browse.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -40,7 +40,7 @@ */ $linpha->imgview->setCurrentView('browse'); - $url_base = LINPHA_DIR.'/?cat=browse'; + $url_base = LINPHA_LINK.'&linCat=browse'; $url_append = ''; if(isset($_GET['year'])) { Modified: trunk/linpha2/lib/modules/module.empty.php =================================================================== --- trunk/linpha2/lib/modules/module.empty.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/modules/module.empty.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -57,7 +57,7 @@ $linpha->template->output['default'] = ''; $linpha->template->setModuleName('default'); -$linpha->template->URL_full = LINPHA_DIR.'/?cat=empty'; +$linpha->template->URL_full = LINPHA_LINK.'&linCat=empty'; $linpha->template->output['title'] = i18n("empty"); include_once(LINPHA_DIR.'/templates/'.$linpha->template->template_name.'/global.html.php'); Modified: trunk/linpha2/lib/modules/module.filemanager.php =================================================================== --- trunk/linpha2/lib/modules/module.filemanager.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/modules/module.filemanager.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -132,7 +132,7 @@ } ?> - <form method="POST" action="<?php echo LINPHA_DIR.'/?cat=filemanager&id='.$parent_id; ?>"> + <form method="POST" action="<?php echo LINPHA_LINK.'&linCat=filemanager&id='.$parent_id; ?>"> <?php switch($_REQUEST['file_action']) { @@ -728,10 +728,10 @@ }*/ } -echo i18n("Current Folder:").' '.setNavigationLine( $parent_id, LINPHA_DIR.'/?cat=filemanager&id').'<br />'; +echo i18n("Current Folder:").' '.setNavigationLine( $parent_id, LINPHA_LINK.'&linCat=filemanager&id').'<br />'; ?> -<form method="POST" action="<?php echo LINPHA_DIR.'/?cat=filemanager&id='.$parent_id; ?>"> +<form method="POST" action="<?php echo LINPHA_LINK.'&linCat=filemanager&id='.$parent_id; ?>"> <div id="filemanager"> <table> <tr> @@ -746,7 +746,7 @@ { $data = $linpha->db->GetRow("SELECT name, parent_id FROM ".PREFIX."photos WHERE id = '".LinSql::linAddslashes($parent_id)."'"); ?> - <a href="<?php echo LINPHA_DIR.'/?cat=filemanager&id='.$data['parent_id']; ?>">..</a> + <a href="<?php echo LINPHA_LINK.'&linCat=filemanager&id='.$data['parent_id']; ?>">..</a> <?php } ?> @@ -817,7 +817,7 @@ if($uid == $filestat['uid']) { - $file_permissions = '<a href="'.LINPHA_DIR.'/?cat=filemanager&cmd=file_action&file_action=changeperm&checkedfiles[]='.$data['id'].'">'. $perm . '</a>'; + $file_permissions = '<a href="'.LINPHA_LINK.'&linCat=filemanager&cmd=file_action&file_action=changeperm&checkedfiles[]='.$data['id'].'">'. $perm . '</a>'; } else { @@ -851,7 +851,7 @@ <?php if($data['img_type']==0) { - echo '<a href="'.LINPHA_DIR.'/?cat=filemanager&id='.$data['id'].'">'.htmlspecialchars($data['name'],ENT_QUOTES).'</a>'; + echo '<a href="'.LINPHA_LINK.'&linCat=filemanager&id='.$data['id'].'">'.htmlspecialchars($data['name'],ENT_QUOTES).'</a>'; } else { @@ -908,7 +908,7 @@ </form> <br /><br /> -<form method="POST" action="<?php echo LINPHA_DIR.'/?cat=filemanager&id='.$parent_id; ?>"> +<form method="POST" action="<?php echo LINPHA_LINK.'&linCat=filemanager&id='.$parent_id; ?>"> <input type="text" class="linforms" name="folder_name" value="" /> <input type="hidden" name="cmd" value="do_file_action" /> <input type="hidden" name="file_action" value="create_folder" /> @@ -917,7 +917,7 @@ <br /> <h2><?php echo i18n("Upload Files"); ?></h2> -<form method="POST" enctype="multipart/form-data" action="<?php echo LINPHA_DIR.'/?cat=filemanager&id='.$parent_id; ?>"> +<form method="POST" enctype="multipart/form-data" action="<?php echo LINPHA_LINK.'&linCat=filemanager&id='.$parent_id; ?>"> <?php echo i18n("Choose files you would like to upload. Choose desired action to accomplish upon succesful upload."); echo '<br />'; @@ -989,7 +989,7 @@ $linpha->template->setModuleName('default'); $linpha->template->overrideModule('css','filemanager'); -$linpha->template->URL_full = LINPHA_DIR.'/?cat=filemanager&id='.$parent_id; +$linpha->template->URL_full = LINPHA_LINK.'&linCat=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/modules/module.newimg.php =================================================================== --- trunk/linpha2/lib/modules/module.newimg.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/modules/module.newimg.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -35,13 +35,13 @@ include_once(LINPHA_DIR . '/lib/classes/linpha.imgview.class.php'); $linpha->imgview = new linImgview(); $linpha->imgview->setCurrentView('newimg'); - $linpha->template->URL_base = LINPHA_DIR.'/?cat=newimg'; - $linpha->template->URL_full = LINPHA_DIR.'/?cat=newimg&id='.$linpha->template->idCurrent; + $linpha->template->URL_base = LINPHA_LINK.'&linCat=newimg'; + $linpha->template->URL_full = LINPHA_LINK.'&linCat=newimg&id='.$linpha->template->idCurrent; /** * write navigation and date links */ - $GLOBALS['linpha']->template->output['title'] = '<a href="'.LINPHA_DIR.'/?cat=newimg">'.i18n("New Images").'</a>'; + $GLOBALS['linpha']->template->output['title'] = '<a href="'.LINPHA_LINK.'&linCat=newimg">'.i18n("New Images").'</a>'; $GLOBALS['linpha']->template->output['navigation'] = ''; /** Modified: trunk/linpha2/lib/modules/module.search.php =================================================================== --- trunk/linpha2/lib/modules/module.search.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/modules/module.search.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -98,8 +98,8 @@ include_once(LINPHA_DIR . '/lib/classes/linpha.imgview.class.php'); $linpha->imgview = new linImgview(); $linpha->imgview->setCurrentView('search'); - $linpha->template->URL_base = LINPHA_DIR.'/?cat=search'; - $linpha->template->URL_full = LINPHA_DIR.'/?cat=search&id='.$linpha->template->idCurrent; + $linpha->template->URL_base = LINPHA_LINK.'&linCat=search'; + $linpha->template->URL_full = LINPHA_LINK.'&linCat=search&id='.$linpha->template->idCurrent; $linpha->template->output['title'] = i18n("Search"); @@ -447,9 +447,9 @@ $GLOBALS['linpha']->template->output['navigation'] = ''; } $GLOBALS['linpha']->template->output['navigation'] .= - '<a class="button" href="'.LINPHA_DIR.'/?cat=search&cmd=new">'. + '<a class="button" href="'.LINPHA_LINK.'&linCat=search&cmd=new">'. i18n("New Search").'</a>'. - '<a class="button" href="'.LINPHA_DIR.'/?cat=search&cmd=edit">'. + '<a class="button" href="'.LINPHA_LINK.'&linCat=search&cmd=edit">'. i18n("Edit Search").'</a>'; $linpha->imgview->buildImgView(); @@ -457,7 +457,7 @@ else { $linpha->template->setModuleName('search'); - $linpha->template->URL_full = LINPHA_DIR.'/?cat=search'; + $linpha->template->URL_full = LINPHA_LINK.'&linCat=search'; $linpha->template->output['title'] = i18n("Search"); include_once(LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/global.html.php'); } Modified: trunk/linpha2/lib/modules/module.settings.php =================================================================== --- trunk/linpha2/lib/modules/module.settings.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/lib/modules/module.settings.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -34,7 +34,7 @@ if( ! $GLOBALS['linpha']->sql->isLoggedIn()) { linSysLog(i18n("Please Login!")); - $_GET['cat'] = 'alb'; + $_GET['linCat'] = 'alb'; include_once(LINPHA_DIR.'/lib/modules/module.albums.php'); exit(); } @@ -187,7 +187,7 @@ ?> <h2><?php echo i18n("Change User Information"); ?></h2> -<form method="POST" action="./?cat=settings"> +<form method="POST" action="./?linCat=settings"> <?php $LinAdmin->printAdminConfig('text',i18n("Username"),'username',$user_data['username']); $LinAdmin->printAdminConfig('text',i18n("Display Name"),'display_name',$user_data['display_name']); @@ -199,7 +199,7 @@ <hr /> <h2><?php echo i18n("Change Password"); ?></h2> -<form method="POST" name="change_password" action="./?cat=settings"> +<form method="POST" name="change_password" action="./?linCat=settings"> <?php $LinAdmin->printAdminConfig('password',i18n("Old Password"),'old_password',''); $LinAdmin->printAdminConfig('password',i18n("New Password"),'new_password',''); @@ -222,7 +222,7 @@ <hr /> <h2><?php echo i18n("Change User Settings"); ?></h2> -<form method="POST" action="./?cat=settings"> +<form method="POST" action="./?linCat=settings"> <?php foreach($options AS $value) { @@ -241,7 +241,7 @@ <input type="submit" name="submit" value="<?php echo i18n("Submit"); ?>" class="button" /> </form> -<form method="POST" action="./?cat=settings"> +<form method="POST" action="./?linCat=settings"> <input type="hidden" name="cmd" value="loaddefault" /> <input type="submit" name="submit" value="<?php echo i18n("Load default values"); ?>" class="button" /> </form> @@ -250,7 +250,7 @@ <?php $linpha->template->output['default'] = ob_get_clean(); $linpha->template->setModuleName('default'); -$linpha->template->URL_full = LINPHA_DIR.'/?cat=settings'; +$linpha->template->URL_full = LINPHA_LINK.'&linCat=settings'; $linpha->template->output['title'] = i18n("Settings"); include_once(LINPHA_DIR.'/templates/'.$linpha->template->template_name.'/global.html.php'); ?> \ No newline at end of file Modified: trunk/linpha2/templates/default/basket.html.php =================================================================== --- trunk/linpha2/templates/default/basket.html.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/templates/default/basket.html.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -186,12 +186,12 @@ $i = 1; foreach($tpl->output['basket_folders'] AS $value) { - echo setNavigationLine( $value, LINPHA_DIR.'/?cat=alb&id=' ).'<br />'; + echo setNavigationLine( $value, LINPHA_LINK.'&linCat=alb&id=' ).'<br />'; foreach($tpl->output['basket_folder_contents'][$value] AS $sub_value) { ?> <div style='float: left;'> - <label for='<?php echo $i; ?>'><img style='cursor: pointer;' src='<?php echo LINPHA_DIR.'/get_thumb.php?id='.$sub_value; ?>' class='img_thumbnail' /></label> + <label for='<?php echo $i; ?>'><img style='cursor: pointer;' src='<?php echo LINPHA_CLIENT.'/get_thumb.php?id='.$sub_value; ?>' class='img_thumbnail' /></label> <br /> <input type='checkbox' id='<?php echo $i; ?>' name='img_id[]' value='<?php echo $sub_value; ?>'> </div> Modified: trunk/linpha2/templates/default/fragments.php =================================================================== --- trunk/linpha2/templates/default/fragments.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/templates/default/fragments.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -5,19 +5,19 @@ case 'menu': ?> <ul style="margin-left: 50px;"> - <li><a href="<?php echo LINPHA_DIR; ?>/"><?php echo i18n("Home"); ?></a></li> + <li><a href="<?php echo LINPHA_LINK; ?>&linCat=alb"><?php echo i18n("Home"); ?></a></li> </ul> <ul> <li><span><?php echo i18n("Search"); ?> </span> <ul> - <li><a href="<?php echo LINPHA_DIR; ?>/?cat=search"><?php echo i18n("Extended Search"); ?></a></li> + <li><a href="<?php echo LINPHA_LINK; ?>&linCat=search"><?php echo i18n("Extended Search"); ?></a></li> <li> <div> - <form method="GET" action="<?php echo LINPHA_DIR; ?>/?cat=search"> + <form method="GET" action="<?php echo LINPHA_LINK; ?>&linCat=search"> <input type="text" class="linForms" name="search_text" value="" /> <input type="hidden" name="button[meta][all]" value="1" /> <input type="hidden" name="cmd" value="search" /> - <input type="hidden" name="cat" value="search" /> + <input type="hidden" name="linCat" value="search" /> <input type="submit" name="submit" value="<?php echo i18n("Search"); ?>" /> </form> </div> @@ -32,7 +32,7 @@ <li> <div> <?php if( useAjax() ) { ?> - <form action="" method="POST" onsubmit="new Ajax.Updater('menu', LINPHA_DIR + '/?cat=ajax&reloadmenu&id='+IdCurrent, {method: 'post', asynchronous:true, parameters:Form.serialize(this), evalScripts:true}); return false;"> + <form action="" method="POST" onsubmit="new Ajax.Updater('menu', LINPHA_CLIENT + '/?linCat=ajax&reloadmenu&id='+IdCurrent, {method: 'post', asynchronous:true, parameters:Form.serialize(this), evalScripts:true}); return false;"> <?php } else { ?> <form action="<?php echo $this->URL_full; ?>" method="POST"> <?php } Modified: trunk/linpha2/templates/default/home.html.php =================================================================== --- trunk/linpha2/templates/default/home.html.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/templates/default/home.html.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -15,8 +15,8 @@ { ?> <div class="div_random_img"> - <?php echo '<a href="'.LINPHA_DIR.'/?cat=alb&id='.$value['id'].'">' - . '<img class="img_random_thumbnail" title="'.htmlentities($value['path']).'" src="'. LINPHA_DIR.'/get_thumb.php?id=' .$value['id'] .'" alt="randomimage" /></a>'; ?> + <?php echo '<a href="'.LINPHA_LINK.'&linCat=alb&id='.$value['id'].'">' + . '<img class="img_random_thumbnail" title="'.htmlentities($value['path']).'" src="'. LINPHA_CLIENT.'/get_thumb.php?id=' .$value['id'] .'" alt="randomimage" /></a>'; ?> <br /><br /> </div> <?php @@ -34,15 +34,15 @@ { ?> <div class="div_new_img"> - <?php echo '<a href="'.LINPHA_DIR.'/?cat=newimg&id='.$value['id'].'">' - . '<img class="img_new_thumbnail" title="'.htmlspecialchars($value['path'],ENT_QUOTES).'" src="'. LINPHA_DIR.'/get_thumb.php?id=' .$value['id'] .'" alt="newimage" /></a>'; ?> + <?php echo '<a href="'.LINPHA_LINK.'&linCat=newimg&id='.$value['id'].'">' + . '<img class="img_new_thumbnail" title="'.htmlspecialchars($value['path'],ENT_QUOTES).'" src="'. LINPHA_CLIENT.'/get_thumb.php?id=' .$value['id'] .'" alt="newimage" /></a>'; ?> <br /><br /> </div> <?php } ?> <div style="clear: both;"></div> - <?php echo '<a href="'.LINPHA_DIR.'/?cat=newimg">'.i18n('Show All New Images').'</a>'; ?> + <?php echo '<a href="'.LINPHA_LINK.'&linCat=newimg">'.i18n('Show All New Images').'</a>'; ?> <?php } ?> <!-- Browse by Date --> @@ -67,11 +67,11 @@ <div class="div_folder"> <?php echo $tpl->divRoundCorners('top','','albums'); ?> - <?php echo '<a href="'.LINPHA_DIR.'/?cat=alb&id='.$value['id'].'">' - . '<img class="img_folder_thumbnail" src="'. LINPHA_DIR.'/get_thumb.php?id=' .$value['id'] .'" alt="thumbnail_album" /></a>'; ?> + <?php echo '<a href="'.LINPHA_LINK.'&linCat=alb&id='.$value['id'].'">' + . '<img class="img_folder_thumbnail" src="'. LINPHA_CLIENT.'/get_thumb.php?id=' .$value['id'] .'" alt="thumbnail_album" /></a>'; ?> <div class="div_folder_text"> - <h2><?php echo '<a href="'.LINPHA_DIR.'/?cat=alb&id='.$value['id'].'">'.$value['name'].'</a>'; ?></h2> + <h2><?php echo '<a href="'.LINPHA_LINK.'&linCat=alb&id='.$value['id'].'">'.$value['name'].'</a>'; ?></h2> <?php echo $value['stats_numbers'].' '.i18n("Photos"); ?> Modified: trunk/linpha2/templates/default/search.html.php =================================================================== --- trunk/linpha2/templates/default/search.html.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/templates/default/search.html.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -10,7 +10,7 @@ } </style> -<img src="<?php echo LINPHA_DIR; ?>/lib/graphics/xmag.jpg" alt="Searching Linpha"> +<img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/xmag.jpg" alt="Searching Linpha"> <font size="+1"><?php echo i18n("LinPHA Search Page"); ?></font> <hr noshade> <?php @@ -31,10 +31,10 @@ <div id="main"> <div class="divcolumn"> - <form name="searchform" method="GET" action="<?php echo LINPHA_DIR; ?>/"> + <form name="searchform" method="GET" action="<?php echo LINPHA_LINK; ?>/"> <input type="submit" class="button" name="sub" value=" <?php echo i18n("Search"); ?> "> - <a class="button" href="<?php echo LINPHA_DIR; ?>/?cat=search&cmd=new"><?php echo i18n("Reset"); ?></a> + <a class="button" href="<?php echo LINPHA_LINK; ?>&linCat=search&cmd=new"><?php echo i18n("Reset"); ?></a> <br /><br /> <!-- search text box //--> @@ -124,8 +124,8 @@ <!-- date --> <!-- exif date --> <?php echo i18n("Date"); ?> (EXIF) - <a class="FromTo" href="javascript:void(0);" onclick="var loginWin = window.open('<?php echo LINPHA_DIR; ?>/lib/include/calender.php?form=date_from_exif','Calender','height=250,width=300,scrollbars=no,menubar=no,status=no');" target="_top"><?php echo i18n("From"); ?></a> / - <a class="FromTo" href="javascript:void(0);" onclick="var loginWin = window.open('<?php echo LINPHA_DIR; ?>/lib/include/calender.php?form=date_to_exif','Calender','height=250,width=250,scrollbars=no,menubar=no,status=no');" target="_top"><?php echo i18n("To"); ?></a> + <a class="FromTo" href="javascript:void(0);" onclick="var loginWin = window.open('<?php echo LINPHA_CLIENT; ?>/lib/include/calender.php?form=date_from_exif','Calender','height=250,width=300,scrollbars=no,menubar=no,status=no');" target="_top"><?php echo i18n("From"); ?></a> / + <a class="FromTo" href="javascript:void(0);" onclick="var loginWin = window.open('<?php echo LINPHA_CLIENT; ?>/lib/include/calender.php?form=date_to_exif','Calender','height=250,width=250,scrollbars=no,menubar=no,status=no');" target="_top"><?php echo i18n("To"); ?></a> </span><br /> <input type="text" id="date_from_exif" name="date_from_exif" value="<?php echo @$_REQUEST['date_from_exif']; ?>" style="width: 80px;"> / @@ -140,8 +140,8 @@ { ?> <span><?php echo $data['name']; ?> - <a href="javascript:void(0);" onclick="var loginWin = window.open('<?php echo LINPHA_DIR; ?>/lib/include/calender.php?form=date_from_<?php echo $data['id']; ?>','Calender','height=250,width=300,scrollbars=no,menubar=no,status=no');" target="_top"><?php echo i18n("From"); ?></a> / - <a href="javascript:void(0);" onclick="var loginWin = window.open('<?php echo LINPHA_DIR; ?>/lib/include/calender.php?form=date_to_<?php echo $data['id']; ?>','Calender','height=250,width=250,scrollbars=no,menubar=no,status=no');" target="_top"><?php echo i18n("To"); ?></a> + <a href="javascript:void(0);" onclick="var loginWin = window.open('<?php echo LINPHA_CLIENT; ?>/lib/include/calender.php?form=date_from_<?php echo $data['id']; ?>','Calender','height=250,width=300,scrollbars=no,menubar=no,status=no');" target="_top"><?php echo i18n("From"); ?></a> / + <a href="javascript:void(0);" onclick="var loginWin = window.open('<?php echo LINPHA_CLIENT; ?>/lib/include/calender.php?form=date_to_<?php echo $data['id']; ?>','Calender','height=250,width=250,scrollbars=no,menubar=no,status=no');" target="_top"><?php echo i18n("To"); ?></a> </span><br /> <input type="text" id="date_from_<?php echo $data['id']; ?>" name="date_from[<?php echo $data['id']; ?>]" value="<?php echo @$_REQUEST['date_from'][$data['id']]; ?>" style="width: 80px;"> / <input type="text" id="date_to_<?php echo $data['id']; ?>" name="date_to[<?php echo $data['id']; ?>]" value="<?php echo @$_REQUEST['date_to'][$data['id']]; ?>" style="width: 80px;"><br /><br /> @@ -219,7 +219,7 @@ <!-- submit //--> <div> <input type="hidden" name="cmd" value="search" /> - <input type="hidden" name="cat" value="search" /> + <input type="hidden" name="linCat" value="search" /> </div> </div> <div style="clear: both;"></div> Modified: trunk/linpha2/templates/default/themes/vertical-nav/css/view_img.css =================================================================== --- trunk/linpha2/templates/default/themes/vertical-nav/css/view_img.css 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/templates/default/themes/vertical-nav/css/view_img.css 2006-11-03 18:58:34 UTC (rev 4620) @@ -10,9 +10,10 @@ position: relative; margin-left: 10px; - height: auto; + + width: 120px; min-height: 650px; - width: 120px; + height:expression( "650px" ); /* ie hack */ } #thumbnavi_prevthumb { Modified: trunk/linpha2/templates/default/view_basket.html.php =================================================================== --- trunk/linpha2/templates/default/view_basket.html.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/templates/default/view_basket.html.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -12,7 +12,7 @@ <a href="<?php echo $tpl->URL_full.'&view=thumb'; ?>"><?php echo i18n("Back To Normal View"); ?></a> <br /> <?php echo i18n("Images In Basket"); ?>: <?php echo count($_SESSION['basket_ids']); ?> - (<a href="<?php echo LINPHA_DIR.'?cat=basket&ref_id='.$GLOBALS['linpha']->template->idCurrent; ?>"><?php echo i18n("Open Basket"); ?></a>) + (<a href="<?php echo LINPHA_LINK.'&linCat=basket&ref_id='.$GLOBALS['linpha']->template->idCurrent; ?>"><?php echo i18n("Open Basket"); ?></a>) </div> @@ -30,7 +30,7 @@ </div> </div> - <form name='basket' action='<?php echo LINPHA_DIR.'/?cat=basket&cmd=add_selected&ref_id='.$GLOBALS['linpha']->template->idCurrent; ?>' method='POST'> + <form name='basket' action='<?php echo LINPHA_LINK.'&linCat=basket&cmd=add_selected&ref_id='.$GLOBALS['linpha']->template->idCurrent; ?>' method='POST'> <div id="main"> <?php $i = 1; Modified: trunk/linpha2/templates/default/view_img.head.php =================================================================== --- trunk/linpha2/templates/default/view_img.head.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/templates/default/view_img.head.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -1,8 +1,8 @@ <script language="JavaScript" type="text/javascript"> -var xmlUrl = '<?php echo convert_amp($tpl->URL_base); ?>'; -var imageSrc = '<?php echo LINPHA_DIR.'/get_image.php?id='; ?>'; -var thumbSrc = '<?php echo LINPHA_DIR.'/get_thumb.php?id='; ?>'; +var xmlUrl = '<?php echo str_replace(LINPHA_LINK,LINPHA_CLIENT.'/?',convert_amp($tpl->URL_base)); ?>'; +var imageSrc = '<?php echo LINPHA_CLIENT.'/get_image.php?id='; ?>'; +var thumbSrc = '<?php echo LINPHA_CLIENT.'/get_thumb.php?id='; ?>'; var maxImageWidth = <?php echo $GLOBALS['linpha']->sql->config->value['sys_style_image_width']; ?>; var maxImageHeight = <?php echo $GLOBALS['linpha']->sql->config->value['sys_style_image_height']; ?>; var startImgHeight = <?php echo $GLOBALS['linpha']->imgview->img_height; ?>; @@ -11,5 +11,5 @@ var useEffects = <?php echo $GLOBALS['linpha']->sql->config->value['sys_style_image_useeffects']; ?>; </script> -<script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/js/scriptaculous.js?load=effects,builder"></script> -<script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/js/LinImage.js"> </script> +<script type="text/javascript" language="javascript" src="<?php echo LINPHA_CLIENT; ?>/lib/js/scriptaculous.js?load=effects,builder"></script> +<script type="text/javascript" language="javascript" src="<?php echo LINPHA_CLIENT; ?>/lib/js/LinImage.js"> </script> Modified: trunk/linpha2/templates/default/view_img.html.php =================================================================== --- trunk/linpha2/templates/default/view_img.html.php 2006-11-03 10:02:16 UTC (rev 4619) +++ trunk/linpha2/templates/default/view_img.html.php 2006-11-03 18:58:34 UTC (rev 4620) @@ -30,7 +30,7 @@ <?php echo $tpl->divRoundCorners('top'); ?> <div id="main"> <div id="divloading"> - <img src="<?php echo LINPHA_DIR; ?>/lib/graphics/loading.gif"> + <img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/loading.gif"> </div> <noscript><h1><?php echo i18n("If you have just disabled Javascript, you will need to restart your browser."); ?></h1></noscript> @@ -83,12 +83,12 @@ <div id="divSlideshowControls" style="display: none;"> <div id="divSlideshowControlsInner"> <div style="float: left; margin-left: 10px; "> - <a href="javascript:myLinImage.moveFirst()"><img id="ssImgFirst" src="<?php echo LINPHA_DIR; ?>/lib/graphics/ss_first.gif" width="25" height="25" border="0" alt="First" title="<?php echo i18n("First"); ?>" /></a> - <a href="javascript:myLinImage.movePrev()"><img id="ssImgPrev" src="<?php echo LINPHA_DIR; ?>/lib/graphics/ss_previous.gif" width="25" height="25" border="0" alt="Previous" title="<?php echo i18n("Previous"); ?>" /></a> - <a href="javascript:myLinImage.slideshowStartStop()"><img id="ssImgStart" src="<?php echo LINPHA_DIR; ?>/lib/graphics/ss_play.gif" width="25" height="25" border="0" alt="Play" title="<?php echo i18n("Play/Pause"); ?>" /></a> - <!--<a href="javascript:myLinImage.slideshowStop()"><img id="ssImgStop" src="<?php echo LINPHA_DIR; ?>/lib/graphics/ss_stop.gif" width="25" height="25" border="0" alt="Stop" title="<?php echo i18n("Stop"); ?>" /></a>--> - <a href="javascript:myLinImage.moveNext()"><img id="ssImgNext" src="<?php echo LINPHA_DIR; ?>/lib/graphics/ss_next.gif" width="25" height="25" border="0" alt="Next" title="<?php echo i18n("Next"); ?>" /></a> - <a href="javascript:myLinImage.moveLast()"><img id="ssImgLast" src="<?php echo LINPHA_DIR; ?>/lib/graphics/ss_last.gif" width="25" height="25" border="0" alt="Last" title="<?php echo i18n("Last"); ?>" /></a> + <a href="javascript:myLinImage.moveFirst()"><img id="ssImgFirst" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_first.gif" width="25" height="25" border="0" alt="First" title="<?php echo i18n("First"); ?>" /></a> + <a href="javascript:myLinImage.movePrev()"><img id="ssImgPrev" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_previous.gif" width="25" height="25" border="0" alt="Previous" title="<?php echo i18n("Previous"); ?>" /></a> + <a href="javascript:myLinImage.slideshowStartStop()"><img id="ssImgStart" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_play.gif" width="25" height="25" border="0" alt="Play" title="<?php echo i18n("Play/Pause"); ?>" /></a> + <!--<a href="javascript:myLinImage.slideshowStop()"><img id="ssImgStop" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_stop.gif" width="25" height="25" border="0" alt="Stop" title="<?php echo i18n("Stop"); ?>" /></a>--> + <a href="javascript:myLinImage.moveNext()"><img id="ssImgNext" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_next.gif" width="25" height="25" border="0" alt="Next" title="<?php echo i18n("Next"); ?>" /></a> + <a href="javascript:myLinImage.moveLast()"><img id="ssImgLast" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_last.gif" width="25" height="25" border="0" alt="Last" title="<?php echo i18n("Last"); ?>" /></a> </... [truncated message content] |