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


PHP Tool::getToolList方法代码示例

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


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

示例1: selectlist

     if (isset($_GET['ttyid'])) {
         $tool->setTypeID($_GET['ttyid']);
     }
     if (isset($_GET['id'])) {
         $id = $_GET['id'];
     } else {
         $id = 'Tool_ID';
     }
     if (isset($_GET['label'])) {
         $label = $_GET['label'];
     } else {
         $label = "Select Tool To Edit";
     }
     $tool->setTypeID($_GET['ttyid']);
     $tool->createToolList();
     $sel = new selectlist($id, $tool->getToolList(), $label, 'Tool_ID', 'td', '', '');
     break;
 case 'holder':
     $holder = new Holder();
     $holder->createHolderList();
     $sel = new selectlist('Holder_ID', $holder->getHolderList(), 'Select Holder', 'Holder_ID', 'Holder_Description', '', '');
     break;
 case 'tmisc':
     $tmisc = new Tmisc();
     $tmisc->createTmiscList();
     $sel = new selectlist('ToolMisc_ID', $tmisc->getTmiscList(), 'Select Accessory', 'ToolMisc_ID', 'Misc_Desc', '', '');
     break;
 case 'toolbody':
     $toolbody = new Toolbody();
     if (isset($_GET['tdia'])) {
         $toolbody->setCdiameter($_GET['tdia']);
开发者ID:sknagesh,项目名称:divyaeng2,代码行数:31,代码来源:class.selectlist.php

示例2: showOpeToolUI


//.........这里部分代码省略.........
\t\t\t\t\t   </fieldset>
\t\t\t\t\t   <fieldset><legend>Tool Working Details</legend>
\t\t\t\t\t   <p>
\t\t\t\t\t     <label>Tool Projection from Holder</label>
\t\t\t\t\t     <input id="tooloh" name="tooloh" size="25" class="required number"/>
\t\t\t\t\t   </p>
\t\t\t\t\t   <p>
\t\t\t\t\t     <label>Work Description</label>
\t\t\t\t\t     <input id="desc" name="desc" size="25" class="required"/>
\t\t\t\t\t   </p>
\t\t\t\t\t   <p>
\t\t\t\t\t     <label>Tool Cutting Time in mins</label>
\t\t\t\t\t     <input id="cuttingmins" name="cuttingmins" size="25" class="number"/>
\t\t\t\t\t   </p>
\t\t\t\t\t   <p>
\t\t\t\t\t     <label>Tool Life</label>
\t\t\t\t\t     <input id="toollife" name="toollife" size="25" />
\t\t\t\t\t   </p>
\t\t\t\t\t</fieldset>
\t\t\t\t</fieldset>
\t\t\t   <p>
\t\t\t     <input class="submit" type="submit" value="Save"/>
\t\t\t   </p>

_END;
        } else {
            $db = Database::getInstance();
            $cxn = $db->getConnection();
            $q = "SELECT * FROM Ope_Tool WHERE Ope_Drawing_ID={$this->opedrawingid} AND Deleted=0";
            //				print($q);
            if (!($res = $cxn->query($q))) {
                exit("error : {$cxn->error}");
            }
            $i = 0;
            if ($res->num_rows > 0) {
                print "<p>Tools Aded To this Operation</p>";
                print "<table border=\"1\" cellspacing=\"1\" bgcolor=\"#7FFFD4\">";
                print "<tr><th>Delete</th><th>Preferred Tool</th><th>Preferred Holder</th><th>Alternate Tool</th><th>Alternate Holder</th>\n\t\t\t\t\t\t\t<th>Description</th><th>Tool OH</th><th>Cutting Time</th><th>Tool Life</th></tr>";
                while ($row = mysqli_fetch_assoc($res)) {
                    print "<tr><td>";
                    print "<input type=\"checkbox\" name=\"tdel[{$i}]\" value=\"{$row['Ope_Tool_ID']}\" >\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"otid[{$i}]\" value=\"{$row['Ope_Tool_ID']}\"></td><td>";
                    //preferred tool
                    $q1 = "SELECT * FROM Tool WHERE Tool_ID={$row['Tool_ID_1']}";
                    $res1 = $cxn->query($q1);
                    $row1 = mysqli_fetch_assoc($res1);
                    $tool = new Tool();
                    $tool->setCdiameter($row1['Cutting_Dia']);
                    $tool->setTypeID($row1['Tool_Type_ID']);
                    $tool->createToolList();
                    print "<table><tr><td>";
                    $sel = new selectlist('tid1[' . $i . ']', $tool->getToolList(), 'Select Tool', 'Tool_ID', 'td', '', $row['Tool_ID_1']);
                    print "</td></tr>";
                    $toolbody = new Toolbody();
                    $toolbody->setToolID($row['Tool_ID_1']);
                    $toolbody->createToolBodyList();
                    print "<tr><td><div id=\"bd1{$i}\">";
                    $sel = new selectlist('tbid1[' . $i . ']', $toolbody->getToolBodyList(), 'Select Tool Body', 'ToolBody_ID', 'td', '', $row['ToolBody_ID_1']);
                    print "</div></td></tr>";
                    print "</table></td><td>";
                    //preferred holder
                    $holder = new Holder();
                    $holder->createHolderList();
                    $sel = new selectlist('hid1[' . $i . ']', $holder->getHolderList(), 'Select Holder', 'Holder_ID', 'Holder_Description', '', $row['Holder_ID_1']);
                    print "</td><td>";
                    //alternate tool
                    if ($row['Tool_ID_2'] != 0) {
                        $q2 = "SELECT * FROM Tool WHERE Tool_ID={$row['Tool_ID_2']}";
                    } else {
                        $q2 = "SELECT * FROM Tool WHERE Tool_ID={$row['Tool_ID_1']}";
                    }
                    $res2 = $cxn->query($q2);
                    $row2 = mysqli_fetch_assoc($res2);
                    $tool->setCdiameter($row2['Cutting_Dia']);
                    $tool->setTypeID($row2['Tool_Type_ID']);
                    $tool->createToolList();
                    print "<table><tr><td>";
                    $sel = new selectlist('tid2[' . $i . ']', $tool->getToolList(), 'Select Tool', 'Tool_ID', 'td', '', $row['Tool_ID_2']);
                    print "</td></tr>";
                    $toolbody2 = new Toolbody();
                    $toolbody2->setToolID($row['Tool_ID_2']);
                    $toolbody2->createToolBodyList();
                    print "<tr><td><div id=\"bd2{$i}\">";
                    $sel = new selectlist('tbid2[' . $i . ']', $toolbody2->getToolBodyList(), 'Select Tool Body', 'ToolBody_ID', 'td', '', $row['ToolBody_ID_2']);
                    print "</div></td></tr>";
                    print "</table></td><td>";
                    //alternate holder
                    $sel = new selectlist('hid2[' . $i . ']', $holder->getHolderList(), 'Select Holder', 'Holder_ID', 'Holder_Description', '', $row['Holder_ID_2']);
                    print "</td><td>";
                    print "<input type=\"text\" name=\"desc[{$i}]\" value=\"{$row['Ope_Tool_Desc']}\"></td>";
                    print "<td><input type=\"text\" name=\"toh[{$i}]\" size=\"5\" value=\"{$row['Ope_Tool_OH']}\"></td>";
                    print "<td><input type=\"text\" name=\"ct[{$i}]\" size=\"5\" value=\"{$row['Cutting_MIns']}\"></td>";
                    print "<td><input type=\"text\" name=\"tl[{$i}]\" size=\"5\" value=\"{$row['Ope_Tool_Life']}\"></td>";
                    $i++;
                }
                print "</table>\n\t\t\t\t\t   <p>\n\t\t\t\t\t     <input class=\"submit\" type=\"submit\" value=\"Save\"/><input type=\"button\" Value=\"Approve\" id=\"abutton\"><input name=\"appremarks\" size=\"50\" id=\"appremarks\">\n\t\t\t\t\t   </p>";
            } else {
                print "<p>No Tools Added for This Operation!!</p>";
            }
        }
    }
开发者ID:sknagesh,项目名称:divyaeng2,代码行数:101,代码来源:class.Opetool.php


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