getFormOpen() 공개 메소드

Begins a form Includes a safety mechanism to prevent re-opening an already-open form
public getFormOpen ( array $args = [] ) : string
$args array
리턴 string
예제 #1
0
 I8                     I8
 I8                     I8
 I8                     I8
</pre>';
echo '<div id="bodycontent" class="ui-widget-content"><h1 style="float: right;">' . $html->link('http://www.phpmoadmin.com', $phpmoadmin, array('title' => 'phpMoAdmin')) . '</h1>';
if (isset($accessControl) && !isset($_SESSION['user'])) {
    if (isset($_POST['username'])) {
        $_POST = array_map('trim', $_POST);
        if (isset($accessControl[$_POST['username']]) && $accessControl[$_POST['username']] == $_POST['password']) {
            $_SESSION['user'] = $_POST['username'];
        } else {
            $_POST['errors']['username'] = '******';
        }
    }
    if (!isset($_SESSION['user'])) {
        echo $form->getFormOpen();
        echo $html->div($form->getInput(array('name' => 'username', 'focus' => true)));
        echo $html->div($form->getInput(array('type' => 'password', 'name' => 'password')));
        echo $html->div($form->getInput(array('type' => 'submit', 'value' => 'Login', 'class' => 'ui-state-hover')));
        echo $form->getFormClose();
        exit(0);
    }
}
echo '<div id="dbcollnav">';
$formArgs = array('method' => 'get');
if (isset($mo->mongo['repairDb'])) {
    $formArgs['alert'] = isset($mo->mongo['repairDb']['ok']) && $mo->mongo['repairDb']['ok'] ? 'Database has been repaired and compacted' : 'Database could not be repaired';
}
echo $form->getFormOpen($formArgs);
echo $html->div($form->getSelect(array('name' => 'db', 'options' => $mo->mongo['dbs'], 'label' => '', 'value' => $db, 'addBreak' => false)) . $form->getInput(array('type' => 'submit', 'value' => 'Change database', 'class' => 'ui-state-hover')) . ' <span style="font-size: xx-large;">' . get::htmlentities($db) . '</span> [' . $html->link("javascript: mo.repairDatabase('" . get::htmlentities($db) . "'); void(0);", 'repair database') . '] [' . $html->link("javascript: mo.dropDatabase('" . get::htmlentities($db) . "'); void(0);", 'drop database') . ']');
echo $form->getFormClose() . $html->jsInline('var mo = {}
예제 #2
0
 I8                     I8
 I8                     I8
 I8                     I8
</pre>';
echo '<div id="bodycontent" class="ui-widget-content"><h1 style="float: right;">' . $html->link('http://www.phpmoadmin.com', $phpmoadmin, array('title' => 'phpMoAdmin')) . '</h1>';
if (isset($accessControl) && !isset($_SESSION['user'])) {
    if (isset($_POST['username'])) {
        $_POST = array_map('trim', $_POST);
        if (isset($accessControl[$_POST['username']]) && $accessControl[$_POST['username']] == $_POST['password']) {
            $_SESSION['user'] = $_POST['username'];
        } else {
            $_POST['errors']['username'] = '******';
        }
    }
    if (!isset($_SESSION['user'])) {
        echo $form->getFormOpen();
        echo $html->div($form->getInput(array('name' => 'username', 'focus' => true)));
        echo $html->div($form->getInput(array('type' => 'password', 'name' => 'password')));
        echo $html->div($form->getInput(array('type' => 'submit', 'value' => 'Login', 'class' => 'ui-state-hover')));
        echo $form->getFormClose();
        exit(0);
    }
}
echo '<div id="dbcollnav">';
$formArgs = array('method' => 'get');
if (isset($mo->mongo['repairDb'])) {
    $formArgs['alert'] = isset($mo->mongo['repairDb']['ok']) && $mo->mongo['repairDb']['ok'] ? 'Database has been repaired and compacted' : 'Database could not be repaired';
}
echo $form->getFormOpen($formArgs);
echo $html->div($form->getSelect(array('name' => 'db', 'options' => $mo->mongo['dbs'], 'label' => '', 'value' => $db, 'addBreak' => false)) . $form->getInput(array('type' => 'submit', 'value' => 'Change database', 'class' => 'ui-state-hover')) . ' <span style="font-size: xx-large;">' . get::htmlentities($db) . '</span> [' . $html->link("javascript: mo.repairDatabase('" . get::htmlentities($db) . "'); void(0);", 'repair database') . '] [' . $html->link("javascript: mo.dropDatabase('" . get::htmlentities($db) . "'); void(0);", 'drop database') . ']');
echo $form->getFormClose() . $html->jsInline('var mo = {}