function makeList($uid, $selfurl, $offset = 0, $numShow = 75) { $db = DB_DataObject::factory('playsms_tblSMSOutgoing'); if (!$offset) { $offset = 0; } $db->limit($offset, $numShow); $db->orderBy("smslog_id DESC"); $pagetitle = "Delivery report"; if (isadmin() && !$uid) { $pagetitle .= " (All)"; } else { $db->uid = $uid; } $db->flag_deleted = '0'; if ($offset) { $newOffset = $offset - $numShow; $prevUrl = "{$selfurl}&offset={$newOffset}"; } else { $prevUrl = "#"; } $newOffset = $offset + $numShow; $nextUrl = "{$selfurl}&offset={$newOffset}"; $exportUrl = "{$selfurl}&op=export"; $linksPrevNext = "<a href='{$prevUrl}'>[ Prev] </a>\n \t\t \t\t <a href='{$nextUrl}'>[ Next ]</a>\n <a href='{$exportUrl}'>[ Export ]</a>"; // create hidden form with the // id to delete, this way it will // get POSTed // $delForm = generateActionSubmitter("del", "{$selfurl}&op=del", "smslog_id"); $resendForm = generateActionSubmitter("resend", "{$selfurl}&op=resend", "smslog_id"); $content = "{$delForm} \n {$resendForm}\n \t\t <h2>{$pagetitle}</h2>\n \t\t <p/>\n\t\t\t\t{$linksPrevNext}\n \t\t <p/>\n \t\t <table width=100% cellpadding=1 cellspacing=1 border=1>\n \t\t <tr>\n \t\t <td align=center class=box_title width=2%>id</td>\n \t\t <td align=center class=box_title width=12%>Time</td>\n \t\t <td align=center class=box_title width=12%>Receiver</td>\n \t\t <td align=center class=box_title width=50%>Message</td>\n \t\t <td align=center class=box_title width=8%>Status</td>\n \t\t <td align=center class=box_title width=8%>Group</td>\n \t\t <td align=center class=box_title width=8%>Action</td>\n \t\t </tr>\n \t\t"; $db->find(); while ($db->fetch()) { $p_desc = pnum2pdesc($db->p_dst); $current_p_dst = $db->p_dst; if ($p_desc) { $current_p_dst = "{$db->p_dst}<br/>({$p_desc})"; } $hide_p_dst = $db->p_dst; if ($p_desc) { $hide_p_dst = "{$p_dst} ({$p_desc})"; } $p_sms_type = $db->p_sms_type; $hide_p_dst = str_replace("\\'", "", $hide_p_dst); $hide_p_dst = str_replace("\"", "", $hide_p_dst); $p_msg = nl2br($db->p_msg); if (($p_footer = $db->p_footer) && ($p_sms_type == "text" || $p_sms_type == "flash")) { $p_msg = $p_msg . " {$p_footer}"; } $p_datetime = $db->p_datetime; $p_update = $db->p_update; $p_status = $db->p_status; $p_gpid = $db->p_gpid; $status_color = getStatusColor($p_status); $status_name = getStatusName($p_status); $p_status = "<font color={$status_color}>{$status_name}</font> <br/>({$db->send_tries} tries)"; $p_status .= " {$db_row['p_status']}"; if ($p_gpid) { $db_query1 = "SELECT gp_code FROM playsms_tblUserGroupPhonebook WHERE gpid='{$p_gpid}'"; $db_result1 = dba_query($db_query1); $db_row1 = dba_fetch_array($db_result1); $p_gpcode = strtoupper($db_row1[gp_code]); } else { $p_gpcode = " "; } $deleteCode = "javascript: del({$db->smslog_id}, " . "'Are you sure you want to delete outgoing SMS to `{$hide_p_dst}`, number {$db->smslog_id} ?');"; $resendCode = "javascript: resend({$db->smslog_id});"; $actionCode = "<a href=\"{$deleteCode}\">[Delete]</a> <br/>\n\t\t <a href=\"{$resendCode}\">[Resend]</a>"; $content .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign=top class=box_text align=left width=2%>{$db->smslog_id}</td>\n\t\t\t\t\t<td valign=top class=box_text align=center width=12%>{$db->p_datetime}</td>\n\t\t\t\t\t<td valign=top class=box_text align=center width=12%>{$current_p_dst}</td>\n\t\t\t\t\t<td valign=top class=box_text align=left width=50%>{$p_msg}</td>\n\t\t\t\t\t<td valign=top class=box_text align=center width=8%>{$p_status}</td>\n\t\t\t\t\t<td valign=top class=box_text align=center width=8%>{$p_gpcode}</td>\n\t\t\t\t\t<td valign=top class=box_text align=center width=8%>\n\t\t\t\t\t\t{$actionCode}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t "; } $content .= "</form></table>\n \t\t\t<p/>\n \t\t {$linksPrevNext}"; return $content; }
<th>Subject</th> <th>Reg date</th> <th>Translator</th> <th>Thread mails</th> <th class='text-center'>Actions</th> </tr> </thead> <tbody> <?php foreach ($list as $k => $v) { ?> <tr data-mail-id="<?php echo $v->id; ?> " class="<?php echo getStatusColor($v->status); ?> "> <td><?php echo $v->id; ?> </td> <td><?php if (!empty($v->fromName)) { echo $v->fromName . '<br>' . htmlspecialchars(' <') . $v->fromAddr . htmlspecialchars('>'); } else { echo $v->fromAddr; } ?> </td> <td><?php
?> <a style="color:black;"href="{{ url('/problem/') }}<?php echo '/' . $e->problem_id; ?> "> <?php echo $e->problem_id; ?> </a> <?php echo '</td>'; echo '<td>'; ?> <b> <a class="text-<?php echo getStatusColor($e->result); ?> " href="{{ url('/FAQ/#sys_stauts_') }}<?php echo $e->result; ?> "> <?php echo getStatusText($e->result); ?> </a> </b> <?php echo '</td>'; echo '<td>' . $e->memory . 'KB</td>'; echo '<td>' . $e->time . 'MS</td>'; echo '<td>' . languageSelect($e->language) . '</td>';