<?php include 'core/Page.php'; if (!Session::logged_in()) { Page::Redirect('login'); } if (!Auth::ACL("admin") && !Auth::ACL("su")) { Page::Redirect('dash'); } $p = new Page(); if (!$p->ajax) { $p->HTML('header.html', array("###MENU###" => Dropdown_menu($p))); } $p->title = "Your Website"; $p->CSS("main.css"); $p->Jquery(); $getpost = getpost(); if (!isset($getpost['ID'])) { Page::Redirect('dash'); } if (isset($getpost['new'])) { $p->JS('notifier.js'); $p->JS('Notifier.info("Editing new Item");'); } $p->HTML('<BR>'); global $auth_database; $profile_model = new Profile($auth_database); $auth_model = new Auth($auth_database); $a = $auth_model->Get($getpost['ID']); if (false_or_null($a)) { Page::Redirect('profiles');
<?php include 'core/Page.php'; $getpost = getpost(); $getpost['m'] = intval($getpost['m']); $p = new Page(); $p->CSS('main.css'); $message = NULL; switch ($getpost['m']) { case 1: case 2: $message = 'Password or Username Incorrect'; break; case 4: $message = 'Account is locked.'; break; } if (!is_null($message)) { $messages = array('###Messages###' => $message); } else { $messages = array('###Messages###' => ''); } $p->HTML('login_form.html', $messages); if (!$p->ajax) { $p->HTML('footer.html'); } $p->Render();
<?php include 'core/Page.php'; $p = new Page(); $p->HTML('<b>It works!</b>'); global $profile_model; // Model for non-auth user settings like name, email, dashboard, etc. global $user; // Current active user profile (or NULL if none) global $session_model; // Model for user session history global $session; // Current active session (or NULL if none) global $auth_model; // Auth model for user authentication information (username for example) global $auth; // Current active auth profile (or NULL if none) global $logged_in; // true if user is logged in and authenticated, false otherwise $p->Render(); var_dump($user); var_dump($session); var_dump($auth); var_dump($logged_in); var_dump($acl);
$highlighter->blend = '*'; $highlighter->bg->SetRGB(1.0, 0.3, 1.0); $g->VLine($highlighter, 3, 0); // echo '<HR>[3,0]: '; var_dump($g->grid[3][0]); // var_dump($g->grid[7][4]); $highlighter->operation = 2; $highlighter->blend = '+'; $highlighter->bg->SetRGB(0.125, 0.135, 0.145); $g->Circle($highlighter, 7, 4, 4); $highlighter->operation = 3; $highlighter->blend = '='; $highlighter->bg->SetRGB(0.125, 0.135, 0.145); $highlighter->fg->SetRGB(0.825, 0.835, 0.845); $g->Circle($highlighter, 50, 50, 20); $highlighter->operation = 1; $highlighter->blend = '+'; $highlighter->fg->SetRGB(0.75, 0.75, 0.75); $g->Rectangle($highlighter, 15, 15, 4, 4); $highlighter->operation = 2; $highlighter->blend = '-'; $highlighter->bg->SetRGB(0.5, 0.5, 0.5); $g->Rectangle($highlighter, 15, 15, 4, 4); for ($i = 0; $i < $g->w; $i++) { for ($j = 0; $j < $g->h; $j++) { $g->Value($i, $j, "{$i},{$j}"); } } $p->HTML('<h2>Grid size: ' . $g->w . 'x' . $g->h . '</h2>'); $p->HTML($g->Render()); $p->Render(); // var_dump($g);
<?php include 'core/Page.php'; if (!Session::logged_in()) { Page::Redirect('login'); } $df = new DataForm('changeMyPassword.txt'); $df->form->Prepare(); $p = new Page(); if (!$p->ajax) { $p->HTML('header.html'); $p->title = 'Form Test'; $p->CSS('main.css'); $p->Jquery(); $p->JS(CDN_JQ_CHOSEN); $p->CSS(CDN_JQ_CHOSEN_CSS); } $p->Add(new DataForm('changeMyPassword.txt')); if (!$p->ajax) { $p->HTML('footer.html'); } $p->Render();
<?php include '../core/Page.php'; $f = new FormHelper("myForm", "http://dm.3druck.us/examples/ajax_form.php"); $f->Add(new FormSelect(array('field' => 'First.Name', 'placeholder' => 'Hello World...', 'html' => array('class' => 'chosen-select', 'style' => 'width:50%'), 'options' => array(0 => array('name' => 'Pooty', 'value' => 'Tang'), 1 => array('name' => 'Elvira', 'value' => 'Dark Mistress')), 'disable_search' => true))); $f->Add(new FormRadio(array('field' => 'Last.Name', 'options' => array(0 => array('label' => 'poots', 'name' => 'Pooty', 'value' => 'Tang'), 1 => array('label' => 'elvis', 'name' => 'Elvira', 'value' => 'Dark Mistress'))))); $f->Add(new FormSlider(array('field' => 'Volume.Control'))); $f->Add(new FormText(array('field' => 'BoopText', 'value' => 'boop'))); $f->Add(new FormSubmit(array('value' => 'Submitty this formy'))); $f->Prepare(); //var_dump($f); $p = new Page(); $p->title = 'Form Test'; $p->JS(CDN_JQUERY_LATEST); $p->JS(CDN_JQUERY_UI); $p->JS(CDN_JQ_CHOSEN); $p->CSS(CDN_JQUERY_UI_CSS); $p->CSS(CDN_JQ_CHOSEN_CSS); $p->JQ($f->jq, TRUE); $p->HTML($f->html); $p->Render();