Plugin Directory

Changeset 2786417


Ignore:
Timestamp:
09/17/2022 07:15:09 PM (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

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

    r2776216 r2786417  
    77
    88    //create new top-level menu
    9     add_menu_page('Reservation Form 7', 'Reservation Form', 'administrator', __FILE__, 'oopspkreservation_form_settings_page' , '' );
     9    add_menu_page('Reservation Form 7', 'Reservation Form', 'administrator', wp_reservation_dir, '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');
    1113
    1214    //call register settings function
    1315    add_action( 'admin_init', 'oopspkreservation_form_plugin_settings' );
     16}
     17
     18add_action('admin_menu', 'oopspk_register_my_custom_submenu_page');
     19
     20function 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' );
    1429}
    1530
     
    2439  require(wp_reservation_dir."/inc/submit_add_options.php");
    2540  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 
    2644}
     45
    2746function oopspkreservation_form_settings_page() {
    2847?>
     
    3554  <!-- Tab 1 -->
    3655  <input type="radio" name="tabset" id="tab1" aria-controls="marzen" checked>
    37   <label for="tab1">Customization</label>
     56  <label for="tab1">Dashboard</label>
    3857  <!-- Tab 2 -->
    3958  <input type="radio" name="tabset" id="tab2" aria-controls="rauchbier">
     
    4160  <!-- Tab 3 -->
    4261  <input type="radio" name="tabset" id="tab3" aria-controls="dunkles">
    43   <label for="tab3">Entries</label>
     62  <label for="tab3">--</label>
    4463 
    4564  <div class="tab-panels">
    4665    <section id="marzen" class="tab-panel" >
    47       <h2>Customization</h2>
     66      <h2>Dashboard</h2>
    4867  <div style="float: right; margin-bottom: 10px;">
    4968      Shortcode: <input value="[oops_wp_reservation_form_shortcode]" style="width: 250px; height: 40px;">
     
    5675    </section>
    5776    <section id="dunkles" class="tab-panel">
    58       <h2>Entries</h2>
    59       <?php
    60 //$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_id = 1", OBJECT );
    61 global $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
    83 if(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>
     77 
    9878    </section>
    9979  </div>
  • reservation-form/trunk/assets/css/frontend_style_css.css

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

    r2776216 r2786417  
    77
    88    //create new top-level menu
    9     add_menu_page('Reservation Form 7', 'Reservation Form', 'administrator', __FILE__, 'oopspkreservation_form_settings_page' , '' );
     9    add_menu_page('Reservation Form 7', 'Reservation Form', 'administrator', wp_reservation_dir, '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');
    1113
    1214    //call register settings function
    1315    add_action( 'admin_init', 'oopspkreservation_form_plugin_settings' );
     16}
     17
     18add_action('admin_menu', 'oopspk_register_my_custom_submenu_page');
     19
     20function 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' );
    1429}
    1530
     
    2439  require(wp_reservation_dir."/inc/submit_add_options.php");
    2540  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 
    2644}
     45
    2746function oopspkreservation_form_settings_page() {
    2847?>
     
    3554  <!-- Tab 1 -->
    3655  <input type="radio" name="tabset" id="tab1" aria-controls="marzen" checked>
    37   <label for="tab1">Customization</label>
     56  <label for="tab1">Dashboard</label>
    3857  <!-- Tab 2 -->
    3958  <input type="radio" name="tabset" id="tab2" aria-controls="rauchbier">
     
    4160  <!-- Tab 3 -->
    4261  <input type="radio" name="tabset" id="tab3" aria-controls="dunkles">
    43   <label for="tab3">Entries</label>
     62  <label for="tab3">--</label>
    4463 
    4564  <div class="tab-panels">
    4665    <section id="marzen" class="tab-panel" >
    47       <h2>Customization</h2>
     66      <h2>Dashboard</h2>
    4867  <div style="float: right; margin-bottom: 10px;">
    4968      Shortcode: <input value="[oops_wp_reservation_form_shortcode]" style="width: 250px; height: 40px;">
     
    5675    </section>
    5776    <section id="dunkles" class="tab-panel">
    58       <h2>Entries</h2>
    59       <?php
    60 //$results = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}options WHERE option_id = 1", OBJECT );
    61 global $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
    83 if(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>
     77 
    9878    </section>
    9979  </div>
Note: See TracChangeset for help on using the changeset viewer.