Пример #1
0
    $threads = '';
    while (is_array($rec)) {
        if ($threads != '') {
            $threads .= ", ";
        }
        $threads .= "{$rec['thread']}";
        $rec = $q->getrow();
    }
    $sSQL = "Select count(*) as cnt from {$ForumTableName} where thread in ({$threads})";
    $q->query($DB, $sSQL);
    $rec = $q->getrow();
    $count = $rec["cnt"];
    if ($err = $q->error()) {
        QueMessage("{$err}<br>{$sSQL}");
    }
    $sSQL = "Delete from {$ForumTableName} where thread in ({$threads})";
    $q->query($DB, $sSQL);
    if ($err = $q->error()) {
        QueMessage("{$err}<br>{$sSQL}");
    } else {
        QueMessage("{$count} message(s) deleted.");
        $sSQL = "Delete from {$ForumTableName}" . "_bodies where thread in ({$threads})";
        $q->query($DB, $sSQL);
        if ($err = $q->error()) {
            QueMessage("Problem deleting bodies!");
            QueMessage("{$err}<br>{$sSQL}");
        }
    }
} else {
    QueMessage("No messages selected for deletion.");
}
Пример #2
0
<?php

check_security();
$DefaultDisplay = $new_DefaultDisplay;
$DefaultEmail = $new_DefaultEmail;
$PhorumMailCode = $new_PhorumMailCode;
$UseCookies = $new_UseCookies;
$SortForums = $new_SortForums;
$default_lang = $new_default_lang;
$TimezoneOffset = $new_default_timezone_offset;
writefile();
QueMessage("The Global properties have been updated.");
Пример #3
0
<?php

check_security();
$PHORUM["started"] = 0;
writefile();
QueMessage("Phorum has been stopped.");
Пример #4
0
    $body = addslashes($body);
}
if ($html) {
    $body = "<HTML>{$body}</HTML>";
}
if ($bold) {
    $subject = "<strong>{$subject}</strong>";
    $author = "<strong>{$author}</strong>";
}
if (is_array($attachments)) {
    $del = array();
    while (list($key, $name) = each($attachments)) {
        if (isset($del_attachment[$key])) {
            $del[] = $key;
            unlink("{$AttachmentDir}/{$ForumTableName}/{$id}" . "_{$key}" . strtolower(strrchr($name, ".")));
        } elseif ($new_attachment[$key] != $name) {
            $SQL = "Update {$ForumTableName}" . "_attachments set filename='{$new_attachment[$key]}' where id={$key}";
            $q->query($DB, $SQL);
        }
    }
    if (count($del) > 0) {
        $SQL = "Delete from {$ForumTableName}" . "_attachments where id in (" . implode(",", $del) . ")";
        $q->query($DB, $SQL);
    }
}
$sSQL = "Update {$ForumTableName} set author='{$author}', email='{$email}', subject='{$subject}' where id={$id}";
$q->query($DB, $sSQL);
$sSQL = "Update " . $ForumTableName . "_bodies set body='{$body}' where id={$id}";
$q->query($DB, $sSQL);
QueMessage("Message {$id} updated!");
Пример #5
0
<?php

// Edit Message
$sSQL = "Select author, email, subject, body from {$ForumTableName} as t, {$ForumTableName}" . "_bodies as b where t.id=b.id and t.id={$id}";
$q->query($DB, $sSQL);
$mtext = $q->getrow();
if (empty($mtext["subject"])) {
    QueMessage("Message {$id} not found");
    return;
}
if (isset($srcpage)) {
    $page = $srcpage;
} else {
    $page = "managemenu";
}
if (substr($mtext["body"], 0, 6) == "<HTML>") {
    $mtext["body"] = ereg_replace("</*HTML>", "", $mtext["body"]);
    $html = 1;
} else {
    $html = 0;
}
if (substr($mtext["subject"], 0, 3) == "<b>") {
    $mtext["subject"] = ereg_replace("</*b>", "", $mtext["subject"]);
    $mtext["author"] = ereg_replace("</*b>", "", $mtext["author"]);
    $bold = 1;
} else {
    $bold = 0;
}
?>
<form action="<?php 
echo $myname;
Пример #6
0
<?php

