break; } $s_time = date("Y-M-d H:i", strtotime($start_time)); $e_time = date("Y-M-d H:i", strtotime($end_time)); if ($logsize != 0) { $logfiletd = "<td><a href=\"showtasklog.php?log={$logfile}\">{$logfile}</a></td>"; } else { $logfiletd = "<td>{$logfile}</td>"; } $str = <<<EOF \t\t\t<td>{$id}</td> \t\t\t<td>{$cmd}</td> \t\t\t<td>{$s_time}</td> \t\t\t<td>{$e_time}</td> \t\t\t<td>{$status}</td> \t\t\t<td>{$errcode}</td> \t\t\t{$logfiletd} \t\t\t<td>{$logsize}</td> \t\t\t</tr> EOF; echo $hdr . $str; } echo "</tbody></table>"; } // MAIN require 'cbsd.php'; if (isset($_GET['flushlog'])) { flush_log(); } show_logs();
if ($rs) { $logs[] = 'delete ad with ID=' . $_GET['del']; } else { $logs[] = mysql_error(); } } //get ad if (isset($_GET['edit']) && is_numeric($_GET['edit'])) { $ad_data = select_sql('select * from crx_ads where id="' . mysql_real_escape_string($_GET['edit']) . '"'); //echo '<textarea>';print_r($ad_data);echo '</textarea>'; if (count($ad_data) == 1) { $ad_data = $ad_data[0]; } } //show logs show_logs($logs); ?> <!-- form --> <form method="post" accept-charset="UTF-8" action="<?php echo get_current_url(false); ?> "> <input type="hidden" name="edit" value="<?php echo isset($ad_data) && isset($ad_data['id']) ? $ad_data['id'] : ''; ?> "/> <table class="table-css"> <tr> <td></td> <td><label><input type="radio" name="opt" <?php