primo commit
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
satisfy any
|
||||
order deny,allow
|
||||
deny from all
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 6.2.6 tabulizer $
|
||||
* @package tabulizer
|
||||
* @copyright Copyright © 2011 - All rights reserved.
|
||||
* @license GNU/GPL
|
||||
* @author Dimitrios Mourloukos
|
||||
* @author mail info@alterora.gr
|
||||
* @website www.tabulizer.com
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class TabulizerModifyAddemptyrow {
|
||||
function modify(&$rows, $args = null) {
|
||||
if (empty($rows)) {
|
||||
return;
|
||||
}
|
||||
$num_of_rows = count($rows);
|
||||
$num_of_columns = count($rows[1]);
|
||||
if (empty($args)) return;
|
||||
else $empty_row_id = intval($args);
|
||||
|
||||
// sanity check
|
||||
if (($empty_row_id <1)||($empty_row_id>$num_of_rows)) return;
|
||||
|
||||
// construct empty row
|
||||
$empty_row = array();
|
||||
for ($k=1;$k<=$num_of_columns;$k++) $empty_row[$k] = '';
|
||||
|
||||
$k = 1;
|
||||
$modified_rows = array();
|
||||
for ($i=1;$i<=$num_of_rows;$i++) {
|
||||
if ($i == $empty_row_id) {
|
||||
$modified_rows[$k++] = $empty_row;
|
||||
}
|
||||
$modified_rows[$k++] = $rows[$i];
|
||||
}
|
||||
$rows = $modified_rows;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 6.2.6 tabulizer $
|
||||
* @package tabulizer
|
||||
* @copyright Copyright © 2011 - All rights reserved.
|
||||
* @license GNU/GPL
|
||||
* @author Dimitrios Mourloukos
|
||||
* @author mail info@alterora.gr
|
||||
* @website www.tabulizer.com
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class TabulizerModifyAddrow {
|
||||
function modify(&$rows, $args = null) {
|
||||
if (empty($rows)) {
|
||||
return;
|
||||
}
|
||||
$num_of_rows = count($rows);
|
||||
$num_of_columns = count($rows[1]);
|
||||
if (empty($args)) return;
|
||||
|
||||
list($row_id, $delimiter, $columns_str) = explode(':',$args,3);
|
||||
|
||||
// sanity check
|
||||
if (($row_id <1)||($row_id>$num_of_rows)) return;
|
||||
if (empty($delimiter)) return;
|
||||
if (empty($columns_str)) return;
|
||||
|
||||
$columns = explode($delimiter,$columns_str,$num_of_columns);
|
||||
if (count($columns)!=$num_of_columns) return;
|
||||
|
||||
// construct empty row
|
||||
$empty_row = array();
|
||||
for ($k=1;$k<=$num_of_columns;$k++) $empty_row[$k] = '';
|
||||
|
||||
$k = 1;
|
||||
$modified_rows = array();
|
||||
for ($i=1;$i<=$num_of_rows;$i++) {
|
||||
if ($i == $row_id) {
|
||||
$modified_rows[$k++] = $columns;
|
||||
}
|
||||
$modified_rows[$k++] = $rows[$i];
|
||||
}
|
||||
$rows = $modified_rows;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 6.2.6 tabulizer $
|
||||
* @package tabulizer
|
||||
* @copyright Copyright © 2011 - All rights reserved.
|
||||
* @license GNU/GPL
|
||||
* @author Dimitrios Mourloukos
|
||||
* @author mail info@alterora.gr
|
||||
* @website www.tabulizer.com
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class TabulizerModifyConvertcharset {
|
||||
function modify(&$rows, $args = null) {
|
||||
if (empty($rows)) {
|
||||
return;
|
||||
}
|
||||
if (isset($args)) {
|
||||
$encoding = trim(strtoupper($args));
|
||||
} else {
|
||||
if (function_exists(mb_detect_encoding)) {
|
||||
$num_of_rows = count($rows);
|
||||
$num_of_columns = count($rows[1]);
|
||||
$sample_text = '';
|
||||
$ic = ($num_of_rows < 10)?$num_of_rows:10;
|
||||
for ($i = 1; $i<$ic;$i++) {
|
||||
for ($j=1;$j<=$num_of_columns;$j++) {
|
||||
if (isset($rows[$i][$j])) $sample_text .= $rows[$i][$j];
|
||||
}
|
||||
}
|
||||
$encoding = mb_detect_encoding($sample_text, mb_detect_order(), true);
|
||||
} else {
|
||||
$encoding = 'ISO-8859-1//TRANSLIT';
|
||||
}
|
||||
}
|
||||
if (function_exists('iconv')) {
|
||||
foreach ($rows as &$row) {
|
||||
foreach ($row as &$cell) {
|
||||
if ($cell != '') $cell = iconv($encoding, "UTF-8", $cell);
|
||||
}
|
||||
}
|
||||
} else if (function_exists('mb_convert_encoding')) {
|
||||
foreach ($rows as &$row) {
|
||||
foreach ($row as &$cell) {
|
||||
if ($cell != '') $cell = mb_convert_encoding($cell, "UTF-8", $encoding);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
echo "No PHP character conversion library was found. Please try to install either iconv or MBString.";
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -0,0 +1,4 @@
|
||||
<html>
|
||||
<body bgcolor="#FFFFFF">
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @version 6.2.6 tabulizer $
|
||||
* @package tabulizer
|
||||
* @copyright Copyright © 2011 - All rights reserved.
|
||||
* @license GNU/GPL
|
||||
* @author Dimitrios Mourloukos
|
||||
* @author mail info@alterora.gr
|
||||
* @website www.tabulizer.com
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class TabulizerModifyReplaceemptycell {
|
||||
function modify(&$rows, $args = null) {
|
||||
if (empty($rows)) {
|
||||
return;
|
||||
}
|
||||
$replace_str = (isset($args))?$args:' ';
|
||||
foreach ($rows as &$row) {
|
||||
foreach ($row as &$cell) {
|
||||
if ($cell == '') $cell = $replace_str;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user