Changeset 2786417
- Timestamp:
- 09/17/2022 07:15:09 PM (4 years ago)
- Location:
- reservation-form
- Files:
-
- 4 edited
-
tags/1.0.0/assets/css/frontend_style_css.css (modified) (3 diffs)
-
tags/1.0.0/oopspk_reservation_form_optionpage.php (modified) (5 diffs)
-
trunk/assets/css/frontend_style_css.css (modified) (3 diffs)
-
trunk/oopspk_reservation_form_optionpage.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
reservation-form/tags/1.0.0/assets/css/frontend_style_css.css
r2776216 r2786417 1 1 .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; 7 7 } 8 8 … … 29 29 30 30 .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; 34 34 } 35 35 36 36 .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; 40 40 } 41 41 42 42 .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; 46 46 } 47 47 … … 56 56 @media screen and (max-width: 600px) { 57 57 .col-25, .col-75, .submit_customization { 58 width: 100% ;59 margin-top: 0 ;58 width: 100% !important; 59 margin-top: 0 !important; 60 60 } 61 61 } -
reservation-form/tags/1.0.0/oopspk_reservation_form_optionpage.php
r2776216 r2786417 7 7 8 8 //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' , '' ); 10 10 11 add_submenu_page( 'my-top-level-slug', 'My Custom Page', 'My Custom Page', 12 'manage_options', 'my-top-level-slug'); 11 13 12 14 //call register settings function 13 15 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' ); 14 29 } 15 30 … … 24 39 require(wp_reservation_dir."/inc/submit_add_options.php"); 25 40 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 26 44 } 45 27 46 function oopspkreservation_form_settings_page() { 28 47 ?> … … 35 54 <!-- Tab 1 --> 36 55 <input type="radio" name="tabset" id="tab1" aria-controls="marzen" checked> 37 <label for="tab1"> Customization</label>56 <label for="tab1">Dashboard</label> 38 57 <!-- Tab 2 --> 39 58 <input type="radio" name="tabset" id="tab2" aria-controls="rauchbier"> … … 41 60 <!-- Tab 3 --> 42 61 <input type="radio" name="tabset" id="tab3" aria-controls="dunkles"> 43 <label for="tab3"> Entries</label>62 <label for="tab3">--</label> 44 63 45 64 <div class="tab-panels"> 46 65 <section id="marzen" class="tab-panel" > 47 <h2> Customization</h2>66 <h2>Dashboard</h2> 48 67 <div style="float: right; margin-bottom: 10px;"> 49 68 Shortcode: <input value="[oops_wp_reservation_form_shortcode]" style="width: 250px; height: 40px;"> … … 56 75 </section> 57 76 <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 98 78 </section> 99 79 </div> -
reservation-form/trunk/assets/css/frontend_style_css.css
r2776216 r2786417 1 1 .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; 7 7 } 8 8 … … 29 29 30 30 .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; 34 34 } 35 35 36 36 .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; 40 40 } 41 41 42 42 .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; 46 46 } 47 47 … … 56 56 @media screen and (max-width: 600px) { 57 57 .col-25, .col-75, .submit_customization { 58 width: 100% ;59 margin-top: 0 ;58 width: 100% !important; 59 margin-top: 0 !important; 60 60 } 61 61 } -
reservation-form/trunk/oopspk_reservation_form_optionpage.php
r2776216 r2786417 7 7 8 8 //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' , '' ); 10 10 11 add_submenu_page( 'my-top-level-slug', 'My Custom Page', 'My Custom Page', 12 'manage_options', 'my-top-level-slug'); 11 13 12 14 //call register settings function 13 15 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' ); 14 29 } 15 30 … … 24 39 require(wp_reservation_dir."/inc/submit_add_options.php"); 25 40 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 26 44 } 45 27 46 function oopspkreservation_form_settings_page() { 28 47 ?> … … 35 54 <!-- Tab 1 --> 36 55 <input type="radio" name="tabset" id="tab1" aria-controls="marzen" checked> 37 <label for="tab1"> Customization</label>56 <label for="tab1">Dashboard</label> 38 57 <!-- Tab 2 --> 39 58 <input type="radio" name="tabset" id="tab2" aria-controls="rauchbier"> … … 41 60 <!-- Tab 3 --> 42 61 <input type="radio" name="tabset" id="tab3" aria-controls="dunkles"> 43 <label for="tab3"> Entries</label>62 <label for="tab3">--</label> 44 63 45 64 <div class="tab-panels"> 46 65 <section id="marzen" class="tab-panel" > 47 <h2> Customization</h2>66 <h2>Dashboard</h2> 48 67 <div style="float: right; margin-bottom: 10px;"> 49 68 Shortcode: <input value="[oops_wp_reservation_form_shortcode]" style="width: 250px; height: 40px;"> … … 56 75 </section> 57 76 <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 98 78 </section> 99 79 </div>
Note: See TracChangeset
for help on using the changeset viewer.