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


PHP Branch::prepareName方法代码示例

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


在下文中一共展示了Branch::prepareName方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: catch

                } catch (fExpectedException $e) {
                    echo $e->printMessage();
                }
            } else {
                if ($_POST['type'] == "add") {
                    try {
                        $branch = new Branch();
                        $branch->populate();
                        $branch->store();
                        $theId = $branch->getId();
                        $ids = Inv_item::findIdUB($db);
                        foreach ($ids as $id) {
                            $stock = new Inv_stock();
                            $stock->setBranchId($theId);
                            $stock->setItemId($id);
                            $stock->setQuantity(0);
                            $stock->store();
                        }
                    } catch (fExpectedException $e) {
                        echo $e->printMessage();
                    }
                } else {
                    if ($_POST['type'] == "name") {
                        $branch = new Branch($_POST['key']);
                        echo $branch->prepareName();
                    }
                }
            }
        }
    }
}
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:Branch.php

示例2: User

	<?php 
$tmpl->place('menuDocument');
?>
	<h2>Material Transfer</h2>
	<div class="form-frame span-23 last">
		<h3>Material Transfer Form</h3><br />
		<input type="hidden" name="run_num" value="" id="run_num"/>
		<label for="doc_num">Document Number </label><input type="text" name="doc_num" value="" id="doc_num"/><br />
		<label for="doc_date">Document Date </label><input type="text" name="doc_date" value="" id="doc_date" class="datepicker"/><br />
		<label for="doc_type">Document Type </label>MTF <input id="doc_type" type="hidden" value="MTF"></input><br />
		<label for="branch_id">Branch </label><span>
			<?php 
$me = fAuthorization::getUserToken();
$user = new User($me);
$branchname = new Branch($user->getBranchId());
echo $branchname->prepareName();
echo "<input type=\"hidden\" id=\"branch_id\" value=\"" . $user->getBranchId() . "\"></input>";
?>
			</span><br />
		<label for="branch_from">From Branch </label>
				<select type="text" name="branch_from" id="branch_from"><?php 
$user = new User(fAuthorization::getUserToken());
Branch::findAllOption($user->getBranchId());
?>
</select> <span> -> </span>
		<label for="branch_to">To Branch </label>
			<select type="text" name="branch_to" id="branch_to"><?php 
$user = new User(fAuthorization::getUserToken());
Branch::findAllOption($user->getBranchId());
?>
</select> <br />
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:document-mtr.php

示例3: foreach

<div id="content" class="span-24 last">
	<?php 
$tmpl->place('menuAdmin');
?>
	<h2>Administration</h2><h3>User</h3>
	<table>
		<thead>
			<tr><th>Name</th><th>Username</th><th>Branch</th><th>Email</th><th>Level</th><th>Password</th><th>Icon</th></tr>
		</thead>
		<tbody>
			<?php 
try {
    $users = User::findAll();
    foreach ($users as $user) {
        $branch = new Branch($user->getBranchId());
        printf("<tr class=\"userRow\"><td id=\"uName\" class=\"varInput\">%s</td><td id=\"uUser\">%s</td><td id=\"uBranch\"class=\"varInput\">%s</td><td id=\"uEmail\" class=\"varInput\">%s</td><td id=\"uLevel\" class=\"varInput\">%s</td>\n\t\t\t\t\t\t\t\t<td><input type=\"button\" class=\"uPassword\" user=\"%s\" value=\"Reset\"></input></td>", $user->prepareName(), $user->prepareUsername(), $branch->prepareName(), $user->prepareEmail(), $user->prepareLevel(), $user->prepareUsername());
        printf("<td id=\"iconCell\" class=\"hideFirst\"><ul id=\"icons\" class=\"ui-widget ui-helper-clearfix\">\n\t\t\t\t\t\t\t\t<li id=\"save\" title=\"Save\" class=\"ui-state-default ui-corner-all\"><span class=\"ui-icon ui-icon-circle-check\"></span></li>\n\t\t\t\t\t\t\t\t<li id=\"cancel\" title=\"Cancel\" class=\"ui-state-default ui-corner-all\"><span class=\"ui-icon ui-icon-circle-close\"></span></li>\n\t\t\t\t\t\t\t\t<li id=\"delete\" title=\"Delete\" class=\"ui-state-default ui-corner-all\"><span class=\"ui-icon ui-icon-trash\"></span></li>\n\t\t\t\t\t\t\t\t</ul></td></tr>");
    }
} catch (fExpectedException $e) {
    echo $e->printMessage();
}
?>
			<tr id="newItem">
				<td><input id="nuName" value="Input Name" size="10"></input></td>
				<td><input id="nuUser" value="Input Username"></input></td>
				<td><select id="nuBranch"><?php 
Branch::findAllOption();
?>
</select></td>
				<td><input id="nuEmail" value="Input Email"></input></td>
				<td><select id="nuLevel">
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:admin-user.php

