本文整理汇总了PHP中Forms::input方法的典型用法代码示例。如果您正苦于以下问题:PHP Forms::input方法的具体用法?PHP Forms::input怎么用?PHP Forms::input使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Forms
的用法示例。
在下文中一共展示了Forms::input方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: form
public function form()
{
$form = new Forms();
$form->start("barcodes.php");
$form->input("import new barcodes", "import", $type = "textarea", null, null, 10);
$form->button('import');
$form->end();
}
示例2: login_form
public function login_form($page)
{
global $html;
echo '<main class="container-fluid">';
echo "<div class='row login-panel'>";
echo "<div class='col-xs-12 col-sm-4 col-sm-offset-4 col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4 well'>";
//$html->title("Log on");
$form = new Forms();
$form->start($page);
$form->input("username");
$form->input("password");
echo "<div class='col-xs-12 text-center'>";
$form->button("logon");
$form->end();
echo "</div>";
echo "</div>";
echo "</div>";
}
示例3: Forms
$db->insert('products', 'user_id,last_edited,collection_id,name,sku', $_SESSION['userid'] . "||" . $_SESSION['userid'] . "||" . $_POST['collections'] . "||{$name}||{$sku}");
}
$num++;
}
}
$form = new Forms();
echo '<div class="row"><div class="col-md-6">';
$html->title('Data Merge Products', null, 'left');
echo '</div><div class="col-md-6 text-right">';
$form->button('Create Products', 'md', 'mass_products');
echo '</div></div>';
echo '<hr />';
$form->start('mass.php', false, 'mass_products');
echo '<div class="row"><div class="col-md-6 col-md-offset-3">';
$form->select('start', 'Lists', 'lists');
$lists = $db->select('lists');
foreach ($lists as $list) {
$form->select('option', $list['list_name'], $list['id']);
}
$form->select('end');
$form->select('start', 'Collections', 'collections');
$collections = $db->select('collections');
foreach ($collections as $collection) {
$form->select('option', $collection['name'], $collection['id']);
}
$form->select('end');
$form->input('Name', 'name');
$form->input('Sku Prefix', 'sku');
echo '</div></div>';
$form->end();
require_once 'footer.php';
示例4: foreach
}
// $pa = explode("\r\n\r\n", $ps);
foreach ($pa as $key => $pc) {
$pct = explode("":"", $pc);
$fa[$key]['ASIN'] = str_replace("","MYIService.Quantity", "", $pct[1]);
$fa[$key]['Qty'] = str_replace("","MYIService.Points", "", $pct[2]);
$fa[$key]['Price'] = str_replace("","MYIService.Sku", "", $pct[12]);
$fa[$key]['Sku'] = str_replace("","MYIService.Title", "", $pct[13]);
$fa[$key]['Name'] = str_replace("","MYIService.CurrencyCode", "", $pct[14]);
}
$fn = $_POST['filename'];
$file = new File("{$fn}.csv", "var/code-to-csv");
$headings = '"ASIN","Price","Sku","Name"';
$file->write_to_file($headings . "\n");
foreach ($fa as $key => $fp) {
if ($fp['Qty'] != 0) {
$text = '"' . $fp['ASIN'] . '",';
$text .= '"' . $fp['Price'] . '",';
$text .= '"' . $fp['Sku'] . '",';
$text .= '"' . $fp['Name'] . '"';
$file->write_to_file($text . "\n");
}
}
}
$form = new Forms();
$form->start("filter.php");
$form->input("filename", "filename");
$form->input("code", "code", "textarea");
$form->button("submit");
$form->end();
require_once 'footer.php';
示例5: isset
if ($displayForm) {
echo "<div id='page-title' class='row'>";
echo "<div class='col-xs-12 col-sm-6'>";
$html->title('Ship Item', null, "left");
echo "</div>";
echo "<div class='col-xs-12 col-sm-6 text-right'>";
$form->button("send", 'md', 'shipitem');
echo "</div>";
echo "</div>";
echo "<hr />";
$form->start('shipitem.php', false, 'shipitem');
echo '<div class="row">';
echo '<div class="col-md-4">';
echo '<div class="row">';
echo '<div class="col-md-6">';
$form->input('first name *', 'firstname', 'text', isset($_POST['firstname']) ? $_POST['firstname'] : '', null, null, isset($fieldErrors['firstname']));
echo '</div>';
echo '<div class="col-md-6">';
$form->input('surname *', 'lastname', 'text', isset($_POST['lastname']) ? $_POST['lastname'] : '', null, null, isset($fieldErrors['lastname']));
echo '</div>';
echo '</div>';
$form->input('reference *', 'reference', 'text', isset($_POST['reference']) ? $_POST['reference'] : '', null, null, isset($fieldErrors['reference']));
echo '<div class="row">';
echo '<div class="col-md-6">';
$form->input('weight *', 'weight', 'text', isset($_POST['weight']) ? $_POST['weight'] : '', null, null, isset($fieldErrors['weight']));
echo '</div>';
echo '<div class="col-md-6">';
$form->input('value', null, 'currency', isset($_POST['value']) ? $_POST['value'] : '', null, null, isset($fieldErrors['value']));
echo '</div>';
echo '</div>';
$form->input('email');
示例6: Forms
}
// instanciation d'un Formulaire
$form = new Forms('Adrien LOUGE');
// valeur Champs
$arrayInputs = ['Nom', 'Prénom', 'Age', 'ville', 'Nationalité', 'Pays', 'Job', 'CP', 'Niveau d\'étude', 'others'];
$size = ['1', '2', '3'];
$freetime = ['sport', 'lecture', 'other ...'];
$sexe = ['M', 'F'];
$arrayTextareas = ['description', 'Je ne sais pas'];
$arrayCheckbox = ['1', '2', '3', '4', '5'];
$arrayRadio = ['Truc1', 'Truc2', 'Truc3', 'Truc4', 'Truc5'];
// initiation du Form
echo $form->initForm();
// Input
foreach ($arrayInputs as $arrayInput) {
echo $form->input($arrayInput);
}
// select
echo $form->select('loisirs', $freetime);
echo $form->select('taille', $size);
echo $form->select('Sexe', $sexe);
// checkbox
echo $form->checkbox('Les Trucs', $arrayCheckbox);
echo $form->bpRadio('Un Truc', $arrayRadio);
// Textarea
foreach ($arrayTextareas as $arrayTextarea) {
echo $form->textarea($arrayTextarea);
}
// button
echo $form->buttons('resset');
echo $form->buttons('submit');
示例7:
$db->update("settings", "company,building,street,town,county,zip,name,telephone,email,pod_email,dAccount,dPassword,iAccount,iPassword,netdepatch_id", "{$company}||{$building}||{$street}||{$town}||{$county}||{$zip}||{$name}||{$telephone}||{$email}||{$pod_email}||{$dAccount}||{$dPassword}||{$iAccount}||{$iPassword}||{$netdepatch_id}", 1);
$api->shipReady();
$html->redirection("shipping.php");
} else {
$form->start("shipping.php", false, 'shippingForm');
echo "<div class='row'>";
echo "<div class='col-xs-12 col-sm-4'>";
// if (is_file('../ebay/img/logo.png'))
// {
// echo '<img src="../ebay/img/logo.png" alt="" class="img-responsive">';
// }
// else if (is_file('../ebay/img/logo.jpg'))
// {
// echo '<img src="../ebay/img/logo.jpg" alt="" class="img-responsive">';
// }
$form->input("NetDespatch ID", "netdepatch_id", "text", $_SESSION['settings']['netdepatch_id']);
$form->input("Domestic Account", "dAccount", "text", $_SESSION['settings']['dAccount']);
$form->input("Domestic Password", "dPassword", "password", $_SESSION['settings']['dPassword']);
$form->input("International Account", "iAccount", "text", $_SESSION['settings']['iAccount']);
$form->input("International Password", "iPassword", "password", $_SESSION['settings']['iPassword']);
echo "</div>";
echo "<div class='col-xs-12 col-sm-4'>";
$form->input("name", "name", "text", $_SESSION['settings']['name']);
$form->input("telephone", "telephone", "text", $_SESSION['settings']['telephone']);
$form->input("email", "email", "text", $_SESSION['settings']['email']);
$form->input("POD email", "pod_email", "text", $_SESSION['settings']['pod_email']);
echo "</div>";
echo "<div class='col-xs-12 col-sm-4'>";
$form->input("company", "company", "text", $_SESSION['settings']['company']);
$form->input("building", "building", "text", $_SESSION['settings']['building']);
$form->input("street", "street", "text", $_SESSION['settings']['street']);
示例8: collection
public function collection()
{
global $db;
$results = $db->select("settings", null, "barcodes", 1);
$settings['site']['barcodes'] = $results['barcodes'];
$results = $db->select("collections", null, "id,name,barcodes", null, "name");
$form = new Forms();
$form->start("import.php?step=3", false, "step-3");
echo "<div class='row'>";
echo "<div class='col-xs-12 col-sm-10'>";
$form->selectLive("collections");
foreach ($results as $key => $collection) {
$bc = null;
if ($collection['barcodes'] and $settings['site']['barcodes']) {
$bc = " (Expects Barcodes)";
}
$form->select("option", $collection['name'] . $bc, $collection['id']);
}
$form->select("end");
echo "</div>";
echo "<div class='col-xs-12 col-sm-2'>";
$form->input("barcode overide", "bco", "toggle", 0);
echo "</div>";
echo "</div>";
$form->end();
}
示例9: isset
if (isset($_POST['submit'])) {
$brand = $_POST['brand'];
$debug = isset($_POST['debug']) ? 1 : 0;
$filenames = isset($_POST['filenames']) ? 1 : 0;
$flux = isset($_POST['flux']) ? 1 : 0;
$barcodes = isset($_POST['barcodes']) ? 1 : 0;
$new_descriptions = isset($_POST['new_descriptions']) ? 1 : 0;
$shipping_api = isset($_POST['shipping_api']) ? 1 : 0;
$shipmentToMage = isset($_POST['shipmentToMage']) ? 1 : 0;
$db->update("settings", "brand,debug,filenames,flux,barcodes,new_descriptions,shipping_api,shipmentToMage", "{$brand}||{$debug}||{$filenames}||{$flux}||{$barcodes}||{$new_descriptions}||{$shipping_api}||{$shipmentToMage}", 1);
$html->redirection("settings.php");
} else {
$form->start("settings.php", false, 'settingsForm');
echo "<div class='row'>";
echo "<div class='col-xs-12 col-sm-2'>";
$form->input("debug mode", "debug", "toggle", $settings['debug']);
echo "</div>";
echo "<div class='col-xs-12 col-sm-2'>";
$form->input("filenames mode", "filenames", "toggle", $settings['filenames']);
echo "</div>";
echo "<div class='col-xs-12 col-sm-2'>";
$form->input("flux mode", "flux", "toggle", $settings['flux']);
echo "</div>";
echo "<div class='col-xs-12 col-sm-2'>";
$form->input("barcodes", "barcodes", "toggle", $settings['barcodes']);
echo "</div>";
echo "<div class='col-xs-12 col-sm-2'>";
$form->input("new description system", "new_descriptions", "toggle", $settings['new_descriptions']);
echo "</div>";
echo "<div class='col-xs-12 col-sm-2'>";
$form->input("Shipping API", "shipping_api", "toggle", $settings['shipping_api']);
示例10: isset
<div class="col-sm-10">
<input value="<?php
echo isset($_POST['email']) ? $_POST['email'] : '';
?>
" type="email" class="form-control" name="email" placeholder="Entrez votre adresse email">
</div>
</div>
<div class="form-group">
<label for="" class="col-sm-2 control-label">Mot de passe</label>
<div class="col-sm-10">
<input type="password" class="form-control" name="password" placeholder="Entrez votre mot de passe">
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-2">
<input type="password" class="form-control" name="password_verif" placeholder="Entrez votre mot de passe à nouveau">
</div>
</div>
<?php
echo Forms::input('picture', null, 'Photo');
?>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Je m'inscris</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
示例11: form
public function form()
{
global $db, $html, $settings;
$form = new Forms();
if ($_GET['p'] != "add") {
$modal = new Modal();
$modal->start("delete", $this->name);
echo "Are you sure you want to delete this product?";
$modal->end("delete", "products.php?c={$this->collection_id}&d={$this->product_id}" . (isset($_GET['f']) ? "&f=" . $_GET['f'] : ''));
$modal->form = true;
$modal->start("move", $this->name, "products.php?c={$this->collection_id}&move={$this->product_id}");
$collections = $db->select("collections", null, "id,name,barcodes", null, "name");
$form->select("start", "collection_id");
foreach ($collections as $key => $collection) {
if ($collection['id'] != $_GET['c']) {
$form->select("option", $collection['name'], $collection['id']);
}
}
$form->select("end");
$modal->end("move", "products.php?c={$this->collection_id}&move={$this->product_id}");
}
$form->start("products.php?c={$this->collection_id}&p={$this->product_id}" . (isset($_GET['f']) ? "&f=" . $_GET['f'] : ''));
echo "<div class='col-xs-12 col-md-6 text-right'>";
$html->button("products.php?c={$this->collection_id}" . (isset($_GET['f']) ? "&f=" . $_GET['f'] : ''), "back", "default");
$html->button("products.php?c={$this->collection_id}&p={$this->product_id}" . (isset($_GET['f']) ? "&f=" . $_GET['f'] : ''), "reset", "warning");
if ($db->is_admin() and $settings['collection']['variation_ids'] == null) {
$html->button("barcodes.php?p={$this->product_id}", "new barcode", "warning");
}
if ($_GET['p'] != "add") {
$modal->button("delete");
$modal->button("move");
}
$form->button("save");
echo "</div>";
echo "</div>";
echo "<hr />";
$collection = $db->select("collections", "id={$this->collection_id}", "*", 1);
switch ($_GET['p']) {
case 'add':
$form->input("user_id", null, "text", $_SESSION['userid'], true);
break;
default:
$form->input("id", null, "text", $this->product_id, true);
$form->input("user_id", null, "text", $this->owner_id, true);
break;
}
$form->input("barcode", null, "text", isset($this->barcode) ? $this->barcode : '', true);
$form->input("name", null, "text", $this->name, null, null, null, true, true);
echo "<div class='row'>";
echo "<div class='col-xs-12 col-sm-4'>";
$form->input("sku", null, "text", $this->sku);
echo "</div>";
echo "<div class='col-xs-12 col-sm-4'>";
$form->input("price", null, "currency", $this->price, $collection['price_overide_toggle']);
echo "</div>";
echo "<div class='col-xs-12 col-sm-4'>";
$form->input("asin", null, "text", $this->asin);
echo "</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col-xs-12 col-sm-6'>";
$form->input("bullet 1", "amz_bullet_1", "text", $this->amz_bullet_1, $collection['amz_toggle_1']);
$form->input("bullet 2", "amz_bullet_2", "text", $this->amz_bullet_2, $collection['amz_toggle_2']);
$form->input("bullet 3", "amz_bullet_3", "text", $this->amz_bullet_3, $collection['amz_toggle_3']);
$form->input("bullet 4", "amz_bullet_4", "text", $this->amz_bullet_4, $collection['amz_toggle_4']);
$form->input("bullet 5", "amz_bullet_5", "text", $this->amz_bullet_5, $collection['amz_toggle_5']);
echo "</div>";
echo "<div class='col-xs-12 col-sm-6'>";
$form->input("search 1", "amz_search_1", "text", $this->amz_search_1, $collection['amz_stoggle_1']);
$form->input("search 2", "amz_search_2", "text", $this->amz_search_2, $collection['amz_stoggle_2']);
$form->input("search 3", "amz_search_3", "text", $this->amz_search_3, $collection['amz_stoggle_3']);
$form->input("search 4", "amz_search_4", "text", $this->amz_search_4, $collection['amz_stoggle_4']);
$form->input("search 5", "amz_search_5", "text", $this->amz_search_5, $collection['amz_stoggle_5']);
echo "</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col-xs-12'>";
$form->input("description", "description", "textarea", isset($this->description) ? $this->description : null, null, 5);
echo "</div>";
echo "</div>";
$form->end();
}
示例12:
}
echo '</textarea>';
echo '</div>';
echo '</div>';
}
} else {
echo "<div class='col-xs-12 col-sm-6 text-right\t'>";
$html->button("royalmail.php", "back", "default");
$form->button('Cancel Post', 'md', 'cancel_order_form', 'danger');
echo "</div>";
echo "</div>";
echo "<hr />";
$label = $db->select('royal_mail', "`reference` = '" . $_GET['ref'] . "'", '*', 1);
$form->start("royalmail.php?ref=" . $_GET['ref'] . "&api=" . $_GET['api'], false, "cancel_order_form");
echo '<div class="col-md-6">';
$form->input('id', 'id', 'text', $label['id'], true);
$form->input('Magento Reference #', 'mage_ref', 'text', $_GET['ref']);
$form->input('NetDespatch Unique Reference', 'unique_ref', 'text', $label['uniqueRef']);
$form->input('Account', 'account', 'text', $label['account']);
echo '</div>';
echo '<div class="col-md-6">';
$form->input('Reason for cancelling', 'whyCancel', 'textarea', null, null, 8);
echo '</div>';
$form->end();
}
}
} else {
if (isset($_GET['hide'])) {
$db->update('royal_mail', 'hide', 1, $_GET['hide']);
$html->redirection('royalmail.php');
} else {
示例13: form
public function form($id)
{
$form = new Forms();
$form->start("collections.php?c={$id}", false, "collection_form");
echo "<div class='row'>";
echo "<div class='col-xs-12 col-sm-6'>";
$form->input("id", null, "text", $this->collection_id, true);
$form->input("user_id", null, "text", $this->owner_id, true);
$form->input("name", null, "text", $this->name);
$form->input("category", null, "text", $this->category);
if ($_SESSION['settings']['filenames']) {
$form->input("filename prefix", "filename_prefix", "text", $this->filename_prefix);
$form->input("file directory", "file_directory", "text", $this->file_directory);
} else {
$form->input("filename prefix", "filename_prefix", "text", $this->filename_prefix, true);
$form->input("file directory", "file_directory", "text", $this->file_directory, true);
$form->input("attribute set", "attribute_set", "text", $this->attribute_set);
}
echo "</div>";
echo "<div class='col-xs-12 col-sm-6'>";
echo "<div class='row'>";
if ($_SESSION['settings']['shipping_api']) {
echo "<div class='col-xs-5'>";
$form->select('start', 'postage', 'postage', $this->postage);
$form->select('option', 'Letter', '1', $this->postage);
$form->select('option', 'Large Letter', '2', $this->postage);
$form->select('option', 'Package', '3', $this->postage);
$form->select('end');
echo "</div>";
echo "<div class='col-xs-5'>";
} else {
echo "<div class='col-xs-10'>";
}
$form->input("price", null, "currency", $this->price);
echo "</div>";
echo "<div class='col-xs-2 col-sm-2 col-md-2 col-lg-2'>";
$form->input("override", "price_overide_toggle", "toggle", $this->price_toggle);
echo "</div>";
echo "</div>";
$form->input("weight", null, "text", $this->weight);
$form->input("product suffix", "product_suffix", "text", $this->product_suffix);
if ($_SESSION['settings']['filenames']) {
$form->input("attribute set", "attribute_set", "text", $this->attribute_set);
}
echo "</div>";
echo "</div>";
echo "<div class='row'>";
if ($_SESSION['settings']['flux']) {
echo "<div class='col-xs-12 col-sm-2'>";
$form->input("flux products", "flux", "toggle", $this->flux);
echo "</div>";
}
if ($_SESSION['settings']['barcodes']) {
echo "<div class='col-xs-12 col-sm-2'>";
$form->input("add barcodes", "barcodes", "toggle", $this->barcodes);
echo "</div>";
}
echo "</div>";
echo "<div class='row'>";
echo "<div class='col-xs-12 col-sm-6'>";
$form->input("website description", "web_desc", "textarea", $this->web_desc, $_SESSION['settings']['new_descriptions'] ? null : true, 4);
$form->input("amazon description", "amz_desc", "textarea", $this->amz_desc, null, $_SESSION['settings']['new_descriptions'] ? 5 : 12);
echo "</div>";
echo "<div class='col-xs-12 col-sm-6'>";
$form->input("ebay description", "ebay_desc", "textarea", $this->ebay_desc, null, 12);
echo "</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col-xs-12 col-sm-6'>";
echo "<div class='row'>";
echo "<div class='col-xs-10 col-sm-10 col-md-10 col-lg-10'>";
$form->input("bullet point 1", "amz_bullet_1", "text", $this->amz_bullet_1);
echo "</div>";
echo "<div class='col-xs-2 col-sm-2 col-md-2 col-lg-2'>";
$form->input("override", "amz_toggle_1", "toggle", $this->amz_toggle_1);
echo "</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col-xs-10 col-sm-10 col-md-10 col-lg-10'>";
$form->input("bullet point 2", "amz_bullet_2", "text", $this->amz_bullet_2);
echo "</div>";
echo "<div class='col-xs-2 col-sm-2 col-md-2 col-lg-2'>";
$form->input("override", "amz_toggle_2", "toggle", $this->amz_toggle_2);
echo "</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col-xs-10 col-sm-10 col-md-10 col-lg-10'>";
$form->input("bullet point 3", "amz_bullet_3", "text", $this->amz_bullet_3);
echo "</div>";
echo "<div class='col-xs-2 col-sm-2 col-md-2 col-lg-2'>";
$form->input("override", "amz_toggle_3", "toggle", $this->amz_toggle_3);
echo "</div>";
echo "</div>";
echo "<div class='row'>";
echo "<div class='col-xs-10 col-sm-10 col-md-10 col-lg-10'>";
$form->input("bullet point 4", "amz_bullet_4", "text", $this->amz_bullet_4);
echo "</div>";
echo "<div class='col-xs-2 col-sm-2 col-md-2 col-lg-2'>";
$form->input("override", "amz_toggle_4", "toggle", $this->amz_toggle_4);
echo "</div>";
//.........这里部分代码省略.........
示例14: Forms
echo "</div>";
echo "<div id='step-3-bar' class='progress-bar progress-bar-info' style='width: 33%'>";
echo "<span>Step 3</span>";
echo "</div>";
echo "</div>";
echo "</div>";
echo "</div>";
$form = new Forms();
$form->start("upload.php", false, "upload");
echo "<div class='row'>";
echo "<div class='col-xs-12 col-sm-6 form-group' id='ebay_info'>";
if (isset($_GET['usr'])) {
$ebay_user = $_GET['usr'];
$user = $db->select("users", "`username` = '{$ebay_user}'", '*', 1);
if (!$user) {
$form->input("Customer Name *", "ebay_u", "text", $ebay_user);
} else {
echo "<p>Your eBay username has been input into the form successfully. Please confirm details below</p>";
$form->input("EBAY Username *", "ebay_u", "text", $ebay_user);
}
} else {
$form->input("Full Name *", "ebay_u", "text");
}
if (isset($_GET['odr'])) {
$ebay_order = $_GET['odr'];
$order = $db->select("orders", "`name` = '{$ebay_order}'", '*', 1);
if (!$user) {
$form->input("Order #/Name", "ebay_order", "text", $ebay_order);
} else {
$form->input("EBAY Order #", "ebay_order", "text", $ebay_order);
}