[CS-Project-svn_notify] SF.net SVN: cs-project: [692] trunk
Brought to you by:
crazedsanity
From: <cra...@us...> - 2007-12-14 01:53:10
|
Revision: 692 http://cs-project.svn.sourceforge.net/cs-project/?rev=692&view=rev Author: crazedsanity Date: 2007-12-13 17:53:03 -0800 (Thu, 13 Dec 2007) Log Message: ----------- Files for xofrevlis to test invoice template parsing with... Modified Paths: -------------- trunk/public_html/.htaccess Added Paths: ----------- trunk/includes/test.inc trunk/public_html/test trunk/public_html/test.php trunk/templates/test/ Copied: trunk/includes/test.inc (from rev 690, trunk/includes/extern.inc) =================================================================== --- trunk/includes/test.inc (rev 0) +++ trunk/includes/test.inc 2007-12-14 01:53:03 UTC (rev 692) @@ -0,0 +1,79 @@ +<?php +/* + * Created on Dec 13, 2007 + * + * SVN INFORMATION::: + * ------------------ + * Last Author::::::::: $Author$ + * Current Revision:::: $Revision$ + * Repository Location: $HeadURL$ + * Last Updated:::::::: $Date$ + + */ + + +$invoiceData = array( + 'invoice_id' => '10015', + 'poc' => 'Johnny Jackson', + 'company' => 'Llama Soft, Inc.', + 'address1' => '1555 North Georgia Ave.', + 'address2' => 'Suite 1411', + 'phone' => '(701) 555-3389 ext. 1911', + 'fax' => '(701) 555-9193', + 'city' => 'St. Louis', + 'state' => 'Missouri', + 'zip' => '55454' +); + +$invoiceItemData = array( + 91 => array( + 'invoice_item_id' => 91, + 'invoice_id' => 10015, + 'description' => 'Contract Downpayment', + 'unit_price' => 3000, + 'quantity' => 1 + ), + 93 => array( + 'invoice_item_id' => 93, + 'invoice_id' => 10015, + 'description' => 'Remote Software Development', + 'unit_price' => 75, + 'quantity' => 40 + ), + 94 => array( + 'invoice_item_id' => 94, + 'invoice_id' => 10015, + 'description' => 'Remote Software Development (overtime hours)', + 'unit_price' => 112.5, + 'quantity' => 12 + ) +); + + +$gf = new cs_globalFunctions; +$gf->debugPrintOpt = 1; + +$gf->debug_print("Here is the main invoice data::: ". $gf->debug_print($invoiceData,0)); + +$blockRows = $page->rip_all_block_rows(); + +if(!count($blockRows)) { + $gf->debug_print("Here's what I could find for block rows (should be more than just an empty array)::: ". $gf->debug_print($page->get_block_row_defs('content'),0)); + throw new exception("You forgot to give me valid block rows for parsing invoice items!"); +} +else { + $gf->debug_print("Here's the items that will be parsed into the rows::: ". $gf->debug_print($invoiceItemData,0)); + foreach($invoiceData as $index=>$value) { + $page->add_template_var($index, $value); + } + + //I have no idea how this will work when I don't know what the name of the block row is. + $tmplRow = array_pop($blockRows); + $allParsedRows = ""; + + foreach($invoiceItemData as $itemId=>$subData) { + $allParsedRows .= $page->gfObj->mini_parser($tmplRow, $subData, '{', '}'); + } +} + +?> Modified: trunk/public_html/.htaccess =================================================================== --- trunk/public_html/.htaccess 2007-12-14 01:05:59 UTC (rev 691) +++ trunk/public_html/.htaccess 2007-12-14 01:53:03 UTC (rev 692) @@ -17,4 +17,7 @@ </files> <files help> ForceType application/x-httpd-php +</files> +<files test> + ForceType application/x-httpd-php </files> \ No newline at end of file Copied: trunk/public_html/test (from rev 690, trunk/public_html/extern) =================================================================== --- trunk/public_html/test (rev 0) +++ trunk/public_html/test 2007-12-14 01:53:03 UTC (rev 692) @@ -0,0 +1,20 @@ +<?php +/* + * Created on Mar 10, 2006 + * by + * Dan Falconer + */ + + +require_once(dirname(__FILE__) ."/../lib/site_config.php"); + +$db = new cs_phpDB; +$db->connect(get_config_db_params()); +$session = new Session($db); + +$GLOBALS['DEBUGPRINTOPT'] = DEBUGPRINTOPT; + +$contentObj = new contentSystem(); +$contentObj->handle_session($session); +$contentObj->finish(); +?> Added: trunk/public_html/test.php =================================================================== --- trunk/public_html/test.php (rev 0) +++ trunk/public_html/test.php 2007-12-14 01:53:03 UTC (rev 692) @@ -0,0 +1 @@ +link test \ No newline at end of file Property changes on: trunk/public_html/test.php ___________________________________________________________________ Name: svn:special + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |