2){ $llisa = $arow['t2']."_";} else { unset($llisa);} ## ADR3 if ($arr_s['id'] == $arow['sisu_id'] || (($arr_s['func'] == 'u' || $arr_s['func'] == 't') and $arr_s['top'] == $arow['sisu_id'])){ if ($adr3 == 'jah' and strlen($arow['t2']) > 2){ $llisa = $arr_s['t2']."_";} else { unset($llisa);} ## ADR3 $alamtase .= "".$arow['lingitekst'].""; } else { $alamtase .= "".$arow['lingitekst'].""; } ## end of else } ## end of while if (strlen($alamtase) > 5){ $alamtase = "
$alamtase
"; } else { $alamtase = "
"; } return $s_leveltase.$alamtase; } ## end of function dropDOWN ## FUNCTION MENUfunc ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function MENUfunc($arr_s, $ask_top, $admin, $arr_bone) { include("v12.php"); if (!(in_array($admin, $ad_pass_ref) || in_array($admin, $abt_pass_ref))){ $hid_vis = " and esi != '2' "; } else { $hid_vis ='';} if ($ask_top == 65000000){ $m_dropdown = ""; $h_ja_v_seos = ""; } else { $arr_bone[85000000] = ""; } $s_uuuuppertase=''; if ($sh_l == 'en'){ $l_nihuta_linki = "Move link up"; $l_lisa_uus_lehek = "Add new page"; $l_nimeta_umber = "Rename link"; $l_kustuta_lehek = "Delete page"; $l_kas_soovid_lehek = "Do you really want
to delete the page"; $l_kustutada = "?"; $l_jah_kustuta = "Yes, delete"; $l_ulemmenuusse = "To the upper menu"; $l_under = "Under"; $l_alla = ''; $l_lingi_nimi = "Link text:"; $l_iseseisva_sisuga = "Independent page"; $l_koondlehek = "News syndicate"; $l_pildigalerii = "Picture gallery"; $l_salvesta = "Save"; $l_log_out = "Log out X"; $l_admin_juhend = "Instruction"; $l_comments_list = "Comments"; } else { $l_nihuta_linki = "Nihuta linki +1"; $l_nimeta_umber = "Nimeta ümber"; $l_lisa_uus_lehek = "Lisa uus lehekülg"; $l_kustuta_lehek = "Kustuta lehekülg"; $l_kas_soovid_lehek = "Kas soovid lehekülge"; $l_kustutada = "
kustutada?"; $l_jah_kustuta = "Jah, kustuta"; $l_ulemmenuusse = "Ülemmenüüsse"; $l_under = ""; $l_alla = "alla"; $l_lingi_nimi = "Lingi nimi:"; $l_iseseisva_sisuga = "Iseseisva sisuga"; $l_koondlehek = "Koondlehekülg"; $l_pildigalerii = "Pildigalerii"; $l_salvesta = "Salvesta"; $l_cataloq = "Tootekategooria"; $l_log_out = "Logi välja X"; $l_admin_juhend = "Admin juhend"; $l_comments_list = "Kommentaarid"; } ########### leia s alammenüü, kui on $s_alammenu ='';if(!isset($arr_s['id'])){$arr_s['id']='';} $sql_alammenu = mysql_query("SELECT sisu_id, lingitekst, t2 FROM $sisu WHERE top = '$arr_s[id]' and (func = 's' || func = 'i' || func = 'g' || func = 'c' || func = 'v') $hid_vis order by CAST(jrk AS SIGNED)"); while($arow = mysql_fetch_array($sql_alammenu)) { if ($adr3 == 'jah' and strlen($arow['t2']) > 2){ $llisa = $arow['t2']."_";} ## ADR3 $s_alammenu .= "".$arow['lingitekst']." "; } ### end of while if (!isset($llisa)){$llisa='';} if ($arr_s['func'] == 'u' || $arr_s['func'] == 't'){ ##### $syndic_highl = "class=lMActive"; $u_neljas_puu = " $pointer ".sprintf("%.45s",$arr_bone['title'])." "; if (!isset($arr_s['lingitekst'])){ $lisa_lingitekst = sprintf("%.25s",$arr_bone['title']); } unset($llisa); } ########### võta s sama taseme menüü leveltase $sql_leveltase = mysql_query("SELECT sisu_id, lingitekst, t2 FROM $sisu WHERE top = '$arr_s[top]' and lang = '$arr_bone[lang]' and sect = '$arr_s[sect]' and (func = 's' || func = 'i' || func = 'g' || func = 'c' || func = 'v') $hid_vis order by CAST(jrk AS SIGNED)"); $s_leveltase = ''; $s_tase=''; while($lrow = mysql_fetch_array($sql_leveltase)) { if ($adr3 == 'jah' and strlen($lrow['t2']) > 2){ $llisa = $lrow['t2']."_";} ## ADR3 ### ### ### ### if ($m_dropdown == 'jah' and $arr_s['top'] == $ask_top){ $dropd = " onmouseover=\"mopen('m".$lrow['sisu_id']."')\" onmouseout=\"mct()\""; $liop = "
  • "; } else {$liop='';$dropd='';$lisatoim='';} if (!isset($lisatoim)){$lisatoim='';} if ($lrow['sisu_id'] == $arr_s['id']){ if ($adr3 == 'jah' and strlen($lrow['t2']) > 2){ $llisa = $arr_s['t2']."_";} ## ADR3 $s_tase++; #### vähemalt esimene tase $s_leveltase .= "$liop".$arr_s['lingitekst']." "; $s_leveltase .= "
    $s_alammenu
    "; $s_leveltoim = ""; $s_levelpuu = "$pointer ".$arr_s['lingitekst']." "; $s_puu_ok = "olemas"; ### ### ### ### if ($m_dropdown == 'jah' and $arr_s['top'] == $ask_top){ $s_leveltase = dropDOWN($s_leveltase, $lrow['sisu_id'], $arr_s, $hid_vis)."
  • ";} } else { $s_leveltase .= "$liop".$lrow['lingitekst']."$lisatoim "; ### ### ### ### if ($m_dropdown == 'jah' and $arr_s['top'] == $ask_top){ $s_leveltase = dropDOWN($s_leveltase, $lrow['sisu_id'], $arr_s, $hid_vis)."";} } unset($llisa); } $s_uppertoim = ""; if ($arr_s['top'] == $ask_top){ #### ESIMENE välja if ($h_ja_v_seos == 'jah'){ $arr_bone[$ask_top] = "$s_alammenu "; $arr_bone[85000000] = str_replace("
    $s_alammenu
    ","",$s_leveltase); ### ### ### ### if ($m_dropdown == 'jah' and $arr_s['top'] == $ask_top){ $arr_bone[85000000] = ""; } } else { # ei ole $h_ja_v_seos $arr_bone[$ask_top] = "$s_leveltase "; } # end of ei $h_ja_v_seos ESIMENE } else { # else s_top ## sama tase on ülemine $sql_uppertase = mysql_query("SELECT sisu_id, top, lingitekst, t2 FROM $sisu WHERE top = (SELECT top FROM $sisu WHERE sisu_id = '$arr_s[top]') and (func = 's' || func = 'i' || func = 'g' || func = 'c' || func = 'v') and lang = '$arr_bone[lang]' and sect = '$arr_s[sect]' $hid_vis order by CAST(jrk AS SIGNED)"); $s_uppertase =''; while($urow = mysql_fetch_array($sql_uppertase)) { if ($adr3 == 'jah' and strlen($urow['t2']) > 2){ $llisa = $urow['t2']."_";} ## ADR3 ### ### ### ### if ($m_dropdown == 'jah' and $urow['top'] == $ask_top){ $dropd = " onmouseover=\"mopen('m".$urow['sisu_id']."')\" onmouseout=\"mct()\""; $liop = "
  • "; }else {$liop='';$dropd='';} if ($urow['sisu_id'] == $arr_s['top']){ if ($urow['top'] == $ask_top and !isset($syndic_highl) and $h_ja_v_seos == 'jah'){ $horis_highl = "class=lMActive"; ############ ######## ### highlight horisontaalile } else {$horis_highl='';} if (!isset($syndic_highl)){$syndic_highl='';} $s_tase++; #### on vähemalt teine tase $s_uppertase .= "$liop".$urow['lingitekst']." "; $s_uppertase .= "
    $s_leveltase
    "; $s_upperpuu = "$pointer ".$urow['lingitekst']." "; $s_uppertoim = ""; $s_toptop = $urow['top']; ### ### ### ### if ($m_dropdown == 'jah' and $urow['top'] == $ask_top){ $s_uppertase = dropDOWN($s_uppertase, $urow['sisu_id'], $arr_s, $hid_vis)."
  • ";} } else { $s_uppertase .= "$liop".$urow['lingitekst']." "; ### ### ### ### if ($m_dropdown == 'jah' and $urow['top'] == $ask_top){ $s_uppertase = dropDOWN($s_uppertase, $urow['sisu_id'], $arr_s, $hid_vis)."";} } unset($llisa); } ### end of while urow ## if (!isset($s_toptop)){$s_toptop='';} if ($s_toptop == $ask_top){ #### TEINE välja if ($h_ja_v_seos == 'jah'){ $arr_bone[$ask_top] = "$s_leveltase "; $arr_bone[85000000] = str_replace("
    $s_leveltase
    ","",$s_uppertase); ### ### ### ### if ($m_dropdown == 'jah'){ $arr_bone[85000000] = ""; } } else { $arr_bone[$ask_top] = "$s_uppertase "; } # end of ei $h_ja_v_seos TEINE } else { $sql_uuppertase = mysql_query("SELECT sisu_id, top, lingitekst, t2 FROM $sisu WHERE top = (SELECT top FROM $sisu WHERE sisu_id = '$s_toptop') and (func = 's' || func = 'i' || func = 'g' || func = 'c' || func = 'v') and lang = '$arr_bone[lang]' and sect = '$arr_s[sect]' $hid_vis order by CAST(jrk AS SIGNED)"); while($uurow = mysql_fetch_array($sql_uuppertase)) { if ($adr3 == jah and strlen($uurow['t2']) > 2){ $llisa = $uurow['t2']."_";} ## ADR3 ### ### ### ### if ($m_dropdown == jah and $uurow['top'] == $ask_top){ $dropd = " onmouseover=\"mopen('m".$uurow['sisu_id']."')\" onmouseout=\"mct()\""; $liop = "
  • "; }else {$liop='';} if ($uurow['sisu_id'] == "$s_toptop"){ if ($uurow['top'] == $ask_top and $h_ja_v_seos == jah){ $horis_highl = "class=lMActive"; ############ ######## ### highlight horisontaalile } $s_tase++; #### on vähemalt kolmas tase $s_uuppertase .= "$liop".$uurow['lingitekst']." "; $s_uuppertase .= "
    $s_uppertase
    "; $s_uupperpuu = "$pointer ".$uurow['lingitekst']." "; $s_uuppertoim = ""; $s_toptoptop = $uurow['top']; $aup = $uurow['sisu_id']; ### ### ### ### if ($m_dropdown == jah and $uurow['top'] == $ask_top){ $s_uuppertase = dropDOWN($s_uuppertase, $uurow['sisu_id'], $arr_s, $hid_vis)."
  • ";} } else { $s_uuppertase .= "$liop".$uurow['lingitekst']." "; $apup = $uurow['sisu_id']; ### ### ### ### if ($m_dropdown == jah and $uurow['top'] == $ask_top){ $s_uuppertase = dropDOWN($s_uuppertase, $uurow['sisu_id'], $arr_s, $hid_vis)."";} } unset($llisa); } ### end of while uurow if (!isset($s_toptoptop)){$s_toptoptop='';} if ($s_toptoptop == $ask_top){ #### KOLMAS välja if ($h_ja_v_seos == jah){ $arr_bone[$ask_top] = " $s_uppertase "; $arr_bone[85000000] = str_replace("
    $s_uppertase
    ","",$s_uuppertase); ### ### ### ### if ($m_dropdown == jah){ $arr_bone[85000000] = ""; } } else { $arr_bone[$ask_top] = " $s_uuppertase "; } # end of ei $h_ja_v_seos KOLMAS } else { $sql_uuuppertase = mysql_query("SELECT sisu_id, top, lingitekst, t2 FROM $sisu WHERE top = (SELECT top FROM $sisu WHERE sisu_id = '$s_toptoptop') and (func = 's' || func = 'i' || func = 'g' || func = 'c' || func = 'v') and lang = '$arr_bone[lang]' and sect = '$arr_s[sect]' $hid_vis order by CAST(jrk AS SIGNED)"); while($uuurow = mysql_fetch_array($sql_uuuppertase)) { if ($adr3 == jah and strlen($uuurow['t2']) > 2){ $llisa = $uuurow['t2']."_";} ## ADR3 ### ### ### ### if ($m_dropdown == jah and $uuurow['top'] == $ask_top){ $dropd = " onmouseover=\"mopen('m".$uuurow['sisu_id']."')\" onmouseout=\"mct()\""; $liop = "
  • "; } if ($uuurow['sisu_id'] == "$s_toptoptop"){ if ($uuurow['top'] == $ask_top and $h_ja_v_seos == jah){ $horis_highl = "class=lMActive"; ############ ######## ### highlight horisontaalile } $s_tase++; #### on vähemalt kolmas tase $s_uuuppertase .= "$liop".$uuurow['lingitekst']." "; $s_uuuppertase .= "
    $s_uuppertase
    "; $s_uuupperpuu = "$pointer ".$uuurow['lingitekst']." "; $s_toptoptoptop = $uuurow['top']; $aup = $uuurow['sisu_id']; ### ### ### ### if ($m_dropdown == jah and $uuurow['top'] == $ask_top){ $s_uuuppertase = dropDOWN($s_uuuppertase, $uuurow['sisu_id'], $arr_s, $hid_vis)."
  • ";} } else { $s_uuuppertase .= "$liop".$uuurow['lingitekst']." "; $apup = $uuurow['sisu_id']; ### ### ### ### if ($m_dropdown == jah and $uuurow['top'] == $ask_top){ $s_uuuppertase = dropDOWN($s_uuuppertase, $uuurow['sisu_id'], $arr_s, $hid_vis)."";} } unset($llisa); } ### end of while uurow ############################## NELJAS välja if (!isset($s_toptoptoptop)){$s_toptoptoptop='';} if ($s_toptoptoptop == $ask_top){ if ($h_ja_v_seos == jah){ $arr_bone[$ask_top] = " $s_uuppertase "; $arr_bone[85000000] = str_replace("
    $s_uuppertase
    ","",$s_uuuppertase); ### ### ### ### if ($m_dropdown == jah){ $arr_bone[85000000] = ""; } } else { $arr_bone[$ask_top] = " $s_uuuppertase "; } # end of ei $h_ja_v_seos NELJAS ORIG 4 } else { ## Viies $sql_uuuuppertase = mysql_query("SELECT sisu_id, top, lingitekst, t2 FROM $sisu WHERE top = (SELECT top FROM $sisu WHERE sisu_id = '$s_toptoptoptop') and (func = 's' || func = 'i' || func = 'g' || func = 'c' || func = 'v') and lang = '$arr_bone[lang]' and sect = '$arr_s[sect]' $hid_vis order by CAST(jrk AS SIGNED)"); while($uuuurow = mysql_fetch_array($sql_uuuuppertase)) { if ($adr3 == jah and strlen($uuuurow['t2']) > 2){ $llisa = $uuuurow['t2']."_";} ## ADR3 ### ### ### ### if ($m_dropdown == jah and $uuuurow['top'] == $ask_top){ $dropd = " onmouseover=\"mopen('m".$uuuurow['sisu_id']."')\" onmouseout=\"mct()\""; $liop = "
  • "; } if ($uuuurow['sisu_id'] == "$s_toptoptoptop"){ if ($uuuurow['top'] == $ask_top and $h_ja_v_seos == jah){ $horis_highl = "class=lMActive"; ############ ######## ### highlight horisontaalile } $s_tase++; #### on vähemalt viies tase $s_uuuuppertase .= "$liop".$uuuurow['lingitekst']." "; $s_uuuuppertase .= "
    $s_uuuppertase
    "; $s_uuuupperpuu = "$pointer ".$uuuurow['lingitekst']." "; $s_toptoptoptoptop = $uuuurow['top']; $aup = $uuuurow['sisu_id']; ### ### ### ### if ($m_dropdown == jah and $uuuurow['top'] == $ask_top){ $s_uuuuppertase = dropDOWN($s_uuuuppertase, $uuuurow['sisu_id'], $arr_s, $hid_vis)."
  • ";} } else { $s_uuuuppertase .= "$liop".$uuuurow['lingitekst']." "; $apup = $uuuurow['sisu_id']; ### ### ### ### if ($m_dropdown == jah and $uuuurow['top'] == $ask_top){ $s_uuuuppertase = dropDOWN($s_uuuuppertase, $uuuurow['sisu_id'], $arr_s, $hid_vis)."";} } unset($llisa); } ### end of while uurow ############################## VIIES välja if (!isset($s_toptoptoptoptop)){$s_toptoptoptoptop='';} if ($s_toptoptoptoptop == $ask_top){ if ($h_ja_v_seos == jah){ $arr_bone[$ask_top] = " $s_uuuppertase "; $arr_bone[85000000] = str_replace("
    $s_uuuppertase
    ","",$s_uuuuppertase); ### ### ### ### if ($m_dropdown == jah){ $arr_bone[85000000] = ""; } } else { $arr_bone[$ask_top] = " $s_uuuuppertase "; } # end of ei $h_ja_v_seos VIIES } else { ## KUUES, viimane $kolmas_tase = "ei"; $sql_uuuuuppertase = mysql_query("SELECT sisu_id, top, lingitekst, t2 FROM $sisu WHERE top = '$ask_top' and (func = 's' || func = 'i' || func = 'g' || func = 'c' || func = 'v') and lang = '$arr_bone[lang]' and sect = '$arr_s[sect]' $hid_vis order by CAST(jrk AS SIGNED)"); while($uuuuurow = mysql_fetch_array($sql_uuuuuppertase)) { if ($adr3 == 'jah' and strlen($uuuuurow['t2']) > 2){ $llisa = $uuuuurow['t2']."_";} ## ADR3 ### ### ### ### if ($m_dropdown == 'jah' and $uuuuurow['top'] == $ask_top){ $dropd = " onmouseover=\"mopen('m".$uuuuurow['sisu_id']."')\" onmouseout=\"mct()\""; $liop = "
  • "; } if ($uuuuurow['sisu_id'] == "$s_toptoptoptoptop"){ if ($uuuuurow['top'] == $ask_top and $h_ja_v_seos == jah){ $horis_highl = "class=lMActive"; ############ ######## ### highlight horisontaalile } $s_tase++; #### on vähemalt kuues tase $s_uuuuuppertase .= "$liop".$uuuuurow['lingitekst']." "; $s_uuuuuppertase .= "
    $s_uuuuppertase
    "; $s_uuuuupperpuu = "$pointer ".$uuuuurow['lingitekst']." "; $s_uuppertoim = "$s_uuuppertoim"; $aup = $uuuuurow['sisu_id']; $kolmas_tase = "jah"; ### ### ### ### if ($m_dropdown == jah and $uuuuurow['top'] == $ask_top){ $s_uuuuuppertase = dropDOWN($s_uuuuuppertase, $uuuuurow['sisu_id'], $arr_s, $hid_vis)."
  • ";} } else { if (!isset($s_uuuuuppertase)){$s_uuuuuppertase='';} $s_uuuuuppertase .= "$liop".$uuuuurow['lingitekst']." "; $apup = $uuuuurow['sisu_id']; ### ### ### ### if ($m_dropdown == 'jah' and $uuuuurow['top'] == $ask_top){ $s_uuuuuppertase = dropDOWN($s_uuuuuppertase, $uuuuurow['sisu_id'], $arr_s, $hid_vis)."";} } unset($llisa); } ### end of while uurow ############################## Kuues välja if ($h_ja_v_seos == 'jah'){ if(!isset($s_uuuuppertase)){$s_uuuuppertase='';} $arr_bone[$ask_top] = " $s_uuuuppertase "; $arr_bone[85000000] = str_replace("
    $s_uuuuppertase
    ","",$s_uuuuuppertase); ### ### ### ### if ($m_dropdown == 'jah'){ $arr_bone['85000000'] = ""; } } else { $arr_bone[$ask_top] = " $s_uuuuuppertase "; } # end of ei $h_ja_v_seos Kuues } ## kuues } } } } ### end of else $arr_s[top] ## #$arr_bone[$ask_top] .= ""; ######################################################################## ########### LINGIRIBA toimetamine ################################## ########################################################## ########################################################## if (in_array($admin, $ad_pass_ref) || in_array($admin, $abt_pass_ref) || in_array($admin, $abt_pass_ref)){ ######### esimest linki ja uudist ei saa nihutada, teisi saab if (!isset($kolmas_tase)){$kolmas_tase='';} if ($arr_s['jrk'] > 1 and $arr_s['func'] != 'u' and $kolmas_tase != 'ei'){ $nihuta_linki = " $l_nihuta_linki
    "; } ########################################################## ####### kustutada ei saa esimest ega sündikaatlehekülge if ($arr_s['func'] != 's' and $kolmas_tase != 'ei' and $arr_s['id'] != $basel["$arr_s[lang]"]['esil']){ if ($sh_l == 'en'){ if ($arr_s['func'] == 't'){ $arr_s['lingitekst'] = "$arr_s[pealkiri]"; $l_kustuta_lehek = "Delete product"; $l_kas_soovid_lehek = "Do you want product"; $l_kustutada = "
    to be deleted?"; $selselectt = "selected"; $tooteloomine = ""; $l_lingi_nimi = "Product name:"; $nihuta_linki = ""; $l_lisa_uus_lehek = "Add new product"; } elseif ($arr_s['func'] == 'c'){ $selselectc = "selected"; $l_lingi_nimi = "Category name:"; $l_lisa_uus_lehek = "Add category"; $l_kas_soovid_lehek = "Do you want category"; $l_kustutada = "
    to be deleted?"; $selcat = "selected"; $l_kustuta_lehek = "Delete category"; } } else { if ($arr_s[func] == t){ $arr_s[lingitekst] = "$arr_s[pealkiri]"; $l_kustuta_lehek = "Kustuta toode"; $l_kas_soovid_lehek = "Kas soovid toodet"; $l_kustutada = "
    kustutada?"; $selselectt = "selected"; $tooteloomine = ""; $l_lingi_nimi = "Uue toote nimi:"; $nihuta_linki = ""; $l_lisa_uus_lehek = "Lisa uus toode"; } elseif ($arr_s[func] == c){ $selselectc = "selected"; $l_lingi_nimi = "Tootekategooria nimi:"; $l_lisa_uus_lehek = "Lisa uus kategooria"; $l_kas_soovid_lehek = "Kas soovid kategooriat"; $l_kustutada = "
    kustutada?"; $selcat = "selected"; $l_kustuta_lehek = "Kustuta kategooria"; } } if (!$arr_s['lingitekst']){ $lisa_lingitekstpl .= $arr_s['pealkiri']; } if (!isset($aup)){$aup='';} if (!isset($apup)){$apup='';} if (!isset($lisa_lingitekstpl)){$lisa_lingitekstpl='';} if (!isset($kust_aeg)){$kust_aeg='';} $kustuta_link = "
    $l_kustuta_lehek"; $kustuta_link_ver = "
    $l_kas_soovid_lehek
    \"$arr_s[lingitekst]$lisa_lingitekstpl\"$l_kustutada
    $kust_aeg
    "; } $l_nimeta_umber = "$l_nimeta_umber"; $nupp_nimeta_umber = " "; if (!$arr_s['id']){ $l_nimeta_umber = ""; $nupp_nimeta_umber = ""; } if (!isset($aup)){$aup='';} if (!isset($apup)){$apup='';} if (!isset($nihuta_linki)){$nihuta_linki='';} if (!isset($kustuta_link)){$kustuta_link='';} $arr_bone[$ask_top] .= "
    $l_lisa_uus_lehek
    $nihuta_linki $nupp_nimeta_umber$l_nimeta_umber$kustuta_link
    "; if (!isset($s_leveltoim)){$s_leveltoim='';} if ($s_tase < 5){ $s_leveltoim_print = "$s_leveltoim"; } if ($kolmas_tase == 'ei'){ $s_uppertoim = ""; $s_leveltoim_print = ""; } if (isset($abt_num_set[array_search($_SESSION['admin'], $abt_pass_ref)]) && $arr_s['id'] == $abt_num_set[array_search($_SESSION['admin'], $abt_pass_ref)]){ $s_uppertoim = ""; } if ($arr_s['top'] == '75000000'){ $s_uppertoim2 = $s_uppertoim; $s_uppertoim = "$s_leveltoim_print"; $s_leveltoim_print = "$s_uppertoim2"; } $arr_bone[$ask_top] .= "
    $l_lingi_nimi
    "; $arr_bone[$ask_top] .= "
    $l_lingi_nimi
    "; $arr_bone[$ask_top] .= "
    $kustuta_link_ver
    "; if(!isset($arr_bone['javaonce'])){$arr_bone['javaonce']='';} if(!isset($arr_bone['java'])){$arr_bone['java']='';} if ($arr_bone['javaonce'] != 'jah'){ $arr_bone['java'] .= " "; $arr_bone['java'] .= ''; $arr_bone['javaonce'] = "jah"; } } else { if ($kalendriseos == 'jah'){ $arr_bone[java] .= ''; } } if ($m_dropdown == 'jah'){ #lisa dropdown javaskript if(!isset($arr_bone['java'])){$arr_bone['java']='';} } else { if ($ask_top != 65000000){ $arr_bone[java] .= ""; } } ######################################################## ####### lisa keeleerinevused menüüs #################### ######################################################## if ($arr_s['lang'] == 'et'){ $avaleht = "Avaleht "; } elseif ($arr_s['lang'] == 'ru') { $avaleht = "По русский "; } elseif ($arr_s['lang'] == 'fi') { $avaleht = "Etusivu "; } elseif ($arr_s['lang'] == 'se') { $avaleht = "Hemsida "; } elseif ($arr_s['lang'] == 'de') { $avaleht = "Startseite "; } elseif ($arr_s['lang'] == 'fr') { $avaleht = "Page D'Accueil "; } elseif ($arr_s['lang'] == 'dk') { $avaleht = "Hjemmeside "; } elseif ($arr_s['lang'] == 'es') { $avaleht = "Inicio "; } elseif ($arr_s['lang'] == 'no') { $avaleht = "Hjemmeside "; } else { $avaleht = "Front Page "; } ######################################################## ####### lisa $arr_bone sisupuu ######################### ######################################################## $srow = mysql_fetch_array(mysql_query("SELECT t2 FROM $sisu WHERE sisu_id = '".$basel["$arr_s[lang]"]['esil']."'")); unset($llisa); #$adr1$llisa".$uuurow['sisu_id']."$adr2 if ($adr3 == 'jah' and strlen($srow['t2']) > 2){ $llisa = $srow['t2']."_";} ## ADR3 $avaleht = "$avaleht"; if(!isset($kolmas_tase)){$kolmas_tase='';} if ($kolmas_tase != 'ei' and $arr_s['id'] != $basel["$arr_s[lang]"]['esil']){ if (!isset($s_uuuupperpuu)){$s_uuuupperpuu='';} if (!isset($s_uuupperpuu)){$s_uuupperpuu='';} if (!isset($s_uupperpuu)){$s_uupperpuu='';} if (!isset($s_upperpuu)){$s_upperpuu='';} if (!isset($u_neljas_puu)){$u_neljas_puu='';} if (!isset($s_levelpuu)){$s_levelpuu='';} $arr_bone['sisupuu'] = "$avaleht $s_uuuupperpuu $s_uuupperpuu $s_uupperpuu $s_upperpuu $s_levelpuu $u_neljas_puu $arr_bone[sisupuu]"; } elseif ($arr_s['id'] == $basel["$arr_s[lang]"]['esil']){ $arr_bone['sisupuu'] = $avaleht; } if (!isset($arr_bone['sisupuu'])){$arr_bone['sisupuu']='';} $arr_bone['sisupuu'] .= ""; if (!isset($arr_bone['banner'])){$arr_bone['banner']='';} $arr_bone['banner'] .= ""; if ($s_comments == 'jah'){ $c_100link = "
    $l_comments_list"; } if (!isset($q_work)){$q_work='';} if (!isset($c_100link)){$c_100link='';} if (!isset($l_log_out)){$l_log_out='';} if (!isset($arr_bone['logout'])){$arr_bone['logout']='';} if (in_array($admin, $ad_pass_ref) || (isset($_SESSION['admin']) && in_array($_SESSION['admin'], $abt_pass_ref))){ $arr_bone['logout'] .= "
    $l_log_out
    $l_admin_juhend$q_work$c_100link
    "; #
    Registreerujad } else { if ($svu_jn_q == 'jah'){ $arr_bone['logout'] .= "
    $l_log_out
    "; } else { $arr_bone['logout'] .= ""; } } if (!isset($arr_bone['85000000'])){$arr_bone['85000000']='';} $arr_bone['85000000'] = "$arr_bone[85000000]"; ################################################### ################################################################### ################################################### ####### TAGASTA $arr_bone ######################### END ################################################### return $arr_bone; } ################ end of function MENUfunc ## FUNCTION PAISfunc ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function PAISfunc($arr_s, $admin, $arr_bone) { include("v12.php"); if ($sh_l == 'en'){ $l_toimeta_paist = "Edit header"; $l_lehek_pealk = "Headline of page: "; $l_autor = "Author:"; $l_price_field = "Price"; $l_special_price_page = "on special price page"; $l_kuupaeva_kuva = "show date"; $l_sissejuhatus = "Introduction:"; $l_salvesta = "Save"; $l_title_tag = "Title tag"; $l_keywrds_tag = "META Keywords"; $l_metadescr_tag = "Description"; $l_salvesta_seaded = "Save settings"; $l_seaded = "Settings"; $l_lingitekst = "Link text"; $l_on = "is"; $l_ja_asub = "is under"; $l_all = ""; $l_lahek = "Page "; $l_uudisleht = "News page"; $l_tuup = "type"; $l_asub = "is under"; $l_nahtav = "visible"; $l_jrk = "seq num"; $l_lang = "lang"; $l_pop = "pop"; $l_comments = "Comments"; $l_not_allowed = "Not allowed"; $l_allowed = "Allowed"; } else { $l_toimeta_paist = "Toimeta päist"; $l_lehek_pealk = "Lehekülje pealkiri: "; $l_autor = "Autor:"; $l_price_field = "Hind"; $l_special_price_page = "sooduslehel"; $l_kuupaeva_kuva = "kuupäeva kuva"; $l_sissejuhatus = "Sissejuhatus:"; $l_salvesta = "Salvesta"; $l_title_tag = "Lehekülje tiitlikirje"; $l_keywrds_tag = "META võtmesõnad"; $l_metadescr_tag = "Metakirjeldus"; $l_salvesta_seaded = "Salvesta seaded"; $l_seaded = "Seaded"; $l_lingitekst = "Lingitekst"; $l_on = "on"; $l_ja_asub = "ja asub"; $l_all = "all"; $l_lahek = "Lehek"; $l_uudisleht = "Uudisleht"; $l_tuup = "tüüp"; $l_asub = "asub"; $l_nahtav = "nähtav"; $l_jrk = "jrk num"; $l_lang = "keel"; $l_pop = "pop"; $l_comments = "Kommentaarid"; $l_not_allowed = "Ei ole lubatud"; $l_allowed = "On lubatud"; } $arr_bone['pais']=$autori_rida=$l_lehek_pealk=$l_sissejuhatus=''; ##### META if ($arr_s['kirjel']){ $arr_bone['description'] = $arr_s['kirjel']; } else { $arr_bone['description'] = trim($arr_s['sissejuh']." ".$arr_bone['title']); } if ($arr_s['words']){ $arr_bone['keywords'] = $arr_s['words']; } else { $arr_bone['keywords'] = trim($arr_s['lingitekst']." ".$arr_s['pealkiri']); } if (in_array($admin, $ad_pass_ref) || in_array($admin, $abt_pass_ref)){ $arr_bone['admin'] = "Admin juhend"; } else { $arr_bone['admin'] = ""; } ###################################### ########### PÄISE printout ########### if ($arr_s['func'] == 'i' || $arr_s['func'] == 'u' || $arr_s['func'] == 'g' || $arr_s['func'] == 'c' || $arr_s['func'] == 's' || $arr_s['func'] == 't'){ if ($arr_s['func'] == 't'){ $arr_bone['pais'] .= "

    ".$arr_s['pealkiri']."

    "; #if ($arr_s['autor']){ if($arr_s['kood']) { if(!isset($lisakood)){$lisakood='';} $lisakood .= $arr_s['kood']."
    "; } $arr_bone['pais'] .= "
    $lisakood$arr_s[ladu]
    $arr_s[hind]
    "; unset($lisakood); #} } else { if ($arr_s['pealkiri']){ $arr_bone['pais'] = "

    $arr_s[pealkiri]

    "; } } if ($arr_s['func'] != 't'){ if ($arr_s['date']){ $kirjadate = date("Y m d H i s", $arr_s['date']); $ele = explode(" ", $kirjadate); $pr_day = ltrim($ele[2], '0'); if ($arr_s['comm'] == 'kuva'){ if ($arr_bone['lang'] == 'et'){ $pr_mon = ltrim($ele['1'], '0'); $pr_mon = $kuud[$pr_mon]; $kirjadate = "$pr_day. $pr_mon $ele[0]"; } else { $pr_mon = $ele[1]; $kirjadate = "$pr_day/$pr_mon/$ele[0]"; #kell $ele[3]:$ele[4] } ## if et } ## if kuva $kuup_rippmenud3 = para_calender($arr_s['date'], 0); } ## if date if ($arr_s['autor']){ if ($arr_s['comm']){ $arr_bone['pais'] .= "
    $arr_s[autor] $kirjadate
    "; } else { $arr_bone['pais'] .= "
    $arr_s[autor]
    "; } } else { if ($arr_s['comm']){ $arr_bone['pais'] .= "
    $kirjadate
    "; } } } ## end of kui ei ole !t if ($arr_s['sissejuh']){ $arr_bone['pais'] .= "

    ".nl2br($arr_s['sissejuh'])."

    "; } if (isset($arr_bone['pais']) && strlen($arr_bone['pais']) > 1){ $arr_bone['pais'] = "
    $arr_bone[pais]
    "; } } #### end of if func i || u ######################################## ########### PÄISE toimetamine ########## if (in_array($admin, $ad_pass_ref) || in_array($admin, $abt_pass_ref)){ if ($arr_s['func'] == 'i' || $arr_s['func'] == 'u' || $arr_s['func'] == 'g' || $arr_s['func'] == 'c' || $arr_s['func'] == 's' || $arr_s['func'] == 't'){ $toim_paist = " $l_toimeta_paist   "; if ($arr_s['comm']){ $kuup_kuva_chk = "checked"; } else { $kuup_kuva_chk = ""; } if (!in_array($arr_s['func'], array('t', 'c'))){ $autori_rida = "
    $l_autor
    $l_kuupaeva_kuva $kuup_rippmenud3"; } elseif ($arr_s['func'] == 't'){ $autori_rida = "

    "; } $i_ja_u = "
    $l_lehek_pealk
    $autori_rida
    $l_sissejuhatus
    "; } $metatoim = "
    $l_title_tag:
    $l_keywrds_tag:
    $l_metadescr_tag:
    "; $toplk = mysql_fetch_array(mysql_query("SELECT func FROM $sisu WHERE sisu_id = '$arr_s[top]'")); if ($toplk['func'] == 's'){ $lehek_tyyp = $lehek_tyyp + array('u' => "$l_uudisleht"); } if ($toplk['func'] != 'c'){ unset($lehek_tyyp['t']); } $lehek_tyyp_drop = ""; $lehek_esi_drop = " $l_nahtav "; if ($meta_dial == 'jah'){ $toim_meta_link = " META  "; } if(!isset($arr_bone['pais'])){$arr_bone['pais']='';} $arr_bone['pais'] .= "
    $toim_paist $toim_meta_link $l_seaded
    $i_ja_u $metatoim"; #$l_lingitekst
    id=$arr_s[id] $l_on $lehek_tyyp_drop $l_ja_asub $l_all $arr_bone['pais'] .= "
    $l_lahek id=$arr_s[id] $l_tuup $lehek_tyyp_drop $l_asub $l_all$lehek_esi_drop
    "; if ($arr_s['func'] != 'u'){ $arr_bone['pais'] .= "$l_lingitekst "; } else { $arr_bone['pais'] .= " "; } if (!isset($_REQUEST['sec']) || (isset($_REQUEST['sec']) && $_REQUEST['sec'] != 'edit')){ $sect_disable = "READONLY style='color: #aaaaaa; background: #eeeeee; border: solid 1px #aaaaaa' "; } else { $sect_disable = "";} if ($s_comments == 'jah' and in_array($arr_s[func], array('u','i'))){ if ($arr_s[tuus] == 1){ $com_drop = " "; } else { $com_drop = " "; } $e_comment = "
    $l_comments
    "; } else { $e_comment = ""; } $arr_bone['pais'] .= "$l_jrk $l_lang sect $l_pop
    $e_comment
    "; } ### end of if admin ########################################## ################## TAGASTA päis ### return $arr_bone; } ################ PAISfunc END # ## FUNCTION TILDEfunc ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function TILDEfunc($intext) { $intext = str_replace("Ä", 'Ä', $intext); $intext = str_replace("Ö", 'Ö', $intext); $intext = str_replace("Ü", 'Ü', $intext); $intext = str_replace("Õ", 'Õ', $intext); $intext = str_replace("ä", 'ä', $intext); $intext = str_replace("ö", 'ö', $intext); $intext = str_replace("ü", 'ü', $intext); $intext = str_replace("õ", 'õ', $intext); ########################################## ################## TAGASTA ÜÄÕ tähed ### return $intext; } ############# TILDEfunc END # ## FUNCTION liituLISTIGA ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function liituLISTIGA($arr_s, $arr_bone) { include("v12.php"); $l = $_REQUEST['l']; $aad = $_REQUEST['aad']; if ($arr_s[lang] == en){ $l_liitu = "Join with e-mail list:"; $l_submit = "Submit"; $arr_bone[java] .= ""; } elseif ($arr_s[lang] == ru){ $l_liitu = "Join with e-mail list:"; $l_submit = "Submit"; $arr_bone[java] .= ""; $arr_s[lang] = "en"; } else { $l_liitu = "Liitu e-maililistiga:"; $l_submit = "Liitu"; $arr_bone[java] .= ""; } $arr_bone[liitulistiga] = "
    $l_liitu
    "; ##################################################### ############ TAGASTA e-maililistiga liitumise vorm ### return $arr_bone; } ############# liituLISTIGA END # ## FUNCTION otsinguNUPP ######################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function otsinguNUPP($arr_bone) { include("v12.php"); ## kuvab otsingunupu if (!isset($_REQUEST['otsing'])){$_REQUEST['otsing']='';} $otsing = $_REQUEST['otsing']; if ($arr_bone['lang'] == "et"){ $l_sisuotsing = "Lehekülgede sisuotsing"; $l_search = "Otsing"; $l_search_nupp = "Otsi"; $l_search_default = "Otsi lehelt"; } else { $l_sisuotsing = "Search from pages"; $l_search = "Search"; $l_search_nupp = "Search"; $l_search_default = "Search pages"; } if (!$otsing){ if (!isset($arr_bone['otsing'])){ $otsing = $l_search_default; $onfocus = "onfocus=\"if (this.value==this.defaultValue) this.value='';\""; } else { $otsing = $arr_bone[otsing]; } } $arr_bone['otsingunupp'] = "
    "; ########################################## ################## TAGASTA nupp ### return $arr_bone; } ################ otsinguNUPP END # ## FUNCTION sitemapNUPP ######################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function sitemapNUPP($arr_bone) { include("v12.php"); ## kuvab sitemap nuppu if ($arr_bone['lang'] == "et"){ $l_title = "Sisupuu"; $lang = "&l=$arr_bone[lang]"; } else { $l_title = "Sitemap"; $lang = "&l=$arr_bone[lang]"; } $arr_bone['sitemapnupp'] = "\"$loc_index?action=sitemap".$lang."&sct=$arr_bone[sect]\""; ########################################## ################## TAGASTA nupp ### return $arr_bone; } ################ sitemapNUPP END # ## FUNCTION marksonaPILV ######################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function marksonaPILV($arr_bone, $admin) { include("v12.php"); ## kuvab märksõnapilve if ($arr_bone['lang'] == 'et'){ $edit_keyw = "Toimeta silte"; } else { $edit_keyw = "Edit keywords"; } $mrks_sqkl = mysql_query("SELECT id, marksona, t2 FROM $marksona WHERE kat = '1' and lang = '$arr_bone[lang]' ORDER BY marksona"); function gen_style(){ $styl = array( 'style="font: bold 9px/15px verdana"', 'style="font: normal 10px/15px georgia"', 'style="font: bold 10px/15px georgia"', 'style="font: normal 11px/15px verdana"', 'style="font: bold 11px/15px verdana"', 'style="font: normal 12px/15px \'Trebuchet MS\'"', 'style="font: bold 12px/15px verdana"', 'style="font: normal 13px/15px Georgia"', 'style="font: bold 13px/15px verdana"', 'style="font: normal 14px/15px verdana"', 'style="font: bold 14px/15px arial"', 'style="font: normal 15px/15px \'Courier New\'"', 'style="font: bold 15px/15px \'Times New Roman\'"',); $rsl = rand(0,(count($styl)-1)); return $styl[$rsl]; } while($mrks = mysql_fetch_array($mrks_sqkl)) { $stylv = gen_style(); while ($stylv == $oldstyle){ $stylv = gen_style(); } if (strpos($adr1, "?") === 0){ $lisa = "&"; } else { $lisa = "?"; } $lang = "&l=$arr_bone[lang]"; $arr_bone[mrkspilv] .= "$mrks[marksona]  "; $oldstyle = $stylv; } $arr_bone[mrkspilv] .= ""; if (in_array($admin, $ad_pass_ref) || in_array($admin, $abt_pass_ref)){ $arr_bone[mrkspilv] .= "
    $edit_keyw
    "; } ########################################## ################## TAGASTA pilv ### return $arr_bone; } ################ marksonaPILV END # ## FUNCTION printVERSION ######################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function printVERSION($arr_s, $arr_bone) { include("v12.php"); ## kuvab printerinupu $otsing = $_REQUEST['otsing']; if ($arr_bone['lang'] == "et"){ $l_button = "Trükiversioon"; } else { $l_button = "Print version"; } if ($arr_s['id']){ if (strpos($adr1, "?") === 0){ $lisa = "&"; } else { $lisa = "?"; } if ($adr3 == 'jah' and strlen($arr_s['t2']) > 2){ $llisa = $arr_s['t2']."_";} ## ADR3 $arr_bone['printnupp'] = "\"$adr1$llisa$arr_s[id]$adr2".$lisa."action=print\" rel=\"nofollow\""; } else { $arr_bone['printnupp'] = ""; } ########################################## ################## TAGASTA nupp ### return $arr_bone; } ################ printVERSION END # ## FUNCTION googleANALYTICS ######################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function googleANALYTICS($arr_s, $arr_bone) { include("v12.php"); ## kuvab analyticsi koodi if (strlen($analytics_code) > 11 and strpos($analytics_code, 'UA-') == 0 and $analytics_code != 'UA-3713000-1' and !in_array($arr_s[id], array(6,7,8))){ $arr_bone[logout] .= ""; } ########################################## ################## TAGASTA google ### return $arr_bone; } ################ googleANALYTICS END # ## FUNCTION sectMENU ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function sectMENU($arr_bone, $admin) { include("v12.php"); ### teeb horisontaalse sectmenüü foreach ($sectmenu as $key => $value){ $counter++; $srow = mysql_fetch_array(mysql_query("SELECT t2, sect FROM $sisu WHERE sisu_id = '$key'")); unset($llisa); if ($adr3 == jah and strlen($srow['t2']) > 2){ $llisa = $srow['t2']."_";} ## ADR3 if ($srow['sect'] == $arr_bone[sect]){ if ($arr_bone[sect] == 1){ $active = " style='color:#cb9977'"; } else { $active = " style='color:#ffffff'"; } } else { $active = ""; } $arr_bone[sectmenu] .= " $value "; } $arr_bone[sectmenu] = "
    $arr_bone[sectmenu]
    "; ########################################## ################## TAGASTA sectmenüü ### return $arr_bone; } ################ sectMENU END # ## FUNCTION kirjaDATEfunc ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function kirjaDATEfunc($date) { include("v12.php"); ## teeb tavalisest ajastambist ## nähtava ja loetava kuupäeva $kirjadate = date("Y m d H i s", $date); $ele = explode(" ", $kirjadate); $pr_mon = ltrim($ele[1], '0'); $pr_day = ltrim($ele[2], '0'); $pr_mon = $kuud[$pr_mon]; $kirjadate = "$pr_day. $pr_mon $ele[0]"; #kell $ele[3]:$ele[4] ########################################## ################## TAGASTA kirjadate ### return $kirjadate; } ################ kirjaDATEfunc END # ## FUNCTION para_calender ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function para_calender($kuupaev, $marker){ include("v12.php"); ## funktsioon võtab kuupäeva ja tagastab ## rippmenüüd, milles on kuupäev juba sees if ($kuupaev){ $ele = explode(" ", date("j n Y", "$kuupaev")); } ### kuupäevad if ($marker === 0){ $calm1 = 1; $calm2 = 2; $calm3 = 3; } elseif ($marker == 1){ $calm1 = 4; $calm2 = 5; $calm3 = 6; } else { $calm1 = 7; $calm2 = 8; $calm3 = 9; } $cal1 = ""; ### kuud $cal2 = ""; ### aastad $cal3 = ""; ########################################## ################## TAGASTA kalender ### return "$cal1 $cal2 $cal3"; } ################ para_calender END # ## FUNCTION print_calendar ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function print_calendar($month, $year, $arr_bone, $nooled) { include("v12.php"); $weekdaytostart = 1; ## kutsutakse kuu ja aasta järgi kaks korda ## kummalgi korral väljastab kalendrikuu $praegu = explode(" ", date("Y n d", strtotime("now"))); $tnane = ltrim($praegu[2], "0")." $praegu[1] $praegu[0]"; $last = idate('d', last_day($month, $year)); // We also need to know what day of the week the first day is, and let's // let the system tell us what the name of the Month is: $firstdaystamp = mktime(0, 0, 0, $month, 1, $year); $firstwday = idate('w', $firstdaystamp); if ($arr_bone[lang] == "et"){ $kuunimed = array('', 'Jaanuar', 'Veebruar', 'Märts', 'Aprill', 'Mai', 'Juuni', 'Juuli', 'August', 'September', 'Oktoober', 'November','Detsember'); } elseif ($arr_bone[lang] == "en"){ $kuunimed = array('', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November','December'); } elseif ($arr_bone[lang] == "ru"){ $kuunimed = array('', 'ŠÆŠ½Š²Š°Ń€ŃŒ', 'Š¤ŠµŠ²Ń€Š°Š»ŃŒ', 'ŠœŠ°Ń€Ń‚', 'ŠŠæрŠµŠ»ŃŒ', 'ŠœŠ°Š¹', 'Š˜ŃŽŠ½ŃŒ', 'Š˜ŃŽŠ»ŃŒ', 'ŠŠ²Š³ŃƒŃŃ‚', 'Š”ŠµŠ½Ń‚яŠ±Ń€ŃŒ', 'ŠžŠŗтяŠ±Ń€ŃŒ', 'ŠŠ¾ŃŠ±Ń€ŃŒ', 'Š”ŠµŠŗŠ°Š±Ń€ŃŒ'); } elseif ($arr_bone[lang] == "fr"){ $kuunimed = array('', 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Aoūt', 'Septembre', 'Octobre', 'Novembre', 'Décembre'); } else { $kuunimed = array('', '01.', '02.', '03.', '04.', '05.', '06.', '07.', '08.', '09.', '10.', '11.','12.'); } $toimub = array("" => "Toimub", "en" => "There are", "ru" => "There are", "fr" => "There are"); $festivali = array("" => "sündmust. Kliki, et nimekirja vaadata", "en" => "events on this date. Click to see full list.", "ru" => "events on this date. Click to see full list.", "fr" => "events on this date. Click to see full list."); $name = $kuunimed[date('n', $firstdaystamp)]; // To easily enable our 'any day of the week start', we need to make an // array of weekday numbers, in the actual printing order we are using $weekorder = array(); for ($wo = $weekdaytostart; $wo < $weekdaytostart + 7; $wo++) { $weekorder[] = $wo % 7; } // Now, begin our HTML table $arr_bone[kalender] .= ""; // Now before we really start, print a day row: // Use the system to tell us the days of the week: $arr_bone[kalender] .= ''; // Loop over a full week, based upon day 1 $paevanimed = array('P', 'E', 'T', 'K', 'N', 'R', 'L'); foreach ($weekorder as $w) { $dayname = $paevanimed[date('w', mktime(0, 0, 0, $month, 1 - $firstwday + $w, $year))]; $arr_bone[kalender] .= ""; } $arr_bone[kalender] .= "\n"; // Now we need to start some counters, and do some looping: $onday = 0; $started = false; // While we haven't surpassed the last day of the month, loop: while ($onday <= $last) { // Begin our next row of the table $arr_bone[kalender] .= ""; // Now loop 0 through 6, for the days of the week, but in the order // we are actually going, use mod to make this work foreach ($weekorder as $d) { // If we haven't started yet: if (!($started)) { // Does today equal the first weekday we should start on? if ($d == $firstwday) { // Set that we have started, and increment the counter $started = true; $onday++; } } // Now if the day is zero or greater than the last day make a // blank table cell. if (($onday == 0) || ($onday > $last)) { $arr_bone[kalender] .= ""; } else { $otsing = "$onday $month $year"; if ($otsing === $tnane){ $spday = "$onday"; } else { $spday = $onday; } $otsing = strtotime("$year-$month-$onday"); $lang = $arr_bone[lang]; $crow = mysql_fetch_array(mysql_query("SELECT count(*) FROM $sisu, $para WHERE ($para.cal = '$otsing' || $para.teema = '$otsing' || ($para.cal < '$otsing' and $para.teema > '$otsing')) and $sisu.sisu_id = $para.lehek and $sisu.lang = '$lang' and $sisu.pop != 'del'")); if ($crow[0] > 1){ $laycnt++; $arr_bone[kalender] .= ""; $eventc = 0; } elseif ($crow[0] == 1){ $row = mysql_fetch_array(mysql_query("SELECT $sisu.pealkiri, $sisu.sissejuh, $sisu.sisu_id, $sisu.t2 FROM $sisu, $para WHERE ($para.cal = '$otsing' || $para.teema = '$otsing' || ($para.cal < '$otsing' and $para.teema > '$otsing')) and $sisu.sisu_id = $para.lehek and $sisu.lang = '$lang' and $sisu.pop != 'del'")); unset($llisa); if ($adr3 == jah and strlen($row['t2']) > 2){ $llisa = $row['t2']."_";} ## ADR3 $extracted = $row[pealkiri]; $extracted .= " ".$row[sissejuh]; $extracted = str_replace("\"", "",$extracted); $arr_bone[kalender] .= ""; } else { // Otherwise, echo out a day & Increment the counter $arr_bone[kalender] .= ""; #1.6.2007 } $onday++; } } // End this table row: $arr_bone[kalender] .= ""; } // Now end the table: $arr_bone[kalender] .= '
    $nooled[prev]$name $year$nooled[next]
    {$dayname}
      $spday
    "; $multp = mysql_query("SELECT $sisu.pealkiri, $sisu.sissejuh, $sisu.sisu_id, $para.txt, $sisu.t2 FROM $sisu, $para WHERE ($para.cal = '$otsing' || $para.teema = '$otsing' || ($para.cal < '$otsing' and $para.teema > '$otsing')) and $sisu.sisu_id = $para.lehek and $sisu.lang = '$lang' and $sisu.pop != 'del' ORDER by $para.cal DESC"); while($row = mysql_fetch_array($multp)) { unset($llisa); if ($adr3 == jah and strlen($row['t2']) > 2){ $llisa = $row['t2']."_";} ## ADR3 $eventc++; $extracted = $row[pealkiri]; $extracted .= " ".$row[sissejuh]; $extracted .= " ".strip_tags($row[txt]); $extracted = sprintf("%.62s",str_replace("\"", "",$extracted)); #$extracted = " ".strip_tags($row[txt]); #$extracted .= " ".$row[pealkiri]; #$extracted .= " ".$row[sissejuh]; #$extracted = sprintf("%.62s",str_replace("\"", "",$extracted)); $arr_bone[kalender] .= "$eventc. $extracted
    "; } $arr_bone[kalender] .= "
    $spday $spday
    '; ####### TAGASTA kalender ######################### ################################################### return $arr_bone; } ################ print_calendar END # ## FUNCTION last_day ############################################ #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function last_day($month, $year) { ########################################## ############ TAGASTA kaks kalendrikuud ### return mktime(23, 59, 59, $month + 1, 0, $year); } ################ kalendriKUVA END # ## FUNCTION kalendriKUVA ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function kalendriKUVA($arr_bone){ include("v12.php"); $aeg = $_SESSION['aeg']; $_SESSION['algaadr'] = "$arr_bone[id]"; if ($aeg){ $ele = explode(".", $aeg); $kuu = $ele[0]; $aasta = $ele[1]; } else { $kuu = date(n); $aasta = date(Y); } if ($kuu == 1){ $prev = 12 .".". ($aasta - 1); $next = 2 .".".$aasta; } elseif ($kuu == 12){ $prev = 11 .".".$aasta; $next = 1 .".". ($aasta + 1); } else { $prev = $kuu-1 .".".$aasta; $next = $kuu+1 .".".$aasta; } if ($arr_bone[lang]){ $addlang = "&l=$arr_bone[lang]"; } $arr_bone[kalender] .= "
    "; $nooled_lr[prev] = " "; $nooled_lr[next] = " "; $arr_bone = print_calendar($kuu, $aasta, $arr_bone, $nooled_lr); $arr_bone[kalender] .= "
    "; ########################################## ############ TAGASTA kaks kalendrikuud ### return $arr_bone; } ################ kalendriKUVA END # ## FUNCTION salvestusNUPP ############################################# #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function salvestusNUPP($hind, $liistud, $uksed, $s, $lang) { include("v12.php"); ## võtab määratud sektsiooni alamleheküljed ja ## väljastab neist koostatud rippmenüüd $_SESSION['tellimuse_lang'] = $lang; if ($_SESSION['tellimuse_lang'] == en){ $l_kogus = "amount"; $l_lisa_ostukorvi = "Add to cart"; } elseif ($_SESSION['tellimuse_lang'] == ru){ $l_kogus = "количество"; $l_lisa_ostukorvi = "В корзину"; } else { $l_kogus = "kogus"; $l_lisa_ostukorvi = "Lisa ostukorvi"; } $nupp = "
    "; if (strlen($liistud) > 6){ $nupp .= "
    "; } if (strlen($uksed) > 6){ $nupp .= "
    "; } $nupp .= "
    $l_kogus:
    "; ########################################## ################## TAGASTA salvestusnupp ### return $nupp; } ################ salvestusNUPP END # ## FUNCTION ostuKORVInupp ############################################# #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function ostuKORVInupp($arr_bone) { include("v12.php"); ## võtab määratud sektsiooni alamleheküljed ja ## väljastab neist koostatud rippmenüüd $tellimuse_id = $_SESSION['tellimuse_id']; if ($_SESSION['tellimuse_lang'] == en || $arr_bone[lang] == en){ $l_kaupu = "Products"; $l_summa = "Total"; } elseif ($_SESSION['tellimuse_lang'] == ru || $arr_bone[lang] == ru){ $l_kaupu = "Товары"; $l_summa = "Сумма"; } else { $l_kaupu = "Kaupu"; $l_summa = "Summa"; } if ($tellimuse_id > 0){ $crow = mysql_fetch_array(mysql_query("SELECT kaupu, summa FROM $tellimus WHERE id = '$tellimuse_id'")); $kaupu = $crow[kaupu]; $summa = $crow[summa]; } if (!$kaupu){$kaupu = 0;} if (!$summa){$summa = 0;} if ($_SESSION['tellimuse_lang']){ $korvi_lang = $_SESSION['tellimuse_lang']; } else { $korvi_lang = $arr_bone['lang']; } $arr_bone[korv] = "
    $l_kaupu: ".$kaupu."
    $l_summa: ".number_format($summa, 2, '.', ' ')."

    "; ########################################## ################## TAGASTA ostuKORVInupp ### return $arr_bone; } ################ ostuKORVInupp END # ## FUNCTION logimisVORM ################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function logimisVORM($arr_bone) { include("v12.php"); ## kui ei ole sisse loginud, siis pakub logimisvormi ## kui on sisse loginud, siis näitab kasutajanime ja välja logimisvormi if ($arr_bone[lang] == en){ $l_welcome = "Welcome"; $l_edit_button = "Edit"; $l_logout_button = "Log out"; #Button $l_login_button = "Log in"; #Button $l_register_user = "Register as user"; $l_look_your_list = "Watch the list of orders"; } elseif ($arr_bone[lang] == ru){ $l_welcome = "Š”Š¾Š±Ń€Š¾ ŠæŠ¾Š¶Š°Š»Š¾Š²Š°Ń‚ŃŒ"; $l_edit_button = "Š ŠµŠ“Š°ŠŗтŠøрŠ¾Š²Š°Ń‚ŃŒ"; $l_logout_button = "Š’Ń‹Š¹Ń‚Šø"; #Button $l_login_button = "Š’Š¾Š¹Ń‚Šø"; #Button $l_register_user = "Š ŠµŠ³ŠøстрŠ°Ń†Šøя ŠæŠ¾Š»ŃŒŠ·Š¾Š²Š°Ń‚ŠµŠ»Ń"; $l_look_your_list = "Watch the list of orders"; } else { $l_welcome = "Tere tulemast"; $l_edit_button = "Toimeta"; $l_logout_button = "Logi välja"; #Button $l_login_button = "Logi sisse"; #Button $l_register_user = "Registreeru"; $l_look_your_list = "Vaata enda tellimuste nimekirja"; } if(strlen($arr_bone[lang]) > 1){ $lisal = "&l=$arr_bone[lang]"; } function c2html($text){ $converted = iconv("UTF-8", "cp1251", "$text"); return htmlentities($converted,ENT_COMPAT,"cp1251"); } $kasut_id = $_SESSION['kasut_id']; if($kasut_id){ $row = mysql_fetch_array(mysql_query("SELECT eesnimi, perenimi, lang FROM $kasutajad WHERE kasut_id = '$kasut_id'")); if(strlen($row[lang]) > 1){ $lisal = "&l=$row[lang]"; } if ($row[lang] == ru){ $row[eesnimi] = c2html($row[eesnimi]); $row[perenimi] = c2html($row[perenimi]); } else { $row[eesnimi] = htmlentities($row[eesnimi],ENT_COMPAT); $row[perenimi] = htmlentities($row[perenimi],ENT_COMPAT); $lisal = ""; } $kkrow = mysql_fetch_array(mysql_query("SELECT count(*) FROM $tellimus WHERE kasut_id = '$kasut_id'")); if ($kkrow[0] > 0){ $vaata_nimekirja = "
    $l_look_your_list
    "; } $arr_bone[login] = "
    $l_welcome $row[eesnimi] $row[perenimi]
    $vaata_nimekirja
    "; } else { $arr_bone[login] = "
    $l_register_user
    "; } ########################################## ################## TAGASTA logimisvorm ### return $arr_bone; } ################ logimisVORM # ## FUNCTION mail2safe ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function mail2safe($string){ $pattern = "#[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})#"; preg_match_all($pattern, $string, $split); $one=''; foreach ($split[0] as $value) { $email_to_find = '' . $value . ''; $oneall = safeEmail($value, '1'); $one = str_replace("[no-Smpam)","",$one); $one = str_replace("(no-Spmam]","",$oneall); ##################### esimene pool $esim = wordwrap($one, 50, " ", true); $earr = explode(" ", $esim); $jrk = 0; $jswr = ""; $jsaadr = ""; foreach ($earr as $k => $v){ $jrk++; $jsaadr .= " es$jrk = '$v'; "; if ($jrk > 1){$bplus = "";} else {$bplus = "+";} $jswr .= $bplus."es".$jrk."+"; } #################### teine pool $teineall = safeEmail($value, '0'); $teine = str_replace("[no-Smpam)","",$teineall); $teine = str_replace("(no-Spmam]","",$teine); $tei = wordwrap($teine, 50, " ", true); $tarr = explode(" ", $tei); $jrk = 0; $jswr2 = ""; $jsaadr2 = ""; $nojs2 = ""; foreach ($tarr as $k => $v){ $jrk++; $jsaadr2 .= " ts$jrk = '$v'; "; if ($jrk > 1){$bplus = "";} else {$bplus = "+";} $jswr2 .= $bplus."ts".$jrk."+"; } $subtit = ""; $string = str_replace($email_to_find, $subtit,$string); } ########################################## ################## TAGASTA mail2safe txt ### return $string; } ################ mail2safe END # function safeEmail($email, $case) { $mailto=''; if ($case == 1){$mailto = "mailto:";} $arr = str_split("$mailto$email"); $jrk=$return=''; foreach ($arr as $val){ $ra = rand(1,3); $jrk++; if (($jrk == 5 and $case == 0)){ $return .= "[no-Smpam)"; } elseif (($jrk == 10 and $case == 1)){ $return .= "(no-Spmam]"; } if ($ra == 1 || $val == "@"){ $return .= "&#x".bin2hex($val).";"; } elseif ($ra == 2){ $return .= "&#".ord($val).";"; } else { $return .= $val; } } return $return; } ################ safeEmail END # ## FUNCTION footer ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function footer($arr_s, $arr_bone){ include("v12.php"); ## funktsioon võtab pealkirja ja sissejuhatuse ## ja tagastab H1 ja H2 kirjed if (isset($arr_s['tiitel'])){ $arr_bone['sissejuh'] = "

    $arr_s[tiitel]

    "; } elseif (isset($arr_bone['title'])){ $arr_bone['sissejuh'] = "

    $arr_bone[title]

    "; } if ($arr_s['sissejuh'] || $arr_s['words']){ $arr_bone['sissejuh'] .= "

    $arr_s[words] $arr_s[sissejuh] $arr_s[tiitel]

    "; $arr_bone['sissejuh'] = str_replace(array("
    ", "
    ", "
    ", "\n", "\r", "\r\n"), ' ', $arr_bone['sissejuh']); } $arr_bone['sissejuh2'] = strip_tags($arr_bone['sissejuh']); $str_sisu = preg_replace("/(\)/si", "", $arr_bone['sisu']); $str_sisu = preg_replace("/(\)/si", "", $str_sisu); if (!isset($arr_bone['hx']['mN'])){$arr_bone['hx']['mN']='6000000';} $double = sprintf("%.{$arr_bone['hx']['mN']}s", strip_tags(str_replace(array("
    ", "
    ", "
    ", "\n", "\r", "\r\n"), ' ', $str_sisu))); $double .= sprintf("%.1800s", $double); $sissejuh = strip_tags(str_replace(array("
    ", "
    ", "
    ", "\n", "\r", "\r\n"), ' ', $arr_s['sissejuh'])); if ($arr_s['pop'] == 'heks'){ $hcount = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM $heksel WHERE lehek = '".$arr_bone['id']."'")); $data = mysql_query("SELECT id, pref, fraas, after, t2 FROM $heksel WHERE lehek = '".$arr_bone['id']."' order by CAST(id AS SIGNED)"); if ($hcount[0] < 6){ ## linke on vähem kui kuus (kuni viis) while($lr = mysql_fetch_array($data)) { if ($lr['id'] != $arr_bone['hx']['id']){ ## ei kuva enda linki $linkpower .= " $lr[pref] ".strtolower($lr[fraas])." $lr[after] "; ##$loc_index } ## end of ei kuva enda linki } ## end of while } else { ## linke on rohkem while($lr = mysql_fetch_array($data)) { $count++; if ($lr['id'] == $arr_bone['hx']['id']){$wis = $count;} $arr_link[$count] = " $lr[pref] ".strtolower($lr[fraas])." $lr[after] "; ##$loc_index } ## end of while if ($wis > 1 and $wis < ($hcount[0] - 3)){ ## wis on ohutus kauguses $linkpower .= $arr_link[($wis - 1)].$arr_link[($wis + 1)].$arr_link[($wis + 2)].$arr_link[($wis + 3)].$arr_link[($wis + 4)]; } elseif ($wis == 1){ ## wis on esimene $linkpower .= $arr_link[$hcount[0]].$arr_link[($wis + 1)].$arr_link[($wis + 2)].$arr_link[($wis + 3)].$arr_link[($wis + 4)]; } elseif ($wis == $hcount[0]){ ## wis on viimane $linkpower .= $arr_link[($hcount[0] - 1)] . $arr_link[1] . $arr_link[2] . $arr_link[3] . $arr_link[4]; } elseif ($wis == ($hcount[0] - 1)){ ## wis on eelviimane $linkpower .= $arr_link[($wis - 1)] . $arr_link[$hcount[0]] . $arr_link[1] . $arr_link[2] . $arr_link[3]; } elseif ($wis == ($hcount[0] - 2)){ ## wis on eel-eelviimane $linkpower .= $arr_link[($wis - 1)] . $arr_link[($hcount[0] - 1)] . $arr_link[$hcount[0]] . $arr_link[1] . $arr_link[2]; } elseif ($wis == ($hcount[0] - 3)){ ## wis on eel-eel-eelviimane $linkpower .= $arr_link[($wis - 1)] . $arr_link[($hcount[0] - 2)] . $arr_link[($hcount[0] - 1)] . $arr_link[$hcount[0]] . $arr_link[1]; } } ## end of linke on rohkem } else { ## pop ei ole "heks" if ($pow_show == 'jah'){ $paraw = $para.'old'; $result1 = mysql_query("SHOW TABLES LIKE '$paraw'"); if(mysql_num_rows($result1) > 0){ if ($arr_s[func] != 'g'){ $pid = mysql_fetch_array(mysql_query("SELECT para_id FROM $para WHERE lehek = '$arr_s[id]' order by CAST(jrk AS SIGNED) LIMIT 1")); } else { $pid = mysql_fetch_array(mysql_query("SELECT para_id FROM $para WHERE lehek = '$arr_s[id]' and jrk = '$arr_bone[j]' LIMIT 1")); } $pid2 = mysql_fetch_array(mysql_query("SELECT txt FROM $paraw WHERE para_id = '".($pid[0]+100)."' order by CAST(jrk AS SIGNED) LIMIT 1")); if (strlen($pid2[0]) < 3){ $pid2 = mysql_fetch_array(mysql_query("SELECT txt FROM $paraw WHERE para_id = '101' order by CAST(jrk AS SIGNED) LIMIT 1")); } $parr = explode('|', $pid2[txt]); $link2content = str_replace('|', ' ', $pid2[txt]); } ## end if tables exists $linkfirst = "$parr[0] "; $linksecond = ' '.$link2content.' sites for further website hosting companies reading are here. While you look for best web hosting website, you may want also to read this page on this site arawebsitedesign.com which offers good web site hosting articles and reviews for everyone who need pick top web hosting providers. Kuidas optimeerida kodulehte hästi otsingumootorite jaoks et kodulehekülg oleks optimeeritud ja otsingumootoritele leitav, vaata kuidas kodulehe tegemine aitab, siin veebilehtede tegemine sest kodulehe tegemine on mitmetest komponentidest ja kodulehtede loomine toetab ka kodulehtede loomine siis kui materjali on kodulehtede loomiseks palju '; $linkhead = ""; if ($m_dropdown == 'jah'){ $arr_bone[85000000] = str_replace('', "$linkhead",$arr_bone[85000000]); } } } if ((strlen($arr_bone['sissejuh']) > 80 || strlen($double) > 80) and ($sh_dm != 'd' || $sh_dm != 'dp')){ $arr_bone['sissejuh'] .= "
    $double $sissejuh $arr_s[tiitel]$linkfirst
    "; } if ($sh_dm != 'd'){ $arr_bone['ikoonirida'] .= "
    $linksecond
    "; } if ($sh_dm == 'd'){ $arr_bone['java'] .= ""; } ########################################## ################## TAGASTA footer ### return $arr_bone; } ################ footer END # ## FUNCTION HEKSELtoim ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function HEKSELtoim($arr_s, $admin, $arr_bone){ include("v12.php"); ## funktsioon võtab vastava lehe heksel kirjed ja ## ja tagastab iga kirje toimetamise read $l_salvesta = "Salvesta"; $tabeli_laius = $il_laius_s + 8; $tabeli_real_laius = $il_laius_s; if (in_array($admin, $ad_pass_ref)){ $hekseltoim = "
    "; $data = mysql_query("SELECT id, lehek, pref, fraas, omastav, osastav, title, lauses, after, mN, t2 FROM $heksel WHERE lehek = '$arr_s[id]' order by CAST(id AS SIGNED)"); while($row = mysql_fetch_array($data)) { $count++; $hekseltoim .= "
    Paar sõna enne: $count.
    Fraas nimetavas:omastav:osastav:
    mN:lehek_aadress_kujul_t2:
    Paar sõna pärast: [HX:nim:s] [HX:nim:v] [HX:os:s] [HX:os:v] [HX:om:s] [HX:om:v]
    "; } $count++; ###### uus rida $hekseltoim .= "
    Paar sõna enne: $count.
    Fraas nimetavas:omastav:osastav:
    mN:lehek_aadress_kujul_t2:
    Paar sõna pärast: [HX:nim:s] [HX:nim:v] [HX:os:s] [HX:os:v] [HX:om:s] [HX:om:v]
    "; $hekseltoim .= "

    "; $arr_bone[sisu] .="
    "; $arr_bone[sisu] .="$hekseltoim"; $arr_bone[sisu] .="
    "; } ########################################## ############### TAGASTA hekselTOIM vorm ### return $arr_bone; } ################ HEKSELtoim END # ## FUNCTION slaidiVAHETUS ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function slaidiVAHETUS($arr_bone){ include("v12.php"); ## funktsioon võtab kuupäeva ja tagastab ## rippmenüüd, milles on kuupäev juba sees $slide = $_REQUEST['slide']; if ($slide){ $arr_bone[slides] = ""; } else { ####### create img list if ($arr_bone[d] == d3){ $numbers = $slide_n3; ## loob numbritest vahemikus array } elseif ($arr_bone[d] == d2){ $numbers = $slide_n2; ## loob numbritest vahemikus array } else { #($arr_bone[d] == d1) $numbers = $slide_n1; ## loob numbritest vahemikus array } $rsl = rand(0, count($numbers) - 1); ## suvaline number array piires srand((float)microtime() * 1000000); shuffle($numbers); foreach ($numbers as $val) { $imgcount++; if ($imgcount > 1){ $js_img_list .= ", '$arr_bone[d]/graaf/$slide_loc/$val.jpg'"; } else { $js_img_list .= "'$arr_bone[d]/graaf/$slide_loc/$val.jpg'"; } } $arr_bone[java] .= ""; $arr_bone[slides] = "\"\""; } ########################################## ################## TAGASTA slaidivahetus ### return $arr_bone; } ################ slaidiVAHETUS END # ## FUNCTION UudisLINGID ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function UudisLINGID($arr_bone) { include("v12.php"); ### teeb külgveergu uudislingid $srow = mysql_fetch_array(mysql_query("SELECT lingitekst, t2, sisu_id FROM $sisu WHERE lang = '$arr_bone[lang]' and func = 's' LIMIT 1")); $data = mysql_query("SELECT sisu_id, lang, pealkiri, autor, date, sissejuh, comm, t2 FROM $sisu WHERE lang = '$arr_bone[lang]' and func IN ('u') and pop != 'del' and LENGTH(pealkiri) > 4 and esi != 2 ORDER BY CAST(date AS SIGNED) DESC LIMIT 2"); if ($adr3 == 'jah' and strlen($srow['t2']) > 2){ $llisa = $srow['t2']."_";} else { unset($llisa);} ## ADR3 $arr_bone['uudislingid'] = "
    "; while($urow = mysql_fetch_array($data)) { if ($urow['date']){ $kirjadate = date("Y m d H i s", $urow['date']); $ele = explode(" ", $kirjadate); $pr_mon = $ele[1]; #ltrim($ele[1], '0'); $pr_day = ltrim($ele[2], '0'); if ($urow['comm'] == 'kuva'){ if ($arr_bone['lang'] == 'et'){ $pr_mon = ltrim($ele[1], '0'); $pr_mon = $kuud[$pr_mon]; $kirjadate = "$pr_day. $pr_mon $ele[0]"; #kell $ele[3]:$ele[4] } else { $kirjadate = "$pr_day/$pr_mon/$ele[0]"; #kell $ele[3]:$ele[4] } } else { unset($kirjadate);} } if (strlen($urow['sissejuh']) > 85){ $punktuat = ".."; } else { $punktuat = ""; } if ($adr3 == 'jah' and strlen($urow['t2']) > 2){ $llisa = $urow['t2']."_";} else { unset($llisa);} ## ADR3 $arr_bone['uudislingid'] .= "
    $kirjadate
    "; } # end of fetch $arr_bone['uudislingid'] .= "
    "; foreach ($social_arr as $key => $val){ $arr_bone['sonja'] .= "\"$key "; } ########################################## ################## TAGASTA UudisLINGID ### return $arr_bone; } ################ UudisLINGID END # ## FUNCTION kontaktLINE ######################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function kontaktLINE($arr_bone, $admin, $posits, $vh, $jrk) { include("v12.php"); if ($sh_l == 'en'){ $l_salvesta = "Save"; } else { $l_salvesta = "Salvesta"; } if(isset($arr_kontaktirida[$posits][$arr_bone['lang'].$arr_bone['sect']])){ $pr_out = $arr_kontaktirida[$posits][$arr_bone['lang'].$arr_bone['sect']]; $pr_out = str_replace("\\\"",""",$pr_out); $arr_bone["kontakt$posits"] = mail2safe($pr_out); } else {$pr_out=''; } if ($vh == 'vertikaal'){ $arr_bone["kontakt$posits"] = mail2safe($pr_out);; } $arr_bone["kontakt$posits"] .= ""; if (in_array($admin, $ad_pass_ref) || in_array($admin, $abt_pass_ref)){ if ($vh == 'horisontaal'){ if (in_array($posits, array('wendy', 'zara'))){ if ($sh_l == 'et'){ $edit_click = "Toim jalust"; } else { $edit_click = "Edit footer"; } } #$pr_out = str_replace("\\\"",""",$pr_out); $arr_bone["kontakt$posits"] = $arr_bone["kontakt$posits"]."
    "; if($bot_textarea == 'jah'){ if ($posits == 'wendy'){ $arr_bone["kontakt$posits"] .="
    "; } else { $arr_bone["kontakt$posits"] .="
    "; } } else { $pr_out = str_replace("\"",""",$pr_out); $arr_bone["kontakt$posits"] .= " "; } ## end textarea varia $arr_bone["kontakt$posits"] .="
    "; } elseif ($vh == 'vertikaal'){ if ($sh_l == 'et'){ $edit_click = "Toim teksti"; } else { $edit_click = "Edit text"; } $pr_out = str_replace("
    ","\n",$pr_out); $pr_out = str_replace("
    ","\n",$pr_out); $pr_out = str_replace("
    ","\n",$pr_out); $arr_bone["kontakt$posits"] .="

    "; } } ########################################## ################## TAGASTA kontaktirida ### return $arr_bone; } ################ kontaktLINE END # ## FUNCTION crossLINKS ######################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function crossLINKS($arr_bone, $admin, $howmany){ include("v12.php"); if ($sh_l == 'et'){ $l_linktxt = "Lingitekst"; $l_address = "Aadress"; $l_save = "Salvesta"; #Button } else { $l_linktxt = "Link text"; $l_address = "Address"; $l_save = "Save"; #Button } $ct= 0; $formattd = 'style="padding-right: 10px; width: 120px;font: normal 10px verdana; color:#bbb"'; $reannimi = 'cross'.$arr_bone['sect'].$arr_bone['lang']; if (array_key_exists($reannimi,$arr_lingirida)){ foreach ($arr_lingirida[$reannimi] as $line_num => $line) { $arr_bone["crosslinks"] .= "$line_num      "; $ct++; $toimsisu .= "$l_linktxt


    $l_address"; } ## end foreach } $short = $howmany - $ct; for ($i = 0; $i < $short; $i++){ $toimsisu = "$l_linktxt


    $l_address$toimsisu"; } if (in_array($admin, $ad_pass_ref) || in_array($admin, $abt_pass_ref)){ $arr_bone["crosslinks"] .= "
    $toimsisu
    *Kirjuta linginimetused lühidalt ja konkreetselt. Linkide ümbernihutamiseks saab väljade sisu lihtsalt copy&paste abil ümber tõsta.
    **Aadress võib olla täispikk \"http://www.domeen.com/Kontakt_17.htm\", kodulehe siseselt ka lühiaadress \"Kontakt_17.htm\"
    ***Kustutamiseks kustuta konkreetse veeru väljad tühjaks.
    "; } ## end of if admin $arr_bone["crosslinks"] .= ""; ########################################## ################## TAGASTA deep cross links ### return $arr_bone; } ################ crossLINKS END # ## FUNCTION lingiRIBA ######################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function lingiRIBA($arr_bone, $admin, $nimi) { include("v12.php"); $unic = rand(1,10000000); if ($sh_l == 'et'){ $edit_link = "Toim linke"; } else { $edit_link = "Edit links"; } if ($nimi == "vasak"){ $arr_bone["lingid$nimi"] = "
    "; } $reannimi = $nimi.$arr_bone['sect']; foreach ($arr_lingirida[$reannimi] as $line_num => $line) { if (strlen($line_num) > 1 and strlen($line) > 1){ if (strpos($line_num, ".jpg") || strpos($line_num, ".gif") || strpos($line_num, ".png") || strpos($line_num, ".JPG") || strpos($line_num, ".GIF") || strpos($line_num, ".PNG")){ $show = ""; } else { $show = $line_num; } $arr_bone["lingid$nimi"] .= "
    $show
    "; } $toimsisu .= ""; } if ($nimi == "vasak"){ $arr_bone["lingid$nimi"] .= "
    "; } if (in_array($admin, $ad_pass_ref) || in_array($admin, $abt_pass_ref)){ if ($nimi == "parem"){ $posnihe = "position: relative; left: -440px; margin-right: -440px;"; } else { $posnihe = "position: relative; left: 8px; margin-right: -440px; "; } $arr_bone["lingid$nimi"] .= "
    $toimsisu
    Nähtav lingisisu: Laadi fail:Lingi http://aadress
    *Nähtavaks lingisisuks kirjuta kas lingi tekst või laadi bannerifail. Faili vahetamiseks laadi lihtsalt samale reale uus fail.

    **Kustutamiseks kustuta konkreetse rea väljad tühjaks. Linkide ümbernihutamiseks võib väljade sisu lihtsalt copy&paste abil ümber tõsta. Viimane kehtib ka juba üles laaditud bannerifailide kohta.
    "; } ## end of if admin ########################################## ################## TAGASTA lingid ### return $arr_bone; } ################ lingiRIBA END # ## FUNCTION gallupSHOW ######################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function gallupSHOW($arr_bone, $admin, $pos) { include("v12.php"); $grow = mysql_fetch_array(mysql_query("SELECT id, pealkiri, q1, aw1, q2, aw2, q3, aw3, q4, aw4, q5, aw5, q6, aw6, intervall FROM $gallup WHERE master = '1' and lang = '$arr_bone[lang]' order by CAST(id AS SIGNED) DESC limit 1")); $tlimit = $ajastamp - $grow[intervall]; $repet = mysql_fetch_array(mysql_query("SELECT count(id) FROM $gallup WHERE master != '1' and ip = '".$_SERVER['REMOTE_ADDR']."' and browser = '".$_SERVER['HTTP_USER_AGENT']."' and top = '$grow[id]' and adate > '$tlimit'")); if (in_array($admin, $ad_pass_ref) || $repet[0] == 0){ $voter = 'jah'; } $kuusk = array($grow[q1], $grow[q2], $grow[q3], $grow[q4], $grow[q5], $grow[q6]); $aansw = array($grow[aw1], $grow[aw2], $grow[aw3], $grow[aw4], $grow[aw5], $grow[aw6]); $gcol = array('#7bdd5e', '#7bdd5e', '#7bdd5e', '#7bdd5e', '#7bdd5e', '#7bdd5e', '#307a1c'); #### viimane on äärjoone kood $asum = array_sum($aansw); $higher = 0; foreach ($kuusk as $key => $val){ if (strlen($val) > 0){ $higher++; $ral[$key] = $key; } } $usful_w = $gallup_laius - 40; if ($grow[id] > 0){ $gline .= ""; foreach ($ral as $val){ if ($asum != 0){ $coeff = $usful_w/max($aansw); $usew = $gallup_laius + ( - $gallup_laius*max($aansw)/$asum); $perc = round($aansw[$val]/$asum*100, 1); $point = round($aansw[$val]*$coeff); } else { $point = 5; $perc = "0"; } if ($voter == 'jah'){ $inpnr = $val + 1; $inpr = "
    "; } $gline .= "
    $inpr$kuusk[$val]
    $perc%
    "; } if ($voter == 'jah'){ $gline .= "
    "; } } if ($pos == vasak){ $marg_left = "; margin-left: 20px"; } $arr_bone['gallup'.$pos] .= "
    $grow[pealkiri]
    $gline
    $buttn
    "; ####################### ADMIN if (in_array($admin, $ad_pass_ref) || in_array($admin, $abt_pass_ref)){ $unic = rand(0,10000000); if ($pos == "parem"){ $posnihe = "position: relative; left: -100px; margin-right: -100px;"; } else { $posnihe = "position: relative; left: 8px; margin-right: -100px; "; } $arr_bone['gallup'.$pos] .= "
    Toimeta küsimust
    Toimeta gallupivastuseid
    *Gallupil võib olla 2-6 küsimust. Kui küsimuse väli on tühjaks jäetud, siis seda lihtsalt ei kuvata.
    Kirjuta uus gallup
    Kirjuta gallupivastused
    *Gallupil võib olla 2-6 küsimust. Kui küsimuse väli on tühjaks jäetud, siis seda lihtsalt ei kuvata.
    **Uue gallupi loomine sulgeb varasema ja nähtavale ilmub uus gallup.
    "; } ## end of if admin ########################################## ################## TAGASTA gallup ### return $arr_bone; } ################ gallupSHOW END # ## FUNCTION lingiRIBA ######################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function lingiRIBA2($arr_bone) { include("v12.php"); $arr_bone[lingid] = "
    Partnerid
    "; foreach ($arr_lingirida as $line_num => $line) { $arr_bone[lingid] .= "
    $line_num
    "; } ########################################## ################## TAGASTA lingid ### return $arr_bone; } ################ lingiRIBA END # ## FUNCTION keeleMENU ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function keeleMENU($arr_bone, $admin) { include("v12.php"); ### teeb horisontaalse keelemenüü, logolt indeksile viitava lingi ja iso #$keelem_arr = array_reverse($keelem_arr); #$arr_bone[keelemenu] .= " "; $arr_bone['keelemenu'] = ''; foreach ($keelem_arr as $key => $value){ $srow = mysql_fetch_array(mysql_query("SELECT t2 FROM $sisu WHERE sisu_id = '".$basel["$value"]['esil']."'")); if ($adr3 == 'jah' and strlen($srow['t2']) > 2){ $llisa = $srow['t2']."_";} ## ADR3 $lang_im = "\"$arr_bone[title]\""; # add /icons_flag/24/ for larger if ($arr_bone['lang'] == $value){ $arr_bone['keelemenu'] .= " $lang_im "; } else { $arr_bone['keelemenu'] .= " $lang_im "; } unset($llisa); } #$arr_bone['keelemenu'] .= ""; $arr_bone['keelemenu'] .= ""; ######## iga keele indeks, mis on defineeritud v12.php failis $srow = mysql_fetch_array(mysql_query("SELECT t2 FROM $sisu WHERE sisu_id = '".$basel["$arr_bone[lang]"]['esil']."'")); unset($llisa); if ($adr3 == 'jah' and strlen($srow['t2']) > 2){ $llisa = $srow['t2']."_";} ## ADR3 $arr_bone['index'] = "$loc_index$adr1$llisa".$basel["$arr_bone[lang]"]['esil']."$adr2";; $arr_bone['iso'] = $basel["$arr_bone[lang]"]['charset']; ######## iga keele indeks, mis on defineeritud v12.php failis #$arr_bone[index] = "$loc_index?s=".$arr_bone[lang]"]['esil']; #$arr_bone[iso] = $basel["$arr_bone[lang]"]['charset']; ########################################## ################## TAGASTA keelemenüü ### return $arr_bone; } ################ keeleMENU END # ## FUNCTION SPELL_HTMLfunc ###################################### #########################################_____#####_____################### #########################################_____#####_____################ #########################################_____#####_____############ function SPELL_HTMLfunc($arr_bone, $arr_s) { include("v12.php"); ## võtab arr_bone ja alusraami ning ## täidab ankrud sisuga if (!isset($arr_bone['pais'])){$arr_bone['pais']='';} if (!isset($arr_bone['title'])){$arr_bone['title']='';} if (!isset($arr_bone['sissejuh'])){$arr_bone['sissejuh']='';} if (!isset($arr_bone['ruudud'])){$arr_bone['ruudud']='';} if (!isset($arr_bone['ikoonirida'])){$arr_bone['ikoonirida']='';} if (!isset($arr_bone['arcomment'])){$arr_bone['arcomment']='';} $v_laius_s = $il_laius_s + 8; if (isset($_REQUEST['action']) && $_REQUEST['action'] == "print"){ $arr_bone['sisu'] = str_replace("class=sv","style='padding-left: 5px'",$arr_bone['sisu']); } else { if(strlen($arr_bone['sissejuh2']) > 4){ $arr_bone['sisu'] .="
    $arr_bone[sissejuh2]
    "; } } #$arr_bone[sisu] = str_replace(array("\n","\r","\r\n"),"",$arr_bone[sisu]); if (!isset($arr_bone['update'])){$arr_bone['update']='';} $arr_bone['sisu'] = str_replace(array(" />"),">",$arr_bone['sisu']); $arr_bone['java'] = str_replace(array("\n","\r","\r\n"),"",$arr_bone['java']); $arr_bone['description'] = str_replace(array("\""), '"', $arr_bone['description']); $arr_bone['description'] = strip_tags(str_replace(array('"',"'"),"",$arr_bone['description'])); #if (in_array($arr_bone[id], array(1,12))){ #$arr_bone[plinglogod] ="

    "; #} else { #$arr_bone[plinglogod] =""; #} if ($arr_s[id] == '15' || $arr_s[top] == '15' || in_array($arr_s[top], array('69', '70', '71', '72', '73', '74'))){ $arr_bone[bettybg] .=" style=\"background: #f7f4eb url('d1/graaf/betty_2.png') no-repeat\""; } elseif ($arr_s[id] == 16 || $arr_s[top] == 16 || in_array($arr_s[top], array(75, 76))){ $arr_bone[bettybg] .=" style=\"background: #f7f4eb url('d1/graaf/betty_3.png') no-repeat\""; } $arr_bone[bettybg] .=""; if ($il_eksperime == "jah" and $arr_s[func] == "g"){ $template_file = $arr_bone['d']."/album.htm"; } elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == "print"){ $template_file = $arr_bone['d']."/print.htm"; } else { $template_file = $arr_bone['d']."/alusraam.php"; if (file_exists($arr_bone['d']."/alusraam.php")){ $template_file = $arr_bone['d']."/alusraam.php"; } else { $template_file = $loc_da."/alusraam.php"; $arr_bone[d] = $loc_da; } } $html_template = implode("\n", file($template_file)); $html_template = str_replace(array("\n", "\r", "\r\n"), '', $html_template); $html_template = preg_replace('//', "", $html_template); $html_template = preg_replace('/\/\*(.*?)\*\//', "", $html_template); $html_template = preg_replace('/\<\?php(.*?)\?\>/', "", $html_template); $jstophead = implode("\n", file("js/js/jscompressed.php")); $jstophead = str_replace(array("\n", "\r", "\r\n"), '', $jstophead); $jstophead = preg_replace('//', "", $jstophead); $jstophead = preg_replace('/\/\*(.*?)\*\//', "", $jstophead); $arr_bone['javainline'] = $jstophead; $arr_bone['java'] = str_replace(array("\n", "\r", "\r\n"), '', $arr_bone['java']); $arr_bone['java'] = preg_replace('//', "", $arr_bone['java']); $arr_bone['java'] = preg_replace('/\/\*(.*?)\*\//', "", $arr_bone['java']); if (!isset($_REQUEST['action'])){$_REQUEST['action']='';} if ($_REQUEST['action'] != "template"){ $ankrud = array(); $sisud = array(); foreach($arr_bone as $key => $value) { $ankrud[] = "[VAR:". $key ."]"; $sisud[] = "$value"; } } $html_template = str_replace($ankrud,$sisud,$html_template); if ($lcl_addr == 'jah'){ foreach($redir_list as $key => $val){ $html_template = str_replace($val.'"',$key.'"',$html_template); } } if (isset($arr_bone['index5'])){ $html_template = file_get_contents($arr_bone['index5']); } ######### CACHE operations if (isset($arr_bone['cache']) && strlen($arr_bone['cache']) > 4 and !mysql_error()){ $warningCountResult = mysql_query("SELECT @@warning_count"); if ($warningCountResult) { $warningCount = mysql_fetch_row($warningCountResult ); } if ($warningCount[0] == 0){ #### FOLDER list $c_dirloc = $loc_sisu.'/c/'; $fhand = opendir($c_dirloc); while ($file = readdir($fhand)){ $afiles[] = $file; } closedir($fhand); foreach ($afiles as $sfile) { if (strpos($sfile, $arr_bone[cachematch]) > 0){ #echo ''.$sfile."
    "; unlink($c_dirloc.$sfile); } else { #echo $sfile."
    "; } } # foreach afile ##### FOLDER end $oFName = $arr_bone[cache]; $oFHandle = fopen($oFName, 'w'); fwrite($oFHandle, $html_template); fclose($oFHandle); #echo $oFName; } ## no sql warnings } ## save cache ######## END of CACHE ########################################## ################## TAGASTA kogu HTML sisu ### return $html_template; } ################ PRITSI_HTMLfunc END # ?>