check_security();
$PHORUM['default_body_color'] = $new_default_body_color;
$PHORUM['default_body_link_color'] = $new_default_body_link_color;
$PHORUM['default_body_vlink_color'] = $new_default_body_vlink_color;
$PHORUM['default_body_alink_color'] = $new_default_body_alink_color;
$PHORUM['default_table_width'] = $new_default_table_width;
$PHORUM['default_table_header_color'] = $new_default_table_header_color;
$PHORUM['default_table_header_font_color'] = $new_default_table_header_font_color;
$PHORUM['default_table_body_color_1'] = $new_default_table_body_color_1;
$PHORUM['default_table_body_font_color_1'] = $new_default_table_body_font_color_1;
$PHORUM['default_table_body_color_2'] = $new_default_table_body_color_2;
$PHORUM['default_table_body_font_color_2'] = $new_default_table_body_font_color_2;
$PHORUM['default_nav_color'] = $new_default_nav_color;
$PHORUM['default_nav_font_color'] = $new_default_nav_font_color;
writefile('all');
QueMessage("The HTML properties have been updated.");
Пример #7
0
<?php

check_security();
if (substr($new_forum_url, -1) == "/") {
    $new_forum_url = substr($new_forum_url, 0, -1);
}
$forum_url = $new_forum_url;
$ext = $new_ext;
$forum_page = $new_forum_page;
$list_page = $new_list_page;
$search_page = $new_search_page;
$read_page = $new_read_page;
$post_page = $new_post_page;
$violation_page = $new_violation_page;
$down_page = $new_down_page;
$attach_page = $new_attach_page;
writefile();
QueMessage("The Files/Paths settings have been updated.");
Пример #8
0
                                if($DB->type=="mysql"){
                                  $uid=$DB->lastid();
                                }
                            }
                        }
                    }
        
                    if(!$err){
                        if(isset($grant_admin)){
                                $sSQL="insert into $PHORUM[mod_table] values ('$uid', 0)";
                                $q->query($DB, $sSQL);
                        }
                        if(is_array($grant_mod)){
                               while(list($key, $fid)=each($grant_mod)){
                                       $sSQL="insert into $PHORUM[mod_table] values ('$uid', $fid)";
                                       $q->query($DB, $sSQL);
                               }
                        }
                        $err="User successfully updated.";
                        $subaction="";
                    } else {
                        $subaction="adduser";
                    }
                } else {
                    $subaction="edituser";
                }
                break;
        */
}
QueMessage($err);
Пример #9
0
<?php

check_security();
// drop the current forum/folder
if (isset($f) && $f != 0) {
    $sSQL = "Select table_name, folder from " . $pho_main . " where id = " . $f;
    $q->query($DB, $sSQL);
    $rec = $q->getrow();
    if ($rec["folder"] == 0) {
        DropForum($f, $rec["table_name"]);
        QueMessage("Forum dropped.");
    } else {
        DropFolder($f);
        QueMessage("Folder dropped.");
    }
    writefile();
} else {
    QueMessage("Drop failed.  Forum ID not available.");
}
Пример #10
0
<?php

