function get_conv_report_table_html($table_data) { $html = '<table>'; $html .= '<tr>'; $html .= '<td class="row_top">Номер заказа</td>'; $html .= '<td class="row_top inf_row">ТМП</td>'; $html .= '<td class="row_top inf_row">Ответственный инженер</td>'; $html .= '<td class="row_top inf_row">Неисправность</td>'; $html .= '<td class="row_top inf_row">Дата приема</td>'; $html .= '<td class="row_top inf_row">Статус</td>'; $html .= '<td class="row_top inf_row">Дата и время установки статуса</td>'; $html .= '</tr>'; // Обрабоатываем данные; foreach ($table_data as $key => $data_item) { // Стиль строки; if ($key % 2 != 0) { $class = 'row_1'; } else { $class = 'row_2'; } if (isset($data_item['marker'])) { switch ($data_item['marker']) { case 'MARK': $print = 'color: black;font-weight: bold;'; break; case 'ALERT': $print = 'color: red;font-weight: bold;'; break; } } else { $print = ''; } $html .= '<tr>'; $html .= '<td class="' . $class . ' numm_info" style="' . $print . '" align="center">' . $data_item['numm'] . '</td>'; $html .= '<td class="' . $class . ' inf_row" align="center">' . $data_item['tu'] . ' / ' . $data_item['model'] . ' / ' . $data_item['torg'] . '</td>'; $html .= '<td class="' . $class . ' inf_row" align="center">' . get_user_full_name(0, $data_item['inj']) . '.</td>'; $html .= '<td class="' . $class . ' inf_row" align="left" width="200px">' . $data_item['a1'] . '</td>'; $html .= '<td class="' . $class . ' inf_row" align="center">' . get_local_date_time($data_item['date1'], 1) . '</td>'; $html .= '<td class="' . $class . ' inf_row" align="left">' . get_status_name($data_item['status']) . '</td>'; // Для того что бы определить время установки статуса, нам надо перебрать весь dvj этого заказа; $dvj_array = explode("\r\n", $data_item['dvj']); foreach ($dvj_array as $dvj_item) { // Проверяем, содежит ли эта строка данные; if (find_text(get_status_name($data_item['status']), $dvj_item)) { // Если мы нашли такой текст, выводим эту строку для начала; $dvj_temp = explode('|', $dvj_item); } } $html .= '<td class="' . $class . ' inf_row" align="center">' . get_local_date_time($dvj_temp[0], 1) . '</td>'; $html .= '</tr>'; } $html .= '</table>'; return $html; }
use Components\Classes\db; use Components\Entity\Order; use Components\Entity\OrderHistory; use Components\Entity\Employee; use Components\Classes\Author; $result = array(); if (!empty($_GET['action'])) { switch ($_GET['action']) { case 'save': if (!empty($_GET['field'])) { $bDoUpdate = true; $bDoHistoryUpdate = true; switch ($_GET['field']) { case 'status_id': $result[] = get_status_name($_GET['value']); $value = $_GET['value']; break; case 'referrer_payment_status': $bDoHistoryUpdate = false; $value = $_GET['value']; $result[] = 'Оплачено'; Order::update($_GET['order_id'], array('referrer_payment_date' => date('Y-m-d H:i:s'))); break; case 'oplata_kln': case 'cost_kln': case 'cost_auth': case 'author_paid': case 'company_paid': case 'about_mng': //коментарий
if (isset($_POST['submit_yes'])) { foreach ($ids as $id) { //make sure not instructor of a course $id = intval($id); $sql = "SELECT course_id FROM " . TABLE_PREFIX . "courses WHERE member_id={$id}"; $result = mysql_query($sql, $db); if (!mysql_fetch_assoc($result)) { $sql2 = "UPDATE " . TABLE_PREFIX . "members SET status=" . $status . ", creation_date = creation_date WHERE member_id={$id}"; $result2 = mysql_query($sql2, $db); } } $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY'); header('Location: ' . AT_BASE_HREF . 'mods/_core/users/users.php'); exit; } else { if (isset($_POST['submit_no'])) { $msg->addFeedback('CANCELLED'); header('Location: ' . AT_BASE_HREF . 'mods/_core/users/users.php'); exit; } } require AT_INCLUDE_PATH . 'header.inc.php'; $names = get_login($ids); $names_html = '<ul>' . html_get_list($names) . '</ul>'; $status_name = get_status_name($status); $hidden_vars['ids'] = implode(',', array_keys($names)); $hidden_vars['status'] = $status; $confirm = array('EDIT_STATUS', $status_name, $names_html); $msg->addConfirm($confirm, $hidden_vars); $msg->printConfirm(); require AT_INCLUDE_PATH . 'footer.inc.php';
$score = $record['Score']; if ($score < 0) { $score = '<span class="scorered">0 <img src="icn/status-busy.png" title="Test today!" alt="Test today!" /></span>'; } else { $score = '<span class="scoregreen">' . floor($score) . ($record['Score2'] < 0 ? ' <img src="icn/status-away.png" title="Test tomorrow!" alt="Test tomorrow!" />' : ' <img src="icn/status.png" title="-" alt="-" />') . '</span>'; } echo '<tr>'; echo '<td class="td1 center"><a name="rec' . $record['WoID'] . '"><input name="marked[]" type="checkbox" class="markcheck" value="' . $record['WoID'] . '" ' . checkTest($record['WoID'], 'marked') . ' /></a></td>'; echo '<td class="td1 center" nowrap="nowrap"> <a href="' . $_SERVER['PHP_SELF'] . '?chg=' . $record['WoID'] . '"><img src="icn/sticky-note--pencil.png" title="Edit" alt="Edit" /></a> <a href="' . $_SERVER['PHP_SELF'] . '?del=' . $record['WoID'] . '"><img src="icn/minus-button.png" title="Delete" alt="Delete" /></a> </td>'; if ($currentlang == '') { echo '<td class="td1 center">' . tohtml($record['LgName']) . '</td>'; } echo '<td class="td1 "><span' . ($record['LgRightToLeft'] ? ' dir="rtl" ' : '') . '>' . tohtml($record['WoText']) . '</span>' . ($record['WoRomanization'] != '' ? ' / <span id="roman' . $record['WoID'] . '" class="edit_area clickedit">' . tohtml(repl_tab_nl($record['WoRomanization'])) . '</span>' : ' / <span id="roman' . $record['WoID'] . '" class="edit_area clickedit">*</span>') . '</td>'; echo '<td class="td1"><span id="trans' . $record['WoID'] . '" class="edit_area clickedit">' . tohtml(repl_tab_nl($record['WoTranslation'])) . '</span> <span class="smallgray2">' . tohtml($record['taglist']) . '</span></td>'; echo '<td class="td1 center"><b>' . ($record['SentOK'] != 0 ? '<img src="icn/status.png" title="' . tohtml($record['WoSentence']) . '" alt="Yes" />' : '<img src="icn/status-busy.png" title="(No valid sentence)" alt="No" />') . '</b></td>'; echo '<td class="td1 center" title="' . tohtml(get_status_name($record['WoStatus'])) . '">' . tohtml(get_status_abbr($record['WoStatus'])) . ($record['WoStatus'] < 98 ? '/' . $days : '') . '</td>'; echo '<td class="td1 center" nowrap="nowrap">' . $score . '</td>'; if ($currentsort == 6) { echo '<td class="td1 center" nowrap="nowrap">' . $record['textswordcount'] . '</td>'; } echo "</tr>\n"; } mysql_free_result($res); ?> </table> </form> <script type="text/javascript"> //<![CDATA[ $('#waitinfo').addClass('hide'); //]]>
?> " onmouseup="this.checked=!this.checked" /></td> <td><?php echo $row['login']; ?> </td> <?php $startend_date_longs_format = _AT('startend_date_longs_format'); ?> <td><?php echo AT_print($row['last_name'], 'members.last_name'); ?> </td> <td><?php echo get_status_name($row['status']); ?> </td> </tr> <?php } ?> </tbody> <?php } else { ?> <tr> <td colspan="<?php echo 9 + $col_counts; ?>
function get_colored_status_msg($n) { return '<span class="status' . $n . '"> ' . tohtml(get_status_name($n)) . ' [' . tohtml(get_status_abbr($n)) . '] </span>'; }
$t->linkName = "cost_kln"; $t = $frm->Text(180, $ypos, 115, $order_change_history["oplata_kln_new"]); $t->linkName = "oplata_kln"; $t = $frm->Text(350, $ypos, 115, $order_change_history["company_paid_new"]); $t->linkName = "company_paid"; $ypos += 30; } $frm->Label("Гонорар автора, " . $ofc_currency, 10, $ypos); $frm->Label("Оплачено автору, " . $ofc_currency, 180, $ypos); $frm->Label("Статус заказа", 350, $ypos); $ypos += 20; $t = $frm->Text(10, $ypos, 115, $order_change_history["cost_auth_new"]); $t->linkName = "cost_auth"; $t = $frm->Text(180, $ypos, 115, $order_change_history["author_paid_new"]); $t->linkName = "author_paid"; $s = $frm->Text(350, $ypos, 200, get_status_name($order_change_history['status_id_new'])); //21 $s->linkName = "status_id"; $oform = unserialize($order_change_history['oform_new']); if (array_key_exists($oform[0], $data_oform_fonts)) { $fontname_index = $oform[0]; } else { $fontname_index = 0; } $oform_fntnm = $frm->Hidden($data_oform_fonts[$fontname_index]); //font name 23 $oform_fntnm->linkName = "fontnm"; $f = $frm->Hidden($oform[1]); // font size 24 $f->linkName = "fontsz"; $f = $frm->Hidden($data_oform_interv[$oform[2]]);
$ypos += 20; $t = $frm->Text(10, $ypos, 200, calculate_debt_to_company($order_info["cost_kln"], $order_info["cost_auth"], $order_info['filial_id'])); $t->Disabled = true; } else { $frm->Label("Гонорар автора, " . $ofc_currency, 10, $ypos); $frm->Label("Оплачено автору, " . $ofc_currency, 230, $ypos); $ypos += 20; $t = $frm->Text(10, $ypos, 115, $order_info["cost_auth"]); $t->linkName = "cost_auth"; $t = $frm->Text(230, $ypos, 115, $order_info["author_paid"]); $t->linkName = "author_paid"; } $ypos += 30; $frm->Label("Статус заказа", 10, $ypos); $ypos += 20; $t = $frm->Text(10, $ypos, 200, get_status_name($order_info['status_id'])); //21 $t->linkName = "status_id"; $oform = unserialize($order_info['oform']); if (array_key_exists($oform[0], $data_oform_fonts)) { $fontname_index = $oform[0]; } else { $fontname_index = 0; } $oform_fntnm = $frm->Hidden($data_oform_fonts[$fontname_index]); //font name 23 $oform_fntnm->linkName = "fontnm"; $f = $frm->Hidden($oform[1]); // font size 24 $f->linkName = "fontsz"; $f = $frm->Hidden($data_oform_interv[$oform[2]]);
public function find_status_date_in_dvj($numm, $status_id) { global $db; // Получаем полное название статуса; $status_name = get_status_name($status_id); // Далее поулчаем dvj заказаl $sql = "SELECT `dvj` FROM `remont` WHERE `numm` = '" . $numm . "'"; $dvj = $db->one($sql); // Рвем его на строки; $dvj_array = explode("\n", $dvj); // Пробегаемся по строкам и ищем появление этого статуса; $status_date = ''; foreach ($dvj_array as $dvj_line) { if ($this->find_text($dvj_line, $status_name) == true) { // Поулчаем время из строки; $line_array = explode('|', $dvj_line); $status_date = $line_array[0]; } } return $status_date; }
$sql = "SELECT `id` FROM `couriers_packages` WHERE `package_numm` = '" . $_POST['numm'] . "' AND `status` not in (0, 3);"; $exist_delivery = $db_rs->one($sql); if (count($exist_delivery) > 0) { //if(){ //} } } /* * Статус и номер телефона клиента; * */ //$html .= '<tr>'; //$html .= '<td>'; $html .= '<script> new Clipboard(\'#order_numm\'); </script>'; $html .= '<div class="info_bordered_field" style="display: inline-block;"><div class="field_title" style="">Номер</div><div id="order_numm" class="numm_' . $numm_data['numm'] . '" style="cursor: pointer" data-clipboard-target=".numm_' . $numm_data['numm'] . '">' . $_POST['numm'] . '</div></div><div class="info_bordered_field" style="display: inline-block;"><div class="field_title" style="">ФИО</div>' . $client . '</div><div class="info_bordered_field" style="display: inline-block;"><div class="field_title" style="">Статус</div>' . get_status_name($numm_data['status']) . '</div><div class="info_bordered_field" style="display: inline-block;"><div class="field_title" style="">Телефон</div><div id="info_client_phone"><a href="tel:' . $numm_data['tel1'] . '">' . $numm_data['tel1'] . '</a></div></div>'; /** скрытый div с именем */ $html .= '<div id="client_fio" hidden>' . $client . '</div>'; //$html .= '</td>'; //$html .= '</tr>'; /* * Тип техники, модель и прочее; * */ //$html .= '<tr>'; //$html .= '<td>'; $html .= '<div class="info_bordered_field" align="center"><div class="field_title" style="">Тип техники / Производитель / Модель / Серийный номер</div><div id="tpm">' . $numm_data['tu'] . ' / ' . $numm_data['torg'] . ' / ' . $numm_data['model'] . ' / ' . $numm_data['ser_no'] . '</div></div>'; //$html .= '</td>'; //$html .= '</tr>'; /* * Всякого рода описания неисправностей и прочее; * */
function _get_status_name($value, $row, $table, &$info) { $status_name = get_status_name($value); if (empty($status_name)) { return '<i>неизвестно</i>'; } else { return $status_name; } }