Example #1
0
$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']) {
        case "input":
            $Form->add_text($pref['field'], "{$pref['display']}:", $pref['width']);
            break;
        case "textarea":
            $Form->add_textarea($pref['field'], "{$pref['display']}:");
            break;
        case "checkbox":
            $Form->add_checkbox($pref['field'], "{$pref['display']}:");
            break;
    }
}
$Form->add_submit("Save Changes");
$Form->fieldset_close();
$Form->footer();
$Form->header_validate();
$Form->add_notnull("postalcode", "Please enter a postal code.");
$Form->footer_validate();
$Base->footer();
print "</div>";
?>
<script type="text/javascript">
function completed() { $('.submit').attr('disabled',false); }
function change_password()
Example #2
0
$item = $f->add_password(_t("Retype Password"), "clear_password2", _t("Retype your password."));
$item->is_optional = true;
$f->add_hidden("password", "");
$f->add_hidden("password2", "");
//$f->add_text("Street# and street name", "street", default_value("street"), "Number and street name");
//$f->add_text("ZIP", "zip", default_value("zip"), "ZIP code of your city.");
//$f->add_text("City", "city", default_value("city"), "Your city.");
//$item = $f->add_text("State (Optional)", "state", default_value("state"), "Your state if any");
//$item->is_optional = true;
//$f->add_text("Country", "country", default_value("country"), "Your country");
if ($g_use_recaptcha) {
    $publickey = CAPTCHA_PUB_KEY;
    // you got this from the signup page
    $f->add_raw_html(recaptcha_get_html($publickey));
}
$f->add_checkbox(_t("I have read and understood the <a href=\"info/terms\" target=\"_blank\">Terms and Conditions</a> and accept them."), "confirm", "", "");
$f->add_submit(_t("Submit"));
echo $f->html();
?>
<script>
	var hash_salt = "<?php 
echo RANDOM_SALT;
?>
";
	$(document).ready(function() {
		eb_sync_hash('clear_password', 'password');
		eb_sync_hash('clear_password2', 'password2');
	});
	$("form").submit(function() {
		$('input[type=clear_password]').attr('name', '');
		$('input[type=clear_password2]').attr('name', '');
Example #3
0
$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)
  {
    $('#add')[0].disabled = false;
    $('#chat').val('');
Example #4
0
<?php

include_once __DIR__ . "/../autoloader.php";
$form = new Form();
$form->add_text("nom", "Votre nom");
$form->add_date("date", "Format JJMMYY");
$form->add_password("passw", "Votre mot de passe ici :");
$form->add_textarea("bio", "Je vis  a Tonneins");
$form->add_checkbox("etudiant", "1", "Etudiant", TRUE);
$form->add_checkbox("bob", "2", "Bob");
$form->display("./../index.php", "get");
Example #5
0
$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, "autocomplete=\"off\" 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->add_checkbox("disablemedia","disable media",(session('hidemedia')?' checked="yes" ':'') . "onclick=\"media=!media;lasthash='';update(false);\"/> disable media");
$Form->add_checkbox("enablemedia", "enable media", "onclick=\"media=!media;lasthash='';update(false);\"/> enable media");
$Form->fieldset_close();
$Form->footer();
$Form->header_validate();
$Form->set_focus('chat');
$Form->footer_validate();
$Base->footer();
?>
<script type="text/javascript">
var lasthash = '';
var pause = false;
var media = <?php 
print 'false';
?>
Example #6
0
$item = $f->add_text(_t("Organizer name"), "organizer_name", default_value("organizer_name", $event->organizer_name, $user->get_company_name()), _t("The entity that is responsible for organizing the event."));
$item->other_attr = ' size="60" maxlength="255"';
$item = $f->add_text(_t("Organizer phone (optional but recommended)"), "phone", default_value("phone", $event->phone, $user->phone), _t("Contact phone not published. Used ONLY for support purpose."));
$item->is_optional = true;
if (!$event->has_accountancy_activity()) {
    $item = $f->add_number(_t("Required funding (Euro)"), "funding_needed", default_value("funding_needed", $event->funding_needed), _t("Minimum amount of fund needed to organize the event. Please indicate 0 if no requirement."));
    $item->other_attr = ' step="0.01" min="0"';
} else {
    $f->add_hidden("funding_needed", $event->funding_needed);
}
$item = $f->add_text(_t("Event date"), "happening_t", default_value("happening_t", $event->happening_t), _t("Date at which starts the event (Format: YYYY-MM-DD)."));
$item->other_attr = 'autocomplete="off"';
$item = $f->add_text(_t("VAT indentification number"), "vat", default_value("vat", $event->vat, $user->vat), _t("For EU company only."));
$item->is_optional = true;
if (!$event->is_confirmed()) {
    $f->add_checkbox(_t("This event is confirmed."), "is_confirmed", "", _t("help_checkbox_confirmation"));
}
$item = $f->add_text(_t("Confirmation date"), "confirmation_t", default_value("confirmation_t", $event->confirmation_t), _t("Maximum date at which the event will be confirmed or cancelled (Format: YYYY-MM-DD)."));
$item->other_attr = 'autocomplete="off"';
$location = Address::get_from_id($event->location_address_id);
$placeholder = _t('Street no, Street, Zip City, etc.');
$item = $f->add_textarea(_t("Event address"), "location_address", default_value("location_address", $location->address), _t("Address of the place where will occur the event. Please indicate an accurate address (street, street no, city, zip, state, country)"));
$item->other_attr = 'class="addresspicker" data-addresspickeroptions=\'{"showBlockMap": false}\' placeholder="' . $placeholder . '"';
$billing_address = Address::get_from_id($event->billing_address_id);
$item = $f->add_textarea(_t("Billing address"), "billing_address", default_value("billing_address", $billing_address->address, $user->address()), _t("Address of the organizer. Please indicate an accurate address (street, street no, city, zip, state, country)"));
$item->other_attr = 'class="addresspicker" data-addresspickeroptions=\'{"showBlockMap": false}\' placeholder="' . $placeholder . '"';
$item = $f->add_text(_t("Web site (optional)"), "link", default_value("link", $event->link), _t("Official event web site (if any)."));
$item->other_attr = 'size="60" maxlength="255"';
$item->is_optional = true;
$item = $f->add_textarea(_t("Short description"), "short_description", default_value("short_description", $event->short_description), _t("Enter a short description of the event. (HTML editor)"));
$item->other_attr = 'style="width: 100%;" rows="5"';