function access_check( id, value ) { if (value == 'y'){ value = 1; } else { value = 0; } document.getElementById( 'access_mod' + '[' + id + ']' ).checked = value; document.getElementById( 'access_topic' + '[' + id + ']' ).checked = value; document.getElementById( 'access_write' + '[' + id + ']' ).checked = value; document.getElementById( 'access_read' + '[' + id + ']' ).checked = value; document.getElementById( 'access_upload' + '[' + id + ']' ).checked = value; document.getElementById( 'access_download' + '[' + id + ']' ).checked = value; } HTML; if ($forum_id) { $access_result = $db->query("SELECT * FROM " . PREFIX . "_forum_forums WHERE id = '$forum_id'"); while ($row = $db->get_row($access_result)) { $access_mod = $row['access_mod']; $access_topic = $row['access_topic']; $access_write = $row['access_write']; $access_read = $row['access_read']; $access_upload = $row['access_upload']; $access_download = $row['access_download']; } } $access_forum .= "
{$f_lg['access_forum_group']}
{$f_lg['access_forum_mod']}
{$f_lg['access_forum_topic']}
{$f_lg['access_forum_write']}
{$f_lg['access_forum_read']}
{$f_lg['access_forum_upload']}
{$f_lg['access_forum_download']}
"; $access_forum .= ""; foreach($user_group as $id => $group_name) { if ($forum_id) { $access_mod_array = explode(":",$access_mod); if (in_array($id, $access_mod_array)){$checked1 = "checked";}else{$checked1 = "";} $access_topic_array = explode(":",$access_topic); if (in_array($id, $access_topic_array)){$checked2 = "checked";}else{$checked2 = "";} $access_write_array = explode(":",$access_write); if (in_array($id, $access_write_array)){$checked3 = "checked";}else{$checked3 = "";} $access_read_array = explode(":",$access_read); if (in_array($id, $access_read_array)){$checked4 = "checked";}else{$checked4 = "";} $access_upload_array = explode(":",$access_upload); if (in_array($id, $access_upload_array)){$checked5 = "checked";}else{$checked5 = "";} $access_download_array = explode(":",$access_download); if (in_array($id, $access_download_array)){$checked6 = "checked";}else{$checked6 = "";} } $access_forum .= ""; } $access_forum .= "
{$group_name[group_name]} [+ | -]
"; return($access_forum); } // ******************************************************************************** // Category list // ******************************************************************************** function category_list($select_id){ global $db, $category_list; $result = $db->query("SELECT * FROM " . PREFIX . "_forum_category"); while ($row = $db->get_row($result)){ if ($row['sid'] == $select_id){$sel = "selected";} else {$sel = "";} $row['cat_name'] = stripcslashes($row['cat_name']); $category_list .= ""; } return($category_list); } // ******************************************************************************** // Forum list // ******************************************************************************** function forum_list($select_id){ global $db, $forum_list; $forum_list .= ""; $result = $db->query("SELECT * FROM " . PREFIX . "_forum_category LEFT JOIN ". PREFIX ."_forum_forums ON ". PREFIX ."_forum_category.sid=". PREFIX ."_forum_forums.main_id ORDER BY posi, position"); for ($i = 0; $row = $db->get_row($result_content); $i = $row['sid']){ if ($row['sid'] != $i) { $row['cat_name'] = stripcslashes($row['cat_name']); $forum_list .= ""; } if ($row['name']) { if ($row['id'] == $select_id){$sel = "selected";} else {$sel = "";} $row['name'] = stripcslashes($row['name']); $forum_list .= ""; } } return($forum_list); } // ******************************************************************************** // Category and Forum POSITION // ******************************************************************************** function category_posi($category_posi, $category_id, $result_posi){ global $db; $cat_posi = array(); $select_posi = ""; return ($select_posi); } // ******************************************************************************** // SELECT USER GROUP // ******************************************************************************** function warn_group($warn_group = false){ global $db; if ($warn_group) { $warn_list = explode (':', $warn_group); } $db->query("SELECT * FROM " . USERPREFIX . "_usergroups GROUP BY id"); $group_list .= ""; while($row = $db->get_row()) { if ($warn_group) { if (in_array($row['id'], $warn_list)) { $selected = "selected"; } else { $selected = ""; } } $group_list .= ""; } return ($group_list); } ?>