| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/baberankings.com.bak/members/modules/forums/ |
Upload File : |
<?
/* K-Rate
(C) Rinalds Uzkalns, 2003-2004. All Rights Reserved
http://turn-k.net
Version: 1.00 (22.09.04)
*/
?>
<?
//define module representation in admin menu
$adm_commands = array('manage_f_groups' => 'Manage Forum Groups',
'manage_f_forums' => 'Manage Forums',
'manage_f_opts' => 'Forum Options',
); //shown commands in admin menu - if $adm_section is false then only the first command is shown
//separate section in admin menu = true/false
$adm_section = true;
$adm_group = 'Community';
//order in admin menu
$priority = 400;
//define admin includes
$adm = array('manage_f_groups' => 'manage_groups.php',
'manage_f_forums' => 'manage_forums.php',
'manage_f_opts' => 'forum_options.php',
'forum_add_group' => 'add_group.php',
'forum_add' => 'add_forum.php',
'forum_moderators' => 'manage_moderators.php',
);
//module description
$descr = 'Forums module enables a built-in bulletin board system.';
//menu commands descriptions
$menu_descr = array('manage_f_groups' => 'Forum groups are used to group related forums together. Every forum has to belong to one group.',
'manage_f_forums' => 'Add new forums, manage existing forums and manage forum moderators.',
'manage_f_opts' => 'Edit forums system related settings.',
);
//menu commands icons
$menu_icons = array('manage_f_groups' => 'ni0117.gif',
'manage_f_forums' => 'ni0115.gif',
'manage_f_opts' => 'nd0073.gif',
);
//admin privileges
$permissions['a_manage_forums'] = 'Manage Forums';
set_perm_to_all($adm, 'a_manage_forums');
//tables
$p = 'g_';
$tables[$names['fgrouptable']] = array(array(name => $p.'id', type => 'INTEGER', extra => 'auto_increment', primary => true, title => 'ID'),
array(name => $p.'name', type => 'VARCHAR(255)', title => 'Group Name'),
array(name => $p.'descr', type => 'VARCHAR(255)', title => 'Group Description'),
array(name => $p.'order', type => 'INTEGER', title => 'Order'),
);
$rights = array(0 => 'All', 1 => 'Members', 2 => 'Paid Members', 3 => 'Moderators');
$p = 'f_';
$tables[$names['forumtable']] = array(array(name => $p.'id', type => 'INTEGER', extra => 'auto_increment', primary => true, title => 'ID'),
array(name => $p.'parent', type => 'INTEGER', index => true),
array(name => $p.'visible', type => 'INTEGER', index => true, title => 'Visible For', field => $rights),
array(name => $p.'read', type => 'INTEGER', index => true, title => 'Readable For', field => $rights),
array(name => $p.'post', type => 'INTEGER', index => true, 'title' => 'Postable For', field => $rights),
array(name => $p.'group', type => 'INTEGER', index => true, title => 'Forum Group'),
array(name => $p.'name', type => 'VARCHAR(255)', title => 'Name'),
array(name => $p.'descr', type => 'VARCHAR(255)', title => 'Description'),
array(name => $p.'order', type => 'INTEGER', title => 'Order'),
array(name => $p.'threads', type => 'INTEGER', title => 'Threads'),
array(name => $p.'posts', type => 'INTEGER', title => 'Posts'),
array(name => $p.'last', type => 'INTEGER', title => 'Last Post'),
);
$p = 't_';
$tables[$names['fthreadtable']] = array(array(name => $p.'id', type => 'INTEGER', extra => 'auto_increment', primary => true),
array(name => $p.'member', type => 'INTEGER', index => true),
array(name => $p.'username', type => 'VARCHAR(255)'),
array(name => $p.'time', type => 'INTEGER', index => true),
array(name => $p.'forum', type => 'INTEGER', index => true),
array(name => $p.'name', type => 'VARCHAR(255)', 'fulltext' => true),
array(name => $p.'descr', type => 'VARCHAR(255)', 'fulltext' => true),
array(name => $p.'last', type => 'INTEGER', index => true),
array(name => $p.'last_time', type => 'INTEGER', index => true),
array(name => $p.'posts', type => 'INTEGER'),
array(name => $p.'views', type => 'INTEGER'),
array(name => $p.'sticky', type => 'INTEGER', index => true),
array(name => $p.'mods_only', type => 'INTEGER'),
);
$p = 'p_';
$tables[$names['fposttable']] = array(array(name => $p.'id', type => 'INTEGER', extra => 'auto_increment', primary => true),
array(name => $p.'member', type => 'INTEGER', index => true),
array(name => $p.'username', type => 'VARCHAR(255)'),
array(name => $p.'thread', type => 'INTEGER', index => true),
array(name => $p.'time', type => 'INTEGER'),
array(name => $p.'title', type => 'VARCHAR(255)', 'fulltext' => true),
array(name => $p.'text', type => 'MEDIUMTEXT', 'fulltext' => true),
array(name => $p.'ip', type => 'VARCHAR(32)', index => true),
);
$p = 'fm_';
$tables[$names['fmembtable']] = array(array(name => $p.'id', type => 'INTEGER', primary => true),
array(name => $p.'posts', type => 'INTEGER'),
array(name => $p.'status_name', type => 'VARCHAR(255)'),
array(name => $p.'signature', type => 'MEDIUMTEXT'),
array(name => $p.'signature_active', type => 'SMALLINT(1)'),
array(name => $p.'subscribe_receive', type => 'SMALLINT(1)'),
array(name => $p.'subscr_receive_type', type => 'SMALLINT(1)'),
array(name => $p.'subscr_receive_hours', type => 'INT(4)')
);
$p = 'mod_';
$tables[$names['fmodstable']] = array(array(name => $p.'id', type => 'INTEGER', extra => 'auto_increment', primary => true),
array(name => $p.'member', type => 'INTEGER', index => true),
array(name => $p.'forum', type => 'INTEGER', index => true),
);
$p = 'fsf_';
$tables[$names['fsubscrforumtable']] = array(array(name => $p.'id', type => 'INTEGER', extra => 'auto_increment', primary => true),
array(name => $p.'member', type => 'INTEGER', index => true),
array(name => $p.'forum', type => 'INTEGER', index => true),
array(name => $p.'subscribe_time', type => 'INTEGER', index=>true),
array(name => $p.'last_sent_time', type => 'INTEGER', index=>true),
);
$p = 'fst_';
$tables[$names['fsubscrthreadtable']] = array(array(name => $p.'id', type => 'INTEGER', extra => 'auto_increment', primary => true),
array(name => $p.'member', type => 'INTEGER', index => true),
array(name => $p.'thread', type => 'INTEGER', index => true),
array(name => $p.'subscribe_time', type => 'INTEGER', index=>true),
array(name => $p.'last_sent_time', type => 'INTEGER', index=>true),
);
//some delete functions for admin
require_once(dirname(__file__).'/delete_funcs.php');
$k = 'forum_thread_descr'; $options[$k] = array(c_key => $k, title => 'Use forum thread descriptions', bool_ => TRUE, def => 'Yes');
$k = 'forum_post_titles'; $options[$k] = array(c_key => $k, title => 'Use post titles', bool_ => TRUE, def => 'Yes');
$k = 'forum_num_threads'; $options[$k] = array(c_key => $k, title => 'Number of threads per page', float_ => TRUE, def => 20);
$k = 'forum_num_posts'; $options[$k] = array(c_key => $k, title => 'Number of posts per thread page', float_ => TRUE, def => 20);
$k = 'forum_search_res'; $options[$k] = array(c_key => $k, title => 'Search results per page', float_ => TRUE, def => 15);
$k = 'forum_strip_tags'; $options[$k] = array(c_key => $k, title => 'Strip HTML tags', bool_ => TRUE, def => 'Yes');
$k = 'forum_allowed_tags'; $options[$k] = array(c_key => $k, title => 'Allowed HTML tags', def => '<a><b><i><u>');
$k = 'forum_show_after'; $options[$k] = array(c_key => $k, title => 'Return to posted message immediately after posting', bool_ => TRUE, def => 'Yes');
$k = 'forum_status_name'; $options[$k] = array(c_key => $k, title => 'Default forum member status name', def => 'Member');
?>