$title = 'Manuellt registrerade utbetalningar '.$_REQUEST['Date'];

//setup db
$offset = "..";
include("$offset/blackboard.php");
include("$offset/do/DBNamespace.php");
include("$offset/do/fb_si.php");
include("$offset/do/easyDB.php");
include("$offset/do/easyDBConn2.php");

$db = easyDB('');

//setup class
include('../ext/pdfcode/include/class.si.ezpdf.php');
if (!isset($ds['Orientation'])){ $ds['Orientation'] = 'portrait';}
$pdf = new SiCezpdf('A4', $ds['Orientation']);
function NewPageCallback($rowIndex) {
	global $ds;
	if ($rowIndex > $ds['MaxSize']) {
		return 'Bailout';
	}
}

$ds = array(
		'Title'=> $title
		,'Query'=> $Query
		,'QueryTotal'=> $QueryTotal
		,'MaxSize'=> 8000
		,'Columns' => array(
			'Payment.ProjectId'=> 'Projekt#'
			,'Payment.OutKr' => 'OutKr'
Example #2
0
			)
    );
//setup db
$offset = "..";
include("$offset/blackboard.php");
include("$offset/do/DBNamespace.php");
include("$offset/do/fb_si.php");
include("$offset/do/easyDB.php");
include("$offset/do/easyDBConn2.php");

$db = easyDB('');

//setup class
include('../ext/pdfcode/include/class.si.ezpdf.php');
if (!isset($ds['Orientation'])){ $ds['Orientation'] = 'portrait';}
$pdf = new SiCezpdf('A4', $ds['Orientation']);

/*
//query2 finds the saldo i.e. the total running balance of all entries in db
$query2 = "select
ProjectId
,Sum(InKr) as InKr
,Sum(OutKr) as OutKr
,Sum(InKr) - Sum(OutKr) as Saldo
,Sum(AdminCharge) as Admin
from Payment
WHERE 1 ";
if (isset($_REQUEST['to']) && $_REQUEST['to']) {
	$Query .= "AND Payment.Date <= '".sqlite_escape_string($_REQUEST['to'])."'";
}
$query2 .="
Example #3
0
<?
include_once("pdfSettings.php");
session_start();
if (!isset($_SESSION["UserData"])) {
    print "You must login to access this resource";
	exit();
}
/**
* ezPdf generated report.
*/
include_once("$ezPdfDir/class.si.ezpdf.php");
$pdf = new SiCezpdf('A4', 'portrait');
function NewPageCallback($rowIndex) {
    if ($rowIndex > 8000) {
		return 'Bailout';
	}
}
    include("$easyDBDir/easyDB.php");
    include("$easyDBDir/easyDBConn2.php");
    $db = easyDB('');
    $query="Select 
    * 
From 
    Fadderbarn, Giver 
Where 
	Fadderbarn.GiverId = Giver.Id
	and Giver.Id > 0
	Order by Fadderbarn.Area DESC
";

    $result = $db->Query($query);
Example #4
0

//setup db
$offset = "..";
include("$offset/blackboard.php");
include("$offset/do/DBNamespace.php");
include("$offset/do/fb_si.php");
include("$offset/do/easyDB.php");
include("$offset/do/easyDBConn2.php");

$db = easyDB('');

//setup class
include('../ext/pdfcode/include/class.si.ezpdf.php');
if (!isset($ds['Orientation'])){ $ds['Orientation'] = 'portrait';}
$pdf = new SiCezpdf('A4', $ds['Orientation']);
function NewPageCallback($rowIndex) {
	global $ds;
	if ($rowIndex > $ds['MaxSize']) {
		return 'Bailout';
	}
}

