// write table start for forum topics table function t_table_open() { if (topics[0] <= 0) return; document.write("\r\n\
\r\n\ \r\n"); } // write table end for forum topics table function t_table_close() { if (topics[0] <= 0) return; document.write("
"); } // write header for forum topics table function t_header() { if (topics[0] <= 0) return; document.write(""+forum_table_forum+"\r\n\  \r\n\ "+forum_table_topic+"\r\n\ "+forum_table_author+"\r\n\ "+forum_table_replies+"\r\n\ أضافه للمكتبة\r\n\  "); } // write footer for forum topics table function t_footer() { } // write topic entry into forum topics table function t(forum,flags,id,title,aid,author,adate,replies,reads,lid,lastposter,ldate) { var cl = "normal"; var Tnew = flags.indexOf("n"); var Thot = flags.indexOf("h"); var Tlocked = flags.indexOf("l"); var Tarch = flags.indexOf("a"); var Tmoderate = flags.indexOf("m"); var Tdeleted = flags.indexOf("d"); var Tsurvey = flags.indexOf("v"); var Thidden = flags.indexOf("i"); var infoline1 = "" var infoline2 = "" if (author == "") author = findMemberName(aid); if (lastposter == "") lastposter = findMemberName(lid); if (lastposter == "") ldate = ""; if (aid == 0) { aid = memberID; author = memberName; topicowner = true; } if (lid == 0) { lid = memberID; if (replies > 0) lastposter = memberName; } var topicowner = (aid == memberID); if (replies == 0) {lastposter = ""; ldate = "";} if (Thidden >= 0) cl = "deleted"; if (Tdeleted >= 0) cl = "lastposter"; var enctitle = escape(title); document.write("" + getForumTitle(forum) + "" + "\r\n"); var icon = ""; if (Tnew >= 0) { icon = "_new"; infoline2 = topic_tooltips_new; } if (Thot >= 0) { icon += "_hot"; infoline1 = topic_tooltips_hot; } if (Tlocked >= 0) { icon += "_locked"; infoline1 = topic_tooltips_locked; } if (Tarch >= 0) { icon += "_archived"; infoline1 = topic_tooltips_archived; } if (infoline1.length == 0) infoline1 = infoline2; else if (infoline2.length) infoline1 += "\r\n" + infoline2; document.write("\r\n\ "); if (Tsurvey >=0 ) document.write(""); document.write("
" + title + " "); if (replies > topicpagesize) topicPaging(id,replies); document.write("
\r\n\ " + formatDate(adate) + "
" + author + "\r\n\ " + replies + "\r\n\ \r\n\ "+findAddExclusive(id)+"\r\n\ \r\n"); document.write("\r\n"); if (topicowner && memberLevel > 0) document.write("\r\n"); if ((memberLevel > 0) && (moderate || (Tlocked < 0))) document.write("\r\n"); if (memberLevel >= 2 && forumModerated(forum)) { document.write("  "); } document.write(""); document.write("\r\n"); } // write topic paging selector.. called from t() only function topicPaging(tid,replies) { var total = replies/topicpagesize; if ((total % 1) > 0) total = (total - (total % 1)) + 1; if (total > 1) { document.write(""); for (x = 1; x <= total; x++) { if (x && ((x % 15) == 0)) document.write(""); document.write(""); } document.write("
 " + x + "
") } } // code to switch to another page.. called by internal code only function ChangePage() { document.PageNum.submit(); } function t_options_bar() { document.write(""); document.write(""); document.write("
مكتبة الحصريات") if (exclusive_forum>0) document.write(" : "+getForumTitle(exclusive_forum)+""); document.write( " 
"); document.write("عرض المواضيع الحصرية من:
"); document.write("
"+page_selector_title+"
"); document.write("
"+switchforum_selector_title+"
"); forumsSelector2(); document.write("
"); } function t_show_topics() { var x = 0; if (topics[0] <= 0) { document.write("


"); document.write("لا توجد أية مواضيع حصرية تمت إضافتها لمكتبة الحصريات

"); if (exclusive_forum == 0) document.write("في أي من المنتديات."); else document.write("في المنتدى المختار أعلاه."); document.write("


"); } else while ((x < topics.length) && (topics[x] > 0)) { t(topics[x++],topics[x++],topics[x++],topics[x++],topics[x++],topics[x++], topics[x++],topics[x++],topics[x++],topics[x++],topics[x++],topics[x++]); } } function removeExclusive(id) { if (confirm("الرجاء تأكيد حذف هذا الموضوع من مكتبة الحصريات ؟")) if (confirm("الرجاء إعادة تأكيد الحذف من المكتبة")) submitModerationCommand("dx," + id); } function findMemberName(id) { var x = 0; while ((x < authors.length) && (authors[x] > 0)) { if (authors[x] == id) return(GetM(authors[x+1])); x += 2; } return(""); } function findAddExclusive(id) { var x = 0; while ((x < listExclusive.length) && (listExclusive[x] > 0)) { if (listExclusive[x] == id) return("" + formatDate(listExclusive[x+2]) + "
" + findMemberName(listExclusive[x+1]) + ""); x += 3; } return(""); } function forumModerated(id) { var y = 0; if (memberLevel < 5) { for (y = 0; y < moderatedForums.length; y++) { if (id == moderatedForums[y]) return(true); } } else return(true); return(false); } function autoReload() { document.ReloadFrm.submit() } function SetLastDate() { document.LastDateFrm.submit() } function render_content() { if (memberLevel >= 2) writeModerationForm(); t_options_bar(); t_table_open(); t_header(); t_show_topics(); t_footer(); t_table_close(); if (page_refresh > 0) setTimeout('top.location.href = top.location.href',page_refresh*60000); }