コード例 #1
0
ファイル: add_craft.php プロジェクト: ab300819/CraftManage
$db = new \sql\MysqlPDO($level);
$id = $_GET['id'];
$head = array('craft_num', 'material_num', 'belong', 'craft_type');
//$nuclear = array(
//    '机加工' => 'add_machine.php',
//    '铸造' => 'add_foundry.php',
//    '焊接' => 'add_welding.php',
//    '锻造' => 'add_forging.php',
//    '热处理' => 'add_heat.php',
//    '装配' => 'add_assembly.php',
//
//);
//$metallurgy = array(
//    '机加工' => 'add_metallurgy.php'
//);
$list = $db->get_choice_select(PRODUCT, $head, "id={$id}");
if ($list == null) {
    echo "<script>\n            alert('没有相关产品!');\n            window.history.back();\n          </script>";
} else {
    jump($list, $id);
}
function jump($list, $id)
{
    if ($list['belong'] == '核电') {
        switch ($list['craft_type']) {
            case '机加工':
                echo "<script>window.location='../panel_machine.php?id='+{$id};</script>";
                break;
            case '铸造':
                echo "<script>window.location='../panel_foundry.php?id='+{$id};</script>";
                break;
コード例 #2
0
ファイル: list_product.php プロジェクト: ab300819/CraftManage
//
?>

            <tr>
                <th>物料编码</th>
                <th>工艺编号</th>
                <th>产品名称</th>
                <th>产品型号</th>
                <th>产品类别</th>
                <th>工艺类型</th>
                <th>编辑</th>
            </tr>
            <tr>
                <?php 
$key = array('id', 'material_num', 'craft_num', 'name', 'model', 'belong', 'craft_type');
$data = $db->get_choice_select(PRODUCT, $key);
if ($data == null) {
    echo "<td>&nbsp;</td>";
    echo "<td>&nbsp;</td>";
    echo "<td>&nbsp;</td>";
    echo "<td>&nbsp;</td>";
    echo "<td>&nbsp;</td>";
    echo "<td>&nbsp;</td>";
    echo "<td>&nbsp;</td>";
} else {
    $list = two_key_value($key, $data);
    foreach ($list as $cell) {
        foreach ($cell as $name => $value) {
            if ($name != 'id') {
                echo "<td>{$value}</td>";
            }
コード例 #3
0
ファイル: manage_panel.php プロジェクト: ab300819/CraftManage
        <table class="show_list">
=======
<div class="list_content">
    <form action="../admin/manage_user.php?action=add" method="post" id="user" onkeydown="dosSubmit();">
        <table class="show-list" align="center">
>>>>>>> dev
            <tr>
                <th>工号</th>
                <th>密码</th>
                <th>级别</th>
                <th>操作</th>
            </tr>
            <tr>
                <?php 
$key = array('id', 'username', 'password', 'level');
$data = $db->get_choice_select(USER, $key);
if ($data == null) {
    echo '没有账户!';
} else {
    $list = two_key_value($key, $data);
    foreach ($list as $cell) {
        foreach ($cell as $name => $value) {
            if ($name != 'id') {
                echo "<td>{$value}</td>";
            }
        }
        echo "<td><a href='javascript:delUser({$cell['id']});'>删除</a></td>";
        echo "</tr>";
    }
}
?>
コード例 #4
0
        }
    </script>
</head>
<body>
<h1>工艺编辑系统(build)</h1>

<div><a href="../list_product.php">主页</a></div>

<h2>产品信息</h2>

<div>
    <table width="100%">
        <?php 
$head = array('物料名称', '工艺路线名称', '规格型号', '物料编码', '材质', '单位');
$table_column = array('material_name', 'craft_line', 'standard', 'material_num', 'material');
$list = $db->get_choice_select(PRODUCT, $table_column, "id={$product_id}");
$list['unit'] = null;
if ($list == null) {
    echo "<script>\n                    alert('没有相关数据!');\n                    window.history.back();\n                  </script>";
} else {
    $content = key_value_change_one($list);
    $table = key_value($head, $content);
    key_value_table($table, 3);
}
?>
    </table>
</div>
<h2>机加工工艺</h2>

<div><a href='../add/add_metallurgy.php?id=<?php 
echo $product_id;