diff --git a/admin/barcode_check-in.admin.php b/admin/barcode_check-in.admin.php index e0823309..a86cc2b1 100644 --- a/admin/barcode_check-in.admin.php +++ b/admin/barcode_check-in.admin.php @@ -22,20 +22,32 @@ } ?> diff --git a/admin/judging_tables.admin.php b/admin/judging_tables.admin.php index c9611d7e..7998b718 100644 --- a/admin/judging_tables.admin.php +++ b/admin/judging_tables.admin.php @@ -191,10 +191,15 @@ else $scored = $scored; } - else $scored = "N/A (Planning Mode)"; + else $scored = " Planning Mode"; $assigned_judges = assigned_judges($row_tables['id'],$dbTable,$judging_assignments_db_table); + //if (strpos($assigned_judges, "fa-plus-circle") === FALSE) + $assigned_judges .= "
"; + $assigned_stewards = assigned_stewards($row_tables['id'],$dbTable,$judging_assignments_db_table); + //if (strpos($assigned_stewards, "fa-plus-circle") === FALSE) + $assigned_stewards .= "
"; if ($dbTable == "default") { if (score_count($row_tables['id'],1,$dbTable)) $scoreAction = "edit"; @@ -641,6 +646,43 @@ function enable_competition_mode() { + + + + +

