<?php $arquivos = GetArquivosByAlbum($albumID); if (!isset($_SESSION['arquivosIndex'])) { $_SESSION['arquivosIndex'] = 0; } $index = $_SESSION['arquivosIndex']; $n = count($arquivos); if ($n == 0) { echo "<div class='alert alert-info'>Nenhum arquivo adicionado até o momento.</div>"; } $c = 0; for ($i = $index; $i < $n; $i++) { if ($c == 10) { break; } $img = GetImageFromType($arquivos[$i]); ?> <div class="span2 album-icon" style="height: 160px; width: 80px; margin-bottom: 20px; <?php if ($i == 0) { echo 'margin-left: 15px;'; } ?> "> <a href="arquivo-escolhido.php?id=<?php echo $arquivos[$i]['id']; ?> "> <img class="miniImages" src="thumbnails.php?file=<?php echo $img; ?> &width=90&height=70"/>
function ChangeSearchPage($var, $action) { $scope = $_SESSION['search-scope']; $array = $_SESSION['search_result']; $values = $array[$scope]; $init = $_SESSION['searchIndex']; if ($var == 0) { $var = CalculateAggregateVar($init, $action); } $index = $init + $var; $m = $index + 10; $n = count($values); $c = 0; $retval = ""; for ($i = $index; $i < $n; $i++) { if ($c == 10) { break; } $mid = ""; if ($scope == 'albuns') { $catID = $values[$i]['categoria']; $categoria = GetCategoria($catID); $img = "img/pasta.png"; $mid .= "<div class='span8' style='margin-top: 20px; margin-left: 25px;'>\n\t\t\t\t<h5>" . $values[$i]["nome"] . "</h5>\t\n\t\t\t</div>"; } if ($scope == "arquivos") { $img = GetImageFromType($values[$i]); $mid .= "<div class='span8' style='margin-left: 25px;'>\n\t\t\t\t<h5>" . $values[$i]["nome"] . "</h5>\n\t\t\t\t<p>" . $values[$i]["descricao"] . "</p>\t\n\t\t\t</div>"; } if ($scope == "marcas") { $img = $_SESSION['marcasImagePrefix'] . $values[$i]["imagem"]; $mid .= "<div class='span8' style='margin-top: 20px; margin-left: 25px;'>\n\t\t\t\t<h5>" . $values[$i]["nome"] . "</h5>\t\n\t\t\t</div>"; } $retval .= "<li style='padding-bottom: 20px;'>\n\t\t\t<div class='span10'>\n\t\t\t\t<a href='Controller/Direciona.php?id=" . $values[$i]['id'] . "&nome=" . $scope . "'>\n\t\t\t\t\t<div class='span2' style='position: relative;'>\n\t\t\t\t\t\t\t<div class='span4 offset6' style='z-index: 9999; position: absolute; display: block; margin-top: 45px;'>\n\t\t\t\t \t\t\t\t<img src='" . $_SESSION['categoriasImagePrefix'] . $categoria['imagem'] . "' />\n\t\t\t\t \t\t\t</div>\n\t\t\t\t\t\t<img src='" . $img . "' />\n\t\t\t\t\t</div>\n\t\t\t\t\t" . $mid . "\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</li>\n\t\t<hr class='span10'>"; $c++; } $_SESSION['searchIndex'] = $index; if ($action == "prev" || $action == "next") { $nextPage = ceil(($index + 1) / 10); } else { $nextPage = $action; } $pagination = UpdatePagiation($nextPage, $n, "search"); echo $retval . "|" . $pagination; return; }
</div> </div> </div> <div class="upload span4"> <?php if (isset($id)) { $arquivo = GetArquivo($id); $img = GetImageFromType($arquivo); if ($img) { list($width, $height, $type, $attr) = getimagesize($img); $width = $width * 0.5; $height = $height * 0.5; } else { $width = 130; $height = 130; } ?> <div id="escolhida-solicitacao" style="margin-bottom: 20px; height: <?php echo $height * 0.1 . "px"; ?> " > <div class="span5" style="padding-top: 5px; padding-bottom: 10px;">
<div class="span2" style="position: relative;"> <?php if ($scope == 'albuns') { $catID = $values[$i]['categoria']; $categoria = GetCategoria($catID); ?> <div class="span4 offset6" style="z-index: 9999; position: absolute; display: block; margin-top: 45px;"> <img src="<?php echo $_SESSION['categoriasImagePrefix'] . $categoria['imagem']; ?> " /> </div> <?php } if ($scope == "arquivos") { $img = GetImageFromType($values[$i]); } if ($scope == "marcas") { $img = $_SESSION['marcasImagePrefix'] . $values[$i]["imagem"]; } ?> <img src="<?php echo $img; ?> " /> </div> <?php if ($scope == "arquivos") { ?> <div class="span8" style="margin-left: 25px;"> <h5><?php