array('sess_subcode'=>'public_'),'datafile'=>_GALLERY_SYS_HOME_.'data/gallery.data.php')); //$g->sess_subcode='public_'; if($args['fgallery_name']) $g->name=$args['fgallery_name']; if($args['pager_block']) $g->pager_block=$args['pager_block']; if($args['self']) $g->self=$args['self']; $g->languages=$languages; if($args['extra_where']) $g->extra_where=$args['extra_where']; $g->lan=$lan; $g->pop_up_url=($args['pop_up_url'])?$args['pop_up_url']:myself().'?action=show'; $extra=Array('showing_pics'=>get_text($lan,'showing_pics'), 'over_a_total_of'=>get_text($lan,'over_a_total_of'), 'download'=>get_text($lan,'download') ); $gci=get_glob('gci'); //gestione particolare if($zz=strpos($gci,'gci=')) { $trsh1=explode('&',substr($gci,$zz)); $trsh2=explode('=',$trsh1[0]); $gci=$trsh2[1]; } $imc=get_glob('imc'); if(isset($gci)) { $db=start_db(); if($args['force_id_macrocat']) $g->where='status=1 AND fgallerycat_id=1'; else $g->where='status=1 AND fgallerycat_id='.$db->qstr($gci); $g->gci=$gci; $db->Close(); $g->pop_up_url=($args['pop_up_url'])?$args['pop_up_url']:myself().'?action=show&gci='.$gci; } $args['fgallery_interface']=($args['fgallery_interface'])?$args['fgallery_interface']:_TEMPLATES_.'fgallery.tpl'; if(is_array($args['extra_assigns'])) $extras=array_merge($args['extra_assigns'],$extra); else $extras=$extra; $args=array_merge($args,array( 'interface'=>$args['fgallery_interface'], 'extra_assigns'=>$extras) ); if($args['force_id_macrocat']) $args['id_macrocat']=0; else $args['id_macrocat']=$gci; //$args['template']=($ag['mac'])?_TEMPLATES_.'gallery_mac.tpl':_TEMPLATES_.'gallery.tpl'; $args['template']=($args['fgallery_template'])?$args['fgallery_template']:_TEMPLATES_.'fgallery.tpl'; $args['extra_assigns']['gcispec']='&gci='.$g->gci; if(!http_get_vars('id') or !is_numeric(http_get_vars('id')) or http_get_vars('id')<0) http_get_vars('id',0); $cmenu=$g->get_cat_menu($g->gci); list($h,$c)=$g->data_browser($args); //die(dump_arr($cmenu)); if(is_array($cmenu['mcat'])) { list($k,$v)=each($cmenu['mcat']); $extras['bread_crumb']='Photo Gallery > '.$v; } else $extras['bread_crumb']='Photo Gallery'; if(is_array($cmenu['peers'])) { //menu dei pari //die(dump_arr($cmenu['peers'])); while(list($k,$v)=each($cmenu['peers'])) { if($k!=$g->gci) $peers[]=''.$v.' '; else $peers[]="$v"; } if( $g->gci > 0) $extras['activecat']=$cmenu['peers'][$g->gci]; $extras['peers']=implode('    ',$peers); } ?>