コード例 #1
0
     }
 }
 $topforums = get_headboards($fc, $last, TRUE);
 $breadcrumb->Add($last['name'], "showforum.php?id=" . $last['id'] . SID2URL_x);
 $breadcrumb->Add($prefix . $info['topic'], "showtopic.php?id={$last['id']}" . SID2URL_x);
 if ($info['tstart'] == '0') {
     $breadcrumb->Add($info['title'], "showtopic.php?action=jumpto&id={$last['id']}&topic_id={$info['id']}" . SID2URL_x);
 }
 $breadcrumb->Add($lang->phrase('report_post'));
 forum_opt($last);
 if (empty($info['report']) == false) {
     error($lang->phrase('report_post_locked'), "showtopic.php?action=jumpto&id={$last['id']}&topic_id={$info['id']}" . SID2URL_x);
 }
 if ($_GET['action'] == "report_post2") {
     $error = array();
     if (flood_protect() == false) {
         $error[] = $lang->phrase('flood_control');
     }
     if (strxlen($_POST['comment']) < $config['minpostlength']) {
         $error[] = $lang->phrase('comment_too_short');
     }
     if (count($error) > 0) {
         error($error, "misc.php?action=report_post&id={$info['id']}" . SID2URL_x);
     } else {
         set_flood();
         $message = $_POST['comment'];
         // Update the report
         $db->query("UPDATE {$db->pre}replies SET report = '{$message}' WHERE id = '{$info['id']}' LIMIT 1", __LINE__, __FILE__);
         // Get administrators and global moderators
         $groups = $scache->load('groups');
         $team = $groups->team();
コード例 #2
0
     }
     if (strxlen($_POST['name']) < $config['minnamelength']) {
         $error[] = $lang->phrase('name_too_short');
     }
     if (strxlen($_POST['email']) > 200) {
         $error[] = $lang->phrase('email_too_long');
     }
     $pname = $_POST['name'];
     $pnameid = $_POST['name'];
     $pid = 0;
 } else {
     $pname = $my->name;
     $pnameid = $my->id;
     $pid = $my->id;
 }
 if (flood_protect() == FALSE) {
     $error[] = $lang->phrase('flood_control');
 }
 if (strxlen($_POST['comment']) > $config['maxpostlength']) {
     $error[] = $lang->phrase('comment_too_long');
 }
 if (strxlen($_POST['comment']) < $config['minpostlength']) {
     $error[] = $lang->phrase('comment_too_short');
 }
 if (strxlen($_POST['topic']) > $config['maxtitlelength']) {
     $error[] = $lang->phrase('title_too_long');
 }
 if (strxlen($_POST['topic']) < $config['mintitlelength']) {
     $error[] = $lang->phrase('title_too_short');
 }
 ($code = $plugins->load('addreply_save_errorhandling')) ? eval($code) : null;
コード例 #3
0
     }
     if (strxlen($_POST['name']) < $config['minnamelength']) {
         $error[] = $lang->phrase('name_too_short');
     }
     if (strlen($_POST['email']) > 200) {
         $error[] = $lang->phrase('email_too_long');
     }
     $pname = $_POST['name'];
     $pnameid = $_POST['name'];
     $pid = 0;
 } else {
     $pname = $my->name;
     $pnameid = $my->id;
     $pid = $my->id;
 }
 if (flood_protect(FLOOD_TYPE_POSTING) == false) {
     $error[] = $lang->phrase('flood_control');
 }
 if (strxlen($_POST['comment']) > $config['maxpostlength']) {
     $error[] = $lang->phrase('comment_too_long');
 }
 if (strxlen($_POST['comment']) < $config['minpostlength']) {
     $error[] = $lang->phrase('comment_too_short');
 }
 // Add some chars for reply title prefix
 $maxlength = $config['maxtitlelength'] + strxlen($lang->phrase('reply_prefix'));
 if (strxlen($_POST['topic']) > $maxlength) {
     $error[] = $lang->phrase('title_too_long');
 }
 if (strxlen($_POST['topic']) < $config['mintitlelength']) {
     $error[] = $lang->phrase('title_too_short');
コード例 #4
0
*/
error_reporting(E_ALL);
define('SCRIPTNAME', 'search');
define('VISCACHA_CORE', '1');
include "data/config.inc.php";
include "classes/function.viscacha_frontend.php";
$my->p = $slog->Permissions();
$my->pb = $slog->GlobalPermissions();
if ($my->p['search'] == 0) {
    error($lang->phrase('query_string_error'));
}
$breadcrumb->Add($lang->phrase('search'));
($code = $plugins->load('search_start')) ? eval($code) : null;
if ($_GET['action'] == "search") {
    if ($config['floodsearch'] == 1) {
        if (flood_protect(FLOOD_TYPE_SEARCH) == false) {
            error($lang->phrase('flood_control'));
        }
        set_flood(FLOOD_TYPE_SEARCH);
    }
    $boards = array();
    if (isset($_POST['boards']) && is_array($_POST['boards'])) {
        $_POST['boards'] = array_map('trim', $_POST['boards']);
        foreach ($_POST['boards'] as $b) {
            if (is_id($b) == true) {
                $boards[] = $b;
            }
        }
    }
    $search = preg_replace("/(\\s){1,}/is", " ", $_POST['search']);
    $search = preg_replace("/\\*{1,}/is", '*', $search);
コード例 #5
0
ファイル: log.php プロジェクト: BackupTheBerlios/viscacha-svn
    if ($db->num_rows($result) != 1) {
        error($lang->phrase('log_pwremind_failed'), "log.php?action=pwremind" . SID2URL_x);
    } else {
        $confirmcode = md5($config['cryptkey'] . $user['pw']);
        ($code = $plugins->load('log_pwremind2_prepare')) ? eval($code) : null;
        $user = $gpc->plain_str($user);
        $data = $lang->get_mail('pwremind');
        $to = array('0' => array('name' => $user['name'], 'mail' => $user['mail']));
        $from = array();
        xmail($to, $from, $data['title'], $data['comment']);
        ($code = $plugins->load('log_pwremind2_end')) ? eval($code) : null;
        ok($lang->phrase('log_pwremind_success'), "log.php?action=login" . SID2URL_x);
    }
    $slog->updatelogged();
} elseif ($_GET['action'] == "pwremind3") {
    if (flood_protect(FLOOD_TYPE_PWRENEW) == false) {
        error($lang->phrase('flood_control'), 'log.php?action=login' . SID2URL_x);
    }
    set_flood(FLOOD_TYPE_PWRENEW);
    ($code = $plugins->load('log_pwremind3_start')) ? eval($code) : null;
    $result = $db->query("SELECT id, pw, mail, name FROM {$db->pre}user WHERE id = '{$_GET['id']}' LIMIT 1", __LINE__, __FILE__);
    $user = $db->fetch_assoc($result);
    $confirmcode = md5($config['cryptkey'] . $user['pw']);
    if ($confirmcode == $_GET['fid']) {
        $pw = random_word();
        $md5 = md5($pw);
        $db->query("UPDATE {$db->pre}user SET pw = '{$md5}' WHERE id = '{$user['id']}' LIMIT 1", __LINE__, __FILE__);
        $user = $gpc->plain_str($user);
        $data = $lang->get_mail('pwremind2');
        $to = array('0' => array('name' => $user['name'], 'mail' => $user['mail']));
        $from = array();