Version 1.3.0

This commit is contained in:
Neo committed 2025-12-19 00:17:06 -08:00
1 parent 7ef3d1712a
commit f87d29ba65
290 files changed
+50206 -17930

No files matched your search

+74 -16
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Admin Logs Stuff
@@ -22,7 +24,11 @@
*/
// Ensure we've not accessed this script directly:
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
@@ -35,7 +41,20 @@ class ad_adlogs {
var $colours = array();
function ad_adlogs() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
// Make sure we're a root admin, or else!
@@ -83,7 +102,7 @@ class ad_adlogs {
function view()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$start = $IN['st'] ? $IN['st'] : 0;
@@ -114,10 +133,10 @@ class ad_adlogs {
$row_count = $row['count'];
$query = "&act=modlog&code=view&search_type={$IN['search_type']}&search_string=".urlencode($IN['search_string']);
$query = "&act=adminlog&code=view&search_type={$IN['search_type']}&search_string=".urlencode($IN['search_string']);
$DB->query("SELECT m.*, mem.id, mem.name FROM ibf_admin_logs m, ibf_members mem
WHERE m.member_id='".$IN['mid']."' AND m.member_id=mem.id AND $dbq ORDER BY m.ctime DESC LIMIT $start, 20");
WHERE m.member_id=mem.id AND $dbq ORDER BY m.ctime DESC LIMIT $start, 20");
}
@@ -142,14 +161,14 @@ class ad_adlogs {
$SKIN->td_header[] = array( "IP address" , "20%" );
$ADMIN->html .= $SKIN->start_table( "Saved Admin Logs" );
$ADMIN->html .= $SKIN->add_td_basic($links, 'center', 'catrow');
$ADMIN->html .= $SKIN->add_td_basic($links, 'center', 'pformstrip');
if ( $DB->get_num_rows() )
{
while ( $row = $DB->fetch_row() )
{
$row['ctime'] = $std->get_date( $row['ctime'], 'LONG' );
$row['ctime'] = $ADMIN->get_date( $row['ctime'], 'LONG' );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$row['name']}</b>",
"<span style='color:{$this->colours[$row['act']]}'>{$row['note']}</span>",
@@ -165,7 +184,7 @@ class ad_adlogs {
$ADMIN->html .= $SKIN->add_td_basic("<center>No results</center>");
}
$ADMIN->html .= $SKIN->add_td_basic($links, 'center', 'tdtop');
$ADMIN->html .= $SKIN->add_td_basic($links, 'center', 'pformstrip');
$ADMIN->html .= $SKIN->end_table();
@@ -183,7 +202,7 @@ class ad_adlogs {
function remove()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['mid'] == "")
{
@@ -208,13 +227,52 @@ class ad_adlogs {
function list_current()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
$ADMIN->page_detail = "You may view and remove actions performed by your administrators in mission critical areas of the administration CP (such as forum control, member control, group control, help files and moderator log management).";
$ADMIN->page_title = "Administration Logs Manager";
//+-------------------------------
// LAST FIVE ACTIONS
//+-------------------------------
$DB->query("SELECT m.*, mem.id, mem.name FROM ibf_admin_logs m, ibf_members mem
WHERE m.member_id=mem.id ORDER BY m.ctime DESC LIMIT 0, 5");
$SKIN->td_header[] = array( "Member Name" , "20%" );
$SKIN->td_header[] = array( "Action Perfomed" , "40%" );
$SKIN->td_header[] = array( "Time of action" , "20%" );
$SKIN->td_header[] = array( "IP address" , "20%" );
$ADMIN->html .= $SKIN->start_table( "Last 5 Admin Actions" );
if ( $DB->get_num_rows() )
{
while ( $row = $DB->fetch_row() )
{
$row['ctime'] = $ADMIN->get_date( $row['ctime'], 'LONG' );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$row['name']}</b>",
"<span style='color:{$this->colours[$row['act']]}'>{$row['note']}</span>",
"{$row['ctime']}",
"{$row['ip_address']}",
) );
}
}
else
{
$ADMIN->html .= $SKIN->add_td_basic("<center>No results</center>");
}
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
$SKIN->td_header[] = array( "Member Name" , "30%" );
+82 -80
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Admin Category functions
@@ -21,7 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_cat();
@@ -31,7 +37,20 @@ class ad_cat {
var $base_url;
function ad_cat() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -82,7 +101,7 @@ class ad_cat {
//+---------------------------------------------------------------------------------
function reorder_form() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_title = "Category Re Order";
$ADMIN->page_detail = "To re-order the categories, simply choose the position number from the drop down box next to each category title, when you are satisfied with the ordering, simply hit the submit button at the bottom of the form";
@@ -134,7 +153,7 @@ class ad_cat {
$c['name'],
'&nbsp;',
'&nbsp;',
), 'catrow' );
), 'pformstrip' );
$last_cat_id = $c['id'];
@@ -145,7 +164,7 @@ class ad_cat {
{
$ADMIN->html .= $SKIN->add_td_row( array(
'&nbsp;',
"<b>".$r['name']."</b><br>".$r['description'],
"<b>".$r['name']."</b>",
$r['posts'],
$r['topics'],
) );
@@ -164,7 +183,7 @@ class ad_cat {
//+---------------------------------------------------------------------------------
function do_reorder() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$cat_query = $DB->query("SELECT id from ibf_categories");
@@ -187,7 +206,7 @@ class ad_cat {
//+---------------------------------------------------------------------------------
function remove_form() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
@@ -266,7 +285,7 @@ class ad_cat {
//+---------------------------------------------------------------------------------
function do_remove() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['c'] == "")
{
@@ -296,7 +315,7 @@ class ad_cat {
//+---------------------------------------------------------------------------------
function edit_form() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$subcats = array();
@@ -317,8 +336,7 @@ class ad_cat {
$ADMIN->page_title = "Edit a category";
$ADMIN->page_detail = "This section will allow you to edit a new category. If you wish to add a category 'sponsor', simply enter the image URL and website URL
in the appropriate section.";
$ADMIN->page_detail = "This section will allow you to edit a new category.";
//+-------------------------------
@@ -341,11 +359,13 @@ class ad_cat {
$SKIN->form_input("CAT_NAME", $cat['name'])
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Category State</b>" ,
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Category State</b><br />Unless disabled, categories will show in search selection box" ,
$SKIN->form_dropdown( "CAT_STATE",
array(
0 => array( 1, 'Visible' ),
1 => array( 0, 'Hidden' ),
1 => array( 0, 'Disable' ),
2 => array( 2, 'Hidden from forumhome list - can access via URL and forum jump' ),
3 => array( 3, 'Hidden from forumhome list - can access via URL - removed from forum jump' ),
),
$cat['state']
)
@@ -380,7 +400,7 @@ class ad_cat {
//+---------------------------------------------------------------------------------
function do_edit() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$IN['CAT_NAME'] = trim($IN['CAT_NAME']);
@@ -419,19 +439,12 @@ class ad_cat {
//+---------------------------------------------------------------------------------
function show_cats() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_title = "Category and Forums Overview";
$ADMIN->page_detail = "This section will provide you with a category and forums overview allowing you to make fast changes to the category/forums set up and information.".
"<br><table cellpadding='3' cellspacing='0' border='0' align='left' width='100%'>".
"<tr><td><b>Edit Settings</b></td><td>This allows you to edit the forum settings</td></tr>".
"<tr><td><b>Delete</b></td><td>This will remove the forum and move the posts and topics to a forum of your choice</td></tr>".
"<tr><td><b>Empty</b></td><td>This will remove all topics and posts in this forum - a confirmation screen is displayed</td></tr>".
"<tr><td><b>Edit Permissions</b></td><td>This allows you to edit the forum access abilities for all groups in this forum</td></tr>".
"<tr><td><img src='{$SKIN->img_url}/acp_rules.gif' border='0' align='absmiddle'></td><td><b>Forum Rules</b> This allows you to add/edit or remove rules for this forum</td></tr>".
"<tr><td><img src='{$SKIN->img_url}/acp_edit.gif' border='0' align='absmiddle'></td><td><b>Skin Options</b> This allows you to add/edit or remove a skin for this forum</td></tr>".
"<tr><td><img src='{$SKIN->img_url}/acp_resync.gif' border='0' align='absmiddle'></td><td><b>Resynchronise</b> This allows you to recount the forum posts, topics and last post information</td></tr>".
"</table>";
$ADMIN->page_detail = "<img src='{$SKIN->img_url}/acp_rules.gif' border='0'> <b>Forum Rules</b> This allows you to add/edit or remove rules for this forum
<br /><img src='{$SKIN->img_url}/acp_edit.gif' border='0'> <b>Skin Options</b> This allows you to add/edit or remove a skin for this forum
<br /><img src='{$SKIN->img_url}/acp_resync.gif' border='0'> <b>Resynchronise</b> This allows you to recount the forum posts, topics and last post information";
$cats = array();
$forums = array();
@@ -465,13 +478,10 @@ class ad_cat {
$skins[$s['sid']] = $s['sname'];
}
$SKIN->td_header[] = array( "&nbsp;" , "5%" );
$SKIN->td_header[] = array( "Forum Name" , "30%" );
$SKIN->td_header[] = array( "Posts" , "10%" );
$SKIN->td_header[] = array( "Topics" , "10%" );
$SKIN->td_header[] = array( "&nbsp;" , "15%" );
$SKIN->td_header[] = array( "&nbsp;" , "15%" );
$SKIN->td_header[] = array( "&nbsp;" , "15%" );
$SKIN->td_header[] = array( "{none}", "40%" );
$SKIN->td_header[] = array( "{none}", "20%" );
$SKIN->td_header[] = array( "{none}", "15%" );
$SKIN->td_header[] = array( "{none}", "20%" );
$ADMIN->html .= $SKIN->start_table("Your Categories and Forums");
@@ -482,13 +492,11 @@ class ad_cat {
$ADMIN->html .= $SKIN->add_td_row( array(
array($c['name'], 2),
"<a href='{$INFO['board_url']}/index.php?c={$c['id']}' target='_blank'>".$c['name']."</a>",
"<center><a href='{$ADMIN->base_url}&act=cat&code=doeditform&c={$c['id']}'>Edit</a></center>",
'&nbsp;',
'&nbsp;',
"<a href='{$ADMIN->base_url}&act=cat&code=doeditform&c={$c['id']}'>Edit</a>",
'&nbsp;',
"<a href='{$ADMIN->base_url}&act=cat&code=remove&c={$c['id']}'>Delete</a>",
), 'catrow' );
"<center><a href='{$ADMIN->base_url}&act=cat&code=remove&c={$c['id']}'>Delete</a></center>",
), 'pformstrip' );
$last_cat_id = $c['id'];
@@ -506,6 +514,8 @@ class ad_cat {
{
$skin_stuff = "";
}
$redirect = ($r['redirect_on'] == 1) ? ' (Redirect Forum)' : '';
if ($r['subwrap'] == 1)
{
@@ -513,49 +523,41 @@ class ad_cat {
if ($r['sub_can_post'])
{
$ADMIN->html .= $SKIN->add_td_row( array(
"&nbsp;&gt;",
"<b>".$r['name']."</b>$skin_stuff<br>".$r['description'],
$r['posts'],
$r['topics'],
"<a href='{$ADMIN->base_url}&act=forum&code=subedit&f={$r['id']}'>Edit Settings</a><br><br>".
"<a href='{$ADMIN->base_url}&act=forum&code=pedit&f={$r['id']}'>Edit Permissions</a>",
" - <b>".$r['name']."</b>$redirect $skin_stuff",
"<center><b><a href='{$ADMIN->base_url}&act=forum&code=subedit&f={$r['id']}'>Settings</a></b>".
" | <a href='{$ADMIN->base_url}&act=forum&code=pedit&f={$r['id']}'>Permissions</a></center>",
"<center><a href='{$ADMIN->base_url}&act=forum&code=frules&f={$r['id']}'><img src='{$SKIN->img_url}/acp_rules.gif' border='0' title='Forum Rules'></a>&nbsp;&nbsp;".
"<a href='{$ADMIN->base_url}&act=forum&code=skinedit&f={$r['id']}'><img src='{$SKIN->img_url}/acp_edit.gif' border='0' title='Skin Options'></a>&nbsp;&nbsp;".
"<a href='{$ADMIN->base_url}&act=forum&code=recount&f={$r['id']}'><img src='{$SKIN->img_url}/acp_resync.gif' border='0' title='Resynchronise'></a></center>",
"<a href='{$ADMIN->base_url}&act=forum&code=subdelete&f={$r['id']}'>Delete</a><br><br>".
"<a href='{$ADMIN->base_url}&act=forum&code=empty&f={$r['id']}'>Empty Forum</a>",
) , 'catrow2' );
"<center><a href='{$ADMIN->base_url}&act=forum&code=subdelete&f={$r['id']}'>Delete</a>".
" | <b><a href='{$ADMIN->base_url}&act=forum&code=empty&f={$r['id']}'>Empty Forum</a></b></center>",
) , 'subforum' );
}
else
{
$ADMIN->html .= $SKIN->add_td_row( array(
"&nbsp;&gt;",
"<b>".$r['name']."</b>$skin_stuff",
"-",
"-",
" - <b>".$r['name']."</b>$redirect $skin_stuff",
"<a href='{$ADMIN->base_url}&act=forum&code=subedit&f={$r['id']}'>Edit</a>",
"<a href='{$ADMIN->base_url}&act=forum&code=skinedit&f={$r['id']}'>Skin Options</a>",
"<a href='{$ADMIN->base_url}&act=forum&code=subdelete&f={$r['id']}'>Delete</a>",
) , 'catrow2' );
) , 'subforum' );
}
}
else
{
$ADMIN->html .= $SKIN->add_td_row( array(
array("<b>".$r['name']."</b>$skin_stuff<br>".$r['description'], 2),
$r['posts'],
$r['topics'],
"<a href='{$ADMIN->base_url}&act=forum&code=edit&f={$r['id']}'>Edit Settings</a><br><br>".
"<a href='{$ADMIN->base_url}&act=forum&code=pedit&f={$r['id']}'>Edit Permissions</a>",
"<b>".$r['name']."</b>$redirect $skin_stuff<br>",
"<center><b><a href='{$ADMIN->base_url}&act=forum&code=edit&f={$r['id']}'>Settings</a></b>".
" | <a href='{$ADMIN->base_url}&act=forum&code=pedit&f={$r['id']}'>Permissions</a></center>",
"<center><a href='{$ADMIN->base_url}&act=forum&code=frules&f={$r['id']}'><img src='{$SKIN->img_url}/acp_rules.gif' border='0' title='Forum Rules'></a>&nbsp;&nbsp;".
"<a href='{$ADMIN->base_url}&act=forum&code=skinedit&f={$r['id']}'><img src='{$SKIN->img_url}/acp_edit.gif' border='0' title='Skin Options'></a>&nbsp;&nbsp;".
"<a href='{$ADMIN->base_url}&act=forum&code=recount&f={$r['id']}'><img src='{$SKIN->img_url}/acp_resync.gif' border='0' title='Resynchronise'></a></center>",
"<a href='{$ADMIN->base_url}&act=forum&code=delete&f={$r['id']}'>Delete</a><br><br>".
"<a href='{$ADMIN->base_url}&act=forum&code=empty&f={$r['id']}'>Empty Forum</a>",
"<center><a href='{$ADMIN->base_url}&act=forum&code=delete&f={$r['id']}'>Delete</a>".
" | <b><a href='{$ADMIN->base_url}&act=forum&code=empty&f={$r['id']}'>Empty Forum</a></b></center>",
) );
}
@@ -572,19 +574,18 @@ class ad_cat {
{
$skin_stuff = "";
}
$redirect = ($rd['redirect_on'] == 1) ? ' (Redirect Forum)' : '';
$ADMIN->html .= $SKIN->add_td_row( array(
"&nbsp;&gt;",
"<b>".$rd['name']."</b>$skin_stuff<br>".$rd['description'],
$rd['posts'],
$rd['topics'],
"<a href='{$ADMIN->base_url}&act=forum&code=edit&f={$rd['id']}'>Edit Settings</a><br><br>".
"<a href='{$ADMIN->base_url}&act=forum&code=pedit&f={$rd['id']}'>Edit Permissions</a>",
" +-- <b>".$rd['name']."</b>$redirect $skin_stuff<br>",
"<center><b><a href='{$ADMIN->base_url}&act=forum&code=edit&f={$rd['id']}'>Settings</a></b>".
" | <a href='{$ADMIN->base_url}&act=forum&code=pedit&f={$rd['id']}'>Permissions</a></center>",
"<center><a href='{$ADMIN->base_url}&act=forum&code=frules&f={$rd['id']}'><img src='{$SKIN->img_url}/acp_rules.gif' border='0' title='Forum Rules'></a>&nbsp;&nbsp;".
"<a href='{$ADMIN->base_url}&act=forum&code=skinedit&f={$rd['id']}'><img src='{$SKIN->img_url}/acp_edit.gif' border='0' title='Skin Options'></a>&nbsp;&nbsp;".
"<a href='{$ADMIN->base_url}&act=forum&code=recount&f={$rd['id']}'><img src='{$SKIN->img_url}/acp_resync.gif' border='0' title='Resynchronise'></a></center>",
"<a href='{$ADMIN->base_url}&act=forum&code=delete&f={$rd['id']}'>Delete</a><br><br>".
"<a href='{$ADMIN->base_url}&act=forum&code=empty&f={$rd['id']}'>Empty Forum</a>",
"<center><a href='{$ADMIN->base_url}&act=forum&code=delete&f={$rd['id']}'>Delete</a>".
" | <b><a href='{$ADMIN->base_url}&act=forum&code=empty&f={$rd['id']}'>Empty Forum</a></b></center>",
) , 'subforum' );
}
}
@@ -606,19 +607,18 @@ class ad_cat {
//+---------------------------------------------------------------------------------
function new_form() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
$cat_name = "";
if ($HTTP_GET_VARS['name'] != "")
{
$cat_name = stripslashes(urldecode($HTTP_GET_VARS['name']));
$cat_name = $std->txt_stripslashes(urldecode($HTTP_GET_VARS['name']));
}
$ADMIN->page_title = "Add a new category";
$ADMIN->page_detail = "This section will allow you to add a new category to your forums. If you wish to add a category 'sponsor', simply enter the image URL and website URL
in the appropriate section.";
$ADMIN->page_detail = "This section will allow you to add a new category to your forums.";
//+-------------------------------
@@ -639,11 +639,13 @@ class ad_cat {
$SKIN->form_input("CAT_NAME", $cat_name)
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Category State</b>" ,
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Category State</b><br />Unless disabled, categories will show in search selection box" ,
$SKIN->form_dropdown( "CAT_STATE",
array(
0 => array( 1, 'Visible' ),
1 => array( 0, 'Hidden' ),
1 => array( 0, 'Disable' ),
2 => array( 2, 'Hidden from forumhome list - can access via URL and forum jump' ),
3 => array( 3, 'Hidden from forumhome list - can access via URL - removed from forum jump' ),
),
"1"
)
@@ -679,7 +681,7 @@ class ad_cat {
//+---------------------------------------------------------------------------------
function do_new() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$IN['CAT_NAME'] = trim($IN['CAT_NAME']);
+492
View File
@@ -0,0 +1,492 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Email Logs Stuff
| > Module written by Matt Mecham
| > Date started: 11nd September 2002
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_emaillogs();
class ad_emaillogs
{
var $base_url;
var $colours = array();
function ad_emaillogs()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
// Make sure we're a root admin, or else!
if ($MEMBER['mgroup'] != $INFO['admin_group'])
{
$ADMIN->error("Sorry, these functions are for the root admin group only");
}
switch($IN['code'])
{
case 'list':
$this->list_current();
break;
case 'remove':
$this->remove_entries();
break;
case 'viewemail':
$this->view_email();
break;
//-------------------------
default:
$this->list_current();
break;
}
}
//---------------------------------------------
// View a single email.
//---------------------------------------------
function view_email()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
$ADMIN->error("Could not resolve the email ID, please try again");
}
$id = intval($IN['id']);
$DB->query("SELECT email.*, m.id, m.name, mem.id as to_id, mem.name as to_name FROM ibf_email_logs email
LEFT JOIN ibf_members m ON (m.id=email.from_member_id)
LEFT JOIN ibf_members mem ON (mem.id=email.to_member_id)
WHERE email.email_id=$id");
if ( ! $row = $DB->fetch_row() )
{
$ADMIN->error("Could not resolve the email ID, please try again ($id)");
}
$SKIN->td_header[] = array( "&nbsp;" , "100%" );
$ADMIN->html .= $SKIN->start_table( $row['email_subject'] );
$row['email_date'] = $ADMIN->get_date( $row['email_date'], 'LONG' );
$ADMIN->html .= $SKIN->add_td_row( array(
"<strong>From:</strong> {$row['name']} &lt;{$row['from_email_address']}&gt;
<br /><strong>To:</strong> {$row['to_name']} &lt;{$row['to_email_address']}&gt;
<br /><strong>Sent:</strong> {$row['email_date']}
<br /><strong>From IP:</strong> {$row['from_ip_address']}
<br /><strong>Subject:</strong> {$row['email_subject']}
<hr>
<br />{$row['email_content']}
"
) );
$ADMIN->html .= $SKIN->end_table();
$ADMIN->print_popup();
}
//---------------------------------------------
// Remove row(s)
//---------------------------------------------
function remove_entries()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ( $IN['type'] == 'all' )
{
$DB->query("DELETE FROM ibf_email_logs");
}
else
{
$ids = array();
foreach ($IN as $k => $v)
{
if ( preg_match( "/^id_(\d+)$/", $k, $match ) )
{
if ($IN[ $match[0] ])
{
$ids[] = $match[1];
}
}
}
//-------------------
if ( count($ids) < 1 )
{
$ADMIN->error("You did not select any email log entries to approve or delete");
}
$DB->query("DELETE FROM ibf_email_logs WHERE email_id IN (".implode(',', $ids ).")");
}
$ADMIN->save_log("Removed email log entries");
$std->boink_it($ADMIN->base_url."&act=emaillog");
exit();
}
//-------------------------------------------------------------
// SHOW ALL LANGUAGE PACKS
//-------------------------------------------------------------
function list_current()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->html .= $SKIN->js_pop_win();
$form_array = array();
$start = intval($IN['st']);
$ADMIN->page_detail = "Stored email logs";
$ADMIN->page_title = "Email Logs Manager";
//+-------------------------------
// Check URL parameters
//+-------------------------------
$url_query = array();
$db_query = array();
if ( $IN['type'] != "" )
{
$ADMIN->page_title .= " (Search Results)";
switch( $IN['type'] )
{
case 'fromid':
$url_query[] = 'type=fromid';
$url_query[] = 'id='.intval($IN['id']);
$db_query[] = 'email.from_member_id='.intval($IN['id']);
break;
case 'toid':
$url_query[] = 'type=toid';
$url_query[] = 'id='.intval($IN['id']);
$db_query[] = 'email.to_member_id='.intval($IN['id']);
break;
case 'subject':
$string = urldecode($IN['string']);
if ( $string == "" )
{
$ADMIN->error("You must enter something to search by");
}
$url_query[] = 'type='.$IN['type'];
$url_query[] = 'string='.urlencode($string);
$db_query[] = $IN['match'] == 'loose' ? "email.email_subject LIKE '%{$string}%'" : "email.email_subject='{$string}'";
break;
case 'content':
$string = urldecode($IN['string']);
if ( $string == "" )
{
$ADMIN->error("You must enter something to search by");
}
$url_query[] = 'type='.$IN['type'];
$url_query[] = 'string='.urlencode($string);
$db_query[] = $IN['match'] == 'loose' ? "email.email_content LIKE '%{$string}%'" : "email.email_content='{$string}'";
break;
case 'email_from':
$string = urldecode($IN['string']);
if ( $string == "" )
{
$ADMIN->error("You must enter something to search by");
}
$url_query[] = 'type='.$IN['type'];
$url_query[] = 'string='.urlencode($string);
$db_query[] = $IN['match'] == 'loose' ? "email.from_email_address LIKE '%{$string}%'" : "email.from_email_address='{$string}'";
break;
case 'email_to':
$string = urldecode($IN['string']);
if ( $string == "" )
{
$ADMIN->error("You must enter something to search by");
}
$url_query[] = 'type='.$IN['type'];
$url_query[] = 'string='.urlencode($string);
$db_query[] = $IN['match'] == 'loose' ? "email.to_email_address LIKE '%{$string}%'" : "email.to_email_address='{$string}'";
break;
case 'name_from':
$string = urldecode($IN['string']);
if ( $string == "" )
{
$ADMIN->error("You must enter something to search by");
}
if ( $IN['match'] == 'loose' )
{
$DB->query("SELECT id,name FROM ibf_members WHERE name LIKE '%{$string}%'");
if ( ! $DB->get_num_rows() )
{
$ADMIN->error("No matches found in the email logs");
}
$ids = array();
while ( $r = $DB->fetch_row() )
{
$ids[] = $r['id'];
}
$db_query[] = 'email.from_member_id IN('.implode( ',', $ids ).')';
}
else
{
$DB->query("SELECT id,name FROM ibf_members WHERE name='{$string}'");
if ( ! $DB->get_num_rows() )
{
$ADMIN->error("No matches found in the email logs");
}
$r = $DB->fetch_row();
$db_query[] = 'email.from_member_id IN('.$r['id'].')';
}
$url_query[] = 'type='.$IN['type'];
$url_query[] = 'string='.urlencode($string);
break;
case 'name_to':
$string = urldecode($IN['string']);
if ( $string == "" )
{
$ADMIN->error("You must enter something to search by");
}
if ( $IN['match'] == 'loose' )
{
$DB->query("SELECT id,name FROM ibf_members WHERE name LIKE '%{$string}%'");
if ( ! $DB->get_num_rows() )
{
$ADMIN->error("No matches found in the email logs");
}
$ids = array();
while ( $r = $DB->fetch_row() )
{
$ids[] = $r['id'];
}
$db_query[] = 'email.to_member_id IN('.implode( ',', $ids ).')';
}
else
{
$DB->query("SELECT id,name FROM ibf_members WHERE name='{$string}'");
if ( ! $DB->get_num_rows() )
{
$ADMIN->error("No matches found in the email logs");
}
$r = $DB->fetch_row();
$db_query[] = 'email.to_member_id IN('.$r['id'].')';
}
$url_query[] = 'type='.$IN['type'];
$url_query[] = 'string='.urlencode($string);
break;
default:
//
break;
}
}
//+-------------------------------
// LIST 'EM
//+-------------------------------
$dbe = "";
$url = "";
if ( count($db_query) > 0 )
{
$dbe = ' WHERE '.implode(' AND ', $db_query );
}
if ( count($url_query) > 0 )
{
$url = '&'.implode( '&', $url_query);
}
$DB->query("SELECT count(email.email_id) as cnt FROM ibf_email_logs email".$dbe);
$count = $DB->fetch_row();
$links = $std->build_pagelinks( array( 'TOTAL_POSS' => $count['cnt'],
'PER_PAGE' => 25,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "Single Page",
'L_MULTI' => "Pages: ",
'BASE_URL' => $ADMIN->base_url.'&act=emaillog'.$url,
)
);
$DB->query("SELECT email.*, m.id, m.name, mem.id as to_id, mem.name as to_name FROM ibf_email_logs email
LEFT JOIN ibf_members m ON (m.id=email.from_member_id)
LEFT JOIN ibf_members mem ON (mem.id=email.to_member_id) $dbe
ORDER BY email_date DESC LIMIT $start,25");
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'remove' ),
2 => array( 'act' , 'emaillog' ),
) );
$SKIN->td_header[] = array( "&nbsp;" , "5%" );
$SKIN->td_header[] = array( "From Member" , "20%" );
$SKIN->td_header[] = array( "Subject" , "30%" );
$SKIN->td_header[] = array( "To Member" , "20%" );
$SKIN->td_header[] = array( "Sent Time" , "25%" );
$ADMIN->html .= $SKIN->start_table( "Logged Emails" );
if ( $DB->get_num_rows() )
{
while ( $row = $DB->fetch_row() )
{
$row['email_date'] = $ADMIN->get_date( $row['email_date'], 'SHORT' );
$ADMIN->html .= $SKIN->add_td_row( array(
"<center><input type='checkbox' class='checkbox' name='id_{$row['email_id']}' value='1' /></center>",
"<a href='{$ADMIN->base_url}&act=emaillog&code=list&type=fromid&id={$row['id']}' title='Show all from this member'><img src='{$SKIN->img_url}/acp_search.gif' border='0' alt='..by id'></a>&nbsp;<b><a href='{$INFO['board_url']}/index.{$INFO['php_ext']}?act=Profile&MID={$row['id']}' title='Members profile (new window)' target='blank'>{$row['name']}</a></b>",
"<a href='javascript:pop_win(\"&act=emaillog&code=viewemail&id={$row['email_id']}\",400,400)' title='Read email'>{$row['email_subject']}</a>",
"<a href='{$ADMIN->base_url}&act=emaillog&code=list&type=toid&id={$row['to_id']}' title='Show all sent to this member'><img src='{$SKIN->img_url}/acp_search.gif' border='0' alt='..by id'></a>&nbsp;<a href='{$INFO['board_url']}/index.{$INFO['php_ext']}?act=Profile&MID={$row['to_id']}' title='Members profile (new window)' target='blank'>{$row['to_name']}</a>",
"{$row['email_date']}",
) );
}
}
else
{
$ADMIN->html .= $SKIN->add_td_basic("<center>No results</center>");
}
$ADMIN->html .= $SKIN->add_td_basic('<div style="float:left;width:auto"><input type="submit" value="Remove Checked" id="button" />&nbsp;<input type="checkbox" id="checkbox" name="type" value="all" />&nbsp;Remove all?</div><div align="right">'.$links.'</div></form>', 'left', 'pformstrip');
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'list' ),
2 => array( 'act' , 'emaillog' ),
) );
$SKIN->td_header[] = array( "&nbsp;" , "100%" );
$ADMIN->html .= $SKIN->start_table( "Search Email Logs" );
$form_array = array(
0 => array( 'subject' , 'Email Subject' ),
1 => array( 'content' , 'Email Body' ),
2 => array( 'email_from' , 'From Email Address' ),
3 => array( 'email_to' , 'To Email Address' ),
4 => array( 'name_from' , 'From Member Name'),
5 => array( 'name_to' , 'To Member Name' ),
);
$type_array = array(
0 => array( 'exact' , 'is exactly' ),
1 => array( 'loose' , 'contains' ),
);
//+-------------------------------
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Search where</b> &nbsp;"
. $SKIN->form_dropdown( "type", $form_array) ." "
. $SKIN->form_dropdown( "match", $type_array) ." "
. $SKIN->form_input( "string"),
) );
$ADMIN->html .= $SKIN->end_form("Search");
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->nav[] = array( 'act=emaillog', 'Email Logs (Show all)' );
$ADMIN->output();
}
}
?>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+38 -15
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Help Control functions
@@ -21,7 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_settings();
@@ -32,7 +38,20 @@ class ad_settings {
var $base_url;
function ad_settings() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -69,7 +88,7 @@ class ad_settings {
function doedit()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['id'] == "")
{
@@ -77,10 +96,12 @@ class ad_settings {
}
$text = preg_replace( "/\n/", "<br>", stripslashes($HTTP_POST_VARS['text'] ) );
$title = preg_replace( "/\n/", "<br>", stripslashes($HTTP_POST_VARS['title'] ) );
//$title = preg_replace( "/\n/", "<br>", stripslashes($HTTP_POST_VARS['title'] ) );
$desc = preg_replace( "/\n/", "<br>", stripslashes($HTTP_POST_VARS['description'] ) );
$db_string = $DB->compile_db_update_string( array( 'title' => $title,
$text = preg_replace( "/\\\/", "&#092;", $text );
$db_string = $DB->compile_db_update_string( array( 'title' => $IN['title'],
'text' => $text,
'description' => $desc,
) );
@@ -100,7 +121,7 @@ class ad_settings {
function show_form($type='new')
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_detail = "You may add/edit and remove help files below.";
$ADMIN->page_title = "Help File Management";
@@ -177,7 +198,7 @@ class ad_settings {
function remove()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -198,7 +219,7 @@ class ad_settings {
function doadd()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['title'] == "")
{
@@ -211,6 +232,8 @@ class ad_settings {
$title = preg_replace( "/\n/", "<br>", stripslashes($HTTP_POST_VARS['title'] ) );
$desc = preg_replace( "/\n/", "<br>", stripslashes($HTTP_POST_VARS['description'] ) );
$text = preg_replace( "/\\\/", "&#092;", $text );
$db_string = $DB->compile_db_insert_string( array( 'title' => $title,
'text' => $text,
'description' => $desc,
@@ -230,7 +253,7 @@ class ad_settings {
function list_files()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_detail = "You may add/edit and remove help files below.";
$ADMIN->page_title = "Help File Management";
+68 -35
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Skin -> Image Macro functions
@@ -22,7 +24,11 @@
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_settings();
@@ -33,7 +39,20 @@ class ad_settings {
var $base_url;
function ad_settings() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -95,7 +114,7 @@ class ad_settings {
function import()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_FILES;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_FILES;
$FILE_NAME = $HTTP_POST_FILES['FILE_UPLOAD']['name'];
$FILE_SIZE = $HTTP_POST_FILES['FILE_UPLOAD']['size'];
@@ -160,7 +179,7 @@ class ad_settings {
if ( ! preg_match( "/~=~/", $data ) )
{
$ADMIN->error("This file does not appear to be a valid Invision Board macro file");
$ADMIN->error("This file does not appear to be a valid Invision Power Board macro file");
}
//-------------------------------------
@@ -208,9 +227,11 @@ class ad_settings {
$v = "";
}
$row['macro_replace'] = str_replace( '\n', "\n", $v);
$str = $DB->compile_db_insert_string( array (
'macro_value' => stripslashes($k),
'macro_replace' => stripslashes($v),
'macro_value' => $std->txt_stripslashes($k),
'macro_replace' => $v,
'macro_set' => $new_id,
'can_remove' => 1,
) );
@@ -240,21 +261,21 @@ class ad_settings {
function edit_set_name()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['id'] == "")
{
$ADMIN->error("You must specify an existing macro set ID, go back and try again");
}
$DB->query("SELECT * FROM ibf_macro WHERE macro_id='".$IN['id']."'");
$DB->query("SELECT * FROM ibf_macro WHERE macro_set='".$IN['id']."'");
if ( ! $row = $DB->fetch_row() )
{
$ADMIN->error("Could not retrieve the record from the DB");
}
$DB->query("UPDATE ibf_macro_name SET set_name='{$IN['macro_name']}' WHERE set_id='".$IN['id']."'");
$DB->query("UPDATE ibf_macro_name SET set_name='{$IN['setname']}' WHERE set_id='".$IN['id']."'");
$ADMIN->done_screen("Macro Set Updated", "Manage Macro Set {$row['macro_name']}", "act=image&code=edit&id={$row['macro_set']}" );
@@ -266,7 +287,7 @@ class ad_settings {
function macro_remove()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['mid'] == "")
{
@@ -289,7 +310,7 @@ class ad_settings {
function macro_edit()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['mid'] == "")
{
@@ -303,8 +324,8 @@ class ad_settings {
$ADMIN->error("Could not retrieve the record from the DB");
}
$key = str_replace( "'", "\\'", stripslashes($HTTP_POST_VARS['macro_value']) );
$val = str_replace( "'", "\\'", stripslashes($HTTP_POST_VARS['macro_replace']) );
$key = str_replace( "'", "\\'", $std->txt_safeslashes($HTTP_POST_VARS['macro_value']) );
$val = str_replace( "'", "\\'", $std->txt_UNhtmlspecialchars($std->txt_safeslashes($HTTP_POST_VARS['macro_replace']) ) );
$DB->query("UPDATE ibf_macro SET macro_value='$key', macro_replace='$val' WHERE macro_id='".$IN['mid']."'");
@@ -317,7 +338,7 @@ class ad_settings {
function macro_add()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['id'] == "")
{
@@ -332,8 +353,8 @@ class ad_settings {
}
$str = $DB->compile_db_insert_string( array (
'macro_value' => stripslashes($HTTP_POST_VARS['macro_value']),
'macro_replace' => stripslashes($HTTP_POST_VARS['macro_replace']),
'macro_value' => $std->txt_safeslashes($HTTP_POST_VARS['macro_value']),
'macro_replace' => $std->txt_UNhtmlspecialchars($std->txt_safeslashes($HTTP_POST_VARS['macro_replace'])),
'can_remove' => 1,
'macro_set' => $row['macro_set']
) );
@@ -350,7 +371,7 @@ class ad_settings {
function macro_form($type='edit')
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($type == 'edit')
@@ -431,7 +452,7 @@ class ad_settings {
$ADMIN->html .= $SKIN->add_td_row( array(
"Macro Replacement",
$SKIN->form_textarea('macro_replace', $row['macro_replace']),
$SKIN->form_textarea('macro_replace', $std->txt_htmlspecialchars($row['macro_replace']) ),
) );
$ADMIN->html .= $SKIN->end_form($button);
@@ -448,7 +469,7 @@ class ad_settings {
function export()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -477,6 +498,11 @@ class ad_settings {
{
$row['macro_replace'] = "*UNASSIGNED*";
}
// Fix newlines..
$row['macro_replace'] = str_replace( "\n", '\n', str_replace("\r", "\n", $row['macro_replace'] ) );
$contents .= $row['macro_value']."~=~".$row['macro_replace']."\n";
}
@@ -496,7 +522,7 @@ class ad_settings {
function add_macro_set()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['id'] == "")
{
@@ -532,8 +558,8 @@ class ad_settings {
while( $row = $DB->fetch_row($q1) )
{
$str = $DB->compile_db_insert_string( array (
'macro_value' => stripslashes($row['macro_value']),
'macro_replace' => stripslashes($row['macro_replace']),
'macro_value' => $std->txt_stripslashes($row['macro_value']),
'macro_replace' => $std->txt_stripslashes($row['macro_replace']),
'macro_set' => $new_id,
'can_remove' => 1,
) );
@@ -554,7 +580,7 @@ class ad_settings {
function remove()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
@@ -580,7 +606,7 @@ class ad_settings {
function show_macros()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//+-------------------------------
@@ -629,7 +655,7 @@ class ad_settings {
$ADMIN->html .= $SKIN->add_td_row( array(
"Macro Set Title",
$SKIN->form_input('macro_name', $row['set_name']),
$SKIN->form_input('setname', $row['set_name']),
) );
$ADMIN->html .= $SKIN->end_form("Edit Macro Title");
@@ -667,7 +693,14 @@ class ad_settings {
$real = substr( $real, 0, 52 ) . '...';
}
$preview = str_replace( "<#IMG_DIR#>", $skin['img_dir'], $row['macro_replace'] );
if ( $INFO['preview'] == 0 )
{
$preview = '<em>Disabled via ACP Prefs</em>';
}
else
{
$preview = str_replace( "<#IMG_DIR#>", $skin['img_dir'], $row['macro_replace'] );
}
$remove = "Cannot remove";
@@ -704,7 +737,7 @@ class ad_settings {
function list_current()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
@@ -741,7 +774,7 @@ class ad_settings {
continue;
}
$ADMIN->html .= $SKIN->add_td_row( array( "<b>".stripslashes($r['set_name'])."</b>",
$ADMIN->html .= $SKIN->add_td_row( array( "<b>".$std->txt_stripslashes($r['set_name'])."</b>",
"<#X-{$r['macro_set']}#>",
"<center><a href='".$SKIN->base_url."&act=image&code=export&id={$r['macro_set']}'>Export</a></center>",
"<center><a href='".$SKIN->base_url."&act=image&code=edit&id={$r['macro_set']}'>Edit</a></center>",
@@ -784,7 +817,7 @@ class ad_settings {
while ( $r = $DB->fetch_row() )
{
$ADMIN->html .= $SKIN->add_td_row( array( "<b>".stripslashes($r['set_name'])."</b>",
$ADMIN->html .= $SKIN->add_td_row( array( "<b>".$std->txt_stripslashes($r['set_name'])."</b>",
"<center><a href='".$SKIN->base_url."&act=image&code=export&id={$r['set_id']}'>Export</a></center>",
"<center><a href='".$SKIN->base_url."&act=image&code=edit&id={$r['set_id']}'>Edit</a></center>",
"<center><a href='javascript:checkdelete(\"act=image&code=remove&id={$r['set_id']}\")'>Remove</a></center>",
+323 -22
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Admin "welcome" screen functions
@@ -21,7 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new index_page();
@@ -29,9 +35,124 @@ $idx = new index_page();
class index_page {
function index_page() {
global $DB, $IN, $INFO, $ADMIN, $SKIN, $std;
var $mysql_version = "";
function index_page()
{
global $DB, $IN, $INFO, $ADMIN, $MEMBER, $SKIN, $std, $ibforums;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
$ADMIN->page_title = "Welcome to the Invision Power Board Administration CP";
$ADMIN->page_detail = "You can set up and customize your board from within this control panel.<br><br>Clicking on one of the links in the left menu pane will show you the relevant options for that administration category. Each option will contain further information on configuration, etc.";
//---------------------------------
// Get mySQL & PHP Version
//---------------------------------
$DB->query("SELECT VERSION() AS version");
if ( ! $row = $DB->fetch_row() )
{
$DB->query("SHOW VARIABLES LIKE 'version'");
$row = $DB->fetch_row();
}
$this->mysql_version = $row['version'];
$phpv = phpversion();
//---------------------------------
// Got reg code?
//---------------------------------
$reg_html = "";
$reg_end = "";
$version_info = "<a href='http://www.invisionboard.com/download.cgi' target='_blank'><img border='0' src='http://www.invisionboard.com/acp/versioncheck/?v={$ibforums->acpversion}' vspace='10'></a><br /><b><a href='http://www.php.net' target='_blank'>PHP</a> VERSION:</b> $phpv, <b><a href='http://www.mysql.com' target='_blank'>MySQL</a> VERSION:</b> ".$this->mysql_version;
if ( $INFO['ipb_reg_number'] )
{
list( $a, $b, $c, $d, $e ) = explode( '-', $INFO['ipb_reg_number'] );
if ( strlen($e) > 9 )
{
$reg_end = "Registered until: <span style='color:green'>". $ADMIN->get_date( $e, 'SHORT' )."</span>";
}
else
{
$reg_end = "Registered for life";
}
$reg_html = "<div style='border:1px dotted #555;padding:6px;background-color:#EEF2F7;'>
<b style='font-size:12px;color:#336699'>Registered Invision Power Board</b>
<br />Thank you for registering your Invision Power Board!
<br /><br />Please visit your <a href='http://customer.invisionpower.com' target='_blank'>client area</a> for news, updates and support.
<br />$reg_end
</div>";
}
else
{
$reg_html = "<div style='border:1px dotted #555;padding:6px;background-color:#EEF2F7;'>
<b style='font-size:12px;color:#AA0000'>Unregistered Invision Power Board</b>
<br />This copy of Invision Power Board is unregistered.
<br /><br />Why register? <a href='http://www.invisionboard.com/?whyregister' target='_blank'>click here</a> to find out!
<br />Go on, <a href='http://www.invisionboard.com/download.cgi?subc=register' target='_blank'> register today!</a> you know it makes sense!
</div>";
}
//---------------------------------
// Notepad
//---------------------------------
if ( $IN['save'] == 1 )
{
$DB->query("UPDATE ibf_cache_store SET cs_value='".addslashes($_POST['notes'])."' WHERE cs_key='adminnotes'");
}
$text = "You can use this section to keep notes for yourself and other admins, etc.";
$DB->query("SELECT * FROM ibf_cache_store WHERE cs_key='adminnotes'");
if ( ! $notes = $DB->fetch_row() )
{
$DB->query("INSERT INTO ibf_cache_store (cs_key,cs_value) VALUES ('adminnotes', '$text')");
$notes = array( 'cs_key' => 'adminnotes', 'cs_value' => $text );
}
$ad_notes = "<form action='{$ADMIN->base_url}&act=index&save=1' method='post'>
<textarea name='notes' style='background-color:#F9FFA2;border:1px solid #CCC;width:95%;font-family:verdana;font-size:10px' rows='7' cols='25'>".stripslashes($notes['cs_value'])."</textarea>
<div align='center'><input type='submit' value='Save Admin Notes' style='background-color:#F9FFA2;border:1px solid #999;;font-family:verdana;font-size:10px' /></div>
</form>";
//---------------------------------
// Printy-poos
//---------------------------------
$ADMIN->html .= "<table width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td width='49%' valign='middle' align='center' style='padding:6px;background-color:#FAFFAF;'>{$ad_notes}</td>
<td style='width:10px'>&nbsp;</td>
<td width='49%' valign='top' align='left'>{$version_info}<br /><br />{$reg_html}</td>
</tr>
</table><br />\n";
//---------------------------------
// Stats
//---------------------------------
$DB->query("SELECT * FROM ibf_stats");
@@ -41,12 +162,12 @@ class index_page {
if ($row['TOTAL_TOPICS'] < 0) $row['TOTAL_TOPICS'] = 0;
if ($row['MEM_COUNT'] < 0) $row['MEM_COUNT'] = 0;
$DB->query("SELECT COUNT(*) as reg FROM ibf_members WHERE mgroup='".$INFO['auth_group']."' AND (new_pass='' or new_pass IS NULL)");
$DB->query("SELECT COUNT(*) as reg FROM ibf_validating WHERE lost_pass <> 1");
$reg = $DB->fetch_row();
if ($reg['reg'] < 1 ) $reg['reg'] = 0;
$DB->query("SELECT COUNT(*) as coppa FROM ibf_members WHERE mgroup='".$INFO['auth_group']."' AND coppa_user=1");
$DB->query("SELECT COUNT(*) as coppa FROM ibf_validating WHERE coppa_user=1");
$coppa = $DB->fetch_row();
if ($coppa['coppa'] < 1 ) $coppa['coppa'] = 0;
@@ -86,21 +207,124 @@ class index_page {
}
//+-----------------------------------------------------------
// INSTALLER PRESENT?
//+-----------------------------------------------------------
$sm_install = 0;
$lock_file = 0;
if ( @file_exists( ROOT_PATH . 'sm_install.php' ) )
{
$sm_install = 1;
}
if ( @file_exists( ROOT_PATH . 'install.lock' ) )
{
$lock_file = 1;
}
if ( $sm_install == 1 )
{
if ( $lock_file != 1 )
{
$ADMIN->html .= "<div style='color:red;border:1px solid red;background:#FFC0C3;padding:10px'>
<span style='font-size:20px;font-weight:bold'>Warning: Unlocked Installer Still Present</span>
<br /><br /><span style='font-size:14px;'>Remove <b>sm_install.php</b> from your server at once!
<br />Leaving it on your server WILL compromise the security of your system.</span></div><br /><br />";
}
else
{
$ADMIN->html .= "<div style='color:red;border:1px solid red;background:#FFE1E2;padding:10px'>
<span style='font-size:14px;font-weight:bold'>Warning: Installer Still Present</span>
<br /><br /><span style='font-size:10px;'>Although the installer appears to be locked, we recommend you remove it
from your server for security.
<br />Simply remove <b>sm_install.php</b> from your installation to remove this message.</span></div><br /><br />";
}
}
//+-----------------------------------------------------------
// BOARD OFFLINE?
//+-----------------------------------------------------------
if ($INFO['board_offline'])
{
$SKIN->td_header[] = array( "&nbsp;", "100%" );
$ADMIN->html .= $SKIN->start_table( "Offline Notice" );
$ADMIN->html .= $SKIN->add_td_row( array( "Your board is currently offline<br><br>&raquo; <a href='{$ADMIN->base_url}&act=op&code=board'>Turn Board Online</a>"
) );
$ADMIN->html .= $SKIN->end_table();
$ADMIN->html .= $SKIN->add_td_spacer();
}
//+-----------------------------------------------------------
// ADMINS USING CP
//+-----------------------------------------------------------
$SKIN->td_header[] = array( "Name" , "20%" );
$SKIN->td_header[] = array( "IP Address" , "20%" );
$SKIN->td_header[] = array( "Log In" , "20%" );
$SKIN->td_header[] = array( "Last Click" , "20%" );
$SKIN->td_header[] = array( "Location" , "20%" );
$ADMIN->html .= $SKIN->start_table( "Administrators using the CP" );
$t_time = time() - 60*10;
$DB->query("SELECT DISTINCT(MEMBER_NAME) FROM ibf_admin_sessions WHERE RUNNING_TIME > $t_time");
$DB->query("SELECT MEMBER_NAME, LOCATION, LOG_IN_TIME, RUNNING_TIME, IP_ADDRESS FROM ibf_admin_sessions WHERE RUNNING_TIME > $t_time");
$mem_array = array();
$time_now = time();
$seen_name = array();
while ( $r = $DB->fetch_row() )
{
$mem_array[] = $r['MEMBER_NAME'];
if ( $seen_name[ $r['MEMBER_NAME'] ] == 1 )
{
continue;
}
else
{
$seen_name[ $r['MEMBER_NAME'] ] = 1;
}
$log_in = $time_now - $r['LOG_IN_TIME'];
$click = $time_now - $r['RUNNING_TIME'];
if ( ($log_in / 60) < 1 )
{
$log_in = sprintf("%0d", $log_in) . " seconds ago";
}
else
{
$log_in = sprintf("%0d", ($log_in / 60) ) . " minutes ago";
}
if ( ($click / 60) < 1 )
{
$click = sprintf("%0d", $click) . " seconds ago";
}
else
{
$click = sprintf("%0d", ($click / 60) ) . " minutes ago";
}
$ADMIN->html .= $SKIN->add_td_row( array (
$r['MEMBER_NAME'],
"<center><a href='javascript:alert(\"Host Name: ".@gethostbyaddr($r['IP_ADDRESS'])."\")' title='Get host name'>".$r['IP_ADDRESS']."</a></center>",
"<center>".$log_in."</center>",
"<center>".$click."</center>",
"<center>".$r['LOCATION']."</center>",
) );
}
$ADMIN->html .= $SKIN->add_td_basic( implode(", ", $mem_array ) );
$ADMIN->html .= $SKIN->end_table();
@@ -110,6 +334,83 @@ class index_page {
//+-----------------------------------------------------------
if ($MEMBER['mgroup'] == $INFO['admin_group'])
{
//+-----------------------------------------------------------
// LAST 5 Admin Actions
//+-----------------------------------------------------------
$SKIN->td_header[] = array( "Member Name" , "20%" );
$SKIN->td_header[] = array( "Action Performed" , "40%" );
$SKIN->td_header[] = array( "Time of action" , "20%" );
$SKIN->td_header[] = array( "IP address" , "20%" );
$ADMIN->html .= $SKIN->start_table( "Last 5 Admin Actions" );
$DB->query("SELECT m.*, mem.id, mem.name FROM ibf_admin_logs m, ibf_members mem
WHERE m.member_id=mem.id ORDER BY m.ctime DESC LIMIT 0, 5");
if ( $DB->get_num_rows() )
{
while ( $rowb = $DB->fetch_row() )
{
$rowb['ctime'] = $ADMIN->get_date( $rowb['ctime'] );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$rowb['name']}</b>",
"{$rowb['note']}",
"{$rowb['ctime']}",
"{$rowb['ip_address']}",
) );
}
}
else
{
$ADMIN->html .= $SKIN->add_td_basic("<center>No results</center>");
}
$ADMIN->html .= $SKIN->end_table();
//+-----------------------------------------------------------
$ADMIN->html .= $SKIN->add_td_spacer();
}
//+-----------------------------------------------------------
// Bots stuff
//+-----------------------------------------------------------
if ( $INFO['spider_sense'] )
{
$SKIN->td_header[] = array( "Search Bot" , "20%" );
$SKIN->td_header[] = array( "Date" , "25%" );
$SKIN->td_header[] = array( "Query" , "20%" );
$SKIN->td_header[] = array( "Query" , "35%" );
$ADMIN->html .= $SKIN->start_table( "Last 10 Search Engine Spiders Hits" );
$DB->query("SELECT * FROM ibf_spider_logs ORDER BY entry_date DESC LIMIT 0,10");
while ( $r = $DB->fetch_row() )
{
$ADMIN->html .= $SKIN->add_td_row( array( "<strong>".$INFO[ 'sp_'.$r['bot'] ]."</strong>",
$ADMIN->get_date( $r['entry_date'], 'SHORT' ),
$r['ip_address'].'&nbsp;',
$r['query_string'].'&nbsp;'
) );
}
$ADMIN->html .= $SKIN->end_table();
$ADMIN->html .= $SKIN->add_td_spacer();
}
//+-----------------------------------------------------------
$SKIN->td_header[] = array( "Definition", "25%" );
$SKIN->td_header[] = array( "Value" , "25%" );
$SKIN->td_header[] = array( "Definition", "25%" );
@@ -149,28 +450,28 @@ class index_page {
<!--
function edit_member() {
if (document.forms[0].username.value == \"\") {
if (document.forms[1].username.value == \"\") {
alert(\"You must enter a username!\");
} else {
window.parent.body.location = '{$SKIN->base_url}' + '&act=mem&code=stepone&USER_NAME=' + escape(document.forms[0].username.value);
window.parent.body.location = '{$SKIN->base_url}' + '&act=mem&code=stepone&USER_NAME=' + escape(document.forms[1].username.value);
}
}
function new_cat() {
if (document.forms[0].cat_name.value == \"\") {
if (document.forms[1].cat_name.value == \"\") {
alert(\"You must enter a category name!\");
} else {
window.parent.body.location = '{$SKIN->base_url}' + '&act=cat&code=new&name=' + escape(document.forms[0].cat_name.value);
window.parent.body.location = '{$SKIN->base_url}' + '&act=cat&code=new&name=' + escape(document.forms[1].cat_name.value);
}
}
function new_forum() {
if (document.forms[0].forum_name.value == \"\") {
if (document.forms[1].forum_name.value == \"\") {
alert(\"You must enter a forum name!\");
} else {
window.parent.body.location = '{$SKIN->base_url}' + '&act=forum&code=new&name=' + escape(document.forms[0].forum_name.value);
window.parent.body.location = '{$SKIN->base_url}' + '&act=forum&code=new&name=' + escape(document.forms[1].forum_name.value);
}
}
//-->
+33 -15
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > IPS Remote Call thingy
@@ -22,8 +24,11 @@
*/
// Ensure we've not accessed this script directly:
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_ips();
@@ -40,7 +45,20 @@ class ad_ips {
var $version = "1.1";
function ad_ips() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -82,7 +100,7 @@ class ad_ips {
function news()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
@header("Location: ".$this->url."?news");
exit();
@@ -90,7 +108,7 @@ class ad_ips {
function updates()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//@header("Location: ".$this->url."?updates&version=".$this->version);
@header("Location: ".$this->url."?updates");
@@ -99,7 +117,7 @@ class ad_ips {
function docs()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
@header("Location: ".$this->url."?docs");
exit();
@@ -107,7 +125,7 @@ class ad_ips {
function support()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
@header("Location: ".$this->url."?support");
exit();
@@ -115,7 +133,7 @@ class ad_ips {
function host()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
@header("Location: ".$this->url."?host");
exit();
@@ -123,7 +141,7 @@ class ad_ips {
function purchase()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
@header("Location: ".$this->url."?purchase");
exit();
+67 -28
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Language functions
@@ -21,6 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_langs();
@@ -30,7 +37,20 @@ class ad_langs {
var $base_url;
function ad_langs() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -92,7 +112,7 @@ class ad_langs {
function make_default()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
$new_dir = stripslashes(urldecode(trim($HTTP_GET_VARS['id'])));
@@ -119,14 +139,14 @@ class ad_langs {
function doimport()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['tarball'] == "")
{
$ADMIN->error("You did not select a tar-chive to import!");
}
require $root_dir."sources/lib/tar.php";
require ROOT_PATH."sources/lib/tar.php";
$to_dir = $INFO['base_dir']."lang";
@@ -218,7 +238,7 @@ class ad_langs {
function import()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_detail = "The tar-chive that you wish to import must reside in 'archive_in' and be a valid tar-chive uploaded in binary format.";
$ADMIN->page_title = "Language Pack Import";
@@ -269,7 +289,7 @@ class ad_langs {
function export()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -290,7 +310,7 @@ class ad_langs {
$archive_dir = $INFO['base_dir']."/archive_out";
$lang_dir = $INFO['base_dir']."/lang/".$row['ldir'];
require $root_dir."sources/lib/tar.php";
require ROOT_PATH."sources/lib/tar.php";
if (!is_dir($archive_dir))
{
@@ -359,7 +379,7 @@ class ad_langs {
function show_file()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -400,7 +420,8 @@ class ad_langs {
if ($IN['lang_file'] == 'email_content.php')
{
$lang = $EMAIL;
$lang = $EMAIL;
$is_email = 1;
}
if ( ! is_writeable($lang_file) )
@@ -450,10 +471,19 @@ class ad_langs {
$rows = 15;
$cols = 70;
if ( isset($SUBJECT[ $k ]) )
{
$subj = "Subject: &nbsp;".$SKIN->form_input('SS_'.$k, $SUBJECT[ $k ] )."<br />";
}
else
{
$subj = "";
}
$ADMIN->html .= $SKIN->add_td_row( array(
"&lt;ibf.lang.<b>".$k."</b>&gt;",
$SKIN->form_textarea('XX_'.$k, $v, $cols, $rows),
$subj.$SKIN->form_textarea('XX_'.$k, $v, $cols, $rows),
) );
}
else
@@ -486,7 +516,7 @@ class ad_langs {
function edit_info()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['id'] == "")
{
@@ -525,7 +555,7 @@ class ad_langs {
function add_language()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['id'] == "")
{
@@ -546,14 +576,14 @@ class ad_langs {
//-------------------------------------
if ( ! is_writeable($root_path.'lang') )
if ( ! is_writeable(ROOT_PATH.'lang') )
{
$ADMIN->error("The directory 'lang' is not writeable by this script. Please check the permissions on that directory. CHMOD to 0777 if in doubt and try again");
}
//-------------------------------------
if ( ! is_dir($root_path.'lang/'.$row['ldir']) )
if ( ! is_dir(ROOT_PATH.'lang/'.$row['ldir']) )
{
$ADMIN->error("Could not locate the original language set to copy, please check and try again");
}
@@ -611,7 +641,7 @@ class ad_langs {
function remove()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
@@ -645,6 +675,8 @@ class ad_langs {
$ADMIN->error("You cannot remove this language pack while it is the default language directory. Please select another pack to be the default and try again");
}
$DB->query("UPDATE ibf_members SET language='{$INFO['default_language']}' WHERE language='{$row['ldir']}'");
if ( $ADMIN->rm_dir( $INFO['base_dir']."lang/".$row['ldir'] ) )
{
@@ -667,7 +699,7 @@ class ad_langs {
function save_langfile()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
@@ -688,7 +720,7 @@ class ad_langs {
$ADMIN->error("Could not query the language information from the database");
}
$lang_file = $root_path."lang/".$row['ldir']."/".$IN['lang_file'];
$lang_file = ROOT_PATH."lang/".$row['ldir']."/".$IN['lang_file'];
if (! file_exists( $lang_file ) )
{
@@ -731,6 +763,11 @@ class ad_langs {
foreach($barney as $key => $text)
{
$text = preg_replace("/n{1,}$/", "", $text);
if ( $IN['SS_'.$key] != "" )
{
$start .= "\n".'$SUBJECT['."'$key'".'] = "'.str_replace( '"', "&quot;", stripslashes($HTTP_POST_VARS['SS_'.$key]) )."\";\n";
}
$start .= "\n".'$EMAIL['."'$key'".'] = <<<EOF'."\n".$text."\nEOF;\n";
}
}
@@ -766,7 +803,7 @@ class ad_langs {
function do_form( $method='add', $id="" )
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//+-------------------------------
@@ -926,7 +963,7 @@ class ad_langs {
function list_current()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($INFO['default_language'] == "")
{
@@ -946,6 +983,8 @@ class ad_langs {
$used_ids = array();
$show_array = array();
$ADMIN->html .= $SKIN->js_checkdelete();
if ( $DB->get_num_rows() )
{
@@ -980,7 +1019,7 @@ class ad_langs {
"<center>{$r['mcount']}</center>",
"<center><a href='".$SKIN->base_url."&act=lang&code=export&id={$r['lid']}'>Export</a></center>",
"<center><a href='".$SKIN->base_url."&act=lang&code=edit&id={$r['lid']}'>Edit</a></center>",
"<i>Deallocate before removing</i>",
"<center><a href='javascript:checkdelete(\"act=lang&code=remove&id={$r['lid']}\")'>Remove</a></center>",
) );
$used_ids[] = $r['lid'];
@@ -1008,7 +1047,7 @@ class ad_langs {
$ADMIN->html .= $SKIN->start_table( "Current Unallocated Language Packs" );
$ADMIN->html .= $SKIN->js_checkdelete();
while ( $r = $DB->fetch_row() )
{
File diff suppressed because it is too large. Load diff
+524
View File
@@ -0,0 +1,524 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Admin Member Tool functions
| > Module written by Matt Mecham
| > Date started: 17th September 2003
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_member_tools();
$root_path = "";
class ad_member_tools {
var $base_url;
var $modules = "";
function ad_member_tools()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $ibforums;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
$ADMIN->nav[] = array( 'act=mtools', 'Member Tools Home' );
//---------------------------------------
$ADMIN->page_title = "Member Tool Box";
$ADMIN->page_detail = 'You can use the tools below to search for IP address.';
switch($IN['code'])
{
case 'showallips':
$this->show_ips();
break;
case 'learnip':
$this->learn_ip();
break;
//---------------------
default:
$this->show_index();
break;
}
}
//+---------------------------------------------------------------------------------
//
// LEARN ABOUT THE IP. It's very good.
//
//+---------------------------------------------------------------------------------
function learn_ip()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ( $IN['ip'] == "" )
{
$this->show_index("You did not enter an IP address to search by");
}
$ip = $IN['ip'];
$resolved = 'N/A - Partial IP Address';
$exact = 0;
if ( substr_count( $ip, '.' ) == 3 )
{
$exact = 1;
}
if ( strstr( $ip, '*' ) )
{
$exact = 0;
$ip = str_replace( "*", "", $ip );
}
if ( $exact != 0 )
{
$resolved = gethostbyaddr($ip);
$query = "='".$ip."'";
}
else
{
$query = " LIKE '".$ip."%'";
}
//+-------------------------------
$SKIN->td_header[] = array( "&nbsp;" , "40%" );
$SKIN->td_header[] = array( "&nbsp;" , "60%" );
//+-------------------------------
$ADMIN->html .= $SKIN->start_table( "Host Address for {$IN['ip']}" );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>IP address resolves to</b>" ,
$resolved
) );
$ADMIN->html .= $SKIN->end_table();
//+--------------------------------------------------
// Find registered members
//+--------------------------------------------------
$SKIN->td_header[] = array( "Name" , "30%" );
$SKIN->td_header[] = array( "Email" , "20%" );
$SKIN->td_header[] = array( "Posts" , "10%" );
$SKIN->td_header[] = array( "IP" , "20%" );
$SKIN->td_header[] = array( "Registered" , "20%" );
$ADMIN->html .= $SKIN->start_table( "Members using that IP when REGISTERING" );
$DB->query("SELECT id, name, email, posts, ip_address, joined FROM ibf_members WHERE ip_address{$query} ORDER BY joined DESC LIMIT 250");
if ( ! $DB->get_num_rows() )
{
$ADMIN->html .= $SKIN->add_td_basic( "No Matches Found", "center");
}
else
{
while ( $m = $DB->fetch_row() )
{
$ADMIN->html .= $SKIN->add_td_row( array( $m['name'] ,
$m['email'],
$m['posts'],
$m['ip_address'],
$std->get_date( $m['joined'], 'SHORT' )
) );
}
}
$ADMIN->html .= $SKIN->end_table();
//+--------------------------------------------------
// Find Names posted under
//+--------------------------------------------------
$SKIN->td_header[] = array( "Name" , "20%" );
$SKIN->td_header[] = array( "Email" , "20%" );
$SKIN->td_header[] = array( "IP" , "15%" );
$SKIN->td_header[] = array( "First Used" , "20%" );
$SKIN->td_header[] = array( "View Post" , "15%" );
$ADMIN->html .= $SKIN->start_table( "Members using that IP when POSTING" );
$DB->query("SELECT m.id, m.name, m.email, m.posts, m.joined, p.pid, p.author_id, p.post_date, p.ip_address, p.topic_id
FROM ibf_posts p
LEFT JOIN ibf_members m ON ( p.author_id=m.id)
WHERE p.ip_address{$query} GROUP BY p.author_id ORDER BY p.post_date DESC LIMIT 250");
if ( ! $DB->get_num_rows() )
{
$ADMIN->html .= $SKIN->add_td_basic( "No Matches Found", "center");
}
else
{
while ( $m = $DB->fetch_row() )
{
$ADMIN->html .= $SKIN->add_td_row( array( $m['name'] ,
$m['email'],
$m['ip_address'],
$std->get_date( $m['post_date'], 'SHORT' ),
"<center><a href='index.php?showtopic={$m['topic_id']}&view=findpost&p={$m['pid']}' target='_blank'>View Post</a></center>",
) );
}
}
$ADMIN->html .= $SKIN->end_table();
//+--------------------------------------------------
// Find Names VOTED under
//+--------------------------------------------------
$SKIN->td_header[] = array( "Name" , "20%" );
$SKIN->td_header[] = array( "Email" , "20%" );
$SKIN->td_header[] = array( "IP" , "15%" );
$SKIN->td_header[] = array( "First Used" , "20%" );
$SKIN->td_header[] = array( "View Poll" , "15%" );
$ADMIN->html .= $SKIN->start_table( "Members using that IP when VOTING" );
$DB->query("SELECT m.id, m.name, m.email, m.posts, m.joined, p.vote_date, p.ip_address, p.tid
FROM ibf_voters p
LEFT JOIN ibf_members m ON ( p.member_id=m.id)
WHERE p.ip_address{$query} GROUP BY p.member_id ORDER BY p.vote_date DESC LIMIT 250");
if ( ! $DB->get_num_rows() )
{
$ADMIN->html .= $SKIN->add_td_basic( "No Matches Found", "center");
}
else
{
while ( $m = $DB->fetch_row() )
{
$ADMIN->html .= $SKIN->add_td_row( array( $m['name'] ,
$m['email'],
$m['ip_address'],
$std->get_date( $m['vote_date'], 'SHORT' ),
"<center><a href='index.php?showtopic={$m['tid']}' target='_blank'>View Poll</a></center>",
) );
}
}
$ADMIN->html .= $SKIN->end_table();
//+--------------------------------------------------
// Find Names EMAILING under
//+--------------------------------------------------
$SKIN->td_header[] = array( "Name" , "20%" );
$SKIN->td_header[] = array( "Email" , "20%" );
$SKIN->td_header[] = array( "IP" , "15%" );
$SKIN->td_header[] = array( "First Used" , "20%" );
$ADMIN->html .= $SKIN->start_table( "Members using that IP when EMAILING other members" );
$DB->query("SELECT m.id, m.name, m.email, m.posts, m.joined, p.email_date, p.from_ip_address
FROM ibf_email_logs p
LEFT JOIN ibf_members m ON ( p.from_member_id=m.id)
WHERE p.from_ip_address{$query} GROUP BY p.from_member_id ORDER BY p.email_date DESC LIMIT 250");
if ( ! $DB->get_num_rows() )
{
$ADMIN->html .= $SKIN->add_td_basic( "No Matches Found", "center");
}
else
{
while ( $m = $DB->fetch_row() )
{
$ADMIN->html .= $SKIN->add_td_row( array( $m['name'] ,
$m['email'],
$m['from_ip_address'],
$std->get_date( $m['email_date'], 'SHORT' ),
) );
}
}
$ADMIN->html .= $SKIN->end_table();
//+--------------------------------------------------
// Find Names VALIDATING under
//+--------------------------------------------------
$SKIN->td_header[] = array( "Name" , "20%" );
$SKIN->td_header[] = array( "Email" , "20%" );
$SKIN->td_header[] = array( "IP" , "15%" );
$SKIN->td_header[] = array( "First Used" , "20%" );
$ADMIN->html .= $SKIN->start_table( "Members using that IP while VALIDATING their accounts" );
$DB->query("SELECT m.id, m.name, m.email, m.posts, m.joined, p.entry_date, p.ip_address
FROM ibf_validating p
LEFT JOIN ibf_members m ON ( p.member_id=m.id)
WHERE p.ip_address{$query} GROUP BY p.member_id ORDER BY p.entry_date DESC LIMIT 250");
if ( ! $DB->get_num_rows() )
{
$ADMIN->html .= $SKIN->add_td_basic( "No Matches Found", "center");
}
else
{
while ( $m = $DB->fetch_row() )
{
$ADMIN->html .= $SKIN->add_td_row( array( $m['name'] ,
$m['email'],
$m['ip_address'],
$std->get_date( $m['entry_date'], 'SHORT' ),
) );
}
}
$ADMIN->html .= $SKIN->end_table();
$ADMIN->output();
}
//+---------------------------------------------------------------------------------
//
// SHOW ALL IPs
//
//+---------------------------------------------------------------------------------
function show_ips()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ( $IN['name'] == "" and $IN['member_id'] == "" )
{
$this->show_index("You did not enter a name to search by");
}
if ( $IN['member_id'] )
{
$id = intval($IN['member_id']);
$DB->query("SELECT id, name, email, ip_address FROM ibf_members WHERE id=$id");
if ( ! $member = $DB->fetch_row() )
{
$this->show_index("Could not locate a member with the id of '$id'");
}
}
else
{
$name = addslashes($IN['name']);
$DB->query("SELECT id, name, email, ip_address FROM ibf_members WHERE name='$name'");
if ( ! $member = $DB->fetch_row() )
{
$this->show_index( "We could not find an exact match for that member name, some choices will be shown below", $name );
}
}
$DB->query("SELECT count(distinct(ip_address)) as cnt FROM ibf_posts WHERE author_id={$member['id']}");
$count = $DB->fetch_row();
$st = intval($IN['st']);
$end = 50;
$links = $std->build_pagelinks( array( 'TOTAL_POSS' => $count['cnt'],
'PER_PAGE' => $end,
'CUR_ST_VAL' => $st,
'L_SINGLE' => "Single Page",
'L_MULTI' => "Multiple Pages",
'BASE_URL' => $SKIN->base_url."&act=mtools&code=showallips&member_id={$member['id']}",
) );
$master = array();
$ips = array();
$DB->query("SELECT count(ip_address) as ip, ip_address, pid, topic_id, post_date FROM ibf_posts WHERE author_id={$member['id']} GROUP BY ip_address ORDER BY ip DESC LIMIT $st, $end");
while ( $r = $DB->fetch_row() )
{
$master[] = $r;
$ips[] = '"'.$r['ip_address'].'"';
}
$reg = array();
if ( count($ips) > 0 )
{
$DB->query("SELECT id, name, ip_address FROM ibf_members WHERE ip_address IN (".implode(",",$ips).") AND id != {$member['id']}");
while ( $i = $DB->fetch_row() )
{
$reg[ $i['ip_address'] ][] = $i;
}
}
//+-------------------------------
$SKIN->td_header[] = array( "IP Address" , "20%" );
$SKIN->td_header[] = array( "Times Used" , "10%" );
$SKIN->td_header[] = array( "Date Used" , "25%" );
$SKIN->td_header[] = array( "Used for other Reg." , "20%" );
$SKIN->td_header[] = array( "IP Tool" , "25%" );
//+-------------------------------
$ADMIN->html .= $SKIN->start_table( "{$member['name']}'s IP addresses ({$count['cnt']}) matches" );
foreach( $master as $idx => $r )
{
$ADMIN->html .= $SKIN->add_td_row( array( $r['ip_address'] ,
$r['ip'] ,
$std->get_date( $r['post_date'], 'SHORT' ),
"<center>". intval( count($reg[ $r['ip_address'] ]) ). "</center>",
"<center><a href='{$ADMIN->base_url}&act=mtools&code=learnip&ip={$r['ip_address']}'>Learn about this IP</a></center>"
) );
}
$ADMIN->html .= $SKIN->add_td_basic( "$links", "center", "catrow2");
$ADMIN->html .= $SKIN->end_table();
$ADMIN->output();
}
//+---------------------------------------------------------------------------------
//
// Default Screen
//
//+---------------------------------------------------------------------------------
function show_index($msg="", $membername="")
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($msg != "")
{
$SKIN->td_header[] = array( "&nbsp;" , "100%" );
$ADMIN->html .= $SKIN->start_table( "Message" );
$ADMIN->html .= $SKIN->add_td_row( array( $msg ) );
$ADMIN->html .= $SKIN->end_table();
}
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'showallips' ),
2 => array( 'act' , 'mtools' ),
) );
//+-------------------------------
$SKIN->td_header[] = array( "&nbsp;" , "40%" );
$SKIN->td_header[] = array( "&nbsp;" , "60%" );
//+-------------------------------
$ADMIN->html .= $SKIN->start_table( "Show all IP Addresses a member has posted with" );
if ( $membername == "" )
{
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Enter the member's name</b>" ,
$SKIN->form_input( "name", $std->txt_stripslashes($HTTP_POST_VARS['name']) )
) );
}
else
{
$DB->query("SELECT id, name FROM ibf_members WHERE lower(name) LIKE '{$membername}%'");
if ( ! $DB->get_num_rows() )
{
$this->show_index("There are no members with names that start with '$membername'");
}
$mem_array = array();
while ( $m = $DB->fetch_row() )
{
$mem_array[] = array( $m['id'], $m['name'] );
}
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Choose the member from the selection</b>" ,
$SKIN->form_dropdown( "member_id", $mem_array )
) );
}
$ADMIN->html .= $SKIN->end_form("Get IP Addresses");
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'learnip' ),
2 => array( 'act' , 'mtools' ),
) );
$SKIN->td_header[] = array( "&nbsp;" , "40%" );
$SKIN->td_header[] = array( "&nbsp;" , "60%" );
//+-------------------------------
$ADMIN->html .= $SKIN->start_table( "IP Multi-Tool" );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Show me everything you know about this IP...</b>" ,
$SKIN->form_input( "ip", $std->txt_stripslashes($HTTP_POST_VARS['ip']) )
) );
$ADMIN->html .= $SKIN->end_form("Show me!");
$ADMIN->html .= $SKIN->end_table();
$ADMIN->output();
}
}
?>
+100 -52
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Admin Category functions
@@ -21,7 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_mod();
@@ -31,7 +37,20 @@ class ad_mod {
var $base_url;
function ad_mod() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -75,19 +94,28 @@ class ad_mod {
function do_delete()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['mid'] == "")
{
$ADMIN->error("You did not choose a valid moderator ID");
}
$DB->query("SELECT member_name FROM ibf_moderators WHERE mid='".$IN['mid']."'");
$DB->query("SELECT * FROM ibf_moderators WHERE mid='".$IN['mid']."'");
$mod = $DB->fetch_row();
if ( $mod['is_group'] )
{
$name = 'Group: '.$mod['group_name'];
}
else
{
$name = $mod['member_name'];
}
$DB->query("DELETE FROM ibf_moderators WHERE mid='".$IN['mid']."'");
$ADMIN->save_log("Removed Moderator '{$mod['member_name']}'");
$ADMIN->save_log("Removed Moderator '{$name}'");
$ADMIN->done_screen("Moderator Removed", "Moderator Control", "act=mod" );
@@ -102,7 +130,7 @@ class ad_mod {
function do_edit()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['mid'] == "")
{
@@ -134,7 +162,8 @@ class ad_mod {
'topic_q' => $IN['topic_q'],
'allow_warn' => $IN['allow_warn'],
'split_merge' => $IN['split_merge'],
'edit_user' => $IN['edit_user']
'edit_user' => $IN['edit_user'],
'can_mm' => $IN['can_mm'],
);
@@ -157,7 +186,7 @@ class ad_mod {
function add_mod()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['fid'] == "")
{
@@ -185,9 +214,21 @@ class ad_mod {
'topic_q' => $IN['topic_q'],
'allow_warn' => $IN['allow_warn'],
'split_merge' => $IN['split_merge'],
'edit_user' => $IN['edit_user']
'edit_user' => $IN['edit_user'],
'can_mm' => $IN['can_mm'],
);
$forum_ids = array();
$DB->query("SELECT id FROM ibf_forums WHERE id IN(".$IN['fid'].")");
while( $i = $DB->fetch_row() )
{
$forum_ids[ $i['id'] ] = $i['id'];
}
//---------------------------------------
if ($IN['mod_type'] == 'group')
{
@@ -203,6 +244,17 @@ class ad_mod {
$ADMIN->error("We could not match that group ID");
}
//---------------------------------------
// Already using this group on this forum?
//---------------------------------------
$DB->query("SELECT * FROM ibf_moderators WHERE forum_id IN(".$IN['fid'].") and group_id={$IN['gid']}");
while( $f = $DB->fetch_row() )
{
unset($forum_ids[ $f['forum_id'] ]);
}
$mr_hash['member_name'] = '-1';
$mr_hash['member_id'] = '-1';
$mr_hash['group_id'] = $group['g_id'];
@@ -227,6 +279,17 @@ class ad_mod {
$ADMIN->error("Could not match that member name so there.");
}
//---------------------------------------
// Already using this member on this forum?
//---------------------------------------
$DB->query("SELECT * FROM ibf_moderators WHERE forum_id IN(".$IN['fid'].") and member_id={$IN['mem']}");
while( $f = $DB->fetch_row() )
{
unset($forum_ids[ $f['forum_id'] ]);
}
$mr_hash['member_name'] = $mem['name'];
$mr_hash['member_id'] = $mem['id'];
$mr_hash['is_group'] = 0;
@@ -239,22 +302,11 @@ class ad_mod {
// Check for legal forums
//--------------------------------------
$forum_ids = array();
$DB->query("SELECT id FROM ibf_forums WHERE id IN(".$IN['fid'].")");
while( $i = $DB->fetch_row() )
{
$forum_ids[] = $i['id'];
}
if ( count($forum_ids) == 0)
{
$ADMIN->error("We could not match any forums with those IDS");
$ADMIN->error("You did not select any forums that do not have this group or member already moderating.");
}
//--------------------------------------
// Loopy loopy
//--------------------------------------
@@ -281,7 +333,7 @@ class ad_mod {
//+---------------------------------------------------------------------------------
function mod_form( $type='add' ) {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$group = array();
@@ -509,7 +561,11 @@ class ad_mod {
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Can edit user avatars and signatures?</b>" ,
$SKIN->form_yes_no("edit_user", $mod['edit_user'] )
) );
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Can use topic multi-moderation?</b><br>".$SKIN->js_help_link('mod_mmod', 'Important Information' ) ,
$SKIN->form_yes_no("can_mm", $mod['can_mm'] )
) );
//+-------------------------------
@@ -530,7 +586,7 @@ class ad_mod {
//+---------------------------------------------------------------------------------
function add_one() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//-----------------------------
// Grab and serialize the input
@@ -628,7 +684,7 @@ class ad_mod {
//+---------------------------------------------------------------------------------
function add_two() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
// Are we adding a group as a mod? If so, bounce straight to the mod perms form
@@ -703,7 +759,7 @@ class ad_mod {
//+---------------------------------------------------------------------------------
function show_list() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_title = "Moderator Control Overview";
$ADMIN->page_detail = "This section allows you to edit, remove and add new moderators to your forums";
@@ -712,11 +768,9 @@ class ad_mod {
2 => array( 'act' , 'mod' ),
) );
$SKIN->td_header[] = array( "Add" , "5%" );
$SKIN->td_header[] = array( "Forum Name" , "30%" );
$SKIN->td_header[] = array( "Posts" , "10%" );
$SKIN->td_header[] = array( "Topics" , "10%" );
$SKIN->td_header[] = array( "Current Moderators" , "45%" );
$SKIN->td_header[] = array( "Add" , "5%" );
$SKIN->td_header[] = array( "Forum Name" , "40%" );
$SKIN->td_header[] = array( "Current Moderators" , "55%" );
$ADMIN->html .= $SKIN->start_table( "Your Categories and Forums" );
@@ -765,9 +819,7 @@ class ad_mod {
'&nbsp;',
"<a href='{$ADMIN->base_url}&act=cat&code=doeditform&c={$c['id']}'>".$c['name']."</a>",
'&nbsp;',
'&nbsp;',
'&nbsp;',
), 'catrow' );
), 'pformstrip' );
$last_cat_id = $c['id'];
@@ -811,26 +863,24 @@ class ad_mod {
$these_mods = "<center><i>Unmoderated</i></center>";
}
if ($r['subwrap'] == 1)
if ($r['subwrap'] == 1 and $r['sub_can_post'] != 1)
{
$ADMIN->html .= $SKIN->add_td_row( array(
'&nbsp;',
$c['name'],
" - <b>".$r['name']."</b>",
'&nbsp;',
'&nbsp;',
'&nbsp;',
), 'catrow2' );
), 'subforum' );
}
else
{
$css = $r['subwrap'] == 1 ? 'subforum' : '';
$ADMIN->html .= $SKIN->add_td_row( array(
"<center><input type='checkbox' name='add_{$r['id']}' value='1'></center>",
"<b>".$r['name']."</b><br>".$r['description'],
$r['posts'],
$r['topics'],
"<b>".$r['name']."</b>",
$these_mods
) );
) , $css );
}
if ( ( isset($children[ $r['id'] ]) ) and ( count ($children[ $r['id'] ]) > 0 ) )
@@ -874,9 +924,7 @@ class ad_mod {
$ADMIN->html .= $SKIN->add_td_row( array(
"<center><input type='checkbox' name='add_{$rd['id']}' value='1'></center>",
"<b>".$rd['name']."</b><br>".$rd['description'],
$rd['posts'],
$rd['topics'],
" +-- <b>".$rd['name']."</b>",
$these_mods
) ,'subforum' );
}
+97 -19
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Import functions
@@ -22,8 +24,11 @@
*/
// Ensure we've not accessed this script directly:
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_modlogs();
@@ -34,7 +39,20 @@ class ad_modlogs {
var $base_url;
function ad_modlogs() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -62,7 +80,7 @@ class ad_modlogs {
function view()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$start = $IN['st'] ? $IN['st'] : 0;
@@ -78,7 +96,9 @@ class ad_modlogs {
$query = "&act=modlog&mid={$IN['mid']}&code=view";
$DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m, ibf_forums f WHERE m.member_id='".$IN['mid']."' AND f.id=m.forum_id ORDER BY m.ctime DESC LIMIT $start, 20");
$DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m
LEFT JOIN ibf_forums f ON(f.id=m.forum_id)
WHERE m.member_id='".$IN['mid']."' ORDER BY m.ctime DESC LIMIT $start, 20");
}
else
@@ -101,9 +121,9 @@ class ad_modlogs {
$query = "&act=modlog&code=view&search_type={$IN['search_type']}&search_string=".urlencode($IN['search_string']);
$DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m, ibf_forums f WHERE $dbq AND f.id=m.forum_id ORDER BY m.ctime DESC LIMIT $start, 20");
$DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m
LEFT JOIN ibf_forums f ON(f.id=m.forum_id)
WHERE $dbq ORDER BY m.ctime DESC LIMIT $start, 20");
}
@@ -136,15 +156,20 @@ class ad_modlogs {
while ( $row = $DB->fetch_row() )
{
$row['ctime'] = $std->get_date( $row['ctime'], 'LONG' );
$row['ctime'] = $ADMIN->get_date( $row['ctime'], 'LONG' );
if ( $row['topic_id'] )
{
$topicid = "<br />Topic ID: ".$row['topic_id'];
}
$sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] );
$row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$row['member_name']}</b>",
"<span style='font-weight:bold;color:red'><a href='#' onClick=\"alert('HTTP REFERRER OF ACTION:\\n{$row['http_referer']}\\nSESSION ID OF ACTION:\\n$sess_id')\">{$row['action']}</a></span>",
"<span style='font-weight:bold;color:red'>{$row['action']}</span>",
"<b>{$row['name']}</b>",
"{$row['topic_title']}",
"{$row['topic_title']}".$topicid,
"{$row['ctime']}",
"{$row['ip_address']}",
) );
@@ -175,7 +200,7 @@ class ad_modlogs {
function remove()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['mid'] == "")
{
@@ -202,12 +227,65 @@ class ad_modlogs {
function list_current()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
$ADMIN->page_detail = "You may view and remove actions performed by your moderators";
$ADMIN->page_title = "Moderator Logs Manager";
//+-------------------------------
// VIEW LAST 5
//+-------------------------------
$DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m
LEFT JOIN ibf_forums f ON (f.id=m.forum_id)
ORDER BY m.ctime DESC LIMIT 0, 5");
$SKIN->td_header[] = array( "Member Name" , "15%" );
$SKIN->td_header[] = array( "Action Perfomed" , "15%" );
$SKIN->td_header[] = array( "Forum" , "15%" );
$SKIN->td_header[] = array( "Topic Title" , "25%" );
$SKIN->td_header[] = array( "Time of action" , "20%" );
$SKIN->td_header[] = array( "IP address" , "10%" );
$ADMIN->html .= $SKIN->start_table( "Last 5 Moderation Actions" );
if ( $DB->get_num_rows() )
{
while ( $row = $DB->fetch_row() )
{
$row['ctime'] = $ADMIN->get_date( $row['ctime'], 'LONG' );
$topicid = "";
if ( $row['topic_id'] )
{
$topicid = "<br />Topic ID: ".$row['topic_id'];
}
$sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] );
$row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$row['member_name']}</b>",
"<span style='font-weight:bold;color:red'>{$row['action']}</span>",
"<b>{$row['name']}</b>",
"{$row['topic_title']}".$topicid,
"{$row['ctime']}",
"{$row['ip_address']}",
) );
}
}
else
{
$ADMIN->html .= $SKIN->add_td_basic("<center>No results</center>");
}
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
+684
View File
@@ -0,0 +1,684 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Topic Multi-Moderation
| > Module written by Matt Mecham
| > Date started: 14th May 2003
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_multimod();
class ad_multimod
{
var $base_url;
function ad_multimod()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
$ADMIN->nav[] = array( 'act=multimod', 'Topic multi-moderation home' );
switch($IN['code'])
{
case 'list':
$this->list_current();
break;
case 'new':
$this->do_form('new');
break;
case 'edit':
$this->do_form('edit');
break;
case 'donew':
$this->do_save('new');
break;
case 'doedit':
$this->do_save('edit');
break;
case 'delete':
$this->do_delete();
break;
//-------------------------
default:
$this->list_current();
break;
}
}
//-------------------------------------------------------------
// DELETE!
//-------------------------------------------------------------
function do_delete()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
$ADMIN->error("Could not resolve the MMOD ID, please try again");
}
$DB->query("DELETE FROM ibf_topic_mmod WHERE mm_id='".$IN['id']."'");
$mm_id = intval($IN['id']);
//------------------------------------
// Remove the MMOD from relevant forums
//------------------------------------
$final = array();
$DB->query("SELECT id,name,topic_mm_id FROM ibf_forums WHERE topic_mm_id LIKE '%,$mm_id,%'");
while( $r = $DB->fetch_row() )
{
$final[ $r['id'] ] = str_replace( ",$mm_id,", ",", $r['topic_mm_id'] );
}
// now lets update the affected forum_id's.
if ( count( $final ) > 0 )
{
foreach( $final as $fid => $raw_mm_id )
{
$new_mm_id = "," . $std->clean_perm_string($raw_mm_id) . ",";
if ( $new_mm_id == ',,' )
{
$new_mm_id = '';
}
$DB->query("UPDATE ibf_forums SET topic_mm_id='{$new_mm_id}' WHERE id=$fid");
}
}
$ADMIN->save_log("Topic Multi-Mod removed");
$std->boink_it($SKIN->base_url."&act=multimod");
}
//-------------------------------------------------------------
// SAVE!
//-------------------------------------------------------------
function do_save($type='new')
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
$forums = array();
$IN['id'] = intval($IN['id']);
if ( $type == 'edit' )
{
if ( $IN['id'] < 1 )
{
$ADMIN->error("You must use a valid id");
}
}
if ( $IN['mm_title'] == "" )
{
$ADMIN->error("You must enter a valid title");
}
//----------------------------------------
// Check for forums...
//----------------------------------------
$forums = $this->get_activein_forums();
if ( count($forums) < 1 )
{
$ADMIN->error("You must select some forums to activate with this multi-moderation suite");
}
if ( $IN['topic_move'] == 'n' )
{
$ADMIN->error("Incorrect forum chosen in the 'move to' section of the topic multi-moderation. Please note that you cannot choose to move the topic to a category");
}
$save = array(
'mm_title' => $IN['mm_title'],
'mm_enabled' => 1,
'topic_state' => $IN['topic_state'],
'topic_pin' => $IN['topic_pin'],
'topic_move' => $IN['topic_move'],
'topic_move_link' => $IN['topic_move_link'],
'topic_title_st' => $ADMIN->make_safe($HTTP_POST_VARS['topic_title_st']),
'topic_title_end' => $ADMIN->make_safe($HTTP_POST_VARS['topic_title_end']),
'topic_reply' => $IN['topic_reply'],
'topic_reply_content' => $ADMIN->make_safe($HTTP_POST_VARS['topic_reply_content']),
'topic_reply_postcount' => $IN['topic_reply_postcount'],
);
if ( $type == 'edit' )
{
$str = $DB->compile_db_update_string( $save );
$mm_id = $IN['id'];
$DB->query("UPDATE ibf_topic_mmod SET $str WHERE mm_id=$mm_id");
}
else
{
$str = $DB->compile_db_insert_string( $save );
$DB->query("INSERT INTO ibf_topic_mmod ({$str['FIELD_NAMES']}) VALUES({$str['FIELD_VALUES']})");
$mm_id = $DB->get_insert_id();
}
//------------------------------------
// Sort out the forum id things
//------------------------------------
$final = array();
$fstring = ','.implode( ",", $forums ).',';
$DB->query("SELECT id,name,topic_mm_id FROM ibf_forums");
while( $r = $DB->fetch_row() )
{
if ( $r['topic_mm_id'] == "" )
{
// Is this forum_id one of the forums to activate?
if ( stristr( $fstring, ','.$r['id'].',' ) )
{
$final[ $r['id'] ] = $mm_id;
}
else
{
continue;
}
}
// Is this mm_id already active?
else if ( stristr( $r['topic_mm_id'], ','.$mm_id.',' ) )
{
// Should it still be?
if ( ! stristr( $fstring, ','.$r['id'].',' ) )
{
// No? Remove it at once!
$final[ $r['id'] ] = str_replace( ",$mm_id,", ",", $r['topic_mm_id'] );
}
// No else, there's no need to update this forum_id's mm_id's
}
else if ( stristr( $fstring, ','.$r['id'].',' ) )
{
// forums' topic_mm_id is not blank and mm_id is not in that topic_mm_id, so...
$final[ $r['id'] ] = $r['topic_mm_id'] . ','.$mm_id.',';
}
}
// Phew - ok, now lets update the affected forum_id's.
if ( count( $final ) > 0 )
{
foreach( $final as $fid => $raw_mm_id )
{
$new_mm_id = "," . $std->clean_perm_string($raw_mm_id) . ",";
$DB->query("UPDATE ibf_forums SET topic_mm_id='{$new_mm_id}' WHERE id=$fid");
}
}
$ADMIN->save_log("Update topic multi-moderation entries ($type)");
$std->boink_it($ADMIN->base_url."&act=multimod");
}
//-------------------------------------------------------------
// SHOW MM FORM
//-------------------------------------------------------------
function do_form($type='new')
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_detail = "Multi moderation allows you to combine moderation actions to create easy to use shortcuts to several moderation options.";
$ADMIN->page_title = "Topic Multi-Moderation";
$form_code = 'donew';
$description = 'Add a new topic multi-moderation';
$button = "Add New Multi-Moderation";
if ( $type == 'edit' )
{
$id = intval($IN['id']);
$DB->query("SELECT * FROM ibf_topic_mmod WHERE mm_id=$id");
if ( ! $topic_mm = $DB->fetch_row() )
{
$ADMIN->error("Could not retrieve the information ($id)");
}
$form_code = 'doedit';
$description = 'Edit the topic multi-moderation';
$button = "Edit Multi-Moderation";
}
//---------------------------------------------------------
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , $form_code ),
2 => array( 'act' , 'multimod' ),
3 => array( 'id' , $id ),
) );
//---------------------------------------------------------
$state_dd = array(
0 => array( 'leave', 'Leave' ),
1 => array( 'close', 'Close' ),
2 => array( 'open' , 'Open' ),
);
$pin_dd = array(
0 => array( 'leave', 'Leave' ),
1 => array( 'pin' , 'Pin' ),
2 => array( 'unpin', 'Unpin' ),
);
//---------------------------------------------------------
$db_cats = array();
$db_children = array();
$db_forums = array();
$last_cat_id = -1;
$DB->query("SELECT f.id as forum_id, f.name as forum_name, f.position, f.read_perms, f.parent_id, f.subwrap, f.sub_can_post, f.redirect_on, f.topic_mm_id, c.id as cat_id, c.name as cat_name from ibf_forums f, ibf_categories c where c.id=f.category ORDER BY c.position, f.position");
$forums = "<select name='forums[]' class='textinput' size='15' multiple='multiple'>\n";
$forum_jump = array();
while ( $r = $DB->fetch_row() )
{
if ($last_cat_id != $r['cat_id'])
{
$db_cats[ $r['cat_id'] ] = array( 'id' => $r['cat_id'],
'name' => $r['cat_name'],
);
$last_cat_id = $r['cat_id'];
}
if ($r['parent_id'] > 0)
{
$db_children[ $r['parent_id'] ][$r['forum_id']] = $r;
}
else
{
$db_forums[ $r['forum_id'] ] = $r;
}
}
$last_cat_id = -1;
foreach ( $db_forums as $an_eye_for_an => $i )
{
if ( stristr( $i['topic_mm_id'], ",".$id."," ) )
{
$selected = ' selected="selected"';
}
else
{
$selected = "";
}
if ( $i['redirect_on'] == 1 )
{
continue;
}
if ($last_cat_id != $i['cat_id'])
{
$forums .= "<option value=\"c_{$i['cat_id']}\" style='font-weight:bold'>{$db_cats[ $i['cat_id'] ]['name']}</option>\n";
$forum_jump[] = array( 'n', $db_cats[ $i['cat_id'] ]['name'] );
$last_cat_id = $i['cat_id'];
}
$forums .= "<option value=\"{$i['forum_id']}\" $selected>&middot;&middot;&nbsp;{$i['forum_name']}</option>\n";
$forum_jump[] = array( $i['forum_id'], "&middot;&middot;&nbsp;{$i['forum_name']}" );
// Add in sub cat children
if ( ($i['subwrap'] == 1) and (count($db_children[ $i['forum_id'] ]) > 0) )
{
foreach( $db_children[ $i['forum_id'] ] as $idx => $cdata )
{
if ( $cdata['redirect_on'] == 1 OR ( $cdata['subwrap'] and ( ! $cdata['sub_can_post'] ) ) )
{
continue;
}
if ( stristr( $cdata['topic_mm_id'], ",".$id."," ) )
{
$selected = ' selected="selected"';
}
else
{
$selected = "";
}
$forums .= "<option value=\"{$cdata['forum_id']}\" $selected>&middot;&middot;&middot;&middot;&nbsp;{$cdata['forum_name']}</option>\n";
$forum_jump[] = array( $cdata['forum_id'], "&middot;&middot;&middot;&middot;&nbsp;{$cdata['forum_name']}" );
}
}
}
$forums .= "</select>";
//---------------------------------------------------------
$SKIN->td_header[] = array( "&nbsp;" , "40%" );
$SKIN->td_header[] = array( "&nbsp;" , "60%" );
$ADMIN->html .= $SKIN->start_table( "Topic Multi-Moderation", $description );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Title for this Multi-Moderation Suite?</b>" ,
$SKIN->form_input("mm_title", $topic_mm['mm_title'] )
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Active in Forums...</b><br>You may choose more than one" ,
$forums
) );
$ADMIN->html .= $SKIN->add_td_basic( 'Moderation Options', 'left', 'pformstrip' );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Add to <i>START</i> of topic title?</b>" ,
$SKIN->form_input("topic_title_st", $topic_mm['topic_title_st'] )
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Add to <i>END</i> of topic title?</b>" ,
$SKIN->form_input("topic_title_end", $topic_mm['topic_title_end'] )
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Alter topic state?</b>" ,
$SKIN->form_dropdown("topic_state", $state_dd, $topic_mm['topic_state'] )
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Alter pinned state?</b>" ,
$SKIN->form_dropdown("topic_pin", $pin_dd, $topic_mm['topic_pin'] )
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Move topic?</b>" ,
$SKIN->form_dropdown("topic_move", array_merge( array( 0 => array('-1', 'Don\'t Move' ) ), $forum_jump ), $topic_mm['topic_move'] )
."<br />".$SKIN->form_checkbox('topic_move_link', $topic_mm['topic_move_link'] )."<strong>Leave a link to the source topic?</strong>"
) );
$ADMIN->html .= $SKIN->add_td_basic( 'Post Options', 'left', 'pformstrip' );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Add a reply to the topic?</b><br>HTML enabled" ,
"Enable this reply? &nbsp;".$SKIN->form_yes_no('topic_reply', $topic_mm['topic_reply'] )
."<br />"
. $SKIN->form_textarea("topic_reply_content", $topic_mm['topic_reply_content'] )
."<br />".$SKIN->form_checkbox('topic_reply_postcount', $topic_mm['topic_reply_postcount'] )."<strong>Increment poster's post count?</strong>"
) );
$ADMIN->html .= $SKIN->end_form($button);
$ADMIN->html .= $SKIN->end_table();
$ADMIN->output();
}
//-------------------------------------------------------------
// SHOW ALL AVAILABLE MM's
//-------------------------------------------------------------
function list_current()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_detail = "Multi moderation allows you to combine moderation actions to create easy to use shortcuts to several moderation options.";
$ADMIN->page_title = "Topic Multi-Moderation";
$SKIN->td_header[] = array( "Title" , "50%" );
$SKIN->td_header[] = array( "Edit" , "25%" );
$SKIN->td_header[] = array( "Remove" , "25%" );
$ADMIN->html .= $SKIN->start_table( "Current Topic Multi-Moderation" );
$DB->query("SELECT * FROM ibf_topic_mmod ORDER BY mm_title");
if ( $DB->get_num_rows() )
{
while ( $row = $DB->fetch_row() )
{
$ADMIN->html .= $SKIN->add_td_row( array(
"<strong>{$row['mm_title']}</strong>",
"<center><a href='{$ADMIN->base_url}&amp;act=multimod&amp;code=edit&amp;id={$row['mm_id']}'>Edit</a></center>",
"<center><a href='{$ADMIN->base_url}&amp;act=multimod&amp;code=delete&amp;id={$row['mm_id']}'>Remove</a></center>",
) );
}
}
else
{
$ADMIN->html .= $SKIN->add_td_basic("<center>None set up</center>");
}
$ADMIN->html .= $SKIN->add_td_basic("<a href='{$ADMIN->base_url}&amp;act=multimod&amp;code=new' class='fauxbutton'>Add New</a>", 'center', 'pformstrip');
$ADMIN->html .= $SKIN->end_table();
$ADMIN->output();
}
//------------------------------------------------------
// Get the active in forums
//------------------------------------------------------
function get_activein_forums()
{
global $IN, $INFO, $DB, $std, $HTTP_POST_VARS;
$forum_array = array();
$forum_string = "";
$sql_query = "";
$check_sub = 0;
$cats = array();
$forums = array();
// If we have an array of "forums", loop
// through and build our *SQL IN( ) statement.
//------------------------------------------------
// Check for an array
//------------------------------------------------
if ( is_array( $HTTP_POST_VARS['forums'] ) )
{
//--------------------------------------------
// Go loopy loo
//--------------------------------------------
foreach( $HTTP_POST_VARS['forums'] as $l )
{
if ( preg_match( "/^c_/", $l ) )
{
$cats[] = intval( str_replace( "c_", "", $l ) );
}
else
{
$forums[] = intval($l);
}
}
//--------------------------------------------
// Do we have cats? Give 'em to Charles!
//--------------------------------------------
if ( count( $cats ) )
{
$sql_query = "SELECT id, read_perms, password, subwrap from ibf_forums WHERE category IN(".implode(",",$cats).")";
$boolean = "OR";
}
else
{
$sql_query = "SELECT id, read_perms, password, subwrap from ibf_forums";
$boolean = "WHERE";
}
if ( count( $forums ) )
{
$sql_query .= " $boolean (id IN(".implode(",",$forums).") or parent_id IN(".implode(",",$forums).") )";
}
if ( $sql_query == "" )
{
// Return empty..
return;
}
//--------------------------------------------
// Run query and finish up..
//--------------------------------------------
$DB->query( $sql_query );
while ($i = $DB->fetch_row())
{
$forum_array[] = $i['id'];
}
}
else
{
//--------------------------------------------
// Not an array...
//--------------------------------------------
if ( $IN['forums'] != "" )
{
$l = $IN['forums'];
//--------------------------------------------
// Single Cat
//--------------------------------------------
if ( preg_match( "/^c_/", $l ) )
{
$c = intval( str_replace( "c_", "", $l ) );
if ($c)
{
$DB->query("SELECT id, read_perms, password FROM ibf_forums WHERE category=$c");
while ($i = $DB->fetch_row())
{
$forum_array[] = $i['id'];
}
}
}
else
{
//--------------------------------------------
// Single forum
//--------------------------------------------
$f = intval($l);
if ($f)
{
$qe = " OR parent_id=$f ";
$DB->query("SELECT id, read_perms, password FROM ibf_forums WHERE id=$f".$qe);
while ($i = $DB->fetch_row())
{
$forum_array[] = $i['id'];
}
}
}
}
}
return $forum_array;
}
}
?>
+58 -31
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > mySQL Admin Stuff
@@ -24,7 +26,11 @@
*/
// Ensure we've not accessed this script directly:
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
@set_time_limit(1200);
@@ -39,7 +45,20 @@ class ad_mysql {
var $str_gzip_header = "\x1f\x8b\x08\x00\x00\x00\x00\x00";
function ad_mysql() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS, $HTTP_GET_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS, $HTTP_GET_VARS;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
// Make sure we're a root admin, or else!
@@ -91,8 +110,8 @@ class ad_mysql {
break;
case 'runsql':
$q = $HTTP_POST_VARS['query'] == "" ? $HTTP_GET_VARS['query'] : $HTTP_POST_VARS['query'];
$this->view_sql(trim(urldecode(stripslashes($q))));
$q = $HTTP_POST_VARS['query'] == "" ? urldecode($HTTP_GET_VARS['query']) : $HTTP_POST_VARS['query'];
$this->view_sql(trim(stripslashes($q)));
break;
case 'backup':
@@ -125,7 +144,7 @@ class ad_mysql {
function do_safe_backup($tbl_name="")
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($tbl_name == "")
{
@@ -229,13 +248,20 @@ class ad_mysql {
function get_table_sql($tbl, $create_tbl, $skip=0)
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($create_tbl)
{
// Generate table structure
$DB->query("SHOW CREATE TABLE ".$INFO['sql_database'].".".$tbl);
if ( $IN['addticks'] )
{
$DB->query("SHOW CREATE TABLE `".$INFO['sql_database'].".".$tbl."`");
}
else
{
$DB->query("SHOW CREATE TABLE ".$INFO['sql_database'].".".$tbl);
}
$ctable = $DB->fetch_row();
@@ -246,10 +272,10 @@ class ad_mysql {
if ($skip == 1)
{
if ($tbl == $INFO['sql_database'].'admin_sessions'
OR $tbl == $INFO['sql_database'].'sessions'
OR $tbl == $INFO['sql_database'].'reg_anti_spam'
OR $tbl == $INFO['sql_database'].'search_results'
if ($tbl == $INFO['sql_tbl_prefix'].'admin_sessions'
OR $tbl == $INFO['sql_tbl_prefix'].'sessions'
OR $tbl == $INFO['sql_tbl_prefix'].'reg_anti_spam'
OR $tbl == $INFO['sql_tbl_prefix'].'search_results'
)
{
return $ret;
@@ -349,7 +375,7 @@ class ad_mysql {
function sbup_splash()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_detail = "This section allows you to backup your database.";
@@ -372,7 +398,7 @@ class ad_mysql {
until your browser prompts you with a dialogue box. This may take some time depending on
the size of the database you are backing up.
<br><br>
<b><a href='{$ADMIN->base_url}&act=mysql&code=dosafebackup&create_tbl={$IN['create_tbl']}&skip={$IN['skip']}&enable_gzip={$IN['enable_gzip']}'>Click here to start the backup</a></b>"
<b><a href='{$ADMIN->base_url}&act=mysql&code=dosafebackup&create_tbl={$IN['create_tbl']}&addticks={$IN['addticks']}&skip={$IN['skip']}&enable_gzip={$IN['enable_gzip']}'>Click here to start the backup</a></b>"
) );
@@ -387,7 +413,7 @@ class ad_mysql {
function show_backup_form()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_detail = "This section allows you to backup your database.
<br><br><b>Simple Backup</b>
@@ -418,7 +444,7 @@ class ad_mysql {
$ADMIN->html .= $SKIN->start_table( "Simple Back Up" );
$ADMIN->html .= $SKIN->add_td_row( array(
"<b>Add 'CREATE TABLE' statements?</b>",
"<b>Add 'CREATE TABLE' statements?</b><br>Add backticks around the table name?<br>(if you get a mySQL error, enable this) <input type='checkbox' name='addticks' value=1>",
$SKIN->form_yes_no( 'create_tbl', 1),
) );
@@ -450,7 +476,7 @@ class ad_mysql {
function view_sql($sql)
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$limit = 50;
$start = intval($IN['st']) == "" ? 0 : intval($IN['st']);
@@ -505,7 +531,7 @@ class ad_mysql {
$DB->return_die = 1;
$DB->query($sql);
$DB->query($sql,1);
// Check for errors..
@@ -569,7 +595,7 @@ class ad_mysql {
// Re-run with limit
$DB->query($sql);
$DB->query($sql, 1); /// bypass table swapping
}
}
@@ -635,7 +661,7 @@ class ad_mysql {
function run_tool()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_detail = "This section allows you to administrate your mySQL database.$extra";
$ADMIN->page_title = "mySQL ".$this->true_version." Tool Box";
@@ -722,7 +748,7 @@ class ad_mysql {
function list_index()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
@@ -788,9 +814,9 @@ class ad_mysql {
$SKIN->td_header[] = array( "Export" , "10%" );
$SKIN->td_header[] = array( '<input name="allbox" type="checkbox" value="Check All" onClick="CheckAll();">' , "10%" );
$ADMIN->html .= $SKIN->start_table( "Invision Board Tables" );
$ADMIN->html .= $SKIN->start_table( "Invision Power Board Tables" );
$DB->query("SHOW TABLE STATUS FROM ".$INFO['sql_database']);
$DB->query("SHOW TABLE STATUS FROM `".$INFO['sql_database']."`");
while ( $r = $DB->fetch_row() )
{
@@ -830,10 +856,11 @@ class ad_mysql {
$tot = $this->gen_size( $total , 3, $oBit );
$ADMIN->html .= $SKIN->add_td_row( array ("&nbsp;",
"<div align='right'>Totals (<b>{$tot[0]} {$tot[1]}</b>)</div>",
"&nbsp;",
"<div align='right'><b>{$tbl[0]} {$tbl[1]}</b></div>",
"<div align='right'><b>{$idx[0]} {$idx[1]}</b></div>",
"&nbsp;",
"<div align='right'>Totals (<b>{$tot[0]} {$tot[1]}</b>)</div>",
) );
}
@@ -845,7 +872,7 @@ class ad_mysql {
$SKIN->td_header[] = array( "Rows" , "30%" );
$SKIN->td_header[] = array( '<input name="allbox" type="checkbox" value="Check All" onClick="CheckAll();">' , "10%" );
$ADMIN->html .= $SKIN->start_table( "Invision Board Tables" );
$ADMIN->html .= $SKIN->start_table( "Invision Power Board Tables" );
$tables = $DB->get_table_names();
File diff suppressed because it is too large. Load diff
+210
View File
@@ -0,0 +1,210 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > ACP Prefs functions
| > Module written by Matt Mecham
| > Date started: 22nd May 2003
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_prefs();
class ad_prefs {
var $base_url;
function ad_prefs() {
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
// Show the wee form
//---------------------------------------
if ( $IN['set'] == 1 )
{
$this->msg = 'Savings set';
if ( $IN['tx'] == "" or $IN['ty'] == "" )
{
$this->msg = 'Please complete the form';
print $this->get_html();
}
else
{
$std->my_setcookie( 'acpprefs', $IN['menu'] .','. $IN['tx'] .','. $IN['ty'] .','. $IN['preview']);
$this->msg = 'Settings saved';
$this->tx = $IN['tx'];
$this->ty = $IN['ty'];
if ( $IN['menu'] )
{
$this->s_yes = 'selected';
$this->s_no = '';
}
else
{
$this->s_yes = '';
$this->s_no = 'selected';
}
if ( $IN['preview'] )
{
$this->p_yes = 'selected';
$this->p_no = '';
}
else
{
$this->p_yes = '';
$this->p_no = 'selected';
}
print $this->get_html();
}
}
else
{
$state = 0;
$tx = 80;
$ty = 40;
if ( $cookie = $std->my_getcookie('acpprefs') )
{
list( $state, $tx, $ty, $prev_show ) = explode( ",", $cookie );
}
$this->tx = $tx;
$this->ty = $ty;
if ( $state )
{
$this->s_yes = 'selected';
$this->s_no = '';
}
else
{
$this->s_yes = '';
$this->s_no = 'selected';
}
if ( $prev_show )
{
$this->p_yes = 'selected';
$this->p_no = '';
}
else
{
$this->p_yes = '';
$this->p_no = 'selected';
}
print $this->get_html();
}
}
function get_html()
{
global $SKIN;
$hit_muhl = <<<EOF
<html>
<head>
<title>IPB-ACP Prefs</title>
<style type='text/css'>
BODY {
font-size: 10px;
font-family: Verdana, Arial, Sans-Serif;
color:#000;
padding:0px;
margin:5px 5px 5px 5px;
background-color: #F5F9FD
}
TABLE, TD, TR {
font-family: Verdana,Arial, Sans-Serif;
color:#000;
font-size: 10px;
}
a:link, a:visited, a:active { color:#000055 }
a:hover { color:#333377;text-decoration:underline }
input {vertical-align:middle}
.textinput { background-color: #DFE6EF;; color:Ê#000; font-size:10px; font-family: Verdana,Arial, Sans-Serif; padding:2px; }
</style>
<script type='text/javascript'>
var msg = "{$this->msg}";
if ( msg != "" )
{
alert( msg );
}
</script>
</head>
<body>
<form action="{$SKIN->base_url}&act=prefs&set=1" method="post">
<fieldset style='padding:10px'>
<legend>Your ACP Prefs</legend>
<strong>Save ACP Menu State</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select class='textinput' name='menu'><option value='1' {$this->s_yes}>Yes</option><option value='0' {$this->s_no}>No</option></select>
<br /><br />
<strong>Template's Textbox Size</strong>&nbsp;<input class='textinput' type='text' size='3' name='tx' value='{$this->tx}' /> <strong>X</strong> <input class='textinput' type='text' size='3' name='ty' value='{$this->ty}' />
<br /><br />
<strong>Show Macro Preview?</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select class='textinput' name='preview'><option value='1' {$this->p_yes}>Yes</option><option value='0' {$this->p_no}>No</option></select>
<br /><br />
<center><input type='submit' class='textinput' value='Save' /></center>
</fieldset>
</form>
</body>
</html>
EOF;
return $hit_muhl;
}
}
?>
+47 -21
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Custom profile field functions
@@ -21,7 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_fields();
@@ -32,7 +38,20 @@ class ad_fields {
var $base_url;
function ad_fields() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -77,7 +96,7 @@ class ad_fields {
function delete_form()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -129,7 +148,7 @@ class ad_fields {
function do_delete()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -163,7 +182,7 @@ class ad_fields {
function main_save($type='edit')
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['ftitle'] == "")
{
@@ -233,7 +252,7 @@ class ad_fields {
function main_form($type='edit')
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($type == 'edit')
{
@@ -323,19 +342,19 @@ class ad_fields {
$SKIN->form_textarea("fcontent", $fields['fcontent'] )
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Show on registration page also?</b>" ,
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Include on registration page?</b>" ,
$SKIN->form_yes_no("fshowreg", $fields["fshowreg"] )
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Field cannot be left blank?</b><br>(Will not apply if you choose to hide below)" ,
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Field MUST be completed and not left empty?</b><br>(Will not apply if you choose to hide below)" ,
$SKIN->form_yes_no("freq", $fields['freq'] )
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Hidden to profile viewers?</b><br>If yes, only admins and super mods can see it, user can still edit." ,
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Hide from the member's profile?</b><br>If yes, only admins and super mods can see it, user can still edit." ,
$SKIN->form_yes_no("fhide", $fields['fhide'] )
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Editable by user?</b><br>If no, user cannot edit information, field can only be seen by admins and super mods. Admins can edit information via ACP" ,
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Field can be edited by the member?</b><br>If no, user cannot edit information, field can only be seen by admins and super mods. Admins can edit information via ACP" ,
$SKIN->form_yes_no("fedit", $fields['fedit'] )
) );
@@ -356,14 +375,20 @@ class ad_fields {
function main_screen()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_title = "Custom Profile Fields";
$ADMIN->page_detail = "Custom Profile fields can be used to add optional or required fields to be completed when registering or editing a profile. This is useful if you wish to record data from your members that is not already present in the base board.";
$SKIN->td_header[] = array( "Field Title" , "30%" );
$SKIN->td_header[] = array( "Type" , "20%" );
$ADMIN->page_detail .= "<br /><br /><strong>Using Custom Profile Fields in Topic View</strong><br /><br />
When you have enabled this feature (via System Settings -> CPU Saving) you can use the custom fields
in your Topic View skin.<br />Simply add <strong>\$author[field_1]</strong> (or whatever the corresponding 'Topicview var.' is) in 'Post Entry'
where you would like it to be shown";
$SKIN->td_header[] = array( "Field Title" , "20%" );
$SKIN->td_header[] = array( "Type" , "10%" );
$SKIN->td_header[] = array( "TopicView var." , "20%" );
$SKIN->td_header[] = array( "REQUIRED" , "10%" );
$SKIN->td_header[] = array( "HIDDEN" , "10%" );
$SKIN->td_header[] = array( "SHOW REG" , "10%" );
@@ -411,6 +436,7 @@ class ad_fields {
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$r['ftitle']}</b>" ,
"<center>{$real_types[$r['ftype']]}</center>",
"<center>field_".$r['fid']."</center>",
$req,
$hide,
$regi,
@@ -422,10 +448,10 @@ class ad_fields {
}
else
{
$ADMIN->html .= $SKIN->add_td_basic("None found", "center", "tdrow2");
$ADMIN->html .= $SKIN->add_td_basic("None found", "center", "pformstrip");
}
$ADMIN->html .= $SKIN->add_td_basic("<a href='{$ADMIN->base_url}&act=field&code=add'>ADD NEW FIELD</a></center>", "center", "title");
$ADMIN->html .= $SKIN->add_td_basic("<a href='{$ADMIN->base_url}&act=field&code=add' class='fauxbutton'>ADD NEW FIELD</a></center>", "center", "pformstrip");
$ADMIN->html .= $SKIN->end_table();
+62 -8
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Admin Quick Help System
@@ -21,7 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new quick_help();
@@ -34,7 +40,55 @@ class quick_help {
function init_help_array()
{
return array(
return array( 'mg_dohtml' => array( 'title' => "[doHTML] Tag Usage",
'body' => "The [doHTML] tag will allow all members of the group to post pure HTML in forums that have the ability to parse the [doHTML] tag. You can turn this on and off
for each forum via the edit forum settings function.<br />
<br /><b>Warning!</b><br />
Allowing a member to post HTML is a very dangerous thing, you should not enable this functionality on any group that will use it maliciously. Although IPB tries
to filter some of the more harmful content, it is NOT foolproof and this tag CAN be used to steal session cookies, redirect members and destroy the topic view layout.
<br />Invision Power Board and Invision Power Services will not be held responsible for any misfortune that occurs from the usage of this tag.
<br /><br /><b>Use it wisely!</b>
",
),
'mod_mmod' => array( 'title' => "Moderations and Topic Multi-Moderation",
'body' => "If you allow your moderators access to the forums' multi-moderation then you must be aware that they have full use.
<br />For example, if one of your multi-moderation actions allowed the topic to be moved and you do not allow move permissions the
moderator will still be able to use the topic multi-moderation and move the topic.
",
),
'set_spider' => array( 'title' => "What are Search Engine Spiders?",
'body' => "Search engines such as Google 'spider' the web by using special programs to find and add links to the search engine
database.<br />Invision Power can take advantage of separating the bots from the real users and you can then
ensure that they are getting adequate information to help with search engine ranking.
<br />
<br />
<b>Warning!</b>
<br />
Invision Power Board recognises the search engine spiders and crawlers by their user_agent. Please keep in mind
that it's not impossible to fake this and a malicious user could pose as a harmless search engine spider.
<br />This is not a problem as by default the spider will have guest permissions, but it's something that
you should keep in mind when allowing permissions.
<br /><br />Also keep in mind that most search engines do NOT search dynamically generated website for fear
of crashing the server with the constant reading of topics.
",
),
'mg_upload' => array( 'title' => "Upload Permissions",
'body' => "If you wish to allow this group to attach files (upload) when posting, you will have to ensure you have completed the following:
<ul>
<li>You have entered a reasonable numerical figure in the groups 'Max upload file size' field.
<li>You have edited the forum permissions for this group and checked the 'Upload' checkbox.
</ul>
This allows you to control in which forums this group can upload to.
<br><br><b>Warning!</b><br>If, when posting, no post is made and you are returned back to the board index, disable this groups upload by entering 0 into this field. This will turn off the mutli-part form the uploads use.
",
),
'mg_promote' => array( 'title' => "Group Promotion",
'body' => "If enabled (by choosing a member group to promote your members to and by entering a number of posts to achieve this)
when your members meet or exceed the number of posts set they will be 'promoted' to the specified group.
+56 -25
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Skin -> Templates pop up functions
@@ -21,7 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_settings();
@@ -32,7 +38,20 @@ class ad_settings {
var $base_url;
function ad_settings() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -109,7 +128,7 @@ class ad_settings {
function css_search_frames()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
print "<html>
<head><title>Search</title></head>
@@ -126,7 +145,7 @@ class ad_settings {
function css_preview()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
//+---------------------------------------
// GET THE TEMPLATES THAT THIS CSS USES
@@ -232,13 +251,13 @@ class ad_settings {
function print_css_searchlinks()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
//+---------------------------------------
// GET THE TEMPLATES THAT THIS CSS USES
//+---------------------------------------
$DB->query("SELECT tmpl_id FROM ibf_skins WHERE css_id='".$IN['id']."'");
$DB->query("SELECT set_id FROM ibf_skins WHERE css_id='".$IN['id']."'");
if ( ! $set = $DB->fetch_row() )
{
@@ -261,11 +280,11 @@ class ad_settings {
//die("SELECT suid, set_id, group_name, func_name FROM ibf_skin_templates WHERE set_id='".$set['tmpl_id']."' AND section_content LIKE '%".$like."%' ORDER BY group_name");
$DB->query("SELECT suid, set_id, group_name, func_name FROM ibf_skin_templates WHERE set_id='".$set['tmpl_id']."' AND section_content LIKE '%".$like."%' ORDER BY group_name");
$DB->query("SELECT suid, set_id, group_name, func_name FROM ibf_skin_templates WHERE set_id='".$set['set_id']."' AND section_content LIKE '%".$like."%' ORDER BY group_name");
if (! $DB->get_num_rows() )
{
$this->do_message("No matches for that string");
$this->do_message("No matches for that string in template set ID {$set['set_id']}");
}
$results = array();
@@ -316,7 +335,7 @@ class ad_settings {
function print_searchlinks()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
if ($IN['bypass'] == 1)
{
@@ -393,7 +412,7 @@ class ad_settings {
function do_message($message="")
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->html = "<tr><td id='tdrow1' height='100%' align='center' valign='middle'><br><br><b>$message</b><br><br>&nbsp;</td></tr>";
@@ -405,7 +424,7 @@ class ad_settings {
function print_search_box()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'searchlinks' ),
2 => array( 'act' , 'rtempl' ),
@@ -435,7 +454,7 @@ class ad_settings {
function search_frames()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
print "<html>
<head><title>Search</title></head>
@@ -455,7 +474,7 @@ class ad_settings {
function compare_frames()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
print "<html>
<head>
@@ -480,7 +499,7 @@ class ad_settings {
function print_compare_top()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$content = $IN['content'] == 'orig' ? 'Original Template' : 'Current Template';
@@ -496,7 +515,7 @@ class ad_settings {
function print_compare_new()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$DB->query("SELECT * FROM ibf_skin_templates WHERE suid='".$IN['suid']."'");
@@ -539,7 +558,7 @@ class ad_settings {
function macro_one()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'macro_two' ),
2 => array( 'act' , 'rtempl' ),
@@ -571,7 +590,7 @@ class ad_settings {
function macro_two()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['lookup'] == "")
{
@@ -715,7 +734,7 @@ class ad_settings {
function do_preview()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_GET_VARS;
if ($IN['suid'] == "")
@@ -730,6 +749,18 @@ class ad_settings {
$ADMIN->error("You must specify an existing template set ID, go back and try again");
}
$DB->query("SELECT macro_id FROM ibf_skins WHERE set_id='".$template['set_id']."'");
$macrod = $DB->fetch_row();
$DB->query("SELECT macro_value, macro_replace FROM ibf_macro WHERE macro_set='".$macrod['macro_id']."'");
while ( $mc = $DB->fetch_row() )
{
$macro_orig[] = "<{".$mc['macro_value']."}>";
$macro_repl[] = $mc['macro_replace'];
}
$table = "<table width='100%' bgcolor='black' cellpadding='4' style='font-family:verdana, arial;font-size:11px;color:white'>
<tr>
<td align='center' style='font-family:verdana, arial;font-size:11px;color:white'>Template Group: {$template['group_name']} : Template bit: {$template['func_name']}</td>
@@ -795,7 +826,7 @@ class ad_settings {
@header("Content-type: text/html");
print "<html><head><title>Preview</title>$css_text</head><body>$table \n";
print $this->convert_tags($template['section_content']);
print str_replace( $macro_orig, $macro_repl, $this->convert_tags($template['section_content']) );
exit();
File diff suppressed because it is too large. Load diff
+40 -16
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Import functions
@@ -21,7 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_langs();
@@ -31,7 +37,20 @@ class ad_langs {
var $base_url;
function ad_langs() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -64,7 +83,7 @@ class ad_langs {
function remove()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -91,7 +110,7 @@ class ad_langs {
function import()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -112,7 +131,7 @@ class ad_langs {
$this->name_translated = preg_replace( "/^(css|image|set|wrap|tmpl)-(.+?)\.(\S+)$/", "\\2", $this->tar_file );
$this->name_translated = preg_replace( "/_/", " ", $this->name_translated );
require $root_dir."sources/lib/tar.php";
require ROOT_PATH."sources/lib/tar.php";
$this->tar = new tar();
@@ -148,7 +167,7 @@ class ad_langs {
function set_import()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$images_dir = $INFO['base_dir']."style_images";
$skins_dir = $INFO['base_dir']."Skin";
@@ -719,7 +738,7 @@ class ad_langs {
function wrap_import()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
// Depreciated
@@ -766,7 +785,7 @@ class ad_langs {
function list_current()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
@@ -856,6 +875,11 @@ class ad_langs {
return "";
}
// Make some tags safe..
$t = preg_replace( "/\{ibf\.vars\.(sql_driver|sql_host|sql_database|sql_pass|sql_user|sql_port|sql_tbl_prefix|smtp_host|smtp_port|smtp_user|smtp_pass|html_dir|base_dir|upload_dir)\}/", "" , $t );
$t = preg_replace( "/{ibf\.script_url}/i" , '{$ibforums->base_url}' , $t);
$t = preg_replace( "/{ibf\.session_id}/i" , '{$ibforums->session_id}' , $t);
$t = preg_replace( "/{ibf\.skin\.(\w+)}/" , '{$ibforums->skin[\''."\\1".'\']}' , $t);
@@ -870,7 +894,7 @@ class ad_langs {
function rebuild_phpskin($templates_dir, $skins_dir)
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$errors = array();
@@ -1018,7 +1042,7 @@ class ad_langs {
function import_error( $error, $next_id)
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$DB->query("DELETE FROM ibf_macro_name WHERE set_id='{$next_id['macro']}'");
$DB->query("DELETE FROM ibf_macro WHERE macro_id='{$next_id['macro']}'");
File diff suppressed because it is too large. Load diff
+281
View File
@@ -0,0 +1,281 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Spider (MAN) Logs
| > Module written by Matt Mecham
| > Date started: 28th May 2003
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_spiderlogs();
class ad_spiderlogs {
var $base_url;
function ad_spiderlogs() {
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
$ADMIN->nav[] = array( 'act=spiderlog', 'Search Engine Spider Logs' );
//---------------------------------------
switch($IN['code'])
{
case 'view':
$this->view();
break;
case 'remove':
$this->remove();
break;
//-------------------------
default:
$this->list_current();
break;
}
}
//---------------------------------------------
// Remove archived files
//---------------------------------------------
function view()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$start = $IN['st'] ? $IN['st'] : 0;
$ADMIN->page_detail = "Viewing all actions by a search engine spider";
$ADMIN->page_title = "Search Engine Logs Manager";
$botty = urldecode($IN['bid']);
if ($IN['search_string'] == "")
{
$DB->query("SELECT COUNT(sid) as count FROM ibf_spider_logs WHERE bot='$botty'");
$row = $DB->fetch_row();
$row_count = $row['count'];
$query = "&act=spiderlog&bid={$IN['bid']}&code=view";
$DB->query("SELECT * FROM ibf_spider_logs WHERE bot='$botty' ORDER BY entry_date DESC LIMIT $start, 20");
}
else
{
$IN['search_string'] = urldecode($IN['search_string']);
$DB->query("SELECT COUNT(sid) as count FROM ibf_spider_logs WHERE query_string LIKE '%{$IN['search_string']}%'");
$row = $DB->fetch_row();
$row_count = $row['count'];
$query = "&act=spiderlog&code=view&search_string=".urlencode($IN['search_string']);
$DB->query("SELECT * FROM ibf_spider_logs WHERE query_string LIKE '%{$IN['search_string']}%' ORDER BY entry_date DESC LIMIT $start, 20");
}
$links = $std->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
'PER_PAGE' => 20,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "Single Page",
'L_MULTI' => "Pages: ",
'BASE_URL' => $ADMIN->base_url.$query,
)
);
$ADMIN->page_detail = "You may view and remove actions performed by a search engine bot";
$ADMIN->page_title = "Search Engine Logs Manager";
//+-------------------------------
$SKIN->td_header[] = array( "Bot Name" , "15%" );
$SKIN->td_header[] = array( "Query String" , "15%" );
$SKIN->td_header[] = array( "Time of action" , "20%" );
$SKIN->td_header[] = array( "IP address" , "10%" );
$ADMIN->html .= $SKIN->start_table( "Saved Search Engine Logs" );
$ADMIN->html .= $SKIN->add_td_basic($links, 'right', 'pformstrip');
if ( $DB->get_num_rows() )
{
while ( $row = $DB->fetch_row() )
{
$ADMIN->html .= $SKIN->add_td_row( array( "<b>".$INFO[ 'sp_'.$row['bot'] ]."</b>",
"<a href='{$INFO['board_url']}/index.{$INFO['php_ext']}?{$row['query_string']}' target='_blank'>{$row['query_string']}</a>",
$ADMIN->get_date( $row['entry_date'], 'LONG' ),
"{$row['ip_address']}",
) );
}
}
else
{
$ADMIN->html .= $SKIN->add_td_basic("<center>No results</center>");
}
$ADMIN->html .= $SKIN->add_td_basic($links, 'right', 'pformstrip');
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->output();
}
//---------------------------------------------
// Remove archived files
//---------------------------------------------
function remove()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['bid'] == "")
{
$ADMIN->error("You did not select a bot to remove by!");
}
$botty = urldecode($IN['bid']);
$DB->query("DELETE FROM ibf_spider_logs WHERE bot='$botty'");
$ADMIN->save_log("Removed Search Engine Logs");
$std->boink_it($ADMIN->base_url."&act=spiderlog");
exit();
}
//-------------------------------------------------------------
// SHOW ALL LANGUAGE PACKS
//-------------------------------------------------------------
function list_current()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
$ADMIN->page_detail = "You may view and remove entries in your spider engine logs";
$ADMIN->page_title = "Search Engine Logs Manager";
//+-------------------------------
$SKIN->td_header[] = array( "Bot Name" , "20%" );
$SKIN->td_header[] = array( "Hits" , "20%" );
$SKIN->td_header[] = array( "Started" , "20%" );
$SKIN->td_header[] = array( "View all by bot" , "20%" );
$SKIN->td_header[] = array( "Remove all by bot" , "20%" );
$ADMIN->html .= $SKIN->start_table( "Saved Search Engine Spider Logs" );
$DB->query("SELECT count(*) as cnt, bot, entry_date, query_string FROM `ibf_spider_logs` group by bot order by entry_date DESC");
while ( $r = $DB->fetch_row() )
{
$url_butt = urlencode($r['bot']);
$ADMIN->html .= $SKIN->add_td_row( array( $INFO[ 'sp_'.$r['bot'] ],
"<center>{$r['cnt']}</center>",
$ADMIN->get_date( $r['entry_date'], 'SHORT' ),
"<center><a href='".$SKIN->base_url."&act=spiderlog&code=view&bid={$url_butt}'>View</a></center>",
"<center><a href='".$SKIN->base_url."&act=spiderlog&code=remove&bid={$url_butt}'>Remove</a></center>",
) );
}
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'view' ),
2 => array( 'act' , 'spiderlog' ),
) );
$SKIN->td_header[] = array( "&nbsp;" , "40%" );
$SKIN->td_header[] = array( "&nbsp;" , "60%" );
$ADMIN->html .= $SKIN->start_table( "Search Search Engine Logs" );
//+-------------------------------
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Search for...</b>" ,
$SKIN->form_input( "search_string").'... in the query string'
) );
$ADMIN->html .= $SKIN->end_form("Search");
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->output();
}
}
?>
+46 -13
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Statistical functions
@@ -22,7 +24,11 @@
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_stats();
@@ -34,7 +40,20 @@ class ad_stats {
function ad_stats()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
$this->month_names = array( 1 => 'January', 'February', 'March' , 'April' , 'May' , 'June',
'July' , 'August' , 'September' , 'October', 'November', 'December'
@@ -101,7 +120,7 @@ class ad_stats {
function show_views()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_title = "Statistic Center Results";
@@ -175,7 +194,14 @@ class ad_stats {
foreach( $results as $pOOp => $data )
{
$img_width = intval( ($data['result_count'] / $max_result) * 100 - 8) . "%";
$img_width = intval( ($data['result_count'] / $max_result) * 100 - 8);
if ($img_width < 1)
{
$img_width = 1;
}
$img_width .= '%';
$ADMIN->html .= $SKIN->add_td_row( array( $data['result_name'],
"<img src='{$SKIN->img_url}/bar_left.gif' border='0' width='4' height='11' align='middle' alt=''><img src='{$SKIN->img_url}/bar.gif' border='0' width='$img_width' height='11' align='middle' alt=''><img src='{$SKIN->img_url}/bar_right.gif' border='0' width='4' height='11' align='middle' alt=''>",
@@ -206,7 +232,7 @@ class ad_stats {
function result_screen($mode='reg')
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_title = "Statistic Center Results";
@@ -342,7 +368,14 @@ class ad_stats {
foreach( $results as $pOOp => $data )
{
$img_width = intval( ($data['result_count'] / $max_result) * 100 - 8) . "%";
$img_width = intval( ($data['result_count'] / $max_result) * 100 - 8);
if ($img_width < 1)
{
$img_width = 1;
}
$img_width .= '%';
if ($IN['timescale'] == 'weekly')
{
@@ -382,7 +415,7 @@ class ad_stats {
function main_screen($mode='reg')
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$ADMIN->page_title = "Statistic Center";
+105 -54
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Help Control functions
@@ -21,7 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_settings();
@@ -31,7 +37,20 @@ class ad_settings {
var $base_url;
function ad_settings() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -79,7 +98,7 @@ class ad_settings {
function export()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -143,7 +162,7 @@ class ad_settings {
$archive_dir = $INFO['base_dir']."archive_out";
$images_dir = $INFO['base_dir']."style_images/".$row['img_dir'];
require $root_dir."sources/lib/tar.php";
require ROOT_PATH."sources/lib/tar.php";
if (!is_dir($archive_dir))
{
@@ -234,6 +253,11 @@ class ad_settings {
{
$mrow['macro_replace'] = "*UNASSIGNED*";
}
// Fix newlines..
$mrow['macro_replace'] = str_replace( "\n", '\n', str_replace("\r", "\n", $mrow['macro_replace'] ) );
$file_content .= $mrow['macro_value']."~=~".$mrow['macro_replace']."\n";
}
@@ -361,7 +385,7 @@ class ad_settings {
function mem_skins()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
$DB->query("SELECT sid FROM ibf_skins WHERE uid='".$IN['oid']."'");
$old = $DB->fetch_row();
@@ -388,7 +412,7 @@ class ad_settings {
function remove()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
@@ -459,7 +483,7 @@ class ad_settings {
function save_skin( $type='add' )
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
@@ -477,11 +501,12 @@ class ad_settings {
}
$barney = array( 'sname' => stripslashes($HTTP_POST_VARS['sname']),
$barney = array( 'sname' => $std->txt_stripslashes($HTTP_POST_VARS['sname']),
'set_id' => $IN['template'],
'tmpl_id' => $IN['wrapper'],
'img_dir' => $IN['img_dir'],
'img_dir' => $IN['img_dir'],
'css_id' => $IN['css'],
'css_method' => $IN['css_method'],
'hidden' => $IN['hidden'],
'default_set'=> $IN['default_set'],
'macro_id' => $IN['macro_id'],
@@ -533,7 +558,7 @@ class ad_settings {
function do_form( $type='add' )
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//+-------------------------------
@@ -625,7 +650,15 @@ class ad_settings {
}
closedir( $dh );
//+-------------------------------
if ( file_exists( ROOT_PATH."cache" ) )
{
if ( is_writeable( ROOT_PATH."cache" ) )
{
$cssextra = $SKIN->form_dropdown('css_method', array( 0 => array( 'inline', 'Inline'), 1 => array( 'external', 'External' ) ), $row['css_method']);
}
}
//+-------------------------------
@@ -672,7 +705,7 @@ class ad_settings {
$ADMIN->html .= $SKIN->add_td_row( array(
"<b>Use Stylesheet:</b>",
$SKIN->form_dropdown('css', $css, $row['css_id']),
$SKIN->form_dropdown('css', $css, $row['css_id']).'&nbsp;'.$cssextra,
) );
$ADMIN->html .= $SKIN->add_td_row( array(
@@ -687,7 +720,7 @@ class ad_settings {
) );
$ADMIN->html .= $SKIN->add_td_row( array(
"<b>Set as default skin set?</b><br>Used for unallocted forum and member skins",
"<b>Set as default skin set?</b><br>Used for unallocated forum and member skins",
$SKIN->form_yes_no('default_set', $row['default_set']),
) );
@@ -709,7 +742,7 @@ class ad_settings {
function list_sets()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
@@ -734,16 +767,6 @@ class ad_settings {
}
$SKIN->td_header[] = array( "Title" , "40%" );
$SKIN->td_header[] = array( "No. Members" , "20%" );
$SKIN->td_header[] = array( "Export" , "10%" );
$SKIN->td_header[] = array( "Edit" , "10%" );
$SKIN->td_header[] = array( "Remove" , "10%" );
$SKIN->td_header[] = array( "Hidden" , "5%" );
$SKIN->td_header[] = array( "Default" , "5%" );
//+-------------------------------
$DB->query("select ibf_skins.*, count(ibf_members.id) as mcount from ibf_skins left join ibf_members on(ibf_members.skin=ibf_skins.sid) where (ibf_members.skin is not null or ibf_skins.default_set = 1) group by ibf_skins.sid order by ibf_skins.sname");
$used_ids = array();
@@ -751,6 +774,16 @@ class ad_settings {
if ( $DB->get_num_rows() )
{
$SKIN->td_header[] = array( "Title" , "40%" );
$SKIN->td_header[] = array( "No. Members" , "20%" );
$SKIN->td_header[] = array( "Export" , "10%" );
$SKIN->td_header[] = array( "Edit" , "10%" );
$SKIN->td_header[] = array( "Remove" , "10%" );
$SKIN->td_header[] = array( "Hidden" , "5%" );
$SKIN->td_header[] = array( "Default" , "5%" );
//+-------------------------------
$ADMIN->html .= $SKIN->start_table( "Current Skins Used by Members" );
while ( $r = $DB->fetch_row() )
@@ -778,7 +811,13 @@ class ad_settings {
$default = "<span style='color:red;font-weight:bold'>X</span>";
}
$ADMIN->html .= $SKIN->add_td_row( array( "<b>".stripslashes($r['sname'])."</b>$extra",
$editlist = "<br /><b>Edit:</b> <a href='{$SKIN->base_url}&act=wrap&code=edit&id={$r['tmpl_id']}'>Wrapper</a>
&middot; <a href='{$SKIN->base_url}&act=templ&code=edit&id={$r['set_id']}'>HTML</a>
&middot; <a href='{$SKIN->base_url}&act=style&code=edit&id={$r['css_id']}'>CSS</a>
&middot; <a href='{$SKIN->base_url}&act=style&code=colouredit&id={$r['css_id']}'>Colours</a>
&middot; <a href='{$SKIN->base_url}&act=image&code=edit&id={$r['macro_id']}'>Macros</a>";
$ADMIN->html .= $SKIN->add_td_row( array( "<b>".$std->txt_stripslashes($r['sname'])."</b>$extra".$editlist,
"<center>".$r['mcount']."</center>",
"<center><a href='".$SKIN->base_url."&act=sets&code=export&id={$r['uid']}'>Export</a></center>",
"<center><a href='".$SKIN->base_url."&act=sets&code=edit&id={$r['uid']}'>Edit</a></center>",
@@ -796,28 +835,35 @@ class ad_settings {
$ADMIN->html .= $SKIN->end_table();
}
if ( count($used_ids) > 0 )
if ( count($used_ids) < 1 )
{
$DB->query("SELECT * FROM ibf_skins");
$left_one = $DB->get_num_rows();
}
else if ( count($used_ids) > 0 )
{
$DB->query("SELECT * FROM ibf_skins WHERE uid NOT IN(".implode(",",$used_ids).")");
$left_two = $DB->get_num_rows();
}
if ( $DB->get_num_rows() )
if ( $left_one > 0 or $left_two > 0 )
{
$SKIN->td_header[] = array( "Title" , "60%" );
$SKIN->td_header[] = array( "Export" , "10%" );
$SKIN->td_header[] = array( "Edit" , "10%" );
$SKIN->td_header[] = array( "Remove" , "10%" );
$SKIN->td_header[] = array( "Hidden" , "5%" );
$SKIN->td_header[] = array( "Default", "5%" );
$ADMIN->html .= $SKIN->start_table( "Skin Sets not used by Members" );
while ( $r = $DB->fetch_row() )
{
$SKIN->td_header[] = array( "Title" , "60%" );
$SKIN->td_header[] = array( "Export" , "10%" );
$SKIN->td_header[] = array( "Edit" , "10%" );
$SKIN->td_header[] = array( "Remove" , "10%" );
$SKIN->td_header[] = array( "Hidden" , "5%" );
$SKIN->td_header[] = array( "Default", "5%" );
$ADMIN->html .= $SKIN->start_table( "Skin Sets not used by Members" );
while ( $r = $DB->fetch_row() )
{
$extra = "";
$extra = "";
if ( is_array($forum_skins[ $r['sid'] ]) )
{
if ( count($forum_skins[ $r['sid'] ]) > 0 )
@@ -839,23 +885,28 @@ class ad_settings {
$default = "<span style='color:red;font-weight:bold'>X</span>";
}
$editlist = "<br /><b>Edit:</b> <a href='{$SKIN->base_url}&act=wrap&code=edit&id={$r['tmpl_id']}'>Wrapper</a>
&middot; <a href='{$SKIN->base_url}&act=templ&code=edit&id={$r['set_id']}'>HTML</a>
&middot; <a href='{$SKIN->base_url}&act=style&code=edit&id={$r['css_id']}'>CSS</a>
&middot; <a href='{$SKIN->base_url}&act=style&code=colouredit&id={$r['css_id']}'>Colours</a>
&middot; <a href='{$SKIN->base_url}&act=image&code=edit&id={$r['macro_id']}'>Macros</a>";
$ADMIN->html .= $SKIN->js_checkdelete();
$ADMIN->html .= $SKIN->add_td_row( array( "<b>".stripslashes($r['sname'])."</b>$extra",
$ADMIN->html .= $SKIN->add_td_row( array( "<b>".$std->txt_stripslashes($r['sname'])."</b>$extra".$editlist,
"<center><a href='".$SKIN->base_url."&act=sets&code=export&id={$r['uid']}'>Export</a></center>",
"<center><a href='".$SKIN->base_url."&act=sets&code=edit&id={$r['uid']}'>Edit</a></center>",
"<center><a href='javascript:checkdelete(\"act=sets&code=remove&id={$r['uid']}\")'>Remove</a></center>",
"<center>$hidden</center>",
"<center>$default</center>",
) );
$form_array[] = array( $r['uid'], $r['sname'] );
}
$ADMIN->html .= $SKIN->end_table();
$form_array[] = array( $r['uid'], $r['sname'] );
}
$ADMIN->html .= $SKIN->end_table();
}
//+-------------------------------
+592 -130
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > CSS management functions
@@ -21,6 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_settings();
@@ -30,7 +37,20 @@ class ad_settings {
var $base_url;
function ad_settings() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -80,12 +100,16 @@ class ad_settings {
$this->easy_edit();
break;
case 'editcomments':
$this->edit_comments();
case 'doresync':
$this->do_resynch();
break;
case 'colouredit':
$this->colouredit();
break;
case 'doeditcomments':
$this->do_edit_comments();
case 'docolour':
$this->do_colouredit();
break;
//-------------------------
@@ -98,13 +122,9 @@ class ad_settings {
//+-------------------------------
//+-------------------------------
function do_edit_comments()
function do_resynch()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
@@ -122,61 +142,110 @@ class ad_settings {
$ADMIN->error("Could not query the CSS details from the database");
}
$DB->query("UPDATE ibf_css SET css_comments='{$IN['comments']}' WHERE cssid='".$IN['id']."'");
if ( $IN['favour'] == 'cache' )
{
$cache_file = ROOT_PATH."cache/css_".$IN['id'].".css";
if ( file_exists( $cache_file ) )
{
$FH = fopen( $cache_file, 'r' );
$cache_data = fread( $FH, filesize($cache_file) );
fclose($FH);
}
else
{
$ADMIN->error("Could not locate cached CSS file @ $cache_file");
}
$dbr = $DB->compile_db_update_string( array( 'css_text' => $cache_data ) );
$DB->query("UPDATE ibf_css SET $dbr WHERE cssid='".$IN['id']."'");
}
else
{
$cache_file = ROOT_PATH."cache/css_".$IN['id'].".css";
$FH = fopen( $cache_file, 'w' );
fputs( $FH, $cssinfo['css_text'], strlen($cssinfo['css_text']) );
fclose($FH);
}
$ADMIN->done_screen("Comments Updated", "Manage Style Sheets", "act=style" );
if ( $IN['return'] != 'colouredit' )
{
$this->do_form('edit');
}
else
{
$this->colouredit();
}
}
//+-------------------------------
function edit_comments()
function resync_splash($db_length, $cache_length, $cache_mtime, $db_mtime, $id, $return="")
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//+-------------------------------
if ($IN['id'] == "")
{
$ADMIN->error("You must specify an existing wrapper ID, go back and try again");
}
//+-------------------------------
$DB->query("SELECT cssid, css_text, css_name, css_comments FROM ibf_css WHERE cssid='".$IN['id']."'");
if ( ! $cssinfo = $DB->fetch_row() )
{
$ADMIN->error("Could not query the CSS details from the database");
}
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//+-------------------------------
$ADMIN->page_detail = "Please enter or edit the comments below";
$ADMIN->page_title = "Edit Comments for Style Sheet '{$cssinfo['css_name']}'";
$ADMIN->page_detail = "A mismatch has been found between the cached style sheet and the style sheet stored in the database";
$ADMIN->page_title = "Resynchronise Style Sheet";
//+-------------------------------
$SKIN->td_header[] = array( "CSS" , "40%" );
$SKIN->td_header[] = array( "Comment" , "60%" );
$SKIN->td_header[] = array( "&nbsp;" , "50%" );
$SKIN->td_header[] = array( "&nbsp;" , "50%" );
//+-------------------------------
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'doeditcomments' ),
2 => array( 'act' , 'style' ),
3 => array( 'id' , $IN['id'] ),
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'doresync' ),
2 => array( 'act' , 'style' ),
3 => array( 'id' , $id ),
4 => array( 'return', $return ),
) );
$favour = 'db';
$ADMIN->html .= $SKIN->start_table( "Edit Comments" );
$ADMIN->html .= $SKIN->start_table( "Resynch CSS before editing..." );
if ( intval($cache_mtime) > intval($db_mtime) )
{
$ADMIN->html .= $SKIN->add_td_row( array(
"<b>CSS in database last updated:</b> ".$ADMIN->get_date($db_mtime, 'LONG'),
"<b>CSS in database, # characters:</b> $db_length",
) );
$ADMIN->html .= $SKIN->add_td_row( array(
"<span style='color:red'><b>CSS in CACHE last updated:</b> ".$ADMIN->get_date($cache_mtime, 'LONG')."</span>",
"<span style='color:red'><b>CSS in CACHE, # characters:</b> $cache_length</span>",
) );
$favour = 'cache';
}
else
{
$ADMIN->html .= $SKIN->add_td_row( array(
"<span style='color:red'><b>CSS in database last updated:</b> ".$ADMIN->get_date($db_mtime, 'LONG')."</span>",
"<span style='color:red'><b>CSS in database, # characters:</b> $db_length</span>",
) );
$ADMIN->html .= $SKIN->add_td_row( array(
"<b>CSS in CACHE last updated:</b> ".$ADMIN->get_date($cache_mtime, 'LONG'),
"<b>CSS in CACHE, # characters:</b> $cache_length",
) );
}
$ADMIN->html .= $SKIN->add_td_row( array(
"<b>Edit the comments for this stylesheet",
$SKIN->form_textarea( "comments", str_replace("<br>", "\n", $cssinfo['comments']) )
) );
$ADMIN->html .= $SKIN->add_td_basic("Back to: <a href='".$SKIN->base_url."&act=style'>Manage Style Sheets</a> -&gt; <a href='".$SKIN->base_url."&act=style&code=edit&id={$IN['id']}'>Edit Options</a>", "center", "title");
"<b>Resynchronise using....</b>",
$SKIN->form_dropdown( 'favour', array(
0 => array( 'cache', 'Overwrite database version with cached version'),
1 => array( 'db' , 'Update cached version from the database' ),
), $favour ),
) );
$ADMIN->html .= $SKIN->end_form("Edit the comments");
$ADMIN->html .= $SKIN->end_form("Resynchronise");
$ADMIN->html .= $SKIN->end_table();
@@ -191,73 +260,12 @@ class ad_settings {
// ADD / EDIT WRAPPERS
//-------------------------------------------------------------
function edit_splash()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//+-------------------------------
if ($IN['id'] == "")
{
$ADMIN->error("You must specify an existing wrapper ID, go back and try again");
}
//+-------------------------------
$DB->query("SELECT cssid, css_text, css_name FROM ibf_css WHERE cssid='".$IN['id']."'");
if ( ! $cssinfo = $DB->fetch_row() )
{
$ADMIN->error("Could not query the CSS details from the database");
}
//+-------------------------------
$ADMIN->page_detail = "Please select your editing option.";
$ADMIN->page_title = "Edit Style Sheet '{$cssinfo['css_name']}'";
//+-------------------------------
$SKIN->td_header[] = array( "Option" , "40%" );
$SKIN->td_header[] = array( "Description" , "60%" );
//+-------------------------------
$ADMIN->html .= $SKIN->start_table( "Choose an option" );
$ADMIN->html .= $SKIN->add_td_row( array(
"<a href='".$SKIN->base_url."&act=style&code=edit2&id={$IN['id']}'>CSS Editing</a>",
"Edit the stylesheet as a complete resource in a similar environment as a text editor",
) );
$ADMIN->html .= $SKIN->add_td_row( array(
"<a href='".$SKIN->base_url."&act=style&code=editupload&id={$IN['id']}'>Upload a stylesheet</a>",
"Upload a stylesheet from your hard drive to replace the one stored in the database",
) );
$ADMIN->html .= $SKIN->add_td_row( array(
"<a href='".$SKIN->base_url."&act=style&code=editcomments&id={$IN['id']}'>Edit Comments</a>",
"Edit the comments that indicate where the CSS definitions are used in the templates",
) );
$ADMIN->html .= $SKIN->add_td_basic("Back to: <a href='".$SKIN->base_url."&act=style'>Manage Style Sheets</a>", "center", "title");
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->output();
}
function css_upload($type='new')
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_FILES;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_FILES;
$FILE_NAME = $HTTP_POST_FILES['FILE_UPLOAD']['name'];
$FILE_SIZE = $HTTP_POST_FILES['FILE_UPLOAD']['size'];
@@ -319,9 +327,24 @@ class ad_settings {
'css_name' => $real_name,
'css_text' => $css,
'css_comments' => $comments,
'updated' => time(),
) );
$DB->query("INSERT INTO ibf_css (".$dbs['FIELD_NAMES'].") VALUES(".$dbs['FIELD_VALUES'].")");
$new_id = $DB->get_insert_id();
if ( file_exists( ROOT_PATH."cache" ) )
{
if ( is_writeable( ROOT_PATH."cache" ) )
{
$FH = fopen( ROOT_PATH."cache/css_".$new_id.".css", 'w' );
fputs( $FH, $css, strlen($css) );
fclose($FH);
}
}
$ADMIN->done_screen("Stylesheet uploaded", "Manage Style Sheets", "act=style" );
}
@@ -333,7 +356,7 @@ class ad_settings {
function optimize()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -377,7 +400,7 @@ class ad_settings {
if ( count($parsed) < 1)
{
$ADMIN->error("The stylesheet is in a format that Invision Board cannot understand, no optimization done.");
$ADMIN->error("The stylesheet is in a format that Invision Power Board cannot understand, no optimization done.");
}
// Clean them up
@@ -414,7 +437,7 @@ class ad_settings {
if ($final_size < 1000)
{
$ADMIN->error("The stylesheet is in a format that Invision Board cannot understand, no optimization done.");
$ADMIN->error("The stylesheet is in a format that Invision Power Board cannot understand, no optimization done.");
}
// Update the DB
@@ -431,7 +454,7 @@ class ad_settings {
$pc_saved = sprintf( "%.2f", ($saved / $orig_size) * 100);
}
$ADMIN->done_screen("Stylesheet updated<br>Characters Saved: $saved ($pc_saved %)", "Manage Style Sheets", "act=style" );
$ADMIN->done_screen("Stylesheet updated: Characters Saved: $saved ($pc_saved %)", "Manage Style Sheets", "act=style" );
@@ -442,7 +465,7 @@ class ad_settings {
function export()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -478,7 +501,7 @@ class ad_settings {
function remove()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
@@ -490,6 +513,11 @@ class ad_settings {
$DB->query("DELETE FROM ibf_css WHERE cssid='".$IN['id']."'");
if ( file_exists( ROOT_PATH."cache/css_".$IN['id'].".css" ) )
{
@unlink( ROOT_PATH."cache/css_".$IN['id'].".css" );
}
$std->boink_it($SKIN->base_url."&act=style");
exit();
@@ -505,7 +533,7 @@ class ad_settings {
function save_wrapper( $type='add' )
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
@@ -532,6 +560,7 @@ class ad_settings {
$barney = array( 'css_name' => stripslashes($HTTP_POST_VARS['name']),
'css_text' => $css,
'updated' => time(),
);
if ($type == 'add')
@@ -542,6 +571,21 @@ class ad_settings {
$new_id = $DB->get_insert_id();
//--------------------------------------------
// Update cache?
//--------------------------------------------
if ( file_exists( ROOT_PATH."cache" ) )
{
if ( is_writeable( ROOT_PATH."cache" ) )
{
$FH = fopen( ROOT_PATH."cache/css_".$new_id.".css", 'w' );
fputs( $FH, $css, strlen($css) );
fclose($FH);
}
}
$std->boink_it($SKIN->base_url."&act=style");
exit();
@@ -553,10 +597,40 @@ class ad_settings {
$DB->query("UPDATE ibf_css SET $db_string WHERE cssid='".$IN['id']."'");
//--------------------------------------------
// Update cache?
//--------------------------------------------
$extra = "<b>Cache file updated</b>";
if ( file_exists( ROOT_PATH."cache" ) )
{
if ( is_writeable( ROOT_PATH."cache" ) )
{
if ( $FH = @fopen( ROOT_PATH."cache/css_".$IN['id'].".css", 'w' ) )
{
@fputs( $FH, $css, strlen($css) );
@fclose($FH);
}
else
{
$extra = "<b>Cache file not updated. Check CHMOD permissions on ./cache and ./cache/css_".$IN['id'].".css</b>";
}
}
else
{
$extra = "<b>Cache file not updated. Check CHMOD permissions on ./cache and ./cache/css_".$IN['id'].".css</b>";
}
}
else
{
$extra = "<b>Cache file not updated. Cache folder not present</b>";
}
$ADMIN->nav[] = array( 'act=style' ,'Style Sheet Control Home' );
$ADMIN->nav[] = array( "act=style&code=edit2&id={$IN['id']}" ,"Edit Sheet Again" );
$ADMIN->done_screen("Stylesheet updated", "Manage Style Sheets", "act=style" );
$ADMIN->done_screen("Stylesheet updated : $extra", "Manage Style Sheets", "act=style" );
}
@@ -564,13 +638,10 @@ class ad_settings {
}
//-------------------------------------------------------------
// ADD / EDIT WRAPPERS
//-------------------------------------------------------------
function do_form( $type='add' )
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//+-------------------------------
@@ -581,7 +652,7 @@ class ad_settings {
//+-------------------------------
$DB->query("SELECT cssid, css_text, css_name FROM ibf_css WHERE cssid='".$IN['id']."'");
$DB->query("SELECT cssid, css_text, css_name, updated FROM ibf_css WHERE cssid='".$IN['id']."'");
if ( ! $cssinfo = $DB->fetch_row() )
{
@@ -602,10 +673,40 @@ class ad_settings {
{
$code = 'doedit';
$button = 'Edit Stylesheet';
//+-------------------------------
// DB same as cache version?
//+-------------------------------
$cache_file = ROOT_PATH."cache/css_".$IN['id'].".css";
if ( file_exists( $cache_file ) )
{
$FH = fopen( $cache_file, 'r' );
$cache_data = fread( $FH, filesize($cache_file) );
fclose($FH);
$db_length = strlen( trim($css) );
$cache_length = strlen(trim($cache_data));
if ($db_length != $cache_length)
{
// We've got ourselves a mismatch!
// Get mtime of cache file
$stat = stat( $cache_file );
$cache_mtime = $stat[9];
$db_mtime = $cssinfo['updated'];
$this->resync_splash($db_length, $cache_length, $cache_mtime, $db_mtime, $IN['id']);
}
}
}
//+-------------------------------
// Start the CSS matcher thingy
// COLURS!ooO!
//+-------------------------------
//.class { definitions }
@@ -708,9 +809,16 @@ class ad_settings {
$SKIN->form_input('name', $cssinfo['css_name']),
) );
$ADMIN->html .= $SKIN->end_table();
$SKIN->td_header[] = array( "{none}" , "100%" );
//+-------------------------------
$ADMIN->html .= $SKIN->start_table( "Contents" );
$ADMIN->html .= $SKIN->add_td_row( array(
"Content<br><br>(<a href='html/sys-img/css.html' target='_blank'>Launch Style Maker</a>)",
$SKIN->form_textarea('css', $css, "70", "30"),
"<center>".$SKIN->form_textarea('css', $css, $INFO['tx'], $INFO['ty'])."<br /><a href='html/sys-img/css.html' target='_blank'>Launch Style Maker</a></center>",
) );
$ADMIN->html .= $SKIN->end_form($button);
@@ -723,6 +831,360 @@ class ad_settings {
$ADMIN->output();
}
//-------------------------------------------------------------
// EDIT COLOURS START
//-------------------------------------------------------------
function colouredit()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//+-------------------------------
if ($IN['id'] == "")
{
$ADMIN->error("You must specify an existing wrapper ID, go back and try again");
}
//+-------------------------------
$DB->query("SELECT cssid, css_text, css_name, updated FROM ibf_css WHERE cssid='".$IN['id']."'");
if ( ! $cssinfo = $DB->fetch_row() )
{
$ADMIN->error("Could not query the CSS details from the database");
}
$css = $cssinfo['css_text'];
//+-------------------------------
// DB same as cache version?
//+-------------------------------
$cache_file = ROOT_PATH."cache/css_".$IN['id'].".css";
if ( file_exists( $cache_file ) )
{
$FH = fopen( $cache_file, 'r' );
$cache_data = fread( $FH, filesize($cache_file) );
fclose($FH);
$db_length = strlen( $css );
$cache_length = strlen($cache_data);
if ($db_length != $cache_length)
{
// We've got ourselves a mismatch!
// Get mtime of cache file
$stat = stat( $cache_file );
$cache_mtime = $stat[9];
$db_mtime = $cssinfo['updated'];
if ( $cache_mtime != $db_mtime and ( $db_length - $cache_length > 3 ))
{
$this->resync_splash($db_length, $cache_length, $cache_mtime, $db_mtime, $IN['id'], 'colouredit');
}
}
}
//+-------------------------------
// Start the CSS matcher thingy
//+-------------------------------
//.class { definitions }
//#id { definitions }
$colours = array();
// Make http:// safe..
//
preg_match_all( "/([\:\.\#\w\s,]+)\{(.+?)\}/s", $css, $match );
for ($i=0; $i < count($match[0]); $i++)
{
$name = trim($match[1][$i]);
$content = trim($match[2][$i]);
$defs = explode( ';', $content );
if ( count( $defs ) > 0 )
{
foreach( $defs as $a )
{
$a = trim($a);
if ( $a != "" )
{
list( $property, $value ) = explode( ":", $a, 2 );
$property = trim($property);
$value = trim($value);
if ( $property and $value )
{
if ( $property == 'color' or $property == 'background-color' or $property == 'border' or $property == 'background-image' )
{
$colours[ $name ][$property] = $value;
}
}
}
}
}
}
if ( count($colours) < 1 )
{
$ADMIN->error("CSS all gone wonky! No colours to edit");
}
//+-------------------------------
// Get $skin_names stuff
require './sources/Admin/skin_info.php';
$ADMIN->page_detail = "You edit the existing colours below. <strong><a href='html/sys-img/colours.html' target='_blank'>Launch Colour Picker</a></center></strong>";
$ADMIN->page_title = "Manage Style Sheets [ Colours ]";
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'docolour' ),
2 => array( 'act' , 'style' ),
3 => array( 'id' , $IN['id'] ),
) );
//+-------------------------------
$SKIN->td_header[] = array( "Property" , "25%" );
$SKIN->td_header[] = array( "&nbsp;" , "75%" );
//+-------------------------------
$ADMIN->html .= $SKIN->start_table( "CSS Colours" );
foreach ( $colours as $prop => $val )
{
$tbl_colour = "";
$tbl_bg = "";
$tbl_html = "";
$desc = $css_names[ $prop ];
if ( $desc == "" )
{
$desc = 'None available';
}
$name = $prop;
$md5 = md5($name);
if ( strlen($name) > 30 )
{
$name = substr( $name, 0, 30 ) .'...';
}
$ADMIN->html .= $SKIN->add_td_row( array(
"<strong>".$name."</strong><br />($desc)",
"<table width='100%' border='0' cellpadding='4' cellspacing='0'>
<tr>
<td width='20%'>Font Colour</td><td width='30%'>".
$SKIN->form_simple_input('frm_'.$md5.'_color' , $val['color'], "8")."&nbsp;&nbsp;<input type='text' size='6' style='border:1px solid black;background-color:{$val['color']}' readonly='readonly'>"
."</td>
<td width='20%'>Background Colour</td><td width='30%'>".
$SKIN->form_simple_input('frm_'.$md5.'_background-color', $val['background-color'], "8")."&nbsp;&nbsp;<input type='text' size='6' style='border:1px solid black;background-color:{$val['background-color']}' readonly='readonly'>"
."</td>
</tr>
<tr>
<td>Border</td><td width='30%'>".
$SKIN->form_simple_input('frm_'.$md5.'_border' , $val['border'], "20")
."</td>
<td>Background-image</td><td width='30%'>".
$SKIN->form_simple_input('frm_'.$md5.'_background-image', $val['background-image'], "30")
."</td></tr></table>"
) );
}
$ADMIN->html .= $SKIN->end_form("Edit");
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->output();
}
//-------------------------------------------------------------
// EDIT COLOURS START
//-------------------------------------------------------------
function do_colouredit()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
if ($IN['id'] == "")
{
$ADMIN->error("You must specify an existing wrapper ID, go back and try again");
}
//+-------------------------------
$DB->query("SELECT cssid, css_text, css_name, updated FROM ibf_css WHERE cssid='".$IN['id']."'");
if ( ! $cssinfo = $DB->fetch_row() )
{
$ADMIN->error("Could not query the CSS details from the database");
}
$css = $cssinfo['css_text'];
//+-------------------------------
// Start the CSS matcher thingy
//+-------------------------------
$colours = array();
preg_match_all( "/([\:\.\#\w\s,]+)\{(.+?)\}/s", $css, $match );
for ($i=0; $i < count($match[0]); $i++)
{
$name = trim($match[1][$i]);
$content = trim($match[2][$i]);
$md5 = md5($name);
$defs = explode( ';', $content );
if ( count( $defs ) > 0 )
{
foreach( $defs as $a )
{
$a = trim($a);
if ( $a != "" )
{
list( $property, $value ) = explode( ":", $a, 2 );
$property = trim($property);
$value = trim($value);
if ( $property and $value )
{
if ( $property != 'color' and $property != 'background-color' and $property != 'border' and $property != 'background-image' )
{
$colours[ $name ][$property] = $value;
}
}
}
}
}
foreach( array( 'color', 'background-color', 'border', 'background-image' ) as $prop )
{
if ( isset($HTTP_POST_VARS['frm_'.$md5.'_'.$prop]) )
{
$colours[ $name ][$prop] = stripslashes($HTTP_POST_VARS['frm_'.$md5.'_'.$prop]);
}
}
}
if ( count($colours) < 1 )
{
$ADMIN->error("CSS all gone wonky! No colours to edit");
}
//+-------------------------------
unset($name);
unset($property);
$final = "";
foreach( $colours as $name => $property )
{
$final .= $name." { ";
if ( is_array($property) and count($property) > 0 )
{
foreach( $property as $key => $value )
{
if ( $key AND $value )
{
$final .= $key.": ".$value.";";
}
}
}
$final .= " }\n";
}
$barney = array(
'css_text' => $final,
'updated' => time(),
);
$db_string = $DB->compile_db_update_string( $barney );
$DB->query("UPDATE ibf_css SET $db_string WHERE cssid='".$IN['id']."'");
//--------------------------------------------
// Update cache?
//--------------------------------------------
$extra = "<b>Cache file updated</b>";
if ( file_exists( ROOT_PATH."cache" ) )
{
if ( is_writeable( ROOT_PATH."cache" ) )
{
if ( $FH = @fopen( ROOT_PATH."cache/css_".$IN['id'].".css", 'w' ) )
{
@fputs( $FH, $css, strlen($css) );
@fclose($FH);
}
else
{
$extra = "<b>Cache file not updated. Check CHMOD permissions on ./cache and ./cache/css_".$IN['id'].".css</b>";
}
}
else
{
$extra = "<b>Cache file not updated. Check CHMOD permissions on ./cache and ./cache/css_".$IN['id'].".css</b>";
}
}
else
{
$extra = "<b>Cache file not updated. Cache folder not present</b>";
}
$ADMIN->nav[] = array( 'act=style' ,'Style Sheet Control Home' );
$ADMIN->nav[] = array( "act=style&code=edit2&id={$IN['id']}" ,"Edit Sheet Again (Advanced)" );
$ADMIN->nav[] = array( "act=style&code=colouredit&id={$IN['id']}" ,"Edit Colours Again?" );
$ADMIN->done_screen("Stylesheet updated : $extra", "Manage Style Sheets", "act=style" );
}
//-------------------------------------------------------------
@@ -731,7 +1193,7 @@ class ad_settings {
function list_sheets()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
$show_array = array();
+187
View File
@@ -0,0 +1,187 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Subscription Manager For IPB
| > Module written by Matt Mecham
| > Date started: 19th August 2003
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_subscriptions();
class ad_subscriptions {
var $base_url;
function ad_subscriptions()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
$ADMIN->page_title = "IPB Subscriptions Manager";
$ADMIN->page_detail = "You can set up and manage your member's paid subscriptions in this section.";
$ADMIN->nav[] = array( 'act=msubs' , 'IPB Subscription Manager Home' );
$ADMIN->nav[] = array( 'act=msubs&code=dosearch', 'Show all subscribed members' );
//---------------------------------------
// Do some set up
//---------------------------------------
if ( ! @is_dir( ROOT_PATH.'/modules/subsmanager' ) )
{
$std->boink_it("http://customer.invisionpower.com/ipb/subs/redirect_acp.php");
}
else
{
define( 'IPB_CALLED', 1 );
require ROOT_PATH.'/modules/subsmanager/ad_plugin_subsm.php';
$PLUGIN = new ad_plugin_subsm();
}
//---------------------------------------
switch($IN['code'])
{
case 'editpkginfo':
$PLUGIN->edit_pkg_gateway_info();
break;
case 'doeditpkg':
$PLUGIN->doedit_pkg_gateway_info();
break;
//-------------------------
case 'removepackage':
$PLUGIN->remove_package();
break;
case 'doremovepackage':
$PLUGIN->do_remove_package();
break;
//-------------------------
case 'removemembers':
$PLUGIN->remove_members();
break;
case 'doremovemembers':
$PLUGIN->do_remove_members();
break;
//-------------------------
case 'addpackage':
$PLUGIN->alter_package_form('add');
break;
case 'doaddpackage':
$PLUGIN->do_add_package();
break;
//-------------------------
case 'editpackage':
$PLUGIN->alter_package_form('edit');
break;
case 'doeditpackage':
$PLUGIN->do_edit_package();
break;
//-------------------------
case 'editmethod':
$PLUGIN->edit_method();
break;
case 'doeditmethod':
$PLUGIN->do_edit_method();
break;
//-------------------------
case 'dosearch':
$PLUGIN->do_search();
break;
case 'searchlog':
$PLUGIN->do_search_log();
break;
case 'searchlogview':
$PLUGIN->do_search_log_view();
break;
//-------------------------
case 'domodifytrans':
$PLUGIN->do_modify_trans();
break;
case 'dotransdelete':
$PLUGIN->do_delete_trans();
break;
//-------------------------
case 'edittransaction':
$PLUGIN->edit_transaction('edit');
break;
case 'addtransaction':
$PLUGIN->edit_transaction('add');
break;
case 'doedittransaction':
$PLUGIN->save_transaction('edit');
break;
case 'doaddtransaction':
$PLUGIN->save_transaction('add');
break;
case 'overview':
$PLUGIN->do_overview();
break;
//-------------------------
case 'currency':
$PLUGIN->currency_index();
break;
case 'editcurrency':
$PLUGIN->currency_edit();
break;
case 'deletecurrency':
$PLUGIN->currency_delete();
break;
default:
$PLUGIN->index_screen();
break;
}
}
}
?>
File diff suppressed because it is too large. Load diff
+216
View File
@@ -0,0 +1,216 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
+---------------------------------------------------------------------------
|
| > Admin: Warning Functions
| > Module written by Matt Mecham
| > Date started: 23rd April 2003
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_warning();
$root_path = "";
class ad_warning {
var $base_url;
function ad_warning()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $ibforums;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
$ADMIN->nav[] = array( 'act=warn', 'Warning Set-up' );
$ADMIN->page_detail = "This section will allow you to modify your warning parameters";
$ADMIN->page_title = "Member Warning Set-up";
//---------------------------------------
switch($IN['code'])
{
//---------------------
default:
$this->overview();
break;
}
}
//---------------------------------------------------------------
//
// Overview: show um.. overview.
//
//---------------------------------------------------------------
function overview()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $ibforums;
$unit_map = array(
'd' => 'Day(s)' ,
'h' => 'Hour(s)',
);
$SKIN->td_header[] = array( "Warn Level" , "20%" );
$SKIN->td_header[] = array( "Details" , "80%" );
$ADMIN->html .= $SKIN->start_table( "Currently active Auto tasks" );
$warns = array();
$DB->query("SELECT * from ibf_warn_settings ORDER BY warn_level");
while ( $r = $DB->fetch_row() )
{
$warns[ $r['warn_level'] ][] = $r;
}
if ( count($warns) > 0 )
{
foreach( $warns as $id => $data )
{
$tmp = "";
$ban = "";
$mod = "";
$nop = "";
if ( $data['warn_ban'] != "" )
{
if ( $data['warn_ban'] == 'p' )
{
$ban = "Permanent Ban";
}
else
{
list ($val, $unit) = explode( ',', $data['warn_ban'] );
$ban = "Temporary suspension for ".$val." ".$unit_map[$unit];
}
}
if ( $data['warn_modq'] != "" )
{
if ( $data['warn_modq'] == 'p' )
{
$mod = "Permanent post moderation";
}
else
{
list ($val, $unit) = explode( ',', $data['warn_modq'] );
$mod = "Require post moderation for ".$val." ".$unit_map[$unit];
}
}
if ( $data['warn_nopost'] != "" )
{
if ( $data['warn_nopost'] == 'p' )
{
$nop = "Permanent post banning";
}
else
{
list ($val, $unit) = explode( ',', $data['warn_nopost'] );
$nop = "Post ban for ".$val." ".$unit_map[$unit];
}
}
$html = "<table width='100%' cellpadding='4'>";
if ( $ban != "" )
{
$html .= "<tr>
<td width='20%'><strong>Ban</strong></td>
<td width='30%'>$ban</td>
<td width='25%'>Edit</td>
<td width='25%'>Remove</td>
</tr>";
}
if ( $mod != "" )
{
$html .= "<tr>
<td width='20%'><strong>Post Moderation</strong></td>
<td width='30%'>$mod</td>
<td width='25%'>Edit</td>
<td width='25%'>Remove</td>
</tr>";
}
if ( $nop != "" )
{
$html .= "<tr>
<td width='20%'><strong>Post Ban</strong></td>
<td width='30%'>$nop</td>
<td width='25%'>Edit</td>
<td width='25%'>Remove</td>
</tr>";
}
$html .= "</table>";
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$warns['warn_level']}</b>",
$html
) );
}
}
$ADMIN->html .= $SKIN->add_td_basic( 'Add new auto task', 'center', 'pformstrip' );
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->output();
}
}
?>
+542
View File
@@ -0,0 +1,542 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Warn Log functions
| > Module written by Matt Mecham
| > Date started: 4th June 2003
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_warnlogs();
class ad_warnlogs {
var $base_url;
function ad_warnlogs() {
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
case 'view':
$this->view();
break;
case 'viewcontact':
$this->view_contact();
break;
case 'viewnote':
$this->view_note();
break;
case 'remove':
$this->remove();
break;
//-------------------------
default:
$this->list_current();
break;
}
}
//---------------------------------------------
// View NOTE in da pop up innit
//---------------------------------------------
function view_note()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
$ADMIN->error("Could not resolve the email ID, please try again");
}
require( ROOT_PATH.'sources/lib/post_parser.php');
$this->parser = new post_parser(1);
$id = intval($IN['id']);
$DB->query("SELECT l.*, m.id as a_id, m.name as a_name, p.id as p_id, p.name as p_name
FROM ibf_warn_logs l
LEFT JOIN ibf_members m ON (m.id=l.wlog_mid)
LEFT JOIN ibf_members p ON (p.id=l.wlog_addedby)
WHERE l.wlog_id=$id");
if ( ! $row = $DB->fetch_row() )
{
$ADMIN->error("Could not resolve the email ID, please try again ($id)");
}
$SKIN->td_header[] = array( "&nbsp;" , "100%" );
$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_notes'], $cont );
$ADMIN->html .= $SKIN->start_table( "Warn Notes" );
$row['date'] = $ADMIN->get_date( $row['wlog_date'], 'LONG' );
$text = $this->parser->convert( array(
'TEXT' => $cont[1],
'SMILIES' => 1,
'CODE' => 1,
'HTML' => 0
) );
$ADMIN->html .= $SKIN->add_td_row( array(
"<strong>From:</strong> {$row['p_name']}
<br /><strong>To:</strong> {$row['a_name']}
<br /><strong>Sent:</strong> {$row['date']}
<hr>
<br />$text
"
) );
$ADMIN->html .= $SKIN->end_table();
$ADMIN->print_popup();
}
//---------------------------------------------
// View contact in da pop up innit
//---------------------------------------------
function view_contact()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
$ADMIN->error("Could not resolve the email ID, please try again");
}
$id = intval($IN['id']);
$DB->query("SELECT l.*, m.id as a_id, m.name as a_name, p.id as p_id, p.name as p_name
FROM ibf_warn_logs l
LEFT JOIN ibf_members m ON (m.id=l.wlog_mid)
LEFT JOIN ibf_members p ON (p.id=l.wlog_addedby)
WHERE l.wlog_id=$id");
if ( ! $row = $DB->fetch_row() )
{
$ADMIN->error("Could not resolve the email ID, please try again ($id)");
}
$type = $row['wlog_contact'] == 'pm' ? "PM" : "EMAIL";
$SKIN->td_header[] = array( "&nbsp;" , "100%" );
$subject = preg_match( "#<subject>(.+?)</subject>#is", $row['wlog_contact_content'], $subj );
$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_contact_content'], $cont );
$ADMIN->html .= $SKIN->start_table( $type.": ".$subj[1] );
$row['date'] = $ADMIN->get_date( $row['wlog_date'], 'LONG' );
$ADMIN->html .= $SKIN->add_td_row( array(
"<strong>From:</strong> {$row['p_name']}
<br /><strong>To:</strong> {$row['a_name']}
<br /><strong>Sent:</strong> {$row['date']}
<br /><strong>Subject:</strong> $subj[1]
<hr>
<br />$cont[1]
"
) );
$ADMIN->html .= $SKIN->end_table();
$ADMIN->print_popup();
}
//---------------------------------------------
// Remove archived files
//---------------------------------------------
function view()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$start = $IN['st'] ? $IN['st'] : 0;
$ADMIN->html .= $SKIN->js_pop_win();
$ADMIN->page_detail = "Viewing all warn entries on a member";
$ADMIN->page_title = "Warn Logs Manager";
if ($IN['search_string'] == "" and $IN['mid'])
{
$DB->query("SELECT COUNT(wlog_id) as count FROM ibf_warn_logs WHERE wlog_mid='".$IN['mid']."'");
$row = $DB->fetch_row();
$row_count = $row['count'];
$query = "&act=warnlog&mid={$IN['mid']}&code=view";
$DB->query("SELECT l.*, m.id as a_id, m.name as a_name, p.id as p_id, p.name as p_name
FROM ibf_warn_logs l
LEFT JOIN ibf_members m ON (m.id=l.wlog_mid)
LEFT JOIN ibf_members p ON (p.id=l.wlog_addedby)
WHERE l.wlog_mid={$IN['mid']}
ORDER BY l.wlog_date DESC LIMIT $start,30");
}
else
{
$IN['search_string'] = urldecode($IN['search_string']);
if ( ($IN['search_type'] == 'notes') )
{
$dbq = "l.wlog_notes LIKE '%".$IN['search_string']."%'";
}
else
{
$dbq = "l.wlog_contact_content LIKE '%".$IN['search_string']."%'";
}
$DB->query("SELECT COUNT(l.wlog_id) as count FROM ibf_warn_logs l WHERE $dbq");
$row = $DB->fetch_row();
$row_count = $row['count'];
$query = "&act=warnlog&code=view&search_type={$IN['search_type']}&search_string=".urlencode($IN['search_string']);
$DB->query("SELECT l.*, m.id as a_id, m.name as a_name, p.id as p_id, p.name as p_name
FROM ibf_warn_logs l
LEFT JOIN ibf_members m ON (m.id=l.wlog_mid)
LEFT JOIN ibf_members p ON (p.id=l.wlog_addedby)
WHERE $dbq
ORDER BY l.wlog_date DESC LIMIT $start,30");
}
$links = $std->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
'PER_PAGE' => 30,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "Single Page",
'L_MULTI' => "Pages: ",
'BASE_URL' => $ADMIN->base_url.$query,
)
);
$ADMIN->page_detail = "You may view warn entries added by your moderators";
$ADMIN->page_title = "Warn Logs Manager";
//+-------------------------------
$SKIN->td_header[] = array( "Type" , "5%" );
$SKIN->td_header[] = array( "Member Name" , "15%" );
$SKIN->td_header[] = array( "Contacted" , "5%" );
$SKIN->td_header[] = array( "MOD Q" , "10%" );
$SKIN->td_header[] = array( "SUSP" , "10%" );
$SKIN->td_header[] = array( "NO POST" , "10%" );
$SKIN->td_header[] = array( "Date" , "15%" );
$SKIN->td_header[] = array( "Warned By" , "15%" );
$SKIN->td_header[] = array( "View Note" , "10%" );
$ADMIN->html .= $SKIN->start_table( "Saved Warn Logs" );
$ADMIN->html .= $SKIN->add_td_basic($links, 'right', 'pformstrip');
$days = array( 'd' => "Days", 'h' => "Hours" );
if ( $DB->get_num_rows() )
{
while ( $row = $DB->fetch_row() )
{
$row['wlog_date'] = $ADMIN->get_date( $row['wlog_date'], 'LONG' );
$type = ( $row['wlog_type'] == 'pos' ) ? '<span style="color:green;font-weight:bold">-</span>' : '<span style="color:red;font-weight:bold">+</span>';
$cont = ( $row['wlog_contact'] != 'none' ) ? "<center><a href='javascript:pop_win(\"&act=warnlog&code=viewcontact&id={$row['wlog_id']}\",400,400)'>View</a></center>" : '&nbsp;';
$mod = preg_match( "#<mod>(.+?)</mod>#is" , $row['wlog_notes'], $mm );
$post = preg_match( "#<post>(.+?)</post>#is" , $row['wlog_notes'], $pm );
$susp = preg_match( "#<susp>(.+?)</susp>#is" , $row['wlog_notes'], $sm );
$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_notes'], $cm );
$content = $cm[1];
$mod = trim($mm[1]);
$post = trim($pm[1]);
$susp = trim($sm[1]);
list($v, $u, $i) = explode(',', $mod);
if ( $i == 1 )
{
$mod = 'INDEF';
}
else if ( $v == "" )
{
$mod = 'None';
}
else
{
$mod = $v.' '.$days[$u];
}
//----------
list($v, $u, $i) = explode(',', $post);
if ( $i == 1 )
{
$post = 'INDEF';
}
else if ( $v == "" )
{
$post = 'None';
}
else
{
$post = $v.' '.$days[$u];
}
list($v, $u) = explode(',', $susp);
if ( $v == "" )
{
$susp = 'None';
}
else
{
$susp = $v.' '.$days[$u];
}
//----------
$ADMIN->html .= $SKIN->add_td_row( array(
"<center>$type</center>",
"<b>{$row['a_name']}</b>",
$cont,
$mod,
$susp,
$post,
"{$row['wlog_date']}",
"<b>{$row['p_name']}</b>",
"<center><a href='javascript:pop_win(\"&act=warnlog&code=viewnote&id={$row['wlog_id']}\",400,400)'>View</a></center>"
) );
}
}
else
{
$ADMIN->html .= $SKIN->add_td_basic("<center>No results</center>");
}
$ADMIN->html .= $SKIN->add_td_basic($links, 'right', 'pformstrip');
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->output();
}
//---------------------------------------------
// Remove archived files
//---------------------------------------------
function remove()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['mid'] == "")
{
$ADMIN->error("You did not select a member ID to remove by!");
}
$DB->query("DELETE FROM ibf_warn_logs WHERE wlog_mid={$IN['mid']}");
$ADMIN->save_log("Removed Warn Logs");
$std->boink_it($ADMIN->base_url."&act=warnlog");
}
//-------------------------------------------------------------
// SHOW LOGS
//-------------------------------------------------------------
function list_current()
{
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
$ADMIN->page_detail = "You may view and remove warn actions performed by your staff.<br />Note: Removing the logs does not decrease the member's warn level";
$ADMIN->page_title = "Warn Logs Manager";
$ADMIN->html .= $SKIN->js_pop_win();
//+-------------------------------
// VIEW LAST 5
//+-------------------------------
$DB->query("SELECT l.*, m.id as a_id, m.name as a_name, p.id as p_id, p.name as p_name
FROM ibf_warn_logs l
LEFT JOIN ibf_members m ON (m.id=l.wlog_mid)
LEFT JOIN ibf_members p ON (p.id=l.wlog_addedby)
ORDER BY l.wlog_date DESC LIMIT 0,10");
$SKIN->td_header[] = array( "Type" , "5%" );
$SKIN->td_header[] = array( "Warned Member" , "25%" );
$SKIN->td_header[] = array( "Contacted?" , "5%" );
$SKIN->td_header[] = array( "Date" , "25%" );
$SKIN->td_header[] = array( "Warned By" , "25%" );
$ADMIN->html .= $SKIN->start_table( "Last 10 Warn Entries" );
if ( $DB->get_num_rows() )
{
while ( $row = $DB->fetch_row() )
{
$row['wlog_date'] = $ADMIN->get_date( $row['wlog_date'], 'LONG' );
$type = ( $row['wlog_type'] == 'pos' ) ? '<span style="color:green;font-weight:bold">-</span>' : '<span style="color:red;font-weight:bold">+</span>';
$cont = ( $row['wlog_contact'] != 'none' ) ? "<center><a title='Show message' href='javascript:pop_win(\"&act=warnlog&code=viewcontact&id={$row['wlog_id']}\",400,400)'><img src='{$SKIN->img_url}/acp_check.gif' border='0' alt='X'></a></center>" : '&nbsp;';
$ADMIN->html .= $SKIN->add_td_row( array(
"<center>$type</center>",
"<b>{$row['a_name']}</b>",
$cont,
"{$row['wlog_date']}",
"<b>{$row['p_name']}</b>",
) );
}
}
else
{
$ADMIN->html .= $SKIN->add_td_basic("<center>No results</center>");
}
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
$SKIN->td_header[] = array( "Member Name" , "30%" );
$SKIN->td_header[] = array( "Times Warned" , "20%" );
$SKIN->td_header[] = array( "View all by member" , "20%" );
$SKIN->td_header[] = array( "Remove all by member" , "30%" );
$ADMIN->html .= $SKIN->start_table( "Saved Warn Logs" );
$DB->query("SELECT l.*, m.name, count(l.wlog_mid) as act_count from ibf_warn_logs l, ibf_members m WHERE m.id=l.wlog_mid GROUP BY l.wlog_mid ORDER BY act_count DESC");
while ( $r = $DB->fetch_row() )
{
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$r['name']}</b>",
"<center>{$r['act_count']}</center>",
"<center><a href='".$SKIN->base_url."&act=warnlog&code=view&mid={$r['wlog_mid']}'>View</a></center>",
"<center><a href='".$SKIN->base_url."&act=warnlog&code=remove&mid={$r['wlog_mid']}'>Remove</a></center>",
) );
}
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->html .= $SKIN->start_form( array( 1 => array( 'code' , 'view' ),
2 => array( 'act' , 'warnlog' ),
) );
$SKIN->td_header[] = array( "&nbsp;" , "40%" );
$SKIN->td_header[] = array( "&nbsp;" , "60%" );
$ADMIN->html .= $SKIN->start_table( "Search Warn Logs" );
$form_array = array(
0 => array( 'notes' , 'Entry Notes' ),
1 => array( 'contact', 'Email/PM Sent' ),
);
//+-------------------------------
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Search for...</b>" ,
$SKIN->form_input( "search_string")
) );
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Search in...</b>" ,
$SKIN->form_dropdown( "search_type", $form_array)
) );
$ADMIN->html .= $SKIN->end_form("Search");
$ADMIN->html .= $SKIN->end_table();
//+-------------------------------
//+-------------------------------
$ADMIN->output();
}
}
?>
+51 -17
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Help Control functions
@@ -21,6 +23,11 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
$idx = new ad_settings();
@@ -30,7 +37,20 @@ class ad_settings {
var $base_url;
function ad_settings() {
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//---------------------------------------
// Kill globals - globals bad, Homer good.
//---------------------------------------
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
foreach ( $tmp_in as $k => $v )
{
unset($$k);
}
//---------------------------------------
switch($IN['code'])
{
@@ -74,7 +94,7 @@ class ad_settings {
function add_splash()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_FILES;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_FILES;
$FILE_NAME = $HTTP_POST_FILES['FILE_UPLOAD']['name'];
$FILE_SIZE = $HTTP_POST_FILES['FILE_UPLOAD']['size'];
@@ -140,7 +160,7 @@ class ad_settings {
if ( ! preg_match( "/<% COPYRIGHT %>/", $data ) )
{
$ADMIN->error("This file does not appear to be a valid Invision Board Wrapper file");
$ADMIN->error("This file does not appear to be a valid Invision Power Board Wrapper file");
}
//----------------------------------
@@ -163,7 +183,7 @@ class ad_settings {
function export()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
if ($IN['id'] == "")
{
@@ -205,7 +225,7 @@ class ad_settings {
function remove()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
@@ -232,7 +252,7 @@ class ad_settings {
function save_wrapper( $type='add' )
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS;
//+-------------------------------
@@ -254,7 +274,14 @@ class ad_settings {
$ADMIN->error("You can't have an empty template, can you?");
}
$tmpl = preg_replace( "!&lt/textarea>!", "/textarea>", stripslashes($HTTP_POST_VARS['template']) );
$tmpl = preg_replace( "!&lt;/textarea>!", "/textarea>", stripslashes($HTTP_POST_VARS['template']) );
$tmpl = str_replace( "&amp;amp;" , "&amp;" , $tmpl );
$tmpl = str_replace( "&amp;nbsp;", "&nbsp;" , $tmpl );
$tmpl = str_replace( "&amp;copy;", "&copy;" , $tmpl );
$tmpl = preg_replace( "/\\\/" , "&#092;" , $tmpl );
$tmpl = preg_replace( "/&#092;/" , '\\\\\\\\' , $tmpl ); // o_O
if ( ! preg_match( "/<% BOARD %>/", $tmpl ) )
{
@@ -299,7 +326,7 @@ class ad_settings {
function do_form( $type='add' )
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
//+-------------------------------
@@ -348,7 +375,14 @@ class ad_settings {
//+-------------------------------
$row['template'] = preg_replace( "/\/textarea>/", "&lt/textarea>", $row['template'] ); // Stop html killing the text area
$row['template'] = preg_replace( "/\/textarea>/", "&lt;/textarea>", $row['template'] ); // Stop html killing the text area
// Sort out amps and stuff
$row['template'] = str_replace( "&amp;", "&amp;amp;", $row['template'] );
$row['template'] = str_replace( "&nbsp;", "&amp;nbsp;", $row['template'] );
$row['template'] = str_replace( "&copy;", "&amp;copy;", $row['template'] );
$row['template'] = preg_replace( "/\\\/" , "&#092;" , $row['template'] );
$ADMIN->html .= $SKIN->start_table( $button );
@@ -359,7 +393,7 @@ class ad_settings {
$ADMIN->html .= $SKIN->add_td_row( array(
"Content",
$SKIN->form_textarea('template', $row['template'], "60", "15"),
$SKIN->form_textarea('template', $row['template'], $INFO['tx'], $INFO['ty']),
) );
$ADMIN->html .= $SKIN->end_form($button);
@@ -380,7 +414,7 @@ class ad_settings {
function list_wrappers()
{
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
$form_array = array();
+179 -52
View File
@@ -2,15 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Board v1.1
| Invision Power Board v1.3 Final
| ========================================
| by Matthew Mecham
| (c) 2001,2002 Invision Power Services
| http://www.ibforums.com
| (c) 2001 - 2003 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.ibforums.com
| Email: phpboards@ibforums.com
| Licence Info: phpib-licence@ibforums.com
| Web: http://www.invisionboard.com
| Time: Sun, 04 Jan 2004 00:30:16 GMT
| Release: 28e7bfb25f08ac72a789cb1b172fa185
| Email: matt@invisionpower.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
| > Admin functions library
@@ -24,11 +26,14 @@
class admin_functions {
var $img_url;
var $page_title = "Welcome to the Invision Board Administration CP";
var $page_title = "Welcome to the Invision Power Board Administration CP";
var $page_detail = "You can set up and customize your board from within this control panel.<br><br>Clicking on one of the links in the left menu pane will show you the relevant options for that administration category. Each option will contain further information on configuration, etc.";
var $html;
var $errors = "";
var $nav = array();
var $time_offset = 0;
var $jump_menu = "";
var $no_jump = 0;
function admin_functions() {
global $INFO, $IN;
@@ -36,6 +41,61 @@ class admin_functions {
$this->img_url = $INFO['html_url'].'/sys-img';
$this->base_url = $INFO['board_url']."/admin.".$INFO['php_ext']."?adsess=".$IN['AD_SESS'];
}
//---------------------------
// Makes good raw form text
//----------------------------
function make_safe($t)
{
$t = stripslashes($t);
$t = preg_replace( "/\\\/", "&#092;", $t );
return $t;
}
//---------------------------
// Sets up time offset for ACP use
//----------------------------
function get_date($date="", $method="")
{
global $INFO, $IN, $MEMBER;
$this->time_options = array( 'JOINED' => $INFO['clock_joined'],
'SHORT' => $INFO['clock_short'],
'LONG' => $INFO['clock_long']
);
if (!$date)
{
return '--';
}
if (empty($method))
{
$method = 'LONG';
}
$this->time_offset = (($MEMBER['time_offset'] != "") ? $MEMBER['time_offset'] : $INFO['time_offset']) * 3600;
if ($INFO['time_adjust'] != "" and $INFO['time_adjust'] != 0)
{
$this->time_offset += ($INFO['time_adjust'] * 60);
}
if ($MEMBER['dst_in_use'])
{
$this->time_offset += 3600;
}
return gmdate($this->time_options[$method], ($date + $this->time_offset) );
}
//**********************************************/
@@ -247,7 +307,7 @@ class admin_functions {
function rebuild_config( $new = "" )
{
global $IN, $std, $root_path;
global $IN, $std, $ADMIN, $root_path;
//-----------------------------------------
// Check to make sure this is a valid array
@@ -272,7 +332,7 @@ class admin_functions {
// (Imports $INFO)
//-----------------------------------------
require $root_path.'conf_global.php';
require ROOT_PATH.'conf_global.php';
//-----------------------------------------
// Rebuild the $INFO hash
@@ -292,13 +352,15 @@ class admin_functions {
// Rename the old config file
//-----------------------------------------
@rename( $root_path.'conf_global.php', $root_path.'conf_global-bak.php' );
@chmod( $root_path.'conf_global-bak.php', 0777);
@rename( ROOT_PATH.'conf_global.php', ROOT_PATH.'conf_global-bak.php' );
@chmod( ROOT_PATH.'conf_global-bak.php', 0777);
//-----------------------------------------
// Rebuild the old file
//-----------------------------------------
ksort($INFO);
$file_string = "<?php\n";
foreach( $INFO as $k => $v )
@@ -309,14 +371,15 @@ class admin_functions {
$v = stripslashes($v);
$v = addslashes($v);
}
$file_string .= '$INFO['."'".$k."'".']'."\t\t\t=\t'".$v."';\n";
}
$file_string .= "\n".'?'.'>'; // Question mark + greater than together break syntax hi-lighting in BBEdit 6 :p
if ( $fh = fopen( $root_path.'conf_global.php', 'w' ) )
if ( $fh = fopen( ROOT_PATH.'conf_global.php', 'w' ) )
{
fputs ($fh, $file_string, strlen($file_string) );
fwrite($fh, $file_string, strlen($file_string) );
fclose($fh);
}
else
@@ -364,39 +427,39 @@ class admin_functions {
}
$DB->query("SELECT g_id, g_title FROM ibf_groups ORDER BY g_id");
$DB->query("SELECT perm_id, perm_name FROM ibf_forum_perms ORDER BY perm_id");
while ( $data = $DB->fetch_row() )
{
if ($r_array['READ'] != '*')
{
if ($IN[ 'READ_'.$data['g_id'] ] == 1)
if ($IN[ 'READ_'.$data['perm_id'] ] == 1)
{
$r_array['READ'] .= $data['g_id'].",";
$r_array['READ'] .= $data['perm_id'].",";
}
}
//+----------------------------
if ($r_array['REPLY'] != '*')
{
if ($IN[ 'REPLY_'.$data['g_id'] ] == 1)
if ($IN[ 'REPLY_'.$data['perm_id'] ] == 1)
{
$r_array['REPLY'] .= $data['g_id'].",";
$r_array['REPLY'] .= $data['perm_id'].",";
}
}
//+----------------------------
if ($r_array['START'] != '*')
{
if ($IN[ 'START_'.$data['g_id'] ] == 1)
if ($IN[ 'START_'.$data['perm_id'] ] == 1)
{
$r_array['START'] .= $data['g_id'].",";
$r_array['START'] .= $data['perm_id'].",";
}
}
//+----------------------------
if ($r_array['UPLOAD'] != '*')
{
if ($IN[ 'UPLOAD_'.$data['g_id'] ] == 1)
if ($IN[ 'UPLOAD_'.$data['perm_id'] ] == 1)
{
$r_array['UPLOAD'] .= $data['g_id'].",";
$r_array['UPLOAD'] .= $data['perm_id'].",";
}
}
}
@@ -431,18 +494,12 @@ class admin_functions {
$html .= "</head>\n";
$html .= "</head>
<body marginheight='0' marginwidth='0' leftmargin='0' topmargin='0' bgcolor='#E7E7E7'>
<table cellspacing='0' cellpadding='2' width='100%' align='center' border='0' bgcolor='#E7E7E7'>
<tr>
<td>
<table cellspacing='3' cellpadding='2' width='100%' align='center' height='100%' border='0' bgcolor='#FFFFFF' style='border:thin solid black'>
<tr>
<td valign='top' bgcolor='#FFFFFF'>
<table cellspacing='0' cellpadding='2' border='0' align='center' width='100%' height='100%' bgcolor='#FFFFFF'>";
<body marginheight='0' marginwidth='0' leftmargin='0' topmargin='0' bgcolor='#FFFFFF'>
";
$html .= $this->html;
$html .= "</table></td></tr></table></td></tr></table></body></html>";
$html .= "</body></html>";
print $html;
@@ -461,10 +518,10 @@ class admin_functions {
$DB->close_db();
$navigation = array( "<a href='{$this->base_url}&act=index' target='body'>ACP Home</a>" );
if ( count($this->nav) > 0 )
{
$navigation = array( "<a href='{$this->base_url}&act=index' target='body'>ACP Home</a>" );
foreach ( $this->nav as $idx => $links )
{
if ($links[0] != "")
@@ -476,16 +533,24 @@ class admin_functions {
$navigation[] = $links[1];
}
}
if ( count($navigation) > 0 )
{
$html = str_replace( "<!--NAV-->", $SKIN->wrap_nav( implode( " -> ", $navigation ) ), $html );
}
}
if ( count($navigation) > 0 )
{
$html = str_replace( "<!--NAV-->", $SKIN->wrap_nav( implode( " -&gt; ", $navigation ) ), $html );
}
if ( $this->no_jump != 1 )
{
$html = str_replace( "<!--JUMP-->", $this->build_jump_menu(), $html );
}
if ($use_gzip == 1)
{
ob_start ('ob_gzhandler');
$buffer = ob_get_contents();
ob_end_clean();
ob_start('ob_gzhandler');
print $buffer;
}
//@header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@@ -508,10 +573,15 @@ class admin_functions {
function error($error="", $is_popup=0) {
global $IN, $INFO, $DB, $std, $SKIN, $HTTP_REFERER;
$this->page_title = "An Error Occured...";
$this->page_detail = "The error message returned is displayed below.";
$this->page_title = "Admin CP Message";
$this->page_detail = "&nbsp;";
$this->html .= "<tr><td><span style='font-size:14px'>$error</span><br><br><center><a href='$HTTP_REFERER'>Go Back</a></center></td></tr>";
$this->html .= "<div class='tableborder'>
<div class='maintitle'>Admin CP Message</div>
<div class='tdrow1' style='padding:8px'>
<span style='font-size:12px'>$error</span>
</div>
</div>";
if ($is_popup == 0)
{
@@ -580,12 +650,19 @@ class admin_functions {
//**********************************************/
function menu() {
global $IN, $std, $PAGES, $CATS, $SKIN;
global $IN, $std, $INFO, $PAGES, $CATS, $SKIN;
$links = $this->build_tree();
$html = $SKIN->menu_top() . $links . $SKIN->menu_foot();
// Saving cookie?
if ( $INFO['menu'] )
{
$std->my_setcookie( 'acpmenu', $IN['show'] );
}
print $html;
exit();
@@ -595,36 +672,86 @@ class admin_functions {
//+------------------------------------------------
function build_tree() {
global $IN, $std, $PAGES, $CATS, $SKIN, $DESC;
global $IN, $std, $INFO, $PAGES, $CATS, $SKIN, $DESC;
$html = "";
$links = "";
foreach($CATS as $cid => $name)
{
$ADMIN->jump_menu .= "<optgroup label='$name'>\n";
if ( preg_match( "/(?:^|,)$cid(?:,|$)/", $IN['show'] ) )
{
foreach($PAGES[ $cid ] as $pid => $pdata)
{
$links .= $SKIN->menu_cat_link($pdata[1], $pdata[0]);
}
foreach($PAGES[ $cid ] as $pid => $pdata)
{
if ( $pdata[2] != "" )
{
if ( ! @is_dir( ROOT_PATH.$pdata[2] ) )
{
continue;
}
}
$links .= $SKIN->menu_cat_link($pdata[1], $pdata[0], $pdata[3]);
}
$html .= $SKIN->menu_cat_expanded( $name, $links, $cid );
unset($links);
$html .= $SKIN->menu_cat_expanded( $name, $links, $cid );
unset($links);
}
else
{
$html .= $SKIN->menu_cat_collapsed( $name, $cid, $DESC[ $cid ] );
}
$ADMIN->jump_menu .= "</optgroup>\n";
}
return $html;
}
//-------------------------------------------------------------
// BUILDS JUMP MENU, yay!
//-------------------------------------------------------------
function build_jump_menu()
{
global $IN, $std, $PAGES, $CATS, $SKIN, $DESC;
$html = "<script type='text/javascript'>
function dojump()
{
if ( document.jumpmenu.val.options[document.jumpmenu.val.selectedIndex].value != '' )
{
window.location.href = '{$this->base_url}' + '&' + document.jumpmenu.val.options[document.jumpmenu.val.selectedIndex].value;
}
}
</script>
";
$html .= "<form name='jumpmenu'>\n<select class='jmenu' name='val'>";
foreach($CATS as $cid => $name)
{
$html .= "<optgroup label='$name'>\n";
foreach($PAGES[ $cid ] as $pid => $pdata)
{
$html .= "<option value='$pdata[1]'>$pdata[0]</option>\n";
}
$html .= "</optgroup>\n";
}
$html .= "</select>&nbsp;<input type='button' class='jmenubutton' value='Go!' onclick='dojump();' />\n</form>";
return $html;
}
}
+102 -60
View File
@@ -10,88 +10,119 @@
$PAGES = array(
0 => array (
/*0 => array (
1 => array( 'IPS Latest News' , 'act=ips&code=news' ),
2 => array( 'Check for updates' , 'act=ips&code=updates' ),
3 => array( 'Documentation' , 'act=ips&code=docs' ),
4 => array( 'Get Support' , 'act=ips&code=support' ),
5 => array( 'IPS Hosting' , 'act=ips&code=host' ),
6 => array( 'Purchase Services' , 'act=ips&code=purchase' ),
),*/
1 => array (
1 => array( 'IP Chat' , 'act=pin&code=ipchat' ),
2 => array( 'IPS Hosting' , 'act=ips&code=host' ),
3 => array( 'IPB Registration' , 'act=pin&code=reg' ),
4 => array( 'IPB Copyright Removal', 'act=pin&code=copy' ),
5 => array( 'Subscription Manager' , 'act=msubs' ),
6 => array( '&#0124;-- Logs' , 'act=msubs&code=searchlog', 'modules/subsmanager' ),
7 => array( '&#0124;-- Currency Set-up' , 'act=msubs&code=currency', 'modules/subsmanager' ),
8 => array( '&#039;-- Transactions' , 'act=msubs&code=dosearch', 'modules/subsmanager' ),
),
1 => array (
1 => array( 'Basic Config', 'act=op&code=url' ),
2 => array (
1 => array( 'General Configuration', 'act=op&code=url' ),
2 => array( 'Security & Privacy' , 'act=op&code=secure' ),
3 => array( 'Topics, Posts & Polls', 'act=op&code=post' ),
4 => array( 'User Profiles' , 'act=op&code=avatars' ),
5 => array( 'Date Formats' , 'act=op&code=dates' ),
5 => array( 'Date & Time Formats' , 'act=op&code=dates' ),
6 => array( 'CPU Saving' , 'act=op&code=cpu' ),
7 => array( 'Cookies' , 'act=op&code=cookie' ),
8 => array( 'PM Set up' , 'act=op&code=pm' ),
9 => array( 'Board on/off' , 'act=op&code=board' ),
10 =>array( 'News Set-up' , 'act=op&code=news' ),
11 =>array( 'Calendar Set-up' , 'act=op&code=calendar' ),
11 =>array( 'Calendar/Birthday' , 'act=op&code=calendar' ),
12 =>array( 'COPPA Set-up' , 'act=op&code=coppa' ),
14 =>array( 'Email Set-up' , 'act=op&code=email' ),
15 =>array( 'Server Environment' , 'act=op&code=phpinfo' ),
16 =>array( 'Board Guidelines' , 'act=op&code=glines' ),
17 =>array( 'Full Text Searching', 'act=op&code=fulltext'),
18 =>array( 'Search Engine Spiders', 'act=op&code=spider' ),
19 =>array( 'Warning Set-up' , 'act=op&code=warn' ),
20 =>array( 'IPDynamic Lite Set-up' , 'act=csite', 'sources/dynamiclite' ),
),
2 => array (
1 => array( 'New Category' , 'act=cat&code=new' ),
2 => array( 'New Forum' , 'act=forum&code=newsp' ),
3 => array( 'Manage' , 'act=cat&code=edit' ),
4 => array( 'Re-Order Categories' , 'act=cat&code=reorder'),
5 => array( 'Re-Order Forums', 'act=forum&code=reorder'),
6 => array( 'Moderators' , 'act=mod' ),
),
3 => array (
1 => array ( 'Pre-Register' , 'act=mem&code=add' ),
2 => array ( 'Find/Edit User' , 'act=mem&code=edit' ),
3 => array ( 'Delete User(s)' , 'act=mem&code=del' ),
4 => array ( 'Ban Settings' , 'act=mem&code=ban' ),
5 => array ( 'User Title/Ranks' , 'act=mem&code=title'),
6 => array ( 'Manage User Groups' , 'act=group' ),
7 => array ( 'Manage Registrations', 'act=mem&code=mod' ),
8 => array ( 'Custom Profile Fields', 'act=field' ),
9 => array ( 'Bulk Email Members' , 'act=mem&code=mail' ),
1 => array( 'New Category' , 'act=cat&code=new' ),
2 => array( 'New Forum' , 'act=forum&code=newsp' ),
3 => array( 'Manage Forums' , 'act=cat&code=edit' ),
4 => array( 'Permission Masks' , 'act=group&code=permsplash'),
5 => array( 'Re-Order Categories' , 'act=cat&code=reorder' ),
6 => array( 'Re-Order Forums' , 'act=forum&code=reorder' ),
7 => array( 'Moderators' , 'act=mod' ),
//8 => array( 'Topic Multi-Moderation', 'act=multimod' ),
),
4 => array (
1 => array( 'Manage Word Filters', 'act=op&code=bw' ),
2 => array( 'Manage Emoticons', 'act=op&code=emo' ),
3 => array( 'Manage Help Files', 'act=help' ),
4 => array( 'Recount Statistics', 'act=op&code=count' ),
5 => array( 'View Moderator Logs', 'act=modlog' ),
6 => array( 'View Admin Logs' , 'act=adminlog' ),
1 => array( 'Moderator\'s CP' , 'act=modcp' , "" , 1 ),
2 => array( 'Topic Multi-Moderation', 'act=multimod' ),
),
5 => array (
1 => array( 'Manage Board Wrappers' , 'act=wrap' ),
2 => array( 'Manage Skin Templates' , 'act=templ' ),
3 => array( 'Manage Style Sheets' , 'act=style' ),
4 => array( 'Manage Macros' , 'act=image' ),
5 => array( '<b>Manage Skin Sets</b>' , 'act=sets' ),
6 => array( 'Import Skin files' , 'act=import' ),
1 => array ( 'Pre-Register' , 'act=mem&code=add' ),
2 => array ( 'Find/Edit/Suspend User' , 'act=mem&code=edit' ),
3 => array ( 'Delete User(s)' , 'act=mem&code=del' ),
4 => array ( 'List Suspended Users', 'act=mem&code=advancedsearch&showsusp=1' ),
5 => array ( 'Ban Settings' , 'act=mem&code=ban' ),
6 => array ( 'User Title/Ranks' , 'act=mem&code=title'),
7 => array ( 'Manage User Groups' , 'act=group' ),
8 => array ( 'Manage Validating', 'act=mem&code=mod' ),
9 => array ( 'Custom Profile Fields', 'act=field' ),
10 => array ( 'Bulk Email Members' , 'act=mem&code=mail' ),
11 => array ( 'Member Tools' , 'act=mtools' ),
),
6 => array (
1 => array( 'Manage Word Filters', 'act=op&code=bw' ),
2 => array( 'Manage Emoticons', 'act=op&code=emo' ),
3 => array( 'Manage Help Files', 'act=help' ),
4 => array( 'Recount Statistics', 'act=op&code=count' ),
),
7 => array (
1 => array( '<b>Manage Skin Sets</b>' , 'act=sets' ),
2 => array( '&#0124;-- Board Wrappers' , 'act=wrap' ),
3 => array( '&#0124;-- HTML Templates' , 'act=templ' ),
4 => array( '&#0124;-- Style Sheets' , 'act=style' ),
5 => array( '&#039;-- Macros' , 'act=image' ),
6 => array( 'Import Skin files' , 'act=import' ),
7 => array( 'Skin Version Control' , 'act=skinfix' ),
),
8 => array (
1 => array( 'Manage Languages' , 'act=lang' ),
2 => array( 'Import a Language', 'act=lang&code=import' ),
),
7 => array (
9 => array (
1 => array( 'Registration Stats' , 'act=stats&code=reg' ),
2 => array( 'New Topic Stats' , 'act=stats&code=topic' ),
3 => array( 'Post Stats' , 'act=stats&code=post' ),
4 => array( 'Private Message' , 'act=stats&code=msg' ),
4 => array( 'Personal Message' , 'act=stats&code=msg' ),
5 => array( 'Topic Views' , 'act=stats&code=views' ),
),
8 => array (
10 => array (
1 => array( 'mySQL Toolbox' , 'act=mysql' ),
2 => array( 'mySQL Back Up' , 'act=mysql&code=backup' ),
3 => array( 'SQL Runtime Info', 'act=mysql&code=runtime' ),
@@ -99,33 +130,44 @@ $PAGES = array(
5 => array( 'SQL Processes' , 'act=mysql&code=processes' ),
),
11 => array(
1 => array( 'View Moderator Logs', 'act=modlog' ),
2 => array( 'View Admin Logs' , 'act=adminlog' ),
3 => array( 'View Email Logs' , 'act=emaillog' ),
4 => array( 'View Bot Logs' , 'act=spiderlog' ),
5 => array( 'View Warn Logs' , 'act=warnlog' ),
),
);
$CATS = array (
0 => "IPS Services",
1 => "Board Settings",
2 => 'Forum Control',
3 => 'Users and Groups',
4 => 'Administration',
5 => 'Skins & Templates',
6 => 'Languages',
7 => 'Statistic Center',
8 => 'SQL Management',
//0 => "IPS Services",
1 => "IPB Enhancements",
2 => "System Settings",
3 => 'Forum Control',
4 => 'Forum Moderation',
5 => 'Users and Groups',
6 => 'Administration',
7 => 'Skins & Templates',
8 => 'Languages',
9 => 'Statistic Center',
10 => 'SQL Management',
11 => 'Board Logs',
);
$DESC = array (
0 => "Get IPS latest news, documentation, request support, purchase extra services and more...",
1 => "Edit forum settings such as cookie paths, security features, posting abilities, etc",
2 => "Create, edit, remove and re-order categories, forums and moderators",
3 => "Edit, register, remove and ban members. Set up member titles and ranks. Manage User Groups and moderated registrations",
4 => "Manage Help Files, Bad Word Filters and Emoticons",
5 => "Manage templates, skins, colours and images.",
6 => "Manage language sets",
7 => "Get registration and posting statistics",
8 => "Manage your SQL database; repair, optimize and export data",
// 0 => "Get IPS latest news, documentation, request support, purchase extra services and more...",
1 => "Set up and manage your IPB plug in services",
2 => "Edit forum settings such as cookie paths, security features, posting abilities, etc",
3 => "Create, edit, remove and re-order categories, forums and moderators",
4 => "Access the moderators CP and manage topic multi-moderation",
5 => "Edit, register, remove and ban members. Set up member titles and ranks. Manage User Groups and moderated registrations",
6 => "Manage Help Files, Bad Word Filters and Emoticons",
7 => "Manage templates, skins, colours and images.",
8 => "Manage language sets",
9 => "Get registration and posting statistics",
10 => "Manage your SQL database; repair, optimize and export data",
11 => "View admin, moderator and email logs (Root admin only)",
);
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>␍
+475 -2
View File
@@ -1,6 +1,58 @@
<?php
$css_names = array(
'BODY' => "Web Page Body",
'TABLE, TR, TD' => "Default table",
'a:link, a:visited, a:active' => "Default link",
'a:hover' => "Default link hover",
'.googlebottom, .googlebottom a:link, .googlebottom a:visited, .googlebottom a:active' => "Simple Search Results: Dark",
'.googlish, .googlish a:link, .googlish a:visited, .googlish a:active' => "Simple Search Results: Topic Link",
'.googlesmall, .googlesmall a:link, .googlesmall a:active, .googlesmall a:visited' => "Simple Search Results: Small Text",
'option.sub' => "Search Form: Select forums box: subcat colour",
'.caldate' => "Calendar: Date",
'#ucpmenu' => "User CP: Menu colour",
'#ucpcontent' => "User CP: Content colour",
'#logostrip' => "Board Header: Logo Strip",
'#submenu' => "Board Header: Icon Strip",
'#submenu a:link, #submenu a:visited, #submenu a:active' => "Board Header: Icon Strip link colours",
'#userlinks' => "Board Header: Member Bar",
'.activeuserstrip' => 'Forums & Topics: Active users bar',
'.pformstrip' => 'Global: Sub heading',
'.pformleft' => 'Global: left side table cell',
'.pformleftw' => 'Global: left side table cell wide',
'.pformright' => 'Global: right side table cell',
'.post1' => 'Post View: Alt colour #1',
'.post2' => 'Post View: Alt colour #2',
'.postlinksbar' => 'Post View: Track topic, etc links',
'.row1' => 'Global: Alt row #1',
'.row2' => 'Global: Alt row #2',
'.row3' => 'Global: Alt row #3',
'.row4' => 'Global: Alt row #4',
'.darkrow1' => 'Global: Alt dark row #1',
'.darkrow2' => 'Global: Alt dark row #2',
'.darkrow3' => 'Global: Alt dark row #3',
'.hlight' => 'Msgr: Inbox row selected',
'.dlight' => 'Msgr: Inbox row not selected',
'.titlemedium' => 'Global: Sub heading (minor)',
'.titlemedium a:link, .titlemedium a:visited, .titlemedium a:active' =>'Global: Sub heading (minor) Links',
'.maintitle' => 'Global: Main table heading',
'.maintitle a:link, .maintitle a:visited, .maintitle a:active' => 'Global: Main table heading Links',
'.plainborder' => 'Global: Table alt #1',
'.tableborder' => 'Global: Table cellspacing colour',
'.tablefill' => 'Global: Table alt #2',
'.tablepad' => 'Global: Table alt #3',
'.desc' => 'Forum View: Last post info',
'.signature' => 'Post View: Signature',
'.normalname' => 'Post View: Member name (reg)',
'.unreg' => 'Post View: Unreg name',
'.searchlite' => 'Global: Search highlighting',
'#QUOTE' => 'Quote Box',
'#CODE' => 'Code Box',
);
$skin_names = array(
'skin_boards' => array(
@@ -10,8 +62,8 @@ $skin_names = array(
),
'skin_buddy' => array(
'Browse Buddy Sections',
'Elements for the browse buddy feature, including links and search boxes',
'myAssistant Sections',
'Elements for the myAssistant feature, including links and search boxes',
),
'skin_calendar'=> array(
'Calendar Sections',
@@ -95,6 +147,11 @@ $skin_names = array(
'Elements for the moderators control panel sections.',
),
'skin_csite' => array(
'IP Dynamic Lite',
'Elements for IP Dynamic Lite.',
),
'skin_ucp' => array(
'User Control Panel Section',
@@ -103,7 +160,423 @@ $skin_names = array(
);
$bit_names['skin_boards'] = array(
'PageTop' => '1: Board Index Page Top',
'newslink' => '2: Latest News Link',
'CatHeader_Expanded' => '3: Start Category Table',
'ForumRow' => '4: +-- Board Index Forum Row',
'forum_redirect_row' => '5: +-- Board Index Redirect Forum Row',
'subforum_img_with_link' => '6: +-- ---- Mark forum as read (subforum) post marker',
'forum_img_with_link' => '7: +-- ---- Mark forum as read post marker',
'forumrow_lastunread_link' => '8: +-- ---- Forum Row - Last unread link',
'subheader' => '9: +-- Sub Forum Row',
'end_this_cat' => '10: +-- End Category Row',
'end_all_cats' => '11: End Category Table',
'BoardInformation' => '12: Page Bottom Links - Moderating Team,etc',
'quick_log_in' => '13: Quick Log In Box',
'stats_header' => '14: Start Board Statistics Table',
'ActiveUsers' => '15: +-- Active Users Row',
'active_list_sep' => '16: +-- Active list character seperator',
'active_user_links' => '17: +-- Active User Links',
'bottom_links' => '18: +-- Page Bottom Links',
'birthdays' => '19: +-- Members Birthdays Row',
'calendar_events' => '20: +-- Forthcoming Calendar Events Row',
'ShowStats' => '21: +-- Board Stats: Posts, Topics, etc Row',
'stats_footer' => '22: End Board Statistics Table',
);
$bit_names['skin_buddy'] = array (
'buddy_js' => '1: myAssistant Javascript source',
'build_away_msg' => '2: New posts and topics info',
'append_view' => '3: Javascript redirect link wrapper',
'main' => '4: Main myAssistant HTML',
'login' => '5: Not logged in HTML',
'closelink' => '6: Close window links',
);
$bit_names['skin_calendar'] = array (
'cal_main_content' => '1: Main Month Display HTML',
'cal_birthday_start' => '2: +-- Start Birthday Entry',
'cal_birthday_entry' => '3: +-- Birthday Entry Link',
'cal_birthday_end' => '4: End Birthday Entry',
'cal_edit_button' => '5: Edit Entry Button',
'cal_page_events_start'=> '6: Start Event Page',
'cal_show_event' => '7: +-- Show Event Page',
'cal_events_end' => '8: End Day Events',
'cal_date_cell_today' => '9: Today\'s Calendar Cell',
'cal_date_cell' => '10: Date Cell',
'cal_blank_cell' => '11: Blank Cell',
'cal_events_start' => '12: Cell Start Event Entry',
'cal_events_wrap' => '13: Event cell wrap',
'cal_day_bit' => '14: Top Bar Weekday Name',
'cal_new_row' => '15: Start New Calendar Row',
);
$bit_names['skin_emails'] = array(
'pager_header' => '1: Pop-up Header',
'yahoo_body' => '2: +-- Yahoo Body',
'msn_body' => '3: +-- MSN Body',
'aol_body' => '4: +-- AIM Body',
'icq_body' => '5: +-- ICQ Body',
'end_table' => '6: End Table',
'report_form' => '7: Report this post form',
'send_form' => '8: Send Email form',
'show_address' => '9: Show email address',
'forward_form' => '10: Forward Topic form',
'forum_jump' => '11: Forum Jump',
'sent_screen' => '12: Email sent screen'
);
$bit_names['skin_forum'] = array(
'page_title' => '1: Page Title',
'show_rules' => '2: Forum Rules Page',
'show_rules_full' => '3: Show Forum Rules Full',
'show_rules_link' => '4: Forum Rules Link',
'PageTop' => '5: Forum Page Header',
'render_pinned_start' => '6: +-- Important Topics Title Start',
'render_pinned_row' => '7: +-- Pinned Topic Entry',
'render_pinned_end' => '8: +-- Important Topics Title End',
'RenderRow' => '9: +-- Normal Topic Entry',
'forum_active_users' => '10: +-- Users Browsing Forum Box',
'TableEnd' => '11: Forum Page End',
'show_sub_link' => '12: Subscribe to Forum Link',
'show_no_matches' => '13: No Topics to Display Message',
'Forum_log_in' => '14: Forum Log In Page',
'who_link' => '15: Who Posted? Link',
);
$bit_names['skin_global'] = array(
'BoardHeader' => '1: Board Header (logo, links, etc)',
'ibf_banner' => '2: +--IPS Hosting Banner (not activated)',
'Member_bar' => '3: +--Member Bar WITH Messenger Links',
'Member_no_usepm_bar' => '4: +--Member Bar NO Messenger Links',
'Guest_bar' => '5: +--Guest Bar',
'admin_link' => '6: +--Link to Admin CP',
'mod_link' => '7: +--Link to Mod CP',
'start_nav' => '8: +--Navigation Start',
'end_nav' => '9: +--Navigation End',
'Error' => '10: Error Page',
'error_log_in' => '11: Error Page Log in Box',
'board_offline' => '12: Offline Board Message',
'PM_popup' => '13: New PM Pop up Javascript',
'Redirect' => '14: Redirect Page',
);
$bit_names['skin_help'] = array (
'start' => '1: Start Help Page',
'display' => '2: Show Help Page',
'row' => '3: Show Help Topic Title',
'no_results' => '4: No Help Search Results',
'end' => '5: End Help Page',
);
$bit_names['skin_legends'] = array(
'page_header' => '1: Page Header',
'find_user_one' => '2: Find User Form',
'find_user_error' => '3: Find User Error',
'find_user_final' => '4: Find User Result',
'emoticon_javascript' => '5: Emoticons Javascript',
'emoticons_row' => '6: Emoticons Row',
'page_footer' => '7: Page Footer'
);
$bit_names['skin_login'] = array(
'ShowForm' => '1: Log In Form',
'errors' => '2: Log In Errors Box',
'ShowLogOutForm' => '3: Log Out Form (no longer used)'
);
$bit_names['skin_mlist'] = array(
'start' => '1: Start Page',
'Page_header' => '2: Page Header',
'show_row' => '3: +-- Member List Row',
'no_results' => '4: +-- No Results',
'Page_end' => '5: Page Footer',
'end' => '6: End Page',
);
$bit_names['skin_mod'] = array(
'table_top' => "1: Start Table",
'mod_exp' => "2: Action Explanation",
'move_form' => "3: Move Topic Form",
'merge_body' => "4: Merge Topics Form",
'split_body' => "5: Split Topic Form",
'split_row' => "6: +-- Split Topics Post Row",
'split_end_form' => "7: Split Topic End Form",
'poll_select_form' => "8: Edit Poll: Form",
'poll_entry' => "9: Edit Poll: Poll Choice Row",
'topictitle_fields' => "10: Edit Topic Title",
'end_form' => "11: End Form",
'delete_js' => "12: Delete Javascript",
'topic_history' => "13: Topic History Table",
'mod_log_start' => "14: Mod Logs: Start Entries",
'mod_log_none' => "15: +-- Mod Logs: No Entries",
'mod_log_row' => "16: +-- Mod Logs: Entry",
'mod_log_end' => "17: Mod Logs: End Entries",
'forum_jump' => "18: Forum Jump",
);
$bit_names['skin_modcp'] = array (
'splash' => "0: Depreciated (Not Used)",
'mod_cp_start' => "1: Mod CP Start",
'modpost_topicentry' => "2: Mod Q: Topic Entry",
'modtopics_end' => "3: Mod Q: Topics: End",
'mod_topic_title' => "4: Mod Q: Topic Title",
'mod_postentry' => "5: Mod Q: Post Entry",
'mod_postentry_checkbox' => "6: Mod Q: Post Entry check box",
'mod_topic_spacer' => "7: Mod Q: Topic Spacer",
'modpost_topicstart' => "8: Mod Q: Post: Topic Start",
'modtopicview_start' => "9: Mod Q: Topic: Start",
'modtopics_start' => "10: Mod Q: Topics Overview Start",
'modpost_topicend' => "11: Mod Q: Post :Topic End",
'prune_confirm' => "12: Prune Posts: Confirm Box",
'prune_splash' => "13: Prune Posts: Main Form",
'ip_start_form' => "14: IP Search: Start Form",
'ip_post_results' => "15: IP Post Entry",
'ip_member_start' => "16: IP Member Start",
'ip_member_row' => "17: IP Member Row",
'ip_member_end' => "18: IP Member End",
'find_user' => "19: Find User: I",
'find_two' => "20: Find User: II",
'edit_user_form' => "21: Edit User Form",
'results' => "22: Result Screen",
'mod_simple_page' => "23: Display Error/Result Box",
'start_topics' => "24: Topic View: Start",
'topic_row' => "25: Topic View: Entry",
'show_no_topics' => "26: Topic View: None Found",
'topics_end' => "27: Topic View: End",
'cat_row' => "28: Category Row",
'forum_page_start' => "29: Forum View Start",
'forum_row' => "30: Forum View Entry",
'forum_page_end' => "31: Forum View End",
'move_checked_form_start' => "32: Move Form Start",
'move_checked_form_entry' => "33: Move Form Entry",
'move_checked_form_end' => "34: Move Form End",
'mod_exp' => "35: Action Explanation",
'end_form' => "36: End Form",
);
$bit_names['skin_msg'] = array(
'Address_header' => "1: Address Book: Header",
'Address_table_header' => "2: +-- Address Book: Table Header",
'address_add' => "3: +-- Address Book: Add Entry",
'address_edit' => "4: +-- Address Book: Edit Entry",
'render_address_row' => "5: +-- Address Book: Show Entry",
'Address_none' => "6: +-- Address Book: No Entries",
'end_address_table' => "7: Address Book: Footer",
'archive_html_header' => "8: Archive PM: Header",
'archive_form' => "9: +-- Archive PM: Form",
'archive_complete' => "10: +-- Archive PM: Success Page",
'archive_html_entry' => "11: +-- Archive PM: HTML Entry",
'archive_html_footer' => "12: Archive PM: HTML Entry Footer",
'unsent_table_header' => "13: Unsent PM: Table Header",
'unsent_row' => "14: +-- Unsent PM: Entry",
'unsent_end' => "15: Unsent PM: End",
'trackUNread_table_header' => "16: Track: Unread: Header",
'trackUNread_row' => "17: +-- Track: Unread: Entry",
'trackUNread_end' => "18: Track: Unread: End",
'trackread_table_header' => "19: Track: Read: Header",
'trackread_row' => "20: +-- Track: Read: Entry",
'trackread_end' => "21: Track: Read: End",
'inbox_table_header' => "22: Msg List: Inbox Header",
'No_msg_inbox' => "23: +-- Msg List: No Entries",
'inbox_row' => "24: +-- Msg List: PM Entry",
'end_inbox' => "25: Msg List: End InBox",
'prefs_header' => "26: Folders: Header",
'prefs_row' => "27: +-- Folders: Entry",
'prefs_add_dirs' => "28: +-- Folders: Add Folder Entry",
'prefs_footer' => "29: Folders: Footer",
'send_form_header' => "30: Send PM: Header",
'Send_form' => "31: +-- Send PM: Main Form",
'preview' => "32: +-- Send PM: Preview Message Box",
'pm_errors' => "33: +-- Send PM: Error Box",
'mass_pm_box' => "34: +-- Send PM: BCC Box",
'send_form_footer' => "35: Send PM: Form Footer",
'Render_msg' => "36: Show Received PM",
'pm_popup' => "37: New Messages POP UP HTML",
);
$bit_names['skin_online'] = array(
'end' => "0: Depreciated (Not Used)",
'Page_header' => "1: Header",
'show_row' => "2: Entry",
'Page_end' => "3: Footer",
);
$bit_names['skin_poll'] = array(
'ShowPoll_header' => "1: Show Poll: Header",
'ShowPoll_Form_header' => "2: Show Poll: Form Header",
'Render_row_results' => "3: Show Poll: Result Row",
'Render_row_form' => "4: Show Poll: Choice Radio Button",
'ShowPoll_footer' => "5: Show Poll: Footer",
'delete_link' => "6: Delete Link",
'edit_link' => "7: Edit Link",
);
$bit_names['skin_post'] = array(
'calendar_start_edit_form' => "1: Calendar: Start Edit Form",
'calendar_event_title' => "2: +-- Calendar: Event Title",
'calendar_start_form' => "3: +-- Calendar: New Event Start Form",
'calendar_delete_box' => "4: +-- Calendar: Delete Box",
'calendar_choose_date' => "5: +-- Calendar: Choose Date",
'calendar_admin_group_box' => "6: +-- Calendar: Admin Group Box",
'calendar_event_type' => "7: +-- Calendar: Event Type",
'calendar_end_form' => "8: Calendar: End Form",
'TopicSummary_top' => "9: Post: Topic Summary Start",
'TopicSummary_body' => "10: +-- Post: Topic Summary Body",
'TopicSummary_bottom' => "11: Post: Topic Summary End",
'table_structure' => "12: Post: Table Structure",
'table_top' => "13: Post: Table Top",
'preview' => "14: +-- Post: Preview Box",
'errors' => "15: +-- Post: Errors Box",
'nameField_unreg' => "16: +-- Post: Guest Name Fields",
'nameField_reg' => "17: +-- Post: Registered Member Name Fields",
'postbox_buttons' => "18: +-- Post: Code Buttons & Post Text area",
'PostIcons' => "19: +-- Post: Post Icons Box",
'topictitle_fields' => "20: +-- Post: Topic Title Fields",
'Upload_field' => "21: +-- Post: Upload Field",
'edit_upload_field' => "22: +-- Post: Edit Upload Field",
'add_edit_box' => "23: +-- Post: Append Edited By.. checkbox",
'mod_options' => "24: +-- Post: Mod Options Drop Down",
'quote_box' => "25: +-- Post: Quote Text area",
'smilie_table' => "26: +-- Post: Smilie Box",
'EndForm' => "27: Post: End Form",
'poll_box' => "28: Poll: Options Text area",
'pm_postbox_buttons' => "29: PM: Code Buttons & msg Text area",
);
$bit_names['skin_printpage'] = array(
'pp_header' => "1: Start Page",
'pp_postentry' => "2: Post Entry",
'pp_end' => "3: End Page",
'choose_form' => "4: Client Choose Form",
);
$bit_names['skin_profile'] = array(
'show_profile' => "1: Member Profile Page",
'user_edit' => "2: User Edit Links",
'custom_field' => "3: Custom Field",
);
$bit_names['skin_register'] = array(
'show_authorise' => "1: Reg. Complete, Authorise Needed Msg",
'show_preview' => "2: Reg. Complete, Admin Authorise Msg",
'errors' => "3: Errors Box",
'ShowForm' => "4: Main Registration Form",
'reg_antispam' => "5: Reg Flood Bot Code Box",
'optional_title' => "6: Custom Fields Start",
'field_entry' => "7: Custom Fields Entry",
'field_textarea' => "8: Custom Fields Textarea",
'field_textinput' => "9: Custom Fields Input",
'field_dropdown' => "10: Custom Fields Drop Down",
'coppa_start' => "11: COPPA Start",
'coppa_two' => "12: COPPA Middle",
'coppa_form' => "13: COPPA Form",
'lost_pass_form' => "14: Lost Password Form",
'show_dumb_form' => "15: User Validate Account Form",
);
$bit_names['skin_search'] = array(
'Form' => "1: Main Search Form",
'RenderRow' => "2: Results: Topic Row",
'RenderPostRow' => "3: Results: Post Row",
'end' => "4: Results: End Page",
'end_as_post' => "5: Results: End Post Page",
'start' => "6: Results: Start Page",
'start_as_post' => "7: Results: Post Start",
'active_start' => "8: Active Topics Start",
'active_none' => "9: Active Topics No Results",
);
$bit_names['skin_stats'] = array(
'page_title' => "1: Page Title",
'who_header' => "2: Who Posted? Header",
'who_row' => "3: Who Posted? Entry",
'who_name_link' => "4: Who Posted? Name Link",
'who_end' => "5: Who Posted? End",
'leader_row' => "6: Forum Leaders: Entry",
'group_strip' => "7: Forum Leaders: Group Row",
'close_strip' => "8: Forum Leaders: Group Close",
'top_poster_header' => "9: Top Poster: Header",
'top_poster_no_info' => "10: Top Poster: No Results",
'top_poster_row' => "11: Top Poster: Entry",
'top_poster_footer' => "12: Top Poster: Footer",
);
$bit_names['skin_topic'] = array(
'PageTop' => "1: Header",
'golastpost_link' => "2: Go to Last Post Link",
'RenderRow' => "3: Post Entry",
'Show_attachments_img' => "4: Attachments: Show Image",
'Show_attachments' => "5: Attachments: Show Link Box",
'report_link' => "6: Report This Post Link",
'ip_show' => "7: IP Address Show/Link",
'topic_active_users' => "8: Users Browsing This Topic Box",
'email_options' => "9: Subscribe/Track Links",
'Mod_Panel' => "10: Mod Options Drop Down",
'mod_wrapper' => "11: Mod Options Entry",
'TableFooter' => "12: Footer",
);
$bit_names['skin_ucp'] = array(
'personal_splash_av' => "0: Depreciated (Not Used)",
'personal_splash' => "0: Depreciated (Not Used)",
'Menu_bar' => "1: Side Menu Links",
'splash' => "2: UCP Home",
'signature' => "3: Signature Edit / Preview",
'pass_change' => "4: Password Change Section",
'personal_panel' => "5: Profile Form: Main",
'field_entry' => "6: Profile Form: Custom Profile Entry",
'field_textarea' => "7: Profile Form: Custom Profile Textarea",
'field_textinput' => "8: Profile Form: Custom Profile Text Input",
'field_dropdown' => "9: Profile Form: Custom Profile DropDown",
'required_title' => "10: Profile Form: Required Fields Title",
'member_title' => "11: Profile Form: Member Title Field",
'birthday' => "12: Profile Form: Birthday Fields",
'email_change' => "13: Email Change Form",
'personal_avatar' => "14: Avatar Options Main",
'personal_avatar_URL' => "15: Avatar Options URL",
'avatar_upload_field' => "16: Avatar Options Upload",
'personal_avatar_end' => "17: Avatar Options End",
'forum_subs_header' => "18: Forum Subscriptions: Header",
'forum_subs_row' => "19: Forum Subscriptions: Entry",
'forum_subs_none' => "20: Forum Subscriptions: No Entries",
'forum_subs_end' => "21: Forum Subscriptions: End",
'subs_header' => "22: Topic Subscriptions: Header",
'subs_row' => "23: Topic Subscriptions: Entry",
'subs_none' => "24: Topic Subscriptions: No Entries",
'subs_forum_row' => "25: Topic Subscriptions: Forum Header",
'subs_end' => "26: Topic Subscriptions: End",
'skin_lang_header' => "27: Skins & Languages Header",
'settings_skin' => "28: Skins & Languages Main",
'skin_lang_end' => "29: Skins & Languages End",
'settings_header' => "30: Board Settings Header",
'settings_end' => "31: Board Settings End",
'email' => "32: Email Options",
'forum_jump' => "33: Forum Jump",
'CP_end' => "34: End CP",
);
$bit_names['skin_csite'] = array(
'csite_skeleton_template' => "1: MAIN TEMPLATE",
'csite_css_external' => "2: |-- Header; CSS External",
'csite_css_inline' => "3: '-- Header; CSS Inline",
'tmpl_welcomebox_member' => "4: Member's Welcome Box",
'tmpl_welcomebox_guest' => "5: Guest's Welcome Box",
'tmpl_search' => "6: Search Box",
'tmpl_sitenav' => "7: Site Nav. Box",
'tmpl_onlineusers' => "8: Online Users Box",
'tmpl_changeskin' => "9: Change Skin Box",
'tmpl_affiliates' => "10: Affiliates / Recommended Sites Box",
'tmpl_recentarticles' => "11: Recent Articles box",
'tmpl_latestposts' => "12: Latest Discussions box",
'tmpl_poll_header' => "14: Poll; Poll Header",
'tmpl_poll_choice_row' => "15: |-- Poll; Choice entry & radiobutton",
'tmpl_poll_result_row' => "16: |-- Poll; Result row",
'tmpl_poll_vote' => "17: |-- Poll; Vote Button",
'tmpl_poll_footer' => "18: '-- Poll; Poll Footer",
'tmpl_articles_row' => "19: Articles; Article Entry",
'tmpl_comment_link' => "20: |-- Articles; Add Comment link",
'tmpl_readmore_link' => "21: '-- Articles; Read More link",
'tmpl_debug' => "22: Debug Strip",
'tmpl_topic_row' => "23: Topic format used for 'recent articles' and 'latest discussions'",
'tmpl_links_wrap' => "24: Site Nav. Link Format",
'csite_sep_char' => "25: Online Users; Separator",
);
?>