示例4: Branch

		<label for="doc_num">Document Number </label><span id="docNum"><?php 
        echo $production->prepareDocNumber();
        ?>
</span><br />
		<label for="doc_date">Document Date </label><?php 
        echo $production->prepareDocDate("j F Y");
        ?>
<br />
		<label for="doc_type">Document Type </label><?php 
        echo $production->prepareDocType();
        ?>
<br />
		<label for="branch_id">Branch </label>
				<?php 
        $branch = new Branch($production->getBranchId());
        echo $branch->prepareName() . " / " . "<span id=\"branchId\">" . $production->prepareBranchId() . "</span>";
        ?>
<br />
		<table id="formContent">
			<thead>
				<tr><th>No</th>
					<th>Item Code</th><th width="400">Description</th><th>Quantity</th><th>UOM</th><th>Remarks</th><th>Icons</th></tr>
			</thead>
			<tbody>
				<?php 
        $hideCancel = false;
        $counter = 1;
        foreach ($production_details as $production_detail) {
            echo "<tr id=\"rowNo" . $counter . "\"><td id=\"detailId\" class=\"hideFirst\">" . $production_detail->getId() . "</td><td>" . $counter . "</td><td id=\"itemCode\">" . $production_detail->prepareItemId() . "</td>";
            $item = new Inv_item($production_detail->getItemId());
            echo "<td class=\"itemDesc\">" . $item->prepareDescription() . "</td>\n\t\t\t\t\t\t\t\t<td id=\"itemQuan\">" . $production_detail->prepareQuantity() . "</td>\n\t\t\t\t\t\t\t \t<td>" . $item->prepareUnitOfMeasure() . "</td><td>" . $production_detail->prepareRemark() . "</td>";
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:document-pi-view.php

示例5: printf

	<div id="main" class="span-24 last">
		<h2>Administration</h2><h3>Stock</h3>
		<br />
		<form action = "admin-stock.php" method = "get">
			<label for="inv_item">Choose Inventory Item: </label>
			<span id="inv_item">
				<input id="autocompleteItem" name="item"></input>
			</span>
			<input id="submitBTN" type="submit" value="Submit" />
		</form>
		<?php 
if (isset($_GET['item'])) {
    try {
        $inv_stocks = Inv_stock::findByItem($_GET['item']);
        $item = new Inv_item($_GET['item']);
        printf("<br /><h3>%s - %s</h3><table><thead><tr><th>Branch</th><th>Quantity</th><th width=\"100\">Update</th></tr></thead><tbody>", $item->prepareId(), $item->prepareDescription());
        foreach ($inv_stocks as $inv_stock) {
            $branch = new Branch($inv_stock->getBranchId());
            printf("<tr><td>%s</td><td><input type=\"text\" value=\"%s\" /> %s</td><td><input class=\"updateBTN\" id=\"%s\" type=\"button\" value=\"Update\"/></td></tr>", $branch->prepareName() . " [" . $branch->prepareId() . "]", $inv_stock->getQuantity(), $item->prepareUnitOfMeasure(), $inv_stock->getId());
        }
        echo "</tbody></table>";
    } catch (fExpectedException $e) {
        echo $e->printMessage();
    }
}
?>
	</div>
</div>
<div id="messageBox" style="display: none;">Loading</div>
<?php 
$tmpl->place('footer');
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:admin-stock.php

示例6: strtoupper

</span>
		<br />
		<label for="doc_date">Document Date </label>
			<?php 
        echo $purchase->prepareDocDate("j F Y");
        ?>
<br />
		<label for="doc_type">Document Type </label>
			<?php 
        echo strtoupper($purchase->prepareDocTag()) . $purchase->prepareDocType();
        ?>
<br />
		<label for="branch_id">Branch </label>
			<?php 
        $branch = new Branch($purchase->getBranchId());
        echo $branch->prepareName() . " / " . $purchase->prepareBranchId();
        ?>
<br />
		<label for="currency_id">Currency </label>
			<?php 
        $currency = new Currency($purchase->getCurrency());
        echo $currency->prepareCountry() . " [" . $currency->prepareExchange(2) . "]";
        ?>
			<div class="supplierBox span-23 last">
				<div id="box1" class="boxes span-7">
					<b>Supplier 1</b><br />
						<?php 
        $supplier = new Supplier($purchase->getSupplier1());
        echo $supplier->prepareName();
        ?>
					<br />
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:document-po-view.php

示例7: foreach

				<tr>
					<th>Document Number</th><th>Document Date</th><th>Requester</th>
					<th>from Department</th><th>to Department</th><th>Status</th>
				</tr>
			</thead>
			<tbody>
		<?php 
    try {
        $mattrans = Material_transfer::findByBranchTo(10, $user->getBranchId());
        foreach ($mattrans as $mattran) {
            $toBranch = new Branch($mattran->getBranchTo());
            $fromBranch = new Branch($mattran->getBranchFrom());
            echo "<tr class=\"linkable\"><td class=\"docNumber\">" . $mattran->prepareDocNumber() . "</td>";
            echo "<td>" . $mattran->prepareDocDate("j F Y") . "</td>";
            echo "<td>" . $mattran->prepareRequester() . "</td>";
            echo "<td>" . $fromBranch->prepareName() . "</td>";
            echo "<td>" . $toBranch->prepareName() . "</td>";
            echo "<td>" . $mattran->prepareStatus() . "</td></tr>";
        }
    } catch (fExpectedException $e) {
        echo $e->printMessage();
    }
    ?>
		</tbody>
	</table>
	<?php 
}
?>
</div>
<?php 
$tmpl->place('footer');
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:list-mtr.php

