"; die(); } $workdir=""; // browser dir $template_dir="page/"; // unix dir! $google_id="UA-15136451-1"; // google analytics ID // $google_id="UA-"; // google analytics ID $google_base=array(); // may assign different google analytics ID for subsites $shoplink=""; // webshop browser subdir $baselang='hu'; // default lang $picdir="/pic/"; // location of menu images $img_alt_div="x"; // show image alternate text below image in articles $pk_version=1001; // compatibility version code $pkdb=true; // use the pk database modul $gal_col=4; // default value of gallery columns $lead_img_wrap=false; // wrap illustration image in lead list $mail_from_address="info@borzsony.hu"; $mail_from_name="Börzsöny"; $mail_subject_prefix="[borzsony.hu] "; $mail_host="localhost"; // $mail_send="mail"; $linkhead=""; // leave blank for mod_rewrite, use index.php for classic mode $redir_base=""; // contains site substring when referer is meant to be the site's internal link $redir=array(); $redir[".hu"]="hu/"; // array key is the host substring to recognize REDIR when coming from outide, value is the redir path prefix $remap_base="x"; // not empty if active $remap=array(); $art_date_pre=""; // pre- and postfix for dates $art_date_post=""; $art_upd_pre=""; $art_upd_post=""; $no_menu_alt=false; // turn off menu 'alt' function $multilang="x"; // support language change menu $uselightbox="x"; $usecache=""; $cachelife=2400000; // about a month $cache_clear_new_day="x"; $splitcache=true; // must be true if use cache AND use browser-specific midlay $separate_ie6_cache=true; $brspec_css=array(); // set browser-specific midlay, printed after the head SEO, must use splitcache for using cache $brspec_css['MSIE']['6.0']=""; $brspec_css['MSIE']['8.0']=""; $brspec_css['Firefox']=""; $upload_accept="jpg;png"; $table_pre=""; // leave it blank $fancy=" $('a.fbox').fancybox({ 'easingIn' : 'easeOutBack', 'easingOut' : 'easeInBack', 'zoomSpeedIn' : 600, 'zoomSpeedOut' : 500, 'frameWidth' : 900, 'overlayOpacity' : 0.6, 'hideOnContentClick' : false });"; ?>0) { foreach($brspec_css as $ckey=>$cit) { if($pkbrowser->Name==$ckey) { if(is_array($cit)) { foreach($cit as $ck2=>$ci2) { if($pkbrowser->Version==$ck2) $brspec_text=$ci2; } } else { $brspec_text=$cit; } } } } if($separate_ie6_cache) { if( ($pkbrowser->Name=="MSIE")&& ($pkbrowser->Version=="6.0") ) $cfn = "ie6".$cfn; } ?> =0 "; } $query .= " order by menu_group, parent_id, menu.ord"; $result = mysql_query($query); print mysql_error(); while($line = mysql_fetch_array($result)) { $line[2] = str_replace("!amp;","&",$line[2]); $line[3] = str_replace("!amp;","&",$line[3]); $line[4] = str_replace("!amp;","&",$line[4]); $line[5] = str_replace("!amp;","&",$line[5]); if($line[12]==1) { if(($line[0]==1) || ($line[6]==rtrim($remap_prefix,'/') )) { $mainurl=$line[6];$maintemplate=$line[11]; $mainpretitle=$line[3];$mainposttitle=$line[4]; $keyxseo=explode(",",$line[5]); $wf=""; foreach($keyxseo as $tu) { $wf .= trim($tu)."|"; } $wf=rtrim($wf,"|"); if($wf!="") {$keyseo="/($wf)/i"; } $mainseo=$line[16];} } $id = $line[0]; $pid = $line[1]; $head_text=$line[2]; if(($directory=="") && ($line[12]==1)) { $directory = "$line[6]/";} // group 1 first item identifies opening page $pid_arr[-$line[12]]=$line[13]; $pid_arr[$id]=$line[14]; if($pid==0) {$pid = -$line[12]; } $duma=$line[3]; $over_text=$line[4]; $current=$line[5]; $xurl=rtrim($line[6]); if($pid<0) if($line[17]!="") { if(($xurl!="")&&(substr($xurl,0,5)!="lang:")) $xurl=$line[17]."/".$xurl; } $passive=$line[7]; $enabled=$line[8]; $extra=$line[9]; $lhd=""; $lht=explode(";",$line[15]); $pkord=""; $qqq = array_ereg_search("head:",$lht);if(isset($qqq[0]) ) {$lhd = substr($lht[$qqq[0]],5);} $qqq = array_ereg_search("ord:",$lht);if(isset($qqq[0]) ) {$pkord = substr($lht[$qqq[0]],4);} $qqq = array_ereg_search("tags",$lht);if(isset($qqq[0]) ) {$tags_page = $xurl; $tags_text=substr($lht[$qqq[0]],5); } $qqq = array_ereg_search("tags_separator",$lht);if(isset($qqq[0]) ) {$tags_separator=substr($lht[$qqq[0]],15); } $xlang=$line[10]; $xtemplate=$line[11]; $mgr=$line[12]; $arr_menu[$pid][$id][1] = $duma; $arr_menu[$pid][$id][2] = $passive; $arr_menu[$pid][$id][3] = $enabled; $arr_menu[$pid][$id][4] = $head_text; $arr_menu[$pid][$id][5] = $xurl; $arr_menu[$pid][$id][6] = $over_text; $arr_menu[$pid][$id][7] = $current; $arr_menu[$pid][$id][8] = $extra; $arr_menu[$pid][$id][10] = $xtemplate; $arr_menu[$pid][$id][11] = $line[15]; $arr_menu[$pid][$id][12] = $line[16]; $arr_menu[$pid][$id][13] = $lhd; $arr_path[$id][3]=$pkord; $arr_path[$id][4]=str_replace("|","",$head_text); } function prcoll($xroot,$xlevel) { global $arr_menu,$xpath, $curdir_id, $rootdir, $rootdir_id, $directory,$curtemplate,$curlinkhead, $arr_path,$cmm, $arr_smap, $template_level,$par_dir,$par_dir_level,$par_dir_id, $curseo,$curtitle,$seo_level,$pkchmode,$menutitle,$seoplus; if(isset($arr_menu[$xroot]) ) { foreach($arr_menu[$xroot] as $key=>$item) { $xpath[$xlevel][3]=$item[4]; $xpath[$xlevel][2]=$item[10]; $xpath[$xlevel][1]=$item[5]; $xpath[$xlevel][0]=$key; $mtt = $item[4]; if($mtt=="") {$mtt=JS_UNDEFINED;} foreach($item as $kk=>$ii) { $item[$kk]=str_replace("'","\'",$ii); } $path = ""; $idpath=""; $template=""; $xtitle=""; $xcm=""; foreach($xpath as $itemq) {$path .= "$itemq[1]/"; if(substr($itemq[3],0,1)!="|") { $xtitle .= $xcm."$itemq[3] $xcm "; $xcm="-";} $idpath .= "$itemq[0],";if($itemq[2]!=""){$template=$itemq[2];} } if($path==$rootdir) { $rootdir_id=$key; } if(substr($directory,0,strlen($path))==$path) { if( ($template_level<=$xlevel) && ($template!="") ) { $curtemplate=$template; $template_level = $xlevel; } if( $par_dir_level<=$xlevel) { $par_dir=$path; $par_dir_level = $xlevel; if($par_dir_id!="") $par_dir_id .= ","; $par_dir_id .= $key; } if( ($seo_level<=$xlevel) && ($item[12]!="") ) { $curseo = str_replace("\'","'",$item[12]); if(strpos(" ".$curseo,"seoplus")>0) {$seoplus=true;$cusero=str_replace("seoplus","",$curseo);} $seo_level = $xlevel; } if($directory==$path) { if(substr($xtitle,0,1)!="|") { if($xtitle!="") $curtitle = $xtitle; } if($menutitle=="") { $menutitle=str_replace("|","",$itemq[3]); } $pkchmode.=" ".$item[11]; if($item[13]!="") $curlinkhead=$item[13].".php"; $curdir_id .="$cmm".$key; $cmm=","; } } $zct = explode("/",$path); $arr_path[$key][0]=$path; $arr_path[$key][1]=rtrim($idpath,","); $arr_path[$key][2]=$key; if( (substr($item[4],0,2)!="||") && ($zct[0]!="") ) { unset($zct[count($zct)-1]); $subz="/"; foreach($zct as $kk=>$ii) { if($kk>0) { $subz .= $ii."/"; } } $arr_smap[$zct[0]][$subz][0]=$path; $arr_smap[$zct[0]][$subz][1]=$mtt; $arr_smap[$zct[0]][$subz][2]=count($zct)-1; $arr_smap[$zct[0]][$subz][3]=$key; } if(isset($arr_menu[$key])) { prcoll($key,$xlevel+1); } } unset($xpath[$xlevel]); } // end of isset } ?>$gal_col)||($count==0)) $count=$gal_col; } if(($uselightbox=="") && (strpos(" ".$pkchmode,"lightbox")<1) ) $lbx=0; $retval = ""; $viddiv = ""; $query = "select $table_pre"."foto.folder, $table_pre"."foto.filename, $table_pre"."foto.id, $table_pre"."foto.ftype, $table_pre"."foto_desc.keszult, $table_pre"."foto_desc.szerzo, $table_pre"."foto_desc.cim, $table_pre"."foto_desc.leiras, $table_pre"."foto_desc.lang from ($table_pre"."gallery_items, $table_pre"."foto) left join $table_pre"."foto_desc on $table_pre"."foto.id=$table_pre"."foto_desc.id and foto_desc.lang='$lang' where $table_pre"."foto.id=$table_pre"."gallery_items.foto_id "; $query .= " and gallery_id='$gallery_id' "; $query .= " order by ord "; $result = mysql_query($query); print mysql_error(); $gl_arr=array(); if(($gfrom=="")||($gfrom==0)) $gfrom=1; $glt=1; $cnt=0; while($line = mysql_fetch_array($result)) { if($glt>=$gfrom) { $id=$line[2]; $keszult=$line[4]; $szerzo=$line[5]; $cim=$line[6]; $leiras=$line[7]; $showpic=str_replace(".".$line[3],".jpg",$line[1]); if(($line[3]!='jpg') && ($line[3]!='gif') && ($line[3]!='png')) { $showpic=str_replace(".".$line[3],".$line[3].jpg",$line[1]); } if($szerzo!="") $line[6].= " ($szerzo)"; $gl_arr[$cnt][1]=$showpic; $gl_arr[$cnt][2]=$line[0]; $gl_arr[$cnt][3]=$line[6]; $gl_arr[$cnt][4]=$line[1]; $gl_arr[$cnt][5]=$line[3]; $cnt++; } $glt++; } if($random=='t') { srand((float)microtime() * 1000000); shuffle($gl_arr); } $lcount=99999; if($count<1) {$count=99999;} if($max<1) {$max=99999;} $itmcount=0; $retval .= ""; $qtr=""; foreach($gl_arr as $item) { if($itmcount<$max) { if($lcount>$count) { $retval .= $qtr; $lcount=1; $qtr = ""; } $image_path_pre = "/imagebase/$item[2]/small/$item[1]"; $image_path = "/imagebase/$item[2]/$item[4]"; $retval .= ""; $lcount++; $itmcount++; } } $retval .= ""; return $retval; } ?>$item) { $text=str_replace($item,pkdb_val($lxpar[1][$key]),$text); } preg_match_all('/\{\{\{pkfname:([a-zA-Z0-9-_]*)\}\}\}/im',$text, $lxpar); foreach($lxpar[0] as $key=>$item) { $text=str_replace($item,pkdb_fld($lxpar[1][$key]),$text); } $tea=explode("{{{pkif",$text); if(count($tea)>1) { foreach($tea as $key=>$item) { if($key>0) { $item = "{{{pkif".$item; preg_match_all('/\{\{\{pkif:([a-zA-Z0-9-_]*):(.*)::([^\}]*)\}\}\}(.*)\{\{\{pkendif\}\}\}/im',$item, $lxpar); $bba=pkdb_val($lxpar[1][0]); if(substr($lxpar[3][0],0,1)=="^") { $bbc=pkdb_val(substr($lxpar[3][0],1)); } else { $bbc=$lxpar[3][0]; } $teago=explode("{{{else}}}",$lxpar[4][0]); $ccp=explode("|",$lxpar[2][0]); $ccx=explode("|",$bbc); $tsx=true; foreach($ccp as $kq=>$lxx) { switch($lxx) { case "<": $tsx=($bba<$ccx[$kq])&&$tsx; break; case "<=": $tsx=($bba<=$ccx[$kq])&&$tsx; break; case "=": $tsx=($bba==$ccx[$kq])&&$tsx; break; case "!=": $tsx=($bba!=$ccx[$kq])&&$tsx; break; case ">=": $tsx=($bba>=$ccx[$kq])&&$tsx; break; case ">": $tsx=($bba>$ccx[$kq])&&$tsx; break; } } if($tsx) {$text=str_replace($lxpar[0][0],$teago[0],$text);} else {$text=str_replace($lxpar[0][0],$teago[1],$text);} } } } } // end if isPKDB $pattern = "//"; // $match = preg_match_all($pattern, $text, $regs,PREG_OFFSET_CAPTURE ); $match = preg_match_all($pattern, $text, $regs ); foreach($regs[1] as $item) { $dd1 = explode("target=",$item[0]); $dd2 = explode("href=",$item[0]); if(strpos($dd1[1],"_ajax")) { $lpatt=$item[0]; $xlink=$dd2[1]; $xlink=str_replace('"',"",$xlink); if(strpos($xlink," ")) { $xlink = substr($xlink,0,strpos($xlink," ")); } // $xlink=str_replace(" ","",$xlink); $xlink="onclick=\"loadXMLDoc('$linkhead/".$xlink."','','float',1,'floatpos();');return false;\" "; $xlink = " href='javascript:void(0);' $xlink "; $text = str_replace($lpatt,$xlink,$text); } } $text = str_replace("../imagebase","/imagebase",$text); $rax = explode("href",$text); $text=""; foreach($rax as $key=>$item) { if($key!=0) { if(substr($item,1,2)=='"/') { $item = "href=\"/".$linkhead.substr($item,2); $item=str_replace('//','/',$item); $item=str_replace($remap_prefix,"",$item); } else { $item = "href".$item; } } $text .= $item; } // swf, flv if($newsmode!="x") { preg_match_all('/]+>/i',$text, $ddx); $ximg = array(); foreach( $ddx[0] as $img_tag) { $bimg_tag=$img_tag; $img_tag = str_replace("\"","",$img_tag); $img_tag = str_replace(">","",$img_tag); preg_match_all('/(alt|title|src|width|height|align|vspace|hspace|style)=([^ ]*)/i',$img_tag, $lxpar); $fwidth=""; $fheight=""; $flink=""; $falign=""; $fhspace="0"; $fvspace="0"; $alt=""; $pstyle=""; foreach($lxpar[1] as $kk=>$ii) { switch($ii) { case "src": $flink=$lxpar[2][$kk]; break; case "width": $fwidth=$lxpar[2][$kk]; break; case "height": $fheight=$lxpar[2][$kk]; break; case "align": $falign=$lxpar[2][$kk]; break; case "hspace": $fhspace=$lxpar[2][$kk]; break; case "vspace": $fvspace=$lxpar[2][$kk]; break; case "alt": $alt=str_replace(" "," ",$lxpar[2][$kk]); break; case "style": $pstyle=$lxpar[2][$kk]; break; } } if( strpos($img_tag,".flv.") || strpos($img_tag,".swf.") ) { if(($fwidth=="")||($fheight=="")) { $timg = @imagecreatefromjpeg("./$flink"); $fwidth = imagesx($timg); $fheight = imagesy($timg); imagedestroy($timg); } $flink=str_replace("/small","",$flink); $param=""; if(strpos($flink,".flv.") ) { $flink = substr($flink,0,strlen($flink)-8); $rt = putmovie($flink,$fwidth,$fheight,"false"); $cfol=substr($flink,11,8); $ccim=substr($flink,20); $cicoll[]=$cfol."|".$ccim.".flv"; } else { $flink = substr($flink,0,strlen($flink)-8); $rt = putflash($flink,$fwidth,$fheight,""); $cfol=substr($flink,11,8); $ccim=substr($flink,20); } $fstyle=""; if($falign!="") {$fstyle .= "float:$falign;";} if( ($fvspace!="0") && ($fhspace!="0")) { $fstyle .= "margin:$fvspace"."px $fhspace"."px $fvspace"."px $fhspace"."px;"; } $fstyle .= "width:$fwidth"."px;height:$fheight"."px;"; $rt = "
$rt
"; $text = str_replace($bimg_tag,$rt,$text); } else { preg_match_all('/(src)=([^ ]*)/i',$img_tag, $lxpar); $chimg=$bimg_tag; if(substr($bimg_tag,strlen($bimg_tag)-2,2)!="/>") { $chimg=substr($bimg_tag,0,strlen($bimg_tag)-1)."/>"; if(!strpos($chimg,"alt",$chimg)) { $chimg = substr($chimg,0,strlen($chimg)-2)." alt='' />"; } } if(strpos($lxpar[2][0],"/small/") ) { $lln=strlen($lxpar[2][0]); if( (substr($lxpar[2][0],$lln-4,1)==".") && (substr($lxpar[2][0],$lln-8,1)==".") ) { $lldoc=substr($lxpar[2][0],0,$lln-4); $lldoc=str_replace("/small/","/",$lldoc); $rt="$chimg"; } else { $rimg_tag=str_replace("/small/","/",$lxpar[2][0]); $cfol=substr($rimg_tag,11,8); $ccim=substr($rimg_tag,20); $cicoll[]=$cfol."|".$ccim; $fstyle=""; if($falign!="") {$fstyle .= "float:$falign;";} if( ($fvspace!="0") && ($fhspace!="0")) { $fstyle .= "margin:$fvspace"."px $fhspace"."px $fvspace"."px $fhspace"."px;"; } $fstyle .= $pstyle; if(($uselightbox!="") || (strpos(" ".$pkchmode,"lightbox")>0) ) { $rt=""; if($img_alt_div=="x") { $rt .= "
"; } $rt.=""; } else { $rt .= "' class='$style"."article_image_noalt_frame_pre' alt='' />"; } $rt .= ""; if($img_alt_div=="x") { if($alt!="") $rt .= "
$alt
"; $rt .= "
"; } } else { $rt="$chimg"; } } $text = str_replace($bimg_tag,$rt,$text); } else { // big image $fstyle=""; if($falign!="") {$fstyle .= "float:$falign;";} if( ($fvspace!="0") && ($fhspace!="0")) { $fstyle .= "margin:$fvspace"."px $fhspace"."px $fvspace"."px $fhspace"."px;"; } $fstyle .= $pstyle; $rt=""; if($img_alt_div=="x") { $rt .= "
"; } $rt.=""; } else { $rt .= "' class='$style"."article_image_noalt_frame' alt='' />"; } if($img_alt_div=="x") { if($alt!="") $rt .= "
$alt
"; $rt .= "
"; } if(substr($bimg_tag,strlen($bimg_tag)-2,2)!="/>") { $text = str_replace($bimg_tag,$rt,$text); } } } } } // table cell pattern $text= preg_replace("/((.*?<\/tr>[^<]*.*?<\/tr>))/s", "$2 class=\"odd\"$3", $text); if(is_array($arr_cells)) { $tab = explode("$item) { if($key>0) { $tax=explode("$i) { if(($key==1) && ($arr_cells[999]=="x")) { $k = -$k; } $xout .= "1) // PKFORM process { $fpk=""; $fpcoll=""; $fpcnt=0; $xpkfile=""; $xpkbutton=""; $xpkbutton2=""; foreach($pktext as $pitem) { if(substr($pitem,5,1)==":") { $xres=""; $pchitem = "[[[$pitem"; $pcmd=substr($pitem,0,5); $ppar=substr($pitem,6,strpos($pitem,"]]]")-6 ); switch($pcmd) { case 'pform': $fpk=$ppar; if($ppar!="end") { $xres="
"; } else { $xres="pksendreplace pkreplace
"; } break; case 'pfend': // alias for pform in case of file upload feature $xres="pksendreplace"; break; case 'dvend': // alias for pform in case of file upload feature $xres="pkreplace"; break; case 'pkdbf': $tpar=explode("|",$ppar); $xres = pkdb_field($tpar[0],$fpk,$tpar[2],$tpar[3],''); if($tpar[4]!="") {$xres .= $tpar[4];} else {$xres .= "
"; } break; case 'pkdbc': $tpar=explode("|",$ppar); $xres = pkdb_field($tpar[0],$fpk,$tpar[2],$tpar[3],$tpar[1]); break; case 'files': $tpar=explode("|",$ppar); if($tpar[3]!="") { $fpcoll .= "dmail['$fpk"."_$fpcnt']='';dchk['$fpk"."_$fpcnt']='$fpk"."_$tpar[1]';dmsg['$fpk"."_$fpcnt']='$tpar[3]';";$fpcnt++;} $xres = "
"; if($tpar[4]!="") {$xres .= $tpar[4];} else {$xres .= "
"; } break; case 'input': $tpar=explode("|",$ppar); if($tpar[3]!="") { $fpcoll .= "dmail['$fpk"."_$fpcnt']='';dchk['$fpk"."_$fpcnt']='$fpk"."_$tpar[1]';dmsg['$fpk"."_$fpcnt']='$tpar[3]';";$fpcnt++;} $xres = " $tpar[0]:$tpar[5]"; if($tpar[4]!="") {$xres .= $tpar[4];} else {$xres .= "
"; } break; case 'pcomp': $tpar=explode("|",$ppar); if($tpar[3]!="") { $fpcoll .= "dmail['$fpk"."_$fpcnt']='';dchk['$fpk"."_$fpcnt']='cmp_"."$fpk"."_$tpar[1]';dmsg['$fpk"."_$fpcnt']='$tpar[3]';";$fpcnt++;} $xres = " "; if($tpar[4]!="") {$xres .= $tpar[4];} else {$xres .= "
"; } break; case 'pwomp': $tpar=explode("|",$ppar); if($tpar[3]!="") { $fpcoll .= "dmail['$fpk"."_$fpcnt']='';dchk['$fpk"."_$fpcnt']='cmp_"."$fpk"."_$tpar[1]';dmsg['$fpk"."_$fpcnt']='$tpar[3]';";$fpcnt++;} $xres = " "; if($tpar[4]!="") {$xres .= $tpar[4];} else {$xres .= "
"; } break; case 'pksel': $tpar=explode("|",$ppar); if($tpar[3]!="") { $fpcoll .= "dmail['$fpk"."_$fpcnt']='';dchk['$fpk"."_$fpcnt']='$fpk"."_$tpar[1]';dmsg['$fpk"."_$fpcnt']='$tpar[3]';";$fpcnt++;} $xres = " "; if($tpar[4]!="") {$xres .= $tpar[4];} else {$xres .= "
"; } break; case 'phide': $tpar=explode("|",$ppar); $xres = ""; break; case 'ppass': $tpar=explode("|",$ppar); if($tpar[3]!="") { $fpcoll .= "dmail['$fpk"."_$fpcnt']='';dchk['$fpk"."_$fpcnt']='$fpk"."_$tpar[1]';dmsg['$fpk"."_$fpcnt']='$tpar[3]';";$fpcnt++;} $xres = " "; if($tpar[4]!="") {$xres .= $tpar[4];} else {$xres .= "
"; } break; case 'pmail': $tpar=explode("|",$ppar); if($tpar[3]!="") { $fpcoll .= "dmail['$fpk"."_$fpcnt']='$fpk"."_$tpar[1]';dchk['$fpk"."_$fpcnt']='$fpk"."_$tpar[1]';dmsg['$fpk"."_$fpcnt']='$tpar[3]';";$fpcnt++;} $xres = " "; if($tpar[4]!="") {$xres .= $tpar[4];} else {$xres .= "
"; } break; case 'pfile': $tpar=explode("|",$ppar); $xpkfile = "
"; $xpkbutton2 .=""; break; case 'ptext': $tpar=explode("|",$ppar); if($tpar[3]!="") { $fpcoll .= "dmail['$fpk"."_$fpcnt']='';dchk['$fpk"."_$fpcnt']='$fpk"."_$tpar[1]';dmsg['$fpk"."_$fpcnt']='$tpar[3]';";$fpcnt++;} $xres = " "; if($tpar[4]!="") {$xres .= $tpar[4];} else {$xres .= "
"; } break; case 'pincl': $tpar=explode("|",$ppar); $tstyle=$tpar[1]; include("page/".$tpar[0].".php"); break; case 'psend': $tpar=explode("|",$ppar); $xpkbutton2 .= " "; if($xpkfile=="") { $xres = ""; if($tpar[4]!="") {$xres .= $tpar[4];} else {$xres .= "
"; } } else { $xpkbutton = ""; if($tpar[4]!="") {$xpkbutton .= $tpar[4];} else {$xpkbutton .= "
"; } } break; } $text = str_replace($pchitem,$xres,$text); $text = str_replace("

","",$text); } } $text = str_replace("pkreplace",$xpkfile.$xpkbutton,$text); $text = str_replace("pksendreplace",$xpkbutton2,$text); if($fpcnt>0) { print " "; } } // end of PKFORM process return $text; } function hseo($text) { global $keyseo; if($keyseo!="") { $tq=explode(">",$text); foreach($tq as $tw) { $pz=strpos(" ".$tw,"<"); if($pz) { $tt=substr($tw,0,$pz ); } else {$tt=$tw; } if(trim($tt)!="") { $tta=$tt; preg_match_all($keyseo,$text, $lxpar); $lxy = array_unique($lxpar[1]); foreach($lxy as $sit) { $tt = str_replace($sit,"$sit",$tt); } $text = str_replace($tta,$tt,$text); } } } return $text; } function show_article($filename,$mode, $showhead, $style, $from_art=false) { global $lang, $curdir_id,$table_pre, $skip, $limit,$artid,$showgal,$view_level,$workdir,$linkhead,$article_title,$seotext,$cool_gallery,$ajaxhead,$tags,$tags_page,$tags_text,$tags_separator, $preview_mode, $cur_article_id, $article_id,$pid_arr; if(($ajaxhead==true) && ($style=="")) { $style="ajax_"; } $v_abs=""; if($view_level==1) {$v_abs="abs"; } if($mode=='base') { if($preview_mode=="") { $query = "select cim, tol, xupdated, cc.xtype, cc.verbal, cc.ximage, cc.ximage_gal_id, cc.xcount, cc.xmax, cc.xrandom, cc.width, cc.height, cc.xfloat, cc.lead, cc.lead_preview, alcim, xnumber, pub_cikk.id, $v_abs(pub_cikk.xlevel), $v_abs(cc.xlevel),ig,xfloat from pub_cikk left join pub_cikk_components as cc on pub_cikk.id=cc.id and cc.lang='$lang' "; if($view_level==0) { $query .= " and cc.xlevel<=0 "; } else { $query .= " and cc.xlevel<='$view_level' and cc.xlevel>=0 "; } $query .= " where menu_id in ($curdir_id) and pub_cikk.lang='$lang' "; if($view_level==0) { $query .= " and pub_cikk.xlevel<=0 "; } else { $query .= " and pub_cikk.xlevel<='$view_level' and pub_cikk.xlevel>=0 "; } $query .= " and (urlname='$filename' "; } else { $query = "select cim, tol, xupdated, cc.xtype, cc.verbal, cc.ximage, cc.ximage_gal_id, cc.xcount, cc.xmax, cc.xrandom, cc.width, cc.height, cc.xfloat, cc.lead, cc.lead_preview, alcim, xnumber, cikk.id, $v_abs(cikk.xlevel), $v_abs(cc.xlevel),ig,xfloat from cikk left join cikk_components as cc on cikk.id=cc.id and cc.lang='$lang' "; if($view_level==0) { $query .= " and cc.xlevel<=0 "; } else { $query .= " and cc.xlevel<='$view_level' and cc.xlevel>=0 "; } $query .= " where menu_id in ($curdir_id) and cikk.lang='$lang' "; if($view_level==0) { $query .= " and cikk.xlevel<=0 "; } else { $query .= " and cikk.xlevel<='$view_level' and cikk.xlevel>=0 "; } $query .= " and (urlname='$filename' "; } if($view_level>=1) { $query .= " or urlname='::".$_SESSION['pkluser'].":$filename' "; } $query .= ") and approved!='' order by cc.ord"; } if($mode=='label') { if($preview_mode=="") { $query = "select cim, tol, xupdated, cc.xtype, cc.verbal, cc.ximage, cc.ximage_gal_id, cc.xcount, cc.xmax, cc.xrandom, cc.width, cc.height, cc.xfloat, cc.lead, cc.lead_preview, alcim, xnumber, pub_cikk.id, $v_abs(pub_cikk.xlevel), $v_abs(cc.xlevel),ig ,xfloat from pub_cikk left join pub_cikk_components as cc on pub_cikk.id=cc.id and cc.lang='$lang' "; if($view_level==0) { $query .= " and cc.xlevel<=0 "; } else { $query .= " and cc.xlevel<='$view_level' and cc.xlevel>=0 "; } $query .= " where pub_cikk.lang='$lang' and pub_cikk.id='$filename' and tol<=sysdate() "; if($view_level==0) { $query .= " and pub_cikk.xlevel<=0 "; } else { $query .= " and pub_cikk.xlevel<='$view_level' and pub_cikk.xlevel>=0 "; } $query .= " and if(ig='0000-00-00',sysdate(),ig)>=sysdate() and approved!='' order by cc.ord"; } else { $query = "select cim, tol, xupdated, cc.xtype, cc.verbal, cc.ximage, cc.ximage_gal_id, cc.xcount, cc.xmax, cc.xrandom, cc.width, cc.height, cc.xfloat, cc.lead, cc.lead_preview, alcim, xnumber, cikk.id, $v_abs(cikk.xlevel), $v_abs(cc.xlevel),ig,xfloat from cikk left join cikk_components as cc on cikk.id=cc.id and cc.lang='$lang' "; if($view_level==0) { $query .= " and cc.xlevel<=0 "; } else { $query .= " and cc.xlevel<='$view_level' and cc.xlevel>=0 "; } $query .= " where cikk.lang='$lang' and cikk.id='$filename' and tol<=sysdate() "; if($view_level==0) { $query .= " and cikk.xlevel<=0 "; } else { $query .= " and cikk.xlevel<='$view_level' and cikk.xlevel>=0 "; } $query .= " and if(ig='0000-00-00',sysdate(),ig)>=sysdate() and approved!='' order by cc.ord"; } } $result = mysql_query($query); print mysql_error(); $isfirst="x"; $nn=mysql_num_rows($result); if(($nn==0)&&($mode=='base')&&(!$from_art) ) { print "
"; print make_art_menu($curdir_id,0,0, 't', 't','f','','list'); print"
"; } else { print "
"; while($line = mysql_fetch_array($result)) { $xtype=$line[3]; $xtext=$line[4]; $ximage=$line[5]; $ximagegal=$line[6]; $xcount=$line[7]; $xmax=$line[8]; $xrandom=$line[9]; $xwidth=$line[10]; $xheight=$line[11]; $xfloat=$line[12]; $xlead = $line[13]; $xlprev = $line[14]; $xalcim=$line[15]; $xnumber=$line[16]; if($mode=='base') { $artid[0]=$line[17]; $article_id=$line[17]; } $cur_article_id=$line[17]; $xview=$line[19]; $xtext=str_replace("!amp;","&",$xtext); $xtext=link_corrector($xtext,$style); $line[0]=str_replace("!amp;","&",$line[0]); if($isfirst=="x") // print the head { if($mode=='base') { if(substr($line[0],0,1)!="|") { $article_title=$line[0]; } else { $line[0]=substr($line[0],1); } } if($showhead) { $line[1]=str_replace("-",".",$line[1]); $line[2]=str_replace("-",".",$line[2]); $cig=str_replace("-",".",$line['ig']); $line[0] = hseo($line[0]); $xalcim = hseo($xalcim); print "

$line[0]

$xalcim
"; $curdirx_id=$curdir_id; if(strpos($curdir_id,",")>0) { $curdirx_id=substr($curdir_id,0,strpos($curdir_id,",") ); } if($pid_arr[$curdirx_id]=='calendar') { if($cig>'1000') $line[1] = "$line[1] - $cig"; print "
$line[1]
"; } else { print "
$art_date_pre"."$line[1]"."$art_date_post
$art_upd_pre"."$line[2]"."$art_upd_post
"; } print "
"; } } $isfirst=""; if($xview<=$view_level) { switch($xtype) { case 'lead': if($mode=='base') $xtext = hseo($xtext); print "
$xtext
"; break; case 'art': if($mode=='base') $xtext = hseo($xtext); print "
$xtext
"; break; case 'link': $lpart=explode("|||",$xtext); if($lpart[1]=="") {$lpart[1]=$lpart[0]; } print "$lpart[1]"; break; case 'glink': $lpart=explode("|||",$xtext); if($lpart[1]=="") {$lpart[1]=$lpart[0]; } $ximage=str_replace("/pre","",$ximage); $shashin=substr($ximage,0,strlen($ximage)-4); $shashin_ext=substr($ximage,strlen($ximage)-3); $shashin_over=""; if(file_exists(".".$shashin."over.".$shashin_ext)) { $shashin_over=$shashin."over.".$shashin_ext; } if($lpart[2]=="") { $lpart[2]="_self";} print "$lpart[0]"; break; case 'gal': print ""; break; case 'menu': print "
"; $styx=$style; $skip = $xnumber-1; $limit = $xcount; if($limit==1) $limit=-1; if($styx=="") { $styx = "article"; } $mrand=$line[21]; // random list order print make_art_menu($ximagegal,$xcount,$xmax, $xlead, $xlprev,$xrandom,$xtext,$styx,$mrand); print "
"; break; case 'flv': $flink = substr($ximage,0,strlen($ximage)-8); $flink = str_replace("/pre","",$flink); $param= "file=$flink".".flv".($xrandom=='t'?'':'&autoStart=false'); print "
"; print putmovie($flink,$xcount,$xmax+FLV_PLUS_HEI,($xrandom=='t'?'true':'false')); // print putflash($flink".".flv",$xcount,$xmax+FLV_PLUS_HEI,$param); print "
"; break; case 'swf': $flink = substr($ximage,0,strlen($ximage)-8); $flink = str_replace("/pre","",$flink); $param=$xtext; print "
"; print putflash($flink,$xcount,$xmax,$param); print "
"; break; case 'seo': $seotext = $xtext; break; case 'raw': if(substr($xtext,0,10)=="***REMOTE:") { $getme=substr($xtext,10); $tbuff = file_get_contents($getme); $tbuff = str_replace("","",$tbuff); $tbuff = str_replace("","",$tbuff); print $tbuff; } else { $xtext = str_replace("xxscrixxpt","script",$xtext); print $xtext; } break; case 'tags': $qtags=explode(";",$xtext); $tags = array_merge($tags,$qtags); break; } } } if( (count($tags)>0) && ($mode=='base') ) { $tags = array_unique($tags); print "
"; print "
$tags_text
"; print "
"; $first=1; $wdh = "$workdir/$linkhead"; if($wdh=="/") $wdh=""; foreach($tags as $itags) { if($itags!="") { $uitags = urlencode($itags); if($first==0) { print "$tags_separator";} $first=0; print "$itags"; } } print "
"; } print "
"; print "
"; // close ARTICLE DETAIL } // end of if no article found, list the dir... } ?>
"; return $retval; } function putflash($movie,$width,$height,$param) { $rnd=rand(0,1000000); // player.addParam(\"scale\", \"noscale\"); $retval = "
"; return $retval; } ?>