<?php
include_once"base_connect.php";

switch ($part) {

//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "invites_list":


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

$fields=array(id_col,insertion_date,server_time,title,status,
person,address);

$excluded=array(id_col);


$button_items=array(


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


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


array(
'label'=>'Delete',
'link'=>$user_path."/del/record/",
'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'=>'Guest',
'col_field'=>person,
'width'=>'3%',
'col_encoding'=>'0',
),

array(
'col_heading'=>'Dated',
'col_field'=>address,
'width'=>'3%',
'col_encoding'=>'0',
),


);

$remote_cols=array(



);

$parameters=array(
'heading'=>'Invites List',
'prefix'=>'#',
'simple_serial'=>'1',
'table_fields'=>$fields,
'this_table'=>'invites',
'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_invite_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  ////////////////////////

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

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

?>