Changeset 2756581
- Timestamp:
- 07/14/2022 09:33:03 PM (4 years ago)
- Location:
- reservation-form
- Files:
-
- 6 added
- 33 edited
-
tags/1.0.0/assets/css/admin_style_css.css (modified) (1 diff)
-
tags/1.0.0/assets/css/frontend_style_css.css (modified) (3 diffs)
-
tags/1.0.0/assets/js/admin_javascript.js (modified) (2 diffs)
-
tags/1.0.0/assets/js/frontend_javascript.js (modified) (1 diff)
-
tags/1.0.0/inc/index.php (modified) (1 diff)
-
tags/1.0.0/inc/oops_pk_shortcodes.php (modified) (16 diffs)
-
tags/1.0.0/inc/oopspk_add_options.php (modified) (8 diffs)
-
tags/1.0.0/inc/oopspk_customization.php (modified) (2 diffs)
-
tags/1.0.0/inc/register_hooks/oops_all_fields.php (modified) (6 diffs)
-
tags/1.0.0/inc/register_hooks/register_activation_hook_fields_tag.php (modified) (1 diff)
-
tags/1.0.0/inc/register_hooks/register_activation_hook_fields_type.php (modified) (1 diff)
-
tags/1.0.0/inc/register_hooks/register_activation_hook_label_name.php (modified) (1 diff)
-
tags/1.0.0/inc/submit_add_more_fields.php (added)
-
tags/1.0.0/inc/submit_add_options.php (added)
-
tags/1.0.0/inc/submit_customization_codes.php (added)
-
tags/1.0.0/index.php (modified) (1 diff)
-
tags/1.0.0/oopspk_reservation_form_7.php (modified) (3 diffs)
-
tags/1.0.0/oopspk_reservation_form_main_load.php (modified) (1 diff)
-
tags/1.0.0/oopspk_reservation_form_optionpage.php (modified) (4 diffs)
-
tags/1.0.0/readme.txt (modified) (1 diff)
-
trunk/assets/css/admin_style_css.css (modified) (1 diff)
-
trunk/assets/css/frontend_style_css.css (modified) (3 diffs)
-
trunk/assets/js/admin_javascript.js (modified) (2 diffs)
-
trunk/assets/js/frontend_javascript.js (modified) (1 diff)
-
trunk/inc/index.php (modified) (1 diff)
-
trunk/inc/oops_pk_shortcodes.php (modified) (16 diffs)
-
trunk/inc/oopspk_add_options.php (modified) (8 diffs)
-
trunk/inc/oopspk_customization.php (modified) (2 diffs)
-
trunk/inc/register_hooks/oops_all_fields.php (modified) (6 diffs)
-
trunk/inc/register_hooks/register_activation_hook_fields_tag.php (modified) (1 diff)
-
trunk/inc/register_hooks/register_activation_hook_fields_type.php (modified) (1 diff)
-
trunk/inc/register_hooks/register_activation_hook_label_name.php (modified) (1 diff)
-
trunk/inc/submit_add_more_fields.php (added)
-
trunk/inc/submit_add_options.php (added)
-
trunk/inc/submit_customization_codes.php (added)
-
trunk/index.php (modified) (1 diff)
-
trunk/oopspk_reservation_form_7.php (modified) (3 diffs)
-
trunk/oopspk_reservation_form_main_load.php (modified) (1 diff)
-
trunk/oopspk_reservation_form_optionpage.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
reservation-form/tags/1.0.0/assets/css/admin_style_css.css
r2752823 r2756581 134 134 } 135 135 136 .popup .overlay { 137 position:fixed; 138 top:0px; 139 left:0px; 140 width:100vw; 141 height:100vh; 142 background:rgba(0,0,0,0.7); 143 z-index:1; 144 display:none; 145 } 146 147 .popup .content { 148 position:absolute; 149 top:50%; 150 left:50%; 151 transform:translate(-50%,-50%) scale(0); 152 background:#fff; 153 width:1000px; 154 height:85%; 155 z-index:2; 156 padding:20px; 157 box-sizing:border-box; 158 font-family:"Open Sans",sans-serif; 159 } 160 161 .popup .close-btn { 162 cursor:pointer; 163 position:absolute; 164 right:20px; 165 top:20px; 166 width:30px; 167 height:30px; 168 background:#222; 169 color:#fff; 170 font-size:25px; 171 font-weight:600; 172 line-height:30px; 173 text-align:center; 174 border-radius:50%; 175 } 176 177 .popup.active .overlay { 178 display:block; 179 } 180 181 .popup.active .content { 182 transition:all 300ms ease-in-out; 183 transform:translate(-50%,-50%) scale(1); 184 } 185 186 .add_fields { 187 cursor: pointer; 188 background-color: green; 189 color:#fff; 190 padding: 4px; 191 border-radius: 5px; 192 user-select: none; 193 float: right; 194 padding: 15px; 195 } 196 .scroll_form_entry { 197 width: 100%; 198 height: 400px; 199 background: #ccc; 200 overflow: scroll; 201 } 202 203 -
reservation-form/tags/1.0.0/assets/css/frontend_style_css.css
r2752823 r2756581 1 .input_box , select, textarea{1 .input_box { 2 2 width: 100%; 3 3 padding: 12px; … … 30 30 .container { 31 31 border-radius: 5px; 32 background-color: #f 2f2f2;32 background-color: #fff; 33 33 padding: 20px; 34 34 } … … 60 60 } 61 61 } 62 -
reservation-form/tags/1.0.0/assets/js/admin_javascript.js
r2752823 r2756581 1 2 3 1 // function reply_click(clicked_id) 4 2 // { … … 7 5 // }); 8 6 // } 9 10 7 jQuery(function($){ 11 8 $("#btnfield1").click(function(){ 12 $(".add_options_field1_ol").append('<li><td><input name="field1_add_options[] " ></td></li><td>');13 $(".email_field1_ol").append('<li><td><input name="field1_email[] " ></td></li><td>');9 $(".add_options_field1_ol").append('<li><td><input name="field1_add_options[] required" ></td></li><td>'); 10 $(".email_field1_ol").append('<li><td><input name="field1_email[] required" ></td></li><td>'); 14 11 }); 15 12 $("#btnfield2").click(function(){ 16 $(".add_options_field2_ol").append('<li><td><input name="field2_add_options[] " ></td></li><td>');17 $(".email_field2_ol").append('<li><td><input name="field2_email[] " ></td></li><td>');13 $(".add_options_field2_ol").append('<li><td><input name="field2_add_options[] required" ></td></li><td>'); 14 $(".email_field2_ol").append('<li><td><input name="field2_email[] required" ></td></li><td>'); 18 15 }); 19 16 $("#btnfield3").click(function(){ 20 $(".add_options_field3_ol").append('<li><td><input name="field3_add_options[] " ></td></li><td>');21 $(".email_field3_ol").append('<li><td><input name="field3_email[] " ></td></li><td>');17 $(".add_options_field3_ol").append('<li><td><input name="field3_add_options[] required" ></td></li><td>'); 18 $(".email_field3_ol").append('<li><td><input name="field3_email[] required" ></td></li><td>'); 22 19 }); 23 20 $("#btnfield4").click(function(){ 24 $(".add_options_field4_ol").append('<li><td><input name="field4_add_options[] " ></td></li><td>');25 $(".email_field4_ol").append('<li><td><input name="field4_email[] " ></td></li><td>');21 $(".add_options_field4_ol").append('<li><td><input name="field4_add_options[] required" ></td></li><td>'); 22 $(".email_field4_ol").append('<li><td><input name="field4_email[] required" ></td></li><td>'); 26 23 }); 27 24 }); 28 29 25 function togglePopup(){ 26 document.getElementById("popup-1").classList.toggle("active"); 27 } -
reservation-form/tags/1.0.0/assets/js/frontend_javascript.js
r2752823 r2756581 1 frontend_javascript.js -
reservation-form/tags/1.0.0/inc/index.php
r2752823 r2756581 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 3 // Silence is golden. 4 ?> -
reservation-form/tags/1.0.0/inc/oops_pk_shortcodes.php
r2752823 r2756581 24 24 $addoptions_value_field3 = get_option('addoptions_value_field3'); 25 25 $addoptions_value_field4 = get_option('addoptions_value_field4'); 26 //*email_permission_field1**// 27 $email_permission_field1 = get_option('email_permission_field1'); 28 $email_permission_field2 = get_option('email_permission_field2'); 29 $email_permission_field3 = get_option('email_permission_field3'); 30 $email_permission_field4 = get_option('email_permission_field4'); 31 32 //*add_more_fields **// 33 $add_more_fields_date = get_option('add_more_fields_date'); 34 $add_more_fields_from_date = get_option('add_more_fields_from_date'); 35 $add_more_fields_to_date = get_option('add_more_fields_to_date'); 36 $add_more_fields_gender = get_option('add_more_fields_gender'); 37 $add_more_fields_countries = get_option('add_more_fields_countries'); 38 $add_more_fields_seats = get_option('add_more_fields_seats'); 39 $add_more_fields_rooms = get_option('add_more_fields_rooms'); 26 40 27 41 ob_start(); … … 41 55 ?> 42 56 <label for="<?php echo esc_attr(ucwords($inputfield1));?>"><?php echo esc_attr(ucwords($inputfield1));?></label> 43 <select id="<?php echo esc_attr(ucwords($inputfield1));?>" name="field1" >57 <select id="<?php echo esc_attr(ucwords($inputfield1));?>" name="field1" class="input_box"> 44 58 <?php 45 59 $ex_array = $addoptions_value_field1['field1_add_options']; … … 57 71 ?> 58 72 <label for="<?php echo esc_attr(ucwords($inputfield1));?>"><?php echo esc_attr(ucwords($inputfield1));?></label> 59 <textarea id="<?php echo esc_attr(ucwords($inputfield1));?>" name="field1" placeholder="<?php echo esc_attr(ucwords($inputfield1));?>" style="height:200px" ></textarea>73 <textarea id="<?php echo esc_attr(ucwords($inputfield1));?>" name="field1" placeholder="<?php echo esc_attr(ucwords($inputfield1));?>" style="height:200px" class="input_box"></textarea> 60 74 <?php 61 75 } … … 73 87 ?> 74 88 <label for="<?php echo esc_attr(ucwords($inputfield2));?>"><?php echo esc_attr(ucwords($inputfield2));?></label> 75 <select id="<?php echo esc_attr(ucwords($inputfield2));?>" name="field2" >89 <select id="<?php echo esc_attr(ucwords($inputfield2));?>" name="field2" class="input_box"> 76 90 <?php 77 91 $ex_array = $addoptions_value_field2['field2_add_options']; … … 90 104 ?> 91 105 <label for="<?php echo esc_attr(ucwords($inputfield2));?>"><?php echo esc_attr(ucwords($inputfield2));?></label> 92 <textarea id="<?php echo esc_attr(ucwords($inputfield2));?>" name="field2" placeholder="<?php echo esc_attr(ucwords($inputfield2));?>" style="height:200px" ></textarea>106 <textarea id="<?php echo esc_attr(ucwords($inputfield2));?>" name="field2" placeholder="<?php echo esc_attr(ucwords($inputfield2));?>" style="height:200px" class="input_box"></textarea> 93 107 <?php 94 108 } … … 106 120 ?> 107 121 <label for="<?php echo esc_attr(ucwords($inputfield3));?>"><?php echo esc_attr(ucwords($inputfield3));?></label> 108 <select id="<?php echo esc_attr(ucwords($inputfield3));?>" name="field3" >122 <select id="<?php echo esc_attr(ucwords($inputfield3));?>" name="field3" class="input_box"> 109 123 <?php 110 124 $ex_array = $addoptions_value_field3['field3_add_options']; … … 124 138 ?> 125 139 <label for="<?php echo esc_attr(ucwords($inputfield3));?>"><?php echo esc_attr(ucwords($inputfield3));?></label> 126 <textarea id="<?php echo esc_attr(ucwords($inputfield3));?>" name="field3" placeholder="<?php echo esc_attr(ucwords($inputfield3));?>" style="height:200px"></textarea> 140 <textarea id="<?php echo esc_attr(ucwords($inputfield3));?>" name="field3" placeholder="<?php echo esc_attr(ucwords($inputfield3));?>" style="height:200px" class="input_box"></textarea> 141 <?php 142 } 143 ?> 144 <?php 145 if ($add_more_fields_date == 'ON') { 146 ?> 147 <label>Date</label> 148 <input type="date" name="date_s" class="input_box"> 149 <?php 150 } 151 if ($add_more_fields_from_date == 'ON') { 152 ?> 153 <label>From Date</label> 154 <input type="date" name="from_date" class="input_box"> 155 <?php 156 } 157 if ($add_more_fields_to_date == 'ON') { 158 ?> 159 <label>To Date</label> 160 <input type="date" name="to_date" class="input_box"> 161 <?php 162 } 163 if ($add_more_fields_gender == 'ON') { 164 ?> 165 <label>Gender</label> 166 <select name="gender" class="input_box"> 167 <option value="He">He</option> 168 <option value="She">She</option> 169 </select> 170 <?php 171 } 172 if ($add_more_fields_countries == 'ON') { 173 ?> 174 <label>Countries</label> 175 <select name="countries" id="" class="input_box"> 176 <option data-countryCode="GB" value="44" Selected>UK (+44)</option> 177 <option data-countryCode="US" value="1">USA (+1)</option> 178 <optgroup label="Other countries"> 179 <option data-countryCode="DZ" value="213">Algeria (+213)</option> 180 <option data-countryCode="AD" value="376">Andorra (+376)</option> 181 <option data-countryCode="AO" value="244">Angola (+244)</option> 182 <option data-countryCode="AI" value="1264">Anguilla (+1264)</option> 183 <option data-countryCode="AG" value="1268">Antigua & Barbuda (+1268)</option> 184 <option data-countryCode="AR" value="54">Argentina (+54)</option> 185 <option data-countryCode="AM" value="374">Armenia (+374)</option> 186 <option data-countryCode="AW" value="297">Aruba (+297)</option> 187 <option data-countryCode="AU" value="61">Australia (+61)</option> 188 <option data-countryCode="AT" value="43">Austria (+43)</option> 189 <option data-countryCode="AZ" value="994">Azerbaijan (+994)</option> 190 <option data-countryCode="BS" value="1242">Bahamas (+1242)</option> 191 <option data-countryCode="BH" value="973">Bahrain (+973)</option> 192 <option data-countryCode="BD" value="880">Bangladesh (+880)</option> 193 <option data-countryCode="BB" value="1246">Barbados (+1246)</option> 194 <option data-countryCode="BY" value="375">Belarus (+375)</option> 195 <option data-countryCode="BE" value="32">Belgium (+32)</option> 196 <option data-countryCode="BZ" value="501">Belize (+501)</option> 197 <option data-countryCode="BJ" value="229">Benin (+229)</option> 198 <option data-countryCode="BM" value="1441">Bermuda (+1441)</option> 199 <option data-countryCode="BT" value="975">Bhutan (+975)</option> 200 <option data-countryCode="BO" value="591">Bolivia (+591)</option> 201 <option data-countryCode="BA" value="387">Bosnia Herzegovina (+387)</option> 202 <option data-countryCode="BW" value="267">Botswana (+267)</option> 203 <option data-countryCode="BR" value="55">Brazil (+55)</option> 204 <option data-countryCode="BN" value="673">Brunei (+673)</option> 205 <option data-countryCode="BG" value="359">Bulgaria (+359)</option> 206 <option data-countryCode="BF" value="226">Burkina Faso (+226)</option> 207 <option data-countryCode="BI" value="257">Burundi (+257)</option> 208 <option data-countryCode="KH" value="855">Cambodia (+855)</option> 209 <option data-countryCode="CM" value="237">Cameroon (+237)</option> 210 <option data-countryCode="CA" value="1">Canada (+1)</option> 211 <option data-countryCode="CV" value="238">Cape Verde Islands (+238)</option> 212 <option data-countryCode="KY" value="1345">Cayman Islands (+1345)</option> 213 <option data-countryCode="CF" value="236">Central African Republic (+236)</option> 214 <option data-countryCode="CL" value="56">Chile (+56)</option> 215 <option data-countryCode="CN" value="86">China (+86)</option> 216 <option data-countryCode="CO" value="57">Colombia (+57)</option> 217 <option data-countryCode="KM" value="269">Comoros (+269)</option> 218 <option data-countryCode="CG" value="242">Congo (+242)</option> 219 <option data-countryCode="CK" value="682">Cook Islands (+682)</option> 220 <option data-countryCode="CR" value="506">Costa Rica (+506)</option> 221 <option data-countryCode="HR" value="385">Croatia (+385)</option> 222 <option data-countryCode="CU" value="53">Cuba (+53)</option> 223 <option data-countryCode="CY" value="90392">Cyprus North (+90392)</option> 224 <option data-countryCode="CY" value="357">Cyprus South (+357)</option> 225 <option data-countryCode="CZ" value="42">Czech Republic (+42)</option> 226 <option data-countryCode="DK" value="45">Denmark (+45)</option> 227 <option data-countryCode="DJ" value="253">Djibouti (+253)</option> 228 <option data-countryCode="DM" value="1809">Dominica (+1809)</option> 229 <option data-countryCode="DO" value="1809">Dominican Republic (+1809)</option> 230 <option data-countryCode="EC" value="593">Ecuador (+593)</option> 231 <option data-countryCode="EG" value="20">Egypt (+20)</option> 232 <option data-countryCode="SV" value="503">El Salvador (+503)</option> 233 <option data-countryCode="GQ" value="240">Equatorial Guinea (+240)</option> 234 <option data-countryCode="ER" value="291">Eritrea (+291)</option> 235 <option data-countryCode="EE" value="372">Estonia (+372)</option> 236 <option data-countryCode="ET" value="251">Ethiopia (+251)</option> 237 <option data-countryCode="FK" value="500">Falkland Islands (+500)</option> 238 <option data-countryCode="FO" value="298">Faroe Islands (+298)</option> 239 <option data-countryCode="FJ" value="679">Fiji (+679)</option> 240 <option data-countryCode="FI" value="358">Finland (+358)</option> 241 <option data-countryCode="FR" value="33">France (+33)</option> 242 <option data-countryCode="GF" value="594">French Guiana (+594)</option> 243 <option data-countryCode="PF" value="689">French Polynesia (+689)</option> 244 <option data-countryCode="GA" value="241">Gabon (+241)</option> 245 <option data-countryCode="GM" value="220">Gambia (+220)</option> 246 <option data-countryCode="GE" value="7880">Georgia (+7880)</option> 247 <option data-countryCode="DE" value="49">Germany (+49)</option> 248 <option data-countryCode="GH" value="233">Ghana (+233)</option> 249 <option data-countryCode="GI" value="350">Gibraltar (+350)</option> 250 <option data-countryCode="GR" value="30">Greece (+30)</option> 251 <option data-countryCode="GL" value="299">Greenland (+299)</option> 252 <option data-countryCode="GD" value="1473">Grenada (+1473)</option> 253 <option data-countryCode="GP" value="590">Guadeloupe (+590)</option> 254 <option data-countryCode="GU" value="671">Guam (+671)</option> 255 <option data-countryCode="GT" value="502">Guatemala (+502)</option> 256 <option data-countryCode="GN" value="224">Guinea (+224)</option> 257 <option data-countryCode="GW" value="245">Guinea - Bissau (+245)</option> 258 <option data-countryCode="GY" value="592">Guyana (+592)</option> 259 <option data-countryCode="HT" value="509">Haiti (+509)</option> 260 <option data-countryCode="HN" value="504">Honduras (+504)</option> 261 <option data-countryCode="HK" value="852">Hong Kong (+852)</option> 262 <option data-countryCode="HU" value="36">Hungary (+36)</option> 263 <option data-countryCode="IS" value="354">Iceland (+354)</option> 264 <option data-countryCode="IN" value="91">India (+91)</option> 265 <option data-countryCode="ID" value="62">Indonesia (+62)</option> 266 <option data-countryCode="IR" value="98">Iran (+98)</option> 267 <option data-countryCode="IQ" value="964">Iraq (+964)</option> 268 <option data-countryCode="IE" value="353">Ireland (+353)</option> 269 <option data-countryCode="IL" value="972">Israel (+972)</option> 270 <option data-countryCode="IT" value="39">Italy (+39)</option> 271 <option data-countryCode="JM" value="1876">Jamaica (+1876)</option> 272 <option data-countryCode="JP" value="81">Japan (+81)</option> 273 <option data-countryCode="JO" value="962">Jordan (+962)</option> 274 <option data-countryCode="KZ" value="7">Kazakhstan (+7)</option> 275 <option data-countryCode="KE" value="254">Kenya (+254)</option> 276 <option data-countryCode="KI" value="686">Kiribati (+686)</option> 277 <option data-countryCode="KP" value="850">Korea North (+850)</option> 278 <option data-countryCode="KR" value="82">Korea South (+82)</option> 279 <option data-countryCode="KW" value="965">Kuwait (+965)</option> 280 <option data-countryCode="KG" value="996">Kyrgyzstan (+996)</option> 281 <option data-countryCode="LA" value="856">Laos (+856)</option> 282 <option data-countryCode="LV" value="371">Latvia (+371)</option> 283 <option data-countryCode="LB" value="961">Lebanon (+961)</option> 284 <option data-countryCode="LS" value="266">Lesotho (+266)</option> 285 <option data-countryCode="LR" value="231">Liberia (+231)</option> 286 <option data-countryCode="LY" value="218">Libya (+218)</option> 287 <option data-countryCode="LI" value="417">Liechtenstein (+417)</option> 288 <option data-countryCode="LT" value="370">Lithuania (+370)</option> 289 <option data-countryCode="LU" value="352">Luxembourg (+352)</option> 290 <option data-countryCode="MO" value="853">Macao (+853)</option> 291 <option data-countryCode="MK" value="389">Macedonia (+389)</option> 292 <option data-countryCode="MG" value="261">Madagascar (+261)</option> 293 <option data-countryCode="MW" value="265">Malawi (+265)</option> 294 <option data-countryCode="MY" value="60">Malaysia (+60)</option> 295 <option data-countryCode="MV" value="960">Maldives (+960)</option> 296 <option data-countryCode="ML" value="223">Mali (+223)</option> 297 <option data-countryCode="MT" value="356">Malta (+356)</option> 298 <option data-countryCode="MH" value="692">Marshall Islands (+692)</option> 299 <option data-countryCode="MQ" value="596">Martinique (+596)</option> 300 <option data-countryCode="MR" value="222">Mauritania (+222)</option> 301 <option data-countryCode="YT" value="269">Mayotte (+269)</option> 302 <option data-countryCode="MX" value="52">Mexico (+52)</option> 303 <option data-countryCode="FM" value="691">Micronesia (+691)</option> 304 <option data-countryCode="MD" value="373">Moldova (+373)</option> 305 <option data-countryCode="MC" value="377">Monaco (+377)</option> 306 <option data-countryCode="MN" value="976">Mongolia (+976)</option> 307 <option data-countryCode="MS" value="1664">Montserrat (+1664)</option> 308 <option data-countryCode="MA" value="212">Morocco (+212)</option> 309 <option data-countryCode="MZ" value="258">Mozambique (+258)</option> 310 <option data-countryCode="MN" value="95">Myanmar (+95)</option> 311 <option data-countryCode="NA" value="264">Namibia (+264)</option> 312 <option data-countryCode="NR" value="674">Nauru (+674)</option> 313 <option data-countryCode="NP" value="977">Nepal (+977)</option> 314 <option data-countryCode="NL" value="31">Netherlands (+31)</option> 315 <option data-countryCode="NC" value="687">New Caledonia (+687)</option> 316 <option data-countryCode="NZ" value="64">New Zealand (+64)</option> 317 <option data-countryCode="NI" value="505">Nicaragua (+505)</option> 318 <option data-countryCode="NE" value="227">Niger (+227)</option> 319 <option data-countryCode="NG" value="234">Nigeria (+234)</option> 320 <option data-countryCode="NU" value="683">Niue (+683)</option> 321 <option data-countryCode="NF" value="672">Norfolk Islands (+672)</option> 322 <option data-countryCode="NP" value="670">Northern Marianas (+670)</option> 323 <option data-countryCode="NO" value="47">Norway (+47)</option> 324 <option data-countryCode="OM" value="968">Oman (+968)</option> 325 <option data-countryCode="PW" value="680">Palau (+680)</option> 326 <option data-countryCode="PA" value="507">Panama (+507)</option> 327 <option data-countryCode="PG" value="675">Papua New Guinea (+675)</option> 328 <option data-countryCode="PY" value="595">Paraguay (+595)</option> 329 <option data-countryCode="PE" value="51">Peru (+51)</option> 330 <option data-countryCode="PH" value="63">Philippines (+63)</option> 331 <option data-countryCode="PL" value="48">Poland (+48)</option> 332 <option data-countryCode="PT" value="351">Portugal (+351)</option> 333 <option data-countryCode="PR" value="1787">Puerto Rico (+1787)</option> 334 <option data-countryCode="QA" value="974">Qatar (+974)</option> 335 <option data-countryCode="RE" value="262">Reunion (+262)</option> 336 <option data-countryCode="RO" value="40">Romania (+40)</option> 337 <option data-countryCode="RU" value="7">Russia (+7)</option> 338 <option data-countryCode="RW" value="250">Rwanda (+250)</option> 339 <option data-countryCode="SM" value="378">San Marino (+378)</option> 340 <option data-countryCode="ST" value="239">Sao Tome & Principe (+239)</option> 341 <option data-countryCode="SA" value="966">Saudi Arabia (+966)</option> 342 <option data-countryCode="SN" value="221">Senegal (+221)</option> 343 <option data-countryCode="CS" value="381">Serbia (+381)</option> 344 <option data-countryCode="SC" value="248">Seychelles (+248)</option> 345 <option data-countryCode="SL" value="232">Sierra Leone (+232)</option> 346 <option data-countryCode="SG" value="65">Singapore (+65)</option> 347 <option data-countryCode="SK" value="421">Slovak Republic (+421)</option> 348 <option data-countryCode="SI" value="386">Slovenia (+386)</option> 349 <option data-countryCode="SB" value="677">Solomon Islands (+677)</option> 350 <option data-countryCode="SO" value="252">Somalia (+252)</option> 351 <option data-countryCode="ZA" value="27">South Africa (+27)</option> 352 <option data-countryCode="ES" value="34">Spain (+34)</option> 353 <option data-countryCode="LK" value="94">Sri Lanka (+94)</option> 354 <option data-countryCode="SH" value="290">St. Helena (+290)</option> 355 <option data-countryCode="KN" value="1869">St. Kitts (+1869)</option> 356 <option data-countryCode="SC" value="1758">St. Lucia (+1758)</option> 357 <option data-countryCode="SD" value="249">Sudan (+249)</option> 358 <option data-countryCode="SR" value="597">Suriname (+597)</option> 359 <option data-countryCode="SZ" value="268">Swaziland (+268)</option> 360 <option data-countryCode="SE" value="46">Sweden (+46)</option> 361 <option data-countryCode="CH" value="41">Switzerland (+41)</option> 362 <option data-countryCode="SI" value="963">Syria (+963)</option> 363 <option data-countryCode="TW" value="886">Taiwan (+886)</option> 364 <option data-countryCode="TJ" value="7">Tajikstan (+7)</option> 365 <option data-countryCode="TH" value="66">Thailand (+66)</option> 366 <option data-countryCode="TG" value="228">Togo (+228)</option> 367 <option data-countryCode="TO" value="676">Tonga (+676)</option> 368 <option data-countryCode="TT" value="1868">Trinidad & Tobago (+1868)</option> 369 <option data-countryCode="TN" value="216">Tunisia (+216)</option> 370 <option data-countryCode="TR" value="90">Turkey (+90)</option> 371 <option data-countryCode="TM" value="7">Turkmenistan (+7)</option> 372 <option data-countryCode="TM" value="993">Turkmenistan (+993)</option> 373 <option data-countryCode="TC" value="1649">Turks & Caicos Islands (+1649)</option> 374 <option data-countryCode="TV" value="688">Tuvalu (+688)</option> 375 <option data-countryCode="UG" value="256">Uganda (+256)</option> 376 <!-- <option data-countryCode="GB" value="44">UK (+44)</option> --> 377 <option data-countryCode="UA" value="380">Ukraine (+380)</option> 378 <option data-countryCode="AE" value="971">United Arab Emirates (+971)</option> 379 <option data-countryCode="UY" value="598">Uruguay (+598)</option> 380 <!-- <option data-countryCode="US" value="1">USA (+1)</option> --> 381 <option data-countryCode="UZ" value="7">Uzbekistan (+7)</option> 382 <option data-countryCode="VU" value="678">Vanuatu (+678)</option> 383 <option data-countryCode="VA" value="379">Vatican City (+379)</option> 384 <option data-countryCode="VE" value="58">Venezuela (+58)</option> 385 <option data-countryCode="VN" value="84">Vietnam (+84)</option> 386 <option data-countryCode="VG" value="84">Virgin Islands - British (+1284)</option> 387 <option data-countryCode="VI" value="84">Virgin Islands - US (+1340)</option> 388 <option data-countryCode="WF" value="681">Wallis & Futuna (+681)</option> 389 <option data-countryCode="YE" value="969">Yemen (North)(+969)</option> 390 <option data-countryCode="YE" value="967">Yemen (South)(+967)</option> 391 <option data-countryCode="ZM" value="260">Zambia (+260)</option> 392 <option data-countryCode="ZW" value="263">Zimbabwe (+263)</option> 393 </optgroup> 394 </select> 395 <?php 396 } 397 if ($add_more_fields_seats == 'ON') { 398 ?> 399 <label>Seat</label> 400 <input type="text" name="seats" class="input_box"> 401 <?php 402 } 403 if ($add_more_fields_rooms == 'ON') { 404 ?> 405 <label>Room</label> 406 <input type="text" name="rooms" class="input_box"> 127 407 <?php 128 408 } … … 139 419 ?> 140 420 <label for="<?php echo esc_attr(ucwords($inputfield4));?>"><?php echo esc_attr(ucwords($inputfield4));?></label> 141 <select id="<?php echo esc_attr(ucwords($inputfield4));?>" name="field4" >421 <select id="<?php echo esc_attr(ucwords($inputfield4));?>" name="field4" class="input_box"> 142 422 <?php 143 423 $ex_array = $addoptions_value_field4['field4_add_options']; … … 156 436 ?> 157 437 <label for="<?php echo esc_attr(ucwords($inputfield4));?>"><?php echo esc_attr(ucwords($inputfield4));?></label> 158 <textarea id="<?php echo esc_attr(ucwords($inputfield4));?>" name="field4" placeholder="<?php echo esc_attr(ucwords($inputfield4));?>" style="height:200px; resize: none;" ></textarea>438 <textarea id="<?php echo esc_attr(ucwords($inputfield4));?>" name="field4" placeholder="<?php echo esc_attr(ucwords($inputfield4));?>" style="height:200px; resize: none;" class="input_box"></textarea> 159 439 <?php 160 440 } … … 173 453 $field4 = sanitize_text_field($_POST['field4']); 174 454 175 if(empty($field1 && $field2 && $field3 && $field4)){ 455 $date = sanitize_text_field($_POST['date_s']); 456 $from_date = sanitize_text_field($_POST['from_date']); 457 $to_date = sanitize_text_field($_POST['to_date']); 458 $gender = sanitize_text_field($_POST['gender']); 459 $countries = sanitize_text_field($_POST['countries']); 460 $seats = sanitize_text_field($_POST['seats']); 461 $rooms = sanitize_text_field($_POST['rooms']); 462 463 if($add_more_fields_date == 'OFF'){ 464 $date='form'; 465 $outdate=''; 466 } 467 if($add_more_fields_from_date == 'OFF'){ 468 $from_date='form'; 469 $outputfrom_date=''; 470 } 471 if($add_more_fields_to_date == 'OFF'){ 472 $to_date='form'; 473 $outputto_date=''; 474 } 475 if($add_more_fields_gender == 'OFF'){ 476 $gender='form'; 477 $outputgender=''; 478 } 479 if($add_more_fields_countries == 'OFF'){ 480 $countries='form'; 481 $outputcountries=''; 482 } 483 if($add_more_fields_seats == 'OFF'){ 484 $seats='form'; 485 $outputseats=''; 486 } 487 if($add_more_fields_rooms == 'OFF'){ 488 $rooms='form'; 489 $outputrooms=''; 490 } 491 //////***///// 492 493 if($add_more_fields_date == 'ON'){ 494 $outdate='Data :'.$date; 495 } 496 if($add_more_fields_from_date == 'ON'){ 497 $outputfrom_date='From Date :'.$from_date; 498 } 499 if($add_more_fields_to_date == 'ON'){ 500 $outputto_date='To Date :'.$to_date; 501 } 502 if($add_more_fields_gender == 'ON'){ 503 $outputgender='Gender :'.$gender; 504 } 505 if($add_more_fields_countries == 'ON'){ 506 $outputcountries='Countries :'.$countries; 507 } 508 if($add_more_fields_seats == 'ON'){ 509 $outputseats='Seats :'.$seats; 510 } 511 if($add_more_fields_rooms == 'ON'){ 512 $outputrooms='Rooms :'.$rooms; 513 } 514 515 if(empty($field1 && $field2 && $field3 && $field4 && $date && $from_date && $to_date && $gender && $countries && $seats && $rooms )){ 176 516 echo' <div style=" background-color: #ea9696; color:#000; padding:10px; margin-top:40px;"> All Fields Is Required </div>'; 177 517 } 178 518 else{ 179 $sent =''; 519 520 $sent =''; 180 521 if($tag_select_field1 == 'Select'){ 181 522 … … 193 534 $to = ''.sanitize_text_field($toemail).''; 194 535 $subject = 'Reservation Booking'; 536 195 537 $body = ' 196 538 '.sanitize_text_field(ucwords($inputfield1)).' : '.sanitize_text_field(ucwords($addoptionsnew)).' … … 201 543 <br> 202 544 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($_POST['field4'])).' 203 <br> 204 '; 205 206 // echo $body; 207 208 $headers = array('Content-Type: text/html; charset=UTF-8'); 209 $sent = wp_mail( $to, $subject, $body, $headers ); 210 545 <br>' 546 .sanitize_text_field(ucwords($outdate)).' 547 <br>' 548 .sanitize_text_field(ucwords($outputfrom_date)).' 549 <br>' 550 .sanitize_text_field(ucwords($outputto_date)).' 551 <br>' 552 .sanitize_text_field(ucwords($outputgender)).' 553 <br>' 554 .sanitize_text_field(ucwords($outputcountries)).' 555 <br>' 556 .sanitize_text_field(ucwords($outputseats)).' 557 <br>' 558 .sanitize_text_field(ucwords($outputrooms)) 559 ; 560 $headers = array('Content-Type: text/html; charset=UTF-8'); 561 $sent = wp_mail( $to, $subject, $body, $headers ); 562 563 //*****// 564 565 global $wpdb; 566 $table = $wpdb->prefix.'reservation_entries'; 567 $data = array('entries' => sanitize_text_field($body)); 568 $format = array('%s','%d'); 569 $wpdb->insert($table,$data,$format); 570 $my_id = $wpdb->insert_id; 571 572 //***//// 211 573 212 574 } … … 233 595 '.sanitize_text_field(ucwords($inputfield3)).' : '.sanitize_text_field(ucwords($_POST['field3'])).' 234 596 <br> 235 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($_POST['field4'])).' 236 <br> 237 '; 597 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($_POST['field4'])) 598 .' 599 <br>' 600 .sanitize_text_field(ucwords($outdate)).' 601 <br>' 602 .sanitize_text_field(ucwords($outputfrom_date)).' 603 <br>' 604 .sanitize_text_field(ucwords($outputto_date)).' 605 <br>' 606 .sanitize_text_field(ucwords($outputgender)).' 607 <br>' 608 .sanitize_text_field(ucwords($outputcountries)).' 609 <br>' 610 .sanitize_text_field(ucwords($outputseats)).' 611 <br>' 612 .sanitize_text_field(ucwords($outputrooms)) 613 ; 238 614 // echo $body; 239 615 $headers = array('Content-Type: text/html; charset=UTF-8'); 240 616 $sent = wp_mail( $to, $subject, $body, $headers ); 617 //*****// 618 619 global $wpdb; 620 $table = $wpdb->prefix.'reservation_entries'; 621 $data = array('entries' => sanitize_text_field($body)); 622 $format = array('%s','%d'); 623 $wpdb->insert($table,$data,$format); 624 $my_id = $wpdb->insert_id; 625 626 //***//// 241 627 } 242 628 243 ///*****//244 629 245 630 if($tag_select_field3 == 'Select'){ … … 265 650 '.sanitize_text_field(ucwords($inputfield3)).' : '.sanitize_text_field(ucwords($addoptionsnew)).' 266 651 <br> 267 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($_POST['field4'])).' 268 <br> 269 '; 652 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($_POST['field4'])) 653 .' 654 <br>' 655 .sanitize_text_field(ucwords($outdate)).' 656 <br>' 657 .sanitize_text_field(ucwords($outputfrom_date)).' 658 <br>' 659 .sanitize_text_field(ucwords($outputto_date)).' 660 <br>' 661 .sanitize_text_field(ucwords($outputgender)).' 662 <br>' 663 .sanitize_text_field(ucwords($outputcountries)).' 664 <br>' 665 .sanitize_text_field(ucwords($outputseats)).' 666 <br>' 667 .sanitize_text_field(ucwords($outputrooms)) 668 ; 270 669 $headers = array('Content-Type: text/html; charset=UTF-8'); 271 670 $sent = wp_mail( $to, $subject, $body, $headers ); 272 273 // $form_entry = array($inputfield1 => $_POST['field1'],$inputfield2 => $_POST['field2'],$inputfield3 => $addoptionsnew,$inputfield4 => $_POST['field4'] ); 274 275 // $option_name = 'form_entry_show'; 276 // add_option( $option_name, $form_entry); 277 278 } 279 671 //*****// 672 673 global $wpdb; 674 $table = $wpdb->prefix.'reservation_entries'; 675 $data = array('entries' => sanitize_text_field($body)); 676 $format = array('%s','%d'); 677 $wpdb->insert($table,$data,$format); 678 $my_id = $wpdb->insert_id; 679 680 //***//// 681 682 } 280 683 ///****//// 281 282 684 if($tag_select_field4 == 'Select'){ 283 685 $fieldvalueid = sanitize_text_field($_POST['field4']); … … 301 703 '.sanitize_text_field(ucwords($inputfield3)).' : '.esc_attr(ucwords($_POST['field3'])).' 302 704 <br> 303 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($addoptionsnew)).' 304 <br> 305 '; 306 705 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($addoptionsnew)) 706 .' 707 <br>' 708 .sanitize_text_field(ucwords($outdate)).' 709 <br>' 710 .sanitize_text_field(ucwords($outputfrom_date)).' 711 <br>' 712 .sanitize_text_field(ucwords($outputto_date)).' 713 <br>' 714 .sanitize_text_field(ucwords($outputgender)).' 715 <br>' 716 .sanitize_text_field(ucwords($outputcountries)).' 717 <br>' 718 .sanitize_text_field(ucwords($outputseats)).' 719 <br>' 720 .sanitize_text_field(ucwords($outputrooms)) 721 ; 722 307 723 $headers = array('Content-Type: text/html; charset=UTF-8'); 308 724 $sent = wp_mail( $to, $subject, $body, $headers ); 725 726 //*****// 727 728 global $wpdb; 729 $table = $wpdb->prefix.'reservation_entries'; 730 $data = array('entries' => sanitize_text_field($body)); 731 $format = array('%s','%d'); 732 $wpdb->insert($table,$data,$format); 733 $my_id = $wpdb->insert_id; 734 735 //***//// 736 309 737 } 310 738 311 if($ sent){739 if($my_id){ 312 740 echo '<div style="background-color:#5ebc5f; margin-top:30px; color:#000; padding:10px; border-radius:10px;">Msg sent </div>'; 313 741 } … … 317 745 318 746 } 319 320 } 321 322 747 } 323 748 return ob_get_clean(); 324 749 } -
reservation-form/tags/1.0.0/inc/oopspk_add_options.php
r2752823 r2756581 10 10 $inputfield3 = get_option('inputfield3'); 11 11 $inputfield4 = get_option('inputfield4'); 12 //***// 13 $email_permission_field1 = get_option('email_permission_field1'); 14 $email_permission_field2 = get_option('email_permission_field2'); 15 $email_permission_field3 = get_option('email_permission_field3'); 16 $email_permission_field4 = get_option('email_permission_field4'); 17 ?> 18 <form action="options.php" method="post"> 19 <?php 20 21 settings_fields( 'oops-reservation-from-settings-add_options' ); 22 do_settings_sections( 'oops-reservation-from-settings-add_options' ); 12 23 13 ?> 14 <form action="#" method="post"> 24 ?> 15 25 <table class="wp-list-table widefat fixed posts" style="margin-bottom:10px;"> 16 26 <thead> … … 19 29 <th> Add Options </th> 20 30 <th> Enter Email </th> 31 <th> Emails Send Permission </th> 21 32 <th> Actions </th> 22 33 </tr> … … 27 38 <th> Add Options </th> 28 39 <th> Enter Email </th> 40 <th> Emails Send Permission </th> 29 41 <th> Actions </th> 30 42 </tr> … … 40 52 <td> 41 53 <ol class="add_options_field1_ol"> 42 <li><input name="field1_add_options[]" ></li>54 <li><input name="field1_add_options[]" required></li> 43 55 </ol> 44 56 </td> 45 57 <td> 46 58 <ol class="email_field1_ol"> 47 <li><input name="field1_email[]" ></li>59 <li><input name="field1_email[]" required></li> 48 60 </ol> 49 61 </td> 50 62 <td > 63 <select name="permission_field1"> 64 <?php 65 if($email_permission_field1 == 'On'){ 66 echo'<option select >On</option>'; 67 echo'<option>Off</option>'; 68 } 69 else{ 70 echo'<option>Off</option>'; 71 echo'<option>On</option>'; 72 } 73 ?> 74 75 </select> 76 </td> 51 77 <td><span class="add_options" id="btnfield1">Add Options</span></td> 52 78 </tr> … … 67 93 </ol> 68 94 </td> 69 95 <td> 96 <select name="permission_field2"> 97 <?php 98 if($email_permission_field2 == 'On'){ 99 echo'<option select >On</option>'; 100 echo'<option>Off</option>'; 101 } 102 else{ 103 echo'<option>Off</option>'; 104 echo'<option>On</option>'; 105 } 106 ?> 107 </select> 108 </td> 70 109 <td><span class="add_options" id="btnfield2">Add Options</span></td> 71 110 </tr> … … 86 125 </ol> 87 126 </td> 88 127 <td> 128 <select name="permission_field3"> 129 <?php 130 if($email_permission_field3 == 'On'){ 131 echo'<option select >On</option>'; 132 echo'<option>Off</option>'; 133 } 134 else{ 135 echo'<option>Off</option>'; 136 echo'<option>On</option>'; 137 } 138 ?> 139 </select> 140 </td> 89 141 <td><span class="add_options" id="btnfield3">Add Options</span></td> 90 142 … … 108 160 </td> 109 161 162 <td> 163 <select name="permission_field4"> 164 <?php 165 if($email_permission_field4 == 'On'){ 166 echo'<option select >On</option>'; 167 echo'<option>Off</option>'; 168 } 169 else{ 170 echo'<option>Off</option>'; 171 echo'<option>On</option>'; 172 } 173 ?> 174 </select> 175 </td> 110 176 <td><span class="add_options" id="btnfield4">Add Options</span></td> 111 177 </tr> … … 116 182 </tbody> 117 183 </table> 118 <input type="submit" name="add_option " id="submit" class="button button-primary" value="Save Changes" />184 <input type="submit" name="add_option_my" id="submit" class="button button-primary" value="Save Changes" /> 119 185 </form> 120 <?php121 if(isset($_POST['add_option'])){122 if($tag_select_field1 == 'Select'){123 124 //$field1_add_options = sanitize_text_field($_POST['field1_add_options']);125 //$field1_email = sanitize_text_field($_POST['field1_email']);126 127 128 $field1_add_options = array_map( 'sanitize_text_field', $_POST['field1_add_options'] );129 $field1_email = array_map( 'sanitize_text_field', $_POST['field1_email'] );130 131 // var_dump($field1_add_options,$field1_email);132 133 $field1_output = array("field1_add_options"=>$field1_add_options, "field1_email"=>$field1_email);134 135 $option_name = 'addoptions_value_field1';136 update_option( $option_name, $field1_output );137 138 }139 if($tag_select_field2 == 'Select'){140 141 // $field2_add_options = $_POST['field2_add_options'];142 // $field2_email = $_POST['field2_email'];143 144 $field2_add_options = array_map( 'sanitize_text_field', $_POST['field2_add_options'] );145 $field2_email = array_map( 'sanitize_text_field', $field2_email = $_POST['field2_email'] );146 147 $field2_output = array("field2_add_options"=>$field2_add_options, "field2_email"=>$field2_email);148 149 $option_name = 'addoptions_value_field2';150 update_option( $option_name, $field2_output );151 152 }153 if($tag_select_field3 == 'Select'){154 155 // $field3_add_options = $_POST['field3_add_options'];156 // $field3_email = $_POST['field3_email'];157 158 $field3_add_options = array_map( 'sanitize_text_field', $_POST['field3_add_options'] );159 $field3_email = array_map( 'sanitize_text_field', $_POST['field3_email'] );160 161 $field3_output = array("field3_add_options"=>$field3_add_options, "field3_email"=>$field3_email);162 163 $option_name = 'addoptions_value_field3';164 update_option( $option_name, $field3_output );165 166 }167 if($tag_select_field4 == 'Select'){168 169 // $field4_add_options = $_POST['field4_add_options'];170 // $field4_email = $_POST['field4_email'];171 172 $field4_add_options = array_map( 'sanitize_text_field', $_POST['field4_add_options'] );173 $field4_email = array_map( 'sanitize_text_field', $_POST['field4_email'] );174 175 $field4_output = array("field4_add_options"=>$field4_add_options, "field4_email"=>$field4_email);176 177 $option_name = 'addoptions_value_field4';178 update_option( $option_name, $field4_output );179 }180 181 }182 183 ?> -
reservation-form/tags/1.0.0/inc/oopspk_customization.php
r2752823 r2756581 4 4 $oops_wp_reservation_fields_type = get_option('oops_wp_reservation_fields_type'); 5 5 $oops_wp_reservation_fields_tag = get_option('oops_wp_reservation_fields_tag'); 6 ?> 7 6 7 //*add_more_fields **// 8 $add_more_fields_date = get_option('add_more_fields_date'); 9 $add_more_fields_from_date = get_option('add_more_fields_from_date'); 10 $add_more_fields_to_date = get_option('add_more_fields_to_date'); 11 $add_more_fields_gender = get_option('add_more_fields_gender'); 12 $add_more_fields_countries = get_option('add_more_fields_countries'); 13 $add_more_fields_seats = get_option('add_more_fields_seats'); 14 $add_more_fields_rooms = get_option('add_more_fields_rooms'); 15 ?> 8 16 <form method="post" action="options.php"> 9 17 <?php 10 18 11 settings_fields( 'oops-reservation-from-settings- group' );12 do_settings_sections( 'oops-reservation-from-settings- group' );19 settings_fields( 'oops-reservation-from-settings-add_options' ); 20 do_settings_sections( 'oops-reservation-from-settings-add_options' ); 13 21 14 22 ?> … … 290 298 </table> 291 299 292 300 301 302 <span onclick="togglePopup()" class="add_fields">Add More Fields</span> 303 <br> 293 304 <input type="submit" name="submit_customization" id="submit" class="button button-primary" value="Save Changes" /> 294 305 </form> 295 306 307 308 <div class="popup" id="popup-1"> 309 <div class="overlay"></div> 310 <div class="content"> 311 <div class="close-btn" onclick="togglePopup()">×</div> 312 <h1>Add More Fields</h1> 313 <p> 314 </p> 315 <form action="options.php" method="post"> 316 <?php 317 settings_fields( 'oops-reservation-from-settings-add_options' ); 318 do_settings_sections( 'oops-reservation-from-settings-add_options' ); 319 ?> 320 <table class="wp-list-table widefat fixed posts" style="margin-bottom:10px;"> 321 <thead> 322 <tr> 323 <th> Fields Names </th> 324 <th width="10%"> Action </th> 325 </tr> 326 </thead> 327 <tfoot> 328 <tr> 329 <th> Fields Names </th> 330 <th width="10%"> Action</th> 331 332 </tr> 333 </tfoot> 334 <tbody> 335 336 <tr> 337 <td> 338 Date 339 </td> 340 <td> 341 <select name="add_more_fields_date"> 342 <?php if($add_more_fields_date == 'ON'){ 343 echo'<option selected>ON</option> 344 <option>OFF</option>'; 345 } 346 else{ 347 echo' 348 <option selected>OFF</option> 349 <option >ON</option> 350 '; 351 } 352 ?> 353 354 </select> 355 </td> 356 357 </tr> 358 <tr> 359 <td> 360 From Date 361 </td> 362 <td> 363 <select name="add_more_fields_from_date"> 364 <?php if($add_more_fields_from_date == 'ON'){ 365 echo'<option selected>ON</option> 366 <option>OFF</option>'; 367 } 368 else{ 369 echo' 370 <option selected>OFF</option> 371 <option >ON</option> 372 '; 373 } 374 ?> 375 </select> 376 </td> 377 378 </tr> 379 <tr> 380 <td> 381 To Date 382 </td> 383 <td> 384 <select name="add_more_fields_to_date"> 385 <?php if($add_more_fields_to_date == 'ON'){ 386 echo'<option selected>ON</option> 387 <option>OFF</option>'; 388 } 389 else{ 390 echo' 391 <option selected>OFF</option> 392 <option >ON</option> 393 '; 394 } 395 ?> 396 </select> 397 </td> 398 399 </tr> 400 <tr> 401 <td> 402 Gender 403 </td> 404 <td> 405 <select name="add_more_fields_gender"> 406 <?php if($add_more_fields_gender == 'ON'){ 407 echo'<option selected>ON</option> 408 <option>OFF</option>'; 409 } 410 else{ 411 echo' 412 <option selected>OFF</option> 413 <option >ON</option> 414 '; 415 } 416 ?> 417 </select> 418 </td> 419 420 </tr> 421 <tr> 422 <td> 423 Countries 424 </td> 425 <td> 426 <select name="add_more_fields_countries"> 427 <?php if($add_more_fields_countries == 'ON'){ 428 echo'<option selected>ON</option> 429 <option>OFF</option>'; 430 } 431 else{ 432 echo' 433 <option selected>OFF</option> 434 <option >ON</option> 435 '; 436 } 437 ?> 438 </select> 439 </td> 440 441 </tr> 442 <tr> 443 <td> 444 Seats 445 </td> 446 <td> 447 <select name="add_more_fields_seats"> 448 <?php if($add_more_fields_seats == 'ON'){ 449 echo'<option selected>ON</option> 450 <option>OFF</option>'; 451 } 452 else{ 453 echo' 454 <option selected>OFF</option> 455 <option >ON</option> 456 '; 457 } 458 ?> 459 </select> 460 </td> 461 462 </tr> 463 <tr> 464 <td> 465 Rooms 466 </td> 467 <td> 468 <select name="add_more_fields_rooms"> 469 <?php if($add_more_fields_rooms == 'ON'){ 470 echo'<option selected>ON</option> 471 <option>OFF</option>'; 472 } 473 else{ 474 echo' 475 <option selected>OFF</option> 476 <option >ON</option> 477 '; 478 } 479 ?> 480 </select> 481 </td> 482 483 </tr> 484 </tbody> 485 </table> 486 <input type="submit" name="add_more_fields" id="submit" class="button button-primary" value="Save Changes" /> 487 </div> 488 </div> 489 490 </form> 296 491 <?php 297 492 if ( isset( $_GET['settings-updated'] ) ) { 298 493 // add settings saved message with the class of "updated" 299 494 add_settings_error( 'oopspk_messages', 'oopspk_messages', __( 'Settings Saved', 'oopspk_messages' ), 'updated' ); 300 } 301 495 } 302 496 // show error/update messages 303 497 settings_errors( 'oopspk_messages' ); -
reservation-form/tags/1.0.0/inc/register_hooks/oops_all_fields.php
r2752823 r2756581 1 1 <?php 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 4 3 //**tag_select_field1**// 5 6 4 $option_name = 'tag_select_field1'; 7 8 9 5 if ( get_option( $option_name ) !== false ) { 10 6 11 7 $tag_select_field1 = get_option( 'tag_select_field1' ); 12 8 update_option( $option_name, $tag_select_field1 ); 13 14 } else { 15 9 } else { 16 10 // The option hasn't been created yet, so add it with $autoload set to 'no'. 17 11 $new_value = "Input"; … … 20 14 add_option( $option_name, $new_value, $deprecated, $autoload ); 21 15 } 22 23 16 //**tag_select_field2**// 24 25 17 $option_name = 'tag_select_field2'; 26 27 28 if ( get_option( $option_name ) !== false ) { 29 18 if ( get_option( $option_name ) !== false ) { 30 19 $tag_select_field2 = get_option( 'tag_select_field2' ); 31 20 update_option( $option_name, $tag_select_field2 ); 32 33 } else { 34 21 } else { 35 22 // The option hasn't been created yet, so add it with $autoload set to 'no'. 36 23 $new_value = "Input"; … … 39 26 add_option( $option_name, $new_value, $deprecated, $autoload ); 40 27 } 41 42 28 //**tag_select_field3**// 43 44 29 $option_name = 'tag_select_field3'; 45 46 47 if ( get_option( $option_name ) !== false ) { 48 30 if ( get_option( $option_name ) !== false ) { 49 31 $tag_select_field3 = get_option( 'tag_select_field3' ); 50 update_option( $option_name, $tag_select_field3 ); 51 52 } else { 53 32 update_option( $option_name, $tag_select_field3 ); 33 } else { 54 34 // The option hasn't been created yet, so add it with $autoload set to 'no'. 55 35 $new_value = "Select"; … … 58 38 add_option( $option_name, $new_value, $deprecated, $autoload ); 59 39 } 60 61 40 //**tag_select_field4**// 62 63 41 $option_name = 'tag_select_field4'; 64 65 66 42 if ( get_option( $option_name ) !== false ) { 67 43 68 44 $tag_select_field4 = get_option( 'tag_select_field4' ); 69 45 update_option( $option_name, $tag_select_field4 ); 70 71 } else { 72 46 } else { 73 47 // The option hasn't been created yet, so add it with $autoload set to 'no'. 74 48 $new_value = "Textarea"; … … 77 51 add_option( $option_name, $new_value, $deprecated, $autoload ); 78 52 } 79 80 81 53 //**fieldtype1**// 82 54 $option_name = 'fieldtype1'; 83 84 85 55 if ( get_option( $option_name ) !== false ) { 86 56 … … 301 271 add_option( $option_name, $new_value, $deprecated, $autoload ); 302 272 } 273 274 ////***email_permission_field1**//// 275 $option_name = 'email_permission_field1'; 276 277 278 if ( get_option( $option_name ) !== false ) { 279 280 $email_permission_field1 = get_option( 'email_permission_field1' ); 281 update_option( $option_name, $email_permission_field1 ); 282 283 } else { 284 285 // The option hasn't been created yet, so add it with $autoload set to 'no'. 286 $new_value = "off"; 287 $deprecated = null; 288 $autoload = 'no'; 289 add_option( $option_name, $new_value, $deprecated, $autoload ); 290 } 291 292 ////***email_permission_field2**//// 293 294 $option_name = 'email_permission_field2'; 295 296 297 if ( get_option( $option_name ) !== false ) { 298 299 $tag_select_field2 = get_option( 'email_permission_field2' ); 300 update_option( $option_name, $tag_select_field2 ); 301 302 } else { 303 304 // The option hasn't been created yet, so add it with $autoload set to 'no'. 305 $new_value = "off"; 306 $deprecated = null; 307 $autoload = 'no'; 308 add_option( $option_name, $new_value, $deprecated, $autoload ); 309 } 310 311 ////***email_permission_field3**//// 312 313 $option_name = 'email_permission_field3'; 314 315 316 if ( get_option( $option_name ) !== false ) { 317 318 $tag_select_field3 = get_option( 'email_permission_field3' ); 319 update_option( $option_name, $tag_select_field3 ); 320 321 } else { 322 323 // The option hasn't been created yet, so add it with $autoload set to 'no'. 324 $new_value = "on"; 325 $deprecated = null; 326 $autoload = 'no'; 327 add_option( $option_name, $new_value, $deprecated, $autoload ); 328 } 329 330 ////***email_permission_field4**//// 331 332 $option_name = 'email_permission_field4'; 333 334 335 if ( get_option( $option_name ) !== false ) { 336 337 $tag_select_field4 = get_option( 'email_permission_field4' ); 338 update_option( $option_name, $tag_select_field4 ); 339 340 } else { 341 342 // The option hasn't been created yet, so add it with $autoload set to 'no'. 343 $new_value = "off"; 344 $deprecated = null; 345 $autoload = 'no'; 346 add_option( $option_name, $new_value, $deprecated, $autoload ); 347 } 348 349 350 ////**Add More Fields Date***/// 351 352 $option_name = 'add_more_fields_date'; 353 354 355 if ( get_option( $option_name ) !== false ) { 356 357 $add_more_fields_date = get_option( 'add_more_fields_date' ); 358 update_option( $option_name, $add_more_fields_date ); 359 360 } else { 361 362 // The option hasn't been created yet, so add it with $autoload set to 'no'. 363 $new_value = "OFF"; 364 $deprecated = null; 365 $autoload = 'no'; 366 add_option( $option_name, $new_value, $deprecated, $autoload ); 367 } 368 369 ////**Add More Fields add_more_fields_from_date***/// 370 371 $option_name = 'add_more_fields_from_date'; 372 373 374 if ( get_option( $option_name ) !== false ) { 375 376 $add_more_fields_from_date = get_option( 'add_more_fields_from_date' ); 377 update_option( $option_name, $add_more_fields_from_date ); 378 379 } else { 380 381 // The option hasn't been created yet, so add it with $autoload set to 'no'. 382 $new_value = "OFF"; 383 $deprecated = null; 384 $autoload = 'no'; 385 add_option( $option_name, $new_value, $deprecated, $autoload ); 386 } 387 388 ////**Add More Fields add_more_fields_to_date***/// 389 390 $option_name = 'add_more_fields_to_date'; 391 392 393 if ( get_option( $option_name ) !== false ) { 394 395 $add_more_fields_to_date = get_option( 'add_more_fields_to_date' ); 396 update_option( $option_name, $add_more_fields_to_date ); 397 398 } else { 399 400 // The option hasn't been created yet, so add it with $autoload set to 'no'. 401 $new_value = "OFF"; 402 $deprecated = null; 403 $autoload = 'no'; 404 add_option( $option_name, $new_value, $deprecated, $autoload ); 405 } 406 407 ////**Add More Fields add_more_fields_gender***/// 408 409 $option_name = 'add_more_fields_gender'; 410 411 412 if ( get_option( $option_name ) !== false ) { 413 414 $add_more_fields_gender = get_option( 'add_more_fields_gender' ); 415 update_option( $option_name, $add_more_fields_gender ); 416 417 } else { 418 419 // The option hasn't been created yet, so add it with $autoload set to 'no'. 420 $new_value = "OFF"; 421 $deprecated = null; 422 $autoload = 'no'; 423 add_option( $option_name, $new_value, $deprecated, $autoload ); 424 } 425 426 ////**Add More Fields add_more_fields_countries***/// 427 428 $option_name = 'add_more_fields_countries'; 429 430 431 if ( get_option( $option_name ) !== false ) { 432 433 $add_more_fields_countries = get_option( 'add_more_fields_countries' ); 434 update_option( $option_name, $add_more_fields_countries ); 435 436 } else { 437 438 // The option hasn't been created yet, so add it with $autoload set to 'no'. 439 $new_value = "OFF"; 440 $deprecated = null; 441 $autoload = 'no'; 442 add_option( $option_name, $new_value, $deprecated, $autoload ); 443 } 444 445 ////**Add More Fields add_more_fields_seats***/// 446 447 $option_name = 'add_more_fields_seats'; 448 449 450 if ( get_option( $option_name ) !== false ) { 451 452 $add_more_fields_seats = get_option( 'add_more_fields_seats' ); 453 update_option( $option_name, $add_more_fields_seats ); 454 455 } else { 456 457 // The option hasn't been created yet, so add it with $autoload set to 'no'. 458 $new_value = "OFF"; 459 $deprecated = null; 460 $autoload = 'no'; 461 add_option( $option_name, $new_value, $deprecated, $autoload ); 462 } 463 464 ////**Add More Fields add_more_fields_rooms***/// 465 466 $option_name = 'add_more_fields_rooms'; 467 468 469 if ( get_option( $option_name ) !== false ) { 470 471 $add_more_fields_rooms = get_option( 'add_more_fields_rooms' ); 472 update_option( $option_name, $add_more_fields_rooms ); 473 474 } else { 475 476 // The option hasn't been created yet, so add it with $autoload set to 'no'. 477 $new_value = "OFF"; 478 $deprecated = null; 479 $autoload = 'no'; 480 add_option( $option_name, $new_value, $deprecated, $autoload ); 481 } 482 ?> -
reservation-form/tags/1.0.0/inc/register_hooks/register_activation_hook_fields_tag.php
r2752823 r2756581 1 1 <?php 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 4 3 $option_name = 'oops_wp_reservation_fields_tag'; 5 6 7 4 if ( get_option( $option_name ) !== false ) { 8 9 5 $oops_wp_reservation_fields_tag = get_option( 'oops_wp_reservation_fields_tag' ); 10 6 update_option( $option_name, $oops_wp_reservation_fields_tag ); 11 12 7 } else { 13 14 8 // The option hasn't been created yet, so add it with $autoload set to 'no'. 15 9 $new_value = array("field1"=>"Input", "field2"=>"Input", "field3"=>"Select", "field4"=>"Textarea"); -
reservation-form/tags/1.0.0/inc/register_hooks/register_activation_hook_fields_type.php
r2752823 r2756581 1 1 <?php 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 4 3 $option_name = 'oops_wp_reservation_fields_type'; 5 6 7 4 if ( get_option( $option_name ) !== false ) { 8 9 5 $get_option_label = get_option( 'oops_wp_reservation_fields_type' ); 10 6 update_option( $option_name, $get_option_label ); 11 12 7 } else { 13 14 8 // The option hasn't been created yet, so add it with $autoload set to 'no'. 15 9 $new_value = array("field1"=>"Text", "field2"=>"Text", "field3"=>"Text", "field4"=>"Text"); -
reservation-form/tags/1.0.0/inc/register_hooks/register_activation_hook_label_name.php
r2752823 r2756581 1 1 <?php 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 4 3 $option_name = 'oops_wp_reservation_label_name' ; 5 6 7 4 if ( get_option( $option_name ) !== false ) { 8 9 5 $get_option_label = get_option( 'oops_wp_reservation_label_name' ); 10 6 update_option( $option_name, $get_option_label ); 11 12 7 } else { 13 14 8 // The option hasn't been created yet, so add it with $autoload set to 'no'. 15 9 $new_value = array("field1"=>"Name", "field2"=>"Email", "field3"=>"City", "field4"=>"feedback"); -
reservation-form/tags/1.0.0/index.php
r2752823 r2756581 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 3 // Silence is golden. 4 ?> -
reservation-form/tags/1.0.0/oopspk_reservation_form_7.php
r2752828 r2756581 5 5 Description: WP reservation form is the best free WordPress Plugin for you to build a reservation form. 6 6 Author: oops.pk 7 Author URI: https://www.oops.pk/ 7 Author URI: https://www.oops.pk/ 8 8 GitHub Plugin URI: https://github.com/oopspk/Reservation-form.git 9 9 Domain Path: /languages/ … … 17 17 defined('ABSPATH') || die ("You can't access this file directyly !"); 18 18 define("wp_reservation_dir", __DIR__); 19 19 20 require(wp_reservation_dir."/oopspk_reservation_form_main_load.php"); 20 21 require(wp_reservation_dir."/oopspk_reservation_form_optionpage.php"); … … 25 26 26 27 function oops_wp_reservation_register_activation_hook(){ 27 28 //labels name // 29 28 /*--------------------------- 29 labels name 30 ------------------------------*/ 30 31 require(wp_reservation_dir."/inc/register_hooks/register_activation_hook_label_name.php"); 31 //fields_tag// 32 32 /*---------------------------- 33 fields_tag 34 -----------------------------*/ 33 35 require(wp_reservation_dir."/inc/register_hooks/register_activation_hook_fields_tag.php"); 34 //fields_type// 35 36 /*------------------------------ 37 fields_type 38 -------------------------------*/ 36 39 require(wp_reservation_dir."/inc/register_hooks/register_activation_hook_fields_type.php"); 37 38 // oops_all_fields // 40 /*------------------------------ 41 oops_all_fields 42 -------------------------------*/ 39 43 require(wp_reservation_dir."/inc/register_hooks/oops_all_fields.php"); 40 44 45 #Create Custom Tabel 46 /*------------------------------------------------------------*/ 47 global $wpdb; 48 49 $table_name = $wpdb->prefix . "reservation_entries"; 50 51 $charset_collate = $wpdb->get_charset_collate(); 52 53 $sql = "CREATE TABLE IF NOT EXISTS $table_name ( 54 id int(11) UNSIGNED NOT NULL AUTO_INCREMENT, 55 entries longtext NOT NULL, 56 PRIMARY KEY id (id) 57 ) $charset_collate;"; 58 59 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 60 dbDelta($sql); 61 /*--------------------------------------------------------------*/ 41 62 } 42 63 43 function oops_wp_reservation_register_deactivation_hook(){ 64 function oops_wp_reservation_register_deactivation_hook(){} 44 65 45 } 46 47 function oops_wp_reservation_register_uninstall_hook(){ 48 49 } 66 function oops_wp_reservation_register_uninstall_hook(){} 67 ?> -
reservation-form/tags/1.0.0/oopspk_reservation_form_main_load.php
r2752823 r2756581 3 3 require(wp_reservation_dir."/inc/oopspk_functions.php"); 4 4 require(wp_reservation_dir."/inc/oops_pk_shortcodes.php"); 5 ?> -
reservation-form/tags/1.0.0/oopspk_reservation_form_optionpage.php
r2752823 r2756581 9 9 add_menu_page('Reservation Form 7', 'Reservation Form', 'administrator', __FILE__, 'oopspkreservation_form_settings_page' , '' ); 10 10 11 11 12 //call register settings function 12 13 add_action( 'admin_init', 'oopspkreservation_form_plugin_settings' ); 13 14 } 14 15 15 16 16 function oopspkreservation_form_plugin_settings() { … … 19 19 register_setting( 'oops-reservation-from-settings-group', 'some_other_option' ); 20 20 register_setting( 'oops-reservation-from-settings-group', 'option_etc' ); 21 register_setting( 'oops-reservation-from-settings-add_options', 'some_other_option' ); 21 22 22 if(isset($_POST['submit_customization'])){ 23 //echo $_POST['tag_field1']; 24 $tag_field1 = sanitize_text_field(ucwords($_POST['tag_field1'])); 25 $tag_field2 = sanitize_text_field(ucwords($_POST['tag_field2'])); 26 $tag_field3 = sanitize_text_field(ucwords($_POST['tag_field3'])); 27 $tag_field4 = sanitize_text_field(ucwords($_POST['tag_field4'])); 28 29 $option_name = 'tag_select_field1'; 30 update_option( $option_name, $tag_field1 ); 31 32 $option_name = 'tag_select_field2'; 33 update_option( $option_name, $tag_field2 ); 34 35 $option_name = 'tag_select_field3'; 36 update_option( $option_name, $tag_field3 ); 37 38 $option_name = 'tag_select_field4'; 39 update_option( $option_name, $tag_field4 ); 40 41 $new_value_tags = array("field1"=>$tag_field1, "field2"=>$tag_field2, "field3"=>$tag_field3, "field4"=>$tag_field4); 42 $option_name = 'oops_wp_reservation_fields_tag'; 43 update_option( $option_name, $new_value_tags ); 44 45 //* fields types*// 46 47 $fieldtype1 = sanitize_text_field(ucwords($_POST['fieldtype1'])); 48 $fieldtype2 = sanitize_text_field(ucwords($_POST['fieldtype2'])); 49 $fieldtype3 = sanitize_text_field(ucwords($_POST['fieldtype3'])); 50 $fieldtype4 = sanitize_text_field(ucwords($_POST['fieldtype4'])); 51 52 $option_name = 'fieldtype1'; 53 update_option( $option_name, $fieldtype1 ); 54 55 $option_name = 'fieldtype2'; 56 update_option( $option_name, $fieldtype2 ); 57 58 $option_name = 'fieldtype3'; 59 update_option( $option_name, $fieldtype3 ); 60 61 $option_name = 'fieldtype4'; 62 update_option( $option_name, $fieldtype4 ); 63 64 $new_value_type = array("field1"=>$fieldtype1, "field2"=>$fieldtype2, "field3"=>$fieldtype3, "field4"=>$fieldtype4); 65 $option_name = 'oops_wp_reservation_fields_type'; 66 update_option( $option_name, $new_value_type ); 67 68 //*Labels Names*// 69 $inputfield1 = sanitize_text_field(ucwords($_POST['inputfield1'])); 70 $inputfield2 = sanitize_text_field(ucwords($_POST['inputfield2'])); 71 $inputfield3 = sanitize_text_field(ucwords($_POST['inputfield3'])); 72 $inputfield4 = sanitize_text_field(ucwords($_POST['inputfield4'])); 73 74 $option_name = 'inputfield1'; 75 update_option( $option_name, $inputfield1 ); 76 77 $option_name = 'inputfield2'; 78 update_option( $option_name, $inputfield2 ); 79 80 $option_name = 'inputfield3'; 81 update_option( $option_name, $inputfield3 ); 82 83 $option_name = 'inputfield4'; 84 update_option( $option_name, $inputfield4 ); 85 86 $new_value_type = array("field1"=>$inputfield1, "field2"=>$inputfield2, "field3"=>$inputfield3, "field4"=>$inputfield4); 87 $option_name = 'oops_wp_reservation_label_name'; 88 update_option( $option_name, $new_value_type ); 89 } 90 23 require(wp_reservation_dir."/inc/submit_customization_codes.php"); 24 require(wp_reservation_dir."/inc/submit_add_options.php"); 25 require(wp_reservation_dir."/inc/submit_add_more_fields.php"); 91 26 } 92 27 function oopspkreservation_form_settings_page() { … … 106 41 <!-- Tab 3 --> 107 42 <input type="radio" name="tabset" id="tab3" aria-controls="dunkles"> 108 <label for="tab3"> Add Extra Fields</label>43 <label for="tab3">Entries</label> 109 44 110 45 <div class="tab-panels"> … … 121 56 </section> 122 57 <section id="dunkles" class="tab-panel"> 123 <h2>Add Extra Fields</h2> 124 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> 125 98 </section> 126 99 </div> -
reservation-form/tags/1.0.0/readme.txt
r2752828 r2756581 1 1 ==== reservation form ==== 2 2 Contributors: oops.pk 3 Tags: Reservation Form ,Reservation form3 Tags: Reservation Form ,Reservation Form 4 4 Requires at least: 4.9 5 5 Tested up to: 6.0 -
reservation-form/trunk/assets/css/admin_style_css.css
r2752823 r2756581 134 134 } 135 135 136 .popup .overlay { 137 position:fixed; 138 top:0px; 139 left:0px; 140 width:100vw; 141 height:100vh; 142 background:rgba(0,0,0,0.7); 143 z-index:1; 144 display:none; 145 } 146 147 .popup .content { 148 position:absolute; 149 top:50%; 150 left:50%; 151 transform:translate(-50%,-50%) scale(0); 152 background:#fff; 153 width:1000px; 154 height:85%; 155 z-index:2; 156 padding:20px; 157 box-sizing:border-box; 158 font-family:"Open Sans",sans-serif; 159 } 160 161 .popup .close-btn { 162 cursor:pointer; 163 position:absolute; 164 right:20px; 165 top:20px; 166 width:30px; 167 height:30px; 168 background:#222; 169 color:#fff; 170 font-size:25px; 171 font-weight:600; 172 line-height:30px; 173 text-align:center; 174 border-radius:50%; 175 } 176 177 .popup.active .overlay { 178 display:block; 179 } 180 181 .popup.active .content { 182 transition:all 300ms ease-in-out; 183 transform:translate(-50%,-50%) scale(1); 184 } 185 186 .add_fields { 187 cursor: pointer; 188 background-color: green; 189 color:#fff; 190 padding: 4px; 191 border-radius: 5px; 192 user-select: none; 193 float: right; 194 padding: 15px; 195 } 196 .scroll_form_entry { 197 width: 100%; 198 height: 400px; 199 background: #ccc; 200 overflow: scroll; 201 } 202 203 -
reservation-form/trunk/assets/css/frontend_style_css.css
r2752823 r2756581 1 .input_box , select, textarea{1 .input_box { 2 2 width: 100%; 3 3 padding: 12px; … … 30 30 .container { 31 31 border-radius: 5px; 32 background-color: #f 2f2f2;32 background-color: #fff; 33 33 padding: 20px; 34 34 } … … 60 60 } 61 61 } 62 -
reservation-form/trunk/assets/js/admin_javascript.js
r2752823 r2756581 1 2 3 1 // function reply_click(clicked_id) 4 2 // { … … 7 5 // }); 8 6 // } 9 10 7 jQuery(function($){ 11 8 $("#btnfield1").click(function(){ 12 $(".add_options_field1_ol").append('<li><td><input name="field1_add_options[] " ></td></li><td>');13 $(".email_field1_ol").append('<li><td><input name="field1_email[] " ></td></li><td>');9 $(".add_options_field1_ol").append('<li><td><input name="field1_add_options[] required" ></td></li><td>'); 10 $(".email_field1_ol").append('<li><td><input name="field1_email[] required" ></td></li><td>'); 14 11 }); 15 12 $("#btnfield2").click(function(){ 16 $(".add_options_field2_ol").append('<li><td><input name="field2_add_options[] " ></td></li><td>');17 $(".email_field2_ol").append('<li><td><input name="field2_email[] " ></td></li><td>');13 $(".add_options_field2_ol").append('<li><td><input name="field2_add_options[] required" ></td></li><td>'); 14 $(".email_field2_ol").append('<li><td><input name="field2_email[] required" ></td></li><td>'); 18 15 }); 19 16 $("#btnfield3").click(function(){ 20 $(".add_options_field3_ol").append('<li><td><input name="field3_add_options[] " ></td></li><td>');21 $(".email_field3_ol").append('<li><td><input name="field3_email[] " ></td></li><td>');17 $(".add_options_field3_ol").append('<li><td><input name="field3_add_options[] required" ></td></li><td>'); 18 $(".email_field3_ol").append('<li><td><input name="field3_email[] required" ></td></li><td>'); 22 19 }); 23 20 $("#btnfield4").click(function(){ 24 $(".add_options_field4_ol").append('<li><td><input name="field4_add_options[] " ></td></li><td>');25 $(".email_field4_ol").append('<li><td><input name="field4_email[] " ></td></li><td>');21 $(".add_options_field4_ol").append('<li><td><input name="field4_add_options[] required" ></td></li><td>'); 22 $(".email_field4_ol").append('<li><td><input name="field4_email[] required" ></td></li><td>'); 26 23 }); 27 24 }); 28 29 25 function togglePopup(){ 26 document.getElementById("popup-1").classList.toggle("active"); 27 } -
reservation-form/trunk/assets/js/frontend_javascript.js
r2752823 r2756581 1 frontend_javascript.js -
reservation-form/trunk/inc/index.php
r2752823 r2756581 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 3 // Silence is golden. 4 ?> -
reservation-form/trunk/inc/oops_pk_shortcodes.php
r2752823 r2756581 24 24 $addoptions_value_field3 = get_option('addoptions_value_field3'); 25 25 $addoptions_value_field4 = get_option('addoptions_value_field4'); 26 //*email_permission_field1**// 27 $email_permission_field1 = get_option('email_permission_field1'); 28 $email_permission_field2 = get_option('email_permission_field2'); 29 $email_permission_field3 = get_option('email_permission_field3'); 30 $email_permission_field4 = get_option('email_permission_field4'); 31 32 //*add_more_fields **// 33 $add_more_fields_date = get_option('add_more_fields_date'); 34 $add_more_fields_from_date = get_option('add_more_fields_from_date'); 35 $add_more_fields_to_date = get_option('add_more_fields_to_date'); 36 $add_more_fields_gender = get_option('add_more_fields_gender'); 37 $add_more_fields_countries = get_option('add_more_fields_countries'); 38 $add_more_fields_seats = get_option('add_more_fields_seats'); 39 $add_more_fields_rooms = get_option('add_more_fields_rooms'); 26 40 27 41 ob_start(); … … 41 55 ?> 42 56 <label for="<?php echo esc_attr(ucwords($inputfield1));?>"><?php echo esc_attr(ucwords($inputfield1));?></label> 43 <select id="<?php echo esc_attr(ucwords($inputfield1));?>" name="field1" >57 <select id="<?php echo esc_attr(ucwords($inputfield1));?>" name="field1" class="input_box"> 44 58 <?php 45 59 $ex_array = $addoptions_value_field1['field1_add_options']; … … 57 71 ?> 58 72 <label for="<?php echo esc_attr(ucwords($inputfield1));?>"><?php echo esc_attr(ucwords($inputfield1));?></label> 59 <textarea id="<?php echo esc_attr(ucwords($inputfield1));?>" name="field1" placeholder="<?php echo esc_attr(ucwords($inputfield1));?>" style="height:200px" ></textarea>73 <textarea id="<?php echo esc_attr(ucwords($inputfield1));?>" name="field1" placeholder="<?php echo esc_attr(ucwords($inputfield1));?>" style="height:200px" class="input_box"></textarea> 60 74 <?php 61 75 } … … 73 87 ?> 74 88 <label for="<?php echo esc_attr(ucwords($inputfield2));?>"><?php echo esc_attr(ucwords($inputfield2));?></label> 75 <select id="<?php echo esc_attr(ucwords($inputfield2));?>" name="field2" >89 <select id="<?php echo esc_attr(ucwords($inputfield2));?>" name="field2" class="input_box"> 76 90 <?php 77 91 $ex_array = $addoptions_value_field2['field2_add_options']; … … 90 104 ?> 91 105 <label for="<?php echo esc_attr(ucwords($inputfield2));?>"><?php echo esc_attr(ucwords($inputfield2));?></label> 92 <textarea id="<?php echo esc_attr(ucwords($inputfield2));?>" name="field2" placeholder="<?php echo esc_attr(ucwords($inputfield2));?>" style="height:200px" ></textarea>106 <textarea id="<?php echo esc_attr(ucwords($inputfield2));?>" name="field2" placeholder="<?php echo esc_attr(ucwords($inputfield2));?>" style="height:200px" class="input_box"></textarea> 93 107 <?php 94 108 } … … 106 120 ?> 107 121 <label for="<?php echo esc_attr(ucwords($inputfield3));?>"><?php echo esc_attr(ucwords($inputfield3));?></label> 108 <select id="<?php echo esc_attr(ucwords($inputfield3));?>" name="field3" >122 <select id="<?php echo esc_attr(ucwords($inputfield3));?>" name="field3" class="input_box"> 109 123 <?php 110 124 $ex_array = $addoptions_value_field3['field3_add_options']; … … 124 138 ?> 125 139 <label for="<?php echo esc_attr(ucwords($inputfield3));?>"><?php echo esc_attr(ucwords($inputfield3));?></label> 126 <textarea id="<?php echo esc_attr(ucwords($inputfield3));?>" name="field3" placeholder="<?php echo esc_attr(ucwords($inputfield3));?>" style="height:200px"></textarea> 140 <textarea id="<?php echo esc_attr(ucwords($inputfield3));?>" name="field3" placeholder="<?php echo esc_attr(ucwords($inputfield3));?>" style="height:200px" class="input_box"></textarea> 141 <?php 142 } 143 ?> 144 <?php 145 if ($add_more_fields_date == 'ON') { 146 ?> 147 <label>Date</label> 148 <input type="date" name="date_s" class="input_box"> 149 <?php 150 } 151 if ($add_more_fields_from_date == 'ON') { 152 ?> 153 <label>From Date</label> 154 <input type="date" name="from_date" class="input_box"> 155 <?php 156 } 157 if ($add_more_fields_to_date == 'ON') { 158 ?> 159 <label>To Date</label> 160 <input type="date" name="to_date" class="input_box"> 161 <?php 162 } 163 if ($add_more_fields_gender == 'ON') { 164 ?> 165 <label>Gender</label> 166 <select name="gender" class="input_box"> 167 <option value="He">He</option> 168 <option value="She">She</option> 169 </select> 170 <?php 171 } 172 if ($add_more_fields_countries == 'ON') { 173 ?> 174 <label>Countries</label> 175 <select name="countries" id="" class="input_box"> 176 <option data-countryCode="GB" value="44" Selected>UK (+44)</option> 177 <option data-countryCode="US" value="1">USA (+1)</option> 178 <optgroup label="Other countries"> 179 <option data-countryCode="DZ" value="213">Algeria (+213)</option> 180 <option data-countryCode="AD" value="376">Andorra (+376)</option> 181 <option data-countryCode="AO" value="244">Angola (+244)</option> 182 <option data-countryCode="AI" value="1264">Anguilla (+1264)</option> 183 <option data-countryCode="AG" value="1268">Antigua & Barbuda (+1268)</option> 184 <option data-countryCode="AR" value="54">Argentina (+54)</option> 185 <option data-countryCode="AM" value="374">Armenia (+374)</option> 186 <option data-countryCode="AW" value="297">Aruba (+297)</option> 187 <option data-countryCode="AU" value="61">Australia (+61)</option> 188 <option data-countryCode="AT" value="43">Austria (+43)</option> 189 <option data-countryCode="AZ" value="994">Azerbaijan (+994)</option> 190 <option data-countryCode="BS" value="1242">Bahamas (+1242)</option> 191 <option data-countryCode="BH" value="973">Bahrain (+973)</option> 192 <option data-countryCode="BD" value="880">Bangladesh (+880)</option> 193 <option data-countryCode="BB" value="1246">Barbados (+1246)</option> 194 <option data-countryCode="BY" value="375">Belarus (+375)</option> 195 <option data-countryCode="BE" value="32">Belgium (+32)</option> 196 <option data-countryCode="BZ" value="501">Belize (+501)</option> 197 <option data-countryCode="BJ" value="229">Benin (+229)</option> 198 <option data-countryCode="BM" value="1441">Bermuda (+1441)</option> 199 <option data-countryCode="BT" value="975">Bhutan (+975)</option> 200 <option data-countryCode="BO" value="591">Bolivia (+591)</option> 201 <option data-countryCode="BA" value="387">Bosnia Herzegovina (+387)</option> 202 <option data-countryCode="BW" value="267">Botswana (+267)</option> 203 <option data-countryCode="BR" value="55">Brazil (+55)</option> 204 <option data-countryCode="BN" value="673">Brunei (+673)</option> 205 <option data-countryCode="BG" value="359">Bulgaria (+359)</option> 206 <option data-countryCode="BF" value="226">Burkina Faso (+226)</option> 207 <option data-countryCode="BI" value="257">Burundi (+257)</option> 208 <option data-countryCode="KH" value="855">Cambodia (+855)</option> 209 <option data-countryCode="CM" value="237">Cameroon (+237)</option> 210 <option data-countryCode="CA" value="1">Canada (+1)</option> 211 <option data-countryCode="CV" value="238">Cape Verde Islands (+238)</option> 212 <option data-countryCode="KY" value="1345">Cayman Islands (+1345)</option> 213 <option data-countryCode="CF" value="236">Central African Republic (+236)</option> 214 <option data-countryCode="CL" value="56">Chile (+56)</option> 215 <option data-countryCode="CN" value="86">China (+86)</option> 216 <option data-countryCode="CO" value="57">Colombia (+57)</option> 217 <option data-countryCode="KM" value="269">Comoros (+269)</option> 218 <option data-countryCode="CG" value="242">Congo (+242)</option> 219 <option data-countryCode="CK" value="682">Cook Islands (+682)</option> 220 <option data-countryCode="CR" value="506">Costa Rica (+506)</option> 221 <option data-countryCode="HR" value="385">Croatia (+385)</option> 222 <option data-countryCode="CU" value="53">Cuba (+53)</option> 223 <option data-countryCode="CY" value="90392">Cyprus North (+90392)</option> 224 <option data-countryCode="CY" value="357">Cyprus South (+357)</option> 225 <option data-countryCode="CZ" value="42">Czech Republic (+42)</option> 226 <option data-countryCode="DK" value="45">Denmark (+45)</option> 227 <option data-countryCode="DJ" value="253">Djibouti (+253)</option> 228 <option data-countryCode="DM" value="1809">Dominica (+1809)</option> 229 <option data-countryCode="DO" value="1809">Dominican Republic (+1809)</option> 230 <option data-countryCode="EC" value="593">Ecuador (+593)</option> 231 <option data-countryCode="EG" value="20">Egypt (+20)</option> 232 <option data-countryCode="SV" value="503">El Salvador (+503)</option> 233 <option data-countryCode="GQ" value="240">Equatorial Guinea (+240)</option> 234 <option data-countryCode="ER" value="291">Eritrea (+291)</option> 235 <option data-countryCode="EE" value="372">Estonia (+372)</option> 236 <option data-countryCode="ET" value="251">Ethiopia (+251)</option> 237 <option data-countryCode="FK" value="500">Falkland Islands (+500)</option> 238 <option data-countryCode="FO" value="298">Faroe Islands (+298)</option> 239 <option data-countryCode="FJ" value="679">Fiji (+679)</option> 240 <option data-countryCode="FI" value="358">Finland (+358)</option> 241 <option data-countryCode="FR" value="33">France (+33)</option> 242 <option data-countryCode="GF" value="594">French Guiana (+594)</option> 243 <option data-countryCode="PF" value="689">French Polynesia (+689)</option> 244 <option data-countryCode="GA" value="241">Gabon (+241)</option> 245 <option data-countryCode="GM" value="220">Gambia (+220)</option> 246 <option data-countryCode="GE" value="7880">Georgia (+7880)</option> 247 <option data-countryCode="DE" value="49">Germany (+49)</option> 248 <option data-countryCode="GH" value="233">Ghana (+233)</option> 249 <option data-countryCode="GI" value="350">Gibraltar (+350)</option> 250 <option data-countryCode="GR" value="30">Greece (+30)</option> 251 <option data-countryCode="GL" value="299">Greenland (+299)</option> 252 <option data-countryCode="GD" value="1473">Grenada (+1473)</option> 253 <option data-countryCode="GP" value="590">Guadeloupe (+590)</option> 254 <option data-countryCode="GU" value="671">Guam (+671)</option> 255 <option data-countryCode="GT" value="502">Guatemala (+502)</option> 256 <option data-countryCode="GN" value="224">Guinea (+224)</option> 257 <option data-countryCode="GW" value="245">Guinea - Bissau (+245)</option> 258 <option data-countryCode="GY" value="592">Guyana (+592)</option> 259 <option data-countryCode="HT" value="509">Haiti (+509)</option> 260 <option data-countryCode="HN" value="504">Honduras (+504)</option> 261 <option data-countryCode="HK" value="852">Hong Kong (+852)</option> 262 <option data-countryCode="HU" value="36">Hungary (+36)</option> 263 <option data-countryCode="IS" value="354">Iceland (+354)</option> 264 <option data-countryCode="IN" value="91">India (+91)</option> 265 <option data-countryCode="ID" value="62">Indonesia (+62)</option> 266 <option data-countryCode="IR" value="98">Iran (+98)</option> 267 <option data-countryCode="IQ" value="964">Iraq (+964)</option> 268 <option data-countryCode="IE" value="353">Ireland (+353)</option> 269 <option data-countryCode="IL" value="972">Israel (+972)</option> 270 <option data-countryCode="IT" value="39">Italy (+39)</option> 271 <option data-countryCode="JM" value="1876">Jamaica (+1876)</option> 272 <option data-countryCode="JP" value="81">Japan (+81)</option> 273 <option data-countryCode="JO" value="962">Jordan (+962)</option> 274 <option data-countryCode="KZ" value="7">Kazakhstan (+7)</option> 275 <option data-countryCode="KE" value="254">Kenya (+254)</option> 276 <option data-countryCode="KI" value="686">Kiribati (+686)</option> 277 <option data-countryCode="KP" value="850">Korea North (+850)</option> 278 <option data-countryCode="KR" value="82">Korea South (+82)</option> 279 <option data-countryCode="KW" value="965">Kuwait (+965)</option> 280 <option data-countryCode="KG" value="996">Kyrgyzstan (+996)</option> 281 <option data-countryCode="LA" value="856">Laos (+856)</option> 282 <option data-countryCode="LV" value="371">Latvia (+371)</option> 283 <option data-countryCode="LB" value="961">Lebanon (+961)</option> 284 <option data-countryCode="LS" value="266">Lesotho (+266)</option> 285 <option data-countryCode="LR" value="231">Liberia (+231)</option> 286 <option data-countryCode="LY" value="218">Libya (+218)</option> 287 <option data-countryCode="LI" value="417">Liechtenstein (+417)</option> 288 <option data-countryCode="LT" value="370">Lithuania (+370)</option> 289 <option data-countryCode="LU" value="352">Luxembourg (+352)</option> 290 <option data-countryCode="MO" value="853">Macao (+853)</option> 291 <option data-countryCode="MK" value="389">Macedonia (+389)</option> 292 <option data-countryCode="MG" value="261">Madagascar (+261)</option> 293 <option data-countryCode="MW" value="265">Malawi (+265)</option> 294 <option data-countryCode="MY" value="60">Malaysia (+60)</option> 295 <option data-countryCode="MV" value="960">Maldives (+960)</option> 296 <option data-countryCode="ML" value="223">Mali (+223)</option> 297 <option data-countryCode="MT" value="356">Malta (+356)</option> 298 <option data-countryCode="MH" value="692">Marshall Islands (+692)</option> 299 <option data-countryCode="MQ" value="596">Martinique (+596)</option> 300 <option data-countryCode="MR" value="222">Mauritania (+222)</option> 301 <option data-countryCode="YT" value="269">Mayotte (+269)</option> 302 <option data-countryCode="MX" value="52">Mexico (+52)</option> 303 <option data-countryCode="FM" value="691">Micronesia (+691)</option> 304 <option data-countryCode="MD" value="373">Moldova (+373)</option> 305 <option data-countryCode="MC" value="377">Monaco (+377)</option> 306 <option data-countryCode="MN" value="976">Mongolia (+976)</option> 307 <option data-countryCode="MS" value="1664">Montserrat (+1664)</option> 308 <option data-countryCode="MA" value="212">Morocco (+212)</option> 309 <option data-countryCode="MZ" value="258">Mozambique (+258)</option> 310 <option data-countryCode="MN" value="95">Myanmar (+95)</option> 311 <option data-countryCode="NA" value="264">Namibia (+264)</option> 312 <option data-countryCode="NR" value="674">Nauru (+674)</option> 313 <option data-countryCode="NP" value="977">Nepal (+977)</option> 314 <option data-countryCode="NL" value="31">Netherlands (+31)</option> 315 <option data-countryCode="NC" value="687">New Caledonia (+687)</option> 316 <option data-countryCode="NZ" value="64">New Zealand (+64)</option> 317 <option data-countryCode="NI" value="505">Nicaragua (+505)</option> 318 <option data-countryCode="NE" value="227">Niger (+227)</option> 319 <option data-countryCode="NG" value="234">Nigeria (+234)</option> 320 <option data-countryCode="NU" value="683">Niue (+683)</option> 321 <option data-countryCode="NF" value="672">Norfolk Islands (+672)</option> 322 <option data-countryCode="NP" value="670">Northern Marianas (+670)</option> 323 <option data-countryCode="NO" value="47">Norway (+47)</option> 324 <option data-countryCode="OM" value="968">Oman (+968)</option> 325 <option data-countryCode="PW" value="680">Palau (+680)</option> 326 <option data-countryCode="PA" value="507">Panama (+507)</option> 327 <option data-countryCode="PG" value="675">Papua New Guinea (+675)</option> 328 <option data-countryCode="PY" value="595">Paraguay (+595)</option> 329 <option data-countryCode="PE" value="51">Peru (+51)</option> 330 <option data-countryCode="PH" value="63">Philippines (+63)</option> 331 <option data-countryCode="PL" value="48">Poland (+48)</option> 332 <option data-countryCode="PT" value="351">Portugal (+351)</option> 333 <option data-countryCode="PR" value="1787">Puerto Rico (+1787)</option> 334 <option data-countryCode="QA" value="974">Qatar (+974)</option> 335 <option data-countryCode="RE" value="262">Reunion (+262)</option> 336 <option data-countryCode="RO" value="40">Romania (+40)</option> 337 <option data-countryCode="RU" value="7">Russia (+7)</option> 338 <option data-countryCode="RW" value="250">Rwanda (+250)</option> 339 <option data-countryCode="SM" value="378">San Marino (+378)</option> 340 <option data-countryCode="ST" value="239">Sao Tome & Principe (+239)</option> 341 <option data-countryCode="SA" value="966">Saudi Arabia (+966)</option> 342 <option data-countryCode="SN" value="221">Senegal (+221)</option> 343 <option data-countryCode="CS" value="381">Serbia (+381)</option> 344 <option data-countryCode="SC" value="248">Seychelles (+248)</option> 345 <option data-countryCode="SL" value="232">Sierra Leone (+232)</option> 346 <option data-countryCode="SG" value="65">Singapore (+65)</option> 347 <option data-countryCode="SK" value="421">Slovak Republic (+421)</option> 348 <option data-countryCode="SI" value="386">Slovenia (+386)</option> 349 <option data-countryCode="SB" value="677">Solomon Islands (+677)</option> 350 <option data-countryCode="SO" value="252">Somalia (+252)</option> 351 <option data-countryCode="ZA" value="27">South Africa (+27)</option> 352 <option data-countryCode="ES" value="34">Spain (+34)</option> 353 <option data-countryCode="LK" value="94">Sri Lanka (+94)</option> 354 <option data-countryCode="SH" value="290">St. Helena (+290)</option> 355 <option data-countryCode="KN" value="1869">St. Kitts (+1869)</option> 356 <option data-countryCode="SC" value="1758">St. Lucia (+1758)</option> 357 <option data-countryCode="SD" value="249">Sudan (+249)</option> 358 <option data-countryCode="SR" value="597">Suriname (+597)</option> 359 <option data-countryCode="SZ" value="268">Swaziland (+268)</option> 360 <option data-countryCode="SE" value="46">Sweden (+46)</option> 361 <option data-countryCode="CH" value="41">Switzerland (+41)</option> 362 <option data-countryCode="SI" value="963">Syria (+963)</option> 363 <option data-countryCode="TW" value="886">Taiwan (+886)</option> 364 <option data-countryCode="TJ" value="7">Tajikstan (+7)</option> 365 <option data-countryCode="TH" value="66">Thailand (+66)</option> 366 <option data-countryCode="TG" value="228">Togo (+228)</option> 367 <option data-countryCode="TO" value="676">Tonga (+676)</option> 368 <option data-countryCode="TT" value="1868">Trinidad & Tobago (+1868)</option> 369 <option data-countryCode="TN" value="216">Tunisia (+216)</option> 370 <option data-countryCode="TR" value="90">Turkey (+90)</option> 371 <option data-countryCode="TM" value="7">Turkmenistan (+7)</option> 372 <option data-countryCode="TM" value="993">Turkmenistan (+993)</option> 373 <option data-countryCode="TC" value="1649">Turks & Caicos Islands (+1649)</option> 374 <option data-countryCode="TV" value="688">Tuvalu (+688)</option> 375 <option data-countryCode="UG" value="256">Uganda (+256)</option> 376 <!-- <option data-countryCode="GB" value="44">UK (+44)</option> --> 377 <option data-countryCode="UA" value="380">Ukraine (+380)</option> 378 <option data-countryCode="AE" value="971">United Arab Emirates (+971)</option> 379 <option data-countryCode="UY" value="598">Uruguay (+598)</option> 380 <!-- <option data-countryCode="US" value="1">USA (+1)</option> --> 381 <option data-countryCode="UZ" value="7">Uzbekistan (+7)</option> 382 <option data-countryCode="VU" value="678">Vanuatu (+678)</option> 383 <option data-countryCode="VA" value="379">Vatican City (+379)</option> 384 <option data-countryCode="VE" value="58">Venezuela (+58)</option> 385 <option data-countryCode="VN" value="84">Vietnam (+84)</option> 386 <option data-countryCode="VG" value="84">Virgin Islands - British (+1284)</option> 387 <option data-countryCode="VI" value="84">Virgin Islands - US (+1340)</option> 388 <option data-countryCode="WF" value="681">Wallis & Futuna (+681)</option> 389 <option data-countryCode="YE" value="969">Yemen (North)(+969)</option> 390 <option data-countryCode="YE" value="967">Yemen (South)(+967)</option> 391 <option data-countryCode="ZM" value="260">Zambia (+260)</option> 392 <option data-countryCode="ZW" value="263">Zimbabwe (+263)</option> 393 </optgroup> 394 </select> 395 <?php 396 } 397 if ($add_more_fields_seats == 'ON') { 398 ?> 399 <label>Seat</label> 400 <input type="text" name="seats" class="input_box"> 401 <?php 402 } 403 if ($add_more_fields_rooms == 'ON') { 404 ?> 405 <label>Room</label> 406 <input type="text" name="rooms" class="input_box"> 127 407 <?php 128 408 } … … 139 419 ?> 140 420 <label for="<?php echo esc_attr(ucwords($inputfield4));?>"><?php echo esc_attr(ucwords($inputfield4));?></label> 141 <select id="<?php echo esc_attr(ucwords($inputfield4));?>" name="field4" >421 <select id="<?php echo esc_attr(ucwords($inputfield4));?>" name="field4" class="input_box"> 142 422 <?php 143 423 $ex_array = $addoptions_value_field4['field4_add_options']; … … 156 436 ?> 157 437 <label for="<?php echo esc_attr(ucwords($inputfield4));?>"><?php echo esc_attr(ucwords($inputfield4));?></label> 158 <textarea id="<?php echo esc_attr(ucwords($inputfield4));?>" name="field4" placeholder="<?php echo esc_attr(ucwords($inputfield4));?>" style="height:200px; resize: none;" ></textarea>438 <textarea id="<?php echo esc_attr(ucwords($inputfield4));?>" name="field4" placeholder="<?php echo esc_attr(ucwords($inputfield4));?>" style="height:200px; resize: none;" class="input_box"></textarea> 159 439 <?php 160 440 } … … 173 453 $field4 = sanitize_text_field($_POST['field4']); 174 454 175 if(empty($field1 && $field2 && $field3 && $field4)){ 455 $date = sanitize_text_field($_POST['date_s']); 456 $from_date = sanitize_text_field($_POST['from_date']); 457 $to_date = sanitize_text_field($_POST['to_date']); 458 $gender = sanitize_text_field($_POST['gender']); 459 $countries = sanitize_text_field($_POST['countries']); 460 $seats = sanitize_text_field($_POST['seats']); 461 $rooms = sanitize_text_field($_POST['rooms']); 462 463 if($add_more_fields_date == 'OFF'){ 464 $date='form'; 465 $outdate=''; 466 } 467 if($add_more_fields_from_date == 'OFF'){ 468 $from_date='form'; 469 $outputfrom_date=''; 470 } 471 if($add_more_fields_to_date == 'OFF'){ 472 $to_date='form'; 473 $outputto_date=''; 474 } 475 if($add_more_fields_gender == 'OFF'){ 476 $gender='form'; 477 $outputgender=''; 478 } 479 if($add_more_fields_countries == 'OFF'){ 480 $countries='form'; 481 $outputcountries=''; 482 } 483 if($add_more_fields_seats == 'OFF'){ 484 $seats='form'; 485 $outputseats=''; 486 } 487 if($add_more_fields_rooms == 'OFF'){ 488 $rooms='form'; 489 $outputrooms=''; 490 } 491 //////***///// 492 493 if($add_more_fields_date == 'ON'){ 494 $outdate='Data :'.$date; 495 } 496 if($add_more_fields_from_date == 'ON'){ 497 $outputfrom_date='From Date :'.$from_date; 498 } 499 if($add_more_fields_to_date == 'ON'){ 500 $outputto_date='To Date :'.$to_date; 501 } 502 if($add_more_fields_gender == 'ON'){ 503 $outputgender='Gender :'.$gender; 504 } 505 if($add_more_fields_countries == 'ON'){ 506 $outputcountries='Countries :'.$countries; 507 } 508 if($add_more_fields_seats == 'ON'){ 509 $outputseats='Seats :'.$seats; 510 } 511 if($add_more_fields_rooms == 'ON'){ 512 $outputrooms='Rooms :'.$rooms; 513 } 514 515 if(empty($field1 && $field2 && $field3 && $field4 && $date && $from_date && $to_date && $gender && $countries && $seats && $rooms )){ 176 516 echo' <div style=" background-color: #ea9696; color:#000; padding:10px; margin-top:40px;"> All Fields Is Required </div>'; 177 517 } 178 518 else{ 179 $sent =''; 519 520 $sent =''; 180 521 if($tag_select_field1 == 'Select'){ 181 522 … … 193 534 $to = ''.sanitize_text_field($toemail).''; 194 535 $subject = 'Reservation Booking'; 536 195 537 $body = ' 196 538 '.sanitize_text_field(ucwords($inputfield1)).' : '.sanitize_text_field(ucwords($addoptionsnew)).' … … 201 543 <br> 202 544 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($_POST['field4'])).' 203 <br> 204 '; 205 206 // echo $body; 207 208 $headers = array('Content-Type: text/html; charset=UTF-8'); 209 $sent = wp_mail( $to, $subject, $body, $headers ); 210 545 <br>' 546 .sanitize_text_field(ucwords($outdate)).' 547 <br>' 548 .sanitize_text_field(ucwords($outputfrom_date)).' 549 <br>' 550 .sanitize_text_field(ucwords($outputto_date)).' 551 <br>' 552 .sanitize_text_field(ucwords($outputgender)).' 553 <br>' 554 .sanitize_text_field(ucwords($outputcountries)).' 555 <br>' 556 .sanitize_text_field(ucwords($outputseats)).' 557 <br>' 558 .sanitize_text_field(ucwords($outputrooms)) 559 ; 560 $headers = array('Content-Type: text/html; charset=UTF-8'); 561 $sent = wp_mail( $to, $subject, $body, $headers ); 562 563 //*****// 564 565 global $wpdb; 566 $table = $wpdb->prefix.'reservation_entries'; 567 $data = array('entries' => sanitize_text_field($body)); 568 $format = array('%s','%d'); 569 $wpdb->insert($table,$data,$format); 570 $my_id = $wpdb->insert_id; 571 572 //***//// 211 573 212 574 } … … 233 595 '.sanitize_text_field(ucwords($inputfield3)).' : '.sanitize_text_field(ucwords($_POST['field3'])).' 234 596 <br> 235 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($_POST['field4'])).' 236 <br> 237 '; 597 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($_POST['field4'])) 598 .' 599 <br>' 600 .sanitize_text_field(ucwords($outdate)).' 601 <br>' 602 .sanitize_text_field(ucwords($outputfrom_date)).' 603 <br>' 604 .sanitize_text_field(ucwords($outputto_date)).' 605 <br>' 606 .sanitize_text_field(ucwords($outputgender)).' 607 <br>' 608 .sanitize_text_field(ucwords($outputcountries)).' 609 <br>' 610 .sanitize_text_field(ucwords($outputseats)).' 611 <br>' 612 .sanitize_text_field(ucwords($outputrooms)) 613 ; 238 614 // echo $body; 239 615 $headers = array('Content-Type: text/html; charset=UTF-8'); 240 616 $sent = wp_mail( $to, $subject, $body, $headers ); 617 //*****// 618 619 global $wpdb; 620 $table = $wpdb->prefix.'reservation_entries'; 621 $data = array('entries' => sanitize_text_field($body)); 622 $format = array('%s','%d'); 623 $wpdb->insert($table,$data,$format); 624 $my_id = $wpdb->insert_id; 625 626 //***//// 241 627 } 242 628 243 ///*****//244 629 245 630 if($tag_select_field3 == 'Select'){ … … 265 650 '.sanitize_text_field(ucwords($inputfield3)).' : '.sanitize_text_field(ucwords($addoptionsnew)).' 266 651 <br> 267 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($_POST['field4'])).' 268 <br> 269 '; 652 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($_POST['field4'])) 653 .' 654 <br>' 655 .sanitize_text_field(ucwords($outdate)).' 656 <br>' 657 .sanitize_text_field(ucwords($outputfrom_date)).' 658 <br>' 659 .sanitize_text_field(ucwords($outputto_date)).' 660 <br>' 661 .sanitize_text_field(ucwords($outputgender)).' 662 <br>' 663 .sanitize_text_field(ucwords($outputcountries)).' 664 <br>' 665 .sanitize_text_field(ucwords($outputseats)).' 666 <br>' 667 .sanitize_text_field(ucwords($outputrooms)) 668 ; 270 669 $headers = array('Content-Type: text/html; charset=UTF-8'); 271 670 $sent = wp_mail( $to, $subject, $body, $headers ); 272 273 // $form_entry = array($inputfield1 => $_POST['field1'],$inputfield2 => $_POST['field2'],$inputfield3 => $addoptionsnew,$inputfield4 => $_POST['field4'] ); 274 275 // $option_name = 'form_entry_show'; 276 // add_option( $option_name, $form_entry); 277 278 } 279 671 //*****// 672 673 global $wpdb; 674 $table = $wpdb->prefix.'reservation_entries'; 675 $data = array('entries' => sanitize_text_field($body)); 676 $format = array('%s','%d'); 677 $wpdb->insert($table,$data,$format); 678 $my_id = $wpdb->insert_id; 679 680 //***//// 681 682 } 280 683 ///****//// 281 282 684 if($tag_select_field4 == 'Select'){ 283 685 $fieldvalueid = sanitize_text_field($_POST['field4']); … … 301 703 '.sanitize_text_field(ucwords($inputfield3)).' : '.esc_attr(ucwords($_POST['field3'])).' 302 704 <br> 303 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($addoptionsnew)).' 304 <br> 305 '; 306 705 '.sanitize_text_field(ucwords($inputfield4)).' : '.sanitize_text_field(ucwords($addoptionsnew)) 706 .' 707 <br>' 708 .sanitize_text_field(ucwords($outdate)).' 709 <br>' 710 .sanitize_text_field(ucwords($outputfrom_date)).' 711 <br>' 712 .sanitize_text_field(ucwords($outputto_date)).' 713 <br>' 714 .sanitize_text_field(ucwords($outputgender)).' 715 <br>' 716 .sanitize_text_field(ucwords($outputcountries)).' 717 <br>' 718 .sanitize_text_field(ucwords($outputseats)).' 719 <br>' 720 .sanitize_text_field(ucwords($outputrooms)) 721 ; 722 307 723 $headers = array('Content-Type: text/html; charset=UTF-8'); 308 724 $sent = wp_mail( $to, $subject, $body, $headers ); 725 726 //*****// 727 728 global $wpdb; 729 $table = $wpdb->prefix.'reservation_entries'; 730 $data = array('entries' => sanitize_text_field($body)); 731 $format = array('%s','%d'); 732 $wpdb->insert($table,$data,$format); 733 $my_id = $wpdb->insert_id; 734 735 //***//// 736 309 737 } 310 738 311 if($ sent){739 if($my_id){ 312 740 echo '<div style="background-color:#5ebc5f; margin-top:30px; color:#000; padding:10px; border-radius:10px;">Msg sent </div>'; 313 741 } … … 317 745 318 746 } 319 320 } 321 322 747 } 323 748 return ob_get_clean(); 324 749 } -
reservation-form/trunk/inc/oopspk_add_options.php
r2752823 r2756581 10 10 $inputfield3 = get_option('inputfield3'); 11 11 $inputfield4 = get_option('inputfield4'); 12 //***// 13 $email_permission_field1 = get_option('email_permission_field1'); 14 $email_permission_field2 = get_option('email_permission_field2'); 15 $email_permission_field3 = get_option('email_permission_field3'); 16 $email_permission_field4 = get_option('email_permission_field4'); 17 ?> 18 <form action="options.php" method="post"> 19 <?php 20 21 settings_fields( 'oops-reservation-from-settings-add_options' ); 22 do_settings_sections( 'oops-reservation-from-settings-add_options' ); 12 23 13 ?> 14 <form action="#" method="post"> 24 ?> 15 25 <table class="wp-list-table widefat fixed posts" style="margin-bottom:10px;"> 16 26 <thead> … … 19 29 <th> Add Options </th> 20 30 <th> Enter Email </th> 31 <th> Emails Send Permission </th> 21 32 <th> Actions </th> 22 33 </tr> … … 27 38 <th> Add Options </th> 28 39 <th> Enter Email </th> 40 <th> Emails Send Permission </th> 29 41 <th> Actions </th> 30 42 </tr> … … 40 52 <td> 41 53 <ol class="add_options_field1_ol"> 42 <li><input name="field1_add_options[]" ></li>54 <li><input name="field1_add_options[]" required></li> 43 55 </ol> 44 56 </td> 45 57 <td> 46 58 <ol class="email_field1_ol"> 47 <li><input name="field1_email[]" ></li>59 <li><input name="field1_email[]" required></li> 48 60 </ol> 49 61 </td> 50 62 <td > 63 <select name="permission_field1"> 64 <?php 65 if($email_permission_field1 == 'On'){ 66 echo'<option select >On</option>'; 67 echo'<option>Off</option>'; 68 } 69 else{ 70 echo'<option>Off</option>'; 71 echo'<option>On</option>'; 72 } 73 ?> 74 75 </select> 76 </td> 51 77 <td><span class="add_options" id="btnfield1">Add Options</span></td> 52 78 </tr> … … 67 93 </ol> 68 94 </td> 69 95 <td> 96 <select name="permission_field2"> 97 <?php 98 if($email_permission_field2 == 'On'){ 99 echo'<option select >On</option>'; 100 echo'<option>Off</option>'; 101 } 102 else{ 103 echo'<option>Off</option>'; 104 echo'<option>On</option>'; 105 } 106 ?> 107 </select> 108 </td> 70 109 <td><span class="add_options" id="btnfield2">Add Options</span></td> 71 110 </tr> … … 86 125 </ol> 87 126 </td> 88 127 <td> 128 <select name="permission_field3"> 129 <?php 130 if($email_permission_field3 == 'On'){ 131 echo'<option select >On</option>'; 132 echo'<option>Off</option>'; 133 } 134 else{ 135 echo'<option>Off</option>'; 136 echo'<option>On</option>'; 137 } 138 ?> 139 </select> 140 </td> 89 141 <td><span class="add_options" id="btnfield3">Add Options</span></td> 90 142 … … 108 160 </td> 109 161 162 <td> 163 <select name="permission_field4"> 164 <?php 165 if($email_permission_field4 == 'On'){ 166 echo'<option select >On</option>'; 167 echo'<option>Off</option>'; 168 } 169 else{ 170 echo'<option>Off</option>'; 171 echo'<option>On</option>'; 172 } 173 ?> 174 </select> 175 </td> 110 176 <td><span class="add_options" id="btnfield4">Add Options</span></td> 111 177 </tr> … … 116 182 </tbody> 117 183 </table> 118 <input type="submit" name="add_option " id="submit" class="button button-primary" value="Save Changes" />184 <input type="submit" name="add_option_my" id="submit" class="button button-primary" value="Save Changes" /> 119 185 </form> 120 <?php121 if(isset($_POST['add_option'])){122 if($tag_select_field1 == 'Select'){123 124 //$field1_add_options = sanitize_text_field($_POST['field1_add_options']);125 //$field1_email = sanitize_text_field($_POST['field1_email']);126 127 128 $field1_add_options = array_map( 'sanitize_text_field', $_POST['field1_add_options'] );129 $field1_email = array_map( 'sanitize_text_field', $_POST['field1_email'] );130 131 // var_dump($field1_add_options,$field1_email);132 133 $field1_output = array("field1_add_options"=>$field1_add_options, "field1_email"=>$field1_email);134 135 $option_name = 'addoptions_value_field1';136 update_option( $option_name, $field1_output );137 138 }139 if($tag_select_field2 == 'Select'){140 141 // $field2_add_options = $_POST['field2_add_options'];142 // $field2_email = $_POST['field2_email'];143 144 $field2_add_options = array_map( 'sanitize_text_field', $_POST['field2_add_options'] );145 $field2_email = array_map( 'sanitize_text_field', $field2_email = $_POST['field2_email'] );146 147 $field2_output = array("field2_add_options"=>$field2_add_options, "field2_email"=>$field2_email);148 149 $option_name = 'addoptions_value_field2';150 update_option( $option_name, $field2_output );151 152 }153 if($tag_select_field3 == 'Select'){154 155 // $field3_add_options = $_POST['field3_add_options'];156 // $field3_email = $_POST['field3_email'];157 158 $field3_add_options = array_map( 'sanitize_text_field', $_POST['field3_add_options'] );159 $field3_email = array_map( 'sanitize_text_field', $_POST['field3_email'] );160 161 $field3_output = array("field3_add_options"=>$field3_add_options, "field3_email"=>$field3_email);162 163 $option_name = 'addoptions_value_field3';164 update_option( $option_name, $field3_output );165 166 }167 if($tag_select_field4 == 'Select'){168 169 // $field4_add_options = $_POST['field4_add_options'];170 // $field4_email = $_POST['field4_email'];171 172 $field4_add_options = array_map( 'sanitize_text_field', $_POST['field4_add_options'] );173 $field4_email = array_map( 'sanitize_text_field', $_POST['field4_email'] );174 175 $field4_output = array("field4_add_options"=>$field4_add_options, "field4_email"=>$field4_email);176 177 $option_name = 'addoptions_value_field4';178 update_option( $option_name, $field4_output );179 }180 181 }182 183 ?> -
reservation-form/trunk/inc/oopspk_customization.php
r2752823 r2756581 4 4 $oops_wp_reservation_fields_type = get_option('oops_wp_reservation_fields_type'); 5 5 $oops_wp_reservation_fields_tag = get_option('oops_wp_reservation_fields_tag'); 6 ?> 7 6 7 //*add_more_fields **// 8 $add_more_fields_date = get_option('add_more_fields_date'); 9 $add_more_fields_from_date = get_option('add_more_fields_from_date'); 10 $add_more_fields_to_date = get_option('add_more_fields_to_date'); 11 $add_more_fields_gender = get_option('add_more_fields_gender'); 12 $add_more_fields_countries = get_option('add_more_fields_countries'); 13 $add_more_fields_seats = get_option('add_more_fields_seats'); 14 $add_more_fields_rooms = get_option('add_more_fields_rooms'); 15 ?> 8 16 <form method="post" action="options.php"> 9 17 <?php 10 18 11 settings_fields( 'oops-reservation-from-settings- group' );12 do_settings_sections( 'oops-reservation-from-settings- group' );19 settings_fields( 'oops-reservation-from-settings-add_options' ); 20 do_settings_sections( 'oops-reservation-from-settings-add_options' ); 13 21 14 22 ?> … … 290 298 </table> 291 299 292 300 301 302 <span onclick="togglePopup()" class="add_fields">Add More Fields</span> 303 <br> 293 304 <input type="submit" name="submit_customization" id="submit" class="button button-primary" value="Save Changes" /> 294 305 </form> 295 306 307 308 <div class="popup" id="popup-1"> 309 <div class="overlay"></div> 310 <div class="content"> 311 <div class="close-btn" onclick="togglePopup()">×</div> 312 <h1>Add More Fields</h1> 313 <p> 314 </p> 315 <form action="options.php" method="post"> 316 <?php 317 settings_fields( 'oops-reservation-from-settings-add_options' ); 318 do_settings_sections( 'oops-reservation-from-settings-add_options' ); 319 ?> 320 <table class="wp-list-table widefat fixed posts" style="margin-bottom:10px;"> 321 <thead> 322 <tr> 323 <th> Fields Names </th> 324 <th width="10%"> Action </th> 325 </tr> 326 </thead> 327 <tfoot> 328 <tr> 329 <th> Fields Names </th> 330 <th width="10%"> Action</th> 331 332 </tr> 333 </tfoot> 334 <tbody> 335 336 <tr> 337 <td> 338 Date 339 </td> 340 <td> 341 <select name="add_more_fields_date"> 342 <?php if($add_more_fields_date == 'ON'){ 343 echo'<option selected>ON</option> 344 <option>OFF</option>'; 345 } 346 else{ 347 echo' 348 <option selected>OFF</option> 349 <option >ON</option> 350 '; 351 } 352 ?> 353 354 </select> 355 </td> 356 357 </tr> 358 <tr> 359 <td> 360 From Date 361 </td> 362 <td> 363 <select name="add_more_fields_from_date"> 364 <?php if($add_more_fields_from_date == 'ON'){ 365 echo'<option selected>ON</option> 366 <option>OFF</option>'; 367 } 368 else{ 369 echo' 370 <option selected>OFF</option> 371 <option >ON</option> 372 '; 373 } 374 ?> 375 </select> 376 </td> 377 378 </tr> 379 <tr> 380 <td> 381 To Date 382 </td> 383 <td> 384 <select name="add_more_fields_to_date"> 385 <?php if($add_more_fields_to_date == 'ON'){ 386 echo'<option selected>ON</option> 387 <option>OFF</option>'; 388 } 389 else{ 390 echo' 391 <option selected>OFF</option> 392 <option >ON</option> 393 '; 394 } 395 ?> 396 </select> 397 </td> 398 399 </tr> 400 <tr> 401 <td> 402 Gender 403 </td> 404 <td> 405 <select name="add_more_fields_gender"> 406 <?php if($add_more_fields_gender == 'ON'){ 407 echo'<option selected>ON</option> 408 <option>OFF</option>'; 409 } 410 else{ 411 echo' 412 <option selected>OFF</option> 413 <option >ON</option> 414 '; 415 } 416 ?> 417 </select> 418 </td> 419 420 </tr> 421 <tr> 422 <td> 423 Countries 424 </td> 425 <td> 426 <select name="add_more_fields_countries"> 427 <?php if($add_more_fields_countries == 'ON'){ 428 echo'<option selected>ON</option> 429 <option>OFF</option>'; 430 } 431 else{ 432 echo' 433 <option selected>OFF</option> 434 <option >ON</option> 435 '; 436 } 437 ?> 438 </select> 439 </td> 440 441 </tr> 442 <tr> 443 <td> 444 Seats 445 </td> 446 <td> 447 <select name="add_more_fields_seats"> 448 <?php if($add_more_fields_seats == 'ON'){ 449 echo'<option selected>ON</option> 450 <option>OFF</option>'; 451 } 452 else{ 453 echo' 454 <option selected>OFF</option> 455 <option >ON</option> 456 '; 457 } 458 ?> 459 </select> 460 </td> 461 462 </tr> 463 <tr> 464 <td> 465 Rooms 466 </td> 467 <td> 468 <select name="add_more_fields_rooms"> 469 <?php if($add_more_fields_rooms == 'ON'){ 470 echo'<option selected>ON</option> 471 <option>OFF</option>'; 472 } 473 else{ 474 echo' 475 <option selected>OFF</option> 476 <option >ON</option> 477 '; 478 } 479 ?> 480 </select> 481 </td> 482 483 </tr> 484 </tbody> 485 </table> 486 <input type="submit" name="add_more_fields" id="submit" class="button button-primary" value="Save Changes" /> 487 </div> 488 </div> 489 490 </form> 296 491 <?php 297 492 if ( isset( $_GET['settings-updated'] ) ) { 298 493 // add settings saved message with the class of "updated" 299 494 add_settings_error( 'oopspk_messages', 'oopspk_messages', __( 'Settings Saved', 'oopspk_messages' ), 'updated' ); 300 } 301 495 } 302 496 // show error/update messages 303 497 settings_errors( 'oopspk_messages' ); -
reservation-form/trunk/inc/register_hooks/oops_all_fields.php
r2752823 r2756581 1 1 <?php 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 4 3 //**tag_select_field1**// 5 6 4 $option_name = 'tag_select_field1'; 7 8 9 5 if ( get_option( $option_name ) !== false ) { 10 6 11 7 $tag_select_field1 = get_option( 'tag_select_field1' ); 12 8 update_option( $option_name, $tag_select_field1 ); 13 14 } else { 15 9 } else { 16 10 // The option hasn't been created yet, so add it with $autoload set to 'no'. 17 11 $new_value = "Input"; … … 20 14 add_option( $option_name, $new_value, $deprecated, $autoload ); 21 15 } 22 23 16 //**tag_select_field2**// 24 25 17 $option_name = 'tag_select_field2'; 26 27 28 if ( get_option( $option_name ) !== false ) { 29 18 if ( get_option( $option_name ) !== false ) { 30 19 $tag_select_field2 = get_option( 'tag_select_field2' ); 31 20 update_option( $option_name, $tag_select_field2 ); 32 33 } else { 34 21 } else { 35 22 // The option hasn't been created yet, so add it with $autoload set to 'no'. 36 23 $new_value = "Input"; … … 39 26 add_option( $option_name, $new_value, $deprecated, $autoload ); 40 27 } 41 42 28 //**tag_select_field3**// 43 44 29 $option_name = 'tag_select_field3'; 45 46 47 if ( get_option( $option_name ) !== false ) { 48 30 if ( get_option( $option_name ) !== false ) { 49 31 $tag_select_field3 = get_option( 'tag_select_field3' ); 50 update_option( $option_name, $tag_select_field3 ); 51 52 } else { 53 32 update_option( $option_name, $tag_select_field3 ); 33 } else { 54 34 // The option hasn't been created yet, so add it with $autoload set to 'no'. 55 35 $new_value = "Select"; … … 58 38 add_option( $option_name, $new_value, $deprecated, $autoload ); 59 39 } 60 61 40 //**tag_select_field4**// 62 63 41 $option_name = 'tag_select_field4'; 64 65 66 42 if ( get_option( $option_name ) !== false ) { 67 43 68 44 $tag_select_field4 = get_option( 'tag_select_field4' ); 69 45 update_option( $option_name, $tag_select_field4 ); 70 71 } else { 72 46 } else { 73 47 // The option hasn't been created yet, so add it with $autoload set to 'no'. 74 48 $new_value = "Textarea"; … … 77 51 add_option( $option_name, $new_value, $deprecated, $autoload ); 78 52 } 79 80 81 53 //**fieldtype1**// 82 54 $option_name = 'fieldtype1'; 83 84 85 55 if ( get_option( $option_name ) !== false ) { 86 56 … … 301 271 add_option( $option_name, $new_value, $deprecated, $autoload ); 302 272 } 273 274 ////***email_permission_field1**//// 275 $option_name = 'email_permission_field1'; 276 277 278 if ( get_option( $option_name ) !== false ) { 279 280 $email_permission_field1 = get_option( 'email_permission_field1' ); 281 update_option( $option_name, $email_permission_field1 ); 282 283 } else { 284 285 // The option hasn't been created yet, so add it with $autoload set to 'no'. 286 $new_value = "off"; 287 $deprecated = null; 288 $autoload = 'no'; 289 add_option( $option_name, $new_value, $deprecated, $autoload ); 290 } 291 292 ////***email_permission_field2**//// 293 294 $option_name = 'email_permission_field2'; 295 296 297 if ( get_option( $option_name ) !== false ) { 298 299 $tag_select_field2 = get_option( 'email_permission_field2' ); 300 update_option( $option_name, $tag_select_field2 ); 301 302 } else { 303 304 // The option hasn't been created yet, so add it with $autoload set to 'no'. 305 $new_value = "off"; 306 $deprecated = null; 307 $autoload = 'no'; 308 add_option( $option_name, $new_value, $deprecated, $autoload ); 309 } 310 311 ////***email_permission_field3**//// 312 313 $option_name = 'email_permission_field3'; 314 315 316 if ( get_option( $option_name ) !== false ) { 317 318 $tag_select_field3 = get_option( 'email_permission_field3' ); 319 update_option( $option_name, $tag_select_field3 ); 320 321 } else { 322 323 // The option hasn't been created yet, so add it with $autoload set to 'no'. 324 $new_value = "on"; 325 $deprecated = null; 326 $autoload = 'no'; 327 add_option( $option_name, $new_value, $deprecated, $autoload ); 328 } 329 330 ////***email_permission_field4**//// 331 332 $option_name = 'email_permission_field4'; 333 334 335 if ( get_option( $option_name ) !== false ) { 336 337 $tag_select_field4 = get_option( 'email_permission_field4' ); 338 update_option( $option_name, $tag_select_field4 ); 339 340 } else { 341 342 // The option hasn't been created yet, so add it with $autoload set to 'no'. 343 $new_value = "off"; 344 $deprecated = null; 345 $autoload = 'no'; 346 add_option( $option_name, $new_value, $deprecated, $autoload ); 347 } 348 349 350 ////**Add More Fields Date***/// 351 352 $option_name = 'add_more_fields_date'; 353 354 355 if ( get_option( $option_name ) !== false ) { 356 357 $add_more_fields_date = get_option( 'add_more_fields_date' ); 358 update_option( $option_name, $add_more_fields_date ); 359 360 } else { 361 362 // The option hasn't been created yet, so add it with $autoload set to 'no'. 363 $new_value = "OFF"; 364 $deprecated = null; 365 $autoload = 'no'; 366 add_option( $option_name, $new_value, $deprecated, $autoload ); 367 } 368 369 ////**Add More Fields add_more_fields_from_date***/// 370 371 $option_name = 'add_more_fields_from_date'; 372 373 374 if ( get_option( $option_name ) !== false ) { 375 376 $add_more_fields_from_date = get_option( 'add_more_fields_from_date' ); 377 update_option( $option_name, $add_more_fields_from_date ); 378 379 } else { 380 381 // The option hasn't been created yet, so add it with $autoload set to 'no'. 382 $new_value = "OFF"; 383 $deprecated = null; 384 $autoload = 'no'; 385 add_option( $option_name, $new_value, $deprecated, $autoload ); 386 } 387 388 ////**Add More Fields add_more_fields_to_date***/// 389 390 $option_name = 'add_more_fields_to_date'; 391 392 393 if ( get_option( $option_name ) !== false ) { 394 395 $add_more_fields_to_date = get_option( 'add_more_fields_to_date' ); 396 update_option( $option_name, $add_more_fields_to_date ); 397 398 } else { 399 400 // The option hasn't been created yet, so add it with $autoload set to 'no'. 401 $new_value = "OFF"; 402 $deprecated = null; 403 $autoload = 'no'; 404 add_option( $option_name, $new_value, $deprecated, $autoload ); 405 } 406 407 ////**Add More Fields add_more_fields_gender***/// 408 409 $option_name = 'add_more_fields_gender'; 410 411 412 if ( get_option( $option_name ) !== false ) { 413 414 $add_more_fields_gender = get_option( 'add_more_fields_gender' ); 415 update_option( $option_name, $add_more_fields_gender ); 416 417 } else { 418 419 // The option hasn't been created yet, so add it with $autoload set to 'no'. 420 $new_value = "OFF"; 421 $deprecated = null; 422 $autoload = 'no'; 423 add_option( $option_name, $new_value, $deprecated, $autoload ); 424 } 425 426 ////**Add More Fields add_more_fields_countries***/// 427 428 $option_name = 'add_more_fields_countries'; 429 430 431 if ( get_option( $option_name ) !== false ) { 432 433 $add_more_fields_countries = get_option( 'add_more_fields_countries' ); 434 update_option( $option_name, $add_more_fields_countries ); 435 436 } else { 437 438 // The option hasn't been created yet, so add it with $autoload set to 'no'. 439 $new_value = "OFF"; 440 $deprecated = null; 441 $autoload = 'no'; 442 add_option( $option_name, $new_value, $deprecated, $autoload ); 443 } 444 445 ////**Add More Fields add_more_fields_seats***/// 446 447 $option_name = 'add_more_fields_seats'; 448 449 450 if ( get_option( $option_name ) !== false ) { 451 452 $add_more_fields_seats = get_option( 'add_more_fields_seats' ); 453 update_option( $option_name, $add_more_fields_seats ); 454 455 } else { 456 457 // The option hasn't been created yet, so add it with $autoload set to 'no'. 458 $new_value = "OFF"; 459 $deprecated = null; 460 $autoload = 'no'; 461 add_option( $option_name, $new_value, $deprecated, $autoload ); 462 } 463 464 ////**Add More Fields add_more_fields_rooms***/// 465 466 $option_name = 'add_more_fields_rooms'; 467 468 469 if ( get_option( $option_name ) !== false ) { 470 471 $add_more_fields_rooms = get_option( 'add_more_fields_rooms' ); 472 update_option( $option_name, $add_more_fields_rooms ); 473 474 } else { 475 476 // The option hasn't been created yet, so add it with $autoload set to 'no'. 477 $new_value = "OFF"; 478 $deprecated = null; 479 $autoload = 'no'; 480 add_option( $option_name, $new_value, $deprecated, $autoload ); 481 } 482 ?> -
reservation-form/trunk/inc/register_hooks/register_activation_hook_fields_tag.php
r2752823 r2756581 1 1 <?php 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 4 3 $option_name = 'oops_wp_reservation_fields_tag'; 5 6 7 4 if ( get_option( $option_name ) !== false ) { 8 9 5 $oops_wp_reservation_fields_tag = get_option( 'oops_wp_reservation_fields_tag' ); 10 6 update_option( $option_name, $oops_wp_reservation_fields_tag ); 11 12 7 } else { 13 14 8 // The option hasn't been created yet, so add it with $autoload set to 'no'. 15 9 $new_value = array("field1"=>"Input", "field2"=>"Input", "field3"=>"Select", "field4"=>"Textarea"); -
reservation-form/trunk/inc/register_hooks/register_activation_hook_fields_type.php
r2752823 r2756581 1 1 <?php 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 4 3 $option_name = 'oops_wp_reservation_fields_type'; 5 6 7 4 if ( get_option( $option_name ) !== false ) { 8 9 5 $get_option_label = get_option( 'oops_wp_reservation_fields_type' ); 10 6 update_option( $option_name, $get_option_label ); 11 12 7 } else { 13 14 8 // The option hasn't been created yet, so add it with $autoload set to 'no'. 15 9 $new_value = array("field1"=>"Text", "field2"=>"Text", "field3"=>"Text", "field4"=>"Text"); -
reservation-form/trunk/inc/register_hooks/register_activation_hook_label_name.php
r2752823 r2756581 1 1 <?php 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 4 3 $option_name = 'oops_wp_reservation_label_name' ; 5 6 7 4 if ( get_option( $option_name ) !== false ) { 8 9 5 $get_option_label = get_option( 'oops_wp_reservation_label_name' ); 10 6 update_option( $option_name, $get_option_label ); 11 12 7 } else { 13 14 8 // The option hasn't been created yet, so add it with $autoload set to 'no'. 15 9 $new_value = array("field1"=>"Name", "field2"=>"Email", "field3"=>"City", "field4"=>"feedback"); -
reservation-form/trunk/index.php
r2752823 r2756581 2 2 defined('ABSPATH') || die ("You can't access this file directyly !"); 3 3 // Silence is golden. 4 ?> -
reservation-form/trunk/oopspk_reservation_form_7.php
r2752828 r2756581 5 5 Description: WP reservation form is the best free WordPress Plugin for you to build a reservation form. 6 6 Author: oops.pk 7 Author URI: https://www.oops.pk/ 7 Author URI: https://www.oops.pk/ 8 8 GitHub Plugin URI: https://github.com/oopspk/Reservation-form.git 9 9 Domain Path: /languages/ … … 17 17 defined('ABSPATH') || die ("You can't access this file directyly !"); 18 18 define("wp_reservation_dir", __DIR__); 19 19 20 require(wp_reservation_dir."/oopspk_reservation_form_main_load.php"); 20 21 require(wp_reservation_dir."/oopspk_reservation_form_optionpage.php"); … … 25 26 26 27 function oops_wp_reservation_register_activation_hook(){ 27 28 //labels name // 29 28 /*--------------------------- 29 labels name 30 ------------------------------*/ 30 31 require(wp_reservation_dir."/inc/register_hooks/register_activation_hook_label_name.php"); 31 //fields_tag// 32 32 /*---------------------------- 33 fields_tag 34 -----------------------------*/ 33 35 require(wp_reservation_dir."/inc/register_hooks/register_activation_hook_fields_tag.php"); 34 //fields_type// 35 36 /*------------------------------ 37 fields_type 38 -------------------------------*/ 36 39 require(wp_reservation_dir."/inc/register_hooks/register_activation_hook_fields_type.php"); 37 38 // oops_all_fields // 40 /*------------------------------ 41 oops_all_fields 42 -------------------------------*/ 39 43 require(wp_reservation_dir."/inc/register_hooks/oops_all_fields.php"); 40 44 45 #Create Custom Tabel 46 /*------------------------------------------------------------*/ 47 global $wpdb; 48 49 $table_name = $wpdb->prefix . "reservation_entries"; 50 51 $charset_collate = $wpdb->get_charset_collate(); 52 53 $sql = "CREATE TABLE IF NOT EXISTS $table_name ( 54 id int(11) UNSIGNED NOT NULL AUTO_INCREMENT, 55 entries longtext NOT NULL, 56 PRIMARY KEY id (id) 57 ) $charset_collate;"; 58 59 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 60 dbDelta($sql); 61 /*--------------------------------------------------------------*/ 41 62 } 42 63 43 function oops_wp_reservation_register_deactivation_hook(){ 64 function oops_wp_reservation_register_deactivation_hook(){} 44 65 45 } 46 47 function oops_wp_reservation_register_uninstall_hook(){ 48 49 } 66 function oops_wp_reservation_register_uninstall_hook(){} 67 ?> -
reservation-form/trunk/oopspk_reservation_form_main_load.php
r2752823 r2756581 3 3 require(wp_reservation_dir."/inc/oopspk_functions.php"); 4 4 require(wp_reservation_dir."/inc/oops_pk_shortcodes.php"); 5 ?> -
reservation-form/trunk/oopspk_reservation_form_optionpage.php
r2752823 r2756581 9 9 add_menu_page('Reservation Form 7', 'Reservation Form', 'administrator', __FILE__, 'oopspkreservation_form_settings_page' , '' ); 10 10 11 11 12 //call register settings function 12 13 add_action( 'admin_init', 'oopspkreservation_form_plugin_settings' ); 13 14 } 14 15 15 16 16 function oopspkreservation_form_plugin_settings() { … … 19 19 register_setting( 'oops-reservation-from-settings-group', 'some_other_option' ); 20 20 register_setting( 'oops-reservation-from-settings-group', 'option_etc' ); 21 register_setting( 'oops-reservation-from-settings-add_options', 'some_other_option' ); 21 22 22 if(isset($_POST['submit_customization'])){ 23 //echo $_POST['tag_field1']; 24 $tag_field1 = sanitize_text_field(ucwords($_POST['tag_field1'])); 25 $tag_field2 = sanitize_text_field(ucwords($_POST['tag_field2'])); 26 $tag_field3 = sanitize_text_field(ucwords($_POST['tag_field3'])); 27 $tag_field4 = sanitize_text_field(ucwords($_POST['tag_field4'])); 28 29 $option_name = 'tag_select_field1'; 30 update_option( $option_name, $tag_field1 ); 31 32 $option_name = 'tag_select_field2'; 33 update_option( $option_name, $tag_field2 ); 34 35 $option_name = 'tag_select_field3'; 36 update_option( $option_name, $tag_field3 ); 37 38 $option_name = 'tag_select_field4'; 39 update_option( $option_name, $tag_field4 ); 40 41 $new_value_tags = array("field1"=>$tag_field1, "field2"=>$tag_field2, "field3"=>$tag_field3, "field4"=>$tag_field4); 42 $option_name = 'oops_wp_reservation_fields_tag'; 43 update_option( $option_name, $new_value_tags ); 44 45 //* fields types*// 46 47 $fieldtype1 = sanitize_text_field(ucwords($_POST['fieldtype1'])); 48 $fieldtype2 = sanitize_text_field(ucwords($_POST['fieldtype2'])); 49 $fieldtype3 = sanitize_text_field(ucwords($_POST['fieldtype3'])); 50 $fieldtype4 = sanitize_text_field(ucwords($_POST['fieldtype4'])); 51 52 $option_name = 'fieldtype1'; 53 update_option( $option_name, $fieldtype1 ); 54 55 $option_name = 'fieldtype2'; 56 update_option( $option_name, $fieldtype2 ); 57 58 $option_name = 'fieldtype3'; 59 update_option( $option_name, $fieldtype3 ); 60 61 $option_name = 'fieldtype4'; 62 update_option( $option_name, $fieldtype4 ); 63 64 $new_value_type = array("field1"=>$fieldtype1, "field2"=>$fieldtype2, "field3"=>$fieldtype3, "field4"=>$fieldtype4); 65 $option_name = 'oops_wp_reservation_fields_type'; 66 update_option( $option_name, $new_value_type ); 67 68 //*Labels Names*// 69 $inputfield1 = sanitize_text_field(ucwords($_POST['inputfield1'])); 70 $inputfield2 = sanitize_text_field(ucwords($_POST['inputfield2'])); 71 $inputfield3 = sanitize_text_field(ucwords($_POST['inputfield3'])); 72 $inputfield4 = sanitize_text_field(ucwords($_POST['inputfield4'])); 73 74 $option_name = 'inputfield1'; 75 update_option( $option_name, $inputfield1 ); 76 77 $option_name = 'inputfield2'; 78 update_option( $option_name, $inputfield2 ); 79 80 $option_name = 'inputfield3'; 81 update_option( $option_name, $inputfield3 ); 82 83 $option_name = 'inputfield4'; 84 update_option( $option_name, $inputfield4 ); 85 86 $new_value_type = array("field1"=>$inputfield1, "field2"=>$inputfield2, "field3"=>$inputfield3, "field4"=>$inputfield4); 87 $option_name = 'oops_wp_reservation_label_name'; 88 update_option( $option_name, $new_value_type ); 89 } 90 23 require(wp_reservation_dir."/inc/submit_customization_codes.php"); 24 require(wp_reservation_dir."/inc/submit_add_options.php"); 25 require(wp_reservation_dir."/inc/submit_add_more_fields.php"); 91 26 } 92 27 function oopspkreservation_form_settings_page() { … … 106 41 <!-- Tab 3 --> 107 42 <input type="radio" name="tabset" id="tab3" aria-controls="dunkles"> 108 <label for="tab3"> Add Extra Fields</label>43 <label for="tab3">Entries</label> 109 44 110 45 <div class="tab-panels"> … … 121 56 </section> 122 57 <section id="dunkles" class="tab-panel"> 123 <h2>Add Extra Fields</h2> 124 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> 125 98 </section> 126 99 </div>
Note: See TracChangeset
for help on using the changeset viewer.