public function resume_ask() { global $charset, $msg; global $opac_url_base; $query = "select * from serialcirc_ask where num_serialcirc_ask_empr = " . $this->empr_id . " order by serialcirc_ask_type asc, serialcirc_ask_statut asc"; $result = mysql_query($query); $display = "\n\t\t\t<div class='row'>\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>" . htmlentities($msg['serialcirc_ask_type'], ENT_QUOTES, $charset) . "</th>\n\t\t\t\t\t\t<th>" . htmlentities($msg['serialcirc_serial_name'], ENT_QUOTES, $charset) . "</th>\n\t\t\t\t\t\t<th>" . htmlentities($msg['serialcirc_ask_date'], ENT_QUOTES, $charset) . "</th>\n\t\t\t\t\t\t<th>" . htmlentities($msg['serialcirc_ask_statut'], ENT_QUOTES, $charset) . "</th>\n\t\t\t\t\t\t<th>" . htmlentities($msg['serialcirc_ask_msg'], ENT_QUOTES, $charset) . "</th>\n\t\t\t\t\t</tr>\n\t\t\t\t\t!!rows!!\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t"; $rows = ""; if (mysql_num_rows($result)) { $i = 0; while ($row = mysql_fetch_object($result)) { if ($row->num_serialcirc_ask_perio != 0) { $query = "select tit1 from notices where notice_id = " . $row->num_serialcirc_ask_perio; $res = mysql_query($query); if (mysql_num_rows($res)) { $serial = mysql_result($res, 0, 0); } } else { $serialcirc = new serialcirc($row->num_serialcirc_ask_serialcirc); $serial = $serialcirc->get_serial_title(); } $rows .= "\n\t\t\t\t\t<tr class='" . ($i % 2 == 0 ? "odd" : "even") . "'>\n\t\t\t\t\t\t<td>" . htmlentities($msg['serialcirc_ask_type_' . $row->serialcirc_ask_type], ENT_QUOTES, $charset) . "</td>\n\t\t\t\t\t\t<td><a href='" . $opac_url_base . "index.php?lvl=notice_display&id=" . $row->num_serialcirc_ask_perio . "'>" . htmlentities($serial, ENT_QUOTES, $charset) . "</a></td>\n\t\t\t\t\t\t<td>" . htmlentities(formatdate($row->serialcirc_ask_date), ENT_QUOTES, $charset) . "</td>\n\t\t\t\t\t\t<td>" . htmlentities($msg['serialcirc_ask_statut_' . $row->serialcirc_ask_statut], ENT_QUOTES, $charset) . "</td>\n\t\t\t\t\t\t<td>" . htmlentities($row->serialcirc_ask_comment, ENT_QUOTES, $charset) . "</td>\n\t\t\t\t\t</tr>"; $i++; } } $display = str_replace("!!rows!!", $rows, $display); return $display; }