<?php
include_once"base_connect.php";

switch ($part) {

//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "entries_list":


$add_link=$user_path."/add/entry/";

$fields=array(id_col,insertion_date,server_time,title,status,
category_id,description,sub_category_id,cell,response_type);

$excluded=array(id_col);


$button_items=array(

array(
'label'=>'Fill Record',
'link'=>$user_path."/update/print/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Call',
'link'=>$user_path."/make/call/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),


array(
'label'=>'Proposal Link',
'link'=>$user_path."/view/proposal/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Add Update',
'link'=>$user_path."/add/update/",
'class'=>'btn btn-warning btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Activity Log',
'link'=>$user_path."/view/updates/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),




);

$cols=array(


array(
'col_heading'=>'Date / Time',
'col_field'=>server_time,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Title',
'col_field'=>title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Cell',
'col_field'=>cell,
'width'=>'3%',
'col_encoding'=>'0',
),



);

$remote_cols=array(
array(
'col_heading'=>'Last Response',
'col_field'=>response_type,
'col_remote_table'=>sub_table,
'col_remote_table_id'=>sub_table_id,
'col_remote_table_title'=>sub_table_title,
'width'=>'3%',
'col_encoding'=>'0',
),




);

$parameters=array(
'heading'=>'Print List',
'prefix'=>'ZaHeeN',
//'simple_serial'=>'1',
'table_fields'=>$fields,
'this_table'=>main_table,
'id_col'=>id_col,
/*'photo_on'=>'1',
'photo_col'=>photo1,
'photo_path'=>SITE_IMAGES.photo_folder_absolute_doc,
'photo_type'=>"square",
'photo_percentage'=>"100%",*/
'cols'=>$cols,
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
//'add_new_view'=>$add_link,
'add_btn_text'=>"+ Add New Entry",
'ref_val'=>routine_entry_alias
);




if(isset($id)){
if(isset($type)){

if($type==2){
$col=sub_category_id;	
}
else{
$col=category_id;	
}


	
}


$parameters['legend'] = $id; 
$parameters['where_col'] = $col; 


}

view_list_tbl($parameters);
//helloworld($id);

break;
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "quick_entries_list":


$add_link=$user_path."/add/quickentry/";

$fields=array(id_col,business_type,insertion_date,server_time,title,domain,status,
category_id,description,response_type,sub_category_id);

$excluded=array(id_col);


$button_items=array(


array(
'label'=>'Call',
'link'=>$user_path."/make/call/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),




array(
'label'=>'Proposal Link',
'link'=>$user_path."/view/proposal/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Add Update',
'link'=>$user_path."/add/update/",
'class'=>'btn btn-warning btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Activity Log',
'link'=>$user_path."/view/updates/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),


array(
'label'=>'Delete',
'link'=>$user_path."/del/entry/",
'class'=>'btn btn-danger btn-sm',
'active'=>'1',
'delete'=>'1',
'delete_type'=>'del_rec_status',
'auth'=>'5',
'target'=>'not_blank',
),



);

$cols=array(

/*
array(
'col_heading'=>'Date / Time',
'col_field'=>server_time,
'width'=>'3%',
'col_encoding'=>'0',
),
*/
array(
'col_heading'=>'Title',
'col_field'=>title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Domain',
'col_field'=>domain,
'width'=>'3%',
'col_encoding'=>'0',
),


);

$remote_cols=array(

array(
'col_heading'=>'Last Response',
'col_field'=>response_type,
'col_remote_table'=>sub_table,
'col_remote_table_id'=>sub_table_id,
'col_remote_table_title'=>sub_table_title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Industry',
'col_field'=>business_type,
'col_remote_table'=>sub_table,
'col_remote_table_id'=>sub_table_id,
'col_remote_table_title'=>sub_table_title,
'width'=>'3%',
'col_encoding'=>'0',
),

);

$parameters=array(
'heading'=>'Quick Entries List',
'prefix'=>'#',
'simple_serial'=>'1',
'table_fields'=>$fields,
'this_table'=>main_table,
'id_col'=>id_col,
/*'photo_on'=>'1',
'photo_col'=>photo1,
'photo_path'=>SITE_IMAGES.photo_folder_absolute_doc,
'photo_type'=>"square",
'photo_percentage'=>"100%",*/
'cols'=>$cols,
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
'add_new_view'=>$add_link,
'add_btn_text'=>"+ Add New Quick Entry",
'ref_val'=>routine_quick_entry_alias
);




if(isset($id)){
$col='posted_by';	



$parameters['legend'] = $id; 
$parameters['where_col'] = $col; 


}

view_list_tbl($parameters);
//helloworld($id);

break;
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "pdf_list":


$add_link=$user_path."/add/quickentry/";

$fields=array(id_col,business_type,insertion_date,server_time,title,domain,status,
category_id,description,response_type,sub_category_id);

$excluded=array(id_col);


$button_items=array(

array(
'label'=>'Fill Record',
'link'=>$user_path."/update/record/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),



/*
array(
'label'=>'Proposal Link',
'link'=>$user_path."/view/proposal/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),
*/

);

$cols=array(

/*
array(
'col_heading'=>'Date / Time',
'col_field'=>server_time,
'width'=>'3%',
'col_encoding'=>'0',
),
*/
array(
'col_heading'=>'Title',
'col_field'=>title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Domain',
'col_field'=>domain,
'width'=>'3%',
'col_encoding'=>'0',
),


);

$remote_cols=array(

);

$parameters=array(
'heading'=>'PDF List',
'prefix'=>'#',
'simple_serial'=>'1',
'table_fields'=>$fields,
'this_table'=>main_table,
'id_col'=>id_col,
/*'photo_on'=>'1',
'photo_col'=>photo1,
'photo_path'=>SITE_IMAGES.photo_folder_absolute_doc,
'photo_type'=>"square",
'photo_percentage'=>"100%",*/
'cols'=>$cols,
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
'add_new_view'=>$add_link,
'add_btn_text'=>"+ Add New Quick Entry",
'ref_val'=>routine_quick_entry_alias
);




if(isset($id)){
$col='posted_by';	



$parameters['legend'] = $id; 
$parameters['where_col'] = $col; 


}

view_list_tbl($parameters);
//helloworld($id);

break;
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_

//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "prohost_proposal_list":


//$add_link=$user_path."/add/quickentry/";

$fields=array(id_col,business_type,insertion_date,server_time,title,domain,status,
category_id,description,response_type,sub_category_id);

$excluded=array(id_col);


$button_items=array(

array(
'label'=>'Fill Record',
'link'=>$user_path."/update/record/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),


array(
'label'=>'PDF Proposal',
'link'=>$user_path."/eprint/i2dprohost/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'blank',
),


/*
array(
'label'=>'Proposal Link',
'link'=>$user_path."/view/proposal/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),
*/

);

$cols=array(

/*
array(
'col_heading'=>'Date / Time',
'col_field'=>server_time,
'width'=>'3%',
'col_encoding'=>'0',
),
*/
array(
'col_heading'=>'Title',
'col_field'=>title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Domain',
'col_field'=>domain,
'width'=>'3%',
'col_encoding'=>'0',
),


);

$remote_cols=array(

);

$parameters=array(
'heading'=>'PDF List',
'prefix'=>'#',
'simple_serial'=>'1',
'table_fields'=>$fields,
'this_table'=>main_table,
'id_col'=>id_col,
/*'photo_on'=>'1',
'photo_col'=>photo1,
'photo_path'=>SITE_IMAGES.photo_folder_absolute_doc,
'photo_type'=>"square",
'photo_percentage'=>"100%",*/
'cols'=>$cols,
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
//'add_new_view'=>$add_link,
//'add_btn_text'=>"+ Add New Quick Entry",
'ref_val'=>routine_entry_alias
);




if(isset($id)){
$col='posted_by';	



$parameters['legend'] = $id; 
$parameters['where_col'] = $col; 


}

view_list_tbl($parameters);
//helloworld($id);

break;
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "quick_entries_edit":


//$add_link=$user_path."/add/quickentry/";

$fields=array(id_col,business_type,insertion_date,server_time,title,domain,status,
category_id,description,response_type,sub_category_id);

$excluded=array(id_col);


$button_items=array(


array(
'label'=>'Edit',
'link'=>$user_path."/edit/quickentry/",
'class'=>'btn btn-warning btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),


array(
'label'=>'Delete',
'link'=>$user_path."/del/entry/",
'class'=>'btn btn-danger btn-sm',
'active'=>'1',
'delete'=>'1',
'delete_type'=>'del_rec_status',
'auth'=>'5',
'target'=>'not_blank',
),



);

$cols=array(

/*
array(
'col_heading'=>'Date / Time',
'col_field'=>server_time,
'width'=>'3%',
'col_encoding'=>'0',
),
*/
array(
'col_heading'=>'Title',
'col_field'=>title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Domain',
'col_field'=>domain,
'width'=>'3%',
'col_encoding'=>'0',
),


);

$remote_cols=array(

);

$parameters=array(
'heading'=>'Quick Entries List',
'prefix'=>'#',
'simple_serial'=>'1',
'table_fields'=>$fields,
'this_table'=>main_table,
'id_col'=>id_col,
/*'photo_on'=>'1',
'photo_col'=>photo1,
'photo_path'=>SITE_IMAGES.photo_folder_absolute_doc,
'photo_type'=>"square",
'photo_percentage'=>"100%",*/
'cols'=>$cols,
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
//'add_new_view'=>$add_link,
'add_btn_text'=>"+ Add New Quick Entry",
'ref_val'=>routine_quick_entry_alias
);




if(isset($id)){
$col='posted_by';	



$parameters['legend'] = $id; 
$parameters['where_col'] = $col; 


}

view_list_tbl($parameters);
//helloworld($id);

break;
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "response_list":
    
    
$rt=db_ref(sub_table,sub_table_id,$id,sub_table_title);    


$add_link=$user_path."/add/entry/";

$fields=array(id_col,insertion_date,server_time,cell,title,status,
category_id,description,sub_category_id,response_type);

$excluded=array(id_col);


$button_items=array(


array(
'label'=>'View',
'link'=>$user_path."/view/record/",
'class'=>'btn btn-warning btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Call',
'link'=>$user_path."/record/call/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),


array(
'label'=>'History',
'link'=>$user_path."/record/updates/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),




);

$cols=array(


array(
'col_heading'=>'Title',
'col_field'=>title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Cell',
'col_field'=>cell,
'width'=>'3%',
'col_encoding'=>'0',
),


);

$remote_cols=array(

array(
'col_heading'=>'Last Response',
'col_field'=>response_type,
'col_remote_table'=>sub_table,
'col_remote_table_id'=>sub_table_id,
'col_remote_table_title'=>sub_table_title,
'width'=>'3%',
'col_encoding'=>'0',
),




);

$parameters=array(
'heading'=>$rt,
'prefix'=>'#',
'simple_serial'=>'1',
'table_fields'=>$fields,
'this_table'=>main_table,
//'echo_sql'=>'1',
'id_col'=>id_col,
/*'photo_on'=>'1',
'photo_col'=>photo1,
'photo_path'=>SITE_IMAGES.photo_folder_absolute_doc,
'photo_type'=>"square",
'photo_percentage'=>"100%",*/
'cols'=>$cols,
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
//'add_new_view'=>$add_link,
//'add_btn_text'=>"+ Add New Entry",
'ref_val'=>routine_all_alias
);




if(isset($id)){
if(isset($type)){

if($type==2){
$col=response_type;	
}
else{
$col=category_id;	
}


	
}


$parameters['legend'] = $id; 
$parameters['where_col'] = $col; 


}

view_list_tbl($parameters);
//helloworld($id);

break;
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "feedback_list":


$add_link=$user_path."/add/category/";

$fields=array(sub_table_id,insertion_date,server_time,sub_table_title,sub_table_status,
ref,sub_table_parent_id);

$excluded=array(sub_table_id);


$button_items=array(

array(
'label'=>'View Entries',
'link'=>$user_path."/list/response/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),
/*
array(
'label'=>'Rename',
'link'=>$user_path."/edit/category/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Delete',
'link'=>$user_path."/del/entry/",
'class'=>'btn btn-danger btn-sm',
'active'=>'1',
'delete'=>'1',
'delete_type'=>'del_rec_with_image',
'auth'=>'5',
'target'=>'not_blank',
),



*/
);

$cols=array(



array(
'col_heading'=>'Feedback Type',
'col_field'=>sub_table_title,
'width'=>'50%',
'col_encoding'=>'0',
),


);

$remote_cols=array(
);

$parameters=array(
'heading'=>'Feedback Types',
'prefix'=>'#',
'table_fields'=>$fields,
'this_table'=>sub_table,
'id_col'=>id_col,
'cols'=>$cols,
//'echo_sql'=>'1',
'simple_serial'=>'1',
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
//'count_table'=>main_table,
//'count_col'=>response_type,
//'add_new_view'=>$add_link,
//'add_btn_text'=>"+ Add New Category",
'ref_val'=>routine_response_alias
);




if(isset($id)){
$parameters['legend'] = $id; 
$parameters['where_col'] = sub_table_parent_id; 
}

view_list_tbl($parameters);

break;
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "industries_list":


$add_link=$user_path."/add/category/";

$fields=array(sub_table_id,insertion_date,server_time,sub_table_title,sub_table_status,
ref,sub_table_parent_id);

$excluded=array(sub_table_id);


$button_items=array(
/*
array(
'label'=>'View Entries',
'link'=>$user_path."/list/entries/1/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Rename',
'link'=>$user_path."/edit/category/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Delete',
'link'=>$user_path."/del/entry/",
'class'=>'btn btn-danger btn-sm',
'active'=>'1',
'delete'=>'1',
'delete_type'=>'del_rec_with_image',
'auth'=>'5',
'target'=>'not_blank',
),



*/
);

$cols=array(



array(
'col_heading'=>'Industry',
'col_field'=>sub_table_title,
'width'=>'100%',
'col_encoding'=>'0',
),


);

$remote_cols=array(
);

$parameters=array(
'heading'=>'Industries List',
'prefix'=>'#',
'table_fields'=>$fields,
'this_table'=>sub_table,
'id_col'=>id_col,
'cols'=>$cols,
'simple_serial'=>'1',
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
//'add_new_view'=>$add_link,
//'add_btn_text'=>"+ Add New Category",
'ref_val'=>routine_industry_alias
);




if(isset($id)){
$parameters['legend'] = $id; 
$parameters['where_col'] = sub_table_parent_id; 
}

view_list_tbl($parameters);

break;
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "sub_categories_list":


$add_link=$user_path."/add/subcategory/";

$fields=array(sub_table_id,insertion_date,server_time,sub_table_title,sub_table_status,
ref,sub_table_parent_id);

$excluded=array(sub_table_id);


$button_items=array(

array(
'label'=>'View Entries',
'link'=>$user_path."/list/entries/2/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Rename',
'link'=>$user_path."/edit/subcategory/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Delete',
'link'=>$user_path."/del/entry/",
'class'=>'btn btn-danger btn-sm',
'active'=>'1',
'delete'=>'1',
'delete_type'=>'del_rec_with_image',
'auth'=>'5',
'target'=>'not_blank',
),




);

$cols=array(


array(
'col_heading'=>'Date / Time',
'col_field'=>server_time,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Sub-Category',
'col_field'=>sub_table_title,
'width'=>'100%',
'col_encoding'=>'0',
),


);

$remote_cols=array(

);

$parameters=array(
'heading'=>'Sub-Categories List',
'prefix'=>'#',
'table_fields'=>$fields,
'this_table'=>sub_table,
'id_col'=>id_col,
'simple_serial'=>'1',
'cols'=>$cols,
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
'add_new_view'=>$add_link,
'add_btn_text'=>"+ Add New Category",
'ref_val'=>routine_sub_category_alias
);




if(isset($id)){
$parameters['legend'] = $id; 
$parameters['where_col'] = sub_table_parent_id; 
}

view_list_tbl($parameters);

break;
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "i2d_blue_list":


//$add_link=$user_path."/add/quickentry/";

$fields=array(id_col,business_type,insertion_date,server_time,title,domain,status,
category_id,description,response_type,sub_category_id);

$excluded=array(id_col);


$button_items=array(




array(
'label'=>'i2d Blue Link',
'link'=>$user_path."/view/i2dblue/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Add Update',
'link'=>$user_path."/add/update/",
'class'=>'btn btn-warning btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Activity Log',
'link'=>$user_path."/view/updates/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),




);

$cols=array(

/*
array(
'col_heading'=>'Date / Time',
'col_field'=>server_time,
'width'=>'3%',
'col_encoding'=>'0',
),
*/
array(
'col_heading'=>'Title',
'col_field'=>title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Domain',
'col_field'=>domain,
'width'=>'3%',
'col_encoding'=>'0',
),


);

$remote_cols=array(

array(
'col_heading'=>'Last Response',
'col_field'=>response_type,
'col_remote_table'=>sub_table,
'col_remote_table_id'=>sub_table_id,
'col_remote_table_title'=>sub_table_title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Industry',
'col_field'=>business_type,
'col_remote_table'=>sub_table,
'col_remote_table_id'=>sub_table_id,
'col_remote_table_title'=>sub_table_title,
'width'=>'3%',
'col_encoding'=>'0',
),

);

$parameters=array(
'heading'=>'i2d Blue List',
'prefix'=>'#',
'simple_serial'=>'1',
'table_fields'=>$fields,
'this_table'=>main_table,
'id_col'=>id_col,
/*'photo_on'=>'1',
'photo_col'=>photo1,
'photo_path'=>SITE_IMAGES.photo_folder_absolute_doc,
'photo_type'=>"square",
'photo_percentage'=>"100%",*/
'cols'=>$cols,
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
'add_new_view'=>$add_link,
'add_btn_text'=>"+ Add New Quick Entry",
'ref_val'=>routine_quick_entry_alias
);




if(isset($id)){
$col='posted_by';	



$parameters['legend'] = $id; 
$parameters['where_col'] = $col; 


}

view_list_tbl($parameters);
//helloworld($id);

break;
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "i2d_smartshop_list":


//$add_link=$user_path."/add/quickentry/";

$fields=array(id_col,business_type,insertion_date,server_time,title,domain,status,
category_id,description,response_type,sub_category_id);

$excluded=array(id_col);


$button_items=array(




array(
'label'=>'i2d Smartshop Link',
'link'=>$user_path."/view/i2dblue/",
'class'=>'btn btn-primary btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Add Update',
'link'=>$user_path."/add/update/",
'class'=>'btn btn-warning btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),

array(
'label'=>'Activity Log',
'link'=>$user_path."/view/updates/",
'class'=>'btn btn-success btn-sm',
'active'=>'1',
'auth'=>'5',
'target'=>'not_blank',
),




);

$cols=array(

/*
array(
'col_heading'=>'Date / Time',
'col_field'=>server_time,
'width'=>'3%',
'col_encoding'=>'0',
),
*/
array(
'col_heading'=>'Title',
'col_field'=>title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Domain',
'col_field'=>domain,
'width'=>'3%',
'col_encoding'=>'0',
),


);

$remote_cols=array(

array(
'col_heading'=>'Last Response',
'col_field'=>response_type,
'col_remote_table'=>sub_table,
'col_remote_table_id'=>sub_table_id,
'col_remote_table_title'=>sub_table_title,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Industry',
'col_field'=>business_type,
'col_remote_table'=>sub_table,
'col_remote_table_id'=>sub_table_id,
'col_remote_table_title'=>sub_table_title,
'width'=>'3%',
'col_encoding'=>'0',
),

);

$parameters=array(
'heading'=>'i2d Blue List',
'prefix'=>'#',
'simple_serial'=>'1',
'table_fields'=>$fields,
'this_table'=>main_table,
'id_col'=>id_col,
/*'photo_on'=>'1',
'photo_col'=>photo1,
'photo_path'=>SITE_IMAGES.photo_folder_absolute_doc,
'photo_type'=>"square",
'photo_percentage'=>"100%",*/
'cols'=>$cols,
'remote_cols'=>$remote_cols,
'buttons'=>$button_items,
'add_new_view'=>$add_link,
'add_btn_text'=>"+ Add New Quick Entry",
'ref_val'=>routine_quick_entry_alias
);




if(isset($id)){
$col='posted_by';	



$parameters['legend'] = $id; 
$parameters['where_col'] = $col; 


}

view_list_tbl($parameters);
//helloworld($id);

break;
/////////////////////////// CASE ENDS  ////////////////////////
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_

default;
app_error("404!","Lists");
}

/////////////////////////////////////////////////////////////////////////////
include_once"../includes/app_bottom.php";

?>