Ejemplo n.º 1
0
<?php

require_once 'FeedWriter.php';
require_once '../Spyc.php';
require_once '../functions.php';
$TestFeed = new FeedWriter(ATOM);
$TestFeed->setTitle('F**k-Huff-Duff. Very Private Sonar Feed.');
$TestFeed->setLink('http://' . $_SERVER['HTTP_HOST'] . '/' . get_subdir($_SERVER[PHP_SELF]) . '/');
#print_r(get_subdir($_SERVER[PHP_SELF]));
$TestFeed->setChannelElement('updated', date(DATE_ATOM, time()));
$TestFeed->setChannelElement('author', array('name' => 'Juicy Cocktail (http://juicycocktail.com/)'));
$items = Spyc::YAMLLoad('../urls.yaml');
foreach ($items as $item) {
    $newItem = $TestFeed->createNewItem();
    $newItem->setTitle($item['title']);
    $newItem->setLink($item['link']);
    $newItem->setDate($item['date']);
    $newItem->setDescription($item['description']);
    $newItem->setEncloser($item['enc_link'], $item['enc_length'], 'audio/mpeg');
    $TestFeed->addItem($newItem);
}
# Please don’t mastarbate.
$TestFeed->genarateFeed();
Ejemplo n.º 2
0
	{
		// Position at 1.5 cm from bottom
		$this->SetY(-15);
		// Arial italic 8
		$this->SetFont('Arial','I',8);
		// Page number
		$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
	}
	
	function AcceptPageBreak()
	{
		return false;
	}
	
} */
$subdir = get_subdir();
if (isset($inData['preview'])) {
    $subdir .= "/generated_documents_preview/";
} else {
    $subdir .= "/generated_documents/";
}
if (!is_dir($upload_dir . $subdir)) {
    mkdir($upload_dir . $subdir, 0700, true);
}
$filename = create_filename() . ".pdf";
$pdf = new FPDF2File();
$pdf->Open($upload_dir . $subdir . $filename);
$pdf->SetAutoPageBreak(false, 0);
$pdf->SetMargins(0, 0, 0);
//$pdf->AliasNbPages();
$csvHeaders = array();