Ergebnis 1 bis 2 von 2

Thema: Fehler

  1. #1
    Gast

    Standard Fehler

    Hallo,

    Ich habe ein Forum (myBB) aber wenn man z.B das PW Vergessen hat schickt er keine E-Mail da steht nur
    Code:
    Warning: mail() has been disabled for security reasons in /var/www/users/flash/inc/functions.php on line 371
    In der Datai steht:



    [code:1:e28dc915ab]<?php
    /**
    * MyBB 1.2
    * Copyright © 2006 MyBB Group, All Rights Reserved
    *
    * Website&#58; http&#58;//www.mybboard.net
    * License&#58; http&#58;//www.mybboard.net/eula.html
    *
    * $Id&#58; functions.php 3058 2007-05-15 02&#58;00&#58;38Z Tikitiki $
    */

    /**
    * Outputs a page directly to the browser, parsing anything which needs to be parsed.
    *
    * @param string The contents of the page.
    */
    function output_page&#40;$contents&#41;
    &#123;
    global $db, $lang, $theme, $plugins, $mybb;
    global $querytime, $debug, $templatecache, $templatelist, $maintimer, $globaltime, $parsetime;

    $contents = parse_page&#40;$contents&#41;;
    $totaltime = $maintimer->stop&#40;&#41;;
    if&#40;$mybb->usergroup&#91;'cancp'&#93; == "yes"&#41;
    &#123;
    $phptime = $maintimer->format&#40;$maintimer->totaltime - $querytime&#41;;
    $querytime = $maintimer->format&#40;$querytime&#41;;
    $percentphp = number_format&#40;&#40;&#40;$phptime/$maintimer->totaltime&#41;*100&#41;, 2&#41;;
    $percentsql = number_format&#40;&#40;&#40;$querytime/$maintimer->totaltime&#41;*100&#41;, 2&#41;;
    $phpversion = phpversion&#40;&#41;;
    $serverload = get_server_load&#40;&#41;;
    if&#40;strstr&#40;getenv&#40;"REQUEST_URI"&#41;, "?"&#41;&#41;
    &#123;
    $debuglink = htmlspecialchars&#40;getenv&#40;"REQUEST_URI"&#41; &#41; . "&amp;debug=1";
    &#125;
    else
    &#123;
    $debuglink = htmlspecialchars&#40;getenv&#40;"REQUEST_URI"&#41; &#41; . "?debug=1";
    &#125;
    if&#40;$mybb->settings&#91;'gzipoutput'&#93; != "no"&#41;
    &#123;
    $gzipen = "Enabled";
    &#125;
    else
    &#123;
    $gzipen = "Disabled";
    &#125;
    if&#40;$mybb->settings&#91;'extraadmininfo'&#93; != "no"&#41;
    &#123;
    if&#40;function_exists&#40;"memory_get_usage"&#41; &#41;
    &#123;
    $memory_usage = " / Memory Usage&#58; ".get_friendly_size&#40;memory_get_usage&#40;&#41; &#41;;
    &#125;
    $other = "PHP version&#58; $phpversion / Server Load&#58; $serverload / GZip Compression&#58; $gzipen";
    $debugstuff = "Generated in $totaltime seconds &#40;$percentphp% PHP / $percentsql% MySQL&#41;
    MySQL Queries&#58; $db->query_count / Global Parsing Time&#58; $globaltime$memory_usage
    $other
    &#91;<a href=\"$debuglink\" target=\"_blank\">advanced details</a>&#93;
    ";
    $contents = str_replace&#40;"<debugstuff>", $debugstuff, $contents&#41;;
    &#125;
    if&#40;isset&#40;$mybb->input&#91;'debug'&#93;&#41;&#41;
    &#123;
    debug_page&#40;&#41;;
    &#125;
    &#125;
    $contents = str_replace&#40;"<debugstuff>", "", $contents&#41;;
    $contents = $plugins->run_hooks&#40;"pre_output_page", $contents&#41;;

    if&#40;$mybb->settings&#91;'gzipoutput'&#93; != "no"&#41;
    &#123;
    if&#40;version_compare&#40;PHP_VERSION, '4.2.0', '>='&#41;&#41;
    &#123;
    $contents = gzip_encode&#40;$contents, $mybb->settings&#91;'gziplevel'&#93;&#41;;
    &#125;
    else
    &#123;
    $contents = gzip_encode&#40;$contents&#41;;
    &#125;
    &#125;
    echo $contents;

    $plugins->run_hooks&#40;"post_output_page"&#41;;

    // If the use shutdown functionality is turned off, run any shutdown related items now.
    if&#40;&#40;$mybb->settings&#91;'useshutdownfunc'&#93; == "no"|| phpversion&#40;&#41; >= '5.0.5'&#41; && $mybb->use_shutdown != true&#41;
    &#123;
    run_shutdown&#40;&#41;;
    &#125;
    &#125;

    /**
    * Adds a function to the list of functions to run on shutdown.
    *
    * @param string The name of the function.
    */
    function add_shutdown&#40;$name&#41;
    &#123;
    global $shutdown_functions;

    if&#40;function_exists&#40;$name&#41;&#41;
    &#123;
    $shutdown_functions&#91;$name&#93; = $name;
    &#125;
    &#125;

    /**
    * Runs the shutdown items after the page has been sent to the browser.
    *
    */
    function run_shutdown&#40;&#41;
    &#123;
    global $db, $cache, $plugins, $shutdown_functions, $done_shutdown;

    if&#40;$done_shutdown == true&#41;
    &#123;
    return;
    &#125;

    // If our DB has been deconstructed already &#40;bad PHP 5.2.0&#41;, reconstruct
    if&#40;!is_object&#40;$db&#41;&#41;
    &#123;
    require MYBB_ROOT."inc/config.php";
    if&#40;isset&#40;$config&#41;&#41;
    &#123;
    require_once MYBB_ROOT."inc/db_".$config&#91;'dbtype'&#93;.".php";
    $db = new databaseEngine;
    $db->connect&#40;$config&#91;'hostname'&#93;, $config&#91;'username'&#93;, $config&#91;'password'&#93;&#41;;
    $db->select_db&#40;$config&#91;'database'&#93;&#41;;
    &#125;
    &#125;

    // Cache object deconstructed? reconstruct
    if&#40;!is_object&#40;$cache&#41;&#41;
    &#123;
    require_once MYBB_ROOT."inc/class_datacache.php";
    $cache = new datacache;
    &#125;

    // And finaly.. we have the PHP developers to thank for this "hack" which fixes a problem THEY created
    if&#40;!is_object&#40;$plugins&#41; && !defined&#40;"NO_PLUGINS"&#41;&#41;
    &#123;
    require_once MYBB_ROOT."inc/class_plugins.php";
    $plugins = new pluginSystem;
    $plugins->load&#40;&#41;;
    &#125;

    // We have some shutdown queries needing to be run
    if&#40;is_array&#40;$db->shutdown_queries&#41;&#41;
    &#123;
    // Loop through and run them all
    foreach&#40;$db->shutdown_queries as $query&#41;
    &#123;
    $db->query&#40;$query&#41;;
    &#125;
    &#125;

    // Run any shutdown functions if we have them
    if&#40;is_array&#40;$shutdown_functions&#41;&#41;
    &#123;
    foreach&#40;$shutdown_functions as $function&#41;
    &#123;
    $function&#40;&#41;;
    &#125;
    &#125;
    $done_shutdown = true;
    &#125;

    /**
    * Sends a specified amount of messages from the mail queue
    *
    * @param int The number of messages to send &#40;Defaults to 20&#41;
    */
    function send_mail_queue&#40;$count=10&#41;
    &#123;
    global $db, $cache, $plugins;

    $plugins->run_hooks&#40;"send_mail_queue_start"&#41;;

    // Check to see if the mail queue has messages needing to be sent
    $mailcache = $cache->read&#40;"mailqueue"&#41;;
    if&#40;$mailcache&#91;'queue_size'&#93; > 0 && &#40;$mailcache&#91;'locked'&#93; == 0 || $mailcache&#91;'locked'&#93; < time&#40;&#41;-300&#41;&#41;
    &#123;
    // Lock the queue so no other messages can be sent whilst these are &#40;for popular boards&#41;
    $cache->updatemailqueue&#40;0, time&#40;&#41;&#41;;

    // Fetch emails for this page view - and send them
    $query = $db->simple_select&#40;TABLE_PREFIX."mailqueue", "*", "", array&#40;"order_by" => "mid", "order_dir" => "asc", "limit_start" => 0, "limit" => $count&#41;&#41;;

    $plugins->run_hooks_by_ref&#40;"send_mail_queue_mail", $query&#41;;

    while&#40;$email = $db->fetch_array&#40;$query&#41;&#41;
    &#123;
    // Delete the message from the queue
    $db->delete_query&#40;TABLE_PREFIX."mailqueue", "mid='&#123;$email&#91;'mid'&#93;&#125;'"&#41; ;

    my_mail&#40;$email&#91;'mailto'&#93;, $email&#91;'subject'&#93;, $email&#91;'message'&#93;, $email&#91;'mailfrom'&#93;, "", $email&#91;'headers'&#93;&#41;;
    &#125;
    // Update the mailqueue cache and remove the lock
    $cache->updatemailqueue&#40;time&#40;&#41;, 0&#41;;
    &#125;
    $plugins->run_hooks&#40;"send_mail_queue_end"&#41;;
    &#125;

    /**
    * Parses the contents of a page before outputting it.
    *
    * @param string The contents of the page.
    * @return string The parsed page.
    */
    function parse_page&#40;$contents&#41;
    &#123;
    global $db, $lang, $theme, $mybb, $htmldoctype, $loadpmpopup, $archive_url;

    $contents = str_replace&#40;'<navigation>', build_breadcrumb&#40;1&#41;, $contents&#41;;
    $contents = str_replace&#40;'<archive_url>', $archive_url, $contents&#41;;

    if&#40;$htmldoctype&#41;
    &#123;
    $contents = $htmldoctype.$contents;
    &#125;
    else
    &#123;
    $contents = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http&#58;//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n".$contents;
    &#125;
    if&#40;$lang->settings&#91;'rtl'&#93; == 1&#41;
    &#123;
    $contents = str_replace&#40;"<html", "<html dir=\"rtl\"", $contents&#41;;
    &#125;
    if&#40;$lang->settings&#91;'htmllang'&#93;&#41;
    &#123;
    $contents = str_replace&#40;"<html", "<html lang=\"".$lang->settings&#91;'htmllang'&#93;."\"", $contents&#41;;
    &#125;

    if&#40;$loadpmpopup&#41;
    &#123;
    if&#40;my_substr&#40;$_SERVER&#91;'PHP_SELF'&#93; , -strlen&#40;"private.php"&#41;&#41; != "private.php"&#41;
    &#123;
    $contents = str_replace&#40;"<body", "<body onload=\"Javascript&#58;MyBB.newPM&#40;&#41;\"", $contents&#41;;
    &#125;
    &#125;
    return $contents;
    &#125;

    /**
    * Turn a unix timestamp in to a "friendly" date/time format for the user.
    *
    * @param string A date format according to PHP's date structure.
    * @param int The unix timestamp the date should be generated for.
    * @param int The offset in hours that should be applied to times. &#40;timezones&#41;
    * @param int Whether or not to use today/yesterday formatting.
    * @return string The formatted timestamp.
    */
    function my_date&#40;$format, $stamp="", $offset="", $ty=1&#41;
    &#123;
    global $mybb, $lang, $mybbadmin, $plugins;

    // If the stamp isn't set, use time&#40;&#41;
    if&#40;empty&#40;$stamp&#41;&#41;
    &#123;
    $stamp = time&#40;&#41;;
    &#125;

    if&#40;!$offset && $offset != '0'&#41;
    &#123;
    if&#40;$mybb->user&#91;'uid'&#93; != 0 && array_key_exists&#40;"timezone", $mybb->user&#41;&#41;
    &#123;
    $offset = $mybb->user&#91;'timezone'&#93;;
    $dstcorrection = $mybb->user&#91;'dst'&#93;;
    &#125;
    elseif&#40;defined&#40;"IN_ADMINCP"&#41;&#41;
    &#123;
    $offset = $mybbadmin&#91;'timezone'&#93;;
    $dstcorrection = $mybbadmin&#91;'dst'&#93;;
    &#125;
    else
    &#123;
    $offset = $mybb->settings&#91;'timezoneoffset'&#93;;
    $dstcorrection = $mybb->settings&#91;'dstcorrection'&#93;;
    &#125;
    // If DST correction is enabled, add an additional hour to the timezone.
    if&#40;$dstcorrection == "yes"&#41;
    &#123;
    $offset++;
    if&#40;my_substr&#40;$offset, 0, 1&#41; != "-"&#41;
    &#123;
    $offset = "+".$offset;
    &#125;
    &#125;
    &#125;
    if&#40;$offset == "-"&#41;
    &#123;
    $offset = 0;
    &#125;
    $date = gmdate&#40;$format, $stamp + &#40;$offset * 3600&#41;&#41;;
    if&#40;$mybb->settings&#91;'dateformat'&#93; == $format && $ty&#41;
    &#123;
    $stamp = time&#40;&#41;;
    $todaysdate = gmdate&#40;$format, $stamp + &#40;$offset * 3600&#41;&#41;;
    $yesterdaysdate = gmdate&#40;$format, &#40;$stamp - 86400&#41; + &#40;$offset * 3600&#41;&#41;;
    if&#40;$todaysdate == $date&#41;
    &#123;
    $date = $lang->today;
    &#125;
    elseif&#40;$yesterdaysdate == $date&#41;
    &#123;
    $date = $lang->yesterday;
    &#125;
    &#125;

    $plugins->run_hooks_by_ref&#40;"my_date", $date&#41;;

    return $date;
    &#125;

    /**
    * Sends an email using PHP's mail function, formatting it appropriately.
    *
    * @param string Address the email should be addressed to.
    * @param string The subject of the email being sent.
    * @param string The message being sent.
    * @param string The from address of the email, if blank, the board name will be used.
    * @param string The chracter set being used to send this email.
    */
    function my_mail&#40;$to, $subject, $message, $from="", $charset="", $headers=""&#41;
    &#123;
    global $db, $mybb, $lang;

    if&#40;empty&#40;$charset&#41;&#41;
    &#123;
    $charset = $lang->settings&#91;'charset'&#93;;
    &#125;

    // Build mail headers
    if&#40;my_strlen&#40;trim&#40;$from&#41;&#41; == 0&#41;
    &#123;
    $from = "\"".$mybb->settings&#91;'bbname'&#93;." Mailer\" <".$mybb->settings&#91;'adminemail'&#93;.">";
    &#125;
    $headers .= "From&#58; &#123;$from&#125;\n";
    $headers .= "Return-Path&#58; &#123;$mybb->settings&#91;'adminemail'&#93;&#125;\n";
    if&#40;$_SERVER&#91;'SERVER_NAME'&#93;&#41;
    &#123;
    $http_host = $_SERVER&#91;'SERVER_NAME'&#93;;
    &#125;
    else if&#40;$_SERVER&#91;'HTTP_HOST'&#93;&#41;
    &#123;
    $http_host = $_SERVER&#91;'HTTP_HOST'&#93;;
    &#125;
    else
    &#123;
    $http_host = "unknown.local";
    &#125;
    $headers .= "Message-ID&#58; <". md5&#40;uniqid&#40;time&#40;&#41;&#41;&#41;."@&#12 3;$http_host&#125;>\n";
    $headers .= "MIME-Version&#58; 1.0\n";
    $headers .= "Content-Type&#58; text/plain; charset=\"&#123;$charset&#125;\"\n";
    $headers .= "Content-Transfer-Encoding&#58; 8bit\n";
    $headers .= "X-Priority&#58; 3\n";
    $headers .= "X-MSMail-Priority&#58; Normal\n";
    $headers .= "X-Mailer&#58; MyBB\n";
    $headers .= "X-MyBB-Script&#58; &#123;$http_host&#125;/&#123;$_SERVER&#91;'PHP_SELF'&#93;&#125;\n";

    // For some reason sendmail/qmail doesn't like \r\n
    $sendmail = @ini_get&#40;'sendmail_path'&#41;;
    if&#40;$sendmail&#41;
    &#123;
    $headers = preg_replace&#40;"#&#40;\r\n|\r|\n&#41;#s", "\n", $headers&#41;;
    $message = preg_replace&#40;"#&#40;\r\n|\r|\n&#41;#s", "\n", $message&#41;;
    &#125;
    else
    &#123;
    $headers = preg_replace&#40;"#&#40;\r\n|\r|\n&#41;#s", "\r\n", $headers&#41;;
    $message = preg_replace&#40;"#&#40;\r\n|\r|\n&#41;#s", "\r\n", $message&#41;;
    &#125;

    mail&#40;$to, $subject, $message, $headers&#41;;
    &#125;

    /**
    * Return a parent list for the specified forum.
    *
    * @param int The forum id to get the parent list for.
    * @return string The comma-separated parent list.
    */
    function get_parent_list&#40;$fid&#41;
    &#123;
    global $db, $forum_cache;
    static $forumarraycache;

    if&#40;$forumarraycache&#91;$fid&#93;&#41;
    &#123;
    return $forumarraycache&#91;$fid&#93;&#91;'parentlist'&#9 3;;
    &#125;
    elseif&#40;$forum_cache&#91;$fid&#93;&#41;
    &#123;
    return $forum_cache&#91;$fid&#93;&#91;'parentlist'&#93;;
    &#125;
    else
    &#123;
    cache_forums&#40;&#41;;
    return $forum_cache&#91;$fid&#93;&#91;'parentlist'&#93;;
    &#125;
    &#125;

    /**
    * Build a parent list of a specific forum, suitable for querying
    *
    * @param int The forum ID
    * @param string The column name to add to the query
    * @param string The joiner for each forum for querying &#40;OR | AND | etc&#41;
    * @param string The parent list of the forum - if you have it
    * @return string The query string generated
    */
    function build_parent_list&#40;$fid, $column="fid", $joiner="OR", $parentlist=""&#41;
    &#123;
    if&#40;!$parentlist&#41;
    &#123;
    $parentlist = get_parent_list&#40;$fid&#41;;
    &#125;
    $parentsexploded = explode&#40;",", $parentlist&#41;;
    $builtlist = "&#40;";
    $sep = '';
    foreach&#40;$parentsexploded as $key => $val&#41;
    &#123;
    $builtlist .= "$sep$column='$val'";
    $sep = " $joiner ";
    &#125;
    $builtlist .= "&#41;";
    return $builtlist;
    &#125;

    /**
    * Load the forum cache in to memory
    *
    * @param boolean True to force a reload of the cache
    */
    function cache_forums&#40;$force=false&#41;
    &#123;
    global $forum_cache, $db, $cache;

    if&#40;$force == true&#41;
    &#123;
    $forum_cache = $cache->read&#40;"forums", 1&#41;;
    return $forum_cache;
    &#125;

    if&#40;!$forum_cache&#41;
    &#123;
    $forum_cache = $cache->read&#40;"forums"&#41;;
    if&#40;!$forum_cache&#41;
    &#123;
    $cache->updateforums&#40;&#41;;
    $forum_cache = $cache->read&#40;"forums", 1&#41;;
    &#125;
    &#125;
    return $forum_cache;
    &#125;

    /**
    * Produce a friendly error message page
    *
    * @param string The error message to be shown
    * @param string The title of the message shown in the title of the page and the error table
    */
    function error&#40;$error="", $title=""&#41;
    &#123;
    global $header, $footer, $theme, $headerinclude, $db, $templates, $lang, $mybb;

    if&#40;!$error&#41;
    &#123;
    $error = $lang->unknown_error;
    &#125;
    if&#40;!$title&#41;
    &#123;
    $title = $mybb->settings&#91;'bbname'&#93;;
    &#125;
    $timenow = my_date&#40;$mybb->settings&#91;'dateformat'&#93;, time&#40;&#41;&#41; . " " . my_date&#40;$mybb->settings&#91;'timeformat'&#93;, time&#40;&#41;&#41;;
    reset_breadcrumb&#40;&#41;;
    add_breadcrumb&#40;$lang->error&#41;;
    eval&#40;"\$errorpage = \"".$templates->get&#40;"error"&#41;."\";"&#41;;
    output_page&#40;$errorpage&#41;;
    exit;
    &#125;

    /**
    * Produce an error message for displaying inline on a page
    *
    * @param array Array of errors to be shown
    * @param string The title of the error message
    * @return string The inline error HTML
    */
    function inline_error&#40;$errors, $title=""&#41;
    &#123;
    global $theme, $mybb, $db, $lang, $templates;
    if&#40;!$title&#41;
    &#123;
    $title = $lang->please_correct_errors;
    &#125;
    if&#40;!is_array&#40;$errors&#41;&#41;
    &#123;
    $errors = array&#40;$errors&#41;;
    &#125;
    foreach&#40;$errors as $error&#41;
    &#123;
    $errorlist .= "[*]".$error."\n";
    &#125;
    eval&#40;"\$errors = \"".$templates->get&#40;"error_inline"&#41;."\";"&#41;;
    return $errors;
    &#125;

    /**
    * Presents the user with a "no permission" page
    */
    function error_no_permission&#40;&#41;
    &#123;
    global $mybb, $theme, $templates, $db, $lang, $plugins, $session;

    $time = time&#40;&#41;;
    $plugins->run_hooks&#40;"no_permission"&#41;;
    $noperm_array = array &#40;
    "nopermission" => '1',
    "location1" => 0,
    "location2" => 0
    &#41;;
    $db->update_query&#40;TABLE_PREFIX."sessions", $noperm_array, "sid='".$session->sid."'"&#41;;
    $url = htmlspecialchars_uni&#40;$_SERVER&#91;'REQUEST_URI '&#93;&#41;;
    if&#40;$mybb->user&#91;'uid'&#93;&#41;
    &#123;
    $lang->error_nopermission_user_5 = sprintf&#40;$lang->error_nopermission_user_5, $mybb->user&#91;'username'&#93;&#41;;
    eval&#40;"\$errorpage = \"".$templates->get&#40;"error_nopermission_loggedin"&#41;."\";"& #41;;
    &#125;
    else
    &#123;
    eval&#40;"\$errorpage = \"".$templates->get&#40;"error_nopermission"&#41;."\";"&#41;;
    &#125;
    error&#40;$errorpage&#41;;
    &#125;

    /**
    * Redirect the user to a given URL with a given message
    *
    * @param string The URL to redirect the user to
    * @param string The redirection message to be shown
    */
    function redirect&#40;$url, $message="", $title=""&#41;
    &#123;
    global $header, $footer, $mybb, $theme, $headerinclude, $templates, $lang, $plugins;

    $loadpmpopup = false;
    if&#40;!$message&#41;
    &#123;
    $message = $lang->redirect;
    &#125;
    $timenow = my_date&#40;$mybb->settings&#91;'dateformat'&#93;, time&#40;&#41;&#41; . " " . my_date&#40;$mybb->settings&#91;'timeformat'&#93;, time&#40;&#41;&#41;;
    $plugins->run_hooks&#40;"redirect"&#41;;
    if&#40;!$title&#41;
    &#123;
    $title = $mybb->settings&#91;'bbname'&#93;;
    &#125;
    if&#40;$mybb->settings&#91;'redirects'&#93; == "on" && $mybb->user&#91;'showredirect'&#93; != "no"&#41;
    &#123;
    $url = str_replace&#40;"&amp;", "&", $url&#41;;
    $url = htmlspecialchars&#40;$url&#41;;
    eval&#40;"\$redirectpage = \"".$templates->get&#40;"redirect"&#41;."\";"&#41;;
    output_page&#40;$redirectpage&#41;;
    &#125;
    else
    &#123;
    $url = str_replace&#40;"#", "&#", $url&#41;;
    $url = str_replace&#40;"&amp;", "&", $url&#41;;
    $url = str_replace&#40;array&#40;"\n","\r",";"&#41;, "", $url&#41;;
    header&#40;"Location&#58; $url"&#41;;
    &#125;
    exit;
    &#125;

    /**
    * Generate a listing of page - pagination
    *
    * @param int The number of items
    * @param int The number of items to be shown per page
    * @param int The current page number
    * @param string The URL to have page numbers tacked on to
    * @return string The generated pagination
    */
    function multipage&#40;$count, $perpage, $page, $url&#41;
    &#123;
    global $theme, $templates, $lang, $mybb;

    if&#40;$count > $perpage&#41;
    &#123;
    $pages = $count / $perpage;
    $pages = ceil&#40;$pages&#41;;

    if&#40;$page > 1&#41;
    &#123;
    $prev = $page - 1;
    eval&#40;"\$prevpage = \"".$templates->get&#40;"multipage_prevpage"&#41;."\";"&#41;;
    &#125;
    if&#40;$page < $pages&#41;
    &#123;
    $next = $page + 1;
    eval&#40;"\$nextpage = \"".$templates->get&#40;"multipage_nextpage"&#41;."\";"&#41;;
    &#125;
    $from = &#40;$page>4&#41; ? &#40;$page-4&#41;&#58;1;
    if&#40;$page == $pages&#41;
    &#123;
    $to = $pages;
    &#125;
    elseif&#40;$page == $pages-1&#41;
    &#123;
    $to = $page+1;
    &#125;
    elseif&#40;$page == $pages-2&#41;
    &#123;
    $to = $page+2;
    &#125;
    elseif&#40;$page == $pages-3&#41;
    &#123;
    $to = $page+3;
    &#125;
    else
    &#123;
    $to = $page+4;
    &#125;
    for&#40;$i = $from; $i <= $to; $i++&#41;
    &#123;
    $plate = "multipage_page".&#40;&#40;$i==$page&#41; ? "_current"&#58;""&#41;;
    eval&#40;"\$mppage .= \"".$templates->get&#40;$plate&#41;."\";"&#41;;
    &#125;
    $lang->multipage_pages = sprintf&#40;$lang->multipage_pages, $pages&#41;;
    eval&#40;"\$start = \"".$templates->get&#40;"multipage_start"&#41;."\";"&#41;;
    eval&#40;"\$end = \"".$templates->get&#40;"multipage_end"&#41;."\";"&#41;;
    eval&#40;"\$multipage = \"".$templates->get&#40;"multipage"&#41;."\";"&#41;;
    return $multipage;
    &#125;
    &#125;

    /**
    * Fetch the permissions for a specific user
    *
    * @param int The user ID
    * @return array Array of user permissions for the specified user
    */
    function user_permissions&#40;$uid=0&#41;
    &#123;
    global $mybb, $cache, $groupscache, $user_cache;

    // If no user id is specified, assume it is the current user
    if&#40;$uid == 0&#41;
    &#123;
    $uid = $mybb->user&#91;'uid'&#93;;
    &#125;

    // User id does not match current user, fetch permissions
    if&#40;$uid != $mybb->user&#91;'uid'&#93;&#41;
    &#123;
    // We've already cached permissions for this user, return them.
    if&#40;$user_cache&#91;$uid&#93;&#91;'permissions' &#93;&#41;
    &#123;
    return $user_cache&#91;$uid&#93;&#91;'permissions'&#93;;
    &#125;

    // This user was not already cached, fetch their user information.
    if&#40;!$user_cache&#91;$uid&#93;&#41;
    &#123;
    $user_cache&#91;$uid&#93; = get_user&#40;$uid&#41;;
    &#125;

    // Collect group permissions.
    $gid = $user_cache&#91;$uid&#93;&#91;'usergroup'&#93;."," .$user_cache&#91;$uid&#93;&#91;'additionalgroups'& #93;;
    $groupperms = usergroup_permissions&#40;$gid&#41;;

    // Store group permissions in user cache.
    $user_cache&#91;$uid&#93;&#91;'permissions'&#93; = $groupperms;
    return $groupperms;
    &#125;
    // This user is the current user, return their permissions
    else
    &#123;
    return $mybb->usergroup;
    &#125;
    &#125;

    /**
    * Fetch the usergroup permissions for a specic group or series of groups combined
    *
    * @param mixed A list of groups &#40;Can be a single integer, or a list of groups separated by a comma&#41;
    * @return array Array of permissions generated for the groups
    */
    function usergroup_permissions&#40;$gid=0&#41;
    &#123;
    global $cache, $groupscache, $grouppermignore, $groupzerogreater;

    if&#40;!is_array&#40;$groupscache&#41;&#41;
    &#123;
    $groupscache = $cache->read&#40;"usergroups"&#41;;
    &#125;
    $groups = explode&#40;",", $gid&#41;;
    if&#40;count&#40;$groups&#41; == 1&#41;
    &#123;
    return $groupscache&#91;$gid&#93;;
    &#125;
    foreach&#40;$groups as $gid&#41;
    &#123;
    if&#40;trim&#40;$gid&#41; == "" || !$groupscache&#91;$gid&#93;&#41;
    &#123;
    continue;
    &#125;
    foreach&#40;$groupscache&#91;$gid&#93; as $perm => $access&#41;
    &#123;
    if&#40;!in_array&#40;$perm, $grouppermignore&#41;&#41;
    &#123;
    if&#40;isset&#40;$usergroup&#91;$perm&#93;&#41;&#4 1;
    &#123;
    $permbit = $usergroup&#91;$perm&#93;;
    &#125;
    else
    &#123;
    $permbit = "";
    &#125;
    $zerogreater = 0;
    if&#40;in_array&#40;$perm, $groupzerogreater&#41;&#41;
    &#123;
    if&#40;$access == 0&#41;
    &#123;
    $usergroup&#91;$perm&#93; = 0;
    $zerogreater = 1;
    &#125;
    &#125;
    if&#40;&#40;$access > $permbit || &#40;$access == "yes" && $permbit == "no"&#41; || !$permbit&#41; && $zerogreater != 1&#41;
    &#123;
    $usergroup&#91;$perm&#93; = $access;
    &#125;
    &#125;
    &#125;
    &#125;
    return $usergroup;
    &#125;

    /**
    * Fetch the display group properties for a specific display group
    *
    * @param int The group ID to fetch the display properties for
    * @return array Array of display properties for the group
    */
    function usergroup_displaygroup&#40;$gid&#41;
    &#123;
    global $cache, $groupscache, $displaygroupfields;

    if&#40;!is_array&#40;$groupscache&#41;&#41;
    &#123;
    $groupscache = $cache->read&#40;"usergroups"&#41;;
    &#125;
    $displaygroup = array&#40;&#41;;
    $group = $groupscache&#91;$gid&#93;;
    foreach&#40;$displaygroupfields as $field&#41;
    &#123;
    $displaygroup&#91;$field&#93; = $group&#91;$field&#93;;
    &#125;
    return $displaygroup;
    &#125;

    /**
    * Build the forum permissions for a specific forum, user or group
    *
    * @param int The forum ID to build permissions for &#40;0 builds for all forums&#41;
    * @param int The user to build the permissions for &#40;0 assumes current logged in user&#41;
    * @param int The group of the user to build permissions for &#40;0 will fetch it&#41;
    * @return array Forum permissions for the specific forum or forums
    */
    function forum_permissions&#40;$fid=0, $uid=0, $gid=0&#41;
    &#123;
    global $db, $cache, $groupscache, $forum_cache, $fpermcache, $mybb, $usercache, $fpermissionscache;

    if&#40;$uid == 0&#41;
    &#123;
    $uid = $mybb->user&#91;'uid'&#93;;
    &#125;
    if&#40;!$gid || $gid == 0&#41; // If no group, we need to fetch it
    &#123;
    if&#40;$uid != $mybb->user&#91;'uid'&#93;&#41;
    &#123;
    if&#40;$usercache&#91;$uid&#93;&#41;
    &#123;
    $query = $db->query&#40;"SELECT * FROM ".TABLE_PREFIX."users WHERE uid='$uid'"&#41;;
    $usercache&#91;$uid&#93; = $db->fetch_array&#40;$query&#41;;
    &#125;
    $gid = $usercache&#91;$uid&#93;&#91;'usergroup'&#93;.",". $usercache&#91;$uid&#93;&#91;'additionalgroups'&#9 3;;
    $groupperms = usergroup_permissions&#40;$gid&#41;;
    &#125;
    else
    &#123;
    $gid = $mybb->user&#91;'usergroup'&#93;;
    if&#40;isset&#40;$mybb->user&#91;'additionalgroups'&#93;&#41;&#41;
    &#123;
    $gid .= ",".$mybb->user&#91;'additionalgroups'&#93;;
    &#125;
    $groupperms = $mybb->usergroup;
    &#125;
    &#125;
    if&#40;!is_array&#40;$forum_cache&#41;&#41;
    &#123;
    $forum_cache = cache_forums&#40;&#41;;
    if&#40;!$forum_cache&#41;
    &#123;
    return false;
    &#125;
    &#125;
    if&#40;!is_array&#40;$fpermcache&#41;&#41;
    &#123;
    $fpermcache = $cache->read&#40;"forumpermissions"&#41;;
    &#125;
    if&#40;$fid&#41; // Fetch the permissions for a single forum
    &#123;
    $permissions = fetch_forum_permissions&#40;$fid, $gid, $groupperms&#41;;
    &#125;
    else
    &#123;
    foreach&#40;$forum_cache as $forum&#41;
    &#123;
    $permissions&#91;$forum&#91;'fid'&#93;&#93; = fetch_forum_permissions&#40;$forum&#91;'fid'&#93;, $gid, $groupperms&#41;;
    &#125;
    &#125;
    return $permissions;
    &#125;

    /**
    * Fetches the permissions for a specific forum/group applying the inheritance scheme.
    * Called by forum_permissions&#40;&#41;
    *
    * @param int The forum ID
    * @param string A comma separated list of usergroups
    * @param array Group permissions
    * @return array Permissions for this forum
    */
    function fetch_forum_permissions&#40;$fid, $gid, $groupperms&#41;
    &#123;
    global $groupscache, $forum_cache, $fpermcache, $mybb, $fpermfields;

    $groups = explode&#40;",", $gid&#41;;

    if&#40;!$fpermcache&#91;$fid&#93;&#41; // This forum has no custom or inherited permisssions so lets just return the group permissions
    &#123;
    return $groupperms;
    &#125;

    $current_permissions = array&#40;&#41;;

    foreach&#40;$groups as $gid&#41;
    &#123;
    if&#40;$groupscache&#91;$gid&#93;&#41;
    &#123;
    // If this forum has permissions set
    if&#40;$fpermcache&#91;$fid&#93;&#91;$gid&#93;&#41 ;
    &#123;
    $level_permissions = $fpermcache&#91;$fid&#93;&#91;$gid&#93;;
    foreach&#40;$level_permissions as $permission => $access&#41;
    &#123;
    if&#40;$access >= $current_permissions&#91;$permission&#93; || &#40;$access == "yes" && $current_permissions&#91;$permission&#93; == "no"&#41; || !$current_permissions&#91;$permission&#93;&#41;
    &#123;
    $current_permissions&#91;$permission&#93; = $access;
    &#125;
    &#125;
    &#125;
    &#125;
    &#125;

    if&#40;count&#40;$current_permissions&#41; == 0&#41;
    &#123;
    $current_permissions = $groupperms;
    &#125;
    return $current_permissions;
    &#125;

    /**
    * Check the password given on a certain forum for validity
    *
    * @param int The forum ID
    * @param string The plain text password for the forum
    */
    function check_forum_password&#40;$fid, $password=""&#41;
    &#123;
    global $mybb, $header, $footer, $headerinclude, $theme, $templates, $lang;
    $showform = 1;

    if&#40;$password&#41;
    &#123;
    if&#40;$mybb->input&#91;'pwverify'&#93;&#41;
    &#123;
    if&#40;$password == $mybb->input&#91;'pwverify'&#93;&#41;
    &#123;
    my_setcookie&#40;"forumpass&#91;$fid&#93;", md5&#40;$mybb->user&#91;'uid'&#93;.$mybb->input&#91;'pwverify'&#93;&#41;, null, true&#41;;
    $showform = 0;
    &#125;
    else
    &#123;
    eval&#40;"\$pwnote = \"".$templates->get&#40;"forumdisplay_password_wrongpass"&#41;."\ ";"&#41;;
    $showform = 1;
    &#125;
    &#125;
    else
    &#123;
    if&#40;!$_COOKIE&#91;'forumpass'&#93;&#91;$fid&#93 ; || &#40;$_COOKIE&#91;'forumpass'&#93;&#91;$fid&#93 ; && md5&#40;$mybb->user&#91;'uid'&#93;.$password&#41; != $_COOKIE&#91;'forumpass'&#93;&#91;$fid&#93;&#41;&# 41;
    &#123;
    $showform = 1;
    &#125;
    else
    &#123;
    $showform = 0;
    &#125;
    &#125;
    &#125;
    else
    &#123;
    $showform = 0;
    &#125;
    if&#40;$showform&#41;
    &#123;
    $_SERVER&#91;'REQUEST_URI'&#93; = htmlspecialchars_uni&#40;$_SERVER&#91;'REQUEST_URI '&#93;&#41;;
    eval&#40;"\$pwform = \"".$templates->get&#40;"forumdisplay_password"&#41;."\";"&#41; ;
    output_page&#40;$pwform&#41;;
    exit;
    &#125;
    &#125;

    /**
    * Return the permissions for a moderator in a specific forum
    *
    * @param fid The forum ID
    * @param uid The user ID to fetch permissions for &#40;0 assumes current logged in user&#41;
    * @param string The parent list for the forum &#40;if blank, will be fetched&#41;
    * @return array Array of moderator permissions for the specific forum
    */
    function get_moderator_permissions&#40;$fid, $uid="0", $parentslist=""&#41;
    &#123;
    global $mybb, $db;
    static $modpermscache;

    if&#40;$uid < 1&#41;
    &#123;
    $uid = $mybb->user&#91;'uid'&#93;;
    &#125;

    if&#40;!isset&#40;$modpermscache&#91;$fid&#93;&#91 ;$uid&#93;&#41;&#41;
    &#123;
    if&#40;!$parentslist&#41;
    &#123;
    $parentslist = get_parent_list&#40;$fid&#41;;
    &#125;

    $sql = build_parent_list&#40;$fid, "fid", "OR", $parentslist&#41;;
    $query = $db->simple_select&#40;TABLE_PREFIX."moderators", "*", "uid='&#123;$uid&#125;' AND &#123;$sql&#125;"&#41;;
    $perms = $db->fetch_array&#40;$query&#41;;
    $modpermscache&#91;$fid&#93;&#91;$uid&#93; = $perms;
    &#125;
    else
    &#123;
    $perms = $modpermscache&#91;$fid&#93;&#91;$uid&#93;;
    &#125;

    return $perms;
    &#125;

    /**
    * Checks if a moderator has permissions to perform an action in a specific forum
    *
    * @param int The forum ID &#40;0 assumes global&#41;
    * @param string The action tyring to be performed. &#40;blank assumes any action at all&#41;
    * @param int The user ID &#40;0 assumes current user&#41;
    * @return yes|no Returns yes if the user has permission, no if they do not
    */
    function is_moderator&#40;$fid="0", $action="", $uid="0"&#41;
    &#123;
    global $mybb, $db;

    if&#40;$uid == 0&#41;
    &#123;
    $uid = $mybb->user&#91;'uid'&#93;;
    &#125;

    $user_perms = user_permissions&#40;$uid&#41;;
    if&#40;$user_perms&#91;'issupermod'&#93; == "yes"&#41;
    &#123;
    return "yes";
    &#125;
    else
    &#123;
    if&#40;!$fid&#41;
    &#123;
    $query = $db->simple_select&#40;TABLE_PREFIX.'moderators', 'COUNT&#40;*&#41; as count', "uid=&#123;$uid&#125;", array&#40;'limit' => 1&#41;&#41;;
    $modcheck = $db->fetch_array&#40;$query&#41;;
    if&#40;$modcheck&#91;'count'&#93; > 0&#41;
    &#123;
    return "yes";
    &#125;
    else
    &#123;
    return "no";
    &#125;
    &#125;
    else
    &#123;
    $modperms = get_moderator_permissions&#40;$fid, $uid&#41;;
    if&#40;!$action && $modperms&#41;
    &#123;
    return "yes";
    &#125;
    else
    &#123;
    if&#40;$modperms&#91;$action&#93; == "yes"&#41;
    &#123;
    return "yes";
    &#125;
    else
    &#123;
    return "no";
    &#125;
    &#125;
    &#125;
    &#125;
    &#125;

    /**
    * Generate a list of the posticons.
    *
    * @return string The template of posticons.
    */
    function get_post_icons&#40;&#41;
    &#123;
    global $mybb, $db, $icon, $theme, $templates, $lang;

    $listed = 0;
    if&#40;$mybb->input&#91;'icon'&#93;&#41;
    &#123;
    $icon = $mybb->input&#91;'icon'&#93;;
    &#125;
    $no_icons_checked = " checked=\"checked\"";
    $query = $db->query&#40;"
    SELECT *
    FROM ".TABLE_PREFIX."icons
    ORDER BY name DESC
    "&#41;;
    while&#40;$dbicon = $db->fetch_array&#40;$query&#41;&#41;
    &#123;
    if&#40;$icon == $dbicon&#91;'iid'&#93;&#41;
    &#123;
    $iconlist .= "<input type=\"radio\" name=\"icon\" value=\"".$dbicon&#91;'iid'&#93;."\" checked=\"checked\" /> <img src=\"".$dbicon&#91;'path'&#93;."\" alt=\"".$dbicon&#91;'name'&#93;."\" />";
    $no_icons_checked = "";
    &#125;
    else
    &#123;
    $iconlist .= "<input type=\"radio\" name=\"icon\" value=\"".$dbicon&#91;'iid'&#93;."\" /> <img src=\"".$dbicon&#91;'path'&#93;."\" alt=\"".$dbicon&#91;'name'&#93;."\" />";
    &#125;
    $listed++;
    if&#40;$listed == 9&#41;
    &#123;
    $iconlist .= "
    ";
    $listed = 0;
    &#125;
    &#125;
    eval&#40;"\$posticons = \"".$templates->get&#40;"posticons"&#41;."\";"&#41;;
    return $posticons;
    &#125;

    /**
    * MyBB setcookie&#40;&#41; wrapper.
    *
    * @param string The cookie identifier.
    * @param string The cookie value.
    * @param int The timestamp of the expiry date.
    * @param boolean True if setting a HttpOnly cookie &#40;supported by IE, Opera 9, Konqueror&#41;
    */
    function my_setcookie&#40;$name, $value="", $expires="", $httponly=false&#41;
    &#123;
    global $mybb;

    if&#40;!$mybb->settings&#91;'cookiepath'&#93;&#41;
    &#123;
    $mybb->settings&#91;'cookiepath'&#93; = "/";
    &#125;
    if&#40;$expires == -1&#41;
    &#123;
    $expires = 0;
    &#125;
    else if&#40;$expires == "" || $expires == null&#41;
    &#123;
    if&#40;$mybb->user&#91;'remember'&#93; == "no"&#41;
    &#123;
    $expires = 0;
    &#125;
    else
    &#123;
    $expires = time&#40;&#41; + &#40;60*60*24*365&#41;; // Make the cookie expire in a years time
    &#125;
    &#125;
    else
    &#123;
    $expires = time&#40;&#41; + intval&#40;$expires&#41;;
    &#125;

    $mybb->settings&#91;'cookiepath'&#93; = str_replace&#40;array&#40;"\n","\r"&#41;, "", $mybb->settings&#91;'cookiepath'&#93;&#41;;
    $mybb->settings&#91;'cookiedomain'&#93; = str_replace&#40;array&#40;"\n","\r"&#41;, "", $mybb->settings&#91;'cookiedomain'&#93;&#41;;

    // Versions of PHP prior to 5.2 do not support HttpOnly cookies and IE is buggy when specifying a blank domain so set the cookie manually
    $cookie = "Set-Cookie&#58; &#123;$name&#125;=".urlencode&#40;$value&#41;;
    if&#40;$expires > 0&#41;
    &#123;
    $cookie .= "; expires=".gmdate&#40;'D, d-M-Y H&#58;i&#58;s \\G\\M\\T', $expires&#41;;
    &#125;
    if&#40;!empty&#40;$mybb->settings&#91;'cookiepath'&#93;&#41;&#41;
    &#123;
    $cookie .= "; path=&#123;$mybb->settings&#91;'cookiepath'&#93;&#125;";
    &#125;
    if&#40;!empty&#40;$mybb->settings&#91;'cookiedomain'&#93;&#41;&#41;
    &#123;
    $cookie .= "; domain=&#123;$mybb->settings&#91;'cookiedomain'&#93;&#125;";
    &#125;
    if&#40;$httponly == true&#41;
    &#123;
    $cookie .= "; HttpOnly";
    &#125;
    header&#40;$cookie, false&#41;;
    &#125;

    /**
    * Unset a cookie set by MyBB.
    *
    * @param string The cookie identifier.
    */
    function my_unsetcookie&#40;$name&#41;
    &#123;
    global $mybb;
    $expires = -3600;
    my_setcookie&#40;$name, "", $expires&#41;;
    &#125;

    /**
    * Get the contents from a serialised cookie array.
    *
    * @param string The cookie identifier.
    * @param int The cookie content id.
    * @return array|boolean The cookie id's content array or false when non-existent.
    */
    function my_get_array_cookie&#40;$name, $id&#41;
    &#123;
    if&#40;!isset&#40;$_COOKIE&#91;'mybb'&#93;&#91;$na me&#93;&#41;&#41;
    &#123;
    return false;
    &#125;
    $cookie = unserialize&#40;$_COOKIE&#91;'mybb'&#93;&#91;$name &#93;&#41;;
    if&#40;isset&#40;$cookie&#91;$id&#93;&#41;&#41;
    &#123;
    return $cookie&#91;$id&#93;;
    &#125;
    else
    &#123;
    return 0;
    &#125;
    &#125;

    /**
    * Set a serialised cookie array.
    *
    * @param string The cookie identifier.
    * @param int The cookie content id.
    * @param string The value to set the cookie to.
    */
    function my_set_array_cookie&#40;$name, $id, $value&#41;
    &#123;
    $cookie = $_COOKIE&#91;'mybb'&#93;;
    $newcookie = unserialize&#40;$cookie&#91;$name&#93;&#41;;
    $newcookie&#91;$id&#93; = $value;
    $newcookie = addslashes&#40;serialize&#40;$newcookie&#41;&#41;;
    my_setcookie&#40;"mybb&#91;$name&#93;", $newcookie&#41;;
    &#125;

    /**
    * Returns the serverload of the system.
    *
    * @return int The serverload of the system.
    */
    function get_server_load&#40;&#41;
    &#123;
    global $lang;
    if&#40;strtolower&#40;substr&#40;PHP_OS, 0, 3&#41;&#41; === 'win'&#41;
    &#123;
    return $lang->unknown;
    &#125;
    elseif&#40;@file_exists&#40;"/proc/loadavg"&#41; && $load = @file_get_contents&#40;"/proc/loadavg"&#41;&#41;
    &#123;
    $serverload = explode&#40;" ", $load&#41;;
    $serverload&#91;0&#93; = round&#40;$serverload&#91;0&#93;, 4&#41;;
    if&#40;!$serverload&#41;
    &#123;
    $load = @exec&#40;"uptime"&#41;;
    $load = split&#40;"load averages?&#58; ", $load&#41;;
    $serverload = explode&#40;",", $load&#91;1&#93;&#41;;
    &#125;
    &#125;
    else if&#40;function_exists&#40;"shell_exec"&#41;&#41;
    &#123;
    $load = explode&#40;' ', `uptime`&#41;;
    $serverload&#91;0&#93; = $load&#91;count&#40;$load&#41;-1&#93;;
    &#125;
    else
    &#123;
    $load = @exec&#40;"uptime"&#41;;
    $load = split&#40;"load averages?&#58; ", $load&#41;;
    $serverload = explode&#40;",", $load&#91;1&#93;&#41;;
    &#125;
    $returnload = trim&#40;$serverload&#91;0&#93;&#41;;
    if&#40;!$returnload&#41;
    &#123;
    $returnload = $lang->unknown;
    &#125;
    return $returnload;
    &#125;

    /**
    * Updates the forum statistics with specific values &#40;or addition/subtraction of the previous value&#41;
    *
    * @param array Array of items being updated &#40;numthreads,numposts,numusers&#41;
    */
    function update_stats&#40;$changes=array&#40;&#41;&#41;
    &#123;
    global $cache, $db;

    $stats = $cache->read&#40;"stats"&#41;;

    $counters = array&#40;'numthreads','numposts','numusers'&#41;;
    $update = array&#40;&#41;;
    foreach&#40;$counters as $counter&#41;
    &#123;
    if&#40;array_key_exists&#40;$counter, $changes&#41;&#41;
    &#123;
    // Adding or subtracting from previous value?
    if&#40;substr&#40;$changes&#91;$counter&#93;, 0, 1&#41; == "+" || substr&#40;$changes&#91;$counter&#93;, 0, 1&#41; == "-"&#41;
    &#123;
    $new_stats&#91;$counter&#93; = $stats&#91;$counter&#93; + $changes&#91;$counter&#93;;
    &#125;
    else
    &#123;
    $new_stats&#91;$counter&#93; = $changes&#91;$counter&#93;;
    &#125;
    // Less than 0? That's bad
    if&#40;$new_stats&#91;$counter&#93; < 0&#41;
    &#123;
    $new_stats&#91;$counter&#93; = 0;
    &#125;
    &#125;
    &#125;

    // Fetch latest user if the user count is changing
    if&#40;array_key_exists&#40;'numusers', $changes&#41;&#41;
    &#123;
    $query = $db->simple_select&#40;TABLE_PREFIX."users", "uid, username", "", array&#40;'order_by' => 'uid', 'order_dir' => 'DESC', 'limit' => 1&#41;&#41;;
    $lastmember = $db->fetch_array&#40;$query&#41;;
    $new_stats&#91;'lastuid'&#93; = $lastmember&#91;'uid'&#93;;
    $new_stats&#91;'lastusername'&#93; = $lastmember&#91;'username'&#93;;
    &#125;
    if&#40;is_array&#40;$stats&#41;&#41;
    &#123;
    $stats = array_merge&#40;$stats, $new_stats&#41;;
    &#125;
    else
    &#123;
    $stats = $new_stats;
    &#125;
    $cache->update&#40;"stats", $stats&#41;;
    &#125;

    /**
    * Updates the forum counters with a specific value &#40;or addition/subtraction of the previous value&#41;
    *
    * @param int The forum ID
    * @param array Array of items being updated &#40;threads, posts, unapprovedthreads, unapprovedposts&#41; and their value &#40;ex, 1, +1, -1&#41;
    */
    function update_forum_counters&#40;$fid, $changes=array&#40;&#41;&#41;
    &#123;
    global $db, $cache;

    $update_query = array&#40;&#41;;

    $counters = array&#40;'threads', 'unapprovedthreads', 'posts', 'unapprovedposts'&#41;;

    // Fetch above counters for this forum
    $query = $db->simple_select&#40;TABLE_PREFIX."forums", implode&#40;",", $counters&#41;, "fid='&#123;$fid&#125;'"&#41;;
    $forum = $db->fetch_array&#40;$query&#41;;

    foreach&#40;$counters as $counter&#41;
    &#123;
    if&#40;array_key_exists&#40;$counter, $changes&#41;&#41;
    &#123;
    // Adding or subtracting from previous value?
    if&#40;substr&#40;$changes&#91;$counter&#93;, 0, 1&#41; == "+" || substr&#40;$changes&#91;$counter&#93;, 0, 1&#41; == "-"&#41;
    &#123;
    $update_query&#91;$counter&#93; = $forum&#91;$counter&#93; + $changes&#91;$counter&#93;;
    &#125;
    else
    &#123;
    $update_query&#91;$counter&#93; = $changes&#91;$counter&#93;;
    &#125;
    // Less than 0? That's bad
    if&#40;$update_query&#91;$counter&#93; < 0&#41;
    &#123;
    $update_query&#91;$counter&#93; = 0;
    &#125;
    &#125;
    &#125;

    // Only update if we're actually doing something
    if&#40;count&#40;$update_query&#41; > 0&#41;
    &#123;
    $db->update_query&#40;TABLE_PREFIX."forums", $update_query, "fid='".intval&#40;$fid&#41;."'"&#41;;
    &#125;

    // Guess we should update the statistics too?
    if&#40;$update_query&#91;'threads'&#93; || $update_query&#91;'posts'&#93;&#41;
    &#123;
    $new_stats = array&#40;&#41;;
    if&#40;array_key_exists&#40;'threads', $update_query&#41;&#41;
    &#123;
    $threads_diff = $update_query&#91;'threads'&#93; - $forum&#91;'threads'&#93;;
    if&#40;$threads_diff > -1&#41;
    &#123;
    $new_stats&#91;'numthreads'&#93; = "+&#123;$threads_diff&#125;";
    &#125;
    else
    &#123;
    $new_stats&#91;'numthreads'&#93; = "&#123;$threads_diff&#125;";
    &#125;
    &#125;
    if&#40;array_key_exists&#40;'posts', $update_query&#41;&#41;
    &#123;
    $posts_diff = $update_query&#91;'posts'&#93; - $forum&#91;'posts'&#93;;
    if&#40;$posts_diff > -1&#41;
    &#123;
    $new_stats&#91;'numposts'&#93; = "+&#123;$posts_diff&#125;";
    &#125;
    else
    &#123;
    $new_stats&#91;'numposts'&#93; = "&#123;$posts_diff&#125;";
    &#125;
    &#125;
    update_stats&#40;$new_stats&#41;;
    &#125;

    // Update last post info
    update_forum_lastpost&#40;$fid&#41;;
    &#125;

    /**
    * Update the last post information for a specific forum
    *
    * @param int The forum ID
    */
    function update_forum_lastpost&#40;$fid&#41;
    &#123;
    global $db;

    // Fetch the last post for this forum
    $query = $db->query&#40;"
    SELECT tid, lastpost, lastposter, lastposteruid, subject
    FROM ".TABLE_PREFIX."threads
    WHERE fid='&#123;$fid&#125;' AND visible='1' AND closed NOT LIKE 'moved|%'
    ORDER BY lastpost DESC
    LIMIT 0, 1
    "&#41;;
    $lastpost = $db->fetch_array&#40;$query&#41;;

    $updated_forum = array&#40;
    "lastpost" => intval&#40;$lastpost&#91;'lastpost'&#93;&#41;,
    "lastposter" => $db->escape_string&#40;$lastpost&#91;'lastposter'&#93; &#41;,
    "lastposteruid" => intval&#40;$lastpost&#91;'lastposteruid'&#93;&#41; ,
    "lastposttid" => intval&#40;$lastpost&#91;'tid'&#93;&#41;,
    "lastpostsubject" => $db->escape_string&#40;$lastpost&#91;'subject'&#93;&#4 1;
    &#41;;

    $db->update_query&#40;TABLE_PREFIX."forums", $updated_forum, "fid='&#123;$fid&#125;'"&#41;;
    &#125;

    /**
    * Updates the thread counters with a specific value &#40;or addition/subtraction of the previous value&#41;
    *
    * @param int The thread ID
    * @param array Array of items being updated &#40;replies, unapprovedposts, attachmentcount&#41; and their value &#40;ex, 1, +1, -1&#41;
    */
    function update_thread_counters&#40;$tid, $changes=array&#40;&#41;&#41;
    &#123;
    global $db;

    $update_query = array&#40;&#41;;

    $counters = array&#40;'replies', 'unapprovedposts', 'attachmentcount'&#41;;

    // Fetch above counters for this thread
    $query = $db->simple_select&#40;TABLE_PREFIX."threads", implode&#40;",", $counters&#41;, "tid='&#123;$tid&#125;'"&#41;;
    $thread = $db->fetch_array&#40;$query&#41;;

    foreach&#40;$counters as $counter&#41;
    &#123;
    if&#40;array_key_exists&#40;$counter, $changes&#41;&#41;
    &#123;
    // Adding or subtracting from previous value?
    if&#40;substr&#40;$changes&#91;$counter&#93;, 0, 1&#41; == "+" || substr&#40;$changes&#91;$counter&#93;, 0, 1&#41; == "-"&#41;
    &#123;
    $update_query&#91;$counter&#93; = $thread&#91;$counter&#93; + $changes&#91;$counter&#93;;
    &#125;
    else
    &#123;
    $update_query&#91;$counter&#93; = $changes&#91;$counter&#93;;
    &#125;
    // Less than 0? That's bad
    if&#40;$update_query&#91;$counter&#93; < 0&#41;
    &#123;
    $update_query&#91;$counter&#93; = 0;
    &#125;
    &#125;
    &#125;

    // Only update if we're actually doing something
    if&#40;count&#40;$update_query&#41; > 0&#41;
    &#123;
    $db->update_query&#40;TABLE_PREFIX."threads", $update_query, "tid='".intval&#40;$tid&#41;."'"&#41;;
    &#125;

    update_thread_data&#40;$tid&#41;;
    &#125;

    /**
    * Update the first post and lastpost data for a specific thread
    *
    * @param int The thread ID
    */
    function update_thread_data&#40;$tid&#41;
    &#123;
    global $db;
    $query = $db->query&#40;"
    SELECT u.uid, u.username, p.username AS postusername, p.dateline
    FROM ".TABLE_PREFIX."posts p
    LEFT JOIN ".TABLE_PREFIX."users u ON &#40;u.uid=p.uid&#41;
    WHERE p.tid='$tid' AND p.visible='1'
    ORDER BY p.dateline DESC
    LIMIT 1"
    &#41;;
    $lastpost = $db->fetch_array&#40;$query&#41;;

    $query = $db->query&#40;"
    SELECT u.uid, u.username, p.username AS postusername, p.dateline
    FROM ".TABLE_PREFIX."posts p
    LEFT JOIN ".TABLE_PREFIX."users u ON &#40;u.uid=p.uid&#41;
    WHERE p.tid='$tid'
    ORDER BY p.dateline ASC
    LIMIT 1
    "&#41;;
    $firstpost = $db->fetch_array&#40;$query&#41;;

    if&#40;!$firstpost&#91;'username'&#93;&#41;
    &#123;
    $firstpost&#91;'username'&#93; = $firstpost&#91;'postusername'&#93;;
    &#125;

    if&#40;!$lastpost&#91;'username'&#93;&#41;
    &#123;
    $lastpost&#91;'username'&#93; = $lastpost&#91;'postusername'&#93;;
    &#125;

    if&#40;!$lastpost&#91;'dateline'&#93;&#41;
    &#123;
    $lastpost&#91;'username'&#93; = $firstpost&#91;'username'&#93;;
    $lastpost&#91;'uid'&#93; = $firstpost&#91;'uid'&#93;;
    $lastpost&#91;'dateline'&#93; = $firstpost&#91;'dateline'&#93;;
    &#125;

    $lastpost&#91;'username'&#93; = $db->escape_string&#40;$lastpost&#91;'username'&#93;&# 41;;
    $firstpost&#91;'username'&#93; = $db->escape_string&#40;$firstpost&#91;'username'&#93;& #41;;

    $update_array = array&#40;
    'username' => $firstpost&#91;'username'&#93;,
    'uid' => intval&#40;$firstpost&#91;'uid'&#93;&#41;,
    'lastpost' => intval&#40;$lastpost&#91;'dateline'&#93;&#41;,
    'lastposter' => $lastpost&#91;'username'&#93;,
    'lastposteruid' => intval&#40;$lastpost&#91;'uid'&#93;&#41;,
    &#41;;
    $db->update_query&#40;TABLE_PREFIX."threads", $update_array, "tid='&#123;$tid&#125;'"&#41;;
    &#125;

    function update_forum_count&#40;$fid&#41;
    &#123;
    die&#40;"Depreciated function call&#58; update_forum_count"&#41;;
    &#125;
    function update_thread_count&#40;$tid&#41;
    &#123;
    die&#40;"Depreciated function call&#58; update_thread_count"&#41;;
    &#125;
    function update_thread_attachment_count&#40;$tid&#41;
    &#123;
    die&#40;"Depreciated function call&#58; update_thread_attachment_count"&#41;;
    &#125;

    /**
    * Deletes a thread from the database
    *
    * @param int The thread ID
    */
    function delete_thread&#40;$tid&#41;
    &#123;
    global $moderation;
    if&#40;!is_object&#40;$moderation&#41;&#41;
    &#123;
    require_once MYBB_ROOT."inc/class_moderation.php";
    $moderation = new Moderation;
    &#125;
    return $moderation->delete_thread&#40;$tid&#41;;
    &#125;

    /**
    * Deletes a post from the database
    *
    * @param int The thread ID
    */
    function delete_post&#40;$pid, $tid=""&#41;
    &#123;
    global $moderation;
    if&#40;!is_object&#40;$moderation&#41;&#41;
    &#123;
    require_once MYBB_ROOT."inc/class_moderation.php";
    $moderation = new Moderation;
    &#125;
    return $moderation->delete_post&#40;$pid&#41;;
    &#125;

    /**
    * Builds a forum jump menu
    *
    * @param int The parent forum to start with
    * @param int The selected item ID
    * @param int If we need to add select boxes to this cal or not
    * @param int The current depth of forums we're at
    * @param int Whether or not to show extra items such as User CP, Forum home
    * @param array Array of permissions
    * @param string The name of the forum jump
    * @return string Forum jump items
    */
    function build_forum_jump&#40;$pid="0", $selitem="", $addselect="1", $depth="", $showextras="1", $permissions="", $name="fid"&#41;
    &#123;
    global $db, $forum_cache, $fjumpcache, $permissioncache, $mybb, $selecteddone, $forumjump, $forumjumpbits, $gobutton, $theme, $templates, $lang;

    $pid = intval&#40;$pid&#41;;
    if&#40;$permissions&#41;
    &#123;
    $permissions = $mybb->usergroup;
    &#125;
    if&#40;!is_array&#40;$jumpfcache&#41;&#41;
    &#123;
    if&#40;!is_array&#40;$forum_cache&#41;&#41;
    &#123;
    cache_forums&#40;&#41;;
    &#125;
    foreach&#40;$forum_cache as $fid => $forum&#41;
    &#123;
    if&#40;$forum&#91;'active'&#93; != "no"&#41;
    &#123;
    $jumpfcache&#91;$forum&#91;'pid'&#93;&#93;&#91;$fo rum&#91;'disporder'&#93;&#93;&#91;$forum&#91;'fid' &#93;&#93; = $forum;
    &#125;
    &#125;
    &#125;
    if&#40;!is_array&#40;$permissioncache&#41;&#41;
    &#123;
    $permissioncache = forum_permissions&#40;&#41;;
    &#125;
    if&#40;is_array&#40;$jumpfcache&#91;$pid&#93;&#41; &#41;
    &#123;
    foreach&#40;$jumpfcache&#91;$pid&#93; as $main&#41;
    &#123;
    foreach&#40;$main as $forum&#41;
    &#123;
    $perms = $permissioncache&#91;$forum&#91;'fid'&#93;&#93;;
    if&#40;$forum&#91;'fid'&#93; != "0" && &#40;$perms&#91;'canview'&#93; != "no" || $mybb->settings&#91;'hideprivateforums'&#93; == "no"&#41; && $forum&#91;'linkto'&#93; == '' && $forum&#91;'showinjump'&#93; != "no"&#41;
    &#123;
    $optionselected = "";
    if&#40;$selitem == $forum&#91;'fid'&#93;&#41;
    &#123;
    $optionselected = "selected=\"selected\"";
    $selecteddone = 1;
    &#125;
    eval&#40;"\$forumjumpbits .= \"".$templates->get&#40;"forumjump_bit"&#41;."\";"&#41;;
    if&#40;$forum_cache&#91;$forum&#91;'fid'&#93;&#93; &#41;
    &#123;
    $newdepth = $depth."--";
    $forumjumpbits .= build_forum_jump&#40;$forum&#91;'fid'&#93;, $selitem, 0, $newdepth, $showextras&#41;;
    &#125;
    &#125;
    &#125;
    &#125;
    &#125;
    if&#40;$addselect&#41;
    &#123;
    if&#40;!$selecteddone&#41;
    &#123;
    if&#40;!$selitem&#41;
    &#123;
    $selitem = "default";
    &#125;
    $jumpsel&#91;$selitem&#93; = "selected";
    &#125;
    if&#40;$showextras == 0&#41;
    &#123;
    $template = "special";
    &#125;
    else
    &#123;
    $template = "advanced";
    &#125;
    eval&#40;"\$forumjump = \"".$templates->get&#40;"forumjump_".$template&#41;."\";"&#41;;
    &#125;
    return $forumjump;
    &#125;

    /**
    * Returns the extension of a file.
    *
    * @param string The filename.
    * @return string The extension of the file.
    */
    function get_extension&#40;$file&#41;
    &#123;
    return strtolower&#40;my_substr&#40;strrchr&#40;$file, "."&#41;, 1&#41;&#41;;
    &#125;

    /**
    * Generates a random string.
    *
    * @param int The length of the string to generate.
    * @return string The random string.
    */
    function random_str&#40;$length="8"&#41;
    &#123;
    $set = array&#40;"a","A","b","B","c","C","d","D","e","E", "f","F","g","G","h","H","i","I","j","J","k","K","l ","L","m","M","n","N","o","O","p","P","q","Q","r", "R","s","S","t","T","u","U","v","V","w","W","x","X ","y","Y","z","Z","1","2","3","4","5","6","7","8", "9"&#41;;
    $str;
    for&#40;$i = 1; $i <= $length; $i++&#41;
    &#123;
    $ch = rand&#40;0, count&#40;$set&#41;-1&#41;;
    $str .= $set&#91;$ch&#93;;
    &#125;
    return $str;
    &#125;

    /**
    * Formats a username based on their display group
    *
    * @param string The username
    * @param int The usergroup for the user &#40;if not specified, will be fetched&#41;
    * @param int The display group for the user &#40;if not specified, will be fetched&#41;
    * @return string The formatted username
    */
    function format_name&#40;$username, $usergroup, $displaygroup=""&#41;
    &#123;
    global $groupscache, $cache;

    if&#40;!is_array&#40;$groupscache&#41;&#41;
    &#123;
    $groupscache = $cache->read&#40;"usergroups"&#41;;
    &#125;

    if&#40;$displaygroup != 0&#41;
    &#123;
    $usergroup = $displaygroup;
    &#125;
    $ugroup = $groupscache&#91;$usergroup&#93;;
    $format = $ugroup&#91;'namestyle'&#93;;
    $userin = substr_count&#40;$format, "&#123;username&#125;"&#41;;
    if&#40;$userin == 0&#41;
    &#123;
    $format = "&#123;username&#125;";
    &#125;
    $format = stripslashes&#40;$format&#41;;
    return str_replace&#40;"&#123;username&#125;", $username, $format&#41;;
    &#125;

    /**
    * Build the javascript based MyCode inserter
    *
    * @return string The MyCode inserter
    */
    function build_mycode_inserter&#40;&#41;
    &#123;
    global $db, $mybb, $theme, $templates, $lang;

    if&#40;$mybb->settings&#91;'bbcodeinserter'&#93; != "off"&#41;
    &#123;
    $editor_lang_strings = array&#40;
    "editor_title_bold",
    "editor_title_italic",
    "editor_title_underline",
    "editor_title_left",
    "editor_title_center",
    "editor_title_right",
    "editor_title_justify",
    "editor_title_numlist",
    "editor_title_bulletlist",
    "editor_title_image",
    "editor_title_hyperlink",
    "editor_title_email",
    "editor_title_quote",
    "editor_title_code",
    "editor_title_php",
    "editor_title_close_tags",
    "editor_enter_list_item",
    "editor_enter_url",
    "editor_enter_url_title",
    "editor_enter_email",
    "editor_enter_email_title",
    "editor_enter_image",
    "editor_size_xx_small",
    "editor_size_x_small",
    "editor_size_small",
    "editor_size_medium",
    "editor_size_x_large",
    "editor_size_xx_large",
    "editor_color_white",
    "editor_color_black",
    "editor_color_red",
    "editor_color_yellow",
    "editor_color_pink",
    "editor_color_green",
    "editor_color_orange",
    "editor_color_purple",
    "editor_color_blue",
    "editor_color_beige",
    "editor_color_brown",
    "editor_color_teal",
    "editor_color_navy",
    "editor_color_maroon",
    "editor_color_limegreen",
    "editor_font",
    "editor_size",
    "editor_color"
    &#41;;
    $editor_language = "var editor_language = &#123;\n";
    foreach&#40;$editor_lang_strings as $key => $lang_string&#41;
    &#123;
    // Strip initial editor_ off language string if it exists - ensure case sensitivity does not matter.
    $js_lang_string = preg_replace&#40;"#^editor_#i", "", $lang_string&#41;;
    $string = str_replace&#40;"\"", "\\\"", $lang->$lang_string&#41;;
    $editor_language .= "\t&#123;$js_lang_string&#125;&#58; \"&#123;$string&#125;\"";
    if&#40;$editor_lang_strings&#91;$key+1&#93;&#41;
    &#123;
    $editor_language .= ",";
    &#125;
    $editor_language .= "\n";
    &#125;
    $editor_language .= "&#125;;";
    eval&#40;"\$codeinsert = \"".$templates->get&#40;"codebuttons"&#41;."\";"&#41;;
    &#125;
    return $codeinsert;
    &#125;

    /**
    * Build the javascript clickable smilie inserter
    *
    * @return string The clickable smilies list
    */
    function build_clickable_smilies&#40;&#41;
    &#123;
    global $db, $smiliecache, $theme, $templates, $lang, $mybb, $smiliecount;

    if&#40;$mybb->settings&#91;'smilieinserter'&#93; != "off" && $mybb->settings&#91;'smilieinsertercols'&#93; && $mybb->settings&#91;'smilieinsertertot'&#93;&#41;
    &#123;
    if&#40;!$smiliecount&#41;
    &#123;
    $query = $db->simple_select&#40;TABLE_PREFIX."smilies", "COUNT&#40;*&#41; as smilies"&#41;;
    $smiliecount = $db->fetch_field&#40;$query, "smilies"&#41;;
    &#125;

    if&#40;!$smiliecache&#41;
    &#123;
    $query = $db->simple_select&#40;TABLE_PREFIX."smilies", "*", "showclickable != 'no'", array&#40;'order_by' => 'disporder'&#41;&#41;;

    while&#40;$smilie = $db->fetch_array&#40;$query&#41;&#41;
    &#123;
    $smiliecache&#91;$smilie&#91;'find'&#93;&#93; = $smilie&#91;'image'&#93;;
    &#125;
    &#125;
    unset&#40;$smilie&#41;;
    if&#40;is_array&#40;$smiliecache&#41;&#41;
    &#123;
    reset&#40;$smiliecache&#41;;
    if&#40;$mybb->settings&#91;'smilieinsertertot'&#93; >= $smiliecount&#41;
    &#123;
    $mybb->settings&#91;'smilieinsertertot'&#93; = $smiliecount;
    &#125;
    elseif &#40;$mybb->settings&#91;'smilieinsertertot'&#93; < $smiliecount&#41;
    &#123;
    $smiliecount = $mybb->settings&#91;'smilieinsertertot'&#93;;
    eval&#40;"\$getmore = \"".$templates->get&#40;"smilieinsert_getmore"&#41;."\";"&#41;;
    &#125;
    $smilies = "";
    $counter = 0;
    $i = 0;
    foreach&#40;$smiliecache as $find => $image&#41;
    &#123;
    if&#40;$i < $mybb->settings&#91;'smilieinsertertot'&#93;&#41;
    &#123;
    if&#40;$counter == 0&#41;
    &#123;
    $smilies .= "<tr>\n";
    &#125;
    $find = htmlspecialchars_uni&#40;$find&#41;;
    $smilies .= "<td><img src=\"&#123;$image&#125;\" border=\"0\" class=\"smilie\" alt=\"&#123;$find&#125;\" /></td>\n";
    $i++;
    $counter++;
    if&#40;$counter == $mybb->settings&#91;'smilieinsertercols'&#93;&#41;
    &#123;
    $counter = 0;
    $smilies .= "</tr>\n";
    &#125;
    &#125;
    &#125;
    if&#40;$counter != 0&#41;
    &#123;
    $colspan = $mybb->settings&#91;'smilieinsertercols'&#93; - $counter;
    $smilies .= "<td colspan=\"&#123;$colspan&#125;\"></td>\n</tr>\n";
    &#125;
    eval&#40;"\$clickablesmilies = \"".$templates->get&#40;"smilieinsert"&#41;."\";"&#41;;
    &#125;
    else
    &#123;
    $clickablesmilies = "";
    &#125;
    &#125;
    else
    &#123;
    $clickablesmilies = "";
    &#125;
    return $clickablesmilies;
    &#125;

    /**
    * Gzip encodes text to a specified level
    *
    * @param string The string to encode
    * @param int The level &#40;1-9&#41; to encode at
    * @return string The encoded string
    */
    function gzip_encode&#40;$contents, $level=1&#41;
    &#123;
    if&#40;function_exists&#40;"gzcompress"&#41; && function_exists&#40;"crc32"&#41; && !headers_sent&#40;&#41; && !&#40;ini_get&#40;'output_buffering'&#41; && strpos&#40;' '.ini_get&#40;'output_handler'&#41;, 'ob_gzhandler'&#41;&#41;&#41;
    &#123;
    $httpaccept_encoding = '';
    if&#40;isset&#40;$_SERVER&#91;'HTTP_ACCEPT_ENCODIN G'&#93;&#41;&#41;
    &#123;
    $httpaccept_encoding = $_SERVER&#91;'HTTP_ACCEPT_ENCODING'&#93;;
    &#125;
    if&#40;strpos&#40;" ".$httpaccept_encoding, "x-gzip"&#41;&#41;
    &#123;
    $encoding = "x-gzip";
    &#125;
    if&#40
    Achtung: Dies ist ein alter Thread im HTML und Webmaster Forum
    Diese Diskussion ist älter als 90 Tage. Die darin enthaltenen Informationen sind möglicherweise nicht mehr aktuell. Erstelle bitte zu deiner Frage ein neues Thema im Forum !!!!!

  2. #2
    phpfan
    Gast

    Standard

    Hähä, du glaubst doch nicht wirklich, dass sich jemand diesen kilometerlangen, unformatierten Quellcode ansieht, oder?

    Ist aber auch wurscht, denn dein Provider hat die Mail-Funktion deaktiviert, steht ja auch in der Fehlermeldung: mail() has been disabled

    Du könntest versuchen, mit dem phpMailer von http://phpmailer.sourceforge.net Mails direkt über den SMTP-Server zu verschicken, oder du wechselst den Provider.

Ähnliche Themen

  1. fehler
    Von Gast im Forum Webanwendungen - Webapplikationen
    Antworten: 9
    Letzter Beitrag: 12.12.2007, 22:15
  2. Fehler bei IE
    Von WWKiller im Forum HTML & CSS Forum
    Antworten: 23
    Letzter Beitrag: 22.07.2006, 16:14
  3. Fehler in FF und Fehler beim zentrieren
    Von smello im Forum HTML & CSS Forum
    Antworten: 1
    Letzter Beitrag: 16.03.2006, 15:22
  4. Fehler bei SQL
    Von im Forum PHP Forum - Apache - CGI - Perl - JavaScript und Co.
    Antworten: 11
    Letzter Beitrag: 15.10.2005, 19:49
  5. fehler
    Von football im Forum HTML & CSS Forum
    Antworten: 4
    Letzter Beitrag: 06.11.2004, 18:44

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •