Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(-1);
- require "includes/header.php";
- require "includes/config.php";
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <!-- TinyMCE -->
- <script type="text/javascript" src="includes/tinymce/tinymce.min.js"></script>
- <script type="text/javascript">
- tinymce.init({
- selector: "textarea",
- theme: "modern",
- plugins: [
- "advlist autolink lists link image charmap print preview hr anchor pagebreak",
- "searchreplace wordcount visualblocks visualchars code fullscreen",
- "insertdatetime media nonbreaking save table contextmenu directionality",
- "emoticons template paste textcolor colorpicker textpattern"
- ],
- toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
- toolbar2: "print preview media | forecolor backcolor emoticons",
- image_advtab: true,
- templates: [
- {title: 'Test template 1', content: 'Test 1'},
- {title: 'Test template 2', content: 'Test 2'}
- ]
- });
- </script>
- </head>
- <body>
- <div class="container">
- <div class="hero-unit">
- <?php
- //ambil dari absen
- if (isset($_GET['edit'])) {
- $query = mysql_query("SELECT * from absen WHERE id='".$_GET['edit']."'");
- $hasil = mysql_fetch_array ($query);
- $id = $hasil['id'];
- $nama = $hasil['nama'];
- $web = $hasil['web'];
- $desk = $hasil['desk'];
- $email = $hasil['email'];
- ?>
- #Edit Data
- <FORM ACTION="includes/artikel_edit.php" METHOD="POST" NAME="input" enctype="multipart/form-data">
- <table width="100%px" border="0">
- <thead>
- <tr>
- <td><input name="id" type="text" size="40" placeholder="Absen" value="<?=$id?>" readonly disable="disabled"/></td>
- </tr>
- <tr>
- <td><input name="nama" type="text" size="40" placeholder="Nama Lengkap" value="<?=$nama?>"/></td>
- </tr>
- <tr>
- <td><input name="web" type="text" size="40" placeholder="yourwebsite.com" value="<?=$web?>"/></td>
- </tr>
- <tr>
- <td><input name="email" type="email" size="40" placeholder="Email" value="<?=$email?>" required autofocus/></td>
- </tr>
- <tr>
- <td><textarea id="elm1" name="desk" rows="15" cols="60"><?=$desk?></textarea></td>
- </tr>
- <tr>
- <td colspan="2"><input type="submit" name="Edit" value="Submit"class="btn btn-inverse"/></td>
- </tr>
- </thead>
- </table>
- </form>
- <?php
- } else {
- if (!empty($_GET['input']) && $_GET['input'] == 'success') {
- echo '<h3>Berhasil Kirim Data!</h3>';
- }
- ?>
- <form name="input_data" action="includes/artikel_input.php" method="post">
- <table class="none">
- <thead>
- <tr>
- <td>
- <select name="id">
- <option selected>-Absen-</option>
- <option>1</option>
- <option>2</option>
- <option>3</option>
- <option>4</option>
- <option>5</option>
- <option>6</option>
- <option>7</option>
- <option>8</option>
- <option>9</option>
- <option>10</option>
- <option>11</option>
- <option>12</option>
- <option>13</option>
- <option>14</option>
- <option>15</option>
- <option>16</option>
- <option>17</option>
- <option>18</option>
- <option>19</option>
- <option>20</option>
- <option>21</option>
- <option>22</option>
- <option>23</option>
- <option>23</option>
- <option>24</option>
- <option>25</option>
- <option>26</option>
- <option>27</option>
- <option>28</option>
- <option>29</option>
- <option>30</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><input name="nama" type="text" size="40" placeholder="Nama Lengkap" required autofocus/></td>
- </tr>
- <tr>
- <td><input name="web" type="text" size="40" placeholder="www.yourwebsite.com" required autofocus/></td>
- </tr>
- <tr>
- <td><input name="email" type="email" size="40" placeholder="Email" required autofocus/></td>
- </tr>
- <tr>
- <td><textarea id="elm1" name="desk" rows="15" cols="60" ></textarea></td>
- </tr>
- <tr>
- <td><input type="submit" name="input" value="Submit" class="btn btn-inverse"/>
- <input type="reset" name="reset" value="Reset" class="btn btn-inverse"></td>
- </tr>
- </thead>
- </table>
- </form>
- <?php } ?>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement