@@ -1011,7 +1011,7 @@ |
||
| 1011 | 1011 | } |
| 1012 | 1012 | $logs_restored = true; |
| 1013 | 1013 | } |
| 1014 | - // if it was not already restored by a later restore operation ... |
|
| 1014 | + // if it was not already restored by a later restore operation ... |
|
| 1015 | 1015 | } elseif (sql_value("SELECT `id` FROM `cache_logs` WHERE `id`='&1'", 0, $revert_logid) == 0) { |
| 1016 | 1016 | // id, uuid, date_created and last_modified are set automatically; |
| 1017 | 1017 | // picture will be updated automatically on picture-restore |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | 'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'], |
| 34 | 34 | 'DEBUG' => ($opt['debug'] & DEBUG_DEVELOPER != 0), |
| 35 | 35 | 'DEBUG_PREVENT_SEMAPHORES' |
| 36 | - => !$opt['php']['semaphores'], # not available on old developer system |
|
| 36 | + => !$opt['php']['semaphores'], # not available on old developer system |
|
| 37 | 37 | 'DB_SERVER' => $opt['db']['servername'], |
| 38 | 38 | 'DB_NAME' => $opt['db']['placeholder']['db'], |
| 39 | 39 | 'DB_USERNAME' => $opt['db']['username'], |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | 'OC_NODE_ID' => $opt['logic']['node']['id'], |
| 55 | 55 | 'OC_COOKIE_NAME' => $opt['session']['cookiename'] . 'data', |
| 56 | 56 | 'OCDE_HTML_PURIFIER_SETTINGS' |
| 57 | - => $opt['html_purifier'], |
|
| 57 | + => $opt['html_purifier'], |
|
| 58 | 58 | 'GITHUB_ACCESS_TOKEN' => $opt['okapi']['github_access_token'], |
| 59 | 59 | ); |
| 60 | 60 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | global $login; |
| 31 | 31 | |
| 32 | 32 | $fields = |
| 33 | - "`pics`.`uuid` AS `pic_uuid`, |
|
| 33 | + "`pics`.`uuid` AS `pic_uuid`, |
|
| 34 | 34 | `pics`.`url` AS `pic_url`, |
| 35 | 35 | `pics`.`title`, |
| 36 | 36 | `pics`.`date_created`, |
@@ -78,83 +78,83 @@ discard block |
||
| 78 | 78 | $sl1=strlen($ret); |
| 79 | 79 | if($CC==0) $CC=256; |
| 80 | 80 | if($BitCount<24) |
| 81 | - { |
|
| 81 | + { |
|
| 82 | 82 | $ColorTotal=imagecolorstotal($img); |
| 83 | - if($IsTransparent) $ColorTotal--; |
|
| 83 | + if($IsTransparent) $ColorTotal--; |
|
| 84 | 84 | |
| 85 | - for($p=0;$p<$ColorTotal;$p++) |
|
| 86 | - { |
|
| 87 | - $color=imagecolorsforindex($img,$p); |
|
| 88 | - $ret.=inttobyte($color["blue"]); |
|
| 89 | - $ret.=inttobyte($color["green"]); |
|
| 90 | - $ret.=inttobyte($color["red"]); |
|
| 91 | - $ret.=inttobyte(0); //RESERVED |
|
| 92 | - }; |
|
| 85 | + for($p=0;$p<$ColorTotal;$p++) |
|
| 86 | + { |
|
| 87 | + $color=imagecolorsforindex($img,$p); |
|
| 88 | + $ret.=inttobyte($color["blue"]); |
|
| 89 | + $ret.=inttobyte($color["green"]); |
|
| 90 | + $ret.=inttobyte($color["red"]); |
|
| 91 | + $ret.=inttobyte(0); //RESERVED |
|
| 92 | + }; |
|
| 93 | 93 | |
| 94 | 94 | $CT=$ColorTotal; |
| 95 | - for($p=$ColorTotal;$p<$CC;$p++) |
|
| 96 | - { |
|
| 97 | - $ret.=inttobyte(0); |
|
| 98 | - $ret.=inttobyte(0); |
|
| 99 | - $ret.=inttobyte(0); |
|
| 100 | - $ret.=inttobyte(0); //RESERVED |
|
| 101 | - }; |
|
| 102 | - }; |
|
| 95 | + for($p=$ColorTotal;$p<$CC;$p++) |
|
| 96 | + { |
|
| 97 | + $ret.=inttobyte(0); |
|
| 98 | + $ret.=inttobyte(0); |
|
| 99 | + $ret.=inttobyte(0); |
|
| 100 | + $ret.=inttobyte(0); //RESERVED |
|
| 101 | + }; |
|
| 102 | + }; |
|
| 103 | 103 | |
| 104 | 104 | |
| 105 | 105 | if($BitCount<=8) |
| 106 | 106 | { |
| 107 | 107 | |
| 108 | - for($y=$Height-1;$y>=0;$y--) |
|
| 109 | - { |
|
| 110 | - $bWrite=""; |
|
| 111 | - for($x=0;$x<$Width;$x++) |
|
| 112 | - { |
|
| 113 | - $color=imagecolorat($img,$x,$y); |
|
| 114 | - $bWrite.=decbinx($color,$BitCount); |
|
| 115 | - if(strlen($bWrite)==8) |
|
| 108 | + for($y=$Height-1;$y>=0;$y--) |
|
| 109 | + { |
|
| 110 | + $bWrite=""; |
|
| 111 | + for($x=0;$x<$Width;$x++) |
|
| 116 | 112 | { |
| 117 | - $retd.=inttobyte(bindec($bWrite)); |
|
| 118 | - $bWrite=""; |
|
| 113 | + $color=imagecolorat($img,$x,$y); |
|
| 114 | + $bWrite.=decbinx($color,$BitCount); |
|
| 115 | + if(strlen($bWrite)==8) |
|
| 116 | + { |
|
| 117 | + $retd.=inttobyte(bindec($bWrite)); |
|
| 118 | + $bWrite=""; |
|
| 119 | + }; |
|
| 119 | 120 | }; |
| 120 | - }; |
|
| 121 | 121 | |
| 122 | - if((strlen($bWrite)<8)and(strlen($bWrite)!=0)) |
|
| 122 | + if((strlen($bWrite)<8)and(strlen($bWrite)!=0)) |
|
| 123 | 123 | { |
| 124 | - $sl=strlen($bWrite); |
|
| 125 | - for($t=0;$t<8-$sl;$t++) |
|
| 126 | - $sl.="0"; |
|
| 127 | - $retd.=inttobyte(bindec($bWrite)); |
|
| 124 | + $sl=strlen($bWrite); |
|
| 125 | + for($t=0;$t<8-$sl;$t++) |
|
| 126 | + $sl.="0"; |
|
| 127 | + $retd.=inttobyte(bindec($bWrite)); |
|
| 128 | + }; |
|
| 129 | + for($z=0;$z<$Zbytek;$z++) |
|
| 130 | + $retd.=inttobyte(0); |
|
| 128 | 131 | }; |
| 129 | - for($z=0;$z<$Zbytek;$z++) |
|
| 130 | - $retd.=inttobyte(0); |
|
| 131 | - }; |
|
| 132 | 132 | }; |
| 133 | 133 | |
| 134 | 134 | if(($RLE==1)and($BitCount==8)) |
| 135 | 135 | { |
| 136 | - for($t=0;$t<strlen($retd);$t+=4) |
|
| 137 | - { |
|
| 138 | - if($t!=0) |
|
| 139 | - if(($t)%$Width==0) |
|
| 136 | + for($t=0;$t<strlen($retd);$t+=4) |
|
| 137 | + { |
|
| 138 | + if($t!=0) |
|
| 139 | + if(($t)%$Width==0) |
|
| 140 | 140 | $ret.=chr(0).chr(0); |
| 141 | 141 | |
| 142 | - if(($t+5)%$Width==0) |
|
| 143 | - { |
|
| 144 | - $ret.=chr(0).chr(5).substr($retd,$t,5).chr(0); |
|
| 145 | - $t+=1; |
|
| 146 | - } |
|
| 147 | - if(($t+6)%$Width==0) |
|
| 142 | + if(($t+5)%$Width==0) |
|
| 143 | + { |
|
| 144 | + $ret.=chr(0).chr(5).substr($retd,$t,5).chr(0); |
|
| 145 | + $t+=1; |
|
| 146 | + } |
|
| 147 | + if(($t+6)%$Width==0) |
|
| 148 | 148 | { |
| 149 | - $ret.=chr(0).chr(6).substr($retd,$t,6); |
|
| 150 | - $t+=2; |
|
| 149 | + $ret.=chr(0).chr(6).substr($retd,$t,6); |
|
| 150 | + $t+=2; |
|
| 151 | 151 | } |
| 152 | 152 | else |
| 153 | 153 | { |
| 154 | - $ret.=chr(0).chr(4).substr($retd,$t,4); |
|
| 154 | + $ret.=chr(0).chr(4).substr($retd,$t,4); |
|
| 155 | + }; |
|
| 155 | 156 | }; |
| 156 | - }; |
|
| 157 | - $ret.=chr(0).chr(1); |
|
| 157 | + $ret.=chr(0).chr(1); |
|
| 158 | 158 | } |
| 159 | 159 | else |
| 160 | 160 | { |
@@ -165,31 +165,31 @@ discard block |
||
| 165 | 165 | if($BitCount==24) |
| 166 | 166 | { |
| 167 | 167 | for($z=0;$z<$Zbytek;$z++) |
| 168 | - $Dopl.=chr(0); |
|
| 168 | + $Dopl.=chr(0); |
|
| 169 | 169 | |
| 170 | 170 | for($y=$Height-1;$y>=0;$y--) |
| 171 | - { |
|
| 172 | - for($x=0;$x<$Width;$x++) |
|
| 171 | + { |
|
| 172 | + for($x=0;$x<$Width;$x++) |
|
| 173 | 173 | { |
| 174 | - $color=imagecolorsforindex($img,ImageColorAt($img,$x,$y)); |
|
| 175 | - $ret.=chr($color["blue"]).chr($color["green"]).chr($color["red"]); |
|
| 174 | + $color=imagecolorsforindex($img,ImageColorAt($img,$x,$y)); |
|
| 175 | + $ret.=chr($color["blue"]).chr($color["green"]).chr($color["red"]); |
|
| 176 | 176 | } |
| 177 | - $ret.=$Dopl; |
|
| 178 | - }; |
|
| 177 | + $ret.=$Dopl; |
|
| 178 | + }; |
|
| 179 | 179 | |
| 180 | - }; |
|
| 180 | + }; |
|
| 181 | 181 | |
| 182 | - if($file!="") |
|
| 183 | - { |
|
| 182 | + if($file!="") |
|
| 183 | + { |
|
| 184 | 184 | $r=($f=fopen($file,"w")); |
| 185 | 185 | $r=$r and fwrite($f,$ret); |
| 186 | 186 | $r=$r and fclose($f); |
| 187 | 187 | return $r; |
| 188 | - } |
|
| 189 | - else |
|
| 190 | - { |
|
| 191 | - echo $ret; |
|
| 192 | - }; |
|
| 188 | + } |
|
| 189 | + else |
|
| 190 | + { |
|
| 191 | + echo $ret; |
|
| 192 | + }; |
|
| 193 | 193 | }; |
| 194 | 194 | |
| 195 | 195 | |
@@ -213,57 +213,57 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | if($Header=="BM") |
| 215 | 215 | { |
| 216 | - $Size=freaddword($f); |
|
| 217 | - $Reserved1=freadword($f); |
|
| 218 | - $Reserved2=freadword($f); |
|
| 219 | - $FirstByteOfImage=freaddword($f); |
|
| 220 | - |
|
| 221 | - $SizeBITMAPINFOHEADER=freaddword($f); |
|
| 222 | - $Width=freaddword($f); |
|
| 223 | - $Height=freaddword($f); |
|
| 224 | - $biPlanes=freadword($f); |
|
| 225 | - $biBitCount=freadword($f); |
|
| 226 | - $RLECompression=freaddword($f); |
|
| 227 | - $WidthxHeight=freaddword($f); |
|
| 228 | - $biXPelsPerMeter=freaddword($f); |
|
| 229 | - $biYPelsPerMeter=freaddword($f); |
|
| 230 | - $NumberOfPalettesUsed=freaddword($f); |
|
| 231 | - $NumberOfImportantColors=freaddword($f); |
|
| 216 | + $Size=freaddword($f); |
|
| 217 | + $Reserved1=freadword($f); |
|
| 218 | + $Reserved2=freadword($f); |
|
| 219 | + $FirstByteOfImage=freaddword($f); |
|
| 220 | + |
|
| 221 | + $SizeBITMAPINFOHEADER=freaddword($f); |
|
| 222 | + $Width=freaddword($f); |
|
| 223 | + $Height=freaddword($f); |
|
| 224 | + $biPlanes=freadword($f); |
|
| 225 | + $biBitCount=freadword($f); |
|
| 226 | + $RLECompression=freaddword($f); |
|
| 227 | + $WidthxHeight=freaddword($f); |
|
| 228 | + $biXPelsPerMeter=freaddword($f); |
|
| 229 | + $biYPelsPerMeter=freaddword($f); |
|
| 230 | + $NumberOfPalettesUsed=freaddword($f); |
|
| 231 | + $NumberOfImportantColors=freaddword($f); |
|
| 232 | 232 | |
| 233 | 233 | if($biBitCount<24) |
| 234 | - { |
|
| 235 | - $img=imagecreate($Width,$Height); |
|
| 236 | - $Colors=pow(2,$biBitCount); |
|
| 237 | - for($p=0;$p<$Colors;$p++) |
|
| 238 | - { |
|
| 234 | + { |
|
| 235 | + $img=imagecreate($Width,$Height); |
|
| 236 | + $Colors=pow(2,$biBitCount); |
|
| 237 | + for($p=0;$p<$Colors;$p++) |
|
| 238 | + { |
|
| 239 | 239 | $B=freadbyte($f); |
| 240 | 240 | $G=freadbyte($f); |
| 241 | 241 | $R=freadbyte($f); |
| 242 | 242 | $Reserved=freadbyte($f); |
| 243 | 243 | $Palette[]=imagecolorallocate($img,$R,$G,$B); |
| 244 | - }; |
|
| 244 | + }; |
|
| 245 | 245 | |
| 246 | 246 | |
| 247 | 247 | |
| 248 | 248 | |
| 249 | 249 | if($RLECompression==0) |
| 250 | 250 | { |
| 251 | - $Zbytek=(4-ceil(($Width/(8/$biBitCount)))%4)%4; |
|
| 251 | + $Zbytek=(4-ceil(($Width/(8/$biBitCount)))%4)%4; |
|
| 252 | 252 | |
| 253 | 253 | for($y=$Height-1;$y>=0;$y--) |
| 254 | 254 | { |
| 255 | - $CurrentBit=0; |
|
| 256 | - for($x=0;$x<$Width;$x++) |
|
| 257 | - { |
|
| 258 | - $C=freadbits($f,$biBitCount); |
|
| 259 | - imagesetpixel($img,$x,$y,$Palette[$C]); |
|
| 260 | - }; |
|
| 255 | + $CurrentBit=0; |
|
| 256 | + for($x=0;$x<$Width;$x++) |
|
| 257 | + { |
|
| 258 | + $C=freadbits($f,$biBitCount); |
|
| 259 | + imagesetpixel($img,$x,$y,$Palette[$C]); |
|
| 260 | + }; |
|
| 261 | 261 | if($CurrentBit!=0) {freadbyte($f);}; |
| 262 | 262 | for($g=0;$g<$Zbytek;$g++) |
| 263 | - freadbyte($f); |
|
| 264 | - }; |
|
| 263 | + freadbyte($f); |
|
| 264 | + }; |
|
| 265 | 265 | |
| 266 | - }; |
|
| 266 | + }; |
|
| 267 | 267 | }; |
| 268 | 268 | |
| 269 | 269 | |
@@ -288,29 +288,29 @@ discard block |
||
| 288 | 288 | |
| 289 | 289 | while(!(($prefix==0)and($suffix==0))) |
| 290 | 290 | { |
| 291 | - if($prefix==0) |
|
| 292 | - { |
|
| 293 | - $pocet=$suffix; |
|
| 294 | - $Data.=fread($f,$pocet); |
|
| 295 | - $pocetb+=$pocet; |
|
| 296 | - if($pocetb%2==1) {freadbyte($f); $pocetb++;}; |
|
| 297 | - }; |
|
| 298 | - if($prefix>0) |
|
| 299 | - { |
|
| 300 | - $pocet=$prefix; |
|
| 301 | - for($r=0;$r<$pocet;$r++) |
|
| 291 | + if($prefix==0) |
|
| 292 | + { |
|
| 293 | + $pocet=$suffix; |
|
| 294 | + $Data.=fread($f,$pocet); |
|
| 295 | + $pocetb+=$pocet; |
|
| 296 | + if($pocetb%2==1) {freadbyte($f); $pocetb++;}; |
|
| 297 | + }; |
|
| 298 | + if($prefix>0) |
|
| 299 | + { |
|
| 300 | + $pocet=$prefix; |
|
| 301 | + for($r=0;$r<$pocet;$r++) |
|
| 302 | 302 | $Data.=chr($suffix); |
| 303 | - }; |
|
| 304 | - $prefix=freadbyte($f); |
|
| 305 | - $suffix=freadbyte($f); |
|
| 306 | - $pocetb+=2; |
|
| 307 | - if($echoit) echo "Prefix: $prefix Suffix: $suffix<BR>"; |
|
| 303 | + }; |
|
| 304 | + $prefix=freadbyte($f); |
|
| 305 | + $suffix=freadbyte($f); |
|
| 306 | + $pocetb+=2; |
|
| 307 | + if($echoit) echo "Prefix: $prefix Suffix: $suffix<BR>"; |
|
| 308 | 308 | }; |
| 309 | 309 | |
| 310 | 310 | for($x=0;$x<strlen($Data);$x++) |
| 311 | - { |
|
| 312 | - imagesetpixel($img,$x,$y,$Palette[ord($Data[$x])]); |
|
| 313 | - }; |
|
| 311 | + { |
|
| 312 | + imagesetpixel($img,$x,$y,$Palette[ord($Data[$x])]); |
|
| 313 | + }; |
|
| 314 | 314 | $Data=""; |
| 315 | 315 | |
| 316 | 316 | }; |
@@ -341,44 +341,44 @@ discard block |
||
| 341 | 341 | |
| 342 | 342 | while(!(($prefix==0)and($suffix==0))) |
| 343 | 343 | { |
| 344 | - if($prefix==0) |
|
| 345 | - { |
|
| 346 | - $pocet=$suffix; |
|
| 344 | + if($prefix==0) |
|
| 345 | + { |
|
| 346 | + $pocet=$suffix; |
|
| 347 | 347 | |
| 348 | - $CurrentBit=0; |
|
| 349 | - for($h=0;$h<$pocet;$h++) |
|
| 348 | + $CurrentBit=0; |
|
| 349 | + for($h=0;$h<$pocet;$h++) |
|
| 350 | 350 | $Data.=chr(freadbits($f,4)); |
| 351 | - if($CurrentBit!=0) freadbits($f,4); |
|
| 352 | - $pocetb+=ceil(($pocet/2)); |
|
| 353 | - if($pocetb%2==1) {freadbyte($f); $pocetb++;}; |
|
| 354 | - }; |
|
| 355 | - if($prefix>0) |
|
| 356 | - { |
|
| 357 | - $pocet=$prefix; |
|
| 358 | - $i=0; |
|
| 359 | - for($r=0;$r<$pocet;$r++) |
|
| 351 | + if($CurrentBit!=0) freadbits($f,4); |
|
| 352 | + $pocetb+=ceil(($pocet/2)); |
|
| 353 | + if($pocetb%2==1) {freadbyte($f); $pocetb++;}; |
|
| 354 | + }; |
|
| 355 | + if($prefix>0) |
|
| 356 | + { |
|
| 357 | + $pocet=$prefix; |
|
| 358 | + $i=0; |
|
| 359 | + for($r=0;$r<$pocet;$r++) |
|
| 360 | 360 | { |
| 361 | 361 | if($i%2==0) |
| 362 | - { |
|
| 363 | - $Data.=chr($suffix%16); |
|
| 364 | - } |
|
| 365 | - else |
|
| 366 | - { |
|
| 367 | - $Data.=chr(floor($suffix/16)); |
|
| 368 | - }; |
|
| 362 | + { |
|
| 363 | + $Data.=chr($suffix%16); |
|
| 364 | + } |
|
| 365 | + else |
|
| 366 | + { |
|
| 367 | + $Data.=chr(floor($suffix/16)); |
|
| 368 | + }; |
|
| 369 | 369 | $i++; |
| 370 | 370 | }; |
| 371 | - }; |
|
| 372 | - $prefix=freadbyte($f); |
|
| 373 | - $suffix=freadbyte($f); |
|
| 374 | - $pocetb+=2; |
|
| 375 | - if($echoit) echo "Prefix: $prefix Suffix: $suffix<BR>"; |
|
| 371 | + }; |
|
| 372 | + $prefix=freadbyte($f); |
|
| 373 | + $suffix=freadbyte($f); |
|
| 374 | + $pocetb+=2; |
|
| 375 | + if($echoit) echo "Prefix: $prefix Suffix: $suffix<BR>"; |
|
| 376 | 376 | }; |
| 377 | 377 | |
| 378 | 378 | for($x=0;$x<strlen($Data);$x++) |
| 379 | - { |
|
| 380 | - imagesetpixel($img,$x,$y,$Palette[ord($Data[$x])]); |
|
| 381 | - }; |
|
| 379 | + { |
|
| 380 | + imagesetpixel($img,$x,$y,$Palette[ord($Data[$x])]); |
|
| 381 | + }; |
|
| 382 | 382 | $Data=""; |
| 383 | 383 | |
| 384 | 384 | }; |
@@ -386,25 +386,25 @@ discard block |
||
| 386 | 386 | }; |
| 387 | 387 | |
| 388 | 388 | |
| 389 | - if($biBitCount==24) |
|
| 389 | + if($biBitCount==24) |
|
| 390 | 390 | { |
| 391 | - $img=imagecreatetruecolor($Width,$Height); |
|
| 392 | - $Zbytek=$Width%4; |
|
| 391 | + $img=imagecreatetruecolor($Width,$Height); |
|
| 392 | + $Zbytek=$Width%4; |
|
| 393 | 393 | |
| 394 | - for($y=$Height-1;$y>=0;$y--) |
|
| 394 | + for($y=$Height-1;$y>=0;$y--) |
|
| 395 | 395 | { |
| 396 | - for($x=0;$x<$Width;$x++) |
|
| 397 | - { |
|
| 398 | - $B=freadbyte($f); |
|
| 399 | - $G=freadbyte($f); |
|
| 400 | - $R=freadbyte($f); |
|
| 401 | - $color=imagecolorexact($img,$R,$G,$B); |
|
| 402 | - if($color==-1) $color=imagecolorallocate($img,$R,$G,$B); |
|
| 403 | - imagesetpixel($img,$x,$y,$color); |
|
| 404 | - } |
|
| 396 | + for($x=0;$x<$Width;$x++) |
|
| 397 | + { |
|
| 398 | + $B=freadbyte($f); |
|
| 399 | + $G=freadbyte($f); |
|
| 400 | + $R=freadbyte($f); |
|
| 401 | + $color=imagecolorexact($img,$R,$G,$B); |
|
| 402 | + if($color==-1) $color=imagecolorallocate($img,$R,$G,$B); |
|
| 403 | + imagesetpixel($img,$x,$y,$color); |
|
| 404 | + } |
|
| 405 | 405 | for($z=0;$z<$Zbytek;$z++) |
| 406 | - freadbyte($f); |
|
| 407 | - }; |
|
| 406 | + freadbyte($f); |
|
| 407 | + }; |
|
| 408 | 408 | }; |
| 409 | 409 | return $img; |
| 410 | 410 | |
@@ -438,14 +438,14 @@ discard block |
||
| 438 | 438 | |
| 439 | 439 | function freadbyte($f) |
| 440 | 440 | { |
| 441 | - return ord(fread($f,1)); |
|
| 441 | + return ord(fread($f,1)); |
|
| 442 | 442 | }; |
| 443 | 443 | |
| 444 | 444 | function freadword($f) |
| 445 | 445 | { |
| 446 | - $b1=freadbyte($f); |
|
| 447 | - $b2=freadbyte($f); |
|
| 448 | - return $b2*256+$b1; |
|
| 446 | + $b1=freadbyte($f); |
|
| 447 | + $b2=freadbyte($f); |
|
| 448 | + return $b2*256+$b1; |
|
| 449 | 449 | }; |
| 450 | 450 | |
| 451 | 451 | |
@@ -456,9 +456,9 @@ discard block |
||
| 456 | 456 | |
| 457 | 457 | function freaddword($f) |
| 458 | 458 | { |
| 459 | - $b1=freadword($f); |
|
| 460 | - $b2=freadword($f); |
|
| 461 | - return $b2*65536+$b1; |
|
| 459 | + $b1=freadword($f); |
|
| 460 | + $b2=freadword($f); |
|
| 461 | + return $b2*65536+$b1; |
|
| 462 | 462 | }; |
| 463 | 463 | |
| 464 | 464 | |
@@ -476,30 +476,30 @@ discard block |
||
| 476 | 476 | $CurrentBit=0; |
| 477 | 477 | function freadbits($f,$count) |
| 478 | 478 | { |
| 479 | - global $CurrentBit,$SMode; |
|
| 480 | - $Byte=freadbyte($f); |
|
| 481 | - $LastCBit=$CurrentBit; |
|
| 482 | - $CurrentBit+=$count; |
|
| 483 | - if($CurrentBit==8) |
|
| 484 | - { |
|
| 485 | - $CurrentBit=0; |
|
| 486 | - } |
|
| 487 | - else |
|
| 488 | - { |
|
| 489 | - fseek($f,ftell($f)-1); |
|
| 490 | - }; |
|
| 491 | - return RetBits($Byte,$LastCBit,$count); |
|
| 479 | + global $CurrentBit,$SMode; |
|
| 480 | + $Byte=freadbyte($f); |
|
| 481 | + $LastCBit=$CurrentBit; |
|
| 482 | + $CurrentBit+=$count; |
|
| 483 | + if($CurrentBit==8) |
|
| 484 | + { |
|
| 485 | + $CurrentBit=0; |
|
| 486 | + } |
|
| 487 | + else |
|
| 488 | + { |
|
| 489 | + fseek($f,ftell($f)-1); |
|
| 490 | + }; |
|
| 491 | + return RetBits($Byte,$LastCBit,$count); |
|
| 492 | 492 | }; |
| 493 | 493 | |
| 494 | 494 | |
| 495 | 495 | |
| 496 | 496 | function RGBToHex($Red,$Green,$Blue) |
| 497 | - { |
|
| 498 | - $hRed=dechex($Red);if(strlen($hRed)==1) $hRed="0$hRed"; |
|
| 499 | - $hGreen=dechex($Green);if(strlen($hGreen)==1) $hGreen="0$hGreen"; |
|
| 500 | - $hBlue=dechex($Blue);if(strlen($hBlue)==1) $hBlue="0$hBlue"; |
|
| 501 | - return($hRed.$hGreen.$hBlue); |
|
| 502 | - }; |
|
| 497 | + { |
|
| 498 | + $hRed=dechex($Red);if(strlen($hRed)==1) $hRed="0$hRed"; |
|
| 499 | + $hGreen=dechex($Green);if(strlen($hGreen)==1) $hGreen="0$hGreen"; |
|
| 500 | + $hBlue=dechex($Blue);if(strlen($hBlue)==1) $hBlue="0$hBlue"; |
|
| 501 | + return($hRed.$hGreen.$hBlue); |
|
| 502 | + }; |
|
| 503 | 503 | |
| 504 | 504 | function int_to_dword($n) |
| 505 | 505 | { |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | $bin=decbin($d); |
| 522 | 522 | $sbin=strlen($bin); |
| 523 | 523 | for($j=0;$j<$n-$sbin;$j++) |
| 524 | - $bin="0$bin"; |
|
| 524 | + $bin="0$bin"; |
|
| 525 | 525 | return $bin; |
| 526 | 526 | }; |
| 527 | 527 | |
@@ -7,34 +7,34 @@ |
||
| 7 | 7 | * Common error messages |
| 8 | 8 | ***************************************************************************/ |
| 9 | 9 | |
| 10 | - define('ERROR_UNKNOWN', 1000); |
|
| 11 | - define('ERROR_TEMPLATE_NOT_FOUND', 1001); |
|
| 12 | - define('ERROR_COMPILATION_FAILED', 1002); |
|
| 13 | - define('ERROR_NO_ACCESS', 1003); |
|
| 14 | - define('ERROR_INVALID_OPERATION', 1004); |
|
| 15 | - define('ERROR_LOGIN_REQUIRED', 1005); |
|
| 16 | - define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006); |
|
| 17 | - define('ERROR_NO_COOKIES', 1007); |
|
| 18 | - define('ERROR_ALREADY_LOGGEDIN', 1008); |
|
| 19 | - define('ERROR_USER_NOT_ACTIVE', 1009); |
|
| 20 | - define('ERROR_USER_NO_EMAIL', 1010); |
|
| 21 | - define('ERROR_CACHE_NOT_PUBLISHED', 1011); |
|
| 22 | - define('ERROR_CACHE_LOCKED', 1012); |
|
| 10 | + define('ERROR_UNKNOWN', 1000); |
|
| 11 | + define('ERROR_TEMPLATE_NOT_FOUND', 1001); |
|
| 12 | + define('ERROR_COMPILATION_FAILED', 1002); |
|
| 13 | + define('ERROR_NO_ACCESS', 1003); |
|
| 14 | + define('ERROR_INVALID_OPERATION', 1004); |
|
| 15 | + define('ERROR_LOGIN_REQUIRED', 1005); |
|
| 16 | + define('ERROR_MAIL_TEMPLATE_NOT_FOUND', 1006); |
|
| 17 | + define('ERROR_NO_COOKIES', 1007); |
|
| 18 | + define('ERROR_ALREADY_LOGGEDIN', 1008); |
|
| 19 | + define('ERROR_USER_NOT_ACTIVE', 1009); |
|
| 20 | + define('ERROR_USER_NO_EMAIL', 1010); |
|
| 21 | + define('ERROR_CACHE_NOT_PUBLISHED', 1011); |
|
| 22 | + define('ERROR_CACHE_LOCKED', 1012); |
|
| 23 | 23 | |
| 24 | - define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013); |
|
| 25 | - define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014); |
|
| 26 | - define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015); |
|
| 24 | + define('ERROR_SEARCHPLUGIN_WAYPOINT_FORMAT', 1013); |
|
| 25 | + define('ERROR_SEARCHPLUGIN_WAYPOINT_MANY', 1014); |
|
| 26 | + define('ERROR_SEARCHPLUGIN_WAYPOINT_NOTFOUND', 1015); |
|
| 27 | 27 | |
| 28 | - define('ERROR_DB_COULD_NOT_RECONNECT', 1016); |
|
| 29 | - define('ERROR_DB_NO_ROOT', 1017); |
|
| 28 | + define('ERROR_DB_COULD_NOT_RECONNECT', 1016); |
|
| 29 | + define('ERROR_DB_NO_ROOT', 1017); |
|
| 30 | 30 | |
| 31 | - define('ERROR_USER_NOT_EXISTS', 1018); |
|
| 32 | - define('ERROR_CACHE_NOT_EXISTS', 1019); |
|
| 33 | - define('ERROR_CACHELOG_NOT_EXISTS', 1020); |
|
| 34 | - define('ERROR_PICTURE_NOT_EXISTS', 1021); |
|
| 31 | + define('ERROR_USER_NOT_EXISTS', 1018); |
|
| 32 | + define('ERROR_CACHE_NOT_EXISTS', 1019); |
|
| 33 | + define('ERROR_CACHELOG_NOT_EXISTS', 1020); |
|
| 34 | + define('ERROR_PICTURE_NOT_EXISTS', 1021); |
|
| 35 | 35 | |
| 36 | - define('ERROR_UPLOAD_ERR_NO_FILE', 1022); |
|
| 37 | - define('ERROR_UPLOAD_ERR_SIZE', 1023); |
|
| 38 | - define('ERROR_UPLOAD_ERR_TYPE', 1024); |
|
| 39 | - define('ERROR_UPLOAD_UNKNOWN', 1025); |
|
| 40 | - define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026); |
|
| 36 | + define('ERROR_UPLOAD_ERR_NO_FILE', 1022); |
|
| 37 | + define('ERROR_UPLOAD_ERR_SIZE', 1023); |
|
| 38 | + define('ERROR_UPLOAD_ERR_TYPE', 1024); |
|
| 39 | + define('ERROR_UPLOAD_UNKNOWN', 1025); |
|
| 40 | + define('ERROR_UPLOAD_ERR_BAD_FORMAT', 1026); |
|
@@ -14,40 +14,40 @@ |
||
| 14 | 14 | * set template specific language variables |
| 15 | 15 | ****************************************************************************/ |
| 16 | 16 | |
| 17 | - $firstcache_note = t('If this is your first cache on %1, be sure to check out the <a href="articles.php?page=cacheinfo">description</a> of the individual fields.'); |
|
| 18 | - |
|
| 19 | - $submit = t('Submit cache'); |
|
| 20 | - $default_country = t('EN'); |
|
| 21 | - $default_lang = t('EN'); |
|
| 22 | - $show_all = t('Show all'); |
|
| 23 | - $default_NS = 'N'; |
|
| 24 | - $default_EW = 'E'; |
|
| 25 | - $date_time_format_message = ' ' . t('Format: DD-MM-YYYY'); |
|
| 26 | - |
|
| 27 | - $error_general = "<tr><td class='error' colspan='2'><b>" . t('Some errors occured, please check the marked fields.') . "</b></td></tr>"; |
|
| 28 | - $error_long_not_ok = '<span class="errormsg">' . t('Your chosen coordinated are invalid') . '</span>'; |
|
| 29 | - $error_lat_not_ok = $error_long_not_ok . "<br />"; |
|
| 30 | - $error_duplicate_coords = '<span class="errormsg">' . t('Another cache (<a href="viewcache.php?wp=%1">%1</a>) exists at these coords. Maybe you pressed "submit cache" twice. To publish a cache with identical coords, enter other coords first, then edit the listing and change coords.') . '</span>'; |
|
| 31 | - $time_not_ok_message = '<span class="errormsg">' . t('The entered time is invalid.') . '</span>'; |
|
| 32 | - $way_length_not_ok_message = '<span class="errormsg">' . t('The entered distance is invalid, Format: aa.aaa') . '</span>'; |
|
| 33 | - $date_not_ok_message = '<span class="errormsg">' . t('Invalid date, format:DD-MM-JJJJ') . '</span>'; |
|
| 34 | - $name_not_ok_message = ' <span class="errormsg">' . t('Cachename is invalid') . '</span>'; |
|
| 35 | - $tos_not_ok_message = '<br/><span class="errormsg">' . t('The cache can only be adopted if you agree our terms of use.') . '</span>'; |
|
| 36 | - $type_not_ok_message = ' <span class="errormsg">' . t('No cache-type is chosen.') . '</span>'; |
|
| 37 | - $size_not_ok_message = ' <span class="errormsg">' . t('No cache-size is chosen.') . '</span>'; |
|
| 38 | - $diff_not_ok_message = ' <span class="errormsg">' . t('Choose both valuations!') . '</span>'; |
|
| 39 | - $sizemismatch_message = ' <span class="errormsg">' . t('For virtual and webcam caches, the cache size has to be -no container-!') . '</span>'; |
|
| 40 | - $safari_not_allowed_message = '<span class="errormsg">' . t('Only virtual caches can be safari caches.') . '</span>'; |
|
| 41 | - $bad_wpgc_message = '<span class="errormsg">' . t('GC waypoint is invalid, must be GCxxxxx') . '</span>'; |
|
| 42 | - |
|
| 43 | - $cache_submitted = t('Your cache is successfully added to the database. You will be redirected to the cache page, now.'); |
|
| 44 | - |
|
| 45 | - $sel_message = t('Select'); |
|
| 46 | - |
|
| 47 | - $cache_attrib_js = "new Array({id}, {selected}, '{img_undef}', '{img_large}')"; |
|
| 48 | - $cache_attrib_pic = '<img id="attr{attrib_id}" src="{attrib_pic}" border="0" onmousedown="toggleAttr({attrib_id})" onmouseover="Tip(\'{html_desc}\', TITLE, \'{name}\', TITLEBGCOLOR, \'{color}\', TITLEFONTCOLOR, \'#000000\', BGCOLOR, \'#FFFFFF\', BORDERCOLOR, \'{color}\', CLICKCLOSE, true, DELAY, 0, FADEIN, false, FADEOUT, false, FONTCOLOR, \'#000080\', WIDTH, 500)" onmouseout="UnTip()" /> '; |
|
| 49 | - |
|
| 50 | - $cache_attrib_group = |
|
| 17 | + $firstcache_note = t('If this is your first cache on %1, be sure to check out the <a href="articles.php?page=cacheinfo">description</a> of the individual fields.'); |
|
| 18 | + |
|
| 19 | + $submit = t('Submit cache'); |
|
| 20 | + $default_country = t('EN'); |
|
| 21 | + $default_lang = t('EN'); |
|
| 22 | + $show_all = t('Show all'); |
|
| 23 | + $default_NS = 'N'; |
|
| 24 | + $default_EW = 'E'; |
|
| 25 | + $date_time_format_message = ' ' . t('Format: DD-MM-YYYY'); |
|
| 26 | + |
|
| 27 | + $error_general = "<tr><td class='error' colspan='2'><b>" . t('Some errors occured, please check the marked fields.') . "</b></td></tr>"; |
|
| 28 | + $error_long_not_ok = '<span class="errormsg">' . t('Your chosen coordinated are invalid') . '</span>'; |
|
| 29 | + $error_lat_not_ok = $error_long_not_ok . "<br />"; |
|
| 30 | + $error_duplicate_coords = '<span class="errormsg">' . t('Another cache (<a href="viewcache.php?wp=%1">%1</a>) exists at these coords. Maybe you pressed "submit cache" twice. To publish a cache with identical coords, enter other coords first, then edit the listing and change coords.') . '</span>'; |
|
| 31 | + $time_not_ok_message = '<span class="errormsg">' . t('The entered time is invalid.') . '</span>'; |
|
| 32 | + $way_length_not_ok_message = '<span class="errormsg">' . t('The entered distance is invalid, Format: aa.aaa') . '</span>'; |
|
| 33 | + $date_not_ok_message = '<span class="errormsg">' . t('Invalid date, format:DD-MM-JJJJ') . '</span>'; |
|
| 34 | + $name_not_ok_message = ' <span class="errormsg">' . t('Cachename is invalid') . '</span>'; |
|
| 35 | + $tos_not_ok_message = '<br/><span class="errormsg">' . t('The cache can only be adopted if you agree our terms of use.') . '</span>'; |
|
| 36 | + $type_not_ok_message = ' <span class="errormsg">' . t('No cache-type is chosen.') . '</span>'; |
|
| 37 | + $size_not_ok_message = ' <span class="errormsg">' . t('No cache-size is chosen.') . '</span>'; |
|
| 38 | + $diff_not_ok_message = ' <span class="errormsg">' . t('Choose both valuations!') . '</span>'; |
|
| 39 | + $sizemismatch_message = ' <span class="errormsg">' . t('For virtual and webcam caches, the cache size has to be -no container-!') . '</span>'; |
|
| 40 | + $safari_not_allowed_message = '<span class="errormsg">' . t('Only virtual caches can be safari caches.') . '</span>'; |
|
| 41 | + $bad_wpgc_message = '<span class="errormsg">' . t('GC waypoint is invalid, must be GCxxxxx') . '</span>'; |
|
| 42 | + |
|
| 43 | + $cache_submitted = t('Your cache is successfully added to the database. You will be redirected to the cache page, now.'); |
|
| 44 | + |
|
| 45 | + $sel_message = t('Select'); |
|
| 46 | + |
|
| 47 | + $cache_attrib_js = "new Array({id}, {selected}, '{img_undef}', '{img_large}')"; |
|
| 48 | + $cache_attrib_pic = '<img id="attr{attrib_id}" src="{attrib_pic}" border="0" onmousedown="toggleAttr({attrib_id})" onmouseover="Tip(\'{html_desc}\', TITLE, \'{name}\', TITLEBGCOLOR, \'{color}\', TITLEFONTCOLOR, \'#000000\', BGCOLOR, \'#FFFFFF\', BORDERCOLOR, \'{color}\', CLICKCLOSE, true, DELAY, 0, FADEIN, false, FADEOUT, false, FONTCOLOR, \'#000080\', WIDTH, 500)" onmouseout="UnTip()" /> '; |
|
| 49 | + |
|
| 50 | + $cache_attrib_group = |
|
| 51 | 51 | '<div class="attribgroup"><table cellspacing="0" style="display:inline;border-spacing:0px;"> |
| 52 | 52 | <tr><td bgcolor="{color}" style="line-height:9px;padding-top:2px;margin:0 0 0 0;border-left:1px solid gray;border-right:1px solid gray;border-top:1px solid gray;"><font size="1">{name}</font></td></tr> |
| 53 | 53 | <tr><td bgcolor="#F8F8F8" style="margin:0 0 0 0;border-left:1px solid gray;border-right:1px solid gray;border-bottom:1px solid gray;">{attribs}</td></tr> |
@@ -15,8 +15,8 @@ |
||
| 15 | 15 | |
| 16 | 16 | ****************************************************************************/ |
| 17 | 17 | |
| 18 | - $error_wrong_node = t('This log entry has been created on another Opencaching website. The cache can only be edited there.'); |
|
| 19 | - $removed_message_end = '---'; |
|
| 18 | + $error_wrong_node = t('This log entry has been created on another Opencaching website. The cache can only be edited there.'); |
|
| 19 | + $removed_message_end = '---'; |
|
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | function removed_log_subject($lang) |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | ****************************************************************************/ |
| 17 | 17 | |
| 18 | - $error_wrong_node = t('this description was created on another Opencaching-webserver and can only be deleted there.'); |
|
| 18 | + $error_wrong_node = t('this description was created on another Opencaching-webserver and can only be deleted there.'); |
|
| 19 | 19 | |
| 20 | - $commit = t('the cache description has been deleted'); |
|
| 21 | - $commit_title = t('delete this cache-description'); |
|
| 20 | + $commit = t('the cache description has been deleted'); |
|
| 21 | + $commit_title = t('delete this cache-description'); |
|
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | $error_suffix = '</span>'; |
| 72 | 72 | |
| 73 | 73 | $htmlnotice = |
| 74 | - '<tr><td class="spacer" colspan="2"></td></tr> |
|
| 74 | + '<tr><td class="spacer" colspan="2"></td></tr> |
|
| 75 | 75 | <tr> |
| 76 | 76 | <td class="help" colspan="2"> |
| 77 | 77 | <img src="lang/de/ocstyle/images/misc/hint.gif" border="0" width="15" height="11" alt="' . t('Notice') . '" title="' . t('Notice') . '" /> |