check_security();
if ($DB->type == "mysql") {
    QueMessage("Not used for MySQL");
} else {
    if ($num != 0) {
        $table_name = $ForumTableName;
    } else {
        $table_name = $pho_main;
    }
    $sSQL = "Select max(id) as id from " . $table_name;
    $q->query($DB, $sSQL);
    $row = $q->getrow();
    if (isset($row["id"])) {
        $id = $row["id"];
        $ret = $DB->reset_sequence($table_name, $id + 1);
        if ($ret == 0) {
            QueMessage("Sequence reset to {$id}.");
        } else {
            QueMessage("There was an error resetting the sequence.");
        }
    } else {
        QueMessage("Sequence not set, forum empty.");
    }
}
Пример #11
0
function writefile($forum = '', $main = false)
{
    global $PHORUM, $DB, $q, $inf_path, $inf_file, $inf_back, $down, $dbName, $dbUser, $dbPass, $dbServer, $DefaultDisplay, $DefaultEmail, $PhorumMailCode, $SortForums, $Password, $UseCookies;
    global $forum_url, $admin_url, $ext, $forum_page, $list_page, $search_page, $read_page, $post_page, $violation_page, $down_page, $attach_page, $admindir;
    global $default_table_width, $default_table_header_color, $default_table_header_font_color, $default_table_body_color_1, $default_table_body_font_color_1, $default_table_body_color_2, $default_table_body_font_color_2, $default_nav_color, $default_nav_font_color, $default_lang;
    global $pho_main, $AllowAttachments, $AttachmentSizeLimit, $AttachmentFileTypes, $AttachmentDir, $MaximumNumberAttachments, $TimezoneOffset, $default_body_color, $default_body_link_color, $default_body_alink_color, $default_body_vlink_color, $HTTP_HOST, $PHP_SELF, $SERVER_PORT;
    if ($main != false || $forum == 'all' || $forum == '') {
        if (@copy($PHORUM["settings"], $PHORUM["settings_backup"])) {
            QueMessage("Changes Saved.");
        } else {
            QueMessage("Changes saved but {$inf_file} could not be backed up.");
        }
        $x = 0;
        $active_count = '0';
        if (isset($q)) {
            $sSQL = "Select count(*) as cnt from " . $PHORUM['main_table'] . " where active=1";
            $q->query($DB, $sSQL);
            $rec = $q->getrow();
            if (!@empty($rec["cnt"])) {
                $active_count = "{$rec['cnt']}";
            }
        }
        $data = "<?php\n";
        $data .= "// DO NOT EDIT THIS FILE.  USE THE ADMIN\n\n";
        $data .= "\n";
        $data .= "// one-time-set settings\n";
        $data .= "  \$PHORUM['main_table']='" . $PHORUM['main_table'] . "';\n";
        $data .= "  \$PHORUM['dbtype']='" . $PHORUM['dbtype'] . "';\n";
        $data .= "\n";
        $data .= "// Global Settings\n";
        $data .= "  \$PHORUM['started']={$PHORUM['started']};\n";
        $data .= "  \$PHORUM['DefaultDisplay']='{$DefaultDisplay}';\n";
        $data .= "  \$PHORUM['DefaultEmail']='{$DefaultEmail}';\n";
        $data .= "  \$PHORUM['PhorumMailCode']='{$PhorumMailCode}';\n";
        $data .= "  \$PHORUM['UseCookies']='{$UseCookies}';\n";
        $data .= "  \$PHORUM['SortForums']='{$SortForums}';\n";
        $data .= "  \$PHORUM['ActiveForums']='{$active_count}';\n";
        $data .= "  \$PHORUM['TimezoneOffset']='{$TimezoneOffset}';\n";
        $data .= "\n";
        $data .= "  \$PHORUM['forum_url']='{$forum_url}';\n";
        // not sure if this will work with SSL on IIS.
        $data .= "  \$PHORUM['admin_url']='" . ($SERVER_PORT == 443 ? "https" : "http") . "://{$HTTP_HOST}{$PHP_SELF}';\n";
        $data .= "\n";
        $data .= "  \$PHORUM['AllowAttachments']='{$AllowAttachments}';\n";
        $data .= "  \$PHORUM['AttachmentDir']='{$AttachmentDir}';\n";
        $data .= "  \$PHORUM['AttachmentSizeLimit']='{$AttachmentSizeLimit}';\n";
        $data .= "  \$PHORUM['AttachmentFileTypes']='{$AttachmentFileTypes}';\n";
        $data .= "  \$PHORUM['MaximumNumberAttachments']='{$MaximumNumberAttachments}';\n";
        $data .= "\n";
        $data .= "  \$PHORUM['ext']='{$ext}';\n";
        $data .= "  \$PHORUM['forum_page']='{$forum_page}';\n";
        $data .= "  \$PHORUM['list_page']='{$list_page}';\n";
        $data .= "  \$PHORUM['search_page']='{$search_page}';\n";
        $data .= "  \$PHORUM['read_page']='{$read_page}';\n";
        $data .= "  \$PHORUM['post_page']='{$post_page}';\n";
        $data .= "  \$PHORUM['violation_page']='{$violation_page}';\n";
        $data .= "  \$PHORUM['down_page']='{$down_page}';\n";
        $data .= "  \$PHORUM['attach_page']='{$attach_page}';\n";
        $data .= "  \$PHORUM['default_lang']='{$default_lang}';\n";
        $data .= "  \$PHORUM['default_body_color']='{$PHORUM['default_body_color']}';\n";
        $data .= "  \$PHORUM['default_body_link_color']='{$PHORUM['default_body_link_color']}';\n";
        $data .= "  \$PHORUM['default_body_vlink_color']='{$PHORUM['default_body_vlink_color']}';\n";
        $data .= "  \$PHORUM['default_body_alink_color']='{$PHORUM['default_body_alink_color']}';\n";
        $data .= "  \$PHORUM['default_table_width']='{$PHORUM['default_table_width']}';\n";
        $data .= "  \$PHORUM['default_table_header_color']='{$PHORUM['default_table_header_color']}';\n";
        $data .= "  \$PHORUM['default_table_header_font_color']='{$PHORUM['default_table_header_font_color']}';\n";
        $data .= "  \$PHORUM['default_table_body_color_1']='{$PHORUM['default_table_body_color_1']}';\n";
        $data .= "  \$PHORUM['default_table_body_font_color_1']='{$PHORUM['default_table_body_font_color_1']}';\n";
        $data .= "  \$PHORUM['default_table_body_color_2']='{$PHORUM['default_table_body_color_2']}';\n";
        $data .= "  \$PHORUM['default_table_body_font_color_2']='{$PHORUM['default_table_body_font_color_2']}';\n";
        $data .= "  \$PHORUM['default_nav_color']='{$PHORUM['default_nav_color']}';\n";
        $data .= "  \$PHORUM['default_nav_font_color']='{$PHORUM['default_nav_font_color']}';\n";
        $data .= "\n";
        $data .= "  // expand all the above into vars for legacy code.\n";
        $data .= "  while(list(\$key, \$value)=each(\$PHORUM)){\n";
        if ((int) phpversion() < 4) {
            $data .= "    \$\$key=\$value;\n";
        } else {
            $data .= "    \$\$key=\$PHORUM[\$key];\n";
        }
        $data .= "  }\n";
        $data .= "\n";
        $data .= "  // database variables\n";
        $data .= "  \$PHORUM['DatabaseServer']='{$PHORUM['DatabaseServer']}';\n";
        $data .= "  \$PHORUM['DatabaseName']='{$PHORUM['DatabaseName']}';\n";
        $data .= "  \$PHORUM['DatabaseUser']='******'DatabaseUser']}';\n";
        $data .= "  \$PHORUM['DatabasePassword']='******'DatabasePassword']}';\n\n";
        $data .= "\n";
        if (is_array($PHORUM["plugins"])) {
            while (list($key, $value) = each($PHORUM["plugins"])) {
                settype($value, "boolean");
                if ($value) {
                    $data .= "  \$PHORUM['plugins']['{$key}']=true;\n";
                }
            }
        }
        $data .= "\n";
        $data .= "?>";
        if ($fp = fopen($PHORUM["settings"], "w")) {
            fputs($fp, $data);
            fclose($fp);
        } else {
            echo "Could not open file {$PHORUM['settings']}.  Please check the file permissions.<br />";
            exit;
        }
    }
    if ($forum != '') {
        $sSQL = "Select * from " . $pho_main;
        if ($forum != 'all') {
            $sSQL .= " where id={$forum}";
        }
        $q->query($DB, $sSQL);
        $rec = (object) $q->getrow();
        while (isset($rec->id)) {
            if (!get_cfg_var("magic_quotes_runtime")) {
                $rec->name = addslashes($rec->name);
                $rec->description = addslashes($rec->description);
                $rec->staff_host = addslashes($rec->staff_host);
            }
            $data = "<?php\n";
            $data .= "  // {$rec->name} forum\n";
            $data .= "  \$PHORUM['ForumId']={$rec->id};\n";
            $data .= "  \$PHORUM['ForumActive']='{$rec->active}';\n";
            $data .= "  \$PHORUM['ForumName']='{$rec->name}';\n";
            $data .= "  \$PHORUM['ForumDescription']='{$rec->description}';\n";
            $data .= "  \$PHORUM['ForumConfigSuffix']='{$rec->config_suffix}';\n";
            $data .= "  \$PHORUM['ForumFolder']='{$rec->folder}';\n";
            $data .= "  \$PHORUM['ForumParent']='{$rec->parent}';\n";
            $data .= "  \$PHORUM['ForumLang']='{$rec->lang}';\n";
            if (!$rec->folder) {
                $data .= "  \$PHORUM['ForumDisplay']='{$rec->display}';\n";
                $data .= "  \$PHORUM['ForumTableName']='{$rec->table_name}';\n";
                $data .= "  \$PHORUM['ForumModeration']='{$rec->moderation}';\n";
                $data .= "  \$PHORUM['ForumSecurity']='{$rec->security}';\n";
                $data .= "  \$PHORUM['ForumEmailList']='{$rec->email_list}';\n";
                $data .= "  \$PHORUM['ForumEmailReturnList']='{$rec->email_return}';\n";
                $data .= "  \$PHORUM['ForumEmailTag']='{$rec->email_tag}';\n";
                $data .= "  \$PHORUM['ForumCheckDup']='{$rec->check_dup}';\n";
                $data .= "  \$PHORUM['ForumMultiLevel']='{$rec->multi_level}';\n";
                $data .= "  \$PHORUM['ForumCollapse']='{$rec->collapse}';\n";
                $data .= "  \$PHORUM['ForumFlat']='{$rec->flat}';\n";
                $data .= "  \$PHORUM['ForumAllowHTML']='{$rec->html}';\n";
                $data .= "  \$PHORUM['ForumAllowUploads']='{$rec->allow_uploads}';\n";
                $data .= "  \$PHORUM['ForumUploadTypes']='{$rec->upload_types}';\n";
                $data .= "  \$PHORUM['ForumUploadSize']='{$rec->upload_size}';\n";
                $data .= "  \$PHORUM['ForumMaxUploads']='{$rec->max_uploads}';\n";
                $var = !empty($rec->table_body_color_2) ? "'{$rec->table_body_color_2}'" : "\$PHORUM['default_table_body_color_2']";
                $data .= "  \$PHORUM['ForumTableBodyColor2']={$var};\n";
                $var = !empty($rec->table_body_font_color_2) ? "'{$rec->table_body_font_color_2}'" : "\$PHORUM['default_table_body_font_color_2']";
                $data .= "  \$PHORUM['ForumTableBodyFontColor2']={$var};\n";
                $data .= "  \$PHORUM['ForumShowIP']='{$rec->showip}';\n";
                $data .= "  \$PHORUM['ForumAllowEMailNotify']='{$rec->emailnotification}';\n";
            }
            $var = !empty($rec->body_color) ? "'{$rec->body_color}'" : "\$PHORUM['default_body_color']";
            $data .= "  \$PHORUM['ForumBodyColor']={$var};\n";
            $var = !empty($rec->body_link_color) ? "'{$rec->body_link_color}'" : "\$PHORUM['default_body_link_color']";
            $data .= "  \$PHORUM['ForumBodyLinkColor']={$var};\n";
            $var = !empty($rec->body_alink_color) ? "'{$rec->body_alink_color}'" : "\$PHORUM['default_body_alink_color']";
            $data .= "  \$PHORUM['ForumBodyALinkColor']={$var};\n";
            $var = !empty($rec->body_vlink_color) ? "'{$rec->body_vlink_color}'" : "\$PHORUM['default_body_vlink_color']";
            $data .= "  \$PHORUM['ForumBodyVLinkColor']={$var};\n";
            $var = !empty($rec->table_width) ? "'{$rec->table_width}'" : "\$PHORUM['default_table_width']";
            $data .= "  \$PHORUM['ForumTableWidth']={$var};\n";
            $var = !empty($rec->table_header_color) ? "'{$rec->table_header_color}'" : "\$PHORUM['default_table_header_color']";
            $data .= "  \$PHORUM['ForumTableHeaderColor']={$var};\n";
            $var = !empty($rec->table_header_font_color) ? "'{$rec->table_header_font_color}'" : "\$PHORUM['default_table_header_font_color']";
            $data .= "  \$PHORUM['ForumTableHeaderFontColor']={$var};\n";
            $var = !empty($rec->table_body_color_1) ? "'{$rec->table_body_color_1}'" : "\$PHORUM['default_table_body_color_1']";
            $data .= "  \$PHORUM['ForumTableBodyColor1']={$var};\n";
            $var = !empty($rec->table_body_font_color_1) ? "'{$rec->table_body_font_color_1}'" : "\$PHORUM['default_table_body_font_color_1']";
            $data .= "  \$PHORUM['ForumTableBodyFontColor1']={$var};\n";
            $var = !empty($rec->nav_color) ? "'{$rec->nav_color}'" : "\$PHORUM['default_nav_color']";
            $data .= "  \$PHORUM['ForumNavColor']={$var};\n";
            $var = !empty($rec->nav_font_color) ? "'{$rec->nav_font_color}'" : "\$PHORUM['default_nav_font_color']";
            $data .= "  \$PHORUM['ForumNavFontColor']={$var};\n";
            $data .= "\n";
            $data .= "  // expand the array into vars for legacy code.\n";
            $data .= "  while(list(\$key, \$value)=each(\$PHORUM)){\n";
            if ((int) phpversion() < 4) {
                $data .= "    \$\$key=\$value;\n";
            } else {
                $data .= "    \$\$key=\$PHORUM[\$key];\n";
            }
            $data .= "  }\n";
            $data .= "\n?>";
            if ($fp = fopen("{$PHORUM['settings_dir']}/{$rec->id}.php", "w")) {
                fputs($fp, $data);
                fclose($fp);
            } else {
                echo "Could not open file {$PHORUM['settings_dir']}/{$rec->id}.php.  Please check the file permissions.<br />";
                exit;
            }
            $rec = (object) $q->getrow();
        }
    }
}
Пример #12
0
<?php

check_security();
if ($new_AllowAttachments) {
    if (empty($new_AttachmentDir)) {
        QueMessage("You did not provide a directory for attachments.  Attachments have been disabled.");
        $new_AllowAttachments = 0;
        $page = "attachments";
    } elseif (!file_exists($new_AttachmentDir) && !@mkdir($new_AttachmentDir, 0777)) {
        QueMessage("The directory you entered '{$new_AttachmentDir}' could not be created.  Attachments have been disabled until the problem is resolved.");
        $new_AllowAttachments = 0;
        $page = "attachments";
    }
}
$AttachmentDir = $new_AttachmentDir;
$AllowAttachments = $new_AllowAttachments;
$AttachmentSizeLimit = $new_AttachmentSizeLimit;
$AttachmentFileTypes = $new_AttachmentFileTypes;
$MaximumNumberAttachments = (int) $new_MaximumNumberAttachments;
writefile();
QueMessage("The Attachment settings have been updated.");
Пример #13
0
<?php

check_security();
$PHORUM["started"] = 1;
writefile();
$step = 0;
QueMessage("Phorum has been started.");
Пример #14
0
<?php

require "{$include_path}/threadflags.php";
modify_threadflags($mythread, $flags);
QueMessage("Flags of thread {$mythread} have been updated<br>");
Пример #15
0
<?php

check_security();
$data = "";
flush();
$fp = fopen("http://phorum.org/version.php", "r");
if ($fp) {
    $data = fgets($fp, 1024);
    fclose($fp);
}
if (!strstr($data, "|")) {
    QueMessage("Could not contact phorum.org.  To use this feature, you must have compiled in fopen wrappers when setting up PHP.");
    $page = "main";
} else {
    $ver_arr = explode("|", $data);
    $page = "version";
}
Пример #16
0
<?php

check_security();
$PHORUM['DatabaseServer'] = $new_dbServer;
$PHORUM['DatabaseName'] = $new_dbName;
$PHORUM['DatabaseUser'] = $new_dbUser;
$PHORUM['DatabasePassword'] = $new_dbPass;
writefile();
QueMessage("The Database Settings have been updated.");
Пример #17
0
<?php

if (!defined("_COMMON_PHP")) {
    return;
}
require "{$include_path}/delete_message.php";
delete_messages($id);
QueMessage("Message(s) {$id} and all children were deleted!<br />");
Пример #18
0
        $max_uploads = (int) $max_uploads;
        // please keep this formatted like this
        $sSQL = "Update " . $pho_main . " set\n                    name='{$name}',\n                    description='{$description}',\n                    config_suffix='{$config_suffix}',\n                    parent={$parent},\n                    display={$display},\n                    moderation='{$moderation}',\n                    email_list='{$email_list}',\n                    email_return='{$email_return}',\n                    email_tag='{$email_tag}',\n                    check_dup={$check_dup},\n                    multi_level={$multi_level},\n                    collapse={$collapsed},\n                    flat={$rflat},\n                    lang='{$language_file}',\n                    html='{$allow_html}',\n                    table_width='{$table_width}',\n                    table_header_color='{$table_header_color}',\n                    table_header_font_color='{$table_header_font_color}',\n                    table_body_color_1='{$table_body_color_1}',\n                    table_body_color_2='{$table_body_color_2}',\n                    table_body_font_color_1='{$table_body_font_color_1}',\n                    table_body_font_color_2='{$table_body_font_color_2}',\n                    nav_color='{$nav_color}',\n                    nav_font_color='{$nav_font_color}',\n                    allow_uploads='{$allow_uploads}',\n                    upload_types='{$upload_types}',\n                    upload_size='{$upload_size}',\n                    max_uploads='{$max_uploads}',\n                    security='{$security}',\n                    showip='{$showip}',\n                    emailnotification={$emailnotification},\n                    body_color='{$body_color}',\n                    body_link_color='{$body_link_color}',\n                    body_alink_color='{$body_alink_color}',\n                    body_vlink_color='{$body_vlink_color}'\n               where\n                 id={$num}";
    } else {
        $sSQL = "Update " . $pho_main . " set name='{$name}', description='{$description}', config_suffix='{$config_suffix}', lang='{$language_file}', parent={$parent}, table_width='{$table_width}', table_header_color='{$table_header_color}', table_header_font_color='{$table_header_font_color}', table_body_color_1='{$table_body_color_1}', table_body_font_color_1='{$table_body_font_color_1}', nav_color='{$nav_color}', nav_font_color='{$nav_font_color}', body_color='{$body_color}', body_link_color='{$body_link_color}', body_alink_color='{$body_alink_color}', body_vlink_color='{$body_vlink_color}' where id={$num}";
    }
    $q->query($DB, $sSQL);
    $err = $q->error();
    if ($err == "") {
        if (!$folder && $AllowAttachments && $allow_uploads == 'Y') {
            if (!file_exists("{$AttachmentDir}/{$table}") && !@mkdir("{$AttachmentDir}/{$table}", 0777)) {
                QueMessage("The directory ({$AttachmentDir}/{$table}) for attachments could not be created.");
            } else {
                chmod("{$AttachmentDir}/{$table}", 0777);
            }
            if ($err = create_table($DB, "attachments", $table . "_attachments")) {
                QueMessage("Could not create attachments table.  Database server said \"{$err}\"");
            }
        }
        $ForumName = stripslashes($name);
        writefile($num);
        include "{$PHORUM['settings_dir']}/{$num}.php";
        QueMessage("{$ForumName} has been updated.");
    } else {
        QueMessage($err);
        $page = $frompage;
    }
} else {
    QueMessage("You must provide a name for the forum.");
    $option == "edit_prop";
}
Пример #19
0
<?php