@@ -1393,4 +1435,5 @@ function update_table_total(element_id) { + \ No newline at end of file diff --git a/ajax/purge.ajax.php b/ajax/purge.ajax.php index 522172aa..0513b251 100644 --- a/ajax/purge.ajax.php +++ b/ajax/purge.ajax.php @@ -1,8 +1,8 @@ "$status", - "query" => "$sql", - "date" => "$display_date", - "dom_ct_participants" => "$dom_ct_participants", - "dom_ct_participants_entries" => "$dom_ct_participants_entries", - "dom_ct_judges_avail" => "$dom_ct_judges_avail", - "dom_ct_judges_assigned" => "$dom_ct_judges_assigned", - "dom_ct_stewards_avail" => "$dom_ct_stewards_avail", - "dom_ct_stewards_assigned" => "$dom_ct_stewards_assigned", - "dom_ct_staff_avail" => "$dom_ct_staff_avail", - "dom_ct_staff_assigned" => "$dom_ct_staff_assigned", - "dom_ct_entries" => "$dom_ct_entries", - "dom_ct_entries_unconfirmed" => "$dom_ct_entries_unconfirmed", - "dom_ct_entries_paid" => "$dom_ct_entries_paid", - "dom_ct_entries_paid_received" => "$dom_ct_entries_paid_received", - "dom_total_fees" => "$dom_total_fees", - "dom_total_fees_paid" => "$dom_total_fees_paid" -); +if (($go == "judge-assignments") || ($go == "judge-assignments")) { + $return_json = array( + "status" => "$status", + "query" => "$sql" + ); +} +else { + $return_json = array( + "status" => "$status", + "query" => "$sql", + "date" => "$display_date", + "dom_ct_participants" => "$dom_ct_participants", + "dom_ct_participants_entries" => "$dom_ct_participants_entries", + "dom_ct_judges_avail" => "$dom_ct_judges_avail", + "dom_ct_judges_assigned" => "$dom_ct_judges_assigned", + "dom_ct_stewards_avail" => "$dom_ct_stewards_avail", + "dom_ct_stewards_assigned" => "$dom_ct_stewards_assigned", + "dom_ct_staff_avail" => "$dom_ct_staff_avail", + "dom_ct_staff_assigned" => "$dom_ct_staff_assigned", + "dom_ct_entries" => "$dom_ct_entries", + "dom_ct_entries_unconfirmed" => "$dom_ct_entries_unconfirmed", + "dom_ct_entries_paid" => "$dom_ct_entries_paid", + "dom_ct_entries_paid_received" => "$dom_ct_entries_paid_received", + "dom_total_fees" => "$dom_total_fees", + "dom_total_fees_paid" => "$dom_total_fees_paid" + ); +} // Return the json echo json_encode($return_json); mysqli_close($connection); diff --git a/includes/ajax_functions.inc.php b/includes/ajax_functions.inc.php index c47f39c6..86316860 100644 --- a/includes/ajax_functions.inc.php +++ b/includes/ajax_functions.inc.php @@ -1112,8 +1112,7 @@ $email = $_GET['email']; if (is_email($email)) echo sprintf(" %s",$alert_email_valid); else echo sprintf(" %s",$alert_email_not_valid); - - + } diff --git a/includes/constants.inc.php b/includes/constants.inc.php index 7bb3976d..fe8afcc5 100644 --- a/includes/constants.inc.php +++ b/includes/constants.inc.php @@ -31,6 +31,62 @@ // Replaces countries DB table for better performance $countries = array("United States","Australia","Canada","Ireland","United Kingdom","Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Congo, The Democratic Republic of The","Cook Islands","Costa Rica","Cote D'ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Easter Island","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands (Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guinea","Guinea-bissau","Guyana","Haiti","Heard Island and Mcdonald Islands","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea, North","Korea, South","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libyan Arab Jamahiriya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia, Federated States of","Moldova, Republic of","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestinian Territory","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russia","Russia","Rwanda","Saint Helena","Saint Kitts and Nevis","Saint Lucia","Saint Pierre and Miquelon","Saint Vincent and The Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia/South Sandwich Islands","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania, United Republic of","Thailand","Timor-leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","United Arab Emirates","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Virgin Islands, British","Virgin Islands, U.S.","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe","Other"); +$us_state_abbrevs_names = array( + 'AL' => 'Alabama', + 'AK' => 'Alaska', + 'AZ' => 'Arizona', + 'AR' => 'Arkansas', + 'CA' => 'California', + 'CO' => 'Colorado', + 'CT' => 'Connecticut', + 'DE' => 'Delaware', + 'DC' => 'District of Columbia', + 'FL' => 'Florida', + 'GA' => 'Georgia', + 'HI' => 'Hawaii', + 'ID' => 'Idaho', + 'IL' => 'Illinois', + 'IN' => 'Indiana', + 'IA' => 'Iowa', + 'KS' => 'Kansas', + 'KY' => 'Kentucky', + 'LA' => 'Louisiana', + 'ME' => 'Maine', + 'MD' => 'Maryland', + 'MA' => 'Massachusetts', + 'MI' => 'Michigan', + 'MN' => 'Minnesota', + 'MS' => 'Mississippi', + 'MO' => 'Missouri', + 'MT' => 'Montana', + 'NE' => 'Nebraska', + 'NV' => 'Nevada', + 'NH' => 'New Hampshire', + 'NJ' => 'New Jersey', + 'NM' => 'New Mexico', + 'NY' => 'New York', + 'NC' => 'North Carolina', + 'ND' => 'North Dakota', + 'OH' => 'Ohio', + 'OK' => 'Oklahoma', + 'OR' => 'Oregon', + 'PA' => 'Pennsylvania', + 'PR' => 'Puerto Rico', + 'RI' => 'Rhode Island', + 'SC' => 'South Carolina', + 'SD' => 'South Dakota', + 'TN' => 'Tennessee', + 'TX' => 'Texas', + 'UT' => 'Utah', + 'VT' => 'Vermont', + 'VI' => 'Virgin Islands', + 'VA' => 'Virginia', + 'WA' => 'Washington', + 'WV' => 'West Virginia', + 'WI' => 'Wisconsin', + 'WY' => 'Wyoming' +); + // -------------------------- Tie break rules --------------------------------------------------- // List of existing rules for the tie break for ordering the best brewers. // The order of the rules will be chosen during setup @@ -1436,6 +1492,7 @@ "Miami Beach Home Brew", "Miami County Brewing Club", "Michiana Extract & Grain Association (MEGA)", + "Michigan Mead Coalition", "Michigan Occasional Brewers (MOB)", "Mid Columbia Zymurgy Association", "Mid Michigan Ale and Lager Team (MMALT)", diff --git a/includes/current_version.inc.php b/includes/current_version.inc.php index 64f6764f..d29b76b9 100644 --- a/includes/current_version.inc.php +++ b/includes/current_version.inc.php @@ -10,7 +10,7 @@ if (!empty($current_version_display_append)) $current_version_display .= " ".$current_version_display_append; // Change date for each pre-release and release. Will trigger a force update. -$current_version_date_display = "2021-10-15"; +$current_version_date_display = "2021-10-22"; // Convert current version date to Unix timestamp $current_version_date = strtotime($current_version_date_display); diff --git a/includes/data_cleanup.inc.php b/includes/data_cleanup.inc.php index 181c17a9..0d4adadf 100644 --- a/includes/data_cleanup.inc.php +++ b/includes/data_cleanup.inc.php @@ -345,6 +345,32 @@ } // END if (($go == "tables") || ($go == "purge-all")) + if ($go == "judge-assignments") { + + if ($view != "default") { + $view = explode("-",$view); + $updateSQL = sprintf("DELETE FROM %s WHERE assignTable='%s' AND assignment='J'",$judging_assignments_db_table,$view[2]); + } + else $updateSQL = sprintf("DELETE FROM %s WHERE assignment='J'",$judging_assignments_db_table); + $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection)); + if ($result) $status = 1; + $redirect_go_to = sprintf("Location: %s", $base_url."index.php?section=admin&msg=26"); + + } // END if ($go == "judging-assignments") + + if ($go == "steward-assignments") { + + if ($view != "default") { + $view = explode("-",$view); + $updateSQL = sprintf("DELETE FROM %s WHERE assignTable='%s' AND assignment='S'",$judging_assignments_db_table,$view[2]); + } + else $updateSQL = sprintf("DELETE FROM %s WHERE assignment='S'",$judging_assignments_db_table); + $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection)); + if ($result) $status = 1; + $redirect_go_to = sprintf("Location: %s", $base_url."index.php?section=admin&msg=26"); + + } // END if ($go == "judging-assignments") + if (($go == "custom") || ($go == "purge-all")) { $purge_array = array($special_best_info_db_table,$special_best_data_db_table); diff --git a/includes/db/common.db.php b/includes/db/common.db.php index 80e21551..b9119c45 100644 --- a/includes/db/common.db.php +++ b/includes/db/common.db.php @@ -5,7 +5,7 @@ mysqli_select_db($connection,$database); -$query_version1 = sprintf("SELECT * FROM %s WHERE id='1'", $prefix."system"); +$query_version1 = sprintf("SELECT * FROM %s WHERE id='1'", $prefix."bcoem_sys"); $version1 = mysqli_query($connection,$query_version1) or die (mysqli_error($connection)); $row_version1 = mysqli_fetch_assoc($version1); $version = $row_version1['version']; diff --git a/includes/db/setup.db.php b/includes/db/setup.db.php index f069e6b3..0e48961f 100644 --- a/includes/db/setup.db.php +++ b/includes/db/setup.db.php @@ -1,9 +1,9 @@ %",$alert_email_valid); -else echo sprintf(" %s",$alert_email_not_valid); - -?> \ No newline at end of file +if (is_email($email)) echo sprintf(" %",$alert_email_valid); +else echo sprintf(" %s",$alert_email_not_valid); +?> \ No newline at end of file diff --git a/includes/process.inc.php b/includes/process.inc.php index c2888a6e..def453c1 100644 --- a/includes/process.inc.php +++ b/includes/process.inc.php @@ -103,7 +103,7 @@ $staff_db_table = $prefix."staff"; $styles_db_table = $prefix."styles"; $style_types_db_table = $prefix."style_types"; - $system_db_table = $prefix."system"; + $system_db_table = $prefix."bcoem_sys"; $themes_db_table = $prefix."themes"; $users_db_table = $prefix."users"; diff --git a/includes/process/process_judging_preferences.inc.php b/includes/process/process_judging_preferences.inc.php index 975c6ce9..c905a28d 100644 --- a/includes/process/process_judging_preferences.inc.php +++ b/includes/process/process_judging_preferences.inc.php @@ -84,7 +84,7 @@ session_write_close(); session_regenerate_id(true); - $updateSQL = sprintf("UPDATE %s SET setup='1', setup_last_step='8' WHERE id='1'",$prefix."system"); + $updateSQL = sprintf("UPDATE %s SET setup='1', setup_last_step='8' WHERE id='1'",$prefix."bcoem_sys"); mysqli_real_escape_string($connection,$updateSQL); $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection)); diff --git a/includes/process/process_users_register.inc.php b/includes/process/process_users_register.inc.php index b661f845..fbfe104d 100644 --- a/includes/process/process_users_register.inc.php +++ b/includes/process/process_users_register.inc.php @@ -165,14 +165,17 @@ brewerStaff, brewerBreweryName, brewerBreweryTTB, - brewerProAm + brewerProAm, + + brewerAHA ) VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, - %s, %s, %s, %s, %s + %s, %s, %s, %s, %s, + %s )", GetSQLValueString($row_user['id'], "int"), GetSQLValueString($first_name, "text"), @@ -198,7 +201,8 @@ GetSQLValueString($brewerStaff, "text"), GetSQLValueString($brewerBreweryName, "text"), GetSQLValueString($brewerBreweryTTB, "text"), - GetSQLValueString($brewerProAm, "text") + GetSQLValueString($brewerProAm, "text"), + GetSQLValueString($brewerAHA, "text") ); mysqli_real_escape_string($connection,$insertSQL); diff --git a/js_includes/admin_ajax.min.js b/js_includes/admin_ajax.min.js index 11232249..6a218de0 100644 --- a/js_includes/admin_ajax.min.js +++ b/js_includes/admin_ajax.min.js @@ -1 +1 @@ -$("#alert-update-button-enabled").hide();function generic_success(element_id,remove,msg){$("#"+element_id+"-status").attr("class","fa fa-lg fa-check text-success");$("#"+element_id+"-status-msg").html(msg);$("#"+element_id+"-status-msg").attr("class","text-success small");if(remove==0){$("#"+element_id+"-status").show();$("#"+element_id+"-status-msg").show()}if(remove>0){$("#"+element_id+"-status").show().delay(remove).hide(100);$("#"+element_id+"-status-msg").show().delay(remove).hide(100)}}function generic_failure(element_id,remove,msg){$("#"+element_id+"-status").attr("class","fa fa-lg fa-times text-danger");$("#"+element_id+"-status-msg").html(msg);$("#"+element_id+"-status-msg").attr("class","text-danger small");if(remove==0){$("#"+element_id+"-status").show();$("#"+element_id+"-status-msg").show()}if(remove>0){$("#"+element_id+"-status").show().delay(remove).hide(100);$("#"+element_id+"-status-msg").show().delay(remove).hide(100)}}function generic_session_expired(element_id,remove,msg){$("#"+element_id+"-status").attr("class","fa fa-lg fa-exclamation-triangle text-danger");$("#"+element_id+"-status-msg").html(msg);$("#"+element_id+"-status-msg").attr("class","text-danger small");if(remove==0){$("#"+element_id+"-status").show();$("#"+element_id+"-status-msg").show()}if(remove>0){$("#"+element_id+"-status").show().delay(remove).hide(100);$("#"+element_id+"-status-msg").show().delay(remove).hide(100)}}function disable_update_button(action){$("#"+action+"-update-button-disabled").show();$("#"+action+"-update-button-enabled").hide();$("#"+action+"-submit").prop("disabled",true);$("#alert-update-button-enabled").hide()}function enable_update_button(action){$("#"+action+"-submit").prop("disabled",false);$("#"+action+"-update-button-disabled").hide();$("#"+action+"-update-button-enabled").show();$("#alert-update-button-enabled").show()}function save_failure(element_id,column,action,error){enable_update_button(action);if(error==1){$("#"+element_id+"-"+column+"-status-msg").html("Error. Invalid numerical input.")}else if(error==2){$("#"+element_id+"-"+column+"-status-msg").html("Error. Alpha characters only.")}else if(error==3){$("#"+element_id+"-"+column+"-status-msg").html("Error saving. Please try again.")}else{$("#"+element_id+"-"+column+"-status-msg").html("Error")}$("#"+element_id+"-"+column+"-status").attr("class","fa fa-lg fa-times text-danger");$("#"+element_id+"-"+column+"-status-msg").attr("class","text-danger small");$("#"+element_id+"-"+column+"-form-group").removeClass("has-error");$("#"+element_id+"-"+column+"-form-group").removeClass("has-success");$("#"+element_id+"-"+column+"-form-group").addClass("has-error");$("#"+element_id+"-"+column+"-status").show();$("#"+element_id+"-"+column+"-status-msg").show()};function save_success(element_id,column,action,error){disable_update_button(action);$("#"+element_id+"-"+column+"-status").attr("class","fa fa-lg fa-check text-success");$("#"+element_id+"-"+column+"-status-msg").html("Saved");$("#"+element_id+"-"+column+"-status-msg").attr("class","text-success small");$("#"+element_id+"-"+column+"-form-group").removeClass("has-error");$("#"+element_id+"-"+column+"-form-group").removeClass("has-success");$("#"+element_id+"-"+column+"-form-group").addClass("has-success");$("#"+element_id+"-"+column+"-status").show();$("#"+element_id+"-"+column+"-status-msg").show()};function save_column(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id,output="value"){var value=$("#"+element_id).val();$("#"+element_id+"-"+column+"-status").attr("class","fa fa-lg fa-cog fa-spin text-muted");$("#"+element_id+"-"+column+"-status-msg").html("Processing...");$("#"+element_id+"-"+column+"-status-msg").attr("class","text-muted small");$("#"+element_id+"-"+column+"-status").show();$("#"+element_id+"-"+column+"-status-msg").show();let url=base_url+"ajax/save.ajax.php?action="+action+"&go="+column+"&id="+id;if(rid1!="default"){url+="&rid1="+rid1}if(rid2!="default"){url+="&rid2="+rid2}if(rid3!="default"){url+="&rid3="+rid3}if(rid4!="default"){url+="&rid4="+rid4}var data_const=column+"="+value;jQuery.ajax({url:url,data:data_const,type:"POST",success:function(data){var jsonData=JSON.parse(data);if(jsonData.status==="0"){save_failure(element_id,column,action,jsonData.error_type)}if(jsonData.status==="1"){if(output=="html"){$("#"+element_id).html(jsonData.input)}else{$("#"+element_id).val(jsonData.input)}save_success(element_id,column,action,jsonData.error_type)}if(jsonData.status==="9"){generic_session_expired(element_id,'0','Session expired. Sign in and try again.')}},error:function(){save_failure(element_id,column,action,"99")}})};function select_place(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id){if(($('select option[value="'+$('#'+element_id).val()+'"]:selected').length>1)&&$('select option[value="'+$('#'+element_id).val()+'"]:selected')!==""){if($('#'+element_id).val()!==""){$('#'+element_id).val('-1').change();$('#noDupeModal').modal('show')}}else{save_column(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id)}if($('#'+element_id).val()===""){save_column(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id)}};function select_place_multi(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id){var user_value=$('#'+element_id).val();var select_class=rid1;var selected_values=[];$('.'+select_class).each(function(){var x=this.value;if(typeof x!=='undefined'){if(this.id!=element_id){selected_values.push(x)}}});$('.'+select_class).each(function(){x=this.value;if(typeof x!=='undefined'){if(($.inArray(x,selected_values)>-1)&&(x!="")){if(x==user_value){$('#noDupeModal').modal('show');$('#'+element_id).val('-1').change()}}else{save_column(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id)}}})}function regenerate_judging_numbers(base_url,action,source,element_id){$("#"+element_id+"-status").attr("class","fa fa-lg fa-cog fa-spin text-muted");$("#"+element_id+"-status-msg").html("Processing...");$("#"+element_id+"-status-msg").attr("class","text-muted small");$("#"+element_id+"-status").show();$("#"+element_id+"-status-msg").show();var url=base_url+"ajax/regenerate.ajax.php?action="+action;jQuery.ajax({url:url,success:function(data){var jsonData=JSON.parse(data);if(jsonData.status==="0"){if(source=="admin-dashboard"){generic_failure(element_id,'8000','There was an error, please try again.')}}if(jsonData.status==="1"){if(source=="admin-dashboard"){generic_success(element_id,'8000','Regenerated successfully.')}}if(jsonData.status==="9"){if(source=="admin-dashboard"){generic_session_expired(element_id,'0','Session expired. Sign in and try again.')}}},error:function(){}})}function purge_data(base_url,action,go,source,element_id){$("#"+element_id+"-status").attr("class","fa fa-lg fa-cog fa-spin text-muted");$("#"+element_id+"-status-msg").html("Processing...");$("#"+element_id+"-status-msg").attr("class","text-muted small");$("#"+element_id+"-status").show();$("#"+element_id+"-status-msg").show();if(action==""){action="purge"}else{action=action}let url=base_url+"ajax/purge.ajax.php?action="+action+"&go="+go;let data_const="";if((go=="entries")||(go=="payments")||(go=="participants")){var value=$("#"+element_id+"-"+go+"-value").val();data_const+=value;url+="&view="+value}jQuery.ajax({url:url,data:data_const,type:"POST",success:function(data){var jsonData=JSON.parse(data);if(jsonData.status==="0"){if(source=="admin-dashboard"){generic_failure(element_id,'8000','There was an error, please try again.')}}if(jsonData.status==="1"){var message="";if((jsonData.date!=="")||(jsonData.date.length>1)){message="Data prior to "+jsonData.date+" purged successfully."}else if(go=="confirmed"){message="All entries confirmed."}else if(go=="cleanup"){message="Data cleaned successfully."}else{message="Purge completed successfully."}if(source=="admin-dashboard"){if((go=="participants")||(go=="purge-all")){var dom_ct_participants_calc=$("#admin-dashboard-participant-count").text()-jsonData.dom_ct_participants;$("#admin-dashboard-participant-count").html(dom_ct_participants_calc);$("#admin-dashboard-avail-judges-count").html(jsonData.dom_ct_judges_avail);$("#admin-dashboard-assigned-judges-count").html(jsonData.dom_ct_judges_assigned);$("#admin-dashboard-avail-stewards-count").html(jsonData.dom_ct_stewards_avail);$("#admin-dashboard-assigned-stewards-count").html(jsonData.dom_ct_stewards_assigned);$("#admin-dashboard-avail-staff-count").html(jsonData.dom_ct_staff_avail);$("#admin-dashboard-assigned-staff-count").html(jsonData.dom_ct_staff_assigned)}if((go=="participants")||(go=="entries")||(go=="purge-all")){$("#admin-dashboard-participant-entries").html(jsonData.dom_ct_participants_entries);$("#admin-dashboard-entries-count").html(jsonData.dom_ct_entries);$("#admin-dashboard-entries-unconfirmed-count").html(jsonData.dom_ct_entries_unconfirmed);$("#admin-dashboard-entries-paid-count").html(jsonData.dom_ct_entries_paid);$("#admin-dashboard-entries-paid-received-count").html(jsonData.dom_ct_entries_paid_received);$("#admin-dashboard-total-fees").html(jsonData.dom_total_fees);$("#admin-dashboard-total-fees-paid").html(jsonData.dom_total_fees_paid)}generic_success(element_id,'8000',message)}}if(jsonData.status==="2"){if((jsonData.date!=="")||(jsonData.date.length>1)){message="No records updated prior to "+jsonData.date+" were found."}else{message="No non-admin participants found."}if(source=="admin-dashboard"){generic_failure(element_id,'8000',message)}}if(jsonData.status==="9"){if(source=="admin-dashboard"){generic_session_expired(element_id,'0','Session expired. Sign in and try again.')}}},error:function(){}})} \ No newline at end of file +$("#alert-update-button-enabled").hide();function generic_success(element_id,remove,msg){$("#"+element_id+"-status").attr("class","fa fa-lg fa-check text-success");$("#"+element_id+"-status-msg").html(msg);$("#"+element_id+"-status-msg").attr("class","text-success small");if(remove==0){$("#"+element_id+"-status").show();$("#"+element_id+"-status-msg").show()}if(remove>0){$("#"+element_id+"-status").show().delay(remove).hide(100);$("#"+element_id+"-status-msg").show().delay(remove).hide(100)}}function generic_failure(element_id,remove,msg){$("#"+element_id+"-status").attr("class","fa fa-lg fa-times text-danger");$("#"+element_id+"-status-msg").html(msg);$("#"+element_id+"-status-msg").attr("class","text-danger small");if(remove==0){$("#"+element_id+"-status").show();$("#"+element_id+"-status-msg").show()}if(remove>0){$("#"+element_id+"-status").show().delay(remove).hide(100);$("#"+element_id+"-status-msg").show().delay(remove).hide(100)}}function generic_session_expired(element_id,remove,msg){$("#"+element_id+"-status").attr("class","fa fa-lg fa-exclamation-triangle text-danger");$("#"+element_id+"-status-msg").html(msg);$("#"+element_id+"-status-msg").attr("class","text-danger small");if(remove==0){$("#"+element_id+"-status").show();$("#"+element_id+"-status-msg").show()}if(remove>0){$("#"+element_id+"-status").show().delay(remove).hide(100);$("#"+element_id+"-status-msg").show().delay(remove).hide(100)}}function disable_update_button(action){$("#"+action+"-update-button-disabled").show();$("#"+action+"-update-button-enabled").hide();$("#"+action+"-submit").prop("disabled",true);$("#alert-update-button-enabled").hide()}function enable_update_button(action){$("#"+action+"-submit").prop("disabled",false);$("#"+action+"-update-button-disabled").hide();$("#"+action+"-update-button-enabled").show();$("#alert-update-button-enabled").show()}function save_failure(element_id,column,action,error){enable_update_button(action);if(error==1){$("#"+element_id+"-"+column+"-status-msg").html("Error. Invalid numerical input.")}else if(error==2){$("#"+element_id+"-"+column+"-status-msg").html("Error. Alpha characters only.")}else if(error==3){$("#"+element_id+"-"+column+"-status-msg").html("Error saving. Please try again.")}else{$("#"+element_id+"-"+column+"-status-msg").html("Error")}$("#"+element_id+"-"+column+"-status").attr("class","fa fa-lg fa-times text-danger");$("#"+element_id+"-"+column+"-status-msg").attr("class","text-danger small");$("#"+element_id+"-"+column+"-form-group").removeClass("has-error");$("#"+element_id+"-"+column+"-form-group").removeClass("has-success");$("#"+element_id+"-"+column+"-form-group").addClass("has-error");$("#"+element_id+"-"+column+"-status").show();$("#"+element_id+"-"+column+"-status-msg").show()};function save_success(element_id,column,action,error){disable_update_button(action);$("#"+element_id+"-"+column+"-status").attr("class","fa fa-lg fa-check text-success");$("#"+element_id+"-"+column+"-status-msg").html("Saved");$("#"+element_id+"-"+column+"-status-msg").attr("class","text-success small");$("#"+element_id+"-"+column+"-form-group").removeClass("has-error");$("#"+element_id+"-"+column+"-form-group").removeClass("has-success");$("#"+element_id+"-"+column+"-form-group").addClass("has-success");$("#"+element_id+"-"+column+"-status").show();$("#"+element_id+"-"+column+"-status-msg").show()};function save_column(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id,output="value"){var value=$("#"+element_id).val();$("#"+element_id+"-"+column+"-status").attr("class","fa fa-lg fa-cog fa-spin text-muted");$("#"+element_id+"-"+column+"-status-msg").html("Processing...");$("#"+element_id+"-"+column+"-status-msg").attr("class","text-muted small");$("#"+element_id+"-"+column+"-status").show();$("#"+element_id+"-"+column+"-status-msg").show();let url=base_url+"ajax/save.ajax.php?action="+action+"&go="+column+"&id="+id;if(rid1!="default"){url+="&rid1="+rid1}if(rid2!="default"){url+="&rid2="+rid2}if(rid3!="default"){url+="&rid3="+rid3}if(rid4!="default"){url+="&rid4="+rid4}var data_const=column+"="+value;jQuery.ajax({url:url,data:data_const,type:"POST",success:function(data){var jsonData=JSON.parse(data);if(jsonData.status==="0"){save_failure(element_id,column,action,jsonData.error_type)}if(jsonData.status==="1"){if(output=="html"){$("#"+element_id).html(jsonData.input)}else{$("#"+element_id).val(jsonData.input)}save_success(element_id,column,action,jsonData.error_type)}if(jsonData.status==="9"){generic_session_expired(element_id,'0','Session expired. Sign in and try again.')}},error:function(){save_failure(element_id,column,action,"99")}})};function select_place(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id){if(($('select option[value="'+$('#'+element_id).val()+'"]:selected').length>1)&&$('select option[value="'+$('#'+element_id).val()+'"]:selected')!==""){if($('#'+element_id).val()!==""){$('#'+element_id).val('-1').change();$('#noDupeModal').modal('show')}}else{save_column(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id)}if($('#'+element_id).val()===""){save_column(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id)}};function select_place_multi(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id){var user_value=$('#'+element_id).val();var select_class=rid1;var selected_values=[];$('.'+select_class).each(function(){var x=this.value;if(typeof x!=='undefined'){if(this.id!=element_id){selected_values.push(x)}}});$('.'+select_class).each(function(){x=this.value;if(typeof x!=='undefined'){if(($.inArray(x,selected_values)>-1)&&(x!="")){if(x==user_value){$('#noDupeModal').modal('show');$('#'+element_id).val('-1').change()}}else{save_column(base_url,column,action,id,rid1,rid2,rid3,rid4,element_id)}}})}function regenerate_judging_numbers(base_url,action,source,element_id){$("#"+element_id+"-status").attr("class","fa fa-lg fa-cog fa-spin text-muted");$("#"+element_id+"-status-msg").html("Processing...");$("#"+element_id+"-status-msg").attr("class","text-muted small");$("#"+element_id+"-status").show();$("#"+element_id+"-status-msg").show();var url=base_url+"ajax/regenerate.ajax.php?action="+action;jQuery.ajax({url:url,success:function(data){var jsonData=JSON.parse(data);if(jsonData.status==="0"){if(source=="admin-dashboard"){generic_failure(element_id,'8000','There was an error, please try again.')}}if(jsonData.status==="1"){if(source=="admin-dashboard"){generic_success(element_id,'8000','Regenerated successfully.')}}if(jsonData.status==="9"){if(source=="admin-dashboard"){generic_session_expired(element_id,'0','Session expired. Sign in and try again.')}}},error:function(){}})}function purge_data(base_url,action,go,source,element_id){$("#"+element_id+"-status").attr("class","fa fa-lg fa-cog fa-spin text-muted");$("#"+element_id+"-status-msg").html("Processing...");$("#"+element_id+"-status-msg").attr("class","text-muted small");$("#"+element_id+"-status").show();$("#"+element_id+"-status-msg").show();if(action==""){action="purge"}else{action=action}let url=base_url+"ajax/purge.ajax.php?action="+action+"&go="+go;let data_const="";if((go=="entries")||(go=="payments")||(go=="participants")){var value=$("#"+element_id+"-"+go+"-value").val();data_const+=value;url+="&view="+value}if((go=="judge-assignments")||(go=="steward-assignments")){url+="&view="+element_id}jQuery.ajax({url:url,data:data_const,type:"POST",success:function(data){var jsonData=JSON.parse(data);if(jsonData.status==="0"){if(source=="admin-dashboard"){generic_failure(element_id,'8000','There was an error, please try again.')}}if(jsonData.status==="1"){var message="";if((jsonData.date!=="")||(jsonData.date.length>1)){message="Data prior to "+jsonData.date+" purged successfully."}else if(go=="confirmed"){message="All entries confirmed."}else if(go=="cleanup"){message="Data cleaned successfully."}else{message="Purge completed successfully."}if(source=="table-admin"){$("#"+element_id+"-count").html("0");$("#"+element_id+"-icon").removeClass("fa fa-lg fa-edit");$("#"+element_id+"-icon").removeClass("fa fa-lg fa-plus-circle");$("#"+element_id+"-icon").addClass("fa fa-lg fa-plus-circle");generic_success(element_id,'8000','Deleted')}if(source=="admin-dashboard"){if((go=="participants")||(go=="purge-all")){var dom_ct_participants_calc=$("#admin-dashboard-participant-count").text()-jsonData.dom_ct_participants;$("#admin-dashboard-participant-count").html(dom_ct_participants_calc);$("#admin-dashboard-avail-judges-count").html(jsonData.dom_ct_judges_avail);$("#admin-dashboard-assigned-judges-count").html(jsonData.dom_ct_judges_assigned);$("#admin-dashboard-avail-stewards-count").html(jsonData.dom_ct_stewards_avail);$("#admin-dashboard-assigned-stewards-count").html(jsonData.dom_ct_stewards_assigned);$("#admin-dashboard-avail-staff-count").html(jsonData.dom_ct_staff_avail);$("#admin-dashboard-assigned-staff-count").html(jsonData.dom_ct_staff_assigned)}if((go=="participants")||(go=="entries")||(go=="purge-all")){$("#admin-dashboard-participant-entries").html(jsonData.dom_ct_participants_entries);$("#admin-dashboard-entries-count").html(jsonData.dom_ct_entries);$("#admin-dashboard-entries-unconfirmed-count").html(jsonData.dom_ct_entries_unconfirmed);$("#admin-dashboard-entries-paid-count").html(jsonData.dom_ct_entries_paid);$("#admin-dashboard-entries-paid-received-count").html(jsonData.dom_ct_entries_paid_received);$("#admin-dashboard-total-fees").html(jsonData.dom_total_fees);$("#admin-dashboard-total-fees-paid").html(jsonData.dom_total_fees_paid)}generic_success(element_id,'8000',message)}}if(jsonData.status==="2"){if((jsonData.date!=="")||(jsonData.date.length>1)){message="No records updated prior to "+jsonData.date+" were found."}else{message="No non-admin participants found."}if(source=="admin-dashboard"){generic_failure(element_id,'8000',message)}}if(jsonData.status==="9"){if(source=="admin-dashboard"){generic_session_expired(element_id,'0','Session expired. Sign in and try again.')}}},error:function(){}})} \ No newline at end of file diff --git a/lang/en/en-US.lang.php b/lang/en/en-US.lang.php index 7a267cee..663d6bc3 100644 --- a/lang/en/en-US.lang.php +++ b/lang/en/en-US.lang.php @@ -1936,6 +1936,9 @@ $qr_text_018 = "Scan a QR Code located on a bottle label, enter the required password, and check in the entry."; +// 2.3.1 +$label_select_state = "Select or Search for Your State"; + /** * ---------------------------------------------------------------------------------- * END TRANSLATIONS diff --git a/lib/admin.lib.php b/lib/admin.lib.php index 51b5101f..a02898d8 100644 --- a/lib/admin.lib.php +++ b/lib/admin.lib.php @@ -847,7 +847,7 @@ function assigned_judges($tid,$dbTable,$judging_assignments_db_table,$method=0){ $icon = "fa-edit"; $title = "Edit judges assigned to this table."; } - if ($dbTable == "default") $r = $row_assignments['count'].' '; + if ($dbTable == "default") $r = ''.$row_assignments['count'].' '; else $r = $row_assignments['count']; } @@ -872,7 +872,7 @@ function assigned_stewards($tid,$dbTable,$judging_assignments_db_table){ $icon = "fa-edit"; $title = "Edit stewards assigned to this table."; } - if ($dbTable == "default") $r = $row_assignments['count'].' '; + if ($dbTable == "default") $r = ''.$row_assignments['count'].' '; else $r = $row_assignments['count']; return $r; } diff --git a/lib/common.lib.php b/lib/common.lib.php index 669dbbb5..a7a22c61 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -23,7 +23,7 @@ function version_check($version,$current_version,$current_version_date_display) if ($version != $current_version) { - $updateSQL = sprintf("UPDATE %s SET version='%s', version_date='%s' WHERE id=%s", $prefix."system", $current_version, $current_version_date_display, "1"); + $updateSQL = sprintf("UPDATE %s SET version='%s', version_date='%s' WHERE id=%s", $prefix."bcoem_sys", $current_version, $current_version_date_display, "1"); mysqli_real_escape_string($connection,$updateSQL); $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection)); @@ -2724,7 +2724,7 @@ function data_integrity_check() { } // Last update the "system" table with the date/time the function ended - $updateSQL = sprintf("UPDATE %s SET data_check=%s WHERE id='1'", $prefix."system", "NOW( )"); + $updateSQL = sprintf("UPDATE %s SET data_check=%s WHERE id='1'", $prefix."bcoem_sys", "NOW( )"); mysqli_real_escape_string($connection,$updateSQL); $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection)); diff --git a/lib/preflight.lib.php b/lib/preflight.lib.php index 06f9c261..19eb0577 100644 --- a/lib/preflight.lib.php +++ b/lib/preflight.lib.php @@ -5,13 +5,24 @@ $setup_success = TRUE; $force_update = FALSE; $no_updates_needed = FALSE; -if (FORCE_UPDATE) $force_update = TRUE; $hosted_setup = FALSE; $check_setup = FALSE; +/** + * To be compatible with MySQL 8, the "system" DB + * table name needs to be changed. SYSTEM is a reserved + * word in MySQL 8 and beyond. + */ + if (check_setup($prefix."system",$database)) { + $query_sys = sprintf("RENAME TABLE %s TO %s",$prefix."system",$prefix."bcoem_sys"); + $sys = mysqli_query($connection,$query_sys) or die (mysqli_error($connection)); + $row_sys = mysqli_fetch_assoc($sys); +} + +if (check_setup($prefix."bcoem_sys",$database)) { mysqli_select_db($connection,$database); - $query_system = sprintf("SELECT * FROM %s WHERE id='1'",$prefix."system"); + $query_system = sprintf("SELECT * FROM %s WHERE id='1'",$prefix."bcoem_sys"); $system = mysqli_query($connection,$query_system) or die (mysqli_error($connection)); $row_system = mysqli_fetch_assoc($system); $check_setup = TRUE; @@ -90,6 +101,8 @@ } + if (FORCE_UPDATE) $force_update = TRUE; + if (!$setup_success) { header ($setup_relocate); exit; diff --git a/sections/brewer.sec.php b/sections/brewer.sec.php index c9d4e298..2fa7b6c5 100644 --- a/sections/brewer.sec.php +++ b/sections/brewer.sec.php @@ -50,8 +50,6 @@ if ((!empty($table_assign_judge)) || (!empty($table_assign_steward))) $table_assignment = TRUE; if ((empty($table_assign_judge)) && (empty($table_assign_steward))) $table_assignment = FALSE; - - if ($_SESSION['prefsProEdition'] == 1) { // If registered as a brewery, will not be a judge @@ -123,6 +121,22 @@ } } +$country_select = ""; +foreach ($countries as $country) { + $country_select .= "\n"; + } + $random_country = array_rand($countries); $random_country = $countries[$random_country]; @@ -358,7 +373,7 @@ function stateck() {
- +
@@ -392,7 +407,7 @@ function stateck() {
- +
@@ -506,9 +521,20 @@ function stateck() {
+
+ +
+ + +
+
+
- +
@@ -520,7 +546,7 @@ function stateck() {
- +
@@ -532,19 +558,26 @@ function stateck() {
- +
-
+
+
+ +
+
- +
@@ -555,15 +588,6 @@ function stateck() {
-
- -
- - -
-
@@ -800,7 +824,7 @@ function stateck() {

- $row_judging3['judgingDate']) echo "disabled"; ?>> diff --git a/setup.php b/setup.php index 25b9174e..5f438383 100644 --- a/setup.php +++ b/setup.php @@ -97,7 +97,7 @@ require (DB.'common.db.php'); } require (INCLUDES.'version.inc.php'); - if ((!table_exists($prefix."system")) && ($section == "step0")) include (SETUP.'install_db.setup.php'); + if ((!table_exists($prefix."bcoem_sys")) && ($section == "step0")) include (SETUP.'install_db.setup.php'); $setup_body .= $output; } @@ -176,9 +176,9 @@ if ($setup_free_access == TRUE) { - if (table_exists($prefix."system")) { + if (table_exists($prefix."bcoem_sys")) { - $query_system = sprintf("SELECT setup FROM %s", $prefix."system"); + $query_system = sprintf("SELECT setup FROM %s", $prefix."bcoem_sys"); $system = mysqli_query($connection,$query_system) or die (mysqli_error($connection)); $row_system = mysqli_fetch_assoc($system); @@ -198,7 +198,7 @@ if ($section == "step8") include (SETUP.'judging_preferences.setup.php'); } - } // end if (table_exists($prefix."system")) + } // end if (table_exists($prefix."bcoem_sys")) } diff --git a/sql/bcoem_baseline_2.3.X.sql b/sql/bcoem_baseline_2.3.X.sql index ecad1bec..85f21b33 100644 --- a/sql/bcoem_baseline_2.3.X.sql +++ b/sql/bcoem_baseline_2.3.X.sql @@ -1541,8 +1541,8 @@ INSERT INTO `baseline_style_types` (`id`, `styleTypeName`, `styleTypeOwn`, `styl -- Table structure for table `baseline_system` -- -DROP TABLE IF EXISTS `baseline_system`; -CREATE TABLE IF NOT EXISTS `baseline_system` ( +DROP TABLE IF EXISTS `baseline_bcoem_sys`; +CREATE TABLE IF NOT EXISTS `baseline_bcoem_sys` ( `id` int(11) NOT NULL AUTO_INCREMENT, `version` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `version_date` date DEFAULT NULL, @@ -1553,10 +1553,10 @@ CREATE TABLE IF NOT EXISTS `baseline_system` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- --- Dumping data for table `baseline_system` +-- Dumping data for table `baseline_bcoem_sys` -- -INSERT INTO `baseline_system` (`id`, `version`, `version_date`, `data_check`, `setup`, `setup_last_step`) VALUES +INSERT INTO `baseline_bcoem_sys` (`id`, `version`, `version_date`, `data_check`, `setup`, `setup_last_step`) VALUES (1, '2.3.2.0', '2021-10-15', '2021-10-15 00:00:01', 1, 8); -- -------------------------------------------------------- @@ -1612,5 +1612,5 @@ ALTER TABLE `baseline_sponsors` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; ALTER TABLE `baseline_staff` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; ALTER TABLE `baseline_styles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; ALTER TABLE `baseline_style_types` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -ALTER TABLE `baseline_system` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; +ALTER TABLE `baseline_bcoem_sys` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; ALTER TABLE `baseline_users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; \ No newline at end of file diff --git a/update.php b/update.php index a0c4cf4d..9dd8847e 100644 --- a/update.php +++ b/update.php @@ -20,9 +20,9 @@ if (HOSTED) check_hosted_gh(); // Get current version from DB -if (table_exists($prefix."system")) { +if (table_exists($prefix."bcoem_sys")) { - $query_system = sprintf("SELECT version FROM %s", $prefix."system"); + $query_system = sprintf("SELECT version FROM %s", $prefix."bcoem_sys"); $system = mysqli_query($connection,$query_system) or die (mysqli_error($connection)); $row_system = mysqli_fetch_assoc($system); $version = $row_system['version']; @@ -67,8 +67,8 @@ if (file_exists($filename)) { - // check to see if the "system" db table is present, if not, use the legacy hard-coded version - if (!check_setup($prefix."system",$database)) require(INCLUDES.'version.inc.php'); + // check to see if the "bcoem_sys" db table is present, if not, use the legacy hard-coded version + if (!check_setup($prefix."bcoem_sys",$database)) require(INCLUDES.'version.inc.php'); if (($action == "default") && ($version != $current_version)) $update_alerts .= "
The BCOE&M ".$current_version_display." Database Update Script must be run to update the database.
"; diff --git a/update/1.2.1.0_update.php b/update/1.2.1.0_update.php index 46f11b0b..d65afc0e 100644 --- a/update/1.2.1.0_update.php +++ b/update/1.2.1.0_update.php @@ -159,7 +159,7 @@ // Table to house system data. // ----------------------------------------------------------- -$updateSQL = "CREATE TABLE IF NOT EXISTS `".$prefix."system` ( +$updateSQL = "CREATE TABLE IF NOT EXISTS `".$prefix."bcoem_sys` ( `id` int(11) NOT NULL AUTO_INCREMENT, `version` varchar(12) DEFAULT NULL, `version_date` date DEFAULT NULL, @@ -171,7 +171,7 @@ $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection)); //$output .= $updateSQL."
"; -$updateSQL = "INSERT INTO `".$prefix."system` (`id`, `version`, `version_date`, `data_check`,`setup`) VALUES (1, '1.2.1.1', '2012-09-01', NOW( ),'1');"; +$updateSQL = "INSERT INTO `".$prefix."bcoem_sys` (`id`, `version`, `version_date`, `data_check`,`setup`) VALUES (1, '1.2.1.1', '2012-09-01', NOW( ),'1');"; mysqli_real_escape_string($connection,$updateSQL); $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection)); //$output .= $updateSQL."
"; diff --git a/update/2.1.0.0_update.php b/update/2.1.0.0_update.php index da256313..0fc64446 100644 --- a/update/2.1.0.0_update.php +++ b/update/2.1.0.0_update.php @@ -614,7 +614,7 @@ function convert_yes_no($input) { // Data Update: Update Version in System Table // ----------------------------------------------------------- -$updateSQL = sprintf("UPDATE %s SET version='%s', version_date='%s' WHERE id='1'",$prefix."system",$current_version,"2016-05-24"); +$updateSQL = sprintf("UPDATE %s SET version='%s', version_date='%s' WHERE id='1'",$prefix."bcoem_sys",$current_version,"2016-05-24"); mysqli_select_db($connection,$database); mysqli_real_escape_string($connection,$updateSQL); $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection)); diff --git a/update/2.1.5.0_update.php b/update/2.1.5.0_update.php index eb3767e5..5722d7b2 100755 --- a/update/2.1.5.0_update.php +++ b/update/2.1.5.0_update.php @@ -332,7 +332,7 @@ function MysqlError($connection) { // Data Update: Update Version in System Table // ----------------------------------------------------------- -$updateSQL = sprintf("UPDATE %s SET version='%s', version_date='%s' WHERE id='1'",$prefix."system","2.1.5.0","2016-08-31"); +$updateSQL = sprintf("UPDATE %s SET version='%s', version_date='%s' WHERE id='1'",$prefix."bcoem_sys","2.1.5.0","2016-08-31"); mysqli_select_db($connection,$database); mysqli_real_escape_string($connection,$updateSQL); $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection)); diff --git a/update/2.1.8.0_update.php b/update/2.1.8.0_update.php index 1e42a57f..107618f4 100644 --- a/update/2.1.8.0_update.php +++ b/update/2.1.8.0_update.php @@ -50,7 +50,7 @@ // Data Update: Update Version in System Table // ----------------------------------------------------------- -$updateSQL = sprintf("UPDATE %s SET version='%s', version_date='%s' WHERE id='1'",$prefix."system","2.1.8.0","2016-09-10"); +$updateSQL = sprintf("UPDATE %s SET version='%s', version_date='%s' WHERE id='1'",$prefix."bcoem_sys","2.1.8.0","2016-09-10"); mysqli_select_db($connection,$database); mysqli_real_escape_string($connection,$updateSQL); $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection)); diff --git a/update/off_schedule_update.php b/update/off_schedule_update.php index adb744ce..f0514cff 100644 --- a/update/off_schedule_update.php +++ b/update/off_schedule_update.php @@ -85,14 +85,14 @@ * ----------------------------------------------------------------------------------------------------- */ -if (!check_update("setup_last_step", $prefix."system")) { +if (!check_update("setup_last_step", $prefix."bcoem_sys")) { // Add setup_last_step column to system table - $updateSQL = sprintf("ALTER TABLE `%s` ADD `setup_last_step` INT(3) NULL DEFAULT NULL;",$prefix."system"); + $updateSQL = sprintf("ALTER TABLE `%s` ADD `setup_last_step` INT(3) NULL DEFAULT NULL;",$prefix."bcoem_sys"); mysqli_select_db($connection,$database); mysqli_real_escape_string($connection,$updateSQL); $result = mysqli_query($connection,$updateSQL); - $updateSQL = sprintf("UPDATE `%s` SET `setup_last_step` = '8';",$prefix."system"); + $updateSQL = sprintf("UPDATE `%s` SET `setup_last_step` = '8';",$prefix."bcoem_sys"); mysqli_select_db($connection,$database); mysqli_real_escape_string($connection,$updateSQL); $result = mysqli_query($connection,$updateSQL); @@ -1933,7 +1933,7 @@ * ---------------------------------------------------------------------------------------------------- */ -$updateSQL = sprintf("UPDATE %s SET version='%s', version_date='%s', data_check=%s WHERE id=1", $prefix."system", $current_version, $current_version_date_display, "NOW()"); +$updateSQL = sprintf("UPDATE %s SET version='%s', version_date='%s', data_check=%s WHERE id=1", $prefix."bcoem_sys", $current_version, $current_version_date_display, "NOW()"); mysqli_real_escape_string($connection,$updateSQL); $result = mysqli_query($connection,$updateSQL) or die (mysqli_error($connection));