Example #1
0
                echo '<p><b><font color="red">You don\'t have permission to post on this thread. [Thread: Closed]</font></b></p>';
            }
        } else {
            ?>
				<font class="forumCooldown" color="red">Antispam: You need to wait <?php 
            echo $user_znote_data['cooldown'] - time();
            ?>
 seconds before you can create or post.</font>
			<?php 
        }
    }
    /////////////////////
    // When you ARE creating new thread
    if ($create_thread_cid !== false && $create_thread_title !== false && $create_thread_text !== false && $create_thread_category !== false) {
        if ($user_znote_data['cooldown'] < time()) {
            user_update_znote_account(array('cooldown' => time() + $config['forum']['cooldownCreate']));
            $category = mysql_select_single("SELECT `access`, `closed`, `guild_id` FROM `znote_forum` WHERE `id`='{$create_thread_category}' LIMIT 1;");
            if ($category !== false) {
                $access = true;
                if (!$admin) {
                    if ($category['access'] > $yourAccess) {
                        $access = false;
                    }
                    if ($category['guild_id'] > 0) {
                        $status = false;
                        foreach ($charData as $char) {
                            if ($char['guild'] == $category['guild_id']) {
                                $status = true;
                            }
                        }
                        if (!$status) {
Example #2
0
            }
        }
    }
}
?>
<h1>Settings</h1>

<?php 
if (isset($_GET['success']) === true && empty($_GET['success']) === true) {
    echo 'Your settings have been updated.';
} else {
    if (empty($_POST) === false && empty($errors) === true) {
        $update_data = array('email' => $_POST['new_email']);
        $update_znote_data = array('flag' => getValue($_POST['new_flag']));
        user_update_account($update_data);
        user_update_znote_account($update_znote_data);
        header('Location: settings.php?success');
        exit;
    } else {
        if (empty($errors) === false) {
            echo output_errors($errors);
        }
    }
    ?>
	
	<form action="" method="post">
		<ul>
			<li>
				email:<br>
				<input type="text" name="new_email" value="<?php 
    echo $user_data['email'];