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


PHP assoc_get函数代码示例

本文整理汇总了PHP中assoc_get函数的典型用法代码示例。如果您正苦于以下问题:PHP assoc_get函数的具体用法?PHP assoc_get怎么用?PHP assoc_get使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: while

            <input type="date" name="date" value="<?php 
echo $val;
?>
"><button type="submit">ค้นหา</button>
        </form>
        <table class="table table-bordered">
            <tr>
                <th>ลำดับ</th>
                <th>รหัสใบแจ้งซ่อม</th>
                <th>ชื่อ-นามสกุล</th>
                <th>วันที่ เวลา</th>
                <th>สถานะ</th>
            </tr>
            <?php 
$i = 1;
while ($r = assoc_get($result)) {
    ?>
            <tr>
                <td><?php 
    echo $i;
    ?>
</td>
                <td>RP-<?php 
    echo $r['rp_id'];
    ?>
</td>
                <td><?php 
    echo $r['c_flname'];
    ?>
</td>
                <td><?php 
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:report_day.php

示例2: connect_db

<?php

$con = connect_db();
$result = getTable_where('admin_user', 'am_id', $_GET['id'], $con);
$r = assoc_get($result);
?>
<div class="panel panel-defautl">
	<div class="panel-heading">เพิ่มข้อมูลพนักงาน</div>
	<div class="panel-body">
		<form class="form-horizontal" action="index.php?module=system_staff&action=update_staff" method="POST">
		  <div class="form-group">
		    <label for="username" class="col-sm-2 control-label">Username : </label>
		    <div class="col-sm-10">
		    	<input type="hidden" value="<?php 
echo $r['am_id'];
?>
" name="id">
		      <input type="text" class="form-control" name="u[am_username]" id="username" value="<?php 
echo $r['am_username'];
?>
">
		    </div>
		  </div>
		  <div class="form-group">
		    <label for="password" class="col-sm-2 control-label">Password : </label>
		    <div class="col-sm-10">
		      <input type="password" class="form-control" name="u[am_password]" id="password" value="<?php 
echo $r['am_password'];
?>
">
		    </div>
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:form_edit_staff.php

示例3: getTable_where

            <td>ชื่อร้านที่รับเครม</td>
            <td colspan="3">
                PS Supply
            </td>
        </tr>
    </table>
    <div class="table-pd-claim">
       <table class="table table-bordered" id="table-claim">
            <tr>
                <th>รหัสบาร์โค้ด</th>
                <th>ชื่อสินค้า</th>
                <th>จำนวน</th>
            </tr>
            <?php 
$result_pd = getTable_where('product_claim', 'cl_id', $r['cl_id'], $con);
while ($r_pd = assoc_get($result_pd)) {
    ?>
            <tr>
                <td><?php 
    echo $r_pd['pc_barcode'];
    ?>
</td>
                <td>
                    <?php 
    foreach ($data as $val) {
        if ($val['p_barcode'] == $r_pd['pc_barcode']) {
            echo $val['p_name'];
        }
    }
    ?>
                </td>
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:claim.php

示例4: getTable

                <div class="col-sm-5">
                    <input type="text" name="pd[p_name]" class="form-control" value="<?php 
echo $p['p_name'];
?>
"  placeholder="ชื่อสินค้า">
                </div>
            </div>
            <div class="form-group">
                <?php 
$rs = getTable('type_product', $con);
?>
                <label for="" class="col-sm-3 control-label">ประเภทสินค้า</label>
                <div class="col-sm-5">
                    <select name="pd[tp_id]" class="form-control" id="">
                        <?php 
while ($r = assoc_get($rs)) {
    ?>
                        <option value="<?php 
    echo $r['tp_id'];
    ?>
" <?php 
    echo $p['tp_id'] == $r['tp_id'] ? 'selected' : '';
    ?>
><?php 
    echo $r['tp_name'];
    ?>
</option>
                        <?php 
}
?>
                    </select>
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:edit_products.php

示例5: connect_db

<?php

$con = connect_db();
$customer = $_POST['customer'];
$result = get_query("SELECT count(c_id) AS cntid FROM customer_fix WHERE c_phone='{$customer['c_phone']}'", $con);
$rs = assoc_get($result);
if ($rs['cntid'] <= 0) {
    insert_table('customer_fix', $customer, $con);
    $result = getTable_where('customer_fix', 'c_phone', $customer['c_phone'], $con);
    $rsNewCustomer = assoc_get($result);
    $repair = $_POST['rp'];
    $repair['c_id'] = $rsNewCustomer['c_id'];
    $repair['rp_datekey'] = date("Y-m-d H:i:s");
    insert_table('repair_tb', $repair, $con);
} else {
    $result = getTable_where('customer_fix', 'c_phone', $customer['c_phone'], $con);
    $rsNewCustomer = assoc_get($result);
    $repair = $_POST['rp'];
    $repair['c_id'] = $rsNewCustomer['c_id'];
    $repair['rp_datekey'] = date("Y-m-d H:i:s");
    //dieArray($repair);
    insert_table('repair_tb', $repair, $con);
}
close_db($con);
?>
<script>
    alert('เพิ่มข้อมูลเรียบร้อยแล้ว');
    window.location='index.php?module=system_repair&action=list_repair';
</script>
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:29,代码来源:insert_repair.php

示例6: while

    <div class="panel-heading">รายละเอียด</div>
    <div class="panel-body">
        <table class="table table-bordered tr-td">
            <tbody>
                <tr>
                    <td width="20%">รหัส</td>
                    <td><?php 
echo $r['p_id'];
?>
</td>
                </tr>
                <tr>
                    <td>ประเภทสินค้า</td>
                    <td>
                        <?php 
while ($r_tp = assoc_get($rs_tp)) {
    if ($r_tp['tp_id'] == $r['tp_id']) {
        echo $r_tp['tp_name'];
    }
}
?>
                    </td>
                </tr>
                <tr>
                    <td>ชื่อสินค้า</td>
                    <td><?php 
echo $r['p_name'];
?>
</td>
                </tr>
                <tr>
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:detail_products.php

示例7: getTable_where

                </tr>
            </tbody>
        </table>
    </div>
    <table id="table-data" class="display" border="1" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>รหัส</th>
                <th>วันที่ซ่อม</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
           <?php 
$rs_rp = getTable_where('repair', 'c_id', $r['c_id'], $con);
while ($r_rp = assoc_get($rs_rp)) {
    ?>
            <tr>
                <td align="center"><?php 
    echo $r_rp['rp_id'];
    ?>
</td>
                <td align="center"><?php 
    echo formatDateThaiFromDatatime($r_rp['rp_datetime']);
    ?>
</td>
                <td><a href="index.php?module=control&action=detail_repair&id=<?php 
    echo $r_rp['rp_id'];
    ?>
" class="btn btn-success" title="ใบแจ้งซ่อมที่ <?php 
    echo $r_rp['rp_id'];
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:detail_customer_fix.php

示例8: while

echo $r_customer['c_phone'];
?>
</td>
            </tr>
        </table>
        
        <table class="table table-bordered">
            <tr>
                <th>ลำดับ</th>
                <th>รหัสใบแจ้งซ่อม</th>
                <th>วันที่</th>
                <th>สถานะ</th>
            </tr>
            <?php 
$i = 1;
while ($r = assoc_get($result_repair)) {
    ?>
            <tr>
                <td><?php 
    echo $i;
    ?>
</td>
                <td>RP-<?php 
    echo $r['rp_id'];
    ?>
</td>
                <td><?php 
    echo $r['rp_datekey'];
    ?>
</td>
                <?php 
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:detail_customer.php

示例9: while

                    <input type="text" class="form-control" name="send[sr_company]" placeholder="ร้านที่ส่งซ่อม">
                </div>
            </div>
            <div class="form-group">
                <label for="sendrepair" class="col-sm-2 control-label">เบอร์โทรศัพท์</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" name="send[sr_phone]" id="phone" placeholder="เบอร์โทรศัพท์">
                </div>
            </div>
            <div class="form-group">
                <label for="sendrepair" class="col-sm-2 control-label">รหัสใบแจ้งซ่อม</label>
                <div class="col-sm-5">
                    <select name="send[rp_id]" class="form-control">
                        <option value="">-- เลือก --</option>
                        <?php 
while ($r = assoc_get($query_rp)) {
    ?>
                        <option value="<?php 
    echo $r['rp_id'];
    ?>
"><?php 
    echo $r['rp_id'];
    ?>
</option>
                        <?php 
}
?>
                    </select>
                </div>
            </div>
            <div class="form-group">
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:form_send_repair.php

示例10: delete_data

    delete_data('type_repair', 'tr_id', $_GET['id'], $con);
    echo "<script>window.location='index.php?system=1&module=control&action=type_repair'</script>";
}
$tr = getTable('type_repair', $con);
?>
    <table id="table-data" class="display table-data" border="1" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>รหัส</th>
                <th>ชื่อลูกค้า</th>
                <th style="width:15%">สถานะ</th>
            </tr>
        </thead>
        <tbody>
            <?php 
while ($r = assoc_get($tr)) {
    ?>
            <tr>
                <td><?php 
    echo $r['tr_id'];
    ?>
</td>
                <td><?php 
    echo $r['tr_name'];
    ?>
</td>
                <td align="center">
                    <a href="#" data-code="<?php 
    echo $r['tr_id'];
    ?>
" data-name="<?php 
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:type_repair.php

示例11: getTable

    <hr style="border: 1px solid #999">
    <div class="panel-body">
        <form action="" method="POST">
        <table class="table table-bordered">
            <tr><td>รหัสลูกค้า : </td><td colspan="3"><input type="text" name="c_id" class="form-control" readonly></td></tr>
            <tr><td width="20%">ชื่อ-นามสกุล : </td><td colspan="3"><input type="text" name="flname" class="form-control" required></td></tr>
            <tr><td>ที่อยู่ : </td><td colspan="3"><textarea class="form-control" rows="5" name="address"></textarea></td></tr>
            <tr><td>เบอร์โทรศัพท์ : </td><td colspan="3"><input type="text" class="form-control" maxlength="20" name="phone" required></td></tr>
            <tr><td>รายการ : </td>
                <td>
                    <?php 
$rs_tr = getTable('type_repair', $con);
?>
                    <select name="pd_type_id" id="" class="form-control" required>
                        <?php 
while ($tr = assoc_get($rs_tr)) {
    ?>
                        <option value="<?php 
    echo $tr['tr_id'];
    ?>
"><?php 
    echo $tr['tr_name'];
    ?>
</option>
                        <?php 
}
?>
                    </select>
                </td>
                <td>รุ่น : </td>
                <td>
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:insert_repair.php

示例12: while

echo $rs_customer['c_flname'];
?>
"></td></tr>
            <tr><td>ที่อยู่ : </td><td colspan="3"><textarea class="form-control" rows="5" name="address" readonly><?php 
echo $rs_customer['c_address'];
?>
</textarea></td></tr>
            <tr><td>เบอร์โทรศัพท์ : </td><td colspan="3"><input type="text" class="form-control" maxlength="20" name="phone" readonly value="<?php 
echo $rs_customer['c_phone'];
?>
"></td></tr>
            <tr><td>รายการ : </td>
                <td>
                    <select name="pd_type_id" class="form-control" required>
                        <?php 
while ($rs_type = assoc_get($t_repair)) {
    if ($rs_repair['tr_id'] == $rs_type['tr_id']) {
        ?>
                                <option value="<?php 
        echo $rs_type['tr_id'];
        ?>
" selected><?php 
        echo $rs_type['tr_name'];
        ?>
</option>
                            <?php 
    } else {
        ?>
                                <option value="<?php 
        echo $rs_type['tr_id'];
        ?>
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:edit_repair.php

示例13: connect_db

                    <th>รหัส</th>
                    <th>ชื่อลูกค้า</th>
                    <th>วันที่เวลา</th>
                    <th>สถานะ</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <?php 
$con = connect_db();
$repair = getTable_order('repair', 'rp_id', 'DESC', $con);
$customer = getTable('customer_fix', $con);
while ($rc = assoc_get($customer)) {
    $arr_cus[] = array('c_id' => $rc['c_id'], 'name' => $rc['c_flname']);
}
while ($r = assoc_get($repair)) {
    ?>
                <tr>
                    <td><?php 
    echo $r['rp_id'];
    ?>
</td>
                    <td>
                        <?php 
    foreach ($arr_cus as $val) {
        if ($r['c_id'] == $val['c_id']) {
            echo $val['name'];
        }
    }
    ?>
                    </td>
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:inform_repair.php

示例14: getTable_where

<?php

$repair = getTable_where('repair', 'rp_id', $_GET['id'], $con);
$type_tr = getTable('type_repair', $con);
$rs_r = assoc_get($repair);
$customer = getTable_where('customer_fix', 'c_id', $rs_r['c_id'], $con);
$rs_cus = assoc_get($customer);
$arr_rp = unserialize($rs_r['rp_item']);
$arr_sw = unserialize($rs_r['rp_software']);
//dieArray($arr_sw);
while ($rs_type = assoc_get($type_tr)) {
    if ($rs_type['tr_id'] == $rs_r['tr_id']) {
        $pd = $rs_type['tr_name'];
    }
}
?>
<div class="height-report" style="padding-top:10px">
     <div class="container">
        <div class="title-report col-md-12"><?php 
echo $name_report;
?>
<span class="pull-right"> สำหรับลูกค้า</span></div>
        <table class="table table-bordered height-table">
            <tr>
                <td colspan="3">
                    <span>พีเอส ซัพพลาย</span><span class="pull-right">เลขที่ <?php 
echo $rs_r['rp_id'];
?>
</span><br>
                    <span>อาคารคอมพิวเตอร์พลาซ่า ห้อง A12</span> <br>
                    <span>312 ถ.มณีนพรัตน์ ต.ศรีภูมิ อ.เมือง จ.เชียงใหม่ 50200</span><span class="pull-right">วันที่ <?php 
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:repair.php

示例15: connect_db

<?php

$con = connect_db();
$rs_sr = getTable_where('send_repair', 'sr_id', $_GET['id'], $con);
$r_sr = assoc_get($rs_sr);
$rs_rp = getTable_where('repair_tb', 'rp_id', $r_sr['rp_id'], $con);
$r_rp = assoc_get($rs_rp);
?>
<div class="panel panel-default">
    <div class="panel-heading">รายละเอียดใบส่งซ่อม</div>
    <div class="panel-body">
        <table class="table table-bordered">
            <tr>
                <td width="20%">รหัสใบส่งซ่อม</td>
                <td><?php 
echo $r_sr['sr_id'];
?>
</td>
            </tr>           
            <tr>
                <td>ชื่อร้านที่ส่งซ่อม</td>
                <td><?php 
echo $r_sr['sr_company'];
?>
</td>
            </tr> 
            <tr>
                <td>รหัสใบแจ้งซ่อม</td>
                <td><?php 
echo $r_rp['rp_id'];
?>
开发者ID:bbuffsoft,项目名称:ps_supply,代码行数:31,代码来源:detail_send_repair.php


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