";
//lewa
echo "";
$orderby = ($sortby == "all" ? "" : " AND tt.term_title1 LIKE '".stripinput($sortby)."%'");
if ($show_syn == 0) {
$and = " AND tt.term_status = \"0\"";
}
elseif ($show_syn == 2) {
$and = " AND (tt.term_status = \"2\" OR tt.term_cat = \"1\")";
} else {
$and = " AND tt.term_status != \"2\"";
}
if ($cat_id > 0) {
$where = " tt WHERE tt.term_cat='".$cat_id."'";
} else {
$where = " tt LEFT JOIN ".DB_TERM_CATS." tc ON tc.term_cat_id=tt.term_cat WHERE ".groupaccess('term_cat_access')."";
}
if ($cat_id > 0) {
$where3 = " WHERE term_cat_id='".$cat_id."'";
} else {
$where3 = " WHERE ".groupaccess('term_cat_access')."";
}
$order = " term_title1 ASC";
$rows = dbrows(dbquery("SELECT tt.*,term_cat FROM ".DB_TERMS.$where.$and.$orderby));
if (!isset($rowstart) || !isnum($rowstart)) {
$rowstart = 0;
} else {
$rowstart = $rowstart;
}
$catname = "";
if ($show_syn == 0) {
$and2 = " AND term_status = \"0\"";
}
elseif ($show_syn == 2) {
$and2 = " AND (term_status = \"2\" OR term_cat = \"1\")";
} else {
$and2 = " AND term_status != \"2\"";
}
if ($cat_id > 0) {
$where2 = " AND term_cat ='1'";
} else {
$where2 = "";
}
$result1 = dbquery("SELECT tu.*, tn.*, term_cat_id, term_cat_name FROM ".DB_TERM_CATS." tn LEFT JOIN ".DB_TERMS." tu ON tn.term_cat_id=tu.term_cat WHERE ".groupaccess('term_cat_access')." AND term_id!=''".$where2.$and2." ORDER BY term_cat_name ASC,".$order." LIMIT $rowstart, $items_per_page");
if (dbrows($result1) != 0) {
if (dbrows($result1) > 0) {
$rows1 = dbrows($result1);
if ($display == 0) {
$orderby = ($sortby == "all" ? "" : " AND term_title1 LIKE '".stripinput($sortby)."%'");
if ($show_syn == 0) {
$and2 = " AND term_status = \"0\"";
}
elseif ($show_syn == 2) {
$and2 = " AND (term_status = \"2\" OR term_cat = \"1\")";
} else {
$and2 = " AND term_status != \"2\"";
}
if ($cat_id > 0) {
$where2 = " AND term_cat ='".$cat_id."'";
} else {
$where2 = "";
}
$result2 = dbquery("SELECT tu.*, tn.*, term_cat_id, term_cat_name FROM ".DB_TERM_CATS." tn LEFT JOIN ".DB_TERMS." tu ON tn.term_cat_id=tu.term_cat WHERE ".groupaccess('term_cat_access')." AND term_id!=''".$and2.$orderby.$where2." ORDER BY tu.term_title1 ASC,".$order." LIMIT $rowstart,$items_per_page");
// poczotek pl/sl
echo "";
echo "Polsko-śląski";
if (dbrows($result2) < 1) {
echo "".$locale['term472'].$sortby." |
| ";
}
$initial = $initial2 = "";
while ($data3 = dbarray($result2)) {
$initial = substr(($data3['term_title1']),0,1);
$initial = strtoupper($initial);
$description1 = stripslashes($data3['term_descript1']);
$description1 = nl2br(parseubb($description1));
if ($initial2 != $initial) {
$initial2 = $initial;
echo " ".$initial2." | | \n";
}
echo " ".$data3['term_title1']." | ".$description1." | ";
}
}
echo "";
echo " ";
}}
echo " | ";
//---
//prawa
echo "";
$orderby = ($sortby == "all" ? "" : " AND tt.term_title2 LIKE '".stripinput($sortby)."%'");
if ($show_syn == 0) {
$and = " AND tt.term_status = \"0\"";
}
elseif ($show_syn == 2) {
$and = " AND (tt.term_status = \"2\" OR tt.term_cat = \"1\")";
} else {
$and = " AND tt.term_status != \"2\"";
}
if ($cat_id > 0) {
$where = " tt WHERE tt.term_cat='".$cat_id."'";
} else {
$where = " tt LEFT JOIN ".DB_TERM_CATS." tc ON tc.term_cat_id=tt.term_cat WHERE ".groupaccess('term_cat_access')."";
}
if ($cat_id > 0) {
$where3 = " WHERE term_cat_id='".$cat_id."'";
} else {
$where3 = " WHERE ".groupaccess('term_cat_access')."";
}
$order = " term_title1 ASC";
$rows = dbrows(dbquery("SELECT tt.*,term_cat FROM ".DB_TERMS.$where.$and.$orderby));
if (!isset($rowstart) || !isnum($rowstart)) {
$rowstart = 0;
} else {
$rowstart = $rowstart;
}
$catname = "";
if ($show_syn == 0) {
$and2 = " AND term_status = \"0\"";
}
elseif ($show_syn == 2) {
$and2 = " AND (term_status = \"2\" OR term_cat = \"1\")";
} else {
$and2 = " AND term_status != \"2\"";
}
if ($cat_id > 0) {
$where2 = " AND term_cat ='1'";
} else {
$where2 = "";
}
$result1 = dbquery("SELECT tu.*, tn.*, term_cat_id, term_cat_name FROM ".DB_TERM_CATS." tn LEFT JOIN ".DB_TERMS." tu ON tn.term_cat_id=tu.term_cat WHERE ".groupaccess('term_cat_access')." AND term_id!=''".$where2.$and2." ORDER BY term_cat_name ASC,".$order." LIMIT $rowstart, $items_per_page");
if (dbrows($result1) != 0) {
if (dbrows($result1) > 0) {
$rows1 = dbrows($result1);
if ($display == 0) {
$orderby = ($sortby == "all" ? "" : " AND term_title2 LIKE '".stripinput($sortby)."%'");
if ($show_syn == 0) {
$and2 = " AND term_status = \"0\"";
}
elseif ($show_syn == 2) {
$and2 = " AND (term_status = \"2\" OR term_cat = \"1\")";
} else {
$and2 = " AND term_status != \"2\"";
}
if ($cat_id > 0) {
$where2 = " AND term_cat ='".$cat_id."'";
} else {
$where2 = "";
}
$result2 = dbquery("SELECT tu.*, tn.*, term_cat_id, term_cat_name FROM ".DB_TERM_CATS." tn LEFT JOIN ".DB_TERMS." tu ON tn.term_cat_id=tu.term_cat WHERE ".groupaccess('term_cat_access')." AND term_id!=''".$and2.$orderby.$where2." ORDER BY tu.term_title2 ASC,".$order." LIMIT $rowstart,$items_per_page");
// poczotek sl/pl
echo "";
echo "Śląsko-polski";
if (dbrows($result2) < 1) {
echo "".$locale['term472'].$sortby." |
| ";
}
$initial = $initial2 = "";
while ($data3 = dbarray($result2)) {
$initial = substr(($data3['term_title2']),0,1);
$initial = strtoupper($initial);
$description2 = stripslashes($data3['term_descript2']);
$description2 = nl2br(parseubb($description2));
if ($initial2 != $initial) {
$initial2 = $initial;
echo " ".$initial2." | | \n";
}
echo " ".$data3['term_title2']." | ".$description2." | ";
}
}
echo "";
echo " ";
}}
echo " | ";
echo "
";
if ($rows > $items_per_page) {
echo "".makePageNav($rowstart,$items_per_page,$rows,3,FUSION_SELF."?items_per_page=".$items_per_page."&cat_id=".$cat_id."&show_syn=".$show_syn."&sortby=".$sortby."&")."
\n";
}
echo "