<?php 
include PATH_TO_APP . "views/_header.php";
?>


<?php 
$categoriesArray = array();
foreach ($model->categories as $category) {
    array_push($categoriesArray, array("value" => $category, "content" => ucfirst($category)));
}
htmlRender::beginForm(array("action" => "chooseCategoryOfProduct", "method" => "POST"));
?>
<table class="table">
    <tr>
        <th>Name</th>
        <th>Price</th>
        <th>Quantity</th>
        <th>Category</th>
        <th>Select Product</th>
    </tr>
    <?php 
foreach ($model->products as $product) {
    ?>
        <tr>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($product->name, false);
    ?>
</td>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($product->price, false);
<?php 
include PATH_TO_APP . "views/_header.php";
?>


<?php 
$categoriesArray = array();
foreach ($model->categories as $category) {
    array_push($categoriesArray, array("value" => $category, "content" => ucfirst($category)));
}
htmlRender::beginForm(array("action" => "moveProductToCategory", "method" => "POST"));
?>

<input type=hidden name="productId" value="<?php 
echo $model->product->id;
?>
">

<table class="table">
    <tr>
        <th>Name</th>
        <th>Price</th>
        <th>Quantity</th>
        <th>Category</th>
        <th>Select New Category</th>
    </tr>
    <tr>
        <td><?php 
echo $this->htmlSpecialCharsConditional($model->product->name, false);
?>
<?php 
include PATH_TO_APP . "views/_header.php";
?>


<?php 
$categoriesArray = array();
foreach ($model as $category) {
    array_push($categoriesArray, array("value" => $category, "content" => ucfirst($category)));
}
htmlRender::beginForm(array("action" => "addProduct", "method" => "POST"));
?>

<table class="table">
    <tr>
        <td>Name</td>
        <td><?php 
htmlRender::textField(array("name" => "name"));
?>
</td>
    </tr>
    <tr>
        <td>Price</td>
        <td><?php 
htmlRender::textField(array("name" => "price"));
?>
</td>
    </tr>
    <tr>
        <td>Category</td>
Ejemplo n.º 4
0
htmlRender::DropDown(array("name" => "category"), $categoriesArray);
?>
&nbsp;<input type="submit" value="Filter" class="btn btn-default"><br>
<?php 
htmlRender::checkBox(array("name" => "getOnlyAvailable"));
?>
 <label>Available only</label>
<?php 
htmlRender::endForm();
?>

<br>
<br>

<?php 
htmlRender::beginForm(array("action" => "cart/addToCart", "method" => "POST"));
?>
<table class="table">
    <tr>
        <th>Name</th>
        <th>Price</th>
        <th>Category</th>
        <th>Quantity</th>
        <th>Select</th>
    </tr>
    <?php 
foreach ($model->products as $product) {
    ?>
        <tr>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($product->name, false);
<?php 
include PATH_TO_APP . "views/_header.php";
?>

<?php 
htmlRender::beginForm(array("action" => "changeUserRole", "method" => "POST"));
?>
<table class="table">
    <tr>
        <th>Username</th>
        <th>First Name</th>
        <th>Last Name</th>
        <th>Role</th>
        <th>Change Role</th>
    </tr>
    <?php 
foreach ($model as $user) {
    ?>
        <tr>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($user->username, false);
    ?>
</td>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($user->firstName, false);
    ?>
</td>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($user->lastName);
    ?>
<?php 
include PATH_TO_APP . "views/_header.php";
?>


<?php 
htmlRender::beginForm(array("action" => "quantityChanged", "method" => "POST"));
?>

<input type=hidden name="productId" value="<?php 
echo $model->id;
?>
">

<table class="table">
    <tr>
        <th>Name</th>
        <th>Price</th>
        <th>Category</th>
        <th>Quantity</th>
        <th>New Quantity</th>
    </tr>
        <tr>
            <td><?php 
echo $this->htmlSpecialCharsConditional($model->name, false);
?>
</td>
            <td><?php 
echo $this->htmlSpecialCharsConditional($model->price, false);
?>
Ejemplo n.º 7
0
htmlRender::passwordField(array("name" => "password"));
?>
</td>
        </tr>
    </table>
    <input type="submit" value="Login">
<?php 
htmlRender::endForm();
?>

<br>
<br>
<br>

<?php 
htmlRender::beginForm(array("action" => "authentication/register", "method" => "POST", "id" => "target"));
?>
    <table>
        <h3>Register Form</h3>
        <tr>
            <td>Username:</td><td><?php 
htmlRender::textField(array("name" => "username"));
?>
</td>
        </tr>
        <tr>
            <td>Password:</td><td><?php 
htmlRender::passwordField(array("name" => "password"));
?>
</td>
        </tr>
<?php 
include PATH_TO_APP . "views/_header.php";
?>


<?php 
htmlRender::beginForm(array("action" => "addCategory", "method" => "POST"));
?>

<table class="table">
    <tr>
        <td>Name</td>
        <td><?php 
htmlRender::textField(array("name" => "name"));
?>
</td>
    </tr>
</table>
<br>
<input type="submit" value="Add New Category" class="btn btn-success"><br>
<?php 
htmlRender::endForm();
?>
<br>

<?php 
include PATH_TO_APP . "views/_footer.php";
<?php 
include PATH_TO_APP . "views/_header.php";
?>

<?php 
htmlRender::beginForm(array("action" => "changeQuantityOfProduct", "method" => "POST"));
?>
<table class="table">
    <tr>
        <th>Name</th>
        <th>Price</th>
        <th>Category</th>
        <th>Quantity</th>
        <th>Select</th>
    </tr>
    <?php 
foreach ($model as $product) {
    ?>
        <tr>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($product->name, false);
    ?>
</td>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($product->price, false);
    ?>
</td>
            <td><?php 
    echo $this->htmlSpecialCharsConditional($product->category);
    ?>
<!-- Begin form-->
<br>
<?php 
htmlRender::beginForm(array("action" => "action.php", "method" => "POST", "accept-charset" => "UTF-8"));
?>

<!-- RadioButtons -->
<br>
<?php 
htmlRender::radioButton(array("name" => "sex", "value" => "male"));
?>
Male<br>
<?php 
htmlRender::radioButton(array("name" => "sex", "value" => "female"));
?>
Female<br>
<br>

<!-- CheckBoxes -->
<br>
<?php 
htmlRender::checkBox(array("name" => "vehicle", "value" => "Bike"));
?>
I have a bike<br>
<?php 
htmlRender::checkBox(array("name" => "vehicle", "value" => "Car"));
?>
I have a car<br>
<br>