コード例 #1
0
$active = 1;
$username = strtolower(strip_tags($wb->get_post_escaped('username')));
$display_name = strip_tags($wb->get_post_escaped('display_name'));
$email = $wb->get_post('email');
// Create a javascript back link
$js_back = WB_URL . '/account/signup.php';
/*
if (!$wb->checkFTAN())
{
	$wb->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $js_back, false);
	exit();
}
*/
// Check values
if ($groups_id == "") {
    $wb->print_error($MESSAGE['USERS_NO_GROUP'], $js_back, false);
}
if (!preg_match('/^[a-z]{1}[a-z0-9_-]{2,}$/i', $username)) {
    $wb->print_error($MESSAGE['USERS_NAME_INVALID_CHARS'] . ' / ' . $MESSAGE['USERS_USERNAME_TOO_SHORT'], $js_back);
}
if ($email != "") {
    if ($wb->validate_email($email) == false) {
        $wb->print_error($MESSAGE['USERS_INVALID_EMAIL'], $js_back, false);
    }
} else {
    $wb->print_error($MESSAGE['SIGNUP_NO_EMAIL'], $js_back, false);
}
$email = $wb->add_slashes($email);
$search = array('{SERVER_EMAIL}');
$replace = array(SERVER_EMAIL);
// Captcha
コード例 #2
0
ファイル: comment.php プロジェクト: bladicito/massging
 * @requirements    PHP 5.2.2 and higher
 * @version         $Id: comment.php 1538 2011-12-10 15:06:15Z Luisehahne $
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb_svn/wb280/tags/2.8.3/wb/modules/news/comment.php $
 * @lastmodified    $Date: 2011-12-10 16:06:15 +0100 (Sa, 10. Dez 2011) $
 *
 */
// Include config file
require '../../config.php';
require_once WB_PATH . '/framework/class.wb.php';
$wb = new wb();
// Check if there is a post id
// $post_id = $wb->checkIDKEY('post_id', false, 'GET');
$post_id = (int) $_GET['post_id'];
$section_id = (int) $_GET['section_id'];
if (!$post_id or !isset($_GET['section_id']) or !is_numeric($_GET['section_id'])) {
    $wb->print_error('ABORT::' . $MESSAGE['GENERIC_SECURITY_ACCESS'], WB_URL . PAGES_DIRECTORY);
    exit;
}
// Query post for page id
$query_post = $database->query("SELECT post_id,title,section_id,page_id FROM " . TABLE_PREFIX . "mod_news_posts WHERE post_id = '{$post_id}'");
if ($query_post->numRows() == 0) {
    header("Location: " . WB_URL . PAGES_DIRECTORY . "");
    exit(0);
} else {
    $fetch_post = $query_post->fetchRow();
    $page_id = $fetch_post['page_id'];
    $section_id = $fetch_post['section_id'];
    $post_id = $fetch_post['post_id'];
    $post_title = $fetch_post['title'];
    define('SECTION_ID', $section_id);
    define('POST_ID', $post_id);