<?php

include_once"base_connect.php";

switch ($part) {
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "add_quick_entry":

if(isset($type) && $type=="edit"){
$edit="1";
$lead_id=$id;
}
else{
$edit="0";
$lead_id="0";
}

$dropdowns=array(

'drops3'=>array(
'label'=>'Business Category',
'table'=>sub_table,
'table_title'=>sub_table_title,
'table_id_col'=>sub_table_id,
'this_table_field'=>business_type,
'ref'=>'industry_type',
'remote_tbl_title_col'=>sub_table_title,
'add_new'=>'1',
'other_id_col'=>'0',
'encoding'=>'0'),


);



$dropdowns2=array(
);

$mask1="'mask': '(999)-(9999999)'";
$mask2="'alias': 'numeric','digits': 2,'digitsOptional': false, 'placeholder': '0'";

$textfields=array(

array(
'label'=>'Company Name',
'fname'=>title,
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
'hint'=>'Business Name',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Domain Name / dotcom',
'fname'=>domain,
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
'addon'=>'www.',
'placeholder'=>'Please Avoid Lengthy Domain Names (over 12 characters)',
'hint'=>'Note : Please Check Domain First',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Contact Person / Owner Name (optional)',
'fname'=>person,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'hint'=>'Business Name',
'masking'=>'off',
'required'=>'0'),

array(
'label'=>'Cell Number',
'fname'=>cell,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'hint'=>'345-8500096',
//'placeholder'=>'345-8500096',
'masking'=>$mask1,
'required'=>'1'),

array(
'label'=>'2nd Contact Person (optional)',
'fname'=>'contact2',
'class'=>'col-md-4',
'encoding'=>'0',
'format'=>'words',
'masking'=>'off',
'required'=>'0'),

array(
'label'=>'Position / Grade',
'fname'=>'position2',
'class'=>'col-md-4',
'encoding'=>'0',
'format'=>'words',
'hint'=>'Partner / Investor etc.',
//'placeholder'=>'345-8500096',
'masking'=>'off',
'required'=>'0'),

array(
'label'=>'Cell Number',
'fname'=>'number2',
'class'=>'col-md-4',
'encoding'=>'0',
'format'=>'words',
'hint'=>'345-8500096',
//'placeholder'=>'345-8500096',
'masking'=>$mask1,
'required'=>'1'),

array(
'label'=>'Staff Person (optional)',
'fname'=>'contact3',
'class'=>'col-md-4',
'encoding'=>'0',
'format'=>'words',
'masking'=>'off',
'required'=>'0'),

array(
'label'=>'Position / Grade',
'fname'=>'position3',
'class'=>'col-md-4',
'encoding'=>'0',
'format'=>'words',
'hint'=>'Partner / Investor etc.',
//'placeholder'=>'345-8500096',
'masking'=>'off',
'required'=>'0'),

array(
'label'=>'Cell Number',
'fname'=>'number3',
'class'=>'col-md-4',
'encoding'=>'0',
'format'=>'words',
'hint'=>'345-8500096',
//'placeholder'=>'345-8500096',
'masking'=>$mask1,
'required'=>'1'),


array(
'label'=>'Address',
'encoding'=>'0',
'class'=>'col-md-12',
'required'=>'1',
//'addon'=>'www.',
//'hint'=>'addon exmaple',
'fname'=>address,
//'placeholder'=>'i2dtechnolooges.com',
'masking'=>'off'
),

array(
'label'=>'Landlines (Optional)',
'encoding'=>'0',
'class'=>'col-md-6',
'required'=>'0',
//'addon'=>'www.',
//'hint'=>'addon exmaple',
'fname'=>landlines,
//'placeholder'=>'i2dtechnolooges.com',
'masking'=>'off'
),

array(
'label'=>'Facebook Link',
'encoding'=>'0',
'class'=>'col-md-6',
'required'=>'0',
'addon'=>'fb.com/',
//'hint'=>'addon exmaple',
'fname'=>facebook,
//'placeholder'=>'i2dtechnolooges.com',
'masking'=>'off'
),

array(
'label'=>'Website (if Available)',
'encoding'=>'1',
'class'=>'col-md-12',
'required'=>'0',
'addon'=>'www.',
//'hint'=>'addon exmaple',
'fname'=>website,
//'placeholder'=>'i2dtechnolooges.com',
'masking'=>'off'
),



array(
'label'=>'.PK Domain (if applicable)',
'fname'=>'pk',
'class'=>'col-md-12',
'addon'=>'www.',
//'json'=>'1',
//'json_id'=>'url_id',
//'json_matching_col'=>'col1',
'encoding'=>'0',
'format'=>'words',
'masking'=>'off',
//'hint'=>'e.g Sample Entry 1	',
'required'=>'0'),



);


$integerfields=array(
);


$wysiwygfields=array(

);

$wysiwygfields_choice=array(


);



$checkboxfields=array(
);


$timepickfields=array(
);

$directfields=array(
array(
'fname'=>'posted_by',
'value'=>$user_id
)

);


$update_settings=array(
'update_flag'=>"Lead Edited",
'update_ref'=>"ims_update",
'update_email'=>0
);



$edit=array(
'edit'=>$edit,
'lead_id'=>$lead_id,
'e_ref'=>routine_quick_entry_alias,
'table'=>main_table
);


$values=array(
'texts'=>$textfields,
'integers'=>$integerfields,
'dropdowns'=>$dropdowns,
'dropdowns2'=>$dropdowns2,
'checkboxes'=>$checkboxfields,
'timepicks'=>$timepickfields,
'wysiwygs'=>$wysiwygfields,
'wysiwygs_choice'=>$wysiwygfields_choice,
'directfields'=>$directfields,
'update_settings'=>$update_settings,
'datedfield'=>dated,
'dated_table'=>main_table,
'prefix'=>'APP-',
'redirect'=>"/list/quickentries/6",
'form_table'=>main_table,
'form_heading'=>"Entry",
'alias'=>"quick_lead_entry"
);

make_form($values,1,$edit);
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "update_record":

if(isset($type) && $type=="edit"){
$edit="1";
$lead_id=$id;
}
else{
$edit="0";
$lead_id="0";
}

$dropdowns=array(

'drops3'=>array(
'label'=>'Business Category',
'table'=>sub_table,
'table_title'=>sub_table_title,
'table_id_col'=>sub_table_id,
'this_table_field'=>category_id,
'ref'=>'industry_type',
'remote_tbl_title_col'=>sub_table_title,
'add_new'=>'1',
'other_id_col'=>'0',
'encoding'=>'0'),


);

$dropdowns2=array(


);

$mask1="'mask': '(999)-(9999999)'";
$mask2="'alias': 'numeric','digits': 2,'digitsOptional': false, 'placeholder': '0'";

$textfields=array(

array(
'label'=>'Title',
'fname'=>title,
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
//'hint'=>'Your Title Goes Here.',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Title',
'fname'=>domain,
'class'=>'col-md-12',
'encoding'=>'0',
'addon'=>'www.',
'format'=>'words',
//'hint'=>'Your Title Goes Here.',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Contact Person / Owner Name',
'fname'=>person,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
//'hint'=>'Business Name',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Cell Number',
'fname'=>cell,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'hint'=>'345-8500096',
//'placeholder'=>'345-8500096',
'masking'=>$mask1,
'required'=>'1'),

array(
'label'=>'Address',
'encoding'=>'0',
'class'=>'col-md-12',
'required'=>'1',
//'addon'=>'www.',
//'hint'=>'addon exmaple',
'fname'=>address,
//'placeholder'=>'i2dtechnolooges.com',
'masking'=>'off'
),

array(
'label'=>'Landlines (Optional)',
'encoding'=>'0',
'class'=>'col-md-6',
'required'=>'0',
//'addon'=>'www.',
//'hint'=>'addon exmaple',
'fname'=>landlines,
//'placeholder'=>'i2dtechnolooges.com',
'masking'=>'off'
),

array(
'label'=>'Facebook Link',
'encoding'=>'0',
'class'=>'col-md-6',
'required'=>'0',
'addon'=>'fb.com/',
//'hint'=>'addon exmaple',
'fname'=>facebook,
//'placeholder'=>'i2dtechnolooges.com',
'masking'=>'off'
),

array(
'label'=>'Email Address (optional)',
'encoding'=>'0',
'class'=>'col-md-6',
'required'=>'0',
//'addon'=>'fb.com/',
//'hint'=>'addon exmaple',
'fname'=>email,
//'placeholder'=>'i2dtechnolooges.com',
'masking'=>'off'
),

array(
'label'=>'Website (if Available)',
'encoding'=>'1',
'class'=>'col-md-6',
'required'=>'0',
'addon'=>'www.',
//'hint'=>'addon exmaple',
'fname'=>website,
//'placeholder'=>'i2dtechnolooges.com',
'masking'=>'off'
),

/*
array(
'label'=>'Live URL',
'fname'=>'col1',
'class'=>'col-md-6',
'json'=>'1',
'json_id'=>'url_id',
'json_matching_col'=>'col1',
'encoding'=>'0',
'format'=>'words',
'masking'=>'off',
'hint'=>'e.g Sample Entry 1	',
'required'=>'0'),
*/


);


$integerfields=array(
);


$wysiwygfields=array(
array(
'label'=>'Comments / Details',
'fname'=>description,
'height'=>'112',
'required'=>'0')

);

$wysiwygfields_choice=array(


);



$checkboxfields=array(
);


$timepickfields=array(
);

$directfields=array(

array(
'fname'=>ref,
'value'=>'lead_entry',
)

);


$update_settings=array(
'update_flag'=>"Lead Updated",
'update_ref'=>"ims_update",
'update_email'=>0
);


if($legend=="1"){
$e_ref=routine_quick_entry_alias;
$alias_ref="quick_lead_entry";	
}
else{
$e_ref=routine_entry_alias;
$alias_ref="lead_entry";		
}


$edit=array(
'edit'=>$edit,
'lead_id'=>$lead_id,
'e_ref'=>$e_ref,
'table'=>main_table
);


$values=array(
'texts'=>$textfields,
'integers'=>$integerfields,
'dropdowns'=>$dropdowns,
'dropdowns2'=>$dropdowns2,
'checkboxes'=>$checkboxfields,
'timepicks'=>$timepickfields,
'wysiwygs'=>$wysiwygfields,
'wysiwygs_choice'=>$wysiwygfields_choice,
'directfields'=>$directfields,
'update_settings'=>$update_settings,
'datedfield'=>dated,
'dated_table'=>main_table,
'prefix'=>'APP-',
'redirect'=>"/list/quickentries/".$user_id,
'form_table'=>main_table,
'form_heading'=>"Entry",
'alias'=>$alias_ref
);

make_form($values,1,$edit);
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "add_update":



$dropdowns=array(

'drops4'=>array(
'label'=>'Status',
'table'=>sub_table,
'table_title'=>sub_table_title,
'table_id_col'=>sub_table_id,
'this_table_field'=>updates_table_type_col,
'ref'=>'response_type',
'remote_tbl_title_col'=>sub_table_title,
'add_new'=>'0',
'other_id_col'=>'0',
'encoding'=>'0')
);

$textfields=array(


);


$wysiwygfields=array(
array(
'label'=>'Update Description',
'fname'=>updates_table_detail_col,
'required'=>'1'));

/////////////////////////////////////////////////////
$dated1 = date('d-m-Y H:i:s');
$dated=date( "d-m-Y H:i:s", strtotime( $dated1 )+5*60*60 );

if(isset($_SESSION['user']) && !empty($_SESSION['user'])){
$user=$_SESSION['user'];
}
else{
$user="system";	
}	
/////////////////////////////////////////////////////
////////////////////////////////////////////////////

$directfields=array(

array(
'fname'=>updates_table_lead_col,
'value'=>$id),
array(
'fname'=>updates_table_status_col,
'value'=>"Active"),
array(
'fname'=>updates_table_ref_col,
'value'=>"ims_update"),
array(
'fname'=>updates_table_posted_by_col,
'value'=>$user),
array(
'fname'=>updates_table_date_time_col,
'value'=>$dated)
);

$values=array(
'texts'=>$textfields,
'dropdowns'=>$dropdowns,
'wysiwygs'=>$wysiwygfields,
'directfields'=>$directfields,
'redirect'=>"/list/quickentries/".$user_id,
'form_table'=>updates_table,
'form_heading'=>"Update Lead",
'alias'=>"ims_update"
);
make_update($values,1,$id);
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//////////////////////// CASE STARTS  ////////////////////////
case "view_lead":

if($legend=="1"){
$e_ref=routine_quick_entry_alias;
$alias_ref="quick_lead_entry";	
}
else{
$e_ref=routine_entry_alias;
$alias_ref="lead_entry";		
}




$settings=array
(
'table'=>main_table,
'child_table'=>sub_table,
'child_table_id_col'=>sub_table_id,
'child_table_title'=>sub_table_title,
'id_col'=>id_col,
'heading'=>'View Details',
'ref'=>$e_ref);
$arraycols=array(

'labels'=>array(
'Name',
'Department',


),

'fields'=>array(
title,
cell,
)
);


$remote_arraycols=array(

'labels'=>array(
'Industry',


),

'fields'=>array(
business_type,
)
);


$links_array=array(

'labels'=>array(
'address','email'),

'urls'=>array(
"/ty/".$id,title)
);

$parameters=array(
'heading'=>'View Record',
'settings'=>$settings,
'fields'=>$arraycols,
'remote_cols'=>$remote_arraycols,
//'links'=>$links_array,
'btn_id'=>'sum_val',
'id'=>$id,
);



//$parameters['legend'] = $id; 


view_record_adv_with_updates_v2($parameters);

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

$settings=array
(
'table'=>main_table,
'child_table'=>main_table,
'child_table_id_col'=>id_col,
'child_table_title'=>title,
'id_col'=>id_col,
'heading'=>'View Details',
'ref'=>routine_all_alias);
$arraycols=array(

'labels'=>array(
'Registration Date',
'Domain',
'Company',
'1st Owner Name',
'1st Whatsapp Number',
'2nd Owner Name',
'2nd Whatsapp Number',
'Staff Name',
'Staff Whatsapp Number',


),

'fields'=>array(
server_time,
domain,
company,
person,
cell,
'contact2',
'number2',
'contact3',
'number3',
)
);


$random=random(4,$id);
$url=make_url($id);

$path=OFFER_PATH."/offers/proposal/".$random."/".$url."/";

$url_fields=array(
'dir'=>$path
);




$parameters=array(
'heading'=>'Proposal Details',
'settings'=>$settings,
'fields'=>$arraycols,
'url_fields'=>$url_fields,
'btn_id'=>'sum_val',
'id'=>$id,
);



//$parameters['legend'] = $id; 


view_details_i2d($parameters);

break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_

//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "add_sub_category":

if(isset($type) && $type=="edit"){
$edit="1";
$lead_id=$id;
}
else{
$edit="0";
$lead_id="0";
}


$dropdowns=array(

'drops3'=>array(
'label'=>'Choose Category',
'table'=>sub_table,
'table_title'=>sub_table_title,
'table_id_col'=>sub_table_id,
'this_table_field'=>'sec_id',
'ref'=>'category',
'remote_tbl_title_col'=>sub_table_title,
'add_new'=>'0',
'other_id_col'=>'0',
'encoding'=>'0'),


);





$dropdowns2=array(



);

$mask1="'mask': '(999)-(9999999)'";
$mask2="'alias': 'numeric','digits': 2,'digitsOptional': false, 'placeholder': '0'";

$textfields=array(

array(
'label'=>'Sub Category Name',
'fname'=>'title',
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
'masking'=>'off',
'required'=>'1'),


);


$integerfields=array(
);


$wysiwygfields=array(

);

$wysiwygfields_choice=array(


);



$checkboxfields=array(
);


$timepickfields=array(
);

$directfields=array(


);


$update_settings=array(
'update_flag'=>"Item Edited",
'update_ref'=>"shop_update",
'update_email'=>0
);


$edit=array(
'edit'=>$edit,
'lead_id'=>$lead_id,
'e_ref'=>routine_sub_category_alias,
'table'=>sub_table
);

$values=array(
'texts'=>$textfields,
'integers'=>$integerfields,
'dropdowns'=>$dropdowns,
'dropdowns2'=>$dropdowns2,
'checkboxes'=>$checkboxfields,
'timepicks'=>$timepickfields,
'wysiwygs'=>$wysiwygfields,
'wysiwygs_choice'=>$wysiwygfields_choice,
'directfields'=>$directfields,
'update_settings'=>$update_settings,
'datedfield'=>dated,
'dated_table'=>main_table,
'prefix'=>'APP-',
'redirect'=>"/list/subcategories/",
'form_table'=>sub_table,
'form_heading'=>"Sub Category",
'alias'=>"sub_category"
);

make_form($values,1,$edit);
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "add_category":

if(isset($type) && $type=="edit"){
$edit="1";
$lead_id=$id;
}
else{
$edit="0";
$lead_id="0";
}


$dropdowns=array(


);





$dropdowns2=array(



);

$mask1="'mask': '(999)-(9999999)'";
$mask2="'alias': 'numeric','digits': 2,'digitsOptional': false, 'placeholder': '0'";

$textfields=array(

array(
'label'=>'Category Name',
'fname'=>'title',
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
'masking'=>'off',
'required'=>'1'),


);


$integerfields=array(
);


$wysiwygfields=array(

);

$wysiwygfields_choice=array(


);



$checkboxfields=array(
);


$timepickfields=array(
);

$directfields=array(


);


$update_settings=array(
'update_flag'=>"Item Edited",
'update_ref'=>"shop_update",
'update_email'=>0
);


$edit=array(
'edit'=>$edit,
'lead_id'=>$lead_id,
'e_ref'=>routine_category_alias,
'table'=>sub_table
);

$values=array(
'texts'=>$textfields,
'integers'=>$integerfields,
'dropdowns'=>$dropdowns,
'dropdowns2'=>$dropdowns2,
'checkboxes'=>$checkboxfields,
'timepicks'=>$timepickfields,
'wysiwygs'=>$wysiwygfields,
'wysiwygs_choice'=>$wysiwygfields_choice,
'directfields'=>$directfields,
'update_settings'=>$update_settings,
'datedfield'=>dated,
'dated_table'=>main_table,
'prefix'=>'APP-',
'redirect'=>"/list/categories/",
'form_table'=>sub_table,
'form_heading'=>"Category",
'alias'=>"category"
);

make_form($values,1,$edit);
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "view_record":

$settings=array
(
'table'=>main_table,
'child_table'=>sub_table,
'child_table_id_col'=>sub_table_id,
'child_table_title'=>sub_table_title,
'id_col'=>id_col,
'heading'=>'View Details',
'ref'=>routine_entry_alias);
$arraycols=array(

'labels'=>array(
'Business Name',
'Cell',
'Owner Name',
'Available Domain',
'Address',
'email',
'Facebook',
'Website',


),

'fields'=>array(
title,
cell,
person,
domain,
address,
email,
facebook,
website,
)
);


$remote_arraycols=array(

'labels'=>array(
'Industry',


),

'fields'=>array(
business_type,
)
);


$links_array=array(

'labels'=>array(
'address','email'),

'urls'=>array(
"/ty/".$id,title)
);

$parameters=array(
'heading'=>'View Details',
'settings'=>$settings,
'fields'=>$arraycols,
'remote_cols'=>$remote_arraycols,
//'links'=>$links_array,
'btn_id'=>'sum_val',
'id'=>$id,
);



//$parameters['legend'] = $id; 


view_details_v2($parameters);




break;

case "make_call":


if($legend=="1"){
$url="/list/quickentries/";	
}
else{
$url="/list/entries/";		
}

make_call($id,$url);


break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "view_i2d_blue_proposal":

$settings=array
(
'table'=>main_table,
'child_table'=>main_table,
'child_table_id_col'=>id_col,
'child_table_title'=>title,
'id_col'=>id_col,
'heading'=>'View Details',
'ref'=>routine_all_alias);
$arraycols=array(

'labels'=>array(
'Registration Date',
'Domain',
'Company',
'Whatsapp Number',


),

'fields'=>array(
server_time,
domain,
company,
cell,
)
);


$random=random(4,$id);
$url=make_url($id);

$path=OFFER_PATH."/offers/i2dblue/".$random."/".$url."/";

$url_fields=array(
'dir'=>$path
);




$parameters=array(
'heading'=>'i2d Blue Proposal Details',
'settings'=>$settings,
'product'=>'i2d Blue - Website Solution',
'fields'=>$arraycols,
'url_fields'=>$url_fields,
'btn_id'=>'sum_val',
'id'=>$id,
);



//$parameters['legend'] = $id; 


view_details_i2d($parameters);

break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "view_i2d_smartshop_proposal":

$settings=array
(
'table'=>main_table,
'child_table'=>main_table,
'child_table_id_col'=>id_col,
'child_table_title'=>title,
'id_col'=>id_col,
'heading'=>'View Details',
'ref'=>routine_all_alias);
$arraycols=array(

'labels'=>array(
'Registration Date',
'Domain',
'Company',
'Whatsapp Number',


),

'fields'=>array(
server_time,
domain,
company,
cell,
)
);


$random=random(4,$id);
$url=make_url($id);

$path=OFFER_PATH."/offers/i2dsmartshop/".$random."/".$url."/";

$url_fields=array(
'dir'=>$path
);




$parameters=array(
'heading'=>'i2d Smartshop Proposal Details',
'settings'=>$settings,
'product'=>'i2d Smartshop - Online Store',
'fields'=>$arraycols,
'url_fields'=>$url_fields,
'btn_id'=>'sum_val',
'id'=>$id,
);


//$parameters['legend'] = $id; 


view_details_i2d($parameters);

break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "view_i2d_webmini_proposal":

$settings=array
(
'table'=>main_table,
'child_table'=>main_table,
'child_table_id_col'=>id_col,
'child_table_title'=>title,
'id_col'=>id_col,
'heading'=>'View Details',
'ref'=>routine_all_alias);
$arraycols=array(

'labels'=>array(
'Registration Date',
'Domain',
'Company',
'Whatsapp Number',


),

'fields'=>array(
server_time,
domain,
company,
cell,
)
);


$random=random(4,$id);
$url=make_url($id);

$path=OFFER_PATH."/offers/i2dwebmini/".$random."/".$url."/";

$url_fields=array(
'dir'=>$path
);




$parameters=array(
'heading'=>'i2d Webmini Proposal Details',
'settings'=>$settings,
'product'=>'i2d Webmini - Startup Website',
'fields'=>$arraycols,
'url_fields'=>$url_fields,
'btn_id'=>'sum_val',
'id'=>$id,
);



//$parameters['legend'] = $id; 


view_details_i2d($parameters);

break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "view_i2d_medesk_proposal":

$settings=array
(
'table'=>main_table,
'child_table'=>main_table,
'child_table_id_col'=>id_col,
'child_table_title'=>title,
'id_col'=>id_col,
'heading'=>'View Details',
'ref'=>routine_all_alias);
$arraycols=array(

'labels'=>array(
'Registration Date',
'Domain',
'Company',
'Whatsapp Number',


),

'fields'=>array(
server_time,
domain,
company,
cell,
)
);


$random=random(4,$id);
$url=make_url($id);

$path=OFFER_PATH."/offers/i2dmedesk/".$random."/".$url."/";

$url_fields=array(
'dir'=>$path
);




$parameters=array(
'heading'=>'i2d Medesk Proposal Details',
'settings'=>$settings,
'product'=>'i2d Medesk - Cloud Software',
'fields'=>$arraycols,
'url_fields'=>$url_fields,
'btn_id'=>'sum_val',
'id'=>$id,
);



//$parameters['legend'] = $id; 


view_details_i2d($parameters);

break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "add_staff":

if(isset($type) && $type=="edit"){
$edit="1";
$lead_id=$id;
}
else{
$edit="0";
$lead_id="0";
}

$dropdowns=array(

);



$dropdowns2=array(
);

$mask1="'mask': '(999)-(9999999)'";
$mask2="'alias': 'numeric','digits': 2,'digitsOptional': false, 'placeholder': '0'";

$textfields=array(

array(
'label'=>'Staff Name',
'fname'=>title,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
//'hint'=>'Amount Received',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'CNIC',
'fname'=>person,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Cells',
'fname'=>cell,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
//'placeholder'=>'345-8500096',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Joining Date',
'fname'=>domain,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'placeholder'=>'13-01-2022',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Employee No.',
'fname'=>'contact2',
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
//'placeholder'=>'345-8500096',
'masking'=>'off',
'required'=>'1'),



);


$integerfields=array(
);


$wysiwygfields=array(

);

$wysiwygfields_choice=array(


);



$checkboxfields=array(
);


$timepickfields=array(
);

$directfields=array(
array(
'fname'=>'posted_by',
'value'=>$user_id
)

);


$update_settings=array(
'update_flag'=>"Lead Edited",
'update_ref'=>"ims_update",
'update_email'=>0
);



$edit=array(
'edit'=>$edit,
'lead_id'=>$lead_id,
'e_ref'=>routine_staff_entry_alias,
'table'=>main_table
);


$values=array(
'texts'=>$textfields,
'integers'=>$integerfields,
'dropdowns'=>$dropdowns,
'dropdowns2'=>$dropdowns2,
'checkboxes'=>$checkboxfields,
'timepicks'=>$timepickfields,
'wysiwygs'=>$wysiwygfields,
'wysiwygs_choice'=>$wysiwygfields_choice,
'directfields'=>$directfields,
'update_settings'=>$update_settings,
'datedfield'=>dated,
'dated_table'=>main_table,
'prefix'=>'APP-',
'redirect'=>"/list/staff/6",
'form_table'=>main_table,
'form_heading'=>"Entry",
'alias'=>"staff_entry"
);

make_form($values,1,$edit);
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "add_fuel":

if(isset($type) && $type=="edit"){
$edit="1";
$lead_id=$id;
}
else{
$edit="0";
$lead_id="0";
}

$dropdowns=array(

'drops3'=>array(
'label'=>'Staff Name',
'table'=>main_table,
'table_title'=>title,
'table_id_col'=>id_col,
'this_table_field'=>business_type,
'ref'=>'staff_entry',
'remote_tbl_title_col'=>title,
'add_new'=>'0',
'other_id_col'=>'0',
'encoding'=>'0'),

);



$dropdowns2=array(
);

$mask1="'mask': '(999)-(9999999)'";
$mask2="'alias': 'numeric','digits': 2,'digitsOptional': false, 'placeholder': '0'";

$textfields=array(

array(
'label'=>'Fuel Amount',
'fname'=>title,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'hint'=>'Amount Received',
'masking'=>$mask2,
'placeholder'=>'200',
'required'=>'1'),

array(
'label'=>'Received From',
'fname'=>person,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'placeholder'=>'Company Account',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Cash / Online Ref No.',
'fname'=>'position2',
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
'placeholder'=>'Cash',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Visit Detail',
'fname'=>cell,
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
'hint'=>'Mention Visit Area / Sector',
'placeholder'=>'Visit to Gulberg + PWD',
'masking'=>'off',
'required'=>'1'),



);


$integerfields=array(
);


$wysiwygfields=array(

);

$wysiwygfields_choice=array(


);



$checkboxfields=array(
);


$timepickfields=array(
);

$directfields=array(
array(
'fname'=>'posted_by',
'value'=>$user_id
)

);


$update_settings=array(
'update_flag'=>"Lead Edited",
'update_ref'=>"ims_update",
'update_email'=>0
);



$edit=array(
'edit'=>$edit,
'lead_id'=>$lead_id,
'e_ref'=>routine_fuel_entry_alias,
'table'=>main_table
);


$values=array(
'texts'=>$textfields,
'integers'=>$integerfields,
'dropdowns'=>$dropdowns,
'dropdowns2'=>$dropdowns2,
'checkboxes'=>$checkboxfields,
'timepicks'=>$timepickfields,
'wysiwygs'=>$wysiwygfields,
'wysiwygs_choice'=>$wysiwygfields_choice,
'directfields'=>$directfields,
'update_settings'=>$update_settings,
'datedfield'=>dated,
'dated_table'=>main_table,
'prefix'=>'APP-',
'redirect'=>"/list/fuel/6",
'form_table'=>main_table,
'form_heading'=>"Fuel Entry",
'alias'=>"fuel_entry"
);

make_form($values,1,$edit);
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "add_config":

if(isset($type) && $type=="edit"){
$edit="1";
$lead_id=$id;
}
else{
$edit="0";
$lead_id="0";
}

$dropdowns=array(


);



$dropdowns2=array(
);

$mask1="'mask': '(999)-(9999999)'";
$mask2="'alias': 'numeric','digits': 2,'digitsOptional': false, 'placeholder': '0'";

$textfields=array(

array(
'label'=>'Config Title',
'fname'=>title,
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
'masking'=>'off',
'required'=>'1'),

);


$integerfields=array(
);


$wysiwygfields=array(
array(
'label'=>'Content','height'=>"112",
'fname'=>'col13',
'toolbar'=>"all",
'placeholder'=>'
<table class="table table-bordered"><tbody><tr><td><p><b>a. Company Profile</b></p><ul><li><b>&nbsp; </b>About&nbsp;</li><li>&nbsp; History / Background</li><li>CEO Profile</li></ul><p><span style="font-weight: 700;">b. Our Team</span></p><ul><li><span style="font-weight: 700;">&nbsp;&nbsp;</span>Staff Photos &amp; Designations</li></ul><p><span style="font-weight: 700;">c. Our Services</span></p><ul><li><span style="font-weight: 700;">&nbsp;&nbsp;</span>Sale / Purchase of Property</li><li>&nbsp; Building &amp; Construction</li><li>&nbsp; Housing Society / Sector Names</li></ul><p><span style="font-weight: 700;">d. Society Maps</span></p><ul><li>PDF Map Gallery</li></ul><p><span style="font-weight: 700; background-color: transparent;">e. Photo Gallery</span><br></p><ul><li><span style="font-weight: 700;">&nbsp;&nbsp;</span>Photos of Society Facilities &amp; Projects&nbsp;</li></ul></td><td><p><span style="font-weight: 700; background-color: transparent;">f.&nbsp; Office Branches / Locations</span><br></p><ul><li><span style="font-weight: 700;">&nbsp;&nbsp;</span>Head Office</li><li>&nbsp; Branches Location / Sub Offices</li></ul><p><span style="font-weight: 700;">g.&nbsp; Whats App Chat&nbsp;</span></p><ul><li><span style="font-weight: 700;">&nbsp;&nbsp;</span>Floating Chat Button</li></ul><p><span style="font-weight: 700;">h.&nbsp; Contact / Inquiry Form&nbsp;</span></p><ul><li><span style="font-weight: 700;">&nbsp;&nbsp;</span>General Inquiry Form</li></ul><p><span style="font-weight: 700;">i.&nbsp; Google Location Map&nbsp;</span></p><ul><li><span style="font-weight: 700;">&nbsp;&nbsp;</span>Contact Page with Address / Phone Numbers &amp; Google Map</li></ul><p><span style="font-weight: 700;">j.&nbsp; Google Search Compatibility&nbsp;</span></p><ul><li><span style="font-weight: 700;">&nbsp;&nbsp;</span>Basic SEO (Search Engine Ready)</li><note :&nbsp;<="" ul=""><p><br></p><p><b>NOTE : SEO requires at least 36 months</b></p><p><b> old domain name to mature the ranking of the website in Google.</b>&nbsp;</p></note></ul></td><td><p><b><br></b></p><p style="text-align: center; "><b><br></b></p><p style="text-align: center; "><b><br></b></p><p style="text-align: center; "><br></p></td></tr></tbody></table><br>	',
'required'=>'1'));

$wysiwygfields_choice=array(


);



$checkboxfields=array(
);


$timepickfields=array(
);

$directfields=array(
array(
'fname'=>'posted_by',
'value'=>$user_id
)

);


$update_settings=array(
'update_flag'=>"Lead Edited",
'update_ref'=>"ims_update",
'update_email'=>0
);



$edit=array(
'edit'=>$edit,
'lead_id'=>$lead_id,
'e_ref'=>routine_config_alias,
'table'=>main_table
);


$values=array(
'texts'=>$textfields,
'integers'=>$integerfields,
'dropdowns'=>$dropdowns,
'dropdowns2'=>$dropdowns2,
'checkboxes'=>$checkboxfields,
'timepicks'=>$timepickfields,
'wysiwygs'=>$wysiwygfields,
'wysiwygs_choice'=>$wysiwygfields_choice,
'directfields'=>$directfields,
'update_settings'=>$update_settings,
'datedfield'=>dated,
'dated_table'=>main_table,
'prefix'=>'APP-',
'redirect'=>"/list/configs/6",
'form_table'=>main_table,
'form_heading'=>"Config Entry",
'alias'=>"config_type"
);

make_form($values,1,$edit);
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "view_config":

$settings=array
(
'table'=>main_table,
'child_table'=>sub_table,
'child_table_id_col'=>sub_table_id,
'child_table_title'=>sub_table_title,
'id_col'=>id_col,
'heading'=>'View Skeleton',
'ref'=>routine_config_alias);
$arraycols=array(

'labels'=>array(
'Skeleton Name',
'Specifications',


),

'fields'=>array(
title,
'col13',
)
);


$remote_arraycols=array(

'labels'=>array(
),

'fields'=>array(
)
);


$links_array=array(

'labels'=>array(
'address','email'),

'urls'=>array(
"/ty/".$id,title)
);

$parameters=array(
'heading'=>'View Skeleton Details',
'settings'=>$settings,
'fields'=>$arraycols,
'remote_cols'=>$remote_arraycols,
//'links'=>$links_array,
'btn_id'=>'sum_val',
'id'=>$id,
);



//$parameters['legend'] = $id; 


view_details_v3($parameters);




break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "view_timeline":



view_timeline($id);




break;

case "make_call":


if($legend=="1"){
$url="/list/quickentries/";	
}
else{
$url="/list/entries/";		
}

make_call($id,$url);


break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "view_proposal_message":

$settings=array
(
'table'=>main_table,
'child_table'=>main_table,
'child_table_id_col'=>id_col,
'child_table_title'=>title,
'id_col'=>id_col,
'heading'=>'View Details',
'ref'=>routine_all_alias);
$arraycols=array(

'labels'=>array(
'Registration Date',
'Domain',
'Company',
'1st Owner Name',
'1st Whatsapp Number',
'2nd Owner Name',
'2nd Whatsapp Number',
'Staff Name',
'Staff Whatsapp Number',


),

'fields'=>array(
server_time,
domain,
company,
person,
cell,
'contact2',
'number2',
'contact3',
'number3',
)
);


$random=random(4,$id);
$url=make_url($id);

$path=OFFER_PATH."/offers/proposal/".$random."/".$url."/";

$url_fields=array(
'dir'=>$path
);




$parameters=array(
'heading'=>'Proposal Details',
'settings'=>$settings,
'fields'=>$arraycols,
'url_fields'=>$url_fields,
'btn_id'=>'sum_val',
'id'=>$id,
);



//$parameters['legend'] = $id; 


view_details_i2d_msg($parameters);

break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "request_invoice":

if(isset($type) && $type=="edit"){
$edit="1";
$lead_id=$id;
}
else{
$edit="0";
$lead_id="0";
}

$dropdowns=array(


'drops6'=>array(
'label'=>'Business Name',
'table'=>main_table,
'table_title'=>'col1',
'table_id_col'=>id_col,
'this_table_field'=>'link_id1',
'ref'=>'quick_lead_entry',
'remote_tbl_title_col'=>'col1',
'add_new'=>'0',
'other_id_col'=>'0',
'encoding'=>'0'),


);



$dropdowns2=array(
);

$mask1="'mask': '(999)-(9999999)'";
$mask2="'alias': 'numeric','digits': 2,'digitsOptional': false, 'placeholder': '0'";

$textfields=array(

array(
'label'=>'Domain Name / dotcom',
'fname'=>'col1',
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'addon'=>'www.',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Service Type',
'fname'=>'col2',
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'placeholder'=>'i2d Prohost',
'hint'=>'i2d ProHost , i2d Blue or i2d Medesk',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Total Amount',
'fname'=>'col3',
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'masking'=>$mask2,
'required'=>'1'),

array(
'label'=>'Discount %',
'hint'=>'Note : only for i2d Blue',
'fname'=>'col4',
'class'=>'col-md-6',
'encoding'=>'0',
'addon'=>'%',
'placeholder'=>'0',
'format'=>'words',
'masking'=>$mask2,
'required'=>'1'),

array(
'label'=>'Discounted Amount',
'hint'=>'Note : only for i2d Blue',
'fname'=>'col5',
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'masking'=>$mask2,
'required'=>'1'),

);


$integerfields=array(
);


$wysiwygfields=array(

);

$wysiwygfields_choice=array(


);



$checkboxfields=array(
);


$timepickfields=array(
);

$directfields=array(
array(
'fname'=>'posted_by',
'value'=>$user_id
)

);


$update_settings=array(
'update_flag'=>"Lead Edited",
'update_ref'=>"ims_update",
'update_email'=>0
);



$edit=array(
'edit'=>$edit,
'lead_id'=>$lead_id,
'e_ref'=>routine_invoice_request_alias,
'table'=>main_table
);


$values=array(
'texts'=>$textfields,
'integers'=>$integerfields,
'dropdowns'=>$dropdowns,
'dropdowns2'=>$dropdowns2,
'checkboxes'=>$checkboxfields,
'timepicks'=>$timepickfields,
'wysiwygs'=>$wysiwygfields,
'wysiwygs_choice'=>$wysiwygfields_choice,
'directfields'=>$directfields,
'update_settings'=>$update_settings,
'datedfield'=>dated,
'dated_table'=>main_table,
'prefix'=>'APP-',
'redirect'=>"/list/invrequests/",
'form_table'=>main_table,
'form_heading'=>"Invoice Request Entry",
'alias'=>"invoice_request_entry"
);

make_form($values,1,$edit);
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "add_mobile":

if(isset($type) && $type=="edit"){
$edit="1";
$lead_id=$id;
}
else{
$edit="0";
$lead_id="0";
}

$dropdowns=array(



);



$dropdowns2=array(
);

$mask1="'mask': '(999)-(9999999)'";
$mask2="'alias': 'numeric','digits': 2,'digitsOptional': false, 'placeholder': '0'";

$textfields=array(

array(
'label'=>'Company Name',
'fname'=>title,
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
'hint'=>'Business Name',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Domain Name / dotcom',
'fname'=>domain,
'class'=>'col-md-12',
'encoding'=>'0',
'format'=>'words',
'addon'=>'www.',
'placeholder'=>'Please Avoid Lengthy Domain Names (over 12 characters)',
'hint'=>'Note : Please Check Domain First',
'masking'=>'off',
'required'=>'1'),

array(
'label'=>'Contact Person / Owner Name (optional)',
'fname'=>person,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'hint'=>'Business Name',
'masking'=>'off',
'required'=>'0'),

array(
'label'=>'Cell Number',
'fname'=>cell,
'class'=>'col-md-6',
'encoding'=>'0',
'format'=>'words',
'hint'=>'345-8500096',
//'placeholder'=>'345-8500096',
'masking'=>$mask1,
'required'=>'1'),



);


$integerfields=array(
);


$wysiwygfields=array(

);

$wysiwygfields_choice=array(


);



$checkboxfields=array(
);


$timepickfields=array(
);

$directfields=array(
array(
'fname'=>'posted_by',
'value'=>$user_id
)

);


$update_settings=array(
'update_flag'=>"Lead Edited",
'update_ref'=>"ims_update",
'update_email'=>0
);



$edit=array(
'edit'=>$edit,
'lead_id'=>$lead_id,
'e_ref'=>routine_quick_entry_alias,
'table'=>main_table
);


$values=array(
'texts'=>$textfields,
'integers'=>$integerfields,
'dropdowns'=>$dropdowns,
'dropdowns2'=>$dropdowns2,
'checkboxes'=>$checkboxfields,
'timepicks'=>$timepickfields,
'wysiwygs'=>$wysiwygfields,
'wysiwygs_choice'=>$wysiwygfields_choice,
'directfields'=>$directfields,
'update_settings'=>$update_settings,
'datedfield'=>dated,
'dated_table'=>main_table,
'prefix'=>'APP-',
'redirect'=>"/list/quickentries/6",
'form_table'=>main_table,
'form_heading'=>"Entry",
'alias'=>"quick_lead_entry"
);

make_form($values,1,$edit);
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_
case "training":
    ?>
   <div id="page-right-content">
<!-- note this div closes in footer -->
                    <div class="container">    
<?php
$vol1=array(
'heading'=>'Traning Video Part 1',
'src'=>'http://www.i2dtech.com/staff/vids/vol1.mp4',
'width'=>'400',
'height'=>'200'
    );
    
vid_player($vol1);

$vol2=array(
'heading'=>'Traning Video Part 2',
'src'=>'http://www.i2dtech.com/staff/vids/vol2.mp4',
'width'=>'400',
'height'=>'200'
    );
    
vid_player($vol2);
?>
</div>
<?php
break;
//+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+__+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_

default;

echo "<h2>i2d App Builder Service Views Does not Exist!</h2>";

}

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


?>