Commit 78c84266735019fa85d72541052ab7368b3a001d
1 parent
8b996425
Exists in
master
and in
7 other branches
Melhora na rotina de criação de pastas para cache de imagens
Showing
7 changed files
with
147 additions
and
18 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin1/head.php
| ... | ... | @@ -79,7 +79,10 @@ hr { |
| 79 | 79 | width: 40px; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | -.material-icons.md-18 { font-size: 18px; } | |
| 82 | +.material-icons.md-18 { | |
| 83 | + font-size: 18px; | |
| 84 | + background-color: #e13023; | |
| 85 | +} | |
| 83 | 86 | |
| 84 | 87 | body { |
| 85 | 88 | background-color: background-color: rgb(240, 240, 250);; |
| ... | ... | @@ -223,6 +226,128 @@ h2 small { |
| 223 | 226 | } |
| 224 | 227 | |
| 225 | 228 | |
| 229 | +.migalha { | |
| 230 | + background-color: rgb(255, 255, 255); | |
| 231 | + border-bottom-width: 0px; | |
| 232 | + margin-bottom: 20px; | |
| 233 | + height: 32px; | |
| 234 | + margin-top: 0px;" | |
| 235 | +} | |
| 236 | + | |
| 237 | +/* Breadcrumbs from http://bootsnipp.com/snippets/featured/triangle-breadcrumbs-arrows */ | |
| 238 | +.btn-breadcrumb .btn:not(:last-child):after { | |
| 239 | + content: " "; | |
| 240 | + display: block; | |
| 241 | + width: 0; | |
| 242 | + height: 0; | |
| 243 | + border-top: 17px solid transparent; | |
| 244 | + border-bottom: 17px solid transparent; | |
| 245 | + border-left: 10px solid white; | |
| 246 | + position: absolute; | |
| 247 | + top: 50%; | |
| 248 | + margin-top: -17px; | |
| 249 | + left: 100%; | |
| 250 | + z-index: 3; | |
| 251 | +} | |
| 252 | +.btn-breadcrumb .btn:not(:last-child):before { | |
| 253 | + content: " "; | |
| 254 | + display: block; | |
| 255 | + width: 0; | |
| 256 | + height: 0; | |
| 257 | + border-top: 17px solid transparent; | |
| 258 | + border-bottom: 17px solid transparent; | |
| 259 | + border-left: 10px solid rgb(173, 173, 173); | |
| 260 | + position: absolute; | |
| 261 | + top: 50%; | |
| 262 | + margin-top: -17px; | |
| 263 | + margin-left: 1px; | |
| 264 | + left: 100%; | |
| 265 | + z-index: 3; | |
| 266 | +} | |
| 267 | + | |
| 268 | +.btn-breadcrumb .btn { | |
| 269 | + padding:6px 12px 6px 24px; | |
| 270 | +} | |
| 271 | + | |
| 272 | +.btn-group.btn-breadcrumb { | |
| 273 | + margin-bottom: 0px; | |
| 274 | + margin-top: 0px; | |
| 275 | +} | |
| 276 | + | |
| 277 | +.btn-breadcrumb .btn:first-child { | |
| 278 | + padding:6px 6px 6px 10px; | |
| 279 | +} | |
| 280 | +.btn-breadcrumb .btn:last-child { | |
| 281 | + padding:6px 18px 6px 24px; | |
| 282 | +} | |
| 283 | + | |
| 284 | +/** Default button **/ | |
| 285 | +.btn-breadcrumb .btn.btn-default:not(:last-child):after { | |
| 286 | + border-left: 10px solid rgb(255, 255, 255); | |
| 287 | +} | |
| 288 | +.btn-breadcrumb .btn.btn-default:not(:last-child):before { | |
| 289 | + border-left: 10px solid #ccc; | |
| 290 | +} | |
| 291 | +.btn-breadcrumb .btn.btn-default:hover:not(:last-child):after { | |
| 292 | + border-left: 10px solid #ebebeb; | |
| 293 | +} | |
| 294 | +.btn-breadcrumb .btn.btn-default:hover:not(:last-child):before { | |
| 295 | + border-left: 10px solid #adadad; | |
| 296 | +} | |
| 297 | + | |
| 298 | +.btn-breadcrumb a:nth-child(1) { z-index:6; } | |
| 299 | +.btn-breadcrumb a:nth-child(2) { z-index:7; } | |
| 300 | +.btn-breadcrumb a:nth-child(3) { z-index:4; } | |
| 301 | +.btn-breadcrumb a:nth-child(4) { z-index:3; } | |
| 302 | +.btn-breadcrumb a:nth-child(5) { z-index:2; } | |
| 303 | +.btn-breadcrumb a:nth-child(6) { z-index:1; } | |
| 304 | + | |
| 305 | + | |
| 306 | +/* The responsive part */ | |
| 307 | + | |
| 308 | +.btn-breadcrumb > * > div { | |
| 309 | + /* With less: .text-overflow(); */ | |
| 310 | + white-space: nowrap; | |
| 311 | + overflow: hidden; | |
| 312 | + text-overflow: ellipsis; | |
| 313 | + text-transform: none; | |
| 314 | +} | |
| 315 | + | |
| 316 | +.btn-breadcrumb > *:nth-child(n+2) { | |
| 317 | + display:none; | |
| 318 | +} | |
| 319 | + | |
| 320 | +/* === For phones =================================== */ | |
| 321 | +@media (max-width: 767px) { | |
| 322 | + .btn-breadcrumb > *:nth-last-child(-n+2) { | |
| 323 | + display:block; | |
| 324 | + } | |
| 325 | + .btn-breadcrumb > * div { | |
| 326 | + max-width: 60px; | |
| 327 | + } | |
| 328 | +} | |
| 329 | + | |
| 330 | +/* === For tablets ================================== */ | |
| 331 | +@media (min-width: 768px) and (max-width:991px) { | |
| 332 | + .btn-breadcrumb > *:nth-last-child(-n+4) { | |
| 333 | + display:block; | |
| 334 | + } | |
| 335 | + .btn-breadcrumb > * div { | |
| 336 | + max-width: 100px; | |
| 337 | + } | |
| 338 | +} | |
| 339 | + | |
| 340 | +/* === For desktops ================================== */ | |
| 341 | +@media (min-width: 992px) { | |
| 342 | + .btn-breadcrumb > *:nth-last-child(-n+6) { | |
| 343 | + display:block; | |
| 344 | + } | |
| 345 | + .btn-breadcrumb > * div { | |
| 346 | + max-width: 170px; | |
| 347 | + } | |
| 348 | +} | |
| 349 | + | |
| 350 | + | |
| 226 | 351 | </style> |
| 227 | 352 | </head> |
| 228 | 353 | <script id="iconeAguardeTpl" type="x-tmpl-mustache"> |
| ... | ... | @@ -240,7 +365,7 @@ h2 small { |
| 240 | 365 | </script> |
| 241 | 366 | |
| 242 | 367 | <body style="padding-top: 55px;" id="topo"> |
| 243 | - <nav class="navbar navbar-default navbar-fixed-top"> | |
| 368 | + <nav class="navbar navbar-default navbar-fixed-top" style="margin-bottom: 0px;max-height:55px;height:55px;"> | |
| 244 | 369 | <div class="container-fluid"> |
| 245 | 370 | <div class="navbar-header"> |
| 246 | 371 | <button title="icon bar" type="button" class="navbar-toggle collapsed" data-toggle="collapse" | ... | ... |
admin1/usuarios/operacoes/index.php
| ... | ... | @@ -4,14 +4,14 @@ include (dirname ( __FILE__ ) . "/../../../ms_configura.php"); |
| 4 | 4 | error_reporting ( 0 ); |
| 5 | 5 | include "../../head.php"; |
| 6 | 6 | ?> |
| 7 | -<div class="container-fluid"> | |
| 7 | +<div class="container-fluid migalha" > | |
| 8 | 8 | <div class="row"> |
| 9 | - <ol class="breadcrumb"> | |
| 10 | - <li><a href="../../init/index.php">i3Geo</a></li> | |
| 11 | - <li><a href="../../index.php">Admin</a></li> | |
| 12 | - <li>Usuários</li> | |
| 13 | - <li class="active">Operações</li> | |
| 14 | - </ol> | |
| 9 | + <div class="btn-group btn-breadcrumb"> | |
| 10 | + <a class="btn btn-default" href="../../../init/index.php"><div>i3Geo</div></a> | |
| 11 | + <a class="btn btn-default" href="../../index.php"><div>Admin</div></a> | |
| 12 | + <a class="btn btn-default" href="#"><div>Usuários</div></a> | |
| 13 | + <a class="btn btn-default" href="#"><div>Operações</div></a> | |
| 14 | + </div> | |
| 15 | 15 | </div> |
| 16 | 16 | </div> |
| 17 | 17 | <div class="container"> | ... | ... |
classesphp/mapa_googlemaps.php
| ... | ... | @@ -487,7 +487,10 @@ function salvaCacheImagem(){ |
| 487 | 487 | } |
| 488 | 488 | $c = $cachedir."/googlemaps/$layer/$z/$x"; |
| 489 | 489 | if(!file_exists($c."/$y.png")){ |
| 490 | - mkdir($cachedir."/googlemaps/$layer/$z/$x",0744,true); | |
| 490 | + if(!file_exists($cachedir."/googlemaps/$layer/$z/$x")){ | |
| 491 | + mkdir($cachedir."/googlemaps/$layer/$z/$x",0744,true); | |
| 492 | + chmod($cachedir."/googlemaps/$layer/$z/$x",0744); | |
| 493 | + } | |
| 491 | 494 | $img->saveImage($c."/$y.png"); |
| 492 | 495 | // |
| 493 | 496 | //corta a imagem gerada para voltar ao tamanho normal |
| ... | ... | @@ -495,8 +498,6 @@ function salvaCacheImagem(){ |
| 495 | 498 | if($cortePixels > 0){ |
| 496 | 499 | $img = cortaImagemDisco($c."/$y.png",$cortePixels,256); |
| 497 | 500 | } |
| 498 | - | |
| 499 | - chmod($cachedir."/googlemaps/$layer/$z/$x",0744); | |
| 500 | 501 | chmod($c."/$y.png",0744); |
| 501 | 502 | } |
| 502 | 503 | return $c."/$y.png"; | ... | ... |
classesphp/mapa_openlayers.php
| ... | ... | @@ -506,8 +506,10 @@ function salvaCacheImagem($cachedir,$map,$tms){ |
| 506 | 506 | $nome = str_replace(".png","",$nome); |
| 507 | 507 | $nome = $nome.".png"; |
| 508 | 508 | if(!file_exists($nome)){ |
| 509 | - @mkdir(dirname($nome),0744,true); | |
| 510 | - chmod(dirname($nome),0744); | |
| 509 | + if(!file_exists(dirname($nome))){ | |
| 510 | + @mkdir(dirname($nome),0744,true); | |
| 511 | + chmod(dirname($nome),0744); | |
| 512 | + } | |
| 511 | 513 | $img->saveImage($nome); |
| 512 | 514 | // |
| 513 | 515 | //corta a imagem gerada para voltar ao tamanho normal | ... | ... |
ogc.php
| ... | ... | @@ -1208,9 +1208,10 @@ function salvaCacheImagem($cachedir,$map,$tms){ |
| 1208 | 1208 | $nome = $cachedir.$tms; |
| 1209 | 1209 | } |
| 1210 | 1210 | $nome = str_replace(".png","",$nome).".png"; |
| 1211 | - @mkdir(dirname($nome),0744,true); | |
| 1212 | - chmod(dirname($nome),0744); | |
| 1213 | - | |
| 1211 | + if(!file_exists(dirname($nome))){ | |
| 1212 | + @mkdir(dirname($nome),0744,true); | |
| 1213 | + chmod(dirname($nome),0744); | |
| 1214 | + } | |
| 1214 | 1215 | $img->saveImage($nome); |
| 1215 | 1216 | // |
| 1216 | 1217 | //corta a imagem gerada para voltar ao tamanho normal | ... | ... |