5
1
Fork 0
mirror of https://github.com/Anvilcraft/jensmemes synced 2024-11-25 03:52:31 +01:00

Update memecat.php

This commit is contained in:
ITbyHF 2020-09-02 23:58:11 +02:00 committed by GitHub
parent 327093e532
commit 1abdfe3a4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,10 +9,17 @@ $(document).ready(function(){
'; ';
global $cats; global $cats;
$c2 = 0; $c2 = 0;
echo '
if(this.value=="all"){';
foreach ($cats as $catall){
echo '$("#'.$catall->id.'").show();
';
}
echo '}';
foreach ($cats as $cate){ foreach ($cats as $cate){
if($c2==0){ if($c2==0){
echo ' echo '
if(this.value=="'.$cate->id.'"){ else if(this.value=="'.$cate->id.'"){
'; ';
foreach ($cats as $catdis) { foreach ($cats as $catdis) {
@ -56,12 +63,14 @@ echo '
global $cats; global $cats;
$c = 0; $c = 0;
echo '<option value="all" selected>All</option>';
foreach ($cats as $cate) { foreach ($cats as $cate) {
if($c==0){ if($c==0){
echo '<option value="'.$cate->id.'" selected>'.$cate->id.'</option>'; echo '<option value="'.$cate->id.'">'.$cate->id.'</option>';
$c=1; $c=1;
}else{
echo '<option value="'.$cate->id.'">'.$cate->id.'</option>';
} }
echo '<option value="'.$cate->id.'">'.$cate->id.'</option>';
} }
echo '</select></div>'; echo '</select></div>';