示例8: Branch

        ?>
"/>
		<label for="doc_date">Document Date </label>
			<?php 
        echo $grn->prepareDocDate("j F Y");
        ?>
<br />
		<label for="doc_type">Document Type </label>
			<?php 
        echo $grn->prepareDocType();
        ?>
<br />
		<label for="branch_id">Branch </label>
			<?php 
        $branch = new Branch($grn->getBranchId());
        echo $branch->prepareName() . " / " . $grn->prepareBranchId();
        ?>
<br />
			<div class="supplierBox span-23 last">
				<div id="box1" class="boxes span-7">
					<b>Supplier</b><br />
						<?php 
        $supplier = new Supplier($grn->getSupplier());
        echo $supplier->prepareName();
        ?>
						<input type="hidden" id="supplier" val="<?php 
        echo $grn->prepareSupplier();
        ?>
"></input>
					<br />
					<div class="boxBody">
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:document-grn-view.php

示例9: printf

        }
        printf("<table><thead><tr><th>Item ID</th><th>Description</th><th>Quantity</th></tr></thead><tbody>");
        foreach ($inv_stocks as $inv_stock) {
            $inv_item = new Inv_item($inv_stock->getItemId());
            printf("<tr><td>%s</td><td>%s</td><td>%s</td></tr>", $inv_item->prepareId(), $inv_item->prepareDescription(), $inv_stock->prepareQuantity() . " " . $inv_item->prepareUnitOfMeasure());
        }
        echo "</tbody></table>";
    } catch (fExpectedException $e) {
        echo $e->printMessage() . $inv_stock->getItemId();
    }
} else {
    if (isset($_GET['item'])) {
        try {
            $inv_stocks = Inv_stock::findByItem($_GET['item']);
            $item = new Inv_item($_GET['item']);
            printf("<br /><h3>%s - %s</h3><table><thead><tr><th>Branch</th><th>Quantity</th></tr></thead><tbody>", $item->prepareId(), $item->prepareDescription());
            foreach ($inv_stocks as $inv_stock) {
                $branch = new Branch($inv_stock->getBranchId());
                printf("<tr><td>%s</td><td>%s</td></tr>", $branch->prepareName() . " [" . $branch->prepareId() . "]", $inv_stock->prepareQuantity() . " " . $item->prepareUnitOfMeasure());
            }
            echo "</tbody></table>";
        } catch (fExpectedException $e) {
            echo $e->printMessage();
        }
    }
}
?>
	</div>
</div>
<?php 
$tmpl->place('footer');
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:inventory-stock.php

示例10: Branch

        ?>
<br />
		<label for="doc_type">Document Type </label>
			<?php 
        echo $mattrans->prepareDocType();
        ?>
<br />
		<label for="branch_id">From Branch </label>
				<?php 
        $fromBranch = new Branch($mattrans->getBranchFrom());
        echo $fromBranch->prepareName();
        ?>
		<label for="branch_id"> To Branch </label>
			<?php 
        $toBranch = new Branch($mattrans->getBranchTo());
        echo $toBranch->prepareName();
        ?>
<br />
		<table id="formContent">
			<thead>
				<tr><th>No</th>
					<th>Item Code</th><th width="300px">Description</th><th>Quantity</th><th>UOM</th><th>Remarks</th><th>In <?php 
        echo $fromBranch->getId();
        ?>
</th><th width="75px">Receiver</th></tr>
			</thead>
			<tbody>
				<?php 
        $counter = 1;
        foreach ($mattrans_details as $mattrans_detail) {
            echo "<tr class=\"jsonRow\"><td>" . $counter . "</td><td class=\"itemCode\">" . $mattrans_detail->prepareItemId() . "<input class=\"itemId\" type=\"hidden\" value=\"" . $mattrans_detail->getId() . "\"></input></td>";
开发者ID:JhunCabas,项目名称:material-management,代码行数:31,代码来源:document-mtr-view.php


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