Created
April 6, 2018 07:10
-
-
Save BrandonDyer64/4ac09e78772b43ffa2d89e9868ed9b6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include("../../bin/do_not_change/standard_validation_regex.php"); | |
unset($field); | |
unset($index); | |
$table = "${master}_status"; | |
$thing_display = preg_replace("/_/", " ", $table); | |
$Thing_display = ucwords($thing_display); | |
$things_display = "${thing_display}s"; | |
$Things_display = ucwords($things_display); | |
$indefinite_article = "a"; | |
$default_sort_by = "sort_order"; | |
$field[] = array("name"=>"id", | |
"type"=>"INT UNSIGNED", | |
"not_null" => TRUE, | |
"auto_increment" => TRUE, | |
"display_in_table_list_column" => TRUE, | |
"display_field_in_vertical_table" => TRUE, | |
"field_is_required_in_form" => TRUE, | |
"human_display" => "ID" | |
); | |
$field[] = array("name"=>"name", | |
"type"=>"VARCHAR", | |
"size"=>150, | |
"not_null" => TRUE, | |
"display_in_table_list_column" => TRUE, | |
"display_field_in_vertical_table" => TRUE, | |
"field_is_required_in_form" => TRUE, | |
"filterable" => TRUE, | |
"filter_operator" => "LIKE", | |
"human_display" => "Name" | |
); | |
$field[] = array("name"=>"sort_order", | |
"type"=>"INT UNSIGNED", | |
"display_in_table_list_column" => TRUE, | |
"display_field_in_vertical_table" => FALSE, | |
"field_is_required_in_form" => TRUE, | |
"human_display" => "Sort Order" | |
); | |
include("../../bin/do_not_change/standard_config_files/STANDARD_TABLE_FIELDS"); | |
$index[] = array("type"=>"PRIMARY KEY", | |
"name"=>array("id") | |
); | |
$startup_sql[] = "INSERT IGNORE INTO thing (id, name, active, date_added) VALUES ('$table','$Thing_display','y',NOW())"; | |
// give admin group read/write permissions | |
$startup_sql[] = "INSERT IGNORE INTO jusergroup_thing (usergroup_id, thing_id, read_access, write_access, active, date_added) VALUES ('2','$table','all','all','y',NOW())"; | |
$startup_sql[] = "INSERT IGNORE INTO $table (name,sort_order) VALUES ('In Development',10)"; | |
$startup_sql[] = "INSERT IGNORE INTO $table (name,sort_order) VALUES ('To Be Tested',20)"; | |
$startup_sql[] = "INSERT IGNORE INTO $table (name,sort_order) VALUES ('Pass',50)"; | |
$startup_sql[] = "INSERT IGNORE INTO $table (name,sort_order) VALUES ('Fail',60)"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment