Example #1
0
<?php

if ($DB->value("SELECT locked FROM thread WHERE id=\$1", array(id())) == 't') {
    return;
}
$Form = new Form();
$Form->header(url(0, 1) . "reply", "post", FORM_SALT);
$Form->values(array("thread_id" => id(true)));
$Form->add_hidden("thread_id");
$Form->account_login();
$Form->fieldset_open("Reply");
$Form->add_textarea("body", "Body:");
$Form->fieldset_close();
$Form->add_submit(SAY_BUTTON, "id=\"submit\"/>");
$Form->add_button("preview", PREVIEW_BUTTON, "preview_post('{$Form->name}','thread'," . id() . ");");
if (id() == 362137) {
    print "&nbsp;";
    $Form->add_button("_load", "load bradyism", "\$(this).val('loading...');\$.post('/thread/view/bradyism/',{},function(data){ \$('#body').val(\$.trim(data));\$('#_load').val('load bradyism')});");
}
print "&nbsp;<sup><a href=\"javascript:;\" onclick=\"\$('#bbcode').slideToggle()\">[help]</a></sup>\n";
$Form->footer();
$Form->header_validate();
$Form->add_notnull("body", "Please enter a post body.");
$Form->footer_validate();
print BBCODE_GUIDE;
?>
<script type="text/javascript">
function completed(data)
{
  if(jQuery.trim(data) == "")
  {
Example #2
0
}
if (!is_numeric($prefs['collapseopen'])) {
    $prefs['collapseopen'] = COLLAPSE_OPEN_DEFAULT;
}
if ($prefs['collapseopen'] < 1) {
    $prefs['collapseopen'] = 1;
}
$Base = new Base();
$Base->type(EDIT);
$Base->title("Account Management: {$member['name']}");
$Base->header();
print "<div class=\"box clear\">\n";
$Form = new Form();
$Form->values(array_merge($member, $prefs));
$Form->header(url(), "post", FORM_SALT);
$Form->fieldset_open("Account Management");
$Form->add_text("name", "Name:");
$Form->add_text("postalcode", "Postal Code:");
$Form->fieldset_close();
$Form->fieldset_open("Password Management");
print "<div id=\"password\" style=\"display:none\">\n";
$Form->add_password("_current", "Current:");
$Form->add_password("_pass", "New:");
$Form->add_password("_pass_confirm", "Confirm:");
print "</div>\n";
$Form->add_button("_change", "Change Password", "change_password()", "style=\"margin:5px\"");
$Form->fieldset_close();
$Form->fieldset_open("Details");
$DB->query("SELECT\r\n              p.display,\r\n              p.name as field,\r\n              pt.name as type,\r\n              p.width\r\n            FROM\r\n              pref p\r\n            LEFT JOIN\r\n              pref_type pt\r\n            ON\r\n              pt.id = p.pref_type_id\r\n            WHERE\r\n              p.editable IS true\r\n            ORDER BY\r\n              p.ordering");
while ($pref = $DB->load_array()) {
    switch ($pref['type']) {
Example #3
0
<?php

if (!isset($res)) {
    $Base = new Base();
    $Base->type(SEARCH);
    $Base->title("Search");
    $Base->header();
}
$Form = new Form();
$Form->ajax(false);
if (isset($_SESSION['search'])) {
    $Form->values($_SESSION['search']);
}
$Form->header("/search/", "post", FORM_SALT);
$Form->fieldset_open("Search Information");
$Form->add_text("search", "Search For:", 300);
$Form->add_select("_type", "Within:", "Choose", array("thread" => "Threads", "thread_post" => "Thread Posts", "message" => "Messages", "message_post" => "Message Posts"));
$Form->fieldset_close();
$Form->fieldset_open("Optional Fields");
print "<li>will return in a bit</li>\n";
/*
$Form->add_text("member","By Member:");
$Form->labels(false);
print "<li>\n";
print "  <label>Date Range:</label>\n";
$Form->add_date("start",false);
$Form->add_date("end",false);
print "</li>\n";
$Form->labels(true);
$Form->add_select("quickdate","Quick Ranges:","Choose",array("thisweek"=>"This Week","thismonth"=>"This Month","lastweek"=>"Last Week","lastmonth"=>"Last Month"),"onchange=\"quickrange($(this).val())\">");
*/
Example #4
0
<div class="body">
    <?php 
echo Form::open(array("action" => "", "class" => "form-horizontal", "method" => "post", "enctype" => "multipart/form-data"));
?>
    <?php 
echo Form::hidden('user_id', Input::post('user_id', isset($employee) ? $employee->user_id : 0));
?>
    <?php 
echo Form::fieldset_open();
?>
        <legend class="section">ข้อมูลบัญชีผู้ใช้งาน</legend>
        <div class="form-group">
            <?php 
echo Form::label('Username <span class="required">*</span>', 'username', array('class' => 'control-label'));
?>
            <div class="controls form-group">
                <input type="text" name="username" class="form-control" placeholder="ระบุ Username" maxlength="255" <?php 
if (isset($user)) {
    ?>
readonly<?php 
}
?>
 value="<?php 
echo isset($user) ? $user->username : '';
?>
" />
            </div>
        </div>
        <div class="form-group">
            <?php 
echo Form::label('Password' . ($menu == "create" ? '<span class="required">*</span>' : ''), 'password', array('class' => 'control-label'));
Example #5
0
  {
    jQuery('body').append("<style type=text/css>.list:hover { background-color: transparent !important; }</style>");
  }
  else
  jQuery('body').append("<style type=text/css>.list:hover { background-color: #"+jQuery('#hover').val()+"; }</style>");
}
</script>
<div style="float:left;width:50%">
<?php 
$Form = new Form();
if ($theme['hover'] == "transparent") {
    $theme['hover'] = "none";
}
$Form->values(array_merge($theme, get('theme') ? array("theme" => get('theme')) : array()));
$Form->header(url(), "post", FORM_SALT);
$Form->fieldset_open("Theme Options");
$Form->add_text("font", "Font Family:", 250);
$Form->add_select("fontsize", "Font Size:", "Select Size", $fontsizes);
$Form->add_text("body", "Background #:", 50, 6, "/> <input type=\"radio\" id=\"type\" name=\"type\" value=\"body\" checked=\"true\"/>");
$Form->add_text("even", "Even #:", 50, 6, "/> <input type=\"radio\" id=\"type\" name=\"type\" value=\"even\"/>");
$Form->add_text("odd", "Odd #:", 50, 6, "/> <input type=\"radio\" id=\"type\" name=\"type\" value=\"odd\"/>");
$Form->add_text("me", "My Posts #:", 50, 6, "/> <input type=\"radio\" id=\"type\" name=\"type\" value=\"me\"/>");
$Form->add_text("hover", "Hover Bar #:<br/><span class=\"small\">(or 'none')</span>", 50, 6, "/> <input type=\"radio\" id=\"type\" name=\"type\" value=\"hover\"/>");
$Form->add_text("readbar", "Read Bars #:", 50, 6, "/> <input type=\"radio\" id=\"type\" name=\"type\" value=\"readbar\"/>");
$Form->fieldset_close();
$Form->add_submit("Save");
$Form->add_button("preview", "Preview", "preview_theme()");
$Form->labels(false);
$Form->fieldset_open("Preset Themes");
$DB->query("SELECT name as id,name FROM theme");
$Form->add_select("theme", "Themes:", "Select Theme", $DB->load_all_key());
Example #6
0
if (!REGISTRATION_PASSWORD && !session('authorized')) {
    $_SESSION['authorized'] = true;
}
if (REGISTRATION_PASSWORD && !session('authorized')) {
    $Form = new Form();
    $Form->header(url(0, -2) . "authorize/", "post", FORM_SALT);
    $Form->fieldset_open("Registration Authorization");
    $Form->add_password("password", "Password:"******"Authorize Me");
    $Form->footer();
}
if (session('authorized')) {
    $Form = new Form();
    $Form->header(url(), "post", FORM_SALT);
    $Form->fieldset_open("Create Account");
    $Form->add_text("account", "Name:", 150);
    $Form->add_text("secret", "Secret Word:", 150, false, "/><span class=\"small\">(to recover forgotten password)</span>");
    $Form->add_text("email_signup", "Email:", 200);
    $Form->add_text("email_confirm", "Email (confirm):", 200);
    $Form->add_text("postalcode", "Postal Code:", 75);
    $Form->fieldset_close();
    $Form->add_submit("Create Account");
    $Form->footer();
    $Form->header_validate();
    $Form->add_notnull("account", "Please enter an account name.");
    $Form->add_notnull("secret", "Please enter a secret word for password recovery.");
    $Form->add_notnull("email_signup", "Please enter an email address.");
    $Form->add_notnull("email_confirm", "Please confirm your email address.");
    $Form->add_notnull("postalcode", "Please enter a postal code.");
    $Form->footer_validate();
Example #7
0
<?php

$Base = new Base();
$Base->type(MISC);
$Base->title(TITLE_CHAT);
$Base->header();
?>
<div id="data" class="box clear" style="overflow:scroll;overflow-x:hidden;height:375px;">
Loading chat history...
</div>
<?php 
$Form = new Form();
$Form->labels(false);
$Form->header("/chat/speak/", "post", FORM_SALT);
$Form->fieldset_open("Chat Panel");
$Form->add_text("chat", false, 400, false, "onkeydown=\"return catch_enter(event)\"/>");
$Form->add_button("add", "say that shit", "speak();");
print "<br/>\n";
$Form->add_checkbox("stop", "pause scroll", "onclick=\"pause=pause?false:true\"/> pause scrolling");
$Form->fieldset_close();
$Form->footer();
$Base->footer();
?>
<script type="text/javascript">
var lasthash;
var pause = false;
function speak()
{
  var text = $('#chat').val();
  $('#add')[0].disabled = true;
  $.post("/chat/speak/",{msg:text},function(data)
Example #8
0
<?php

$Base = new Base();
$Base->type(CREATE);
$Base->title("Create New Thread");
$Base->header();
$Form = new Form();
$Form->header(url(), "post", FORM_SALT);
$Form->account_login();
$Form->fieldset_open("Thread Details");
$Form->add_text("subject", "Subject:", 400, 200);
$Form->add_textarea("body", "Body:");
$Form->fieldset_close();
$Form->add_submit(SAY_BUTTON, "class=\"nodisable\"/>");
$Form->add_button("preview", PREVIEW_BUTTON, "preview_post('{$Form->name}','thread',99999999);");
print "&nbsp;<sup><a href=\"javascript:;\" onclick=\"\$('#bbcode').slideToggle()\">[help]</a></sup>\n";
$Form->footer();
$Form->header_validate();
$Form->add_notnull("subject", "Please enter a subject.");
$Form->add_notnull("body", "Please enter a post body.");
$Form->footer_validate();
$Base->footer();
print BBCODE_GUIDE;
?>
<script type="text/javascript">
function completed(data)
{
  if(jQuery.trim(data) == "") window.location = '/';
  $('.submit').attr('disabled',false);
}
</script>
Example #9
0
<?php

echo Form::open();
echo Form::fieldset_open(null, "User data");
?>

<label for="username">User name</label>
    <input type="text" name="username" id="username" />
<label for="password">Password</label>
    <input type="password" name="password" id="password" />
<input type="Submit" value="Log in" class="btn btn-primary" />
<?php 
echo Form::fieldset_close();
echo Form::close();
?>

<div id="fb">
    <?php 
echo Html::anchor("account/fb", "Log in with Facebook");
?>
</div>

<div id="register">
    <?php 
echo Html::anchor("account/create", "Not registered? Become a member!");
?>
</div>
Example #10
0
<?php

echo Form::open();
echo Form::fieldset_open(null, "Enter your data");
?>

<label for="usermail">E-mail (works as username)</label>
<input type="text" name="usermail" id="usermail" />

<label for="password">Password</label>
<input type="password" name="password" id="password" />

<label for="password_rep">Password (once again!)</label>
<input type="password" name="password_rep" id="password_rep" />

<input type="Submit" value="Register" class="btn btn-primary" />
<?php 
echo Form::fieldset_close();
echo Form::close();
Example #11
0
<?php

if (!id() || !session('admin')) {
    return to_index();
}
$Base = new Base();
$Base->type(EDIT);
$Base->title("Edit Post");
$Base->header();
$DB->query("SELECT thread_id,body FROM thread_post WHERE id=\$1", array(id()));
$data = $DB->load_array();
$Form = new Form();
$Form->values($data);
$Form->header(url(), "post", FORM_SALT);
$Form->fieldset_open("Edit");
$Form->add_textarea("body", "Body:");
$Form->fieldset_close();
$Form->add_submit(SAY_BUTTON, "id=\"submit\"/>");
$Form->footer();
$Form->header_validate();
$Form->add_notnull("body", "Please enter a post body.");
$Form->footer_validate();
$Base->footer();
?>
<script type="text/javascript">
function completed(data)
{
  if(jQuery.trim(data) == "") location.href='/thread/view/<?php 
print $data['thread_id'];
?>
/';
Example #12
0
<?php

if (session('id')) {
    return to_index();
}
$Base = new Base();
$Base->title("Forgotten Password");
$Base->type(CREATE);
$Base->header();
print "<div class=\"box clear\">\n";
print FORGOT_PASSWORD;
$Form = new Form();
$Form->ajax(false);
$Form->header(url(), "post", FORM_SALT);
$Form->fieldset_open("Reset Password");
$Form->add_text("email_signup", "Email Signup:");
$Form->fieldset_close();
$Form->add_submit("Send Reset Email");
$Form->footer();
$Form->header_validate();
$Form->add_notnull("email_signup", "Please enter an email address.");
$Form->footer_validate();
print "</div>";
$Base->footer();
Example #13
0
<?php

$Base = new Base();
$Base->type(CREATE);
$Base->title("Create New Message");
$Base->header();
$Form = new Form();
$Form->header(url(), "post", FORM_SALT);
$Form->account_login();
$Form->fieldset_open("Message Details");
$Form->labels(false);
print "<li>\n";
print "  <label>Recipients:</label>\n";
print "  <div id=\"m\" style=\"width:500px;float:left;line-height:1.8em;\"><span id=\"notice\" class=\"small\">(invalid names will be discarded)</span></div>\n";
print "</li>\n";
print "<li>\n";
print "  <label for=\"recipients\">Add Members:</label>\n";
$Form->add_hidden("message_members");
$Form->add_text("_recipients", false, 200, false, "onkeydown=\"return catch_enter(event)\"/>");
$Form->add_button("add", "Add", "check_member();", "tabindex=\"10\"/>");
print " <sup id=\"names\">add multiples with: name, name, name</sup>";
print "</li>\n";
$Form->labels(true);
$Form->add_text("subject", "Subject:", 400, 200);
$Form->add_textarea("body", "Body:");
$Form->fieldset_close();
$Form->add_submit(SAY_BUTTON, "class=\"nodisable\"/>");
$Form->add_button("preview", PREVIEW_BUTTON, "preview_post('{$Form->name}','message',99999999);");
print "&nbsp;<sup><a href=\"javascript:;\" onclick=\"\$('#bbcode').slideToggle()\">[help]</a></sup>\n";
$Form->footer();
$Form->header_validate();