当前位置: 首页>>代码示例>>PHP>>正文


PHP Forms::button方法代码示例

本文整理汇总了PHP中Forms::button方法的典型用法代码示例。如果您正苦于以下问题:PHP Forms::button方法的具体用法?PHP Forms::button怎么用?PHP Forms::button使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Forms的用法示例。


在下文中一共展示了Forms::button方法的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();
 }
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:8,代码来源:Barcodes.class.php

示例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>";
 }
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:18,代码来源:Users.class.php

示例3: ucwords

        $name = str_ireplace('{{single}}', $list['single'], $_POST['name']);
        $name = str_ireplace('{{plural}}', $list['plural'], $name);
        $name = ucwords(str_ireplace('{{prefix}}', $list['prefix'], $name));
        $sku = $_POST['sku'] . str_pad($num, 4, 0, STR_PAD_LEFT);
        $skip = $db->select('products', "`sku`='{$sku}'");
        if (!$skip) {
            $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']);
}
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:mass.php

示例4: foreach

    }
    // $pa = explode("\r\n\r\n", $ps);
    foreach ($pa as $key => $pc) {
        $pct = explode("&quot;:&quot;", $pc);
        $fa[$key]['ASIN'] = str_replace("&quot;,&quot;MYIService.Quantity", "", $pct[1]);
        $fa[$key]['Qty'] = str_replace("&quot;,&quot;MYIService.Points", "", $pct[2]);
        $fa[$key]['Price'] = str_replace("&quot;,&quot;MYIService.Sku", "", $pct[12]);
        $fa[$key]['Sku'] = str_replace("&quot;,&quot;MYIService.Title", "", $pct[13]);
        $fa[$key]['Name'] = str_replace("&quot;,&quot;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';
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:filter.php

示例5: isset

            }
        }
        if (!$errorCount) {
            $html->redirection('label.php?ref=' . $_POST['reference']);
        } else {
            $html->redirection('royalmail.php');
        }
    }
}
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']));
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:shipitem.php

示例6: Users

