Exemple #1
0
 public function __construct(array $request = array(), array $opt = array())
 {
     parent::__construct($request, $opt);
     $this->fields = $this->defFields();
     $storeVar = isset($_GET['act']) && $_GET['act'] == 'list';
     // if true store the filter variables
     $init = array_key_exists('init', $this->request);
     $reset = array_key_exists('reset', $this->request);
     if ($init || $reset) {
         $storeVar = true;
     }
     $this->id = (int) initVar('id');
     $this->last_id = initVar('last_id');
     $this->act = initVar('act', 'list');
     $this->do_id = $_SESSION['do_id'];
     $this->mu_id = initvar('mu_id');
     $this->documentType = 'import_seap';
     $this->isDialog = false;
     // Cambia le azioni per edit / delete
     $this->parent_act = 'list';
     $this->order = PageVar('order', '1A', $init, false, $this->baseName, $storeVar);
     $this->registerAjaxFunction('checkImport');
     $this->registerAjaxFunction('confirmDeleteImport');
     $this->registerAjaxFunction('submitFormData');
 }
Exemple #2
0
require "./common.php";
$thread = (int) initvar("t");
$action = (int) initvar("a");
if ($num == 0 || $ForumName == '') {
    header("Location: {$forum_url}?{$GetVars}");
    exit;
}
$phcollapse = "phorum-collapse-{$ForumTableName}";
$new_cookie = "phorum-new-{$ForumTableName}";
$haveread_cookie = "phorum-haveread-{$ForumTableName}";
$phflat = "phorum-flat-{$ForumTableName}";
if ($UseCookies) {
    if (!isset(${$phflat})) {
        ${$phflat} = $ForumFlat;
    }
    if (initvar("r") == 1) {
        $SQL = "Select max(id) as max_id FROM {$ForumTableName}";
        $q->query($DB, $SQL);
        $aryRow = $q->getrow();
        if (isset($aryRow['max_id'])) {
            $max_id = $aryRow['max_id'];
            ${$new_cookie} = $max_id;
            SetCookie($new_cookie, ${$new_cookie}, time() + 31536000);
            SetCookie($haveread_cookie, ${$new_cookie});
            //destroy session cookie
            unset(${$haveread_cookie});
        }
    }
    if (!isset(${$new_cookie})) {
        ${$new_cookie} = '0';
    }
Exemple #3
0
        $p_subject = "Re: " . $qsubject;
    } else {
        $p_subject = $qsubject;
    }
    $parent = $id;
    if (!${$phflat}) {
        $quote = "{$qauthor} {$lWrote}:\n";
        $quote .= textwrap("\n{$qbody}", 63, "\n", "> ") . "\n";
        $quote = htmlspecialchars($quote);
        $quote_button = "<input type=\"hidden\" name=\"hide\" value=\"" . $quote . "\"><script language=\"JavaScript\"><!--\nthis.document.writeln('<input tabindex=\"100\" type=\"Button\" name=\"quote\" value=\"{$lQuote}\" onClick=\"this.form.body.value=this.form.body.value + this.form.hide.value; this.form.hide.value='+\"''\"+';\">');\n//--></script>";
    }
    $p_body = "";
} else {
    $caption = $lStartTopic;
    $p_subject = initvar("subject");
    $p_body = initvar("body");
}
$p_author = $author;
$p_email = $email;
if (isset($IsError) && $action) {
    echo "<p><strong>{$IsError}</strong>";
}
if ($AllowAttachments && $ForumAllowUploads == 'Y' && $ForumMaxUploads < 4) {
    $enctype = "multipart/form-data";
} else {
    $enctype = "application/x-www-form-urlencoded";
}
?>
<form action="<?php 
echo "{$post_page}.{$ext}";
?>
Exemple #4
0
function recaptcha_version()
{
    return '<h1>Recaptcha_XH</h1>' . "\n" . '<p>Version: ' . RECAPTCHA_VERSION . '</p>' . "\n" . '<p>Recaptcha_XH is powered by ' . '<a href="http://recaptcha.net/" target="_blank">' . 'reCAPTCHA</a>.</p>' . "\n" . '<p>Copyright &copy; 2011 Christoph M. Becker</p>' . "\n" . '<p style="text-align:justify">This program is free software: you can redistribute it and/or modify' . ' it under the terms of the GNU General Public License as published by' . ' the Free Software Foundation, either version 3 of the License, or' . ' (at your option) any later version.</p>' . "\n" . '<p style="text-align:justify">This program is distributed in the hope that it will be useful,' . ' but WITHOUT ANY WARRANTY; without even the implied warranty of' . ' MERCHAN&shy;TABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the' . ' GNU General Public License for more details.</p>' . "\n" . '<p style="text-align:justify">You should have received a copy of the GNU General Public License' . ' along with this program.  If not, see' . ' <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>' . "\n";
}
/**
 * Plugin administration
 */
if (!empty($recaptcha)) {
    // check requirements // RELEASE-TODO
    if (version_compare(PHP_VERSION, RECAPTCHA_PHP_VERSION) < 0) {
        $e .= '<li>' . sprintf($plugin_tx['recaptcha']['error_phpversion'], TETRIS_PHP_VERSION) . '</li>' . "\n";
    }
    foreach (array('pcre') as $ext) {
        if (!extension_loaded($ext)) {
            $e .= '<li>' . sprintf($plugin_tx['recaptcha']['error_extension'], $ext) . '</li>' . "\n";
        }
    }
    if (strtoupper($tx['meta']['codepage']) != 'UTF-8') {
        $e .= '<li>' . $plugin_tx['recaptcha']['error_encoding'] . '</li>' . "\n";
    }
    initvar('admin');
    initvar('action');
    $o .= print_plugin_admin('off');
    switch ($admin) {
        case '':
            $o .= recaptcha_version();
            break;
        default:
            $o .= plugin_admin_common($action, $admin, $plugin);
    }
}
Exemple #5
0
    reset($attachments);
    // Attachment handling:
    if (!empty($attachments) && is_array($attachments) && empty($IsError)) {
        while (list($key, $attachment) = each($attachments)) {
            if ($attachment["name"]) {
                $IsError = add_attachment($attachment, $id);
            }
            if ($IsError) {
                break;
            }
        }
    }
    if (empty($IsError) && @is_array($attachments)) {
        // if it is not a new message and not float to top
        // send them to the message.
        initvar("more");
        if ($thread != $id && $ForumMultiLevel != 2) {
            $more = $thread + 1;
            $more = "&a=2&t={$more}";
        }
        Header("Location: {$forum_url}/{$list_page}.{$ext}?f={$num}{$more}{$GetVars}");
        exit;
    }
}
include phorum_get_file_name("header");
//////////////////////////
// START NAVIGATION     //
//////////////////////////
$menu = array();
if ($ActiveForums > 1) {
    // Forum List
Exemple #6
0
$searchtext = $search;
$searchtext = htmlentities($searchtext);
if (!isset($fldauthor) && !isset($fldsubject) && !isset($fldbody)) {
    $fields[] = "subject";
    $fields[] = "body";
    $fldauthor = 0;
    $fldsubject = 1;
    $fldbody = 1;
} else {
    empty($fldauthor) ? $fldauthor = 0 : ($fields[] = "author");
    empty($fldsubject) ? $fldsubject = 0 : ($fields[] = "subject");
    empty($fldbody) ? $fldbody = 0 : ($fields[] = "body");
}
initvar("date", 30);
initvar("match", 1);
initvar("start_num", 0);
//////////////////////////
// START NAVIGATION     //
//////////////////////////
$menu = array();
if ($ActiveForums > 1) {
    // Forum List
    addnav($menu, $lForumList, "{$forum_page}.{$ext}?f={$ForumParent}{$GetVars}");
}
// New Topic
addnav($menu, $lStartTopic, "{$post_page}.{$ext}?f={$num}{$GetVars}");
// Go To Top
addnav($menu, $lGoToTop, "{$list_page}.{$ext}?f={$num}{$GetVars}");
// Log Out/Log In
if ($ForumSecurity) {
    if (!empty($phorum_auth)) {
Exemple #7
0
echo $phorumver;
?>
" />
<meta name="Phorum DB" content="<?php 
echo $DB->type;
?>
" />
<meta name="PHP Version" content="<?php 
echo phpversion();
?>
" />
<title>phorum<?php 
if (isset($ForumName)) {
    echo " - {$ForumName}";
}
echo initvar("title");
?>
</title>
<link rel="STYLESHEET" type="text/css" href="<?php 
echo phorum_get_file_name("css");
?>
" />
</head>
<body bgcolor="<?php 
echo empty($ForumBodyColor) ? $default_body_color : $ForumBodyColor;
?>
" link="<?php 
echo empty($ForumBodyLinkColor) ? $default_body_link_color : $ForumBodyLinkColor;
?>
" alink="<?php 
echo empty($ForumBodyALinkColor) ? $default_body_alink_color : $ForumBodyALinkColor;
<?php

require_once XOX_BIN . '/newsletter/dummy.php';
require_once XOX_LIB . '/functions.php';
if (empty($form_title)) {
    $form_title = initvar('form_title', 'Title');
}
if (empty($form_text)) {
    $form_text = initvar('form_text', 'Text');
}
if (empty($form_links)) {
    $form_links = initvar('form_links', array('back' => 'javascript:history.back();'));
}
echo drawFormHeader($form_title, $form_text, 68, $form_links);
Exemple #9
0
//   along with this program.                                                 //
////////////////////////////////////////////////////////////////////////////////
require "./common.php";
if ($phorum_user["moderator"] != true) {
    if (!$phorum_user) {
        header("Location: {$list_page}.{$ext}?f={$num}{$GetVars}");
    } else {
        header("Location: {$HTTP_REFERER}");
    }
    exit;
}
if (empty($i) || empty($t)) {
    header("Location: {$HTTP_REFERER}");
    exit;
}
$id = (int) initvar("i");
//Thats for all those ppl who likes to use different colors in different forums
if ($num != 0) {
    $table_width = $ForumTableWidth;
    $table_header_color = $ForumTableHeaderColor;
    $table_header_font_color = $ForumTableHeaderFontColor;
    $table_body_color_1 = $ForumTableBodyColor1;
    $table_body_font_color_1 = $ForumTableBodyFontColor1;
    $nav_color = $ForumNavColor;
} else {
    $table_width = $default_table_width;
    $table_header_color = $default_table_header_color;
    $table_header_font_color = $default_table_header_font_color;
    $table_body_color_1 = $default_table_body_color_1;
    $table_body_font_color_1 = $default_table_body_font_color_1;
    $nav_color = $default_nav_color;
Exemple #10
0
} else {
    $table_width = $default_table_width;
    $table_header_color = $default_table_header_color;
    $table_header_font_color = $default_table_header_font_color;
    $table_body_color_1 = $default_table_body_color_1;
    $table_body_font_color_1 = $default_table_body_font_color_1;
    $nav_color = $default_nav_color;
}
if (empty($target)) {
    if (isset($HTTP_REFERER)) {
        $target = $HTTP_REFERER;
    } else {
        $target = "{$forum_url}/{$forum_page}.{$ext}";
    }
}
initvar("phorum_auth");
//  $target=str_replace("phorum_auth=$phorum_auth", '', $target);
if (isset($logout)) {
    $SQL = "update {$pho_main}" . "_auth set sess_id='' where sess_id='{$phorum_auth}'";
    $q->query($DB, $SQL);
    unset($phorum_auth);
    SetCookie("phorum_auth", '');
    header("Location: {$target}");
    exit;
}
if (empty($forgotpass) && !empty($username) && !empty($password)) {
    $uid = phorum_check_login($username, $password);
    if ($uid) {
        $sess_id = phorum_session_id($_POST['username'], $_POST["password"]);
        phorum_login_user($sess_id, $uid);
        if (!strstr($target, "?")) {
Exemple #11
0
        echo_data($image, $messages[$seed], $row_color_cnt);
    }
    //end of: if($seed!="0")
    if (@is_array($messages[$seed]["replies"])) {
        $count = count($messages[$seed]["replies"]);
        for ($x = 1; $x <= $count; $x++) {
            $key = key($messages[$seed]["replies"]);
            thread($key);
            next($messages[$seed]["replies"]);
        }
    }
}
@reset($headers);
$row = @current($headers);
if (is_array($row)) {
    if (!initvar("read")) {
        reset($threads);
        $rec = current($threads);
        while (is_array($rec)) {
            $thd = $rec["thread"];
            if (!isset($rec["tcount"])) {
                $rec["tcount"] = 0;
            }
            $tcount = $rec["tcount"];
            $threadtotal[$thd] = $tcount;
            $rec = next($threads);
        }
    } else {
        $threadtotal[$thread] = count($headers);
    }
    $topics["max"] = "0";
Exemple #12
0
                addnav($menu, $lSearch, "{$search_page}.{$ext}?f={$num}{$GetVars}");
                // Log Out/Log In
                if ($ForumSecurity) {
                    if (!empty($phorum_auth)) {
                        //      addnav($menu, $lLogOut, "login.$ext?logout=1");
                        addnav($menu, $lMyProfile, "profile.{$ext}?f={$f}&id={$phorum_user['id']}{$GetVars}");
                    } else {
                        addnav($menu, $lLogIn, "login.{$ext}");
                    }
                }
                $TopLeftNav = getnav($menu);
                //////////////////////////
                // END NAVIGATION       //
                //////////////////////////
                include "{$include_path}/form.php";
                include phorum_get_file_name("footer");
                exit;
            }
        }
    }
    // This will send email to the mailing list, if applicable,
    // and send email replies to earlier posters, if necessary.
    // Note that when posting to a mailing list, active moderation
    // does not apply.
    post_to_email();
}
if (initvar("attach")) {
    Header("Location: {$forum_url}/{$attach_page}.{$ext}?f={$num}&i={$id}{$GetVars}");
} else {
    Header("Location: {$forum_url}/{$list_page}.{$ext}?f={$num}{$more}{$GetVars}");
}
Exemple #13
0
<?php

// Blank out potentially dangerous per-forum values
$aryUnset = array('ForumId', 'ForumActive', 'ForumName', 'ForumDescription', 'ForumConfigSuffix', 'ForumFolder', 'ForumParent', 'ForumLang', 'ForumDisplay', 'ForumTableName', 'ForumModeration', 'ForumModEmail', 'ForumModPass', 'ForumEmailList', 'ForumEmailReturnList', 'ForumEmailTag', 'ForumCheckDup', 'ForumMultiLevel', 'ForumCollapse', 'ForumFlat', 'ForumStaffHost', 'ForumAllowHTML', 'ForumAllowUploads', 'ForumTableBodyColor2', 'ForumTableBodyFontColor2', 'ForumTableWidth', 'ForumNavColor', 'ForumNavFontColor', 'ForumTableHeaderColor', 'ForumTableHeaderFontColor', 'ForumTableBodyColor1', 'ForumTableBodyFontColor1');
reset($aryUnset);
while (list($key, $value) = each($aryUnset)) {
    if (isset(${$value})) {
        unset(${$value});
    }
}
initvar("ForumConfigSuffix");
initvar("ForumLang");
initvar("ForumModEmail");
initvar("ForumName");
initvar("ForumParent", 0);
Exemple #14
0
    } else {
        $old_message = ${$new_cookie};
    }
} else {
    if (isset($flat)) {
        ${$phflat} = $flat;
    } else {
        ${$phflat} = $ForumFlat;
    }
    if (isset($collapse)) {
        ${$phcollapse} = $collapse;
    } else {
        ${$phcollapse} = $ForumCollapse;
    }
}
if (initvar("admview") != 1) {
    $limitApproved = " and approved='Y'";
} else {
    $limitApproved = "";
}
if ($action != 0 && ($action == 1 || $action == 2)) {
    if ($DB->type == "sybase") {
        $limit = "";
        $q->query($DB, "set rowcount {$ForumDisplay}");
    } elseif ($DB->type == "postgresql") {
        $limit = "";
        $q->query($DB, "set QUERY_LIMIT TO 1");
    } else {
        $limit = " limit 1";
    }
    if ($ForumMultiLevel == 2) {
Exemple #15
0
initvar("done");
if ($action == "edit") {
    initvar("name");
    initvar("password");
    initvar("email");
    initvar("webpage");
    initvar("image");
    initvar("signature");
    initvar("icq");
    initvar("yahoo");
    initvar("aol");
    initvar("jabber");
    initvar("msn");
    initvar("done");
    initvar("Error");
    initvar("process");
}
//Thats for all those ppl who likes to use different colors in different forums
if ($f != 0) {
    $table_width = $ForumTableWidth;
    $table_header_color = $ForumTableHeaderColor;
    $table_header_font_color = $ForumTableHeaderFontColor;
    $table_body_color_1 = $ForumTableBodyColor1;
    $table_body_font_color_1 = $ForumTableBodyFontColor1;
    $nav_color = $ForumNavColor;
} else {
    $table_width = $default_table_width;
    $table_header_color = $default_table_header_color;
    $table_header_font_color = $default_table_header_font_color;
    $table_body_color_1 = $default_table_body_color_1;
    $table_body_font_color_1 = $default_table_body_font_color_1;
Exemple #16
0
     $t_latest = date_format($trec["latest"]);
     $t_maxid = $trec["maxid"];
 }
 $message = next($headers);
 if ($t_thread != $t_id) {
     $img = '<img src="images/l.gif" border=0 width=12 align="top">';
     if (is_array($message)) {
         if ($t_thread == $message["thread"]) {
             $img = '<img src="images/t.gif" border=0 width=12 align="top">';
         }
     }
 } else {
     $img = "<img src=\"images/trans.gif\" border=0 width=1 height=21 align=\"absmiddle\">";
     $loc = 0;
 }
 if (initvar("id") == $t_id && ($read = true)) {
     $t_subject = "<b>{$t_subject}</b>";
     $t_author = "<b>{$t_author}</b>";
     $t_datestamp = "<b>{$t_datestamp}</b>";
 } else {
     $t_subject = "<a class=p_link href=\"{$read_page}.{$ext}?f={$num}&i={$t_id}&t={$t_thread}{$GetVars}\">{$t_subject}</a>";
 }
 $color = bgcolor($bgcolor);
 echo "<tr>\n";
 echo '  <td class="PhorumListRow" ' . $color . '><FONT color="' . $fcolor . '">&nbsp;' . $img . '&nbsp;' . $t_subject . "&nbsp;</font>";
 if ($UseCookies) {
     $isnew = false;
     if (${$phcollapse} != 0 && !$read) {
         // collapsed code
         if ($use_haveread) {
             if ($old_message < $t_maxid) {
Exemple #17
0
}
if (!isset($fldauthor) && !isset($fldsubject) && !isset($fldbody)) {
    $fields[] = "subject";
    $fields[] = "body";
    $fldauthor = 0;
    $fldsubject = 1;
    $fldbody = 1;
} else {
    empty($fldauthor) ? $fldauthor = 0 : ($fields[] = "author");
    empty($fldsubject) ? $fldsubject = 0 : ($fields[] = "subject");
    empty($fldbody) ? $fldbody = 0 : ($fields[] = "body");
}
initvar("date", 30);
initvar("globalsearch");
initvar("match");
initvar("start", 1);
//////////////////////////
// START NAVIGATION     //
//////////////////////////
$menu = array();
if ($ActiveForums > 1) {
    // Forum List
    addnav($menu, $lForumList, "{$forum_page}.{$ext}?f={$ForumParent}{$GetVars}");
}
// New Topic
addnav($menu, $lStartTopic, "{$post_page}.{$ext}?f={$num}{$GetVars}");
// Go To Top
addnav($menu, $lGoToTop, "{$list_page}.{$ext}?f={$num}{$GetVars}");
// Log Out/Log In
if ($ForumSecurity) {
    if (!empty($phorum_auth)) {
Exemple #18
0
 function PrepareFields($strTableName, $strIdent = "str_", $strSuffix = "", $strPrefix = "")
 {
     if (is_set($this->column_cache, $strTableName)) {
         $arColumns = $this->column_cache[$strTableName];
     } else {
         $arColumns = array();
         $strSql = "SELECT COLUMN_NAME, DATA_TYPE, DATA_PRECISION, DATA_SCALE, DATA_LENGTH " . "FROM USER_TAB_COLUMNS " . "WHERE UPPER(TABLE_NAME) = UPPER('" . $strTableName . "') ";
         $db_columns = $this->Query($strSql);
         while ($arColumnInfo = $db_columns->Fetch()) {
             $arColumns[] = $arColumnInfo;
         }
         $this->column_cache[$strTableName] = $arColumns;
     }
     for ($i = 0; $i < count($arColumns); $i++) {
         $cr = $arColumns[$i];
         $strFieldName = $strPrefix . $cr["COLUMN_NAME"] . $strSuffix;
         global ${$strFieldName};
         $strVarName = $strIdent . $cr["COLUMN_NAME"];
         global ${$strVarName}, $str_AMOUNT;
         initvar($strFieldName);
         switch ($cr["DATA_TYPE"]) {
             case "NUMBER":
                 if (IntVal($cr["DATA_SCALE"]) <= 0) {
                     ${$strVarName} = IntVal(${$strFieldName});
                 } else {
                     ${$strVarName} = roundEx(DoubleVal(${$strFieldName}), $cr["DATA_SCALE"]);
                 }
                 if ($cr["DATA_PRECISION"] > 0 && strlen(IntVal(${$strFieldName})) > IntVal($cr["DATA_PRECISION"]) - IntVal($cr["DATA_SCALE"])) {
                     ${$strVarName} = IntVal(str_repeat('9', $cr["DATA_PRECISION"] - $cr["DATA_SCALE"]));
                 }
                 break;
             case "VARCHAR2":
             case "CHAR":
                 $tmp = ${$strFieldName};
                 ${$strVarName} = $this->ForSql($tmp, $cr["DATA_LENGTH"]);
                 break;
             default:
                 ${$strVarName} = $this->ForSql(${$strFieldName});
                 break;
         }
     }
 }