本文整理汇总了PHP中PMA\libraries\Util::getCheckbox方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::getCheckbox方法的具体用法?PHP Util::getCheckbox怎么用?PHP Util::getCheckbox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA\libraries\Util
的用法示例。
在下文中一共展示了Util::getCheckbox方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getOptionsBlock
/**
* Prepare option fields block
*
* @return string $options_html html content
*
* @access private
*
* @see _getTableHeaders()
*/
private function _getOptionsBlock()
{
$options_html = '';
$options_html .= '<form method="post" action="sql.php" ' . 'name="displayOptionsForm"';
$options_html .= ' class="ajax print_ignore" ';
$options_html .= '>';
$url_params = array('db' => $this->__get('db'), 'table' => $this->__get('table'), 'sql_query' => $this->__get('sql_query'), 'goto' => $this->__get('goto'), 'display_options_form' => 1);
$options_html .= PMA_URL_getHiddenInputs($url_params) . '<br />' . Util::getDivForSliderEffect('', __('Options')) . '<fieldset>';
$options_html .= '<div class="formelement">';
$choices = array('P' => __('Partial texts'), 'F' => __('Full texts'));
// pftext means "partial or full texts" (done to reduce line lengths)
$options_html .= Util::getRadioFields('pftext', $choices, $_SESSION['tmpval']['pftext'], true, true, '', 'pftext_' . $this->__get('unique_id')) . '</div>';
if ($GLOBALS['cfgRelation']['relwork'] && $GLOBALS['cfgRelation']['displaywork']) {
$options_html .= '<div class="formelement">';
$choices = array('K' => __('Relational key'), 'D' => __('Display column for relations'));
$options_html .= Util::getRadioFields('relational_display', $choices, $_SESSION['tmpval']['relational_display'], true, true, '', 'relational_display_' . $this->__get('unique_id')) . '</div>';
}
$options_html .= '<div class="formelement">' . Util::getCheckbox('display_binary', __('Show binary contents'), !empty($_SESSION['tmpval']['display_binary']), false, 'display_binary_' . $this->__get('unique_id')) . '<br />' . Util::getCheckbox('display_blob', __('Show BLOB contents'), !empty($_SESSION['tmpval']['display_blob']), false, 'display_blob_' . $this->__get('unique_id')) . '</div>';
// I would have preferred to name this "display_transformation".
// This is the only way I found to be able to keep this setting sticky
// per SQL query, and at the same time have a default that displays
// the transformations.
$options_html .= '<div class="formelement">' . Util::getCheckbox('hide_transformation', __('Hide browser transformation'), !empty($_SESSION['tmpval']['hide_transformation']), false, 'hide_transformation_' . $this->__get('unique_id')) . '</div>';
$options_html .= '<div class="formelement">';
$choices = array('GEOM' => __('Geometry'), 'WKT' => __('Well Known Text'), 'WKB' => __('Well Known Binary'));
$options_html .= Util::getRadioFields('geoOption', $choices, $_SESSION['tmpval']['geoOption'], true, true, '', 'geoOption_' . $this->__get('unique_id'));
$options_html .= '</div>';
$options_html .= '<div class="clearfloat"></div>' . '</fieldset>';
$options_html .= '<fieldset class="tblFooters">' . '<input type="submit" value="' . __('Go') . '" />' . '</fieldset>' . '</div>' . '</form>';
return $options_html;
}
示例2: PMA_getHtmlForAddUser
/**
* Get HTML for addUsersForm, This function call if isset($_REQUEST['adduser'])
*
* @param string $dbname database name
*
* @return string HTML for addUserForm
*/
function PMA_getHtmlForAddUser($dbname)
{
$html_output = '<h2>' . "\n" . Util::getIcon('b_usradd.png') . __('Add user account') . "\n" . '</h2>' . "\n" . '<form name="usersForm" id="addUsersForm"' . ' onsubmit="return checkAddUser(this);"' . ' action="server_privileges.php" method="post" autocomplete="off" >' . "\n" . PMA_URL_getHiddenInputs('', '') . PMA_getHtmlForLoginInformationFields('new');
$html_output .= '<fieldset id="fieldset_add_user_database">' . "\n" . '<legend>' . __('Database for user account') . '</legend>' . "\n";
$html_output .= Util::getCheckbox('createdb-1', __('Create database with same name and grant all privileges.'), false, false, 'createdb-1');
$html_output .= '<br />' . "\n";
$html_output .= Util::getCheckbox('createdb-2', __('Grant all privileges on wildcard name (username\\_%).'), false, false, 'createdb-2');
$html_output .= '<br />' . "\n";
if (!empty($dbname)) {
$html_output .= Util::getCheckbox('createdb-3', sprintf(__('Grant all privileges on database "%s".'), htmlspecialchars($dbname)), true, false, 'createdb-3');
$html_output .= '<input type="hidden" name="dbname" value="' . htmlspecialchars($dbname) . '" />' . "\n";
$html_output .= '<br />' . "\n";
}
$html_output .= '</fieldset>' . "\n";
if ($GLOBALS['is_grantuser']) {
$html_output .= PMA_getHtmlToDisplayPrivilegesTable('*', '*', false);
}
$html_output .= '<fieldset id="fieldset_add_user_footer" class="tblFooters">' . "\n" . '<input type="hidden" name="adduser_submit" value="1" />' . "\n" . '<input type="submit" id="adduser_submit" value="' . __('Go') . '" />' . "\n" . '</fieldset>' . "\n" . '</form>' . "\n";
return $html_output;
}