Plugin Directory

Changeset 2786482


Ignore:
Timestamp:
09/18/2022 06:00:37 AM (4 years ago)
Author:
oops01
Message:

Initial commit

Location:
reservation-form
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • reservation-form/tags/1.0.0/assets/css/frontend_style_css.css

    r2786417 r2786482  
    11.input_box  {
    2   width: 100% !important;
    3   padding: 12px !important;
    4   border: 1px solid #000 !important;
    5   border-radius: 4px !important;
    6   resize: vertical !important;
     2  width: 100%;
     3  padding: 12px;
     4  border: 1px solid #ccc;
     5  border-radius: 4px;
     6  resize: vertical;
    77}
    88
     
    2929
    3030.container {
    31   border-radius: 5px !important;
    32   background-color: #fff !important;
    33   padding: 20px !important;
     31  border-radius: 5px;
     32  background-color: #fff;
     33  padding: 20px;
    3434}
    3535
    3636.col-25 {
    37   float: left !important;
    38   width: 25% !important;
    39   margin-top: 6px !important;
     37  float: left;
     38  width: 25%;
     39  margin-top: 6px;
    4040}
    4141
    4242.col-75 {
    43   float: left !important;
    44   width: 75% !important;
    45   margin-top: 6px !important;
     43  float: left;
     44  width: 75%;
     45  margin-top: 6px;
    4646}
    4747
     
    5656@media screen and (max-width: 600px) {
    5757  .col-25, .col-75, .submit_customization {
    58     width: 100% !important;
    59     margin-top: 0 !important;
     58    width: 100%;
     59    margin-top: 0;
    6060  }
    6161}
  • reservation-form/tags/1.0.0/oopspk_reservation_form_optionpage.php

    r2786417 r2786482  
    77
    88    //create new top-level menu
    9     add_menu_page('Reservation Form 7', 'Reservation Form', 'administrator', wp_reservation_dir, 'oopspkreservation_form_settings_page' , '' );
     9    add_menu_page('Reservation Form 7', 'Reservation Form', 'administrator', __FILE__, 'oopspkreservation_form_settings_page' , '' );
    1010
    11   add_submenu_page( 'my-top-level-slug', 'My Custom Page', 'My Custom Page',
    12   'manage_options', 'my-top-level-slug');
    1311
    1412    //call register settings function
    1513    add_action( 'admin_init', 'oopspkreservation_form_plugin_settings' );
    16 }
    17 
    18 add_action('admin_menu', 'oopspk_register_my_custom_submenu_page');
    19 
    20 function oopspk_register_my_custom_submenu_page() {
    21  
    22   add_submenu_page(
    23     'reservation-form',
    24     'entries',
    25     'Entries',
    26     'manage_options',
    27     'entries',
    28     'oopspk_my_custom_submenu_page_callback' );
    2914}
    3015
     
    3924  require(wp_reservation_dir."/inc/submit_add_options.php");
    4025  require(wp_reservation_dir."/inc/submit_add_more_fields.php");
    41   require(wp_reservation_dir."/inc/submit_delete.php");
    42   require("oopspk_entries.php");
    43  
    4426}
    45 
    4627function oopspkreservation_form_settings_page() {
    4728?>
     
    5435  <!-- Tab 1 -->
    5536  <input type="radio" name="tabset" id="tab1" aria-controls="marzen" checked>
    56   <label for="tab1">Dashboard</label>
     37  <label for="tab1">Customization</label>
    5738  <!-- Tab 2 -->
    5839  <input type="radio" name="tabset" id="tab2" aria-controls="rauchbier">
     
    6041  <!-- Tab 3 -->
    6142  <input type="radio" name="tabset" id="tab3" aria-controls="dunkles">
    62   <label for="tab3">--</label>
     43  <label for="tab3">Entries</label>
    6344 
    6445  <div class="tab-panels">
    6546    <section id="marzen" class="tab-panel" >
    66       <h2>Dashboard</h2>
     47      <h2>Customization</h2>
    6748  <div style="float: right; margin-bottom: 10px;">
    6849      Shortcode: <input value="[oops_wp_reservation_form_shortcode]" style="width: 250px; height: 40px;">
     
    7556    </section>
    7657    <section id="dunkles" class="tab-panel">
    77  
     58      <h2>Entries</h2>
     59      <?php
     60//$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_id = 1", OBJECT );
     61global $wpdb;
     62$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}reservation_entries ORDER BY `id` DESC ", OBJECT );
     63//var_dump($results);
     64      ?>
     65
     66   <table class="wp-list-table widefat fixed posts" style="margin-bottom:10px;">
     67  <thead>
     68    <tr>
     69      <th style="width: 5%">ID</th>
     70      <th>Entries</th>
     71      <th style="width: 10%">Action</th>
     72    </tr>
     73  </thead>
     74  <tfoot>
     75    <tr>
     76      <th style="width: 5%">ID</th>
     77      <th>Entries</th>
     78      <th style="width: 10%">Action</th>
     79    </tr>
     80  </tfoot>
     81  <tbody> 
     82<?php
     83if(empty($results)){
     84  echo'<tr><td></td><td>No results found</td><tr>';
     85}
     86    foreach ($results as $key => $entries) {
     87?>
     88<tr>
     89  <td style="width: 5%"><?php echo $entries->id; ?></td>
     90  <td><?php echo $entries->entries; ?></td>
     91   <td style="width: 10%"><a href="#" style="color:red;"> Delete </a></td>
     92</tr>
     93<?php
     94}
     95?> 
     96  </tbody>
     97</table>
    7898    </section>
    7999  </div>
  • reservation-form/trunk/assets/css/frontend_style_css.css

    r2786417 r2786482  
    11.input_box  {
    2   width: 100% !important;
    3   padding: 12px !important;
    4   border: 1px solid #000 !important;
    5   border-radius: 4px !important;
    6   resize: vertical !important;
     2  width: 100%;
     3  padding: 12px;
     4  border: 1px solid #ccc;
     5  border-radius: 4px;
     6  resize: vertical;
    77}
    88
     
    2929
    3030.container {
    31   border-radius: 5px !important;
    32   background-color: #fff !important;
    33   padding: 20px !important;
     31  border-radius: 5px;
     32  background-color: #fff;
     33  padding: 20px;
    3434}
    3535
    3636.col-25 {
    37   float: left !important;
    38   width: 25% !important;
    39   margin-top: 6px !important;
     37  float: left;
     38  width: 25%;
     39  margin-top: 6px;
    4040}
    4141
    4242.col-75 {
    43   float: left !important;
    44   width: 75% !important;
    45   margin-top: 6px !important;
     43  float: left;
     44  width: 75%;
     45  margin-top: 6px;
    4646}
    4747
     
    5656@media screen and (max-width: 600px) {
    5757  .col-25, .col-75, .submit_customization {
    58     width: 100% !important;
    59     margin-top: 0 !important;
     58    width: 100%;
     59    margin-top: 0;
    6060  }
    6161}
  • reservation-form/trunk/oopspk_reservation_form_optionpage.php

    r2786417 r2786482  
    77
    88    //create new top-level menu
    9     add_menu_page('Reservation Form 7', 'Reservation Form', 'administrator', wp_reservation_dir, 'oopspkreservation_form_settings_page' , '' );
     9    add_menu_page('Reservation Form 7', 'Reservation Form', 'administrator', __FILE__, 'oopspkreservation_form_settings_page' , '' );
    1010
    11   add_submenu_page( 'my-top-level-slug', 'My Custom Page', 'My Custom Page',
    12   'manage_options', 'my-top-level-slug');
    1311
    1412    //call register settings function
    1513    add_action( 'admin_init', 'oopspkreservation_form_plugin_settings' );
    16 }
    17 
    18 add_action('admin_menu', 'oopspk_register_my_custom_submenu_page');
    19 
    20 function oopspk_register_my_custom_submenu_page() {
    21  
    22   add_submenu_page(
    23     'reservation-form',
    24     'entries',
    25     'Entries',
    26     'manage_options',
    27     'entries',
    28     'oopspk_my_custom_submenu_page_callback' );
    2914}
    3015
     
    3924  require(wp_reservation_dir."/inc/submit_add_options.php");
    4025  require(wp_reservation_dir."/inc/submit_add_more_fields.php");
    41   require(wp_reservation_dir."/inc/submit_delete.php");
    42   require("oopspk_entries.php");
    43  
    4426}
    45 
    4627function oopspkreservation_form_settings_page() {
    4728?>
     
    5435  <!-- Tab 1 -->
    5536  <input type="radio" name="tabset" id="tab1" aria-controls="marzen" checked>
    56   <label for="tab1">Dashboard</label>
     37  <label for="tab1">Customization</label>
    5738  <!-- Tab 2 -->
    5839  <input type="radio" name="tabset" id="tab2" aria-controls="rauchbier">
     
    6041  <!-- Tab 3 -->
    6142  <input type="radio" name="tabset" id="tab3" aria-controls="dunkles">
    62   <label for="tab3">--</label>
     43  <label for="tab3">Entries</label>
    6344 
    6445  <div class="tab-panels">
    6546    <section id="marzen" class="tab-panel" >
    66       <h2>Dashboard</h2>
     47      <h2>Customization</h2>
    6748  <div style="float: right; margin-bottom: 10px;">
    6849      Shortcode: <input value="[oops_wp_reservation_form_shortcode]" style="width: 250px; height: 40px;">
     
    7556    </section>
    7657    <section id="dunkles" class="tab-panel">
    77  
     58      <h2>Entries</h2>
     59      <?php
     60//$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_id = 1", OBJECT );
     61global $wpdb;
     62$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}reservation_entries ORDER BY `id` DESC ", OBJECT );
     63//var_dump($results);
     64      ?>
     65
     66   <table class="wp-list-table widefat fixed posts" style="margin-bottom:10px;">
     67  <thead>
     68    <tr>
     69      <th style="width: 5%">ID</th>
     70      <th>Entries</th>
     71      <th style="width: 10%">Action</th>
     72    </tr>
     73  </thead>
     74  <tfoot>
     75    <tr>
     76      <th style="width: 5%">ID</th>
     77      <th>Entries</th>
     78      <th style="width: 10%">Action</th>
     79    </tr>
     80  </tfoot>
     81  <tbody> 
     82<?php
     83if(empty($results)){
     84  echo'<tr><td></td><td>No results found</td><tr>';
     85}
     86    foreach ($results as $key => $entries) {
     87?>
     88<tr>
     89  <td style="width: 5%"><?php echo $entries->id; ?></td>
     90  <td><?php echo $entries->entries; ?></td>
     91   <td style="width: 10%"><a href="#" style="color:red;"> Delete </a></td>
     92</tr>
     93<?php
     94}
     95?> 
     96  </tbody>
     97</table>
    7898    </section>
    7999  </div>
Note: See TracChangeset for help on using the changeset viewer.