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

+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();
}
//+-------------------------------