<? include 'header.php';?>
<header class="amaezi-fullscreen-header breadcrumbs section-bg" data-image-src="img/content/footer_bg-1.jpg" id="large-header">
<!-- HEADER OVERLAY -->
<div class="amaezi-header-overlay"></div>
<!-- HEADER CONTENT -->
<div class="amaezi_header_content">
<h1 class="amaezi_header_title">Photo Gallery</h1>
</div>
</header>
<div id="container" class="main-content">
<!-- SECTION: GALLERY -->
<section class="white-section high-padding">
<div class="container">
<!-- Blog posts section -->
<div class="items-wrap blog_posts_list blog-posts-shortcode gallery-posts-shortcode animateIn" data-animate="fadeIn">
<div class="posts-list grid">
<div class="tagcloud">
<?
include 'admin/connection.php';
$sql = "select * from category";
$exc = $mysqli->query($sql);
while($row = $exc->fetch_assoc()){
?>
<a title="1 topic" style="cursor: pointer;" onclick="findit(<? echo $row["id"];?>);"><? echo $row["name"];?></a>
<? } ?>
</div>
<br>
<div class="row">
<form id="categorylist">
<div id="results"></div>
</form>
</div>
</div>
</div>
</div>
</section>
</div>
<? include 'footer.php';?>
<script type="text/javascript">
loaddata();
$(document).ready(function(){
changePagination('0');
});
function changePagination(pageId){
//alert(pageId);
$("#customerlist").fadeIn(400).html
('Loading <img src="../images/quiz-loading.gif" />');
var dataString = 'pageId='+ pageId;
//alert(dataString);
$.ajax({
type: "POST",
url: "controls/gallerylist.php",
data: dataString,
cache: false,
success: function(result){
$("#results").html(result);
}
});
}
function findit(idd){
//$("#itemmasterlist").fadeIn(400).html
//('Loading <img src="images/quiz-loading.gif" />');
var dataString = 'cate='+idd;
// alert(dataString);
$.ajax({
type: "POST",
url: "gallerylist.php",
data: dataString,
cache: false,
success: function(result){
// alert(result);
$("#results").html(result);
}
});
}
function loaddata(){
var pdata = new FormData(document.getElementById("categorylist"));
$.ajax({
url: "gallerylist.php",
type: "POST",
data: pdata,
contentType: false,
cache: false,
processData:false,
success: function(data)
{
//alert(data);
$("#results").html(data);
},
error: function()
{
}
});
}
</script>
<style>
div.pagination {
padding: 3px;
margin: 3px;
text-align:center;
}
div.pagination a {
padding: 2px 5px;
margin: 2px;
border: 1px solid #AAAADD;
text-decoration: none; /* no underline */
color: #000099;
}
div.pagination a:hover, div.digg a:active {
border: 1px solid #000099;
color: #000;
}
div.pagination span.current {
padding: 2px 5px;
margin: 2px;
border: 1px solid #000099;
font-weight: bold;
background-color: #000099;
color: #FFF;
}
div.pagination span.disabled {
padding: 2px 5px;
margin: 2px;
border: 1px solid #EEE;
color: #444;
}
</style>
|