本文整理汇总了PHP中lesson::getByStatUserDate方法的典型用法代码示例。如果您正苦于以下问题:PHP lesson::getByStatUserDate方法的具体用法?PHP lesson::getByStatUserDate怎么用?PHP lesson::getByStatUserDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lesson
的用法示例。
在下文中一共展示了lesson::getByStatUserDate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLessonsByStatUsersDate
function getLessonsByStatUsersDate($idStatus, $idUsers, $dtStart, $dtEnd, $idCountry)
{
$country = new country();
$country->open($idCountry);
$users = "";
foreach ($idUsers as $u) {
$users .= $u . ",";
}
$users = substr($users, 0, -1);
$lesson = new lesson();
$data = array();
$i = 0;
$list_lessons = $lesson->getByStatUserDate($idStatus, $users, $dtStart, $dtEnd);
$html .= '<table id="datatables" class="table table-bordered table-striped responsive">';
$html .= ' <thead>';
$html .= ' <tr>';
$html .= ' <th class="head0">Date</th>';
$html .= ' <th class="head1">User</th>';
$html .= ' <th class="head0">Client</th>';
$html .= ' <th class="head1">Discipline</th>';
$html .= ' <th class="head0">Hours</th>';
$html .= ' <th class="head1">P. f/Hr User</th>';
$html .= ' <th class="head0">P. f/Hr Company</th>';
$html .= ' <th class="head1">Gross Value</th>';
$html .= ' <th class="head0">Discount Value</th>';
$html .= ' <th class="head1">Value to Pay</th>';
$html .= ' <th class="head0">Total Value</th>';
$html .= ' <th class="head1">Evaluation</th>';
$html .= ' </tr>';
$html .= ' </thead>';
$html .= ' <tbody>';
foreach ($list_lessons as $value) {
$i = $i + 1;
$html .= ' <tr src="lesson-report">';
$html .= ' <td>' . $value['date'] . '</td>';
$html .= ' <td>' . $value['user'] . '</td><input name="hdId" type="hidden" value="' . $value['id'] . '"/><input name="hdIdMob" type="hidden" value="' . $value['fk_mobile'] . '"/><input name="hdIdCli" type="hidden" value="' . $value['fk_client'] . '"/><input name="hdObs" type="hidden" value="' . $value['observations'] . '"/>';
$html .= ' <td><a href="#myModalClient" role="button" class="btn btn-link" data-toggle="modal" id="aClient">' . $value['client'] . '</a></td>';
$html .= ' <td>' . $value['discipline'] . '</td>';
$html .= ' <td><a href="#myModalHours" role="button" class="btn btn-link" data-toggle="modal" id="aHours">' . $value['hours'] . '</a></td>';
$html .= ' <td>(' . $country->currency . ') ' . $value['price_hour_user'] . '</td>';
$html .= ' <td>(' . $country->currency . ') ' . $value['price_hour_comp'] . '</td>';
$html .= ' <td>(' . $country->currency . ') ' . $value['value_wo_discount'] . '</td>';
$html .= ' <td>(' . $country->currency . ') ' . $value['value_discount'] . '</td>';
$html .= ' <td>(' . $country->currency . ') ' . $value['value_total_user'] . '</td>';
$html .= ' <td>(' . $country->currency . ') ' . $value['value_total_comp'] . '</td>';
if ($value['evaluation'] != '') {
$html .= ' <td><a href="#myModalEval" role="button" class="btn btn-link" data-toggle="modal" id="aEval">See</a></td>';
} elseif ($value['observations'] != '') {
$html .= ' <td><a href="#myModalObs" role="button" class="btn btn-link" data-toggle="modal" id="aObs">See</a></td>';
} else {
$html .= ' <td>Not evaluated</td>';
}
$html .= ' </tr>';
}
$html .= ' </tbody>';
$html .= '<tfoot>';
$html .= '<tr>';
$html .= '<th style="text-align:right" colspan="10">Sum of Total To Pay (' . $country->currency . '):</th>';
$html .= '<th style="text-align:center" colspan="2"></th>';
$html .= '</tr>';
$html .= '<tr>';
$html .= '<th style="text-align:right" colspan="10">Sum of Total Value (' . $country->currency . '):</th>';
$html .= '<th style="text-align:center" colspan="2"></th>';
$html .= '</tr>';
$html .= '</tfoot>';
$html .= '</table>';
$data['html'] = $html;
$data['count'] = $i;
echo json_encode($data);
}