Example #1
0
$objAdminLogin->isValidAdmin();
$objClients = new Clients();
$objNiches = new Niches();
$objSessionRedirectUrl = new SessionRedirectUrl();
$objUrns = new Urns();
$objPaging = new Paging();
$varClientID = $_SESSION['sessClientID'];
$varPageStart = $objPaging->getPageStartLimit($_GET['page'], $_SESSION['sessAdminPagingLimit']);
$varLimit = $varPageStart . ',' . $_SESSION['sessAdminPagingLimit'];
$arrUrnsFlds = array('clients.ClientLoginID', 'niches.NicheFirstName', 'pkUrnID', 'UrnTitle', 'UrnFirstName', 'UrnLastName', 'Public', 'UrnAddedDate', 'UrnAddress', 'UrnTagNumber');
$arrUrnsRecord = $objGeneral->getRecord('(clients JOIN niches  ON niches.fkClientID = clients.pkClientID) 
JOIN urns ON niches.pkNicheID = urns.fkNicheID', $arrUrnsFlds, $varWhere);
$NumberofRows = count($arrUrnsRecord);
$varClientID = "1";
$varNumberPages = $objPaging->calculateNumberofPages($NumberofRows, $_SESSION['sessAdminPagingLimit']);
$arrUrnsList = $objUrns->getUrnsList('(clients JOIN niches  ON niches.fkClientID = clients.pkClientID) 
JOIN urns ON niches.pkNicheID = urns.fkNicheID', $arrUrnsFlds, $varLimit, $varClientID);
$excel = new ExcelWriter("urns_export.xls");
if ($excel == false) {
    echo $excel->error;
}
$main_array = array('<b>Client ID</b>', '<b>Niche Title</b>', '<b>Urn ID</b>', '<b>Title</b>', '<b>First Name</b>', '<b>Last Name</b>', '<b>Public</b>', '<b>Added Date</b>', '<b>Address</b>', '<b>Tag Number</b>');
$columnTitles = array_values($main_array);
$numColumns = count($columnTitles);
// $row += 2;
// $excel->writeCol('<b>Total Products<b>');
// $excel->writeCol(count($arrproperty_surveyList));
$row++;
$arrSeparator = array_fill(0, 24, '  ');
$excel->writeLine($arrSeparator);
$row++;
$arrSeparator = array_fill(0, 24, '  ');
Example #2
0
require_once SOURCE_ROOT . 'classes/class.clients_login.php';
require_once SOURCE_ROOT . '/classes/excelwriter.php';
$objClientLogin = new ClientsLogin();
$objClientLogin->isValidClients();
$objSessionRedirectUrl = new SessionRedirectUrl();
$objUrns = new Urns();
$objPaging = new Paging();
$varClientID = $_SESSION['sessClientID'];
$varWhere = "1 AND urns.fkClientID=" . $varClientID . " AND niches.fkClientID =" . $varClientID;
$varPageStart = $objPaging->getPageStartLimit($_GET['page'], $_SESSION['sessClientPagingLimit']);
$varLimit = $varPageStart . ',' . $_SESSION['sessClientPagingLimit'];
$arrUrnsFlds = array('pkUrnID', 'fkNicheID', 'NicheTitle', 'urns.fkClientID', 'UrnTitle', 'UrnFirstName', 'UrnLastName', 'Public', 'UrnSuffix', 'UrnAddedDate', 'UrnTagNumber');
$arrUrnsRecord = $objGeneral->getRecord('niches JOIN urns ON niches.pkNicheID = urns.fkNicheID', $arrUrnsFlds, $varWhere);
$NumberofRows = count($arrUrnsRecord);
$varNumberPages = $objPaging->calculateNumberofPages($NumberofRows, $_SESSION['sessClientPagingLimit']);
$arrUrnsList = $objUrns->getUrnsList('niches JOIN urns ON niches.pkNicheID = urns.fkNicheID', $arrUrnsFlds, $varLimit, $varWhere);
$excel = new ExcelWriter("urns_list.xls");
if ($excel == false) {
    echo $excel->error;
}
$main_array = array('<b>Urn ID</b>', '<b>Niche ID</b>', '<b>Niche Title</b>', '<b>Client ID</b>', '<b>Urn Title</b>', '<b>First Name</b>', '<b>Last Name</b>', '<b>Public</b>', '<b>Suffix</b>', '<b>Added Date</b>', '<b>Tag Number</b>');
$columnTitles = array_values($main_array);
$numColumns = count($columnTitles);
$row++;
$arrSeparator = array_fill(0, 24, '  ');
$excel->writeLine($arrSeparator);
$row++;
$arrSeparator = array_fill(0, 24, '  ');
$excel->writeLine($arrSeparator);
$row++;
$excel->writeLine($main_array);
Example #3
0
$objSessionRedirectUrl = new SessionRedirectUrl();
$objNiches = new Niches();
$objPaging = new Paging();
$objUrns = new Urns();
$varClientID = $_SESSION['sessClientID'];
$varWhere = "1 AND fkClientID=" . $varClientID;
$varPageStart = $objPaging->getPageStartLimit($_GET['page'], $_SESSION['sessClientPagingLimit']);
$varLimit = $varPageStart . ',' . '5';
$arrNichesFlds = array('pkNicheID', 'fkClientID', 'NicheTitle', 'NicheFirstName', 'NicheLastName', 'NicheCity', 'NicheEmailAddress', 'NicheDatePurchase', 'NicheStatus');
$arrNichesRecord = $objGeneral->getRecord(TABLE_NICHES, $arrNichesFlds, $varWhere);
$NumberofRows = count($arrNichesRecord);
$varClientID = "1 AND fkClientID= " . $varClientID;
$arrNichesList = $objNiches->getNichesList(TABLE_NICHES, $arrNichesFlds, $varLimit, $varClientID);
$arrUrnsFlds = array('pkUrnID', 'fkNicheID', 'fkClientID', 'UrnTitle', 'UrnFirstName', 'UrnLastName', 'Public', 'UrnSuffix', 'UrnAddedDate', 'UrnAddress');
$arrUrnsRecord = $objGeneral->getRecord(TABLE_URNS, $arrUrnsFlds, $varWhere);
$arrUrnsList = $objUrns->getUrnsList(TABLE_URNS, $arrUrnsFlds, $varLimit, $varClientID);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Admin Welcome Page</title>
<link href="css/menu.css" rel="stylesheet" type="text/css" />
<link href="css/common.css" rel="stylesheet" type="text/css" />
<link href="css/form.css" rel="stylesheet" type="text/css" />
<link href="css/tables.css" rel="stylesheet" type="text/css" />
<!--[if gte IE 5.5]>
<script language="JavaScript" src="js/ie.js" type="text/JavaScript"></script>
<![endif]-->
</head>
<body>