",$f_name[$j],""; if ($f_subc[$j]) echo "- ".$f_subc[$j]." NEW"; echo "   (".$bookcat_name[prevod($parid)].")"; if ($f_owner[$j]!=$user_id) {echo " :: unbook";} } } if ($j>0){echo "
";} } function listbookforum1($parid){ global $user_id; global $bookcat_name; global $bookcat_open; global $bookcat_parent; global $bookcat_id; global $f_id; global $f_name; global $f_login; global $f_sub; global $f_subc; global $f_parent; global $f_owner; for($j=0;$j  ",$f_name[$j],""; if ($f_subc[$j]) echo "- ".$f_subc[$j]." NEW"; echo "   (".$bookcat_name[prevod($parid)].")"; if ($f_owner[$j]!=$user_id) {echo " :: unbook";} } } } //old for edit function listbookcat($catid){ global $bookcat_name; global $bookcat_open; global $bookcat_parent; global $bookcat_id; for($i=0;$i<=count($bookcat_id);$i++){ if ($bookcat_parent[$i]==$catid){ echo "\n- ".$bookcat_name[$i].""; if (isSet($lasti)){ echo "  ^UP^"; } echo "
"; $lasti=$i; } } } //new for edit function listbookcat3($catid,$edc){ global $bookcat_name; global $bookcat_open; global $bookcat_parent; global $bookcat_id; global $bookcat_subc; for($i=0;$i<=count($bookcat_id);$i++){ if (($bookcat_parent[$i]==$catid)){ echo "
 "; if ($edc==$bookcat_id[$i]){ echo "\n- ".$bookcat_name[$i].""; }else{ echo "\n- ".$bookcat_name[$i].""; } if (isSet($lasti)){ echo "  ^UP^"; } echo "  ::  delete"; // echo "
"; if(($edc!='0')&&($bookcat_id[$i]==$edc)){ echo "  ::  "; echo ""; } listbookcat3($bookcat_id[$i],$edc); echo "
"; $lasti=$i; } } } function listbookforum2($parid){ global $user_id; global $f_id; global $f_name; global $f_login; global $f_sub; global $f_subc; global $f_parent; global $f_owner; for($j=0;$j  ",$f_name[$j]," (".$f_sub[$j]." subz "; if ($f_subc[$j]) echo "- ".$f_subc[$j]." NEW"; echo ")"; if ($f_owner[$j]!=$user_id) {echo " :: unbook";} // echo " :: unbook"; } } } function listbookcat2($catid){ global $bookcat_name; global $bookcat_open; global $bookcat_parent; global $bookcat_id; global $bookcat_subc; for($i=0;$i<=count($bookcat_id);$i++){ if (($bookcat_parent[$i]==$catid)){ echo "
"; if ($bookcat_open[$i]=="no") {echo "\n- ".$bookcat_name[$i]."@";} if ($bookcat_open[$i]=="yes") {echo "\n- ".$bookcat_name[$i]."^";} if (($bookcat_subc[$i]>'0') and ($bookcat_open[$i]=="no")){echo "(".$bookcat_subc[$i]." NEW)";} echo ""; if (($bookcat_open[$i]=="yes")){ listbookforum2($bookcat_id[$i]); listbookcat2($bookcat_id[$i]); } echo "
"; } } } function bookfmove($del_id){ global $user_id; global $f_id; global $f_parent; global $qf; global $if; for($j=0;$jquery($qc); if ($if>'0') {$kyberia->query($qf);} } function prevod($id){ global $bookcat_id; if ($id=='0'){$id='-1';} for($i=0;$iquery($q); $label='0'; while ($bset->next()){ $bookcat_name[$label]=$bset->getString('bookcat_name'); $bookcat_open[$label]=$bset->getString('is_open'); $bookcat_parent[$label]=$bset->getString('parent_id'); $bookcat_id[$label]=$bset->getString('bookcat_id'); $label++; } $q="SELECT user_forum.submission_count,user_forum.parent_id as fparent_id,user.login,forum.* from forum left join user on forum.forum_owner=user.id left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$user_id')"; $q.=" WHERE forum.forum_owner='$user_id'"; $q.=" order by forum_name "; $forumset=$kyberia->query($q); $i=0; while ($forumset->next()){ $f_id[$i]=$forumset->getString('forum_id'); $f_name[$i]=$forumset->getString('forum_name'); $f_login[$i]=$forumset->getString('login'); $f_sub[$i]=$forumset->getString('forum_submissions'); $f_subc[$i]=$forumset->getString('submission_count'); $f_parent[$i]=$forumset->getString('fparent_id'); $f_owner[$i]=$forumset->getString('forum_owner'); $i++; } $q="SELECT user_forum.submission_count,user_forum.parent_id as fparent_id,user.login,forum.*"; $q.=" from forum left join user on forum.forum_owner=user.id"; $q.=" left join user_forum on (forum.forum_id=user_forum.forum_id and user_forum.user_id='$user_id')"; $q.=" WHERE user_forum.user_bookmark='yes' and forum.forum_owner != '$user_id'"; $q.=" order by forum_name "; $forumset=$kyberia->query($q); while ($forumset->next()){ $f_id[$i]=$forumset->getString('forum_id'); $f_name[$i]=$forumset->getString('forum_name'); $f_login[$i]=$forumset->getString('login'); $f_sub[$i]=$forumset->getString('forum_submissions'); $f_subc[$i]=$forumset->getString('submission_count'); $f_parent[$i]=$forumset->getString('fparent_id'); $f_owner[$i]=$forumset->getString('forum_owner'); $i++; } $bookcat_subc['-1']=countnew('0'); } function countnew($catid){ global $bookcat_parent; global $bookcat_id; global $bookcat_subc; global $bookcat_name; for($i=0;$i<=count($bookcat_id);$i++){ if (($bookcat_parent[$i]==$catid)){ $bookcat_subc[prevod($catid)] += countnew($bookcat_id[$i]); } } countnewforum($catid); return $bookcat_subc[prevod($catid)]; } function countnewforum($catid){ global $user_id; global $f_id; global $f_subc; global $f_parent; global $bookcat_subc; global $bookcat_name; for($j=0;$j