本文整理汇总了PHP中Input::setSize方法的典型用法代码示例。如果您正苦于以下问题:PHP Input::setSize方法的具体用法?PHP Input::setSize怎么用?PHP Input::setSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Input
的用法示例。
在下文中一共展示了Input::setSize方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Input
* [type] file
* [name] form_base.php
* [package] psa
* [since] 2010.09.22 -ok
*/
$inp_dir = new Input();
$inp_dir->setName('directory');
$inp_dir->setSize(50);
$inp_dir->setValue($result->directory);
$inp_ext = new Input();
$inp_ext->setName('extension');
$inp_ext->setSize(10);
$inp_ext->setValue($result->extension);
$inp_lines = new Input();
$inp_lines->setName('nr_rows');
$inp_lines->setSize(7);
$inp_lines->setValue($result->nr_rows);
$form = new Form();
$form->setAction('controller.php');
$form->build();
$table = new Table();
$table->build();
$tr = new Tr();
$tr->add('Directory : ');
$tr->add($inp_dir->dump());
$tr->add($cmd->dump());
$tr->build();
$tr = new Tr();
$tr->add('Extension : ');
$tr->add($inp_ext->dump());
$tr->build();
示例2: createFromResource
/**
* Create an input object from a stream resource / file pointer.
*
* Please note that the contentLength cannot be calcualted automatically unless you have a seekable stream resource.
*
* @param resource $resource The file pointer or stream resource
* @param int $contentLength The length of the content in bytes. Set to -1 for auto calculation.
* @param bool|string $md5sum The MD5 sum. null to auto calculate, false to never calculate.
* @param null|string $sha256sum The SHA256 sum. null to auto calculate.
*
* @return Input
*/
public static function createFromResource(&$resource, $contentLength, $md5sum = false, $sha256sum = null)
{
$input = new Input();
$input->setFp($resource);
$input->setSize($contentLength);
$input->setMd5sum($md5sum);
$input->setSha256($sha256sum);
return $input;
}
示例3: Input
$colname = $col[$i];
if ($colname == 'id') {
++$i;
continue;
}
// $length = strlen($item);
$size = 50;
/*
if($length < 10) {
$size = 10;
}
*/
$inp = new Input();
$inp->setName($colname);
$inp->setValue($item);
$inp->setSize(50);
$inp->setMaxlength(128);
/**/
$tr = new Tr();
$tr->add($colname);
$tr->add($inp->dump());
$tr->build();
++$i;
/**/
}
$tr = new Tr();
$tr->add(' ');
$tr->add($submit->dump());
$tr->build();
unset($table);
unset($form);
示例4: setcookie
/**/
setcookie('testcookie', time(), time() + 300);
header('location: controller.php');
exit;
/**/
}
}
$submit->setValue('Let\'s go');
$inp_naam = new Input();
$inp_naam->setName('name');
$inp_naam->setSize(20);
$inp_naam->setAutofocus(true);
$inp_pass = new Input();
$inp_pass->setName('geheim');
$inp_pass->setType('password');
$inp_pass->setSize(20);
$html = new Page();
$html->setLanguage('nl-nl');
$html->build();
$head = new Head();
$head->setTitle('PSA - login');
$head->setCss('./css/psa.css');
$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
$body->line('<h3>PHP SQLite Admin tool - log in</h3>');
$form = new Form();
$form->setAction('login.php');
$form->build();
$table = new Table();
示例5: Input
$form->setJs(' onsubmit="return PSA.indexcol();" ');
$form->build();
// TODO: check if table name already exists
$name = new Input();
$name->setName('idxname');
$name->setSize(50);
$name->setMaxlength(128);
$name->setId('idxname');
$body->line('Name : ' . $name->dump() . ' ' . $cmd->dump() . '<br>');
for ($i = 0; $i < sizeof($fields); ++$i) {
$select = new Select();
$select->setName('col' . $i);
$select->setSize(1);
$select->add('', '-');
for ($j = 0; $j < sizeof($fields); ++$j) {
$select->add($fields[$j], $fields[$j]);
}
$body->line('index on : ' . $select->dump() . '<br>');
}
$submit->build();
$tblname = new Input();
$tblname->setName('tblname');
$tblname->setSize(128);
$tblname->setValue($req->get('table'));
$tblname->setType('hidden');
$tblname->build();
unset($form);
$body->line('</div>');
include_once './inc/footer.php';
unset($body);
unset($html);
示例6: Input
$colprime->setType('checkbox');
$colprime->setId('colprime');
$colprime->setJs(' onclick="PSA.checkprimary();" ');
$colsize = new Input();
$colsize->setName('colsize');
$colsize->setSize(7);
$colsize->setMaxlength(7);
$colsize->setId('colsize');
$colsize->setJs(' onblur="PSA.checknumeric();" ');
$colnull = new Input();
$colnull->setName('colnull');
$colnull->setType('checkbox');
$colnull->setId('colnull');
$coldefault = new Input();
$coldefault->setName('coldefault');
$coldefault->setSize(25);
$coldefault->setMaxlength(128);
$coldefault->setId('coldefault');
$fieldadd = new Input();
$fieldadd->setType('button');
$fieldadd->setName('fieldadd');
$fieldadd->setValue('add');
$fieldadd->setJs(' onclick="PSA.addField();" ');
$tr = new Tr();
$tr->add($colname->dump());
$tr->add($coltype->dump());
$tr->setClas('center');
$tr->add($colprime->dump());
$tr->setClas('center');
$tr->add($colsize->dump());
$tr->setClas('center');
示例7: Page
}
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - connection');
$head->setCss('./css/psa.css');
$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$inp_db = new Input();
$inp_db->setName('newdb');
$inp_db->setSize(25);
$inp_db->setMaxlength(128);
$submit->setValue('Create');
$submit->setClas('button');
$cmd->setValue('create_db');
$form = new Form();
$form->setAction('controller.php');
$form->build();
$table = new Table();
$table->build();
$tr = new Tr();
$tr->add('New database : ');
$tr->add($inp_db->dump());
$tr->add($submit->dump());
$tr->add($cmd->dump());
$tr->build();