<?php
require_once(__DIR__.'/../includes/sysinit.php');
require(SABLE_WORKING_PATH.'postal_data/postal_data_func.php');

$_SESSION['listParams']['searchVisible']= 1;
/***
$_SESSION['module']['add']= 1;
$_SESSION['module']['addlink']= SableSystem::getSableLinkPath('postal_data/');
***/
$_SESSION['module']['back']				= 1;
$_SESSION['module']['backlink']			= SableSystem::getThemeLinkPath('dashboard/postal_data/');
$_SESSION['listParams']['allowExport']	= 1;
$_SESSION['listParams']['exportAccess']	= SABLE_ACCESS_MANAGER;

if (isset($_POST))
{
}

$_SESSION['listParams']['listSql']="select post_id
									from postal_data";

$_SESSION['listParams']['module']					= "postal_data";
$_SESSION['listParams']['page']						= 0;
$_SESSION['listParams']['offset']					= SABLE_DATALIST_ROWS; //the number of records to display per page
$_SESSION['listParams']['parentId']					= ""; //
$_SESSION['listParams']['moduleFolder']				= "postal_data";
$_SESSION['listParams']['moduleFolderDesc']			= "Postal_data";
$_SESSION['listParams']['modulePage']				= "index.php";
$_SESSION['listParams']['moduleIdField']			= "post_id";
$_SESSION['listParams']['moduleDescField']			= "post_id";
$_SESSION['listParams']['orderField']				= 1;
$_SESSION['listParams']['orderDirection']			= 0;

if ($_SESSION['user']['access_level'] >= SABLE_ACCESS_USER){	$_SESSION['listParams']['listHeadings'][0] = "";} //Add
if ($_SESSION['user']['access_level'] >= SABLE_ACCESS_CLERK){	$_SESSION['listParams']['listHeadings'][1] = "";} //Edit
if ($_SESSION['user']['access_level'] >= SABLE_ACCESS_MANAGER){	$_SESSION['listParams']['listHeadings'][2] = "";} //Delete

if ($_SESSION['user']['access_level'] >= SABLE_ACCESS_USER){	$_SESSION['listParams']['listHeadingWidth'][0] = "5%";} //View
if ($_SESSION['user']['access_level'] >= SABLE_ACCESS_CLERK){	$_SESSION['listParams']['listHeadingWidth'][1] = "5%";} //Edit
if ($_SESSION['user']['access_level'] >= SABLE_ACCESS_MANAGER){	$_SESSION['listParams']['listHeadingWidth'][2] = "5%";} //Delete

if ($_SESSION['user']['access_level'] >= SABLE_ACCESS_USER) 
{
	$_SESSION['listParams']['listFields'][0]['field']	= "<i class='fa fa-2x ".SABLE_DATALIST_VIEW."' title='View --!--'></i>";
	$_SESSION['listParams']['listFields'][0]['onClick']= " onClick='viewPostal_data(\"--#--\")' ";
}
if ($_SESSION['user']['access_level'] >= SABLE_ACCESS_CLERK) 
{
	$_SESSION['listParams']['listFields'][1]['field']	="<i class='fa fa-2x ".SABLE_DATALIST_EDIT."' title='Modify --!--'></i>";
	$_SESSION['listParams']['listFields'][1]['onClick']= " onClick='editPostal_data(\"--#--\")' ";
}
if ($_SESSION['user']['access_level'] >= SABLE_ACCESS_MANAGER) 
{
	$_SESSION['listParams']['listFields'][2]['field']	= "<i class='fa fa-2x ".SABLE_DATALIST_DELETE."' title='Delete --!--'></i>";
	$_SESSION['listParams']['listFields'][2]['onClick']= " onClick='deletePostal_data(\"--#--\",\"--!--\")' ";
}
SableGeneralFunctions::callDataList();
