Skip to content
Permalink
Browse files

reworked map, especially GM3 and fullscreen map

  • Loading branch information...
following
following committed Feb 21, 2013
1 parent 683bc37 commit c5057c884a08807803e02cf7fe5a188032b03ccb
Showing with 13,061 additions and 14,083 deletions.
  1. +12 −1 doc/license.txt
  2. +1 −0 htdocs/config2/locale.inc.php
  3. +2 −1 htdocs/config2/settings-dev.inc.php
  4. +14 −2 htdocs/config2/settings-dist.inc.php
  5. +2 −0 htdocs/doc/sql/db-changes.txt
  6. +11,620 −11,515 htdocs/doc/sql/static-data/data.sql
  7. +6 −4 htdocs/doc/sql/tables/cache_type.sql
  8. +1 −0 htdocs/doc/sql/tables/profile_options.sql
  9. +6 −0 htdocs/lang/de/ocstyle/main.tpl.php
  10. +15 −0 htdocs/lib2/common.inc.php
  11. +11 −4 htdocs/lib2/logic/attribute.class.php
  12. +9 −4 htdocs/lib2/logic/useroptions.class.php
  13. +152 −28 htdocs/map2.php
  14. +0 −343 htdocs/map2full.php
  15. +2 −2 htdocs/mydetails.php
  16. +14 −13 htdocs/resource2/misc/map/CacheMarker.js
  17. BIN htdocs/resource2/ocstyle/css/seasons/bg-langstripe-autumn-map.png
  18. BIN htdocs/resource2/ocstyle/css/seasons/bg-langstripe-spring-map.png
  19. BIN htdocs/resource2/ocstyle/css/seasons/bg-langstripe-summer-map.png
  20. BIN htdocs/resource2/ocstyle/css/seasons/bg-langstripe-winter-map.png
  21. +0 −4 htdocs/resource2/ocstyle/css/seasons/style_autumn.css
  22. +10 −0 htdocs/resource2/ocstyle/css/seasons/style_langstripe_autumn.css
  23. +11 −0 htdocs/resource2/ocstyle/css/seasons/style_langstripe_spring.css
  24. +11 −0 htdocs/resource2/ocstyle/css/seasons/style_langstripe_summer.css
  25. +11 −0 htdocs/resource2/ocstyle/css/seasons/style_langstripe_winter.css
  26. +0 −4 htdocs/resource2/ocstyle/css/seasons/style_spring.css
  27. +0 −4 htdocs/resource2/ocstyle/css/seasons/style_summer.css
  28. +0 −4 htdocs/resource2/ocstyle/css/seasons/style_winter.css
  29. +178 −66 htdocs/resource2/ocstyle/css/style_screen.css
  30. BIN htdocs/resource2/ocstyle/images/cacheicon/16x16-9.gif
  31. BIN htdocs/resource2/ocstyle/images/cacheicon/16x16-moving.gif
  32. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-1.png
  33. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-10.png
  34. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-11.png
  35. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-12.png
  36. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-13.png
  37. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-14.png
  38. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-15.png
  39. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-2.png
  40. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-3.png
  41. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-4.png
  42. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-5.png
  43. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-6.png
  44. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-7.png
  45. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-8.png
  46. BIN htdocs/resource2/ocstyle/images/cacheicon/20x20-9.png
  47. BIN htdocs/resource2/ocstyle/images/cacheicon/cache/16x16-9.gif
  48. BIN htdocs/resource2/ocstyle/images/cacheicon/cache/16x16-moving.gif
  49. BIN htdocs/resource2/ocstyle/images/head/overlay/oc_logo_alpha3.png
  50. BIN htdocs/resource2/ocstyle/images/map/24x24-cachetype-10.png
  51. BIN htdocs/resource2/ocstyle/images/map/24x24-found.png
  52. BIN htdocs/resource2/ocstyle/images/map/24x24-owned.png
  53. BIN htdocs/resource2/ocstyle/images/map/35x35-fullscreen.png
  54. BIN htdocs/resource2/ocstyle/images/map/35x35-normalscreen.png
  55. BIN htdocs/resource2/ocstyle/images/map/35x35-star.png
  56. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-1-inactive.png
  57. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-1-oconly.png
  58. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-1.png
  59. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-10-inactive.png
  60. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-10-oconly.png
  61. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-10.png
  62. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-11-inactive.png
  63. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-11-oconly.png
  64. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-11.png
  65. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-12-inactive.png
  66. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-12-oconly.png
  67. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-12.png
  68. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-13-inactive.png
  69. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-13-oconly.png
  70. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-13.png
  71. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-14-inactive.png
  72. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-14-oconly.png
  73. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-14.png
  74. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-15-inactive.png
  75. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-15-oconly.png
  76. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-15.png
  77. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-2-inactive.png
  78. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-2-oconly.png
  79. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-2.png
  80. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-3-inactive.png
  81. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-3-oconly.png
  82. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-3.png
  83. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-4-inactive.png
  84. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-4-oconly.png
  85. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-4.png
  86. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-5-inactive.png
  87. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-5-oconly.png
  88. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-5.png
  89. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-6-inactive.png
  90. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-6-oconly.png
  91. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-6.png
  92. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-7-inactive.png
  93. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-7-oconly.png
  94. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-7.png
  95. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-8-inactive.png
  96. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-8-oconly.png
  97. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-8.png
  98. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-9-inactive.png
  99. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-cachetype-9-oconly.png
  100. BIN htdocs/resource2/ocstyle/images/map/{ → caches1}/24x24-cachetype-9.png
  101. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-found-inactive.png
  102. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-found-oconly.png
  103. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-found.png
  104. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-owned-inactive.png
  105. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-owned-oconly.png
  106. BIN htdocs/resource2/ocstyle/images/map/caches1/24x24-owned.png
  107. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-1-inactive.png
  108. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-1-oconly.png
  109. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-1.png
  110. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-10-inactive.png
  111. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-10-oconly.png
  112. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-10.png
  113. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-2-inactive.png
  114. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-2-oconly.png
  115. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-2.png
  116. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-3-inactive.png
  117. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-3-oconly.png
  118. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-3.png
  119. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-4-inactive.png
  120. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-4-oconly.png
  121. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-4.png
  122. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-5-inactive.png
  123. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-5-oconly.png
  124. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-5.png
  125. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-6-inactive.png
  126. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-6-oconly.png
  127. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-6.png
  128. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-7-inactive.png
  129. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-7-oconly.png
  130. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-7.png
  131. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-8-inactive.png
  132. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-8-oconly.png
  133. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-8.png
  134. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-9-inactive.png
  135. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-9-oconly.png
  136. BIN htdocs/resource2/ocstyle/images/map/caches2/cachetype-9.png
  137. BIN htdocs/resource2/ocstyle/images/map/caches2/found-inactive.png
  138. BIN htdocs/resource2/ocstyle/images/map/caches2/found-oconly.png
  139. BIN htdocs/resource2/ocstyle/images/map/caches2/found.png
  140. BIN htdocs/resource2/ocstyle/images/map/caches2/owned-inactive.png
  141. BIN htdocs/resource2/ocstyle/images/map/caches2/owned-oconly.png
  142. BIN htdocs/resource2/ocstyle/images/map/caches2/owned.png
  143. BIN htdocs/resource2/ocstyle/images/misc/close-large.png
  144. BIN htdocs/resource2/ocstyle/images/misc/close-medium.png
  145. BIN htdocs/resource2/ocstyle/images/misc/close-small.png
  146. BIN htdocs/resource2/ocstyle/images/misc/is_oconly_small.png
  147. BIN htdocs/resource2/ocstyle/images/openicons/35x35-configure.png
  148. BIN htdocs/resource2/ocstyle/images/openicons/35x35-system-help.png
  149. +7 −0 htdocs/resource2/ocstyle/js/debug.js
  150. +4 −1 htdocs/resource2/ocstyle/js/wz_tooltip.js
  151. +6 −2 htdocs/search.php
  152. +954 −486 htdocs/templates2/ocstyle/map2.tpl
  153. +0 −1,594 htdocs/templates2/ocstyle/map2full.tpl
  154. +1 −1 htdocs/templates2/ocstyle/res_attribgroup.tpl
  155. +1 −0 htdocs/templates2/ocstyle/sys_main.tpl
@@ -139,10 +139,21 @@ List of third party components:

23. TinyMCE: JavaScript WYSIWYG Editor
Path : htdocs/resource2/tinymce/
htdocs/images/icons/
URI : http://tinymce.moxiecode.com/
License : LGPL 2.1

24. OKAPI: Opencaching API
Path : htdocs/okapi
Path : htdocs/okapi/
URI : http://code.google.com/p/opencaching-api/
License : MIT

OKAPI cache icons
Path : htdocs/resource2/ocstyle/images/map/caches2/
URI : http://code.google.com/p/opencaching-pl/source/browse/#svn%2Ftrunk%2Fokapi%2Fstatic%2Ftilemap
License : MIT

25. OpenIcons
Path : htdocs/resource2/ocstyle/images/openicons/
URI : http://openiconlibrary.sourceforge.net/
License : Creative Commons BY-SA 3.0
@@ -100,6 +100,7 @@
$opt['locale']['DE']['country'] = 'DE';
$opt['locale']['DE']['page']['subtitle1'] = 'Geocaching in Deutschland,';
$opt['locale']['DE']['page']['subtitle2'] = 'Österreich und der Schweiz';
$opt['locale']['DE']['helpwiki'] = "http://wiki.opencaching.de/index.php/";
$opt['locale']['FR']['timezone'] = 'Europe/Berlin';
$opt['locale']['FR']['format']['date'] = '%x';
@@ -108,9 +108,10 @@
$opt['logic']['pictures']['url'] = $opt['page']['absolute_url'] . '/images/uploads';
$opt['logic']['pictures']['thumb_url'] = $opt['logic']['pictures']['url'] . '/thumbs';
/* cachemaps
/* maps
*/
$opt['logic']['cachemaps']['wmsurl'] = 'http://www.opencaching.de/cachemaps.php?wp={wp_oc}';
$opt['map']['disablefullscreen'] = false;
/* E-Mail for notification about news (newstopic.php)
*/
@@ -441,11 +441,23 @@
$opt['map']['maxcachereducedsize'] = 10 * 1048576; // = 10MB
// max number of caches displayed in google maps
$opt['map']['maxrecords'] = 180;
if (isset($_SERVER['HTTP_USER_AGENT']))
{
$user_agent = " " . $_SERVER['HTTP_USER_AGENT'];
if (strpos($user_agent,"MSIE") && !strpos($user_agent,"Opera"))
$opt['map']['maxrecords'] = 200;
else
$opt['map']['maxrecords'] = 2500;
}
else
$opt['map']['maxrecords'] = 250;
// ... selectable by user:
$opt['map']['min_maxrecords'] = 100;
$opt['map']['max_maxrecords'] = 4000;
// the full screen mode requires a GIS server at the moment
// has to be migrated to map2.php
$opt['map']['disablefullscreen'] = true;
// $opt['map']['disablefullscreen'] = true; no longer used
/* external binaries
*/
@@ -20,3 +20,5 @@ date commit ID change
UPDATE cache_rating SET rating_date = (SELECT MIN(`date`) FROM cache_logs WHERE cache_logs.cache_id=cache_rating.cache_id AND cache_logs.user_id=cache_rating.user_id AND cache_logs.type IN (1,7))
added trigger cacheRatingBeforeInsert
2012-08-27 9bc361c3 changed trigger cacheRatingBeforeInsert
2013-03-01 added caches.short2 und .short2_trans_id
2013-03-03 added profile_options.optionset

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -5,10 +5,12 @@ CREATE TABLE `cache_type` (
`name` varchar(80) NOT NULL,
`trans_id` int(10) NOT NULL,
`ordinal` tinyint(3) unsigned NOT NULL,
`short` varchar(10) NOT NULL COMMENT 'obsolete',
`de` varchar(60) NOT NULL COMMENT 'obsolete',
`en` varchar(60) NOT NULL COMMENT 'obsolete',
`icon_large` varchar(60) NOT NULL COMMENT 'obsolete',
`short` varchar(10) NOT NULL,
`de` varchar(60) NOT NULL,
`en` varchar(60) NOT NULL,
`icon_large` varchar(60) NOT NULL,
`short2` varchar(15) NOT NULL,
`short2_trans_id` int(10) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='static content' ;
@@ -9,5 +9,6 @@ CREATE TABLE `profile_options` (
`check_regex` varchar(255) default NULL,
`option_order` int(11) NOT NULL default '100',
`option_input` varchar(20) NOT NULL default 'text',
`optionset`, tinyint(2) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='static content' ;
@@ -70,6 +70,11 @@ functionsbox available function on this site
'spring' => 'resource2/ocstyle/css/seasons/style_spring.css',
'summer' => 'resource2/ocstyle/css/seasons/style_summer.css',
'autumn' => 'resource2/ocstyle/css/seasons/style_autumn.css');
$seasons_stripe
= array('winter' => 'resource2/ocstyle/css/seasons/style_langstripe_winter.css',
'spring' => 'resource2/ocstyle/css/seasons/style_langstripe_spring.css',
'summer' => 'resource2/ocstyle/css/seasons/style_langstripe_summer.css',
'autumn' => 'resource2/ocstyle/css/seasons/style_langstripe_autumn.css');
$smarty_dummy = 0;
?>
var nWindowWidth = 9999;
@@ -79,6 +84,7 @@ functionsbox available function on this site
nWindowWidth = screen.availWidth;
if (nWindowWidth > 970)
document.writeln('<link rel="stylesheet" type="text/css" media="screen,projection" href="<?php echo smarty_function_season($seasons, $smarty_dummy); ?>">');
document.writeln('<link rel="stylesheet" type="text/css" media="screen,projection" href="<?php echo smarty_function_season($seasons_stripe, $smarty_dummy); ?>">');
function usercountry_change()
{
@@ -305,4 +305,19 @@ function fix_magic_quotes_gpc()
}
}
}
// prelminary wiki help embedding; needs translation table
//
// pay attention to use only ' quotes in $text (escape other ')
function helppagelink($pagename)
{
global $opt;
if (isset($opt['locale'][$opt['template']['locale']]['helpwiki']))
return "<a class='nooutline' href='" . $opt['locale'][$opt['template']['locale']]['helpwiki'] .
str_replace(' ','_',$pagename) . "' target='_blank'>";
else
return $text;
}
?>
@@ -43,6 +43,7 @@ static function getAttrbutesListArrayInternal($cacheId, $bOnlySelectable, $first
{
$attr = array();
$bFirst = true;
$bSearchGroupDefault = false;
if ($cacheId == 0)
{
@@ -51,20 +52,22 @@ static function getAttrbutesListArrayInternal($cacheId, $bOnlySelectable, $first
$sAddWhereSql = ' AND `cache_attrib`.`selectable`=1';
$rsAttr = sql("SELECT `cache_attrib`.`id`, IFNULL(`tt1`.`text`, `cache_attrib`.`name`) AS `name`,
IFNULL(`tt2`.`text`, `cache_attrib`.`html_desc`) AS `html_desc`, `cache_attrib`.`icon`
IFNULL(`tt2`.`text`, `cache_attrib`.`html_desc`) AS `html_desc`,
`cache_attrib`.`icon`, `cache_attrib`.`search_default`
FROM `cache_attrib`
LEFT JOIN `sys_trans` AS `t1` ON `cache_attrib`.`trans_id`=`t1`.`id` AND `cache_attrib`.`name`=`t1`.`text`
LEFT JOIN `sys_trans_text` AS `tt1` ON `t1`.`id`=`tt1`.`trans_id` AND `tt1`.`lang`='&1'
LEFT JOIN `sys_trans` AS `t2` ON `cache_attrib`.`html_desc_trans_id`=`t2`.`id`
LEFT JOIN `sys_trans_text` AS `tt2` ON `t2`.`id`=`tt2`.`trans_id` AND `tt2`.`lang`='&1'
WHERE `cache_attrib`.`group_id`='&2'
WHERE `cache_attrib`.`group_id`='&2'" . $sAddWhereSql . "
AND NOT IFNULL(`cache_attrib`.`hidden`, 0)=1
ORDER BY `cache_attrib`.`group_id` ASC", $opt['template']['locale'], $rAttrGroup['id']);
}
else
{
$rsAttr = sql("SELECT `cache_attrib`.`id`, IFNULL(`tt1`.`text`, `cache_attrib`.`name`) AS `name`,
IFNULL(`tt2`.`text`, `cache_attrib`.`html_desc`) AS `html_desc`, `cache_attrib`.`icon`
IFNULL(`tt2`.`text`, `cache_attrib`.`html_desc`) AS `html_desc`,
`cache_attrib`.`icon`, `cache_attrib`.`search_default`
FROM `caches_attributes`
INNER JOIN `cache_attrib` ON `caches_attributes`.`attrib_id`=`cache_attrib`.`id`
LEFT JOIN `sys_trans` AS `t1` ON `cache_attrib`.`trans_id`=`t1`.`id` AND `cache_attrib`.`name`=`t1`.`text`
@@ -80,13 +83,17 @@ static function getAttrbutesListArrayInternal($cacheId, $bOnlySelectable, $first
if ($firstLetterUppercase)
$rAttr['name'] = mb_strtoupper(mb_substr($rAttr['name'],0,1)) . mb_substr($rAttr['name'],1);
$attr[] = $rAttr;
if ($rAttr['search_default'])
$bSearchGroupDefault = true;
}
sql_free_result($rsAttr);
if (count($attr) > 0)
$attributes[] = array('name' => $rAttrGroup['name'],
$attributes[] = array('id' => $rAttrGroup['id'],
'name' => $rAttrGroup['name'],
'color' => $rAttrGroup['color'],
'category' => $rAttrGroup['category'],
'search_default' => $bSearchGroupDefault,
'attr' => $attr);
}
sql_free_result($rsAttrGroup);
@@ -17,26 +17,27 @@ class useroptions
var $nUserId = 0;
var $nOptions;
function __construct($nUserId=ID_NEW)
function __construct($nUserId=ID_NEW, $optionset=1)
{
$this->nUserId = $nUserId+0;
if ($nUserId == ID_NEW)
{
$rs = sqll('SELECT `id`, `name`, `default_value`, `check_regex`, `option_order`, 0 AS `option_visible`, `internal_use`, `default_value` AS `option_value`
$rs = sqll('SELECT `id`, `name`, `default_value`, `check_regex`, `option_order`, 0 AS `option_visible`, `internal_use`, `default_value` AS `option_value`, `optionset`
FROM `profile_options`');
}
else
{
$rs = sqll("SELECT `p`.`id`, `p`.`name`, `p`.`default_value`, `p`.`check_regex`, `p`.`option_order`, IFNULL(`u`.`option_visible`, 0) AS `option_visible`, `p`.`internal_use`, IFNULL(`u`.`option_value`, `p`.`default_value`) AS `option_value`
FROM `profile_options` AS `p`
LEFT JOIN `user_options` AS `u` ON `p`.`id`=`u`.`option_id` AND (`u`.`user_id` IS NULL OR `u`.`user_id`='&1')
WHERE `optionset`='&2'
UNION
SELECT `u`.`option_id` AS `id`, `p`.`name`, `p`.`default_value`, `p`.`check_regex`, `p`.`option_order`, `u`.`option_visible`, `p`.`internal_use`, IFNULL(`u`.`option_value`, `p`.`default_value`) AS `option_value`
FROM `user_options` AS `u`
LEFT JOIN `profile_options` AS `p` ON `p`.`id`=`u`.`option_id`
WHERE `u`.`user_id`='&1'",
$this->nUserId);
$this->nUserId, $optionset);
}
while($record = sql_fetch_array($rs))
@@ -51,6 +52,10 @@ function getUserId()
{
return $this->nUserId;
}
function getOptSet()
{
return $this->nOptions[$pId]['optionset'];
}
function getOptName($pId)
{
return $this->nOptions[$pId]['name'];
@@ -128,7 +133,7 @@ function save()
function tidy_html_description($text)
{
$options = array("input-encoding" => "utf8", "output-encoding" => "utf8", "output-xhtml" => true, "doctype" => "omit", "show-body-only" => true, "char-encoding" => "utf8", "quote-ampersand" => true, "quote-nbsp" => true, "wrap" => 0);
$options = array("input-encoding" => "utf8", "output-encoding" => "utf8", "output-xhtml" => true, "doctype" => "omit", "show-body-only" => true, "char-encoding" => "utf8", "quote-ampersand" => true, "quote-nbsp" => true, "wrap" => 0);
$config = HTMLPurifier_Config::createDefault();
$cssDefinition = $config->getCSSDefinition();
Oops, something went wrong.

0 comments on commit c5057c8

Please sign in to comment.
You can’t perform that action at this time.