check_security();
writefile("all");
QueMessage("All files rebuilt.");
Пример #20
0
<?php

check_security();
/* Plugin Managment */
if (@$do == "props" && !empty($plugin)) {
    $plugindirname = $plugin;
    $pluginprops = TRUE;
    include "./plugin/{$plugin}/admin.php";
} else {
    if (isset($action) && isset($plugin)) {
        if ($action == "activate_plugin") {
            $PHORUM["plugins"][$plugin] = true;
            QueMessage("Plugin Activated.");
        } elseif ($action == "deactivate_plugin") {
            $PHORUM["plugins"][$plugin] = false;
            QueMessage("Plugin Deactivated.");
        }
        writefile();
    }
    ?>
<p>
<table border="0" cellspacing="0" cellpadding="3" class="box-table">
<tr>
<td colspan="2" align="center" valign="middle" class="table-header">Manage Plugins</td>
</tr>
<tr>
<?php 
    $dir = opendir("./plugin/");
    $num = 0;
    while ($plugindirname = readdir($dir)) {
        if ($plugindirname[0] != ".") {
Пример #21
0
<?php

check_security();
// pass.php
// Change the master password
if ($newPassword == $confirm) {
    $crypt_pass = md5($newPassword);
    $SQL = "Update {$PHORUM['auth_table']} set password='******' where id=" . $PHORUM["admin_user"]["id"];
    if ($q->query($DB, $SQL)) {
        QueMessage("Password Changed.");
    } else {
        QueMessage("Password not changed.");
        $page = $frompage;
    }
} else {
    QueMessage("Passwords do not match.");
    $page = $frompage;
}