$user = new Users();
$form = new Forms();
$user->url();
if (isset($_POST['submit'])) {
    switch ($_GET['f']) {
        case 'create':
            $user->set_data();
            $user->check_data();
            if (isset($user->error_count)) {
                echo "<div class='row'>";
                echo "<div class='col-xs-6'>";
                $html->title("user management", "create user", "left");
                echo "</div>";
                echo "<div class='col-xs-6 text-right'>";
                $html->button("users.php?f=manage", "back");
                $form->button("create", "md", "create");
                echo "</div>";
                echo "</div>";
                $user->user_id = $_GET['f'];
                $user->form("create");
                $alerts->display("danger", "error", "Failed to create user, please refer to field alerts.");
            } else {
                $user->submit_data("create");
                $html->redirection("users.php?f=manage");
            }
            break;
        default:
            $user->set_data();
            $user->check_data("update");
            if (isset($user->error_count)) {
                echo "<div class='row'>";
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:users.php

示例7: Forms

 * Project: BPU
 * Company: Fingerprints Ltd
 * Date: 21/09/2016
 * Time: 9:58 AM
 */
require_once 'header.php';
$db->admin_confirm();
$_SESSION['settings'] = $db->select("settings", "id='1'", '*', 1);
$form = new Forms();
$api = new Api();
echo "<div id='page-title' class='row'>";
echo "<div class='col-xs-12 col-sm-6'>";
$html->title('Shipping Details', null, "left");
echo "</div>";
echo "<div class='col-xs-12 col-sm-6 text-right'>";
$form->button("save", 'md', 'shippingForm');
echo "</div>";
echo "</div>";
echo "<hr />";
if (isset($_POST['submit'])) {
    $company = $_POST['company'];
    $building = $_POST['building'];
    $street = $_POST['street'];
    $town = $_POST['town'];
    $county = $_POST['county'];
    $zip = $_POST['zip'];
    $name = $_POST['name'];
    $telephone = $_POST['telephone'];
    $email = $_POST['email'];
    $pod_email = $_POST['pod_email'];
    $netdepatch_id = $_POST['netdepatch_id'];
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:shipping.php

示例8: Forms

            $html->redirection("collections.php");
            break;
    }
} else {
    if (isset($_GET['c'])) {
        $form = new Forms();
        $collections->get_data($_GET['c']);
        echo "<div id='page-title' class='row'>";
        echo "<div class='col-xs-12 col-sm-6'>";
        $html->title("collection", "- {$collections->name}", "left");
        echo "</div>";
        echo "<div class='col-xs-12 col-md-6 text-right'>";
        $html->button("collections.php", "back", "default");
        $html->button("collections.php?clone=" . $_GET['c'], "clone", "danger");
        $html->button("collections.php?c=" . $_GET['c'], "reset", "warning");
        $form->button("save", "md", "collection_form");
        echo "</div>";
        echo "</div>";
        echo "<hr />";
        $collections->form($_GET['c']);
        echo "<div class='row'>";
        echo "<div class='col-xs-12 text-right'>";
        echo "<hr />";
        $html->button("collections.php", "back", "default");
        $html->button("collections.php?clone=" . $_GET['c'], "clone", "danger");
        $html->button("collections.php?c=" . $_GET['c'], "reset", "warning");
        $form->button("save", "md", "collection_form");
        echo "</div>";
        echo "</div>";
    } else {
        if (isset($_GET['clone'])) {
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:collections.php

示例9: Forms

 * Created by Kent M. Patrick
 * Project: BPU
 * Company: Fingerprints Ltd
 * Date: 21/09/2016
 * Time: 9:58 AM
 */
require_once 'header.php';
$db->admin_confirm();
$settings = $db->select("settings", "id='1'", '*', 1);
$form = new Forms();
echo "<div id='page-title' class='row'>";
echo "<div class='col-xs-12 col-sm-6'>";
$html->title('Settings', null, "left");
echo "</div>";
echo "<div class='col-xs-12 col-sm-6 text-right'>";
$form->button("save", 'md', 'settingsForm');
echo "</div>";
echo "</div>";
echo "<hr />";
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 {
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:settings.php

示例10:

                $variations->set_data();
                $variations->submit_data();
                $html->redirection("variations.php");
            }
        }
    }
} else {
    if (isset($_GET['c'])) {
        $collection = $db->select("collections", "id='" . $_GET['c'] . "'", 'name', 1);
        echo "<div id='page-title' class='row'>";
        echo "<div class='col-xs-12 col-sm-6'>";
        $html->title("collections", $collection['name'] . " - variations", "left");
        echo "</div>";
        echo "<div class='col-xs-12 col-sm-6 text-right'>";
        $html->button("collections.php", "back", "default");
        $form->button("save", "md", "toggle_form");
        echo "</div>";
        echo "</div>";
        $variations->toggles($_GET['c']);
    } else {
        if (isset($_GET['p'])) {
            $product = $db->select("products", "id='" . $_GET['p'] . "'", 'name,collection_id', 1);
            echo "<div id='page-title' class='row'>";
            echo "<div class='col-xs-12 col-sm-6'>";
            $html->title("product", $product['name'] . " - variations", "left");
            echo "</div>";
            echo "<div class='col-xs-12 col-sm-6 text-right'>";
            $html->button("products.php?c=" . $product['collection_id'], "back", "default");
            $form->button("save", "md", "toggle_products");
            echo "</div>";
            echo "</div>";
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:variations.php

示例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();
 }
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:82,代码来源:Products.class.php

示例12: Forms

$form = new Forms();
if (isset($_POST['submit'])) {
    $words = explode("\r\n", $_POST['words']);
    $blacklist->process($words);
}
if (isset($_GET['page'])) {
    $db->admin_confirm();
    switch ($_GET['page']) {
        case 'add':
            echo "<div id='page-title' class='row'>";
            echo "<div class='col-xs-12 col-sm-6'>";
            $html->title("blacklist", "add words", "left");
            echo "</div>";
            echo "<div class='col-xs-12 col-md-6 text-right'>";
            $html->button("blacklist.php", "back", "default");
            $form->button("save", "md", "blacklist_form");
            echo "</div>";
            echo "</div>";
            $blacklist->form();
            break;
        case 'manage':
            echo "<div id='page-title' class='row'>";
            echo "<div class='col-xs-12 col-sm-6'>";
            $html->title("blacklist", "management", "left");
            echo "</div>";
            echo "<div class='col-xs-12 col-md-6 text-right'>";
            $html->button("blacklist.php", "back", "default");
            echo "</div>";
            echo "</div>";
            $blacklist->manage();
            break;
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:blacklist.php

示例13:

         echo '<div class="form-group">';
         echo '<label class="col-sm-2 control-label">Response</label>';
         echo '<textarea class="form-control" rows="12">';
         echo $response;
         if (!$results['error']) {
             echo "Deleted royal mail record from BPU Database: " . $_POST['id'];
             $db->delete('royal_mail', $_POST['id']);
         }
         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();
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:royalmail.php

示例14: unset

        }
    } else {
        unset($_SESSION['upload_file']);
        $alerts->display("danger", "error", $errors['0']);
    }
}
if (isset($_GET['step'])) {
    $form = new Forms();
    switch ($_GET['step']) {
        case '1':
            echo "<div class='row'>";
            echo "<div class='col-xs-6'>";
            $html->title("import", "step 1 - upload file", "left");
            echo "</div>";
            echo "<div class='col-xs-6 text-right'>";
            isset($_SESSION['upload_file']) ? $html->button("import.php?step=2", "next step") : $form->button("upload", "md", "upload");
            echo "</div>";
            echo "</div>";
            isset($_SESSION['upload_file']) ? '' : $upload->form();
            $upload->file_info();
            break;
        case '2':
            echo "<div class='row'>";
            echo "<div class='col-xs-6'>";
            $html->title("import", "step 2 - Parsing File", "left");
            echo "</div>";
            echo "<div class='col-xs-6 text-right'>";
            $html->button("import.php?step=1", "back");
            $html->button("import.php?step=3", "next step");
            echo "</div>";
            echo "</div>";
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:31,代码来源:import.php


注:本文中的Forms::button方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。