Beispiel #1
0
         $output .= "'" . $setting->site_url . "/gallery.php?gid=" . $ca4->id . "',,";
     }
 }
 // level five output (sub sub sub sub category)------------------------------
 $ca5_result = mysql_query("SELECT title,id,pub_pri,rdmcode FROM photo_galleries where active = '1' and nest_under = '{$ca4->id}'" . $extrasql . " order by galorder", $db);
 $ca5_rows = mysql_num_rows($ca5_result);
 if ($ca5_rows == 0) {
     $output .= "],";
 } else {
     while ($ca5 = mysql_fetch_object($ca5_result)) {
         $title5 = $ca5->title;
         //addslashes($title5);
         htmlspecialchars($title5);
         $output .= $cr . "['" . addslashes($title5);
         if ($setting->show_num == 1) {
             $output .= imgcount($ca5->id, 1, 0, $item_id, 0, $setting->show_private);
             $output .= " (" . $photo_rows_final . ")', ";
             $photo_rows_final = 0;
         } else {
             $output .= "', ";
         }
         if ($ca5->pub_pri == 1) {
             $output .= "'" . $setting->site_url . "/pri.php?gid=" . $ca5->id . "&gal=" . $ca5->rdmcode . "'],";
         } else {
             //$output.= "'" . $setting->site_url . "/gallery.php?gid=" . $ca5->id . "'],";
             if ($setting->modrw) {
                 $output .= "'" . $setting->site_url . "/" . mod_clean($ca5->title) . "_g" . $ca5->id . ".html'],";
             } else {
                 $output .= "'" . $setting->site_url . "/gallery.php?gid=" . $ca5->id . "'],";
             }
         }
Beispiel #2
0
				<?php
					if($gallery->pub_pri == 1){
						echo "<a href=\"pri.php?gid=$gallery->id&gal=$gallery->rdmcode\" class=\"gallery_nav\">$gallery->title</a></span>";
					} else {
						//echo "<a href=\"gallery.php?gid=$gallery->id\" class=\"gallery_nav\">$gallery->title</a></span>";
						
						mod_gallerylink($gallery->title,$gallery->id,"gallery_nav");
					}
				?>
			</span>
			<span style="font-size: 9px; color: #939393;">
			<?php
				if($setting->show_num == 1){ 
					echo "(";
					
					imgcount($gallery->id,1,0,$item_id,0,$setting->show_private);
					//$pf = $photo_rows_final + ${"photo_" . $gallery->id};
					//echo $pf;
					echo $photo_rows_final;
					
					echo ")";
				}
				$photo_rows_final = 0;
			?>
			</span>
			</td>
		</tr>
	<?
		}
	}
	if($setting->leftbox1 == 1){
Beispiel #3
0
function imgcount($x, $level, $nest_under, $item_id, $photo_rows_final, $sp)
{
    global $db, $photo_rows_final;
    $my_row = 1;
    if (!$sp) {
        $extrasql = " and pub_pri = '0'";
    } else {
        $extrasql = "";
    }
    if ($level == 1) {
        $gallery_result = mysql_query("SELECT id,nest_under FROM photo_galleries where id = '{$x}'" . $extrasql, $db);
    } else {
        $gallery_result = mysql_query("SELECT id,nest_under FROM photo_galleries where nest_under = '{$x}'" . $extrasql . " order by title", $db);
    }
    while ($gallery = mysql_fetch_object($gallery_result)) {
        $gid = $gallery->id;
        $photo_rows = mysql_result(mysql_query("SELECT COUNT(id) FROM photo_package where active = '1' and photog_show = '1' and (gallery_id = '{$gid}' or other_galleries LIKE '%,{$gid},%')"), 0);
        $photo_rows_final = $photo_rows_final + $photo_rows;
        imgcount($gallery->id, $level + 1, $gallery->nest_under, $item_id, $photo_rows_final, $sp);
        $my_row++;
    }
}