-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
22,960 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
admin/includes/boxes/extra_boxes/pdfoc_customers_dhtml.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/* PDF Order Center 1.0 for Zen Cart v1.2.6d and v1.2.7d | ||
* By Grayson Morris, 2006 | ||
* Printing sections based on Batch Print Center for osCommerce by Shaun Flanagan | ||
* | ||
* Released under the Gnu General Public License (see GPL.txt) | ||
* | ||
* admin/includes/boxes/extra_boxes/pdfoc_customers_dhtml.php | ||
* | ||
*/ | ||
|
||
// Admin menu settings | ||
// | ||
$za_contents[] = array('text' => BOX_PDFOC, 'link' => zen_href_link(FILENAME_PDFOC, '', 'NONSSL')); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
/* PDF Order Center 1.0 for Zen Cart v1.2.6d and v1.2.7d | ||
* By Grayson Morris, 2006 | ||
* Printing sections based on Batch Print Center for osCommerce by Shaun Flanagan | ||
* | ||
* Released under the Gnu General Public License (see GPL.txt) | ||
* | ||
* admin/includes/extra_configures/pdfoc.php | ||
* | ||
*/ | ||
|
||
// BPC directories | ||
// | ||
define('DIR_PDFOC_INCLUDE', DIR_WS_MODULES . 'pdfoc/'); | ||
define('DIR_PDFOC_PDF', DIR_PDFOC_INCLUDE . 'temp_pdf/'); | ||
define('DIR_PDFOC_FONTS', DIR_PDFOC_INCLUDE . 'fonts/'); | ||
define('DIR_PDFOC_TEMPLATES', DIR_PDFOC_INCLUDE . 'templates/'); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
|
||
/* PDF Order Center 1.0 for Zen Cart v1.2.6d and v1.2.7d | ||
* By Grayson Morris, 2006 | ||
* Printing sections based on Batch Print Center for osCommerce by Shaun Flanagan | ||
* | ||
* Released under the Gnu General Public License (see GPL.txt) | ||
* | ||
* admin/includes/extra_datafiles/pdfoc.php | ||
* | ||
*/ | ||
|
||
// Main file | ||
// | ||
define('FILENAME_PDFOC', 'pdfoc.php'); | ||
|
||
// Temporary pdf file | ||
// | ||
define('FILENAME_PDFOC_PDF', 'batch_orders.pdf'); | ||
|
||
// Manual file | ||
// | ||
define('FILENAME_PDFOC_MANUAL', 'pdfoc_manual.php'); | ||
|
||
// Table for invoice numbers (OTFIN) | ||
// | ||
define('TABLE_ORDERS_INVOICES', DB_PREFIX . 'orders_invoices'); | ||
|
||
// RGB colors | ||
define('PDFOC_BLACK', '0,0,0'); | ||
define('PDFOC_GREY', '0.9,0.9,0.9'); | ||
define('PDFOC_DARK_GREY', '0.7,0.7,0.7'); | ||
|
||
// PDF font sizes | ||
define('PDFOC_GIANT_FONT_SIZE','24'); | ||
define('PDFOC_COMPANY_HEADER_FONT_SIZE','14'); | ||
define('PDFOC_SUB_HEADING_FONT_SIZE','11'); | ||
define('PDFOC_GENERAL_FONT_SIZE', '11'); | ||
define('PDFOC_COMMENTS_FONT_SIZE', '9'); | ||
define('PDFOC_GENERAL_LEADING', '12'); | ||
define('PDFOC_PRODUCT_TOTALS_LEADING', '11'); | ||
define('PDFOC_PRODUCT_TOTALS_FONT_SIZE', '10'); | ||
define('PDFOC_PRODUCT_ATTRIBUTES_FONT_SIZE', '8'); | ||
define('PDFOC_GENERAL_FONT_COLOR', PDFOC_BLACK); | ||
define('PDFOC_GENERAL_LINE_SPACING', '15'); | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
<?php | ||
|
||
/* PDF Order Center 1.0 for Zen Cart v1.2.6d and v1.2.7d | ||
* By Grayson Morris, 2006 | ||
* Printing sections based on Batch Print Center for osCommerce by Shaun Flanagan | ||
* | ||
* Released under the Gnu General Public License (see GPL.txt) | ||
* | ||
* admin/includes/functions/extra_functions/pdfoc.php | ||
* | ||
*/ | ||
|
||
|
||
// Function to clean up HTML strings for PDF files (in particular, invoices). | ||
// If you have funny characters showing up in your PDF file, | ||
// take a look at http://evolt.org/article/ala/17/21234/ ("A Simple Character Entity Chart") | ||
// and add your rewrite to the below | ||
// | ||
|
||
function pdfoc_html_cleanup($input) { | ||
|
||
// clean up money € to € | ||
while (strstr($input, '€')) $input = str_replace('€', '€', $input); | ||
|
||
// clean up money £ to £ | ||
while (strstr($input, '£')) $input = str_replace('£', '£', $input); | ||
|
||
// clean up spaces to ' ' | ||
while (strstr($input, ' ')) $input = str_replace(' ', ' ', $input); | ||
|
||
// fix double quotes | ||
while (strstr($input, '"')) $input = str_replace('"', '"', $input); | ||
|
||
return $input; | ||
|
||
} // EOF pdfoc_html_cleanup | ||
|
||
|
||
|
||
function pdfoc_message_handler($message='') { // reload the page, listing the error if specified | ||
|
||
if ($message) { | ||
header("Location: " . zen_href_link(FILENAME_PDFOC, 'mkey=' . $message)); | ||
} else { | ||
header("Location: " . zen_href_link(FILENAME_PDFOC)); | ||
} | ||
exit(0); | ||
|
||
} // EOF pdfoc_message_handler | ||
|
||
|
||
|
||
function pdfoc_change_color($color) { | ||
global $pdf; | ||
|
||
list($r,$g,$b) = explode(',', $color); | ||
$pdf->setColor($r,$g,$b); | ||
|
||
} // EOF pdfoc_change_color | ||
|
||
|
||
|
||
function pdfoc_verify_date($date) { | ||
|
||
$error = 0; | ||
list($year,$month,$day) = explode('-', $date); | ||
|
||
if ((strlen($year) != 4) || !is_numeric($year)) { | ||
$error++; | ||
} | ||
if ((strlen($month) != 2) || !is_numeric($month)) { | ||
$error++; | ||
} | ||
if ((strlen($day) != 2) || !is_numeric($day)) { | ||
$error++; | ||
} | ||
|
||
return $error; | ||
|
||
} // EOF pdfoc_verify_date | ||
|
||
|
||
|
||
function zen_cfg_pull_down_order_statuses_plus_none($order_status_id, $key = '') { | ||
global $db; | ||
$name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value'); | ||
|
||
$statuses_array = array(array('id' => '0', 'text' => PDFOC_TEXT_NONE)); // This is defined in admin/includes/languages/english/extra_definitions/pdfoc.php | ||
$statuses = $db->Execute("select orders_status_id, orders_status_name | ||
from " . TABLE_ORDERS_STATUS . " | ||
where language_id = '" . (int)$_SESSION['languages_id'] . "' | ||
order by orders_status_name"); | ||
|
||
while (!$statuses->EOF) { | ||
$statuses_array[] = array('id' => $statuses->fields['orders_status_id'], | ||
'text' => $statuses->fields['orders_status_name'] . ' [' . $statuses->fields['orders_status_id'] . ']'); | ||
$statuses->MoveNext(); | ||
} | ||
|
||
return zen_draw_pull_down_menu($name, $statuses_array, $order_status_id); | ||
|
||
} // EOF zen_cfg_pull_down_order_status_plus_none | ||
|
||
|
||
|
||
function zen_get_order_status_name_plus_none($order_status_id, $language_id = '') { | ||
global $db; | ||
|
||
if ($order_status_id < 1) return PDFOC_TEXT_NONE; // This is defined in admin/includes/languages/english/extra_definitions/pdfoc.php | ||
|
||
if (!is_numeric($language_id)) $language_id = $_SESSION['languages_id']; | ||
|
||
$status = $db->Execute("select orders_status_name | ||
from " . TABLE_ORDERS_STATUS . " | ||
where orders_status_id = '" . (int)$order_status_id . "' | ||
and language_id = '" . (int)$language_id . "'"); | ||
|
||
return $status->fields['orders_status_name'] . ' [' . (int)$order_status_id . ']'; | ||
|
||
} // EOF zen_get_order_status_name_plus_none | ||
|
||
|
||
|
||
function pdfoc_cfg_pull_down_templates($template_id, $key = '') { | ||
|
||
$name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value'); | ||
|
||
$directory = DIR_PDFOC_TEMPLATES; | ||
$resc = opendir($directory); | ||
|
||
$file_type_array = array(array('id' => '0', 'text' => PDFOC_TEXT_NONE)); // This is defined in admin/includes/languages/english/extra_definitions/pdfoc.php | ||
while ($file = readdir($resc)) { | ||
|
||
$ext = strrchr($file, "."); | ||
|
||
if ($ext == ".php") { | ||
|
||
// $filename = str_replace('_', " ",$file); | ||
$filename = str_replace('-', '_',$file); | ||
$filename = str_replace($ext, "",$filename); | ||
$fileconst = 'PDFOC_TEMPLATE_NAME_' . strtoupper($filename); | ||
/* look for a constant for that filename; if exists, use it, otherwise use filename */ | ||
/* (allows language-specific names to be displayed in the dropdown menus) */ | ||
if (defined("$fileconst")) | ||
{ | ||
$filename = constant($fileconst); | ||
} | ||
else | ||
{ | ||
$filename = "MISTAKE! " . $filename; // debugging code | ||
// $filename = str_replace('_', " ", $filename); | ||
} | ||
$file_type_array[] = array('id' => $file,'text' => $filename); | ||
} // EOIF $ext | ||
|
||
} // EOWHILE $file | ||
|
||
return zen_draw_pull_down_menu($name, $file_type_array, $template_id); | ||
|
||
} // EOF pdfoc_cfg_pull_down_templates | ||
|
||
|
||
|
||
function pdfoc_get_template_name($template_id) { | ||
|
||
$directory = DIR_PDFOC_TEMPLATES; | ||
$resc = opendir($directory); | ||
|
||
if ($template_id == '0') return PDFOC_TEXT_NONE; // This is defined in admin/includes/languages/english/extra_definitions/pdfoc.php | ||
|
||
while ($file = readdir($resc)) { | ||
|
||
$ext = strrchr($file, "."); | ||
|
||
if ($ext == ".php") { | ||
|
||
// $filename = str_replace('_', " ",$file); | ||
$filename = str_replace('-', '_',$file); | ||
$filename = str_replace($ext, "",$filename); | ||
$fileconst = 'PDFOC_TEMPLATE_NAME_' . strtoupper($filename); | ||
/* look for a constant for that filename; if exists, use it, otherwise use filename */ | ||
/* (allows language-specific names to be displayed in the dropdown menus) */ | ||
if (defined("$fileconst")) | ||
{ | ||
$filename = constant($fileconst); | ||
} | ||
else | ||
{ | ||
$filename = "MISTAKE! " . $filename; // debugging code | ||
// $filename = str_replace('_', " ", $filename); | ||
} | ||
|
||
if ($file==$template_id) | ||
break; | ||
} // EOIF $ext | ||
|
||
} // EOWHILE $file | ||
|
||
return $filename; | ||
|
||
} // EOF pdfoc_get_template_name | ||
|
||
|
||
?> |
57 changes: 57 additions & 0 deletions
57
admin/includes/languages/dutch/extra_definitions/pdfoc.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
/* PDF Order Center 1.0 for Zen Cart v1.2.6d and v1.2.7d | ||
* By Grayson Morris, 2006 | ||
* Printing sections based on Batch Print Center for osCommerce by Shaun Flanagan | ||
* | ||
* Released under the Gnu General Public License (see GPL.txt) | ||
* | ||
* admin/includes/languages/english/pdfoc.php | ||
* | ||
*/ | ||
|
||
// Admin menu settings | ||
// | ||
define('BOX_PDFOC', 'PDF Order Center'); | ||
|
||
// General settings for all PDFOC pages | ||
// | ||
define('PDFOC_HEADING_TITLE', 'PDF Order Center'); | ||
define('PDFOC_GENERAL_HELPTEXT', 'Select orders by using the selection control panel on the right-hand side of the page. Either specify selection criteria | ||
and click "Submit Options", or check orders in the list and click "Use" (to select the checked orders) or "Omit" (to select | ||
the UNCHECKED orders). The new set of selected orders will then be displayed in the orders list. <br /><br /> | ||
You can view details about an order by clicking somewhere in its row in the orders list. The details will be displayed | ||
in the infobox at the top of the page.<br /><br /> | ||
Once the orders list contains the desired orders, select action criteria in the left-hand action control panel. To delete all the orders in the | ||
orders list, click "Delete Selected Orders". To print documents for and/or change the status of the orders in the orders list, | ||
select the desired printing and status update options and click "Submit Options". <br /><br /> | ||
Consult the PDFOC manual for more information.'); | ||
define('PDFOC_HELPTEXT_ICON', '?'); | ||
define('PDFOC_LINK_MAINPAGE','PDFOC Main Page'); | ||
define('PDFOC_LINK_MANUAL','Read the PDFOC Manual'); | ||
define('PDFOC_LINK_SUPER_ORDERS','To Super Orders'); | ||
define('PDFOC_TEXT_BATCH_PDF_PRINT', 'Batch PDF Print'); | ||
define('PDFOC_TEXT_HOVER_FOR_HELP','Hover the mouse over the yellow question mark fields to see help texts.<br /> | ||
Click on any question mark to reset the forms.'); | ||
define('PDFOC_TEXT_NONE', 'None'); | ||
|
||
|
||
// This next section creates constant names for the template files, to allow for language-specific | ||
// names in the dropdown menu in PDFOC | ||
// YOU MUST MANUALLY INSURE THAT YOU HAVE NAMES HERE FOR ALL YOUR TEMPLATES, OR THEY WILL SHOW | ||
// UP STRANGELY IN THE DROPDOWN MENU. The constant names are formed by uppercasing the template .php filename | ||
// and converting any -'s into _'s. | ||
define('PDFOC_TEMPLATE_NAME_CHRISTMASCARD','Christmas Card'); | ||
define('PDFOC_TEMPLATE_NAME_CREDIT','Credit'); | ||
define('PDFOC_TEMPLATE_NAME_GRID','Grid'); | ||
define('PDFOC_TEMPLATE_NAME_INVOICE','Invoice'); | ||
define('PDFOC_TEMPLATE_NAME_LABELS','Labels'); | ||
define('PDFOC_TEMPLATE_NAME_LABELWRITER','Labelwriter'); | ||
define('PDFOC_TEMPLATE_NAME_LABELWRITER_SHIPPING','Labelwriter Shipping'); | ||
define('PDFOC_TEMPLATE_NAME_NONE','None'); | ||
define('PDFOC_TEMPLATE_NAME_PACKING_SLIP','Packing Slip'); | ||
define('PDFOC_TEMPLATE_NAME_PACKING_SLIP_AND_INVOICE','Packing Slip & Invoice'); | ||
define('PDFOC_TEMPLATE_NAME_PRICE_QUOTE','Price Quote'); | ||
|
||
|
||
?> |
Oops, something went wrong.