本文整理汇总了PHP中html::checkbox方法的典型用法代码示例。如果您正苦于以下问题:PHP html::checkbox方法的具体用法?PHP html::checkbox怎么用?PHP html::checkbox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类html
的用法示例。
在下文中一共展示了html::checkbox方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sign_up_sign_in
public static function sign_up_sign_in($url)
{
// TODO: add sign in as guest.
$dropdown_content = array('class' => 'dropdown-menu', 'style' => 'padding: 15px; padding-bottom: 0px;');
$form = array('method' => 'post', 'action' => $url, 'accept-charset' => 'UTF-8');
$username = array('type' => 'text', 'placeholder' => 'Username', 'id' => 'username', 'name' => 'username');
$password = array('type' => 'password', 'placeholder' => 'Password', 'id' => 'password', 'name' => 'password');
$submit = array('value' => 'Sign In', 'class' => 'btn btn-primary btn-block', 'id' => 'sign-in');
return html::ul('nav pull-right', html::li(html::a(new moodle_url('/login/signup.php'), 'Sign Up')) . bootstrap::list_divider() . bootstrap::dropdown('Sign In', html::div($dropdown_content, html::form($form, html::input($username) . html::input($password) . html::checkbox('rememberusername', 'Remember username') . html::submit($submit)))));
}
示例2: foreach
<div class='panel'>
<?php
if ($type == 'byApp') {
?>
<div class='panel-heading'>
<strong><?php
echo $lang->group->priv;
?>
</strong>
</div>
<div class='panel-body'>
<?php
foreach ($rights as $code => $right) {
?>
<div class='group-item'><?php
echo html::checkbox('groups', array($code => $right['name']), $right['right'] == '1' ? $code : '');
?>
</div>
<?php
}
?>
</div>
<?php
}
?>
<div class='panel-footer text-center'>
<?php
echo html::submitButton();
echo html::backButton();
echo html::hidden('foo');
// Just a var, to make sure $_POST is not empty.
示例3: foreach
</td>
</tr>
<tr>
<th class='rowhead'><?php
echo $lang->group->outside;
echo html::selectAll('other', 'checkbox');
?>
</th>
<td id='other' class='f-14px pv-10px'><?php
$i = 1;
?>
<?php
foreach ($otherUsers as $account => $realname) {
?>
<div class='w-p10 f-left'><?php
echo '<span>' . html::checkbox('members', array($account => $realname), '') . '</span>';
?>
</div>
<?php
if ($i % 8 == 0) {
echo "<div class='c-both'></div>";
}
$i++;
?>
<?php
}
?>
</td>
</tr>
<tr>
<th class='rowhead'></th>
示例4: empty
?>
</div>
</td>
</tr>
<tr>
<th><?php
echo $lang->story->reviewedBy;
?>
</th>
<td>
<div class='input-group'>
<?php
echo html::select('assignedTo', $users, empty($needReview) ? $product->PO : '', "class='form-control chosen'");
?>
<span class='input-group-addon'><?php
echo html::checkbox('needNotReview', $lang->story->needNotReview, '', "id='needNotReview' {$needReview}");
?>
</span>
</div>
</td>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php
echo $lang->story->estimate;
?>
</span>
<?php
echo html::input('estimate', $estimate, "class='form-control'");
?>
<span class='input-group-addon'><?php
echo $lang->story->hour;
示例5: yesno
});
function yesno() {
if (confirm("确定要发送吗?")) {
return true;
} else {
return false;
}
}
</script>
<form method='post' enctype='multipart/form-data' target='hiddenwin' id='dataform'>
<table align='center' class='table-1 a-left'>
<tr style="display: none">
<th class='rowhead'>发送给</th>
<td><?php
echo html::checkbox('assignedTo', $members, implode(",", array_keys($members)));
?>
</td>
</tr>
<tr style="display: none">
<th class='rowhead'><?php
echo $lang->task->mailto;
?>
</th>
<td> <?php
echo html::input('mailto', '', 'class=text-1');
?>
</td>
</tr>
示例6:
*/
include '../../common/view/header.html.php';
?>
<div class='container mw-600px'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php
echo html::icon($lang->icons['project']);
?>
</span>
<strong><?php
echo $lang->project->manageChilds;
?>
</strong>
</div>
</div>
<form method='post'>
<table align='center' class='table table-form'>
<tr>
<td>
<?php
echo html::checkbox("childs", $projects, $childProjects);
?>
</td>
</tr>
<tr><td class='text-center'><input type='submit' name='submit' class='btn btn-primary' /></td></tr>
</table>
</form>
</div>
<?php
include '../../common/view/footer.html.php';
示例7: nl2br
?>
</th>
<td colspan='2'><?php
echo nl2br(html::radio('acl', $lang->project->aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));
?>
</td>
</tr>
<tr id='whitelistBox' <?php
if ($project->acl != 'custom') {
echo "class='hidden'";
}
?>
>
<th><?php
echo $lang->project->whitelist;
?>
</th>
<td colspan='2' id='whitelistBox'><?php
echo html::checkbox('whitelist', $groups, $project->whitelist);
?>
</td>
</tr>
<tr><td></td><td colspan='2'><?php
echo html::submitButton() . html::backButton();
?>
</td></tr>
</table>
</form>
</div>
<?php
include '../../common/view/footer.html.php';
示例8: implode
?>
</td><td></td>
</tr>
<?php
$class = $user->admin == 'common' ? '' : 'hide';
?>
<tr class="groups <?php
echo $class;
?>
">
<th><?php
echo $lang->user->privilege;
?>
</th>
<td><?php
echo html::checkbox('groups', $groups, implode(',', $user->groups));
?>
</td>
</tr>
<tr>
<th><?php
echo $lang->user->email;
?>
</th>
<td><?php
echo html::input('email', $user->email, "class='form-control'");
?>
</td><td></td>
</tr>
<tr>
<th><?php
示例9: isset
<td class='w-100px'><?php
echo $g->id == $group->id ? $lang->sales->currentGroup : $g->name;
?>
</td>
<td class='w-60px'>
<?php
$value = "{$account}_{$g->id}";
$checked = isset($privs[$account][$g->id]['view']) ? $value : '';
echo html::checkbox('privs_view', array($value => $lang->sales->viewTip), $checked);
?>
</td>
<td class='w-60px'>
<?php
$value = "{$account}_{$g->id}";
$checked = isset($privs[$account][$g->id]['edit']) ? $value : '';
echo html::checkbox('privs_edit', array($value => $lang->sales->editTip), $checked);
?>
</td>
</tr>
<?php
}
?>
</table>
</div>
<?php
}
?>
</div>
</td>
</tr>
<tr>
示例10: array
echo $lang->user->password;
?>
</th>
<td><?php
echo html::password('password', '', "class='form-control' placeholder='{$lang->user->inputPassword}'");
?>
</td>
</tr>
<tr>
<th></th>
<td>
<?php
echo html::submitButton($lang->login) . html::hidden('referer', $referer);
?>
<?php
echo html::checkbox('keepLogin', array('on' => $lang->user->keepLogin));
?>
</td>
</tr>
</table>
</div>
</div>
</form>
</div>
</div>
<div class='notice text-center'>
</div>
</div>
<?php
if ($config->debug) {
js::import($jsRoot . 'jquery/form/min.js');
示例11: foreach
//$column['key w30 center'] = '索引';
$column['name'] = '字段名称';
$column['type w150'] = '字段类型';
//$column['null w50'] = '空值';
//$column['default w100'] = '默认值';
//$column['comment'] = '注释';
$column['manage pri'] = '主键';
$column['manage index'] = '索引';
$column['manage unique'] = '唯一';
$column['manage fulltext'] = '全文';
$column['manage edit'] = '修改';
$column['manage delete'] = '删除';
table::header('list', $column);
foreach ($fields as $field) {
$column = array();
$column['select'] = html::checkbox(array('name' => 'id[]', 'class' => 'select'));
//$column['key w30 center'] = '<span class="'.$field['key'].'">'.$field['key'].'</span>';
$column['name'] = '<a href="' . zotop::url('database/field/edit', array('table' => $tablename, 'field' => $field['name'])) . '" title="注释:' . $field['comment'] . ' 默认:' . $field['default'] . ' 空值:' . $field['null'] . ' 整理:' . $field['collation'] . '"><b class="' . $field['key'] . '">' . $field['name'] . '</b></a><h5>' . $field['comment'] . '</h5>';
$column['type w150'] = $field['type'] . (empty($field['length']) ? '' : '(' . $field['length'] . ')');
//$column['null w50'] = $field['null'];
//$column['default w100'] = $field['default'];
//$column['comment'] = $field['comment'];
$column['manage pri'] = '<a href="' . zotop::url('database/field/primaryKey', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>确定要将该字段设置为主键?</h2>\'}">主键</a>';
$column['manage index'] = '<a href="' . zotop::url('database/field/addIndex', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>确定要索引该字段?</h2>\'}">索引</a>';
$column['manage unique'] = '<a href="' . zotop::url('database/field/unique', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>确定要将该字段设置为唯一?</h2>\'}">唯一</a>';
if (stripos((string) $field['type'], 'varchar') !== false || stripos((string) $field['type'], 'text') !== false) {
$column['manage fulltext'] = '<a href="' . zotop::url('database/field/fulltext', array('table' => $tablename, 'field' => $field['name'])) . '" class="confirm {content:\'<h2>确定要将该字段设置为全文索引?</h2>\'}">全文</a>';
} else {
$column['manage fulltext'] = '<a class="disabled">全文</a>';
}
$column['manage edit'] = '<a href="' . zotop::url('database/field/edit', array('table' => $tablename, 'field' => $field['name'])) . '" class="dialog">修改</a>';
示例12:
include './header.html.php';
include '../../common/view/kindeditor.html.php';
?>
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table class='table-1'>
<caption><?php
echo $lang->story->change;
?>
</caption>
<tr>
<th class='rowhead'><?php
echo $lang->story->reviewedBy;
?>
</th>
<td><?php
echo html::select('assignedTo', $users, $story->assignedTo, 'class="select-3"') . html::checkbox('needNotReview', $lang->story->needNotReview, '', "id='needNotReview'");
?>
</td>
</tr>
<tr>
<th class='rowhead'><?php
echo $lang->story->title;
?>
</th>
<td><?php
echo html::input('title', $story->title, 'class="text-1"');
?>
</td>
</tr>
<tr>
<th class='rowhead'><?php
示例13: array
<?php
$this->header();
$this->top();
$this->navbar();
form::header();
form::field(array('type' => 'hidden', 'label' => zotop::t('日志编号'), 'name' => 'id', 'value' => $data['id'], 'description' => zotop::t('')));
form::field(array('type' => 'html', 'label' => '', 'name' => 'option', 'value' => ' ' . html::checkbox(array('name' => 'link', 'label' => zotop::t('转向链接'), 'value' => '1', 'checked' => (bool) $data['link'])) . ' '));
form::field(array('type' => 'title', 'label' => zotop::t('日志标题'), 'name' => 'title', 'class' => 'long', 'value' => $data['title'], 'style' => $data['style'], 'valid' => 'required:true', 'description' => zotop::t('')));
form::field(array('type' => 'image', 'label' => zotop::t('标题图片'), 'name' => 'image', 'class' => 'long', 'value' => $data['image'], 'description' => zotop::t('')));
form::field(array('type' => 'text', 'label' => zotop::t('转向链接'), 'name' => 'url', 'class' => 'long', 'value' => $data['url'], 'display' => 'none', 'description' => zotop::t('填写此项后,页面将直接跳转到链接地址页面,链接地址必须以<b>http://</b>开头')));
form::field(array('type' => 'editor', 'label' => zotop::t('日志内容'), 'name' => 'content', 'class' => 'long', 'value' => $data['content']));
form::field(array('type' => 'textarea', 'label' => zotop::t('日志摘要'), 'name' => 'description', 'class' => 'long', 'value' => $data['description'], 'valid' => 'maxlength:255', 'description' => zotop::t('')));
form::field(array('type' => 'keywords', 'label' => zotop::t('日志标签'), 'name' => 'keywords', 'class' => 'long', 'value' => $data['keywords'], 'valid' => '', 'description' => zotop::t('多个标签请用空格分开')));
form::field(array('type' => 'select', 'options' => arr::hashmap($categorys, 'id', 'title'), 'label' => zotop::t('日志类别'), 'name' => 'categoryid', 'value' => (int) $data['categoryid'], 'valid' => 'required:true', 'description' => zotop::t('')));
block::header(array('title' => '<span class="zotop-icon"></span>高级设置', 'class' => 'collapsed'));
form::field(array('type' => 'text', 'label' => zotop::t('日志权重'), 'name' => 'order', 'value' => (int) $data['order'], 'valid' => 'required:true,number:true', 'description' => zotop::t('日志权重参数,数字较大者排在较前位置')));
form::field(array('type' => 'radio', 'options' => $status, 'label' => zotop::t('日志状态'), 'name' => 'status', 'value' => (int) $data['status'], 'description' => zotop::t('')));
form::field(array('type' => 'radio', 'options' => array(0 => '允许评论', -1 => '禁止评论'), 'label' => zotop::t('日志评论'), 'name' => 'comment', 'value' => (int) $data['comment'], 'description' => zotop::t('')));
block::footer();
form::buttons(array('type' => 'submit', 'value' => '保存'), array('type' => 'back'));
form::footer();
?>
<script type="text/javascript">
//转向链接
$(function(){
showlink($("input[name=link]").is(":checked"));
$("input[name=link]").click(function(){
showlink($(this).is(":checked"))
})
})
示例14: onDefault
public function onDefault()
{
$db = zotop::db();
$host = $db->config('hostname');
$dbName = $db->config('database');
$dbVersion = $db->version(true);
$dbSize = $db->size();
$tables = zotop::db()->tables(true);
$header['title'] = '数据库管理:' . $dbName;
page::header($header);
page::add('<div id="page" class="clearfix">');
page::add('<div id="side">');
block::header('数据库基本信息');
table::header();
table::row(array('w60' => '数据库主机', '2' => '' . $host . ''));
table::row(array('w60' => '数据库名称', '2' => '' . $dbName . ''));
table::row(array('w60' => '数据库版本', '2' => '' . $dbVersion . ''));
table::row(array('w60' => '数据库大小', '2' => '<b>' . $dbSize . '</b> '));
table::row(array('w60' => '数据表个数', '2' => '<b>' . count($tables) . '</b> 个'));
table::footer();
block::footer();
block::header('创建数据表');
form::header(array('action' => zotop::url('database/table/create'), 'template' => 'div'));
form::field(array('type' => 'text', 'name' => 'tablename', 'label' => zotop::t('表名称'), 'style' => 'width:180px', 'valid' => '{required:true}', 'description' => '不含前缀,系统会自动加上前缀'));
form::buttons(array('type' => 'submit', 'value' => '创建'));
form::footer();
block::footer();
page::add('</div>');
page::add('<div id="main">');
page::top();
page::navbar($this->navbar(), 'tables');
//zotop::dump($tables);
form::header(array('class' => 'list', 'action' => zotop::url('database/table/action')));
$column['select'] = html::checkbox(array('name' => 'table', 'class' => 'selectAll'));
$column['name'] = '数据表名称';
$column['size w60'] = '大小';
$column['Rows w60'] = '记录数';
$column['Engine w60'] = '类型';
$column['Collation w100'] = '整理';
$column['manage view w60'] = '浏览';
$column['manage delete'] = '删除';
page::add('<div style="height:400px;">');
table::header('list', $column);
foreach ($tables as $table) {
$column = array();
$column['select'] = html::checkbox(array('name' => 'table[]', 'value' => $table['name'], 'class' => 'select'));
$column['name'] = '<a href="' . url::build('database/field/default', array('tablename' => $table['name'])) . '"><b>' . $table['name'] . '</b></a><h5>' . $table['comment'] . '</h5>';
$column['size w60'] = (string) format::byte($table['size']);
$column['Rows w60'] = $table['rows'];
$column['Engine w60'] = $table['engine'];
$column['collation w100'] = $table['collation'];
$column['manage view w60'] = '<a href="' . url::build('database/table/edit', array('tablename' => $table['name'])) . '">设置</a>';
$column['manage delete'] = '<a href="' . url::build('database/table/delete', array('tablename' => $table['name'])) . '" class="confirm">删除</a>';
table::row($column, 'select');
}
table::footer();
page::add('</div>');
form::buttons(array('type' => 'select', 'name' => 'operation', 'style' => 'width:180px', 'options' => array('optimize' => '优化', 'delete' => '删除'), 'value' => 'check'), array('type' => 'submit', 'value' => '执行操作'));
form::footer();
page::bottom();
page::add('</div>');
page::add('</div>');
page::footer();
}
示例15: foreach
echo html::a('javascript:void(0)', $lang->entry->createKey, 'onclick="createKey()"');
?>
</span></td>
</tr>
<tr>
<th><?php
echo $lang->entry->priv;
?>
</th>
<td>
<div class='input-group'>
<?php
foreach ($groups as $id => $name) {
?>
<span class='checkbox-group'><?php
echo html::checkbox('groups', array($id => $name), '');
?>
</span>
<?php
}
?>
</div>
</td>
<td></td>
</tr>
<tr>
<th></th><td><?php
echo html::submitButton() . html::backButton();
?>
</td><td></td>
</tr>