當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Operator::createOperatorGrid方法代碼示例

本文整理匯總了PHP中Operator::createOperatorGrid方法的典型用法代碼示例。如果您正苦於以下問題:PHP Operator::createOperatorGrid方法的具體用法?PHP Operator::createOperatorGrid怎麽用?PHP Operator::createOperatorGrid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Operator的用法示例。


在下文中一共展示了Operator::createOperatorGrid方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: showTrainingPlanUI

 function showTrainingPlanUI()
 {
     $db = Database::getInstance();
     $cxn = $db->getConnection();
     $operator = new Operator();
     $operator->createOperatorList();
     $qu = new Question();
     if ($this->planid != '') {
         $q = "SELECT *,DATE_FORMAT(Training_Start_Date,'%d-%m-%Y') as sdt,DATE_FORMAT(Training_End_Date,'%d-%m-%Y') as edt,\n\t(SELECT GROUP_CONCAT(Trainee_ID) FROM Plan_Trainee as pt WHERE pt.Training_Plan_ID={$this->planid}) as trainees FROM Training_Plan as tp \n\tWHERE Training_Plan_ID={$this->planid}";
         if (!($res = $cxn->query($q))) {
             exit("error (showTrainingPlanUI): {$cxn->error}");
         }
         $n = $res->num_rows;
         if ($n > 0) {
             $r = mysqli_fetch_assoc($res);
             $this->trainer = $r['Trainer_Name'];
             $this->startdatedb = $r['Training_Start_Date'];
             $this->startdate = $r['sdt'];
             $this->enddatedb = $r['Training_End_Date'];
             $this->enddate = $r['edt'];
             $this->trainees = $r['trainees'];
             $this->plandesc = $r['Training_Desc'];
             $this->questionid = $r['Question_ID'];
             $this->evaluaterid = $r['Evaluater_ID'];
         }
     }
     echo '<fieldset><legend>Training Details</legend>';
     echo '<p><label>Trainer Name</label><input id="trainer" name="trainer" class="required" value="' . $this->trainer . '"></p>';
     $sel = new selectlist("Evaluater_ID", $operator->getOperatorList(), 'Select Name', 'Operator_ID', 'Operator_Name', 'class="required"', $this->evaluaterid, '1');
     echo '<p><label>Training Start Date</label><input id="startdate" name="startdate" class="required" value="' . $this->startdate . '"><input id="startdatedb" name="startdatedb" type="hidden" value="' . $this->startdatedb . '"></p>';
     echo '<p><label>Training End Date</label><input id="enddate" name="enddate" class="required" value="' . $this->enddate . '"><input id="enddatedb" name="enddatedb" type="hidden" value="' . $this->enddatedb . '"></p>';
     echo '<p><label>Training Description</label><textarea id="plandesc" name="plandesc" cols="45" rows="5" class="required">' . $this->plandesc . '</textarea></p>';
     echo '</fieldset>';
     echo '<fieldset><legend>Select Trainees</legend>';
     $operator->createOperatorGrid($this->trainees);
     echo '</fieldset>';
 }
開發者ID:sknagesh,項目名稱:divyaeng2,代碼行數:37,代碼來源:class.Training.php

示例2: selectlist

     $sel = new selectlist($id, $part->getPartList(), 'Select Part No', 'Drawing_ID', 'name', $req, '');
     break;
 case 'operator':
     $operator = new Operator();
     if (isset($_GET['insp'])) {
         $operator->setInsp();
     }
     if (isset($_GET['class'])) {
         $class = "class=required";
     } else {
         $class = '';
     }
     if (isset($_GET['method'])) {
         $operator->createOperatorList();
         if ($_GET['method'] == 'grid') {
             $operator->createOperatorGrid();
         }
     } else {
         $operator->createOperatorList();
         $sel = new selectlist("Operator_ID", $operator->getOperatorList(), 'Select Name', 'Operator_ID', 'Operator_Name', $class, '', '1');
     }
     break;
 case 'operation':
     $ope = new Operation();
     if (isset($_GET['req'])) {
         $req = 'class=required';
     } else {
         $req = '';
     }
     if (isset($_GET['id'])) {
         $id = $_GET['id'];
開發者ID:sknagesh,項目名稱:divyaeng2,代碼行數:31,代碼來源:class.selectlist.php

示例3: showMeetingUI

    function showMeetingUI()
    {
        $db = Database::getInstance();
        $cxn = $db->getConnection();
        $operator = new Operator();
        $operator->createOperatorList();
        if ($this->meetingid != '') {
            $q = "SELECT *,DATE_FORMAT(Meeting_Date,'%d-%m-%Y') as mdt,Participants FROM Meeting\n\tWHERE Meeting_ID={$this->meetingid}";
            if (!($res = $cxn->query($q))) {
                exit("error (showMeetingUI): {$cxn->error}");
            }
            $n = $res->num_rows;
            if ($n > 0) {
                $r = mysqli_fetch_assoc($res);
                $this->conductedby = $r['Conductedby'];
                $this->meetingdatedb = $r['Meeting_Date'];
                $this->participants = $r['Participants'];
                $this->meetingdatedb = $r['Meeting_Date'];
                $this->meetingdate = $r['mdt'];
                $this->agenda = $r['Agenda'];
                $this->participants = $r['Participants'];
                $qp = "SELECT * FROM Meeting_Points WHERE Meeting_ID={$this->meetingid}";
                if (!($resp = $cxn->query($qp))) {
                    exit("error (showMeetingUI2) {$qp}: {$cxn->error}");
                }
                $i = 0;
                while ($rr = mysqli_fetch_assoc($resp)) {
                    $this->pointsdiscussed[$i] = $rr['Point_Discussed'];
                    $this->meetingpointid[$i] = $rr['Meeting_Point_ID'];
                    $i++;
                }
            }
        }
        echo '<fieldset><legend>Meeting Details</legend>';
        $sel = new selectlist("Conductedby", $operator->getOperatorList(), 'Meeting Conducted By', 'Operator_ID', 'Operator_Name', 'class="required"', $this->conductedby, '1');
        echo '<p><label>Meeting Date</label><input id="meetingdate" name="meetingdate" class="required" value="' . $this->meetingdate . '"><input id="meetingdatedb" name="meetingdatedb" type="hidden" value="' . $this->meetingdatedb . '"></p>';
        echo '<p><label>Meeting Agenda</label><textarea id="agenda" name="agenda" cols="45" rows="5" class="required">' . $this->agenda . '</textarea></p>';
        echo '<p><label>Meeting Participants</label></p>';
        $operator->createOperatorGrid($this->participants);
        echo '</fieldset>';
        echo '<table id="points" width="100%" class="u"><tr><th align="center">Points Discussed</th><th>';
        echo '<th><input type="button" id="addpoint" value="Add Row"></th></tr>';
        if (isset($this->meetingpointid)) {
            $i = 0;
            $j = count($this->pointsdiscussed);
            while ($i < $j) {
                echo '<tr><td colspan="2"><textarea id="pointsdiscussed[' . $i . ']" name="pointsdiscussed[' . $i . ']"  rows="3" cols="40" class="required">' . $this->pointsdiscussed[$i] . '</textarea></td>
			<input type="hidden" id="meetingpointid[' . $i . ']" name="meetingpointid[' . $i . ']" value="' . $this->meetingpointid[$i] . '"></tr>';
                $i++;
            }
        } else {
            echo '<tr><td colspan="2"><textarea id="pointsdiscussed[0]" name="pointsdiscussed[0]"  rows="3" cols="40" class="required"></textarea></td></tr>';
        }
        echo '</table>';
    }
開發者ID:sknagesh,項目名稱:divyaeng2,代碼行數:55,代碼來源:class.Meeting.php


注:本文中的Operator::createOperatorGrid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。