Last active
March 24, 2022 07:27
-
-
Save joshymech/a944ead9200ad51b490b85c759e61856 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 | |
$g = new jqgrid($db_conf); | |
$grid_opt["caption"] = ""; | |
$grid_opt["autowidth"] = true; | |
$grid_opt["rowNum"] = 100; | |
$grid_opt["rowList"] = array(100,200,300,'All'); | |
$grid_opt["resizable"] = true; | |
$grid_opt["height"]="100%"; | |
//$grid_opt["toolbar"] = "top"; | |
$grid_opt["hidegrid"] = false; | |
$grid_opt["altRows"] = true; | |
$grid_opt["export"] = array("filename"=>"".$plmname." Report", "range"=>"filtered", "heading"=>"".$plmname." report"); | |
$grid_opt["export"]["sheetname"] = "".$plmname." report"; | |
$grid_opt["rownumbers"] = true; | |
$g->set_options($grid_opt); | |
$query= "SELECT * FROM (SELECT DISTINCT * FROM FRIGG_GITLAB_USERPERSON_TBL ORDER BY DB_DTE_LAST_SIGNIN_AT DESC) WHERE DB_STR_SYSTEM='GitLabDev' "; | |
$stid = oci_parse($connFrigg,$query); | |
oci_execute($stid, OCI_DESCRIBE_ONLY); // Use OCI_DESCRIBE_ONLY if not fetching rows | |
$cols_size = oci_num_fields($stid); | |
for ($i = 1; $i <= $cols_size; $i++) | |
{ | |
$db_col_name = oci_field_name($stid, $i); | |
$table_title = str_replace("DB_STR_","",$db_col_name); | |
$table_title = str_replace("DB_DTE_","",$table_title); | |
$table_title = str_replace("DB_INT_","",$table_title); | |
$table_title = str_replace("_"," ",$table_title); | |
$table_title = str_replace("LL","LAST LOGIN ",$table_title); | |
$col = array(); | |
if($table_title == "SYSTEM" ){ | |
$col['hidden'] = true; | |
} | |
/*if($table_title == "USERNAME" ){ | |
$scd_data = scdsearch('',$srpfirst,$srplast,'',$connFrigg); | |
$user_dept = $scd_data[0]["givenname"][0]; | |
}*/ | |
$col["title"] = $table_title; | |
$col["name"] = $db_col_name; | |
$cols[] = $col; | |
} | |
$g->set_columns($cols); | |
// $systemname is set in the include_all_grids.php | |
$g->select_command="SELECT * FROM (SELECT DISTINCT * FROM FRIGG_GITLAB_USERPERSON_TBL ORDER BY DB_DTE_LAST_SIGNIN_AT DESC) WHERE DB_STR_SYSTEM='GitLabDev' "; | |
$g->set_actions(array( | |
"add"=>false, // allow/disallow add | |
"edit"=>false, // allow/disallow edit | |
"delete"=>false, // allow/disallow delete | |
"rowactions"=>false, // show/hide row wise edit/del/save option | |
"export_excel"=>FALSE, // export excel button | |
"export_csv"=>true, // export csv button | |
"autofilter" => true, // show/hide autofilter for search | |
"showhidecolumns" => true, // show/hide autofilter for search | |
"search" => "advance" // show single/multi field search condition (e.g. simple or advance) | |
) | |
); | |
$report_gitlab_dev_list = $g->render("report_gitlab_dev_list"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment