本文整理汇总了PHP中Status::printOption方法的典型用法代码示例。如果您正苦于以下问题:PHP Status::printOption方法的具体用法?PHP Status::printOption怎么用?PHP Status::printOption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Status
的用法示例。
在下文中一共展示了Status::printOption方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catch
$supplier->populate();
$supplier->store();
} catch (fExpectedException $e) {
echo $e->printMessage();
}
} else {
if ($_POST['type'] == "add") {
try {
$supplier = new Supplier();
$supplier->populate();
$supplier->store();
} catch (fExpectedException $e) {
echo $e->printMessage();
}
} else {
if ($_POST['type'] == "option") {
echo "<select>";
Status::printOption('1');
echo "</select>";
} else {
if ($_POST['type'] == "generate") {
try {
Supplier::generateInfo($_POST['key']);
} catch (fExpectedException $e) {
echo "Invalid supplier";
}
}
}
}
}
}
示例2: Inv_item
echo $e->printMessage();
}
} else {
if ($_POST['type'] == "url") {
try {
$inv_item = new Inv_item($_POST['key']);
$inv_item->setImageUrl($_POST['url']);
$inv_item->store();
} catch (fExpectedException $e) {
echo $e->printMessage();
}
} else {
if ($_POST['type'] == "option") {
$selectedOption = $_POST['input'] == "Active" ? 1 : 0;
echo "<select>";
Status::printOption($selectedOption);
echo "</select>";
} else {
if ($_POST['type'] == "lastCode") {
$counter = Inv_item::findByClassificationCode($_POST['classific']);
echo sprintf("%03d", $counter->count() + 1);
} else {
if ($_POST['type'] == "upload") {
try {
$uploadDirectory = new fDirectory('../storage/image/' . $_POST['hiddenId']);
} catch (fExpectedException $e) {
$uploadDirectory = fDirectory::create('../storage/image/' . $_POST['hiddenId']);
}
try {
$uploader = new fUpload();
$uploader->setMIMETypes(array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/png'), 'The file uploaded is not an image');
示例3:
</span>
<br />
<table id="tableDetail" class="hideFirst">
<tbody>
<tr><td>Item Code: </td><td><input type="hidden" id="idInput"></input><span id="idSpan"></span><br /></td></tr>
<tr><td>Description: </td><td><input type="text" id="desc"></input><br /></td></tr>
<tr><td>Weight: </td><td><input type="text" id="weight"></input><br /></td></tr>
<tr><td>Dimension: </td><td><input type="text" id="dim"></input><br /></td></tr>
<tr><td>Part Number: </td><td><input type="text" id="part"></input><br /></td></tr>
<tr><td>Unit of Measurement: </td><td><input type="text" id="uom"></input><br /></td></tr>
<tr><td>Rate: </td><td><input type="text" id="rate"></input><br /></td></tr>
<tr><td>Currency: </td><td><input type="text" id="curr"></input><br /></td></tr>
<tr><td>Purchase Year: </td><td><input type="text" id="pury"></input><br /></td></tr>
<tr><td>Detailed Description: </td><td><input type="text" id="detailed"></input><br /></td></tr>
<tr><td>Status: </td><td><select id="statusVal"><?php
Status::printOption();
?>
</select></td></tr>
</tbody>
<tfoot>
<tr><td colspan="2"><input id="addBTN" type="button" value="Submit" /></td></tr>
</tfoot>
</table>
</form>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>