Ejemplo n.º 1
0
                        } else {
                            echo '<p class="notification red">Something went wrong while updating the bans.</p>';
                        }
                    }
                    if ($hideForm !== true) {
                        ?>
                        <form action="" method="post" class="styled">
                        <table width="100%">
                        	<tr>
	                        	<th width="20px">#</th>
	                        	<th width="150px">IP</th>
	                            <th>Reason</th>
	                            <th width="150px">When</th>
                           	</tr>
                        <?php 
                        $dataArr = $ban->getBans();
                        if ($dataArr == false) {
                            echo '<tr><td colspan="4"><p class="notification red minimal">There are no bans that can be edited.</p>';
                        } else {
                            $i = 0;
                            foreach ($dataArr as $data) {
                                echo '<tr>';
                                echo '<td>' . ++$i . '<input type="hidden" name="ban_id[]" value="' . $data['id'] . '" /></td>';
                                echo '</select></td>';
                                echo '<td><input style="width: 125px;" type="text" name="ban_ip[]" value="' . $data['ip'] . '" /></td>';
                                echo '<td><input style="width: 340px;" type="text" name="ban_reason[]" value="' . $data['reason'] . '" /></td>';
                                echo '<td>' . $data['dtime'] . '</td>';
                                echo '</tr>';
                            }
                        }
                        if ($dataArr !== false) {