$ds = array(
		'Title'=> $title
		,'Query'=> $Query
		,'QueryTotal'=> $QueryTotal
		,'MaxSize'=> 8000
		,'Columns' => array(
			'GiverId'=>'Nummer'
			,'Belopp'=> 'Belopp'
Example #5
0
<?
include_once("pdfSettings.php");
session_start();
if (!isset($_SESSION["UserData"])) {
    print "You must login to access this resource";
	exit();
}
/**
* ezPdf generated report.
*/
include_once("$ezPdfDir/class.si.ezpdf.php");
$pdf = new SiCezpdf('A4', 'portrait');
$pdf->ezSetMargins(30,30,30,20);
function NewPageCallback($rowIndex) {
    if ($rowIndex > 8000) {
		return 'Bailout';
	}
}
    include("$easyDBDir/easyDB.php");
    include("$easyDBDir/easyDBConn2.php");
    $db = easyDB('');
    $query="Select 
    ChurchName
    ,Contact
    ,Address
    ,ZipTown
    ,Zip
    ,Tel
    ,Status 
From 
    Church 
Example #6
0
<?
include_once("pdfSettings.php");
session_start();
if (!isset($_SESSION["UserData"])) {
    print "You must login to access this resource";
	exit();
}
/**
* ezPdf generated report.
*/
include_once("$ezPdfDir/class.si.ezpdf.php");
$pdf = new SiCezpdf('A4', 'portrait');
$pdf->ezSetMargins(30,30,30,20);
function NewPageCallback($rowIndex) {
    if ($rowIndex > 8000) {
		return 'Bailout';
	}
}
    include("$easyDBDir/easyDB.php");
    include("$easyDBDir/easyDBConn2.php");
    $db = easyDB('');
    $area = $_REQUEST['area'];
    //$areaName = 'test';
        $query="Select 
    *
    ,round(Fadderbarn.Mkr - ((Fadderbarn.Mkr/100)*25)) as 'publicKr'
From 
    Fadderbarn, Giver 
Where 
	Fadderbarn.GiverId = Giver.Id
	and Giver.Id > 0
Example #7
0
/**
* Simple on-demand pdf without any templates..
*/
$offset = "../..";
include("$offset/blackboard.php");
include("$offset/do/DBNamespace.php");
include("$offset/do/fb_si.php");
include("$offset/do/easyDB.php");
	
$DBProvider="sqlite";
$connections["sqlite"]=array(
	''=>array('dbFile'=>"$offset/data/data.db",'persist'=>true)
);
$db = easyDB('');
include('../pdfcode/include/class.si.ezpdf.php');
$pdf = new SiCezpdf('A4', 'portrait');
$sql = "
SELECT
	Id, Name
From Giver
Limit 0,200
";
$result = $db->Query($sql);
$data = array();
while($row = $db->GetRow($result)) {
	$data[] = $row;
}
fb($data);
//var_dump($data);
$pages = 0;
function NewPageCallback($rowIndex) {
Example #8
0
<?
include_once("pdfSettings.php");
session_start();
if (!isset($_SESSION["UserData"])) {
    print "You must login to access this resource";
	exit();
}
/**
* ezPdf generated report.
*/
include_once("$ezPdfDir/class.si.ezpdf.php");
$pdf = new SiCezpdf('A4', 'portrait');
function NewPageCallback($rowIndex) {
    if ($rowIndex > 8000) {
		return 'Bailout';
	}
}
    include("$easyDBDir/easyDB.php");
    include("$easyDBDir/easyDBConn2.php");
    $db = easyDB('');
    $query="Select 
    Payment.* 
	,Project.Project as 'ProjectName'
From 
	Payment LEFT JOIN Project On Payment.ProjectId = Project.Id
Where 
    (OutKr !='' AND OutKr is not null AND OutKr >0)
";
if (isset($_REQUEST['Date'])) {
    $query .= "AND Payment.Date='".htmlentities($_REQUEST['Date'])."'";
}
Example #9
0
<?
include_once("pdfSettings.php");
session_start();
if (!isset($_SESSION["UserData"])) {
    print "You must login to access this resource";
	exit();
}
/**
* ezPdf generated report.
*/
include_once("$ezPdfDir/class.si.ezpdf.php");
$pdf = new SiCezpdf('A4', 'portrait');
function NewPageCallback($rowIndex) {
    if ($rowIndex > 8000) {
		return 'Bailout';
	}
}
    include("$easyDBDir/easyDB.php");
    include("$easyDBDir/easyDBConn2.php");
    $db = easyDB('');
    $query="Select 
    Payment.*
    ,Project.Project as 'ProjectName'
    ,Giver.Name as 'GiverName' 
From
    Payment LEFT JOIN Project On Payment.ProjectId = Project.Id 
    LEFT JOIN Giver On Payment.GiverId = Giver.Id 
Where 
    Payment.PaymentSource='".htmlentities($_REQUEST['PaymentSource'])."'
    AND Payment.PaymentSource='".htmlentities($_REQUEST['PaymentSource'])."'
	AND Payment.Date='".htmlentities($_REQUEST['Date'])."'
Example #10
0
if (!isset($dataSources[$_REQUEST['datasource']])) { die("datasource not available:" . $_REQUEST['datasource']); }
$ds = $dataSources[$_REQUEST['datasource']];
//setup db
$offset = "..";
include("$offset/blackboard.php");
include("$offset/do/DBNamespace.php");
include("$offset/do/fb_si.php");
include("$offset/do/easyDB.php");
include("$offset/do/easyDBConn2.php");

$db = easyDB('');

//setup class
include('../ext/pdfcode/include/class.si.ezpdf.php');
if (!isset($ds['Orientation'])){ $ds['Orientation'] = 'landscape';}
$pdf = new SiCezpdf('A4', $ds['Orientation']);

$result = $db->Query($ds['Query']);//. "LIMIT 0,2000"
$data = array();
while($row = $db->GetRow($result)) {
	$data[] = $row;
}

function NewPageCallback($rowIndex) {
	global $ds;
	if ($rowIndex > $ds['MaxSize']) {
		return 'Bailout';
	}
}
$pdf->ezTable(
	$data