public static function displayNewRow($index, $id, $nhanvien, $email, $gioitinh, $capdo, $thanhtich, $khenthuong, $ngay) { //$str="<div id='trNewRow' align='center'>"; // $str.='<table align="center" border="0" cellspacing="0" cellpadding="0">'; $str = '<td>'; $str .= "<input type='hidden' id='txtNewID' value='" . $id . "'>"; $str .= "</td>"; $str .= '<td>'; $str .= '<select style="font-size:12px;width:150px;text-align: center;" id="cbbAddRow" onchange="selectUser()">'; $str .= '<option value="-1">---Chọn nhân viên---</option>'; $users = UsersBUS::getUsersByRole(3); for ($i = 0; $i < count($users); $i++) { if ($users[$i]['id'] == $id) { $str .= "<option selected style='font-size:12px;' value='" . $users[$i]['id'] . "'>" . $users[$i]['hoten'] . "</option>"; } else { $str .= "<option style='font-size:12px;' value='" . $users[$i]['id'] . "'>" . $users[$i]['hoten'] . "</option>"; } } $str .= '</select>'; $str .= '</td>'; $str .= '<td width="155px" style="color:blue;">' . $email . '</td>'; $str .= '<td align="center" width="50px">'; if ($gioitinh == 1) { $str .= 'Nam'; } else { $str .= 'Nữ'; } $str .= '</td>'; $str .= '<td align="center" width="60px">' . $capdo . '</td>'; $str .= '<td align="center">'; $str .= '<select id="cbbNewThanhTich">'; $str .= '<option value="-1" selected>---Chọn thành tích---</option>'; if ($thanhtich == 1) { $str .= '<option value="1" selected>Trung bình</option>'; } else { $str .= '<option value="1">Trung bình</option>'; } if ($thanhtich == 2) { $str .= '<option value="2" selected>Khá</option>'; } else { $str .= '<option value="2">Khá</option>'; } if ($thanhtich == 3) { $str .= '<option value="3" selected>Xuất sắc</option>'; } else { $str .= '<option value="3">Xuất sắc</option>'; } $str .= '</select>'; $str .= '</td>'; $str .= '<td>'; $str .= '<input id="txtNewKhenThuong" type="text" style="width:300px;" value="' . $khenthuong . '" />'; $str .= '</td>'; $str .= '<td>'; $str .= '<script>'; $str .= '$(function() {'; $str .= '$( "#txtDate_New" ).datepicker({dateFormat:"yy-mm-dd", showButtonPanel: true})'; $str .= '});'; $str .= '</script>'; if ($ngay != "") { $str .= '<input id="txtDate_New" type="text" style="width:70px;" value="' . $ngay . '">'; } else { $str .= '<input id="txtDate_New" type="text" style="width:70px;" value="' . date("Y-m-d") . '">'; } $str .= '</td>'; $str .= '<td><a href="#" onclick="addNew();"><img src="images/icon_32_new.png"></a></td>'; // $str.="</table>"; // $str.="</div>"; return $str; }
<td>Ngày thu:</td> <td colspan="2"> <script> $(function() { $( "#txtDate" ).datepicker({dateFormat:'yy-mm-dd', showButtonPanel: true}); }); </script> <input id="txtDate" type="text" style="width:70px;"> </td> </tr> <tr> <td>Nhân viên thu: <span style="color:red;">(*)</span></td> <td><select style="width:300px;" id="cbbNhanvien"> <?php include_once "../BUS/UsersBUS.php"; $users = UsersBUS::getUsersByRole(3); for ($i = 0; $i < count($users); $i++) { echo '<option value="' . $users[$i]['id'] . '">' . $users[$i]['hoten'] . '</option>'; } ?> </select> </td> </tr> </table> </form> <div class="list" style="padding-top:20px;" id="dsThuchi"> <!-- <table width="70%" border="0" align="center" cellspacing="0" cellpadding="0"> <tr class="title"> <td width="30px" align="center">#</td> <td width="